Public: anyone can read this; the crew can change it.
Talk API: an agent turn's cards as data, with exact values #18008
Merged 12h 47m ago, live in production
Each agent turn from GET /api/v1/conversation/turns now carries cards, which is the results its text places with ::show cN, as typed data a native client can draw itself. A bearer token of either scope reads them. Shape of each card Every card has { ref, kind, title, source, tool, at }.
-
Reviews
ApprovedClean. Cards come from
cardsPlaced, which checks the person, so the read is gated as before. Series values are copied from the keptChartData, the same source as the page andwidgetLines. The schema markscardsoptional for non-agent turns, and kinds are enumerated from the web's ownCARD_KINDS. Tests cover the exact values (3.25, 0.001), order, dedupe, a dangling handle and the schema. The how-to is in docs/features/talk-voice.md, not the README, and the commit carriesNo door:with a reason. No new dependency, no secrets, no new input surface. -
Checks
shipped production is serving it deploy 5ce50ab
-
History
- Rewrap comments (#18005) 811a34e
- Talk API: an agent turn's cards as data, with exact values (#18005) 01ac688
- Traces: every conversation and run kept as a trace, imported from outside agents, and explored in the forge (#17968) 35a5490
- Traces 3: one trace as a tree beside a time strip, with what it changed (#17996) 2902a64
- Merge pull request #17997 from sold/ssh-mlkem 05c87e1
- SSH: the hybrid's K has its own known answer, the client test skips the hybrid on OpenSSH before 9.9, one comment, the docs in their own paragraph 281e40c
- Merge pull request #17998 from sold/tab-start 7e39794
- The /tab fix serves #16840 4eed511
- /tab starts in Safari and Chrome: the worker sees its host page, and the page waits for activation a5d9dd7
- SSH offers the hybrid post-quantum key exchange first: mlkem768x25519-sha256 1124a92
- The api-* test files read no answer that disagrees with openapi.json (#17990) 2d01f4a
- The suite's fetch reports each /api/v1 answer that disagrees with openapi.json, without failing yet (#17989) 3a1266c
- Anonymous, opt-in app telemetry: a route to receive daily summaries, and an owner view (#17967) 973052e
- Runner jobs' git-upload-pack: count the work per job, then cut it so the serving thread is not held (#17984) ee5308f
- A `[loop]` stall line names what the serving thread was doing: the route or duty in flight (#17982) bb47d9a
- takeLook's loopback-only test stops failing checks for a missing prerequisite (56 reds last week) (#17979) 87f7f1b
- A Talk turn that reaches its limit says so and offers one tap to go on (#17981) 7ada34c
- Talk logs one line per model call: account, model, seconds, how it ended (#17980) 353f588
- Sentinel: The lane has stopped: nothing has merged and nothing said so (#17973) 010904c
- Full suite red: test/traffic-truth.test.ts (#17972) 13460d3
Each agent turn from GET /api/v1/conversation/turns now carries cards, which is the results its text places with ::show cN, as typed data a native client can draw itself. A bearer token of either scope reads them.
Shape of each card
- Every card has
{ ref, kind, title, source, tool, at }.refis thecNof the::show cNline.sourceis the call in plain words.toolis the tool that drew it, andatis the ISO time it was kept.
- A chart's
kindisline,barorarea. It addsseries: [{ label, unit?, tone?, points: [{ t?, v }] }], andlevels: truewhen each value is a level, so a client reads the last one, not the sum. - Any other kind (rows, a receipt) adds
statusandrows: [{ label, value, link?, depth? }], and has noseries. - Cards come in the order the text first places them, each once. A handle that names no kept result is left out, and a failed turn carries
cards: [].
One source for the values
The series are copied from the same kept chart data that the page's SVG and the terminal's block-character lines (widgetLines) are built from, never read back from a drawing. A test checks the exact values, including 3.25 and 0.001.
Contract
- The route's reply is now typed in full as
ConversationTurns, withConversationTurn,TurnCard,TurnCardSeries,TurnCardPointandTurnCardFieldbeside it. Every key a turn already carried (work,costUsd,plain,failedand so on) is named too, because the schema test refuses unnamed ones. - The new code is
src/core/talk_cards.ts, wired in atsrc/http/api/conversation_talk.ts. - I reused
cardsPlacedandvoiceParts/shownIn, so nothing new parses a reply. - I added a
numhelper toschema_kit.ts.
What I left out
- I added no terminal change. The terminal already prints these same kept results through
plainVoice, so the commit saysNo door: …. The CLI's type for the turns call now listscards. - I added no per-point timestamps beyond the chart's own x label (
t). Widgets have only labels such as a day, an hour or a name.
Checks
tscis clean andgate.tspasses.test/widgets.test.tsandtest/openapi-schemas.test.tspass, along with the contract,conversation-talk,hollowand unused-exports tests.- I did not run the rest of the suite; the forge's check runs it.
- The how-to is in
docs/features/talk-voice.md.
To try it
Have a conversation whose agent places a ::show result, then call GET /api/v1/conversation/turns with any token and read turns[].cards. /api/v1/openapi.json has the schemas.
After merge When this merges, I'll comment on #18005 with each route's final shape.
Each agent turn from
GET /api/v1/conversation/turnsnow carriescards, which is the results its text places with::show cN, as typed data a native client can draw itself. A bearer token of either scope reads them.Shape of each card
{ ref, kind, title, source, tool, at }.refis thecNof the::show cNline.sourceis the call in plain words.toolis the tool that drew it, andatis the ISO time it was kept.kindisline,barorarea. It addsseries: [{ label, unit?, tone?, points: [{ t?, v }] }], andlevels: truewhen each value is a level, so a client reads the last one, not the sum.statusandrows: [{ label, value, link?, depth? }], and has noseries.cards: [].One source for the values The series are copied from the same kept chart data that the page's SVG and the terminal's block-character lines (
widgetLines) are built from, never read back from a drawing. A test checks the exact values, including3.25and0.001.Contract
ConversationTurns, withConversationTurn,TurnCard,TurnCardSeries,TurnCardPointandTurnCardFieldbeside it. Every key a turn already carried (work,costUsd,plain,failedand so on) is named too, because the schema test refuses unnamed ones.src/core/talk_cards.ts, wired in atsrc/http/api/conversation_talk.ts.cardsPlacedandvoiceParts/shownIn, so nothing new parses a reply.numhelper toschema_kit.ts.What I left out
plainVoice, so the commit saysNo door: …. The CLI's type for the turns call now listscards.t). Widgets have only labels such as a day, an hour or a name.Checks
tscis clean andgate.tspasses.test/widgets.test.tsandtest/openapi-schemas.test.tspass, along with the contract,conversation-talk,hollowand unused-exports tests.docs/features/talk-voice.md.To try it Have a conversation whose agent places a
::showresult, then callGET /api/v1/conversation/turnswith any token and readturns[].cards./api/v1/openapi.jsonhas the schemas.After merge When this merges, I'll comment on #18005 with each route's final shape.
Closes #18005