diff --git a/.changeset/legal-nights-work.md b/.changeset/legal-nights-work.md new file mode 100644 index 0000000..a845151 --- /dev/null +++ b/.changeset/legal-nights-work.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/AGENTS.md b/AGENTS.md index ca964fc..d21159c 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,7 +7,7 @@ _use_ a running sideshow lives in `guide/AGENT_SETUP.md`, served at `/setup`.) ## What this is and why A live visual surface for terminal coding agents: agents publish surfaces -(multi-part cards — html, markdown, diff, terminal, image) over +(multi-part cards — html, markdown, diff, terminal, image, mermaid) over CLI/MCP/HTTP; the user watches them render in a browser and comments back. The two-way loop — publish → live render → comment → revise/reply — is the product. When in doubt, optimize for the loop. @@ -33,8 +33,8 @@ consciously, not as a side effect): (`/api/assets`, `/a/:id`), and the shared flow functions both REST and MCP call. - `server/types.ts` — data model + `Store` interface; no runtime imports. A surface is an ordered list of parts (`html` | `markdown` | `diff` | `terminal` - | `image`); a snippet is sugar for a single html part. - `firstHtml`/`htmlPart` bridge the legacy snippet shape. Assets (uploaded blobs) + | `image` | `mermaid`); a snippet is sugar for a single html part. + `htmlPart` bridges the legacy snippet shape. Assets (uploaded blobs) are a separate entity, referenced by `image` parts; `selectEvictions` is the reference-aware LRU policy. - `server/public.ts` — the `sideshow/server` package export (`createApp`, @@ -44,7 +44,7 @@ consciously, not as a side effect): and both migrate legacy `snippets`/`snippetId` data to surfaces on load. - `server/surfacePage.ts` — sandboxed document for one html part: CSP allowlist and the postMessage bridge (resize, sendPrompt, openLink). Only html parts - reach here — markdown, diff, terminal, and image parts are data the + reach here — markdown, diff, terminal, image, and mermaid parts are data the viewer renders natively, never markup in the sandbox. - `server/mcpHttp.ts` — stateless MCP at `/mcp`. `mcp/server.ts` — stdio MCP, a thin client over the HTTP API (passes response fields through untouched).