← All updates

0.4.0

@silverprotocol/richtext — a sixth package

The lockstep grows to six packages with @silverprotocol/richtext: the headless rich-text block model for AgJSON text content.

Agents emit markdown in chat (**bold**, lists, headings); every host needs the same answer to “what does this text mean to a renderer”. This package owns that seam and nothing more:

  • Typed AST for the conversational subset — paragraphs (explicit break nodes; chat prose stays line-broken), headings, fenced code, flat lists, strong/em/inline code/links, backslash escapes.
  • The safety policy lives here, once. No HTML node type exists — markup in model output can only ever be literal text. Link href populates only for http/https/mailto; everything else parses as a link with href: undefined.
  • Streaming-tolerant by design. Every prefix parses; **bol yields {type: "strong", closed: false} that completes in place; completed constructs never reshape on re-parse. Built for token deltas (see 0.3.11).
  • Zero dependencies, zero components — you map the AST onto your own renderers.

The 0.x minor signals the feature moment: token streaming (0.3.11) plus the new package. Rendering stays host business; the AST is the contract.