Talk's voice: shown results and agent blocks

A reply from the forge's agent on /talk is Markdown with two additions, drawn so the forge's data and the agent's words look different.

Shown results

When a tool answers the forge's agent in a conversation and the answer has a card (cardFor, src/web/studio/cards.ts), the forge keeps the card for that conversation (conversation_card, src/core/talk_voice.ts) and adds one text block after the answer, outside the fenced data:

Shown result c7: a line `::show c7` in your reply draws this result for the person.

The agent never receives the card itself. A line in its reply that is exactly ::show c7, on its own line and outside a code fence, is drawn on the page as the kept card, bare, set apart from the agent's words by a hairline on its start side: a head with the forge's mark, its title and status, and under them, small and muted, "From the forge: <the call in plain words> · as of 14:02 UTC"; its rows, each a plain row that opens its page; its buttons, at the end, each a plain button. The line saying where it came from, with its time, is what no reply's Markdown carries: a reply that quotes a card's words is a quote. A card with no rows is that head on one line. A handle that names no card kept for this conversation and this person draws "Result not found." and nothing else. Answers to any other caller are unchanged.

Buttons on a shown result

A card's buttons post only the card's id and which button (a0, or r3.0 for a row's button) to POST /talk/act, from the person's own signed-in session on the same origin; a token is refused (403), another site is refused. The tool and its arguments are read from the kept card, never from the request. A press first checks that the forge would still let the person make the call: a call that plans first is planned as them now, and one the tool refuses is not offered. A press never writes: it keeps the call as a held write and draws the ordinary Do it and Not now turn, with the forge's own sentence for it (confirmSentence, src/crew/conversation_ask.ts) and the card it came from ("From the result shown above: Working now."). The button is claimed only once that confirm is kept, and is then drawn still, reading Asked, even after Not now. Do it then runs it once, as the person, now, so access is checked again at that moment however old the card, the way every confirmed call runs (sayYes, src/actions/conversation_confirms.ts), and leaves the same result turn. Refusals, each said in words:

The buttons drawn on Talk (ACTS, src/actions/talk_act.ts); none takes an argument from a row's words:

CardButton
A planned bulk decision (asks_act plan)Confirm (dryRun: false)
Working now (now, crew)Stop
ArchiveArchive, Wake
The Later gate (held)Close the done ones

Not drawn in this version: a button that sends typed words (tell), the asks card's per-row Ship, Decline and Decide (each only plans), its Undo, and the archive card's Undo.

Widgets: the forge's data as a chart

A widget (#6009) is something the forge's agent can show you in a Talk reply, drawn by the forge itself from the forge's own data: for now, a chart. The agent never writes the drawing; it asks the forge for a widget by name, the forge reads the data as you, and the reply places the result with a ::show c7 line, exactly as it places a card.

The registry

A widget is a name, a title, one line telling the agent what it shows, the renderer that draws it, a JSON schema of its arguments, and read, which returns the data through the same access checks every page uses. A repository you may not read is "not found", the same as one that does not exist. The data is held to its renderer's schema (DATA_SCHEMA in src/widgets/registry.ts), so every widget of one renderer has one shape. The widgets are WIDGETS in the same file; show with no widget lists them with what each takes, and /llms.txt names them, live, to a reader with an account.

The forge's widgets

checks and shipping take repo (owner/name; without it, every repository you work on: your own and your teams') and days (1 to 90, default 14, today included), and count only what you may read.

Asked for a graph, a chart, usage, throughput or how the server is doing, the agent calls show with these (its brief says so).

How it is drawn

The renderer is server-drawn markup with no script, in src/web/talk_parts.ts, the same in light and dark, at phone width and right to left:

In Talk a widget is drawn as a shown card is, bare under a hairline on its start side: the forge's mark and its title, then the line no reply's Markdown carries, where it came from with its window, time and repository ("From the forge: Checks per day · 7 days · as of 14:02 UTC · alice/shop"). A widget is a record of what the forge answered then; it is not read again. It has no buttons.

In the terminal

forge talk and the terminal's Talk screen print a placed widget from the same data, through the parser every door uses: a chart as one line of block characters a series (one scale for all, its total after it) over the days it spans. GET /api/v1/conversation/turns carries the printed reply as plain when it places a card or a widget.

Limits

A chart holds at most 120 points and 8 series, and a label 80 characters. A kept widget is held to the same 16,000 characters of JSON as a card, and to its renderer's schema when it is read back: one that does not fit draws "Result not found."

Agent blocks

A fenced code block whose info string is forge and whose first line names the kind, the rest of the block JSON in that kind's one shape with no other keys; or one whose info string names the kind itself (forge plan, or just plan), the whole block that JSON. The fence is read leniently and the body strictly: a block so labelled is drawn only when its body is exactly that shape, so an ordinary code block marked plan stays code. Strings are one line each, and every one is cleaned the way a confirm sentence cleans an argument (unsaid, src/crew/conversation_ask.ts): an invisible or direction-changing character (a zero-width space, a right-to-left override) becomes a space, so what is drawn is what is sent. A block that does not validate (bad JSON, a wrong count, a long string, an unknown kind or state) is drawn as the ordinary code block it is, never as an error.

```forge
choices
{"question": "Which app should I deploy?", "options": ["alice/shop", "alice/blog"]}
```

What the agent is told

The sentences are VOICE in src/crew/conversation_brief.ts, part of every Talk brief:

The brief no longer tells every person they are the forge's owner: it says to act within what their role allows, and the role reaches the agent in the MCP's own instructions. The line that asks an outside harness to keep what it relays to three sentences is not sent to Talk's own agent. A new person's starting rules say "Open with the answer in a line or two" where they said three lines; rules a person already keeps are theirs and are not changed. test/talk-brief-voice.test.ts holds the brief and the parser together.

While the reply is written

The live block (docs/features/talk.md, "Live") is drawn through the same code as a stored reply (liveHtml in src/web/talk_parts.ts): a result placed so far shows as its card at once. A forge block is left out until its fence is closed, and a last line that may still become ::show cN waits until it is whole (wholeSoFar), so the reader never sees a block's JSON or a handle turn into its drawing. The choices of a reply still being written are drawn as text; only the stored reply's are buttons. The terminal's ssh <forge> talk --follow prints the same whole parts as they arrive, as forge talk prints a stored reply (plainVoice): a placed result as its lines, a block as a plain list, never a handle or a block's JSON (src/tui/talk_follow.ts). Proof: test/talk-live-voice.test.ts, and the follow tests in test/talk-live.test.ts.

Other doors

The parsing is one module for every door, src/core/talk_voice.ts; the page's drawing is src/web/talk_parts.ts, called once from turnHtml in src/web/pages/talk.ts. Proof: test/talk-shown.test.ts and test/talk-blocks.test.ts.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs