Skip to content

v0.2.0 — streaming node model, canvas-native rendering, localized site

Pre-release
Pre-release

Choose a tag to compare

@hz210 hz210 released this 18 Aug 05:39
· 20 commits to main since this release

Streaming becomes a first-class property of the node model, every kind renders as itself on the
canvas, and the project site ships in 11 languages. Packages remain private pending license
selection.

  • Each node kind now renders rather than showing its source. A canvas-native display list
    (@dopejs/canvas-renderer) compiles markdown, the sanitized HTML subset, code, JSON, rows, and
    text into positioned text runs and rules: headings and emphasis, syntax highlighting, formatted
    JSON, and tables with aligned columns and a header rule. Layout is pure with injected text
    measurement, and depends on content and frame width only — zoom is a transform, so camera movement
    never rebuilds content. This is the canvas-native profile from design §7.4, not an HTML engine;
    unsupported constructs degrade to plain text.

  • Streaming is a property of the node model, not an HTML feature. StreamSlice/StreamSegmenter
    (@dopejs/canvas-protocol) define one contract; @dopejs/canvas-artifact implements it for text
    (grapheme-safe), code and rows (whole lines), markdown (closed constructs only), and JSON (value
    boundaries, with completeJsonPrefix repairing the prefix so partial data parses), while the HTML
    safe prefix conforms to the same shape. createSegmentedPort (@dopejs/canvas-core) drives any
    kind through one ingestion engine. A property test caught a real defect where a markdown boundary
    retreated when a third backtick turned committed text into a fence; boundaries are now monotonic
    by test. A Canvas Stream story shows six kinds streaming into frames on the live canvas while the
    agent keeps announcing new nodes.

  • Streaming rendering for agent-generated artifacts. computeSafePrefix and StreamingSanitizer
    (@dopejs/canvas-security) render only the part of a growing buffer whose parse no continuation
    can change, withholding partial tags, unterminated raw-text elements, incomplete character
    references, and split surrogate pairs; source quotas are enforced while streaming. A new
    streaming lifecycle state plus draftRevision/provisionalPaintRevision
    (@dopejs/canvas-protocol, @dopejs/canvas-core) keep provisional paint out of authoritative hit
    testing, pin artifacts against eviction mid-generation, and commit exactly one source revision on
    completion. StreamCoalescer and StreamingIngestion turn a token stream into budgeted render
    ticks. A Streaming story in the playground shows the safety boundary live.

  • README and the project site gained a Streaming section; the site's package matrix now reflects
    canvas-native content rendering.

  • Website is localized into 11 languages (English, 简体中文, 繁體中文, Español, Français, Deutsch,
    Русский, עברית, العربية, 日本語, 한국어). Each locale is a real static route (/ja/,
    /ar/docs/usage/, …) generated at build time with the correct lang/dir, translated copy,
    hreflang alternates, and a header language switcher. Right-to-left locales get logical-property
    layout; state diagrams stay left-to-right because their labels are English identifiers. The
    technical documents remain English with a localized notice.