driverkit 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTROLS.md +578 -0
- package/README.md +104 -2
- package/dist/agent/backend.d.ts +69 -0
- package/dist/agent/backend.d.ts.map +1 -0
- package/dist/agent/backend.js +130 -0
- package/dist/agent/backend.js.map +1 -0
- package/dist/agent/control.d.ts +148 -0
- package/dist/agent/control.d.ts.map +1 -0
- package/dist/agent/control.js +342 -0
- package/dist/agent/control.js.map +1 -0
- package/dist/agent/index.d.ts +9 -0
- package/dist/agent/index.d.ts.map +1 -0
- package/dist/agent/index.js +6 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/loop.d.ts +136 -0
- package/dist/agent/loop.d.ts.map +1 -0
- package/dist/agent/loop.js +824 -0
- package/dist/agent/loop.js.map +1 -0
- package/dist/agent/render.d.ts +173 -0
- package/dist/agent/render.d.ts.map +1 -0
- package/dist/agent/render.js +425 -0
- package/dist/agent/render.js.map +1 -0
- package/dist/agent/tools.d.ts +138 -0
- package/dist/agent/tools.d.ts.map +1 -0
- package/dist/agent/tools.js +622 -0
- package/dist/agent/tools.js.map +1 -0
- package/dist/agent/types.d.ts +566 -0
- package/dist/agent/types.d.ts.map +1 -0
- package/dist/agent/types.js +32 -0
- package/dist/agent/types.js.map +1 -0
- package/dist/browser/budget.d.ts +92 -0
- package/dist/browser/budget.d.ts.map +1 -0
- package/dist/browser/budget.js +151 -0
- package/dist/browser/budget.js.map +1 -0
- package/dist/browser/connect.d.ts +368 -0
- package/dist/browser/connect.d.ts.map +1 -0
- package/dist/browser/connect.js +1038 -0
- package/dist/browser/connect.js.map +1 -0
- package/dist/browser/elsewhere.d.ts +89 -0
- package/dist/browser/elsewhere.d.ts.map +1 -0
- package/dist/browser/elsewhere.js +91 -0
- package/dist/browser/elsewhere.js.map +1 -0
- package/dist/browser/frames.d.ts +85 -0
- package/dist/browser/frames.d.ts.map +1 -0
- package/dist/browser/frames.js +11 -0
- package/dist/browser/frames.js.map +1 -0
- package/dist/browser/index.d.ts +8 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +9 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/check/check.d.ts +171 -0
- package/dist/check/check.d.ts.map +1 -0
- package/dist/check/check.js +666 -0
- package/dist/check/check.js.map +1 -0
- package/dist/check/index.d.ts +3 -0
- package/dist/check/index.d.ts.map +1 -0
- package/dist/check/index.js +2 -0
- package/dist/check/index.js.map +1 -0
- package/dist/check/types.d.ts +149 -0
- package/dist/check/types.d.ts.map +1 -0
- package/dist/check/types.js +29 -0
- package/dist/check/types.js.map +1 -0
- package/dist/controls/controls.d.ts +198 -0
- package/dist/controls/controls.d.ts.map +1 -0
- package/dist/controls/controls.js +742 -0
- package/dist/controls/controls.js.map +1 -0
- package/dist/controls/dom.d.ts +108 -0
- package/dist/controls/dom.d.ts.map +1 -0
- package/dist/controls/dom.js +56 -0
- package/dist/controls/dom.js.map +1 -0
- package/dist/controls/index.d.ts +26 -0
- package/dist/controls/index.d.ts.map +1 -0
- package/dist/controls/index.js +23 -0
- package/dist/controls/index.js.map +1 -0
- package/dist/controls/rows.d.ts +66 -0
- package/dist/controls/rows.d.ts.map +1 -0
- package/dist/controls/rows.js +127 -0
- package/dist/controls/rows.js.map +1 -0
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +15 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/registry.d.ts +192 -0
- package/dist/core/registry.d.ts.map +1 -0
- package/dist/core/registry.js +2799 -0
- package/dist/core/registry.js.map +1 -0
- package/dist/core/types.d.ts +2468 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +19 -0
- package/dist/core/types.js.map +1 -0
- package/dist/otel/index.d.ts +122 -0
- package/dist/otel/index.d.ts.map +1 -0
- package/dist/otel/index.js +157 -0
- package/dist/otel/index.js.map +1 -0
- package/dist/react/index.d.ts +191 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +547 -0
- package/dist/react/index.js.map +1 -0
- package/dist/react/runtime.d.ts +95 -0
- package/dist/react/runtime.d.ts.map +1 -0
- package/dist/react/runtime.js +54 -0
- package/dist/react/runtime.js.map +1 -0
- package/dist/react/store.d.ts +333 -0
- package/dist/react/store.d.ts.map +1 -0
- package/dist/react/store.js +695 -0
- package/dist/react/store.js.map +1 -0
- package/dist/relay/auth.d.ts +244 -0
- package/dist/relay/auth.d.ts.map +1 -0
- package/dist/relay/auth.js +391 -0
- package/dist/relay/auth.js.map +1 -0
- package/dist/relay/frames.d.ts +141 -0
- package/dist/relay/frames.d.ts.map +1 -0
- package/dist/relay/frames.js +20 -0
- package/dist/relay/frames.js.map +1 -0
- package/dist/relay/index.d.ts +8 -0
- package/dist/relay/index.d.ts.map +1 -0
- package/dist/relay/index.js +4 -0
- package/dist/relay/index.js.map +1 -0
- package/dist/relay/relay.d.ts +277 -0
- package/dist/relay/relay.d.ts.map +1 -0
- package/dist/relay/relay.js +1026 -0
- package/dist/relay/relay.js.map +1 -0
- package/dist/relay/serve.d.ts +33 -0
- package/dist/relay/serve.d.ts.map +1 -0
- package/dist/relay/serve.js +86 -0
- package/dist/relay/serve.js.map +1 -0
- package/dist/widget/chat.d.ts +290 -0
- package/dist/widget/chat.d.ts.map +1 -0
- package/dist/widget/chat.js +486 -0
- package/dist/widget/chat.js.map +1 -0
- package/dist/widget/css.d.ts +49 -0
- package/dist/widget/css.d.ts.map +1 -0
- package/dist/widget/css.js +532 -0
- package/dist/widget/css.js.map +1 -0
- package/dist/widget/dom.d.ts +143 -0
- package/dist/widget/dom.d.ts.map +1 -0
- package/dist/widget/dom.js +27 -0
- package/dist/widget/dom.js.map +1 -0
- package/dist/widget/highlight.d.ts +64 -0
- package/dist/widget/highlight.d.ts.map +1 -0
- package/dist/widget/highlight.js +136 -0
- package/dist/widget/highlight.js.map +1 -0
- package/dist/widget/index.d.ts +9 -0
- package/dist/widget/index.d.ts.map +1 -0
- package/dist/widget/index.js +20 -0
- package/dist/widget/index.js.map +1 -0
- package/dist/widget/position.d.ts +166 -0
- package/dist/widget/position.d.ts.map +1 -0
- package/dist/widget/position.js +497 -0
- package/dist/widget/position.js.map +1 -0
- package/dist/widget/settings.d.ts +116 -0
- package/dist/widget/settings.d.ts.map +1 -0
- package/dist/widget/settings.js +117 -0
- package/dist/widget/settings.js.map +1 -0
- package/dist/widget/widget.d.ts +442 -0
- package/dist/widget/widget.d.ts.map +1 -0
- package/dist/widget/widget.js +2005 -0
- package/dist/widget/widget.js.map +1 -0
- package/package.json +153 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loop.js","sourceRoot":"","sources":["../../src/agent/loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAGH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAajE;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AAE3C;;;;;;;;;GASG;AACH,MAAM,YAAY,GAAG,cAAc,CAAC;AAEpC,MAAM,aAAa,GACjB,qFAAqF;IACrF,qFAAqF;IACrF,+BAA+B,CAAC;AAElC;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAE3C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,GACd,sFAAsF,CAAC;AAEzF;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAS,SAAS,CAAC,IAAc,EAAE,GAA0B;IAC3D,MAAM,IAAI,GACR,GAAG,KAAK,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tE,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE;QAChD,GAAG,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC;QACrC,GAAG,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC;QAC3C,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC;KACxC,CAAC,CAAC;IAEH,IAAI,IAAI,GAAG,aAAa,CAAC,MAAM,CAAC,CAAC;IACjC,IAAI,MAAM,KAAK,KAAK,EAAE,CAAC;QACrB,4EAA4E;QAC5E,wEAAwE;QACxE,sEAAsE;QACtE,mDAAmD;QACnD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,CAAC,GAAG,YAAY,CAAC,CAAC;QACrE,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,OAAO,GAAG,MAAM,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpG,sEAAsE;QACtE,wEAAwE;QACxE,uEAAuE;QACvE,0EAA0E;QAC1E,IAAI,IAAI;YAAE,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;IAChC,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;AACnE,CAAC","sourcesContent":["/**\n * driverkit/agent — the loop.\n *\n * This is the other case the library is for. The relay and the MCP server\n * carry verbs to an agent in another process; this one has no transport at\n * all, because the page already holds the driver. The person types \"find the\n * Acme contacts and accept the top thousand\" into a panel in the corner, and\n * `drive` turns that into model turns and `driver.call()`s until the model\n * answers in prose.\n *\n * Which makes this a loop and not a protocol. There are no frames, no ids, no\n * deadline and no `WireResult`: every call lands, every call returns a\n * `Result`, and every `Result` carries a snapshot. What is left to get right\n * is the shape of the conversation, and there are four decisions in it that\n * matter more than the code:\n *\n * **1. The static half is computed once, above the loop.** `system` and\n * `tools` are derived from `driver.manifest()` before the first turn and never\n * touched again, so they are byte-identical on every call to `think` and a\n * caller can have their provider cache them. One per-turn string in there — a\n * clock, a step counter, the current screen — re-prices the entire prefix on\n * every turn, and the prefix is the big half. Making them `const`s outside the\n * loop is the only version of this rule that cannot be broken by accident.\n *\n * **2. The screen goes in the newest message, never in the system prompt.** It\n * is the dynamic half by definition. It enters the conversation exactly twice:\n * on the person's own turn, and riding on each tool result. And it LEAVES\n * again: one copy survives, the newest, and every older turn keeps its words\n * or its outcome and gives up its screen. Each copy is small and ten of them\n * are not, and they land in the half nothing caches — see `pruneScreens`,\n * which is where the rest of that argument is.\n *\n * **3. One round trip per step, not two.** `Result` already carries the\n * snapshot after the call, so the tool result the model reads is the outcome\n * *and* the new screen. The loop never follows a verb with a read. With ten\n * steps that is ten saved model turns, each of which would otherwise have\n * re-read the whole prefix — and the round trips, not the manifest, are what\n * actually cost money.\n *\n * **4. A refusal is information, not a failure.** It is fed back and the model\n * is expected to adapt. The one thing that must not happen is adapting\n * forever: the same verb refused the same way three times is a model that has\n * stopped learning, and continuing costs the person money to watch nothing\n * happen.\n *\n * **5. The run is watchable and interruptible, and that is a property of the\n * loop rather than of a UI.** The agent is moving the screen a person is\n * looking at, so going as fast as the model answers is the wrong speed: what\n * the person needs is to see each step coming and have somewhere to put their\n * hand. Pacing (`pace`) puts a cancellable wait before each call, run controls\n * (`controls`) hold the run between calls, and the events are detailed enough\n * that a step list can show a row before the call it describes has happened.\n * None of it reaches the model — it is runtime state, and decision 1 is still\n * the rule: nothing per-turn goes anywhere near `system` or `tools`.\n */\n\nimport type { Driver, Manifest, Result, Scalar } from \"../core/index.ts\";\nimport { paceWait, realClock } from \"./control.ts\";\nimport { SLOW_MS, renderDuration, renderOutcome, renderSnapshot } from \"./render.ts\";\nimport { READ_SCREEN, systemPrompt, toolsFor } from \"./tools.ts\";\nimport type {\n CallEvent,\n Clock,\n CommitDecision,\n DriveOptions,\n DriveOutcome,\n RunState,\n StopReason,\n ToolCall,\n Turn,\n} from \"./types.ts\";\n\n/**\n * The refusal slug a vetoed commit comes back as.\n *\n * A new name rather than one of the core's. PROTOCOL.md reserves `stale`,\n * `unknown-verb`, `bad-argument`, `unmounted`, `threw`, `no-such-tab`,\n * `tab-went-away` and `timeout`; this is reserved on the same grounds and for\n * the same reason. A model that cannot tell \"the person said no\" from \"your\n * arguments were wrong\" will retry with different arguments, which is the one\n * response that is certainly wrong — the arguments were fine and the answer\n * was no.\n *\n * An app must not name one of its own verb refusals this.\n */\nexport const DECLINED = \"declined-by-user\";\n\n/**\n * The core's cost-ceiling slug, spelled here because this file has to\n * recognise it. The same arrangement as `DECLINED` above: the string is\n * PROTOCOL.md's rather than either file's, and the core exports the whole\n * reserved list rather than a constant per slug.\n *\n * Recognised and never emitted. The loop cannot run out of somebody else's\n * budget on its own — only `call()` can say this — so a match here is always\n * the driver talking.\n */\nconst BUDGET_SPENT = \"budget-spent\";\n\nconst DECLINED_HINT =\n \"The person was asked to confirm this and declined. Do not retry it, and do not try \" +\n \"another verb that does the same thing. Tell them what you were about to do and ask \" +\n \"what they would like instead.\";\n\n/**\n * How a screen is introduced, and the seam pruning cuts at.\n *\n * A marker rather than a guess at where the rest of the turn ends. Pruning has\n * to remove exactly what this file added and nothing anybody typed, and looking\n * for a line this file wrote is the only way to be sure of that.\n *\n * Written on both kinds of turn that carry a screen — the person's own, and\n * every tool result — so there is one seam and not two. A tool turn whose text\n * were nothing but a screen would have no seam in it at all, which is why even\n * `read_screen`, whose whole answer is the screen, gets an outcome line above\n * this marker. One shape, one cut; see `pruneScreens`.\n */\nconst SCREEN_MARK = \"\\n\\nOn screen now:\\n\";\n\n/**\n * What an older turn's screen is replaced with.\n *\n * Replaced, not deleted. A turn that simply has no screen reads as a turn where\n * the screen was empty, and \"there were no contacts a moment ago\" is a worse\n * thing for a model to believe than \"there was a screen there and you are not\n * being shown it any more\". On a tool result the empty reading would be worse\n * still: a verb whose result showed no rows looks like a verb that emptied the\n * table.\n *\n * One sentence for both kinds of turn, and it is deliberately short. Unlike the\n * user-turn case, which happens once or twice in a conversation, this is paid\n * once per pruned tool turn — so it is the one piece of boilerplate in here\n * that is itself O(steps), and the only honest answer to that is to keep it to\n * a line. It buys back four fifths of a screen each time it is written.\n */\nconst STALE_NOTE =\n \"\\n\\n(screen no longer shown; only the newest screen in this conversation is current)\";\n\n/**\n * A tool result for a call the loop decided not to run.\n *\n * **Why this is not optional.** `DriveOutcome.messages` is documented as\n * something a caller hands back as the next run's `history`, and every tool-use\n * API — Anthropic's included — rejects a conversation in which a `tool_use`\n * block has no matching result. A 3-call assistant turn that stops after the\n * first call therefore does not merely lose two results: it poisons the\n * widget's own conversation permanently, and the person's next question comes\n * back as a 400 from then on, forever, with nothing on screen to explain it.\n * One missing tool turn is a dead panel.\n *\n * So the answer is written for the model rather than for the protocol. It says\n * plainly that the verb did not run and why, because the honest alternative — a\n * blank or an \"ok\" — would have the model believe a commit happened and build\n * its next step on it. What it must never say is anything that reads as a\n * failure to retry: `stopped` and `aborted` are decisions, not errors.\n */\nfunction abandoned(call: ToolCall, why: \"stopped\" | \"aborted\"): Turn {\n const text =\n why === \"aborted\"\n ? \"not run: the person stopped this run before this call was made. Nothing happened \" +\n \"here and nothing changed. This is not an error and must not be retried by itself.\"\n : \"not run: the run stopped at an earlier call in this same turn. Nothing happened \" +\n \"here and nothing changed. This is not an error and must not be retried by itself.\";\n return { role: \"tool\", callId: call.id, name: call.name, text };\n}\n\n/**\n * Keep exactly one screen in the conversation: the newest one, wherever it is.\n *\n * The rule the core states on `Snapshot` and this function exists to hold:\n *\n * \"an agent is never shown more than the person at the keyboard. Same\n * filters, same sort, same page. That is what keeps the cost flat as the\n * data grows — a hundred rows on screen is a hundred rows in the prompt\n * whether the table holds a hundred or a million\"\n *\n * Flat as the data grows, and the cost of a step is what the person could see\n * when it ran. A conversation holding one copy of the screen per step honours\n * neither: the person at the keyboard is looking at one screen, and the prompt\n * carried ten. Each copy is small, which is exactly why this went unnoticed for\n * as long as it did — the leak is in the COUNT, not in the size, and it lands\n * in the uncached half where every byte is paid for on every remaining turn.\n *\n * Both kinds of turn carry one. A user turn carries the screen as it was when\n * the person spoke; a tool turn carries the screen the call left behind, which\n * is the authoritative one at the moment it arrives. Each is right at the time\n * and wrong a few turns later, for the same two reasons, and the second is the\n * one that matters: old blocks are bytes in the uncached half paid for forever,\n * and a model that reads a screen from four messages ago as current will act on\n * rows that have moved. The second is a correctness problem wearing a cost\n * problem's clothes — and the cure is written into `DriveOutcome.messages`\n * already: a model is never shown two screens and left to work out which one is\n * now true.\n *\n * **What survives on an older tool turn, and what a model loses.** The outcome\n * line stays: `ok`, the count and its warning, `refused: <slug>` and its hint.\n * That is what an old tool turn is actually consulted for — \"what did my third\n * call do\" — and it is the half that never goes stale. What is gone is the\n * table as it stood between two of the model's own calls. A model that wants it\n * can call `read_screen`, which costs one round trip against ten turns of\n * carrying it, and the newest screen is always in front of it untouched.\n *\n * **Why the newest and not the newest few.** A window of N would still grow\n * with N, would need a number nobody can justify, and would put two or three\n * screens of the same table in the tail with nothing but position to say which\n * is live — reintroducing the misreading above at a constant factor. Keeping\n * the last screen per `Snapshot.screen` id was the other candidate, and it\n * fails on the same count: an app with six screens keeps six, the total grows\n * with navigation rather than with steps, and `screen` is optional — so the\n * bill would depend on whether an app happens to name its screens.\n */\nexport function pruneScreens(messages: Turn[]): Turn[] {\n // The newest turn that carries a screen, of either kind. Found by looking for\n // the marker rather than by role: after a call, the newest screen is on a\n // tool turn and the person's own turn is as stale as any other.\n let newest = -1;\n for (let i = messages.length - 1; i >= 0; i--) {\n const turn = messages[i]!;\n if (turn.role === \"assistant\") continue;\n if (turn.text.includes(SCREEN_MARK)) {\n newest = i;\n break;\n }\n }\n\n return messages.map((turn, i) => {\n if (turn.role === \"assistant\" || i === newest) return turn;\n const at = turn.text.indexOf(SCREEN_MARK);\n if (at === -1) return turn;\n // Everything before the marker is kept verbatim, which on a tool turn is\n // the outcome line and on a user turn is what the person typed. Spread\n // rather than rebuilt, so a tool turn keeps the `callId` its `tool_use`\n // is answering: pruning rewrites text and never removes or re-pairs a\n // turn, which is what makes it safe to do to something a caller will hand\n // back as `history`. See `abandoned`.\n return { ...turn, text: turn.text.slice(0, at) + STALE_NOTE };\n });\n}\n\n/**\n * Run the loop until the model answers, or a bound stops it.\n *\n * ```ts\n * const out = await drive(driver, {\n * // No model client in this package. The browser cannot hold a key, so the\n * // realistic shape is a call to your own backend, which already knows who\n * // the person is.\n * think: backendThink(\"/api/chat\"),\n * task: \"find the Acme contacts and accept the top thousand\",\n * // Opt-in here; mountWidget turns it on by default. See onBeforeCommit.\n * onBeforeCommit: ({ verb, snapshot }) =>\n * confirm(`${verb.describe}\\n\\n${snapshot.selected?.length ?? 0} selected. Go ahead?`),\n * });\n * out.stop; // \"answered\" | \"max-steps\" | \"aborted\" | \"stuck\" | \"over-budget\" | \"silent\"\n * ```\n */\nexport async function drive(driver: Driver, options: DriveOptions): Promise<DriveOutcome> {\n const manifest = driver.manifest();\n\n // The static half. Computed here, used unchanged on every turn below. See\n // decision 1 in the file comment, and `the system prompt is byte-identical\n // across turns` in the tests, which asserts it rather than trusting it.\n const timing = options.timing ?? \"off\";\n // The note about what a `took:` line means goes in the CACHED half, once,\n // and the per-call line is then four words. The alternative -- a sentence of\n // guidance beside every duration, the way `count` carries `COUNT_NOTE` --\n // would be the one piece of boilerplate in a turn that is O(calls), for a\n // number that needs explaining once. `systemPrompt` stays a pure function of\n // its arguments and therefore still byte-identical across every turn of the\n // run, which is the property the prefix cache is built on.\n const system = systemPrompt(manifest, options.instructions, timing);\n const tools = toolsFor(manifest);\n\n const verbs = new Map<string, Manifest[\"verbs\"][number]>(\n manifest.verbs.map((v) => [v.name, v]),\n );\n\n const maxSteps = options.maxSteps ?? 12;\n const refusalLimit = options.refusalLimit ?? 3;\n const signal = options.signal;\n const controls = options.controls;\n const clock = options.clock ?? realClock;\n\n // The run's `pace` option is the initial value and the controls own it from\n // then on, which is what makes `controls.pace()` live. Seeded only when the\n // option was actually given, so a caller who set the pace on the controls and\n // left the option out keeps theirs instead of being reset to 0.\n if (controls && options.pace !== undefined) controls.pace(options.pace);\n // Read fresh before every wait when there are controls — the whole point —\n // and fixed for the run when there are none. 0 by default, so a headless\n // `drive` is not slowed down by a feature that exists for somebody watching;\n // `mountWidget` passes `WATCHABLE_PACE`. See `pace`.\n const pace: number | (() => number) = controls ? () => controls.paceMs : (options.pace ?? 0);\n // Named once rather than written inline, so the wait and the loop cannot come\n // to disagree about whether a pace change is being listened for.\n const watchPace = controls ? (listener: () => void) => controls.subscribe(listener) : undefined;\n\n let messages: Turn[] = [...(options.history ?? [])];\n\n // How many times each (verb, refusal slug) pair has come back. The loop\n // detector; see decision 4.\n const refusals = new Map<string, number>();\n\n if (options.task !== undefined) {\n // The person's words and the screen they are looking at, in one turn.\n //\n // Together on purpose: this is the newest message at the moment it is\n // sent, which is where the dynamic half belongs, and it saves the model\n // spending its first step on a `read_screen` whose answer we already have\n // in hand. \"Accept the top thousand\" is also not interpretable without\n // knowing what is on screen — the screen is half of what was said.\n messages.push({\n role: \"user\",\n text: `${options.task}${SCREEN_MARK}${renderSnapshot(driver.snapshot())}`,\n });\n }\n\n // Lossy on purpose, and worth stating: a caller that wanted a verbatim\n // transcript of what the model was shown does not get one from here. The\n // alternative is paying for every screen the conversation ever had, on every\n // turn, so that nothing is lost — and nobody reads those bytes.\n //\n // Called below, before every `think` and once on the way out, rather than\n // once here. Once here was enough while only user turns carried screens,\n // because a run adds at most one of those; tool turns are added by the loop\n // itself, one per call, so the newest screen moves on every step and the\n // pruning has to move with it. Running it before each turn also keeps the\n // `messages` handed back already pruned, so a conversation carried across\n // many runs does not re-accumulate what this just removed.\n\n let steps = 0;\n let text: string | undefined;\n let stop: StopReason = \"max-steps\";\n\n // Mirrored here rather than read off `controls` when wanted, because the\n // event is about *transitions* and because `awaiting-approval` is a state\n // only this loop knows it is in. Reported, never consulted: nothing below\n // branches on it, so a bug in here can make a UI say the wrong word and\n // cannot make the run do the wrong thing.\n let state: RunState = controls?.state ?? \"running\";\n const mark = (next: RunState): void => {\n if (next === state) return;\n state = next;\n options.onControl?.({ step: steps, state: next });\n };\n // Fired unconditionally, including for a run with no controls, so a UI has a\n // defined starting state instead of having to assume one. `step: 0` — no\n // model turn has been spent yet.\n options.onControl?.({ step: 0, state });\n\n /** Hold if the controls say to, announcing the hold so a UI can show it.\n *\n * Asking `controls.state` first rather than timing the `gate` call: a UI\n * that flashed \"paused\" for every call of an unpaused run would be noise,\n * and the condition for actually holding is knowable up front. */\n const hold = async (what: \"think\" | \"call\"): Promise<void> => {\n if (!controls) return;\n if (controls.state === \"paused\" && controls.permits === 0) mark(\"paused\");\n await controls.gate(what, signal);\n // Before `mark(\"running\")`, so a run stopped while held is not reported as\n // having resumed on its way out. The caller breaks on the abort next.\n if (signal?.aborted) return;\n mark(\"running\");\n };\n\n for (;;) {\n if (signal?.aborted) {\n stop = \"aborted\";\n break;\n }\n if (steps >= maxSteps) {\n stop = \"max-steps\";\n break;\n }\n\n // Before `steps++` and before `onStep`, which is the honest order: a held\n // run has not started a step, and a model round trip is the expensive\n // thing a pause is most worth having in front of.\n await hold(\"think\");\n if (signal?.aborted) {\n stop = \"aborted\";\n break;\n }\n\n steps++;\n options.onStep?.({ step: steps });\n\n // Here, not after the pushes below: this is the last moment before the\n // tail is handed to the model, so \"the newest screen\" means the newest at\n // the instant it is read. Idempotent, so running it on every turn costs a\n // scan of a short array and cannot double-cut anything.\n messages = pruneScreens(messages);\n\n // `messages.slice()` and not `messages`. A `think` that is a fetch will\n // serialise this and forget it, but one that is a scripted fake, a\n // recorder or a middleware will keep the array, and handing out the live\n // one means a later push mutates something a caller believes it owns.\n const thought = await options.think({\n system,\n tools,\n messages: messages.slice(),\n // Spread rather than passed as `signal: undefined`. `ThinkInput.signal`\n // is optional, and under `exactOptionalPropertyTypes` an explicit\n // `undefined` is a different thing from an absent field — a `think` that\n // checks `\"signal\" in input` would see one that is not there.\n ...(signal ? { signal } : {}),\n });\n\n const calls = thought.calls ?? [];\n messages.push({\n role: \"assistant\",\n ...(thought.text ? { text: thought.text } : {}),\n ...(calls.length ? { calls } : {}),\n });\n if (thought.text) {\n text = thought.text;\n options.onSay?.({ step: steps, text: thought.text });\n }\n\n if (calls.length === 0) {\n // The only ending the model chooses. Prose with no call is an answer;\n // nothing at all is a broken adapter, and is worth distinguishing so\n // that whoever wrote `think` is told which of the two happened.\n stop = thought.text ? \"answered\" : \"silent\";\n break;\n }\n\n // Checked after `think` as well as before it, because `think` is the slow\n // part of a step and is exactly where a person clicks the stop button. The\n // model's calls are abandoned unrun: an abort that still commits is not an\n // abort.\n if (signal?.aborted) {\n // Every one of the model's calls is abandoned, and every one of them\n // still gets an answer: see `abandoned`. The assistant turn carrying them\n // is already in `messages`, and a `tool_use` with no result makes the\n // whole conversation unusable.\n for (const call of calls) messages.push(abandoned(call, \"aborted\"));\n stop = \"aborted\";\n break;\n }\n\n let stuck = false;\n let aborted = false;\n /** Set by the first `budget-spent`. Separate from `stuck` because the two\n * say different things to the person watching; see `StopReason`. */\n let spent = false;\n /** Calls the loop decided not to run. Each one still owes the model a\n * result; see `abandoned`. */\n let unrun: ToolCall[] = [];\n\n for (let i = 0; i < calls.length; i++) {\n const call = calls[i]!;\n\n // Re-checked inside the fan-out. A model may emit several calls in one\n // turn, and if the person stops the run halfway through them the rest\n // must not run — the second of three verbs is the worst place to be\n // interrupted and the only way to be sure is to look before each one.\n if (signal?.aborted) {\n aborted = true;\n unrun = calls.slice(i);\n break;\n }\n\n const verb = verbs.get(call.name);\n const kind = verb?.kind;\n // `at` rides along with `kind`, from the manifest, untouched. Nothing in\n // this loop reads it and nothing ever should: it is a hint for whoever is\n // drawing the run, and driverkit resolving a selector would be the one\n // thing the library promises not to do. See `Verb.at` in the core.\n const event: CallEvent = {\n step: steps,\n call,\n ...(kind === undefined ? {} : { kind }),\n ...(verb?.at === undefined ? {} : { at: verb.at }),\n index: i,\n of: calls.length,\n };\n\n // Before the pacing and before any hold, so the row for this call can be\n // on screen and glowing while the person still has time to stop it. The\n // ordering is the whole point of the event; see `onBeforeCall`.\n //\n // A copy per listener, like `messages.slice()` above: three events\n // describe one call, and one of them mutating the object would quietly\n // rewrite what the other two were told.\n options.onBeforeCall?.({ ...event });\n\n // Then the pace, then the gate, in that order. Pacing first so that a\n // person who pauses and then resumes gets the next call immediately\n // instead of sitting through a wait whose job — giving them time to\n // react — they have already done by hand.\n await paceWait({\n ms: pace,\n clock,\n ...(signal ? { signal } : {}),\n ...(watchPace ? { watch: watchPace } : {}),\n });\n if (signal?.aborted) {\n aborted = true;\n unrun = calls.slice(i);\n break;\n }\n\n await hold(\"call\");\n // The abort wins over the hold. A paused run that could not be stopped\n // would be the worst version of this feature: the person presses stop and\n // the loop is parked on a promise nobody is going to resolve.\n if (signal?.aborted) {\n aborted = true;\n unrun = calls.slice(i);\n break;\n }\n\n options.onCall?.({ ...event });\n\n const outcome = await runOne(driver, call, verb, options, mark, timing, clock);\n\n // The two halves, joined with the pruning seam between them. A call that\n // reached no screen at all — an unknown tool name — gets no marker and\n // no screen, which is the one honest shape for it: a marker followed by\n // nothing would say the screen was empty.\n const screened = (head: string): string =>\n outcome.screen === undefined ? head : head + SCREEN_MARK + outcome.screen;\n\n options.onResult?.({\n ...event,\n result: outcome.result,\n text: screened(outcome.head),\n });\n\n // The outcome line only. The screen is appended last, below, so that\n // anything else this loop has to say about the call sits ABOVE the seam\n // and survives pruning — the refusal-limit note in particular, which is\n // written for a caller resuming this conversation later and would be the\n // first thing cut if it were appended after the screen.\n let body = outcome.head;\n\n if (outcome.result && !outcome.result.ok && outcome.result.refused === BUDGET_SPENT) {\n // Before the refusal counter and not through it. `refusalLimit` exists\n // to notice a model repeating a mistake, and this is not a mistake the\n // model made or can fix — the ceiling was set by whoever mounted the\n // app. Letting it accumulate would spend two more model round trips to\n // reach a conclusion the first refusal already stated, and spend them\n // against the budget that has just run out.\n //\n // The app's own hint is already in the tool turn, which matters for a\n // caller who resumes this conversation later: the transcript says which\n // ceiling and that it does not refill.\n body +=\n `\\n\\n(stopped: this app's spend ceiling is reached. It does not refill, and no ` +\n `other verb will run either. Say what got through and what is left.)`;\n spent = true;\n } else if (outcome.result && !outcome.result.ok) {\n const key = `${call.name}:${outcome.result.refused}`;\n const seen = (refusals.get(key) ?? 0) + 1;\n refusals.set(key, seen);\n if (seen >= refusalLimit) {\n // The note is appended to the tool result rather than replacing it,\n // so the transcript a caller keeps reads as what actually happened.\n // The model never gets a chance to act on it — that is the point —\n // but a caller resuming this conversation later hands the model a\n // history in which the reason for the gap is written down.\n body +=\n `\\n\\n(stopped: \\`${call.name}\\` has now been refused \\`${outcome.result.refused}\\` ` +\n `${seen} times. Repeating it will not work. Say what is in the way.)`;\n stuck = true;\n }\n }\n\n messages.push({ role: \"tool\", callId: call.id, name: call.name, text: screened(body) });\n if (stuck || spent) {\n unrun = calls.slice(i + 1);\n break;\n }\n }\n\n // The fan-out is never left half-answered. See `abandoned`: this is the\n // difference between a conversation a caller can hand back as `history`\n // and one that makes every later `ask()` fail with a 400.\n for (const call of unrun) messages.push(abandoned(call, aborted ? \"aborted\" : \"stopped\"));\n\n if (aborted) {\n stop = \"aborted\";\n break;\n }\n // Before `stuck`, which it cannot be at the same time -- the two are set in\n // exclusive branches -- and first anyway, because a budget is the wider\n // fact: `stuck` is about one verb and this is about the whole app.\n if (spent) {\n stop = \"over-budget\";\n break;\n }\n if (stuck) {\n stop = \"stuck\";\n break;\n }\n }\n\n // Again on the way out, because the last thing a run does is often to push\n // tool turns nobody will `think` about — a fan-out's results, or the\n // `abandoned` answers after a stop. Without this the array handed back would\n // carry every screen from that final turn, and a caller passing it as\n // `history` would be billed for them until the next run's first prune.\n messages = pruneScreens(messages);\n\n options.onStop?.({ stop, steps, ...(text === undefined ? {} : { text }) });\n return { stop, steps, messages, ...(text === undefined ? {} : { text }) };\n}\n\n/** The sentinel `readRev` returns for a `rev` that was sent and cannot be\n * honoured. A distinct value because `undefined` already means something\n * load-bearing here — \"no rev was sent, so do not check staleness\" — and\n * collapsing the two is exactly the bug. */\nconst BAD_REV = Symbol(\"bad-rev\");\n\n/**\n * The `rev` a model sent, as a number, or `BAD_REV`.\n *\n * A model answering `{\"rev\": \"9\"}` is not a model making a mistake: tool\n * arguments arrive as JSON generated by a language model, and a string where a\n * number was asked for is ordinary behaviour from every vendor. A clean\n * integer-valued string is the same claim as the integer, so it is honoured.\n *\n * Everything else is refused rather than coerced. `\"3.7\"`, `\"abc\"`, `\"\"` and\n * `true` are not claims about a rev, they are evidence the model did not read\n * one off the screen — and `Number(\"\")` being `0` and `Number(true)` being `1`\n * is precisely how a permissive coercion turns that into a confident claim\n * about a screen that never existed.\n *\n * `null` is treated as absent, matching `checkArg`: a vendor serialising an\n * omitted optional field as `null` has said nothing, not something wrong.\n */\nfunction readRev(raw: Scalar | undefined): number | undefined | typeof BAD_REV {\n if (raw === undefined || raw === null) return undefined;\n if (typeof raw === \"number\") return Number.isInteger(raw) ? raw : BAD_REV;\n if (typeof raw === \"boolean\") return BAD_REV;\n const text = raw.trim();\n if (!/^[+-]?\\d+$/.test(text)) return BAD_REV;\n const n = Number(text);\n return Number.isSafeInteger(n) ? n : BAD_REV;\n}\n\n/**\n * The `screen` a model sent, as a string, or `BAD_REV`.\n *\n * The same shape as `readRev`, and for the same reason: a safety check that\n * silently disables itself when its argument arrives in the wrong type is worse\n * than no check, because the transcript then reads `ok` for a call made against\n * a screen the model never saw. A number or a boolean is not a screen id, it is\n * evidence the model did not read one off a screen, so it is refused rather\n * than dropped. An empty string is refused too: `\"\"` is not the same claim as\n * leaving the field out, which is \"I make none\".\n *\n * `null` is absent, matching `checkArg` and `readRev`: a vendor serialising an\n * omitted optional field as `null` has said nothing, not something wrong.\n */\nfunction readScreen(raw: Scalar | undefined): string | undefined | typeof BAD_REV {\n if (raw === undefined || raw === null) return undefined;\n if (typeof raw !== \"string\") return BAD_REV;\n const text = raw.trim();\n return text ? text : BAD_REV;\n}\n\n/**\n * One tool call: resolve it, maybe gate it, run it, render it.\n *\n * `result` is null when nothing was called on the driver — `read_screen`, or a\n * name the manifest does not have. A caller's `onResult` uses that to tell \"a\n * verb ran\" from \"the model looked\" when drawing its trace.\n *\n * The rendering comes back in two pieces rather than one string, and the\n * caller joins them. `head` is the outcome and keeps its meaning forever;\n * `screen` is the block that is current for one turn and is dropped from the\n * turn after. Joining them here would mean the loop had to find the seam again\n * by searching the text it just built. `screen` is absent only for a call that\n * reached no screen at all.\n */\nasync function runOne(\n driver: Driver,\n call: ToolCall,\n verb: Manifest[\"verbs\"][number] | undefined,\n options: DriveOptions,\n /** Report the run's state. Used for exactly one thing: saying that the run is\n * parked in front of a person's confirmation, which is a wait the run\n * controls do not own and a panel showing \"running\" would misdescribe. */\n mark: (state: RunState) => void,\n /** `DriveOptions.timing`, already defaulted by the caller. */\n timing: \"off\" | \"slow\" | \"always\",\n /** The run's clock, so a suite that pins `now` gets a byte-exact transcript\n * out of a timed run. See `renderDuration` on why buckets are for\n * production and an injected clock is for determinism. */\n clock: Clock,\n): Promise<{ result: Result | null; head: string; screen?: string }> {\n if (call.name === READ_SCREEN && verb === undefined) {\n // `verb === undefined` so an app that genuinely declares a verb by this\n // name keeps it. The app's meaning wins over ours, the same way it does\n // for the hoisted `rev`.\n // `ok` above the screen, where a verb's outcome goes. The screen is the\n // whole answer here and the line says nothing a model did not know — it is\n // there so that this turn has the same two-part shape as every other turn\n // carrying a screen, and therefore a seam to cut at when it goes stale. A\n // tool turn that was nothing but a screen was the one kind pruning could\n // not touch, and `read_screen` is the call whose turn is pure screen.\n return { result: null, head: \"ok\", screen: renderSnapshot(driver.snapshot()) };\n }\n\n if (verb === undefined) {\n // Named, not counted. A model asked for a tool that does not exist, and\n // listing the real names is how the fix happens on the next turn rather\n // than after another read — the same reason the core lists them on\n // `unknown-verb`.\n const known = [...driver.manifest().verbs.map((v) => v.name), READ_SCREEN].sort().join(\", \");\n // No screen: nothing was called, so there is no post-call screen to show,\n // and the newest one is already in the conversation a turn above.\n return { result: null, head: `no such tool \\`${call.name}\\`. available: ${known}` };\n }\n\n // `rev` is ours unless the verb claimed the name, in which case it is an\n // ordinary argument and goes through untouched. Mirrors the MCP server.\n const args: Record<string, Scalar> = { ...call.args };\n\n // NEITHER CLAIM IS OFFERED ON AN `ask`, AND NEITHER IS HONOURED HERE.\n //\n // `verbTool` leaves both properties off a question's schema -- a question\n // acts on no screen, so there is nothing for it to be stale about -- and this\n // is the other half of that. A model volunteering a `rev` it was told to\n // quote would otherwise have its question refused `stale` because the person\n // clicked a row while it was being composed, which is the likeliest thing in\n // the world when they are sitting right there, and a question refused for a\n // reason that has nothing to do with the question teaches a model not to ask.\n // So the keys are dropped: not hoisted into a claim, and not left behind to\n // become an argument the core has never heard of. Mirrors the MCP server.\n const asking = verb.kind === \"ask\";\n if (asking) {\n delete args.rev;\n delete args.screen;\n }\n\n let rev: number | undefined;\n if (!asking && !(verb.args && \"rev\" in verb.args)) {\n const raw = args.rev;\n delete args.rev;\n const hoisted = readRev(raw);\n if (hoisted === BAD_REV) {\n // Refused, never dropped. This is the whole bug: `rev` undefined is read\n // by the core as \"opt out of the staleness check\", so a model answering\n // `{\"rev\": \"9\"}` — ordinary behaviour from every vendor — used to turn\n // the check off instead of using it. A safety check that silently\n // disables itself on a type coercion is worse than no check, because the\n // transcript then shows `ok` for a call that acted on a screen the model\n // never saw.\n //\n // `bad-argument` and not `stale`: nothing is known about the screen here,\n // only about the call. It is shaped as a real `Result` so the renderer,\n // `onResult` and the loop detector treat it like any other refusal —\n // a model that keeps sending junk revs hits the refusal limit.\n const snapshot = driver.snapshot();\n const result: Result = {\n ok: false,\n refused: \"bad-argument\",\n hint:\n `\\`rev\\` must be the whole number printed on the screen you are acting on, like ` +\n `${snapshot.rev}. Got ${JSON.stringify(raw)}. Read the screen and quote its rev, or ` +\n `leave \\`rev\\` out entirely.`,\n snapshot,\n };\n return { result, head: renderOutcome(result), screen: renderSnapshot(result.snapshot) };\n }\n rev = hoisted;\n }\n\n // `screen` is hoisted exactly like `rev`, down to the app keeping the name if\n // it declared one: `go(screen)` is a real verb in a real app, and the app's\n // meaning wins over ours.\n let screen: string | undefined;\n if (!asking && !(verb.args && \"screen\" in verb.args)) {\n const raw = args.screen;\n delete args.screen;\n const hoisted = readScreen(raw);\n if (hoisted === BAD_REV) {\n const snapshot = driver.snapshot();\n const result: Result = {\n ok: false,\n refused: \"bad-argument\",\n hint:\n \"`screen` must be the id printed on the `screen` line of the screen you are \" +\n `acting on${snapshot.screen ? `, like \\`${snapshot.screen}\\`` : \"\"}. Got ` +\n `${JSON.stringify(raw)}. Read the screen and quote it, or leave \\`screen\\` out ` +\n \"entirely.\",\n snapshot,\n };\n return { result, head: renderOutcome(result), screen: renderSnapshot(result.snapshot) };\n }\n screen = hoisted;\n }\n\n // `plan` is hoisted on the same terms as `rev` and `screen` — the app keeps\n // the name if it declared an argument by it — with one difference: it is\n // taken off the args only for a verb that declares `consumes`, because that\n // is the only verb the tool schema offered it on, so on any other verb a\n // `plan` key is an argument the app named or a mistake the core should see.\n //\n // Not coerced and not refused on a bad type, which is where this parts\n // company with `readRev` and `readScreen`. Those two refuse a wrong type\n // because `undefined` means \"skip the check\" and a silent drop would turn a\n // safety claim off. Here the opposite is true: the check is mandatory, so a\n // token that is missing, blank or not a string all arrive at the core and all\n // come back as `stale-plan` — which is the refusal that explains the pairing.\n // Inventing a `bad-argument` here would answer a smaller question with a\n // worse hint.\n let plan: string | undefined;\n if (verb.consumes === \"plan\" && !(verb.args && \"plan\" in verb.args)) {\n const raw = args.plan;\n delete args.plan;\n if (typeof raw === \"string\" && raw.trim()) plan = raw.trim();\n }\n\n if (verb.kind === \"commit\" && options.onBeforeCommit) {\n const snapshot = driver.snapshot();\n let decision: CommitDecision;\n mark(\"awaiting-approval\");\n try {\n decision = await options.onBeforeCommit({ name: verb.name, args, verb, snapshot });\n } catch (err) {\n // A host's confirmation UI throwing must not take the run down, and it\n // must not be read as consent either. A failed ask is a no.\n decision = `the confirmation could not be shown (${\n err instanceof Error ? err.message : String(err)\n })`;\n } finally {\n // In a `finally` so a confirmation UI that throws cannot leave a panel\n // claiming forever that it is waiting for an answer nobody is being\n // asked for. The run carries on either way — a failed ask is a no.\n mark(\"running\");\n }\n\n if (decision === false || typeof decision === \"string\") {\n // Shaped as a real `Result`, so the renderer, `onResult` and the loop\n // detector all treat it like any other refusal. The veto reaches the\n // model as a refusal rather than a crash, which is the difference\n // between \"you declined that, shall I narrow it first?\" and a panel\n // that stops responding.\n const result: Result = {\n ok: false,\n refused: DECLINED,\n hint: typeof decision === \"string\" ? decision : DECLINED_HINT,\n snapshot,\n };\n return { result, head: renderOutcome(result), screen: renderSnapshot(result.snapshot) };\n }\n }\n\n // The clock brackets `driver.call()` and nothing else. Everything this loop\n // does before this point -- the pace wait, a `controls` hold, the\n // `onBeforeCommit` dialog above -- is already outside it, which is why the\n // honest figure falls out of WHERE the measurement is taken rather than out\n // of arithmetic afterwards. Read only when a duration is going to be\n // rendered: an untimed run reads no clock, exactly as it did before.\n // `clock.now?.()` and never a detached `clock.now ?? Date.now`. A `Clock` is\n // an interface and an implementation is free to be a class -- the test suite's\n // own fake is one, reading a `#private` field -- so a method pulled off the\n // object and called bare loses its receiver and throws. `paceWait` calls it\n // the same way for the same reason.\n const now = (): number => clock.now?.() ?? Date.now();\n const started = timing === \"off\" ? 0 : now();\n // The person-wait counter before, and again after, so a gate that lives\n // INSIDE `driver.call()` is subtracted. See `DriveOptions.waited`.\n const waitedBefore = timing === \"off\" ? 0 : (options.waited?.() ?? 0);\n\n const result = await driver.call(verb.name, args, {\n ...(rev === undefined ? {} : { rev }),\n ...(screen === undefined ? {} : { screen }),\n ...(plan === undefined ? {} : { plan }),\n });\n\n let head = renderOutcome(result);\n if (timing !== \"off\") {\n // `Math.max(0, ...)` because `waited` is reported by a host and a host that\n // reports more wait than the call took is a host with a bug -- in which\n // case the floor is zero and the line is simply omitted rather than a\n // negative duration being put in front of a model.\n const waited = Math.max(0, (options.waited?.() ?? 0) - waitedBefore);\n const line = renderDuration(Math.max(0, now() - started - waited), timing === \"slow\" ? SLOW_MS : 0);\n // Appended to the OUTCOME half, above the screen seam, so it survives\n // `pruneScreens`. That is the right half on its merits and not only for\n // thrift: \"how long did my third call take\" is a question whose answer\n // stays true forever, like `ok` and like the count, and unlike the table.\n if (line) head += `\\n${line}`;\n }\n\n return { result, head, screen: renderSnapshot(result.snapshot) };\n}\n"]}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rendering a Snapshot and a Result for a model to read.
|
|
3
|
+
*
|
|
4
|
+
* This is the TypeScript twin of `python/src/driverkit/render.py`, and the
|
|
5
|
+
* duplication is on purpose: the Python half renders for an MCP client driving
|
|
6
|
+
* the app from outside, this half renders for a chatbot sitting inside the
|
|
7
|
+
* page, and **a model must read the same sentences about the same screen
|
|
8
|
+
* either way.** Two halves of one library that describe one app differently is
|
|
9
|
+
* not a cosmetic problem — a prompt that worked through MCP and misbehaves in
|
|
10
|
+
* the widget is a bug with no stack trace. When you change wording here,
|
|
11
|
+
* change it there.
|
|
12
|
+
*
|
|
13
|
+
* Why render text at all rather than `JSON.stringify` at the boundary: a tool
|
|
14
|
+
* result is prompt. The snapshot that comes back from every call is the
|
|
15
|
+
* uncached half, so its bytes are paid for on every turn, and JSON spends a
|
|
16
|
+
* large share of them on punctuation and on repeating each column name once
|
|
17
|
+
* per row. The thing a model re-reads most often is the thing we made
|
|
18
|
+
* smallest.
|
|
19
|
+
*
|
|
20
|
+
* The second rule is that the post-call snapshot is never dropped. `Result`
|
|
21
|
+
* carries it so acting and observing are one round trip; a renderer that
|
|
22
|
+
* returned "ok" and nothing else would hand that saving straight back, because
|
|
23
|
+
* the model's next move would be to read the screen it was just given.
|
|
24
|
+
*
|
|
25
|
+
* **One difference from the Python half, and it is a simplification.** There
|
|
26
|
+
* are no relay refusals here. `no-such-tab`, `tab-went-away` and `timeout`
|
|
27
|
+
* describe a call that never reached a tab, and in-page there is no tab to
|
|
28
|
+
* miss and no deadline to blow: `driver.call()` is a function call that always
|
|
29
|
+
* returns a `Result` with a `snapshot`. So the unknown-outcome branch, which
|
|
30
|
+
* is most of the Python file, has nothing to render and is absent rather than
|
|
31
|
+
* ported as dead code.
|
|
32
|
+
*/
|
|
33
|
+
import type { Result, Snapshot } from "../core/index.ts";
|
|
34
|
+
/**
|
|
35
|
+
* The screen as a short text block.
|
|
36
|
+
*
|
|
37
|
+
* ```
|
|
38
|
+
* screen: contacts
|
|
39
|
+
* where: contacts, filtered to Acme (rev 8)
|
|
40
|
+
* selected: c-8821
|
|
41
|
+
* rows 1-2 of 5
|
|
42
|
+
* id company status
|
|
43
|
+
* c-8820 Acme new
|
|
44
|
+
* c-8821 Acme accepted
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* Field order is fixed so the same screen renders identically every time: a
|
|
48
|
+
* model comparing two reads should see a diff only where the screen changed.
|
|
49
|
+
*
|
|
50
|
+
* `screen` goes FIRST, above the prose, and is omitted by an app that does not
|
|
51
|
+
* declare one. It is the one line on this block a model can compare for
|
|
52
|
+
* equality: `where` carries the filter, the sort and a drill-down's record
|
|
53
|
+
* description, so it moves for reasons that are not navigation, and two reads
|
|
54
|
+
* either side of a `go` differ in a dozen ways. One short word that changes if
|
|
55
|
+
* and only if the screen changed is worth a line of the uncached half.
|
|
56
|
+
*/
|
|
57
|
+
export declare function renderSnapshot(snapshot: Snapshot): string;
|
|
58
|
+
/**
|
|
59
|
+
* A Result as text: the outcome, then the screen it left behind.
|
|
60
|
+
*
|
|
61
|
+
* A refusal renders as an ordinary outcome and not as an error banner. The
|
|
62
|
+
* slug is the one the manifest already declared under `refuses`, so an agent
|
|
63
|
+
* that read the tool description recognises the word and generally knows the
|
|
64
|
+
* fix; wrapping it in alarm language mostly teaches a model to retry the same
|
|
65
|
+
* call unchanged.
|
|
66
|
+
*
|
|
67
|
+
* Byte-identical to what `render_result` produces in the Python half, which is
|
|
68
|
+
* why the join lives here and not only where the loop needs the halves apart.
|
|
69
|
+
* `drive` composes the same two pieces with a seam of its own between them —
|
|
70
|
+
* see `renderOutcome` — but this exported renderer, the one an MCP client's
|
|
71
|
+
* agent reads, goes on saying exactly what the Python one says.
|
|
72
|
+
*/
|
|
73
|
+
export declare function renderResult(result: Result): string;
|
|
74
|
+
/**
|
|
75
|
+
* The outcome half of a `Result`: `ok`, the count, or the refusal and its hint.
|
|
76
|
+
*
|
|
77
|
+
* Split out because the two halves of a tool result age at different rates, and
|
|
78
|
+
* only something that can hold them apart can act on that. The screen below is
|
|
79
|
+
* current for exactly one turn. THIS half stays true forever: it is the answer
|
|
80
|
+
* to "what did my third call actually do", and it is a line or two rather than
|
|
81
|
+
* a table. The loop keeps it and drops the screen from older tool turns — see
|
|
82
|
+
* `pruneScreens`.
|
|
83
|
+
*/
|
|
84
|
+
export declare function renderOutcome(result: Result): string;
|
|
85
|
+
/**
|
|
86
|
+
* The shortest honest wait worth a line in a prompt.
|
|
87
|
+
*
|
|
88
|
+
* One second, and the number is the whole token argument. A duration on every
|
|
89
|
+
* call is a line in every turn forever, for a capability most runs never use,
|
|
90
|
+
* and `pruneScreens` cut a ten-step run from 5,775 to 1,397 characters by
|
|
91
|
+
* refusing to pay exactly that kind of per-step rent. So the default is that a
|
|
92
|
+
* call which took no time says nothing: a snappy app renders not one byte more
|
|
93
|
+
* than it did before this existed, and the bytes get spent only on the calls
|
|
94
|
+
* where elapsed time is a fact about the app rather than noise.
|
|
95
|
+
*
|
|
96
|
+
* A second is also roughly where a wait stops being invisible to the person
|
|
97
|
+
* watching the panel. Below it, the model learning the number changes no
|
|
98
|
+
* decision it could make; above it, "this verb is slow" is a real property of
|
|
99
|
+
* the app that explains why the next step should not be another one of these.
|
|
100
|
+
*/
|
|
101
|
+
export declare const SLOW_MS = 1000;
|
|
102
|
+
/**
|
|
103
|
+
* How long a call took, as one line for the outcome half of a tool turn.
|
|
104
|
+
*
|
|
105
|
+
* ```
|
|
106
|
+
* ok — 3,412 contacts accepted
|
|
107
|
+
* took: ~2s
|
|
108
|
+
*
|
|
109
|
+
* On screen now:
|
|
110
|
+
* screen: contacts
|
|
111
|
+
* ```
|
|
112
|
+
*
|
|
113
|
+
* **Why this is a function and not a field on `Result`.** A `Result` is what
|
|
114
|
+
* the APP returned; a duration is a fact about the call that wrapped it, which
|
|
115
|
+
* the app never measured and cannot be asked to. Putting it on the wire would
|
|
116
|
+
* invite an app to fill it in, and then the number a model reads would be an
|
|
117
|
+
* app's claim about its own speed rather than an observation. The caller
|
|
118
|
+
* measures, the caller renders, and this is the one place either half of the
|
|
119
|
+
* library says it in words.
|
|
120
|
+
*
|
|
121
|
+
* **Why it is bucketed rather than exact.** Every other byte of a rendered
|
|
122
|
+
* turn is a function of app state, so two identical runs produce identical
|
|
123
|
+
* transcripts — which is what eval caching, snapshot tests and anything that
|
|
124
|
+
* diffs transcripts are built on. A wall-clock millisecond count breaks that
|
|
125
|
+
* for every reader at once. Rounding to a coarse bucket gives it back for the
|
|
126
|
+
* ordinary case: a verb that takes 2.1s one run and 2.3s the next renders
|
|
127
|
+
* `~2s` both times, so the transcript is stable wherever the app's own
|
|
128
|
+
* behaviour is. It does not make the output a pure function of state — a
|
|
129
|
+
* bucket boundary is still a boundary, and a call that straddles one renders
|
|
130
|
+
* two ways — and that is why `Clock.now` is injectable through `DriveOptions
|
|
131
|
+
* .clock`: a suite or an eval that needs a byte-exact transcript pins the
|
|
132
|
+
* clock and gets one. Buckets are for production, the injected clock is for
|
|
133
|
+
* determinism, and neither is asked to do the other's job.
|
|
134
|
+
*
|
|
135
|
+
* `~` is on the number on purpose. A model shown `took: 2.13s` will compare
|
|
136
|
+
* two of them to three figures and report a difference that is scheduler
|
|
137
|
+
* noise; `~2s` cannot be over-read, and reads naturally in an answer a person
|
|
138
|
+
* gets back.
|
|
139
|
+
*
|
|
140
|
+
* **What this must never include.** The time a person spent deciding. `ms` in
|
|
141
|
+
* an `AuditEvent` is approval-inclusive by design — a reader of the record
|
|
142
|
+
* wants that gap back — but telling a MODEL that a call "took 40 seconds" when
|
|
143
|
+
* 38 of them were somebody reading a confirmation dialog is a false claim
|
|
144
|
+
* about the app's speed, and a model that believes it will go looking for a
|
|
145
|
+
* faster route around a verb that is not slow. The caller is responsible for
|
|
146
|
+
* handing in work time only; see `DriveOptions.waited`, which is how a host
|
|
147
|
+
* that gates commits INSIDE `driver.call()` subtracts its own dialog.
|
|
148
|
+
*
|
|
149
|
+
* `floorMs` below is the "not interesting" threshold, and `0` renders every
|
|
150
|
+
* call. Returns the EMPTY STRING rather than a sentinel when there is nothing
|
|
151
|
+
* worth saying, so a caller appends it unconditionally and the fast path adds
|
|
152
|
+
* no line at all.
|
|
153
|
+
*
|
|
154
|
+
* Verbatim with `render.py`. Both halves say the same words about the same
|
|
155
|
+
* number, which is the rule for everything in this file: a prompt that worked
|
|
156
|
+
* through MCP and misbehaves in the widget is a bug with no stack trace.
|
|
157
|
+
*/
|
|
158
|
+
export declare function renderDuration(ms: number, floorMs?: number): string;
|
|
159
|
+
/**
|
|
160
|
+
* Thousands separators, hand-rolled.
|
|
161
|
+
*
|
|
162
|
+
* Not `toLocaleString()`. That reads the host's locale, so the same count
|
|
163
|
+
* renders `1,000` for one person and `1.000` for another and `1 000` for a
|
|
164
|
+
* third — a per-user difference in the uncached half, and in the one number
|
|
165
|
+
* the commit decision turns on. The Python half writes `1,000`; so does this.
|
|
166
|
+
*
|
|
167
|
+
* Exported because the widget asks the person "accept 1,000 contacts?" about
|
|
168
|
+
* the same number the model was told about. One implementation, so the figure
|
|
169
|
+
* in the prompt and the figure on the button cannot come to disagree about
|
|
170
|
+
* where the comma goes.
|
|
171
|
+
*/
|
|
172
|
+
export declare function commas(n: number): string;
|
|
173
|
+
//# sourceMappingURL=render.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../src/agent/render.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAe,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA2BtE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CA4HzD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAuBpD;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,OAAO,OAAO,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,MAAgB,GAAG,MAAM,CAS5E;AA2ED;;;;;;;;;;;;GAYG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAQxC"}
|