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.
- Handles count up per conversation:
c1,c2, and so on. The newest 200 cards of a conversation are kept, and they go, with their presses, when the conversation goes. A card over 16,000 characters of JSON, or a card of nothing (no rows and no buttons), is not kept and its answer carries no handle. - A row's link is drawn as a link only when it is a rooted path (
/owner/name/issues/3) or an address on the page's own origin; anything else (another site,//host, a scheme such asjavascript:) is drawn as text. Every title, status, label and value is escaped. - A page reads every card its turns place, and which of their buttons were pressed, in one statement (
voiceOf,src/web/talk_parts.ts). - One reply draws a card once: a later
::showof the same handle is a one-line pointer to the first. One reply draws at most 10 cards, 10 pointers and 6 blocks (VOICE_CAPS,src/core/talk_voice.ts); past them a line or a block stays the text it is, and one quiet line says how many. The terminal and the reply being written keep the same caps. - A kept card is a record of what the forge answered then, shown with its time. It is not read again, so it can outlive the person's access to what it shows, exactly as the reply's own words do.
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:
- another person's card, or a button that does not exist: not found (404);
- a button not on the list below: not done (409), and the page does not draw it;
- a call the tool would refuse the person now: not offered (403);
- a second press of the same button: not done again (409);
- a conversation already holding its most confirms: not done (409), and the button stays to press again;
- a card more than 10 minutes old: not done (410), and a turn in the thread says so, once a card however often it is pressed; no button is claimed; the page draws an old card without its buttons and offers Ask again, which sends "Show result c7 again, fresh."
The buttons drawn on Talk (ACTS, src/actions/talk_act.ts); none takes an argument from a row's words:
| Card | Button |
|---|---|
A planned bulk decision (asks_act plan) | Confirm (dryRun: false) |
Working now (now, crew) | Stop |
| Archive | Archive, 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.
checks(chart): checks that passed and failed each day.shipping(chart): pulls merged each day. Asked what shipped, the agent callspulls { brief: true, days }with norepo, which lists merged pulls per repository across every one you may read: the busiest ten, and the rest counted.traffic(chart): page views and visits per app, from the page-view beacon of the app template (apps/measure.ts,traffic_view), crawlers left out; withoutrepo, every app whose repository you administer, ranked; with it, that app each day. Visitor numbers are the owner's: the gate is the app traffic page's (an admin of the repository), so a member who only writes to it, or anyone else, is told they administer no app, and an app they name is not found. A visit is one visitor on one day (the visitor hash is salted daily); only counts leave the server, never a hash, address or path. An app with no beacon rows in the window is named in the sentence ("built outside the template or never visited"), so a zero is never read as nobody using it. Raw requests to an app are not counted.compute(chart): the machine and the forge's own process by the hour, CPU cores, ormetricmemory(GiB) orload, overhours(1 to 72, default 24). Its values are levels, so its legend and the terminal say the value now, not a sum. Only who may read the machine's figures draws it: a forge admin, or an agent grantedtelemetry: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:
- chart: line, bars or stacked areas. Days across; up to eight series, each in its series colour, or the success and danger colours for a series that is good or bad news; areas fill with a gradient from the series colour. Above the plot, a legend with each series' total; at its start edge, the top of the scale and zero; under it, up to five days at an even step. A day says its values when you point at it. Every number is also in a table a screen reader reads.
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"]}
```
choices:question(up to 300 characters) andoptions, 2 to 4 strings of up to 120 characters that still differ once cleaned. Drawn as the question, at the reply's own weight, and one button per option (none primary; they sit in a row where there is room and stack the width of the reply on a phone); a press sends that option, as cleaned and as shown, as the person's next message (a starter form, so it also works with the script off). It is the person's own message: the fence treats it as their words, the same as if they had typed it, so an option is only ever what the person read on the button. Only the last reply's choices are buttons: once the person has said something after it, they are plain text, and with the script on a press stills every choice button at once and puts the cursor back in the message box.plan:steps, 1 to 12 of{"text": "...", "state": "todo" | "doing" | "done" | "skipped"}, text up to 200 characters. Drawn as plain rows at the reply's own weight, each starting with its state's icon; a done or skipped step is muted. The state is in words in each row's name for a screen reader, and on the page for a skipped step, so it never rests on an icon or a colour alone.known:known,suspectedandunknown, each a list of up to 8 items of up to 300 characters, with at least one item in all. Items are inline Markdown (code, emphasis, http(s) links). Drawn as three quiet groups, items at the reply's own weight, an empty one left out. Each group says itself: an icon (a closed circle, a half circle, a question), its label, and what the label means (Known: read just now; Suspected: likely, not confirmed; Unknown: could not be found out) as its hover and its screen-reader words. The weight steps down from Known to Unknown, which is muted; no group has a colour of its own. The terminal prints the same heads with the same meanings, "Known (read just now):" (KNOWN_WORDS,src/core/talk_voice.ts). An Unknown item names what would settle it in its own words, or as{"item": "...", "settle": "..."}, drawn as one row ("...; to settle: ..."), so the two read together. A::show c7inside an item is its source: the result's title, linked to the card where this reply places it, and quiet text when the reply does not place it; a handle that names nothing kept draws nothing. No item is ever marked as lacking a source.
What the agent is told
The sentences are VOICE in src/crew/conversation_brief.ts, part of every Talk brief:
- Open with the answer in one or two sentences, then go as deep as the question deserves; detail the person did not ask for goes inside a fold. A rule of theirs about length (Settings, Captain) is read as a rule about the opening and about noise, not a limit on depth they ask for. No reply length is fixed.
- Brief and direct: say the thing, then stop, with no preamble, recap or closing summary. The same every time: the same ask gets the same kind of answer in the same order (what was done or found, what it means, what is next) and the same words for the same things. Invention goes where the work needs it (a name, a design, a way round a problem), said as a choice, never into the form of the answer.
- Show a result with
::show cNand say what to look at; never copy its rows into prose. - A small choice that can be undone is made, not asked: the sensible default, done, and one line saying what was picked and how to change it; a question only when the choices lead to work that is costly to redo or cannot be undone.
- A short message after a change ("nah, rounder buttons") corrects the last thing changed and keeps everything else.
- After an action: what changed and where, in at most three lines, and detail only when asked; the
knownblock answers questions about the state of things and is not an appendix to a change. - A value the person gave (a colour, a name, a number) is used exactly; if it fails something real, such as contrast, one line says so and offers the nearest value that passes.
- It never says the forge lacks something it has not looked for, nor that a held action will do more than its call does; it says each thing once.
- When it makes an app, it says in the same reply who can open it: a new app is private, so only the person and those they invite can, and anyone else gets a not-found page; and how to open it up or invite someone.
- Link the forge's things with a rooted path (
pull 4) or asowner/repo#12in words, anything else with a full https:// address; never a relative path such assrc/a.ts, which goes nowhere from a conversation. - Say how each thing is known (read just now, recalled, inferred), give no number, state or name that was not read, and say what was not checked. Before calling anything unknown, try to find it out and move it to known or suspected; what still cannot be settled is listed with what would settle it (who to ask, what to run, what to wait for). A
knownblock when both sides matter, its unknown list short or empty. - Ask once with
choiceswhen the words could mean different work; give aplanbefore several writes and again, brought up to date, at the end. - Steady and plain: no praise, filler, emoji or exclamation marks.
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 terminal (Conversations, open one:
src/tui/screens/talk_chats.ts) prints a placed card as where it came from, its title and status, and alabel: valueline per row, and each block as a plain list.bthere lists the buttons of the shown results that are still fresh, each named by its label and card; Enter presses one through the samepressCard(src/actions/talk_act.ts), so the thread draws the same Do it / Not now, answered on the Confirms screen.GET /api/v1/conversation/turnscarries a reply printed that way asplainbeside its raw text, andforge talkprints it. - The Markdown download (
src/core/conversation_markdown.ts) keeps the reply's raw text,::showlines andforgeblocks included. - A README or any other Markdown on the forge is drawn as before: a
::showline there is text and aforgeblock a code block.
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.