From b6a9b81faa17f611f0f5f41805c6f63a6d3f8186 Mon Sep 17 00:00:00 2001 From: Ben Vinegar Date: Wed, 17 Jun 2026 21:23:17 -0400 Subject: [PATCH] docs(agents): add mermaid part kind, drop stale firstHtml ref The part-kind lists in AGENTS.md predated the mermaid part (#53) and still referenced firstHtml, which no longer exists (#44). Sync the doc to the actual SurfacePartKind: add mermaid; htmlPart is the only bridge. Co-Authored-By: Claude Opus 4.8 (1M context) --- .changeset/legal-nights-work.md | 2 ++ AGENTS.md | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 .changeset/legal-nights-work.md 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).