@capagents/forgeqe 2.6.5 → 2.6.6

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.
Files changed (57) hide show
  1. package/HOW_TO_USE.md +6 -3
  2. package/dist/docs-site/docs/architecture/index.html +1 -1
  3. package/dist/docs-site/docs/index.html +6 -3
  4. package/dist/docs-site/docs/search.js +1 -1
  5. package/dist/docs-site/docs/web-app/index.html +4 -1
  6. package/dist/forgeqe.js +1470 -1468
  7. package/dist/template.html +68 -68
  8. package/dist/web/assets/{Agent-DnSnk8A8.js → Agent-DEt3EWA_.js} +3 -3
  9. package/dist/web/assets/ApiTests-DYdaFLNz.js +10 -0
  10. package/dist/web/assets/Chat-CKxzWgEC.js +3 -0
  11. package/dist/web/assets/{Data-zWPzpJpS.js → Data-DityccKX.js} +1 -1
  12. package/dist/web/assets/{Evidence-LEqF3nUt.js → Evidence-B-LwSbo6.js} +1 -1
  13. package/dist/web/assets/{Features-Bgo9qp1-.js → Features-DCT-cbJc.js} +1 -1
  14. package/dist/web/assets/Jobs-DeTQrrks.js +5 -0
  15. package/dist/web/assets/KindPage-_X13FTTE.js +6 -0
  16. package/dist/web/assets/Migration-fmIj_G3z.js +2 -0
  17. package/dist/web/assets/{Product-FEoKmnjo.js → Product-D-WBRE7V.js} +1 -1
  18. package/dist/web/assets/{Quality-DCZXDZOe.js → Quality-CGVs0dP9.js} +1 -1
  19. package/dist/web/assets/{Record-B2wCMjZD.js → Record-BxvtM3w6.js} +2 -2
  20. package/dist/web/assets/Regression-DMzaMaHl.js +5 -0
  21. package/dist/web/assets/{Reports-DccvSnM0.js → Reports-DcOPRMjx.js} +1 -1
  22. package/dist/web/assets/{Response-1L54PHOc.js → Response-C6MFROng.js} +1 -1
  23. package/dist/web/assets/{Runs-CxBqtEcI.js → Runs-Bzt7oS2o.js} +1 -1
  24. package/dist/web/assets/Shell-C-_iUijV.js +3 -0
  25. package/dist/web/assets/{TestCases-Cnoe8tSS.js → TestCases-COdZhCPY.js} +1 -1
  26. package/dist/web/assets/{TestData-BeYAygIt.js → TestData-BorHzvQT.js} +1 -1
  27. package/dist/web/assets/{WhatsNew-CI0LQ45V.js → WhatsNew-Bc9JhLJC.js} +1 -1
  28. package/dist/web/assets/{arrow-down-DSu4Dagx.js → arrow-down-OOnlMKAE.js} +1 -1
  29. package/dist/web/assets/{arrow-right-Ts-WXM9E.js → arrow-right-B3tcUlkA.js} +1 -1
  30. package/dist/web/assets/circle-8GDOF-jD.js +1 -0
  31. package/dist/web/assets/{circle-dashed-DrntJOQb.js → circle-dashed-kZh6s667.js} +1 -1
  32. package/dist/web/assets/{circle-dot-DnHcdiDL.js → circle-dot-B5NyEMK3.js} +1 -1
  33. package/dist/web/assets/{dataParts-3r2pCk9l.js → dataParts-C9gI1SAK.js} +1 -1
  34. package/dist/web/assets/{index-CUL4L1Mc.js → index-BxNs3KZC.js} +25 -25
  35. package/dist/web/assets/index-o-gUBlx9.css +2 -0
  36. package/dist/web/assets/{keyboard-DasQ_iKX.js → keyboard-Chpodklu.js} +1 -1
  37. package/dist/web/assets/{pencil-DGS0VPko.js → pencil-BKPpdCqf.js} +1 -1
  38. package/dist/web/assets/{productParts-CZORYXa1.js → productParts-RYNeN2sM.js} +1 -1
  39. package/dist/web/assets/{qualityParts-BL7Mmsao.js → qualityParts-BtCR-0Bc.js} +1 -1
  40. package/dist/web/assets/{thread-BuTNjR0M.js → thread-BVeiwKSf.js} +2 -2
  41. package/dist/web/assets/{upload-Dp3RevwG.js → upload-A3zIIPtY.js} +1 -1
  42. package/dist/web/assets/{usePageChat-iWpW3cZo.js → usePageChat-D-iqArIy.js} +1 -1
  43. package/dist/web/index.html +3 -3
  44. package/docs/ARCHITECTURE.md +1 -1
  45. package/docs/WEB_APP.md +4 -1
  46. package/docs/user-guide.html +6 -3
  47. package/forgeqe.example.yaml +1 -1
  48. package/package.json +1 -1
  49. package/dist/web/assets/ApiTests-r6c8xggS.js +0 -10
  50. package/dist/web/assets/Chat-MqHZCQeC.js +0 -3
  51. package/dist/web/assets/Jobs-Bcwb8HMh.js +0 -5
  52. package/dist/web/assets/KindPage-lAkUjTIP.js +0 -6
  53. package/dist/web/assets/Migration-BjGJA-Bs.js +0 -2
  54. package/dist/web/assets/Regression-D01mVc1q.js +0 -5
  55. package/dist/web/assets/Shell--wVGpLnJ.js +0 -3
  56. package/dist/web/assets/circle-DCKdGe8K.js +0 -1
  57. package/dist/web/assets/index-DchZ3sW9.css +0 -2
package/HOW_TO_USE.md CHANGED
@@ -1140,7 +1140,7 @@ The slash commands control the session and show a few things directly (`/help` l
1140
1140
  | `/theme light\|dark\|auto` | Colours for a light or a dark terminal. ForgeQE asks the terminal which it is when it starts and follows it when it changes (auto); a terminal that does not say is drawn dark. `FORGEQE_THEME=light` (or `dark`) sets it at start; `/theme` alone says which is in use |
1141
1141
  | `/details [on\|off]` | Show everything the agents do while they work: the browser agent's reasoning, page memory, engine logs, every file the coding agent reads (off by default: step results, files written, test results, problems). `--verbose` or `FORGEQE_VERBOSE=1` starts with it on, for `start`, `run`, `suite`, `code`, and `heal` too |
1142
1142
  | `/model` | Pick the model from the profiles in `llms.json` (or click the model ▾ in the status line; Tab switches to the next one) |
1143
- | `/profile <name>` | Switch LLM profile (or press Tab); the agent restarts with it |
1143
+ | `/profile <name>` | Switch LLM profile (or press Tab); from your next message the agent goes on with it in the same session, or, for a profile it cannot switch to, starts again with the conversation so far |
1144
1144
  | `/env [name]` | The test environments in `env.yaml` and their apps, or switch to one |
1145
1145
  | `/logs [shots]` | Save this session's log and runs in one archive to share (`shots`: with screenshots) |
1146
1146
  | `/features` | What ForgeQE can do, and what each capability still needs here |
@@ -1395,7 +1395,7 @@ forgeqe chat --jsonl [--repo DIR | --no-code] [--profile NAME] [--url URL] [--he
1395
1395
  [--replay MODE] [--no-memory] [--carry-over FILE] [--config forgeqe.yaml] [--verbose] [--debug]
1396
1396
  ```
1397
1397
 
1398
- The flags mean what they mean for `forgeqe run` and `forgeqe start`. `--jsonl` is required (the only format so far). `--carry-over FILE` is a JSON list `[{"user": "...", "reply": "..."}, ...]`: the turns of an earlier conversation whose process has gone (a server closing idle chats). The first message then reaches the agent with those turns before it, as when you switch profiles in the shell. To change profiles, start a new process with `--profile` and `--carry-over`. `--verbose` also writes readable event lines to stderr.
1398
+ The flags mean what they mean for `forgeqe run` and `forgeqe start`. `--jsonl` is required (the only format so far). `--carry-over FILE` is a JSON list `[{"user": "...", "reply": "..."}, ...]`: the turns of an earlier conversation whose process has gone (a server closing idle chats). The first message then reaches the agent with those turns before it, as when you switch profiles in the shell. To change the model mid-chat, send a `model` line: the same agent session goes on with the new model (below). `--verbose` also writes readable event lines to stderr.
1399
1399
 
1400
1400
  The process opens ForgeQE's agent on the first message and keeps it for every later one; it ends it on `close`, the end of stdin, or a signal. It works like the shell: background monitors are allowed and stop when it exits, and passed runs become tests unless `--no-code`. A request that was run before and passed is run again as recorded, without the agent, as in the shell (Tier 0, `registry.mode`); its turn ends with the result as the reply. When the agent cannot run (no model, no agent runtime), the process writes `fatal` and exits 1 before it reads anything: it never falls back to a browser goal.
1401
1401
 
@@ -1410,6 +1410,7 @@ The process opens ForgeQE's agent on the first message and keeps it for every la
1410
1410
  | `continue` | `id` (from a `wait`), `ok` (`true` = Done, continue; `false` = Cancel) | Ends the pending wait |
1411
1411
  | `stop` | | Stops the running turn (Esc or `/stop` in the shell). Nothing when idle |
1412
1412
  | `settings` | `headed` and/or `writeTests` (each `true` or `false`, nothing else) | Changes the chat's choices from now on: whether browser runs are shown (as `--headed`), and whether passed runs become tests (as `--no-code`, off). The next browser run uses them; the agent is told of a change with your next message. Answered with `settings` |
1413
+ | `model` | `profile` (a profile name, nothing else) | The chat's model from the next message, as a model picker does: the same agent session goes on, with the conversation, its tools and files, and the agent is told of the change with your next message; ForgeQE's tools use that profile too. Before the agent opens, any profile of llms.json; after, one of the `models` line. Refused with `error` `busy` while a turn runs, `bad_input` for anything else. Answered with `model` |
1413
1414
  | `close` | | Stops any turn, closes the agent, stops monitors and the containers it started, writes `closed`, exits 0 |
1414
1415
 
1415
1416
  A line that is not JSON, has an unknown `type`, or misses a field gets `error` `bad_input` with the reason and the first 200 characters of the line; the process goes on. The end of stdin is the same as `close`.
@@ -1419,6 +1420,8 @@ A line that is not JSON, has an unknown `type`, or misses a field gets `error` `
1419
1420
  | `type` | Fields | When |
1420
1421
  |--------|--------|------|
1421
1422
  | `ready` | `protocol` (1), `version`, `cwd`, `writeTests`, `headed`, `profile` (`name` and `provider`, never a key) | Once, after the config is loaded and checked, before stdin is read |
1423
+ | `models` | `profile` (`name`, `provider`: the one answering), `models` (each `name` and `provider`, its own first; empty when it cannot switch) | When the agent opens: the profiles a `model` line may name. A custom agent's chat, and one with `code.model`, offer none |
1424
+ | `model` | `profile` (`name`, `provider`) | After a `model` line: the profile answering from the next message |
1422
1425
  | `turn_start` | `id` | A message was accepted |
1423
1426
  | `settings` | `headed`, `writeTests` | After a `settings` line: the choices now in force |
1424
1427
  | `agent` | `id`, `event`: a `CodeEvent` (`stream`, `say`, `start`, `tool`, `plan`, `usage`, `context`, `test`, `info`, …) | While the turn runs |
@@ -1426,7 +1429,7 @@ A line that is not JSON, has an unknown `type`, or misses a field gets `error` `
1426
1429
  | `ask` | `id` (`ask-N`), `turn`, `question` (`title`, `detail`, `lines`, `options[{id, label}]`) | A tool asks you to choose |
1427
1430
  | `wait` | `id` (`wait-N`), `turn`, `prompt` | A tool waits for you to do something by hand |
1428
1431
  | `turn_done` | `id`, `outcome` (`done`, `failed`, `needs_input`, `stopped`), `reply` (the visible reply), `next` (follow-ups), `error` (when there is one), `usage` (the agent's usage so far, `null` before it opened) | The turn ended, whatever the way |
1429
- | `error` | `code` (`bad_input`, `busy`, `unknown_id`, `internal`), `message`, `turn` (when one runs) | A problem that does not end the process |
1432
+ | `error` | `code` (`bad_input`, `busy`, `unknown_id`, `model`, `internal`), `message`, `turn` (when one runs) | A problem that does not end the process |
1430
1433
  | `fatal` | `message` | The process cannot go on; exit code 1 follows |
1431
1434
  | `closed` | | The last line before a clean exit |
1432
1435
 
@@ -269,7 +269,7 @@
269
269
  <p>After the session opens, <code>openBrain</code> reads <code>client.mcp.status()</code> and reports each external server as connected, failed (with the error), or needing a browser sign-in; skipped systems are reported with their reason. The agent's session notes list the servers and say that a server whose tools are missing did not connect, so the agent falls back to <code>query_api</code>.</p>
270
270
  <p>Tools take structured arguments. <code>run_test_cases</code> and <code>find_test_cases</code> get a list of <code>CaseSelector</code>s (<code>{source: azure_devops \| jira \| xray \| testrail \| zephyr \| qtest \| file \| text, ids, plan, suite, run, cycle, folder, jql, paths, text}</code>) that <code>casesFrom</code> reads directly, so the model's choice of source is never re-parsed.</p>
271
271
  <p><strong>Permissions.</strong> The agent's bash is allowed except <code>git push*</code>, <code>git * push*</code> (so <code>git -C . push</code> is caught too), and <code>gh repo delete*</code>, each also with a leading <code>*</code> so a push wrapped in another command (<code>env git push</code>, <code>sh -c 'git push'</code>) is caught; the agent runtime matches each command of a chain on its own and applies the last matching rule. These rules are guard rails, not a sandbox. <code>forgeqe_*</code> tools are allowed. <code>external_directory</code> allows only the run and memory folders. Tool calls to <code>forgeqe_*</code> are hidden from the <code>⚙</code> lines because their <code>ToolEvent</code>s already render richer output (browser steps, suite cards).</p>
272
- <p><strong>Callers.</strong> The TUI opens the brain on the first message and keeps it for the session, so follow-up answers and &quot;write a test for that run&quot; have context; <code>/profile</code> (or Tab) closes it and keeps the turns so far: the next agent session's first prompt is <code>carryOver(turns, text)</code>, the last 20 turns with remembered secrets redacted, so switching models does not lose the conversation. It renders <code>card</code> events as result panels and <code>agent</code> events as <code>⚙</code> and test lines with their own token counter, and its <code>waitForUser</code> pushes the prompt into the transcript and opens a <strong>Your turn</strong> dialog (Done, continue / Cancel); opening another dialog or Esc settles it as cancelled. <code>forgeqe run</code> opens the brain for one request, prints tool events (cards as <code>cardText</code>) and the reply as plain lines, waits for Enter in <code>waitForUser</code> when stdin is a terminal, and exits 0 done, 1 failed, 2 stopped, 3 needs input. <code>forgeqe run --direct</code> and a missing agent runtime run <code>browser_run</code> directly. <code>forgeqe mcp</code> serves the same <code>TOOLS</code> on stdio and logs <code>ToolEvent</code>s to stderr; it has no <code>waitForUser</code>. <code>forgeqe chat --jsonl</code> (<code>src/chat/jsonl.ts</code>) is the TUI's agent for a program: like the TUI, it opens the brain on the first message, keeps it for every message, runs with <code>session: &quot;shell&quot;</code>, runs Tier 0 requests as recorded before asking the agent, and continues an earlier conversation with <code>carryOver</code> (<code>--carry-over FILE</code>, with its own reason sentence); like <code>forgeqe run</code>, it takes its flags (<code>repoFlag</code>, <code>memoryFlags</code>, …) and writes one session log; like <code>forgeqe mcp</code>, it is a machine interface, with stdout claimed for the protocol and every other print sent to stderr. It writes each <code>CodeEvent</code> and <code>ToolEvent</code> unchanged as a JSON line (<code>agent</code>, <code>tool</code>), turns <code>ask</code> and <code>waitForUser</code> into <code>ask</code> and <code>wait</code> lines answered on stdin, ends every turn with one <code>turn_done</code>, and passes every outgoing string through <code>redactSecrets</code> and the values of <code>privateEnvNames</code> and profile keys. The protocol is in HOW_TO_USE.md. <code>forgeqe start</code>, <code>forgeqe mcp</code>, and <code>forgeqe chat</code> stop background monitors when they return, because <code>src/index.ts</code> calls <code>process.exit</code>.</p>
272
+ <p><strong>Callers.</strong> The TUI opens the brain on the first message and keeps it for the session, so follow-up answers and &quot;write a test for that run&quot; have context; <code>/profile</code> (or Tab) switches the model in the same session before the next message (<code>Brain.setModel</code>: one agent runtime holds every usable profile, and each prompt names its model), with a one-line note to the agent; a profile the session does not offer (a custom agent's, <code>code.model</code>, one that could not answer when it opened) closes it and keeps the turns so far: the next agent session's first prompt is <code>carryOver(turns, text)</code>, the last 20 turns with remembered secrets redacted, so switching models does not lose the conversation. It renders <code>card</code> events as result panels and <code>agent</code> events as <code>⚙</code> and test lines with their own token counter, and its <code>waitForUser</code> pushes the prompt into the transcript and opens a <strong>Your turn</strong> dialog (Done, continue / Cancel); opening another dialog or Esc settles it as cancelled. <code>forgeqe run</code> opens the brain for one request, prints tool events (cards as <code>cardText</code>) and the reply as plain lines, waits for Enter in <code>waitForUser</code> when stdin is a terminal, and exits 0 done, 1 failed, 2 stopped, 3 needs input. <code>forgeqe run --direct</code> and a missing agent runtime run <code>browser_run</code> directly. <code>forgeqe mcp</code> serves the same <code>TOOLS</code> on stdio and logs <code>ToolEvent</code>s to stderr; it has no <code>waitForUser</code>. <code>forgeqe chat --jsonl</code> (<code>src/chat/jsonl.ts</code>) is the TUI's agent for a program: like the TUI, it opens the brain on the first message, keeps it for every message, runs with <code>session: &quot;shell&quot;</code>, runs Tier 0 requests as recorded before asking the agent, and continues an earlier conversation with <code>carryOver</code> (<code>--carry-over FILE</code>, with its own reason sentence); like <code>forgeqe run</code>, it takes its flags (<code>repoFlag</code>, <code>memoryFlags</code>, …) and writes one session log; like <code>forgeqe mcp</code>, it is a machine interface, with stdout claimed for the protocol and every other print sent to stderr. It writes each <code>CodeEvent</code> and <code>ToolEvent</code> unchanged as a JSON line (<code>agent</code>, <code>tool</code>), turns <code>ask</code> and <code>waitForUser</code> into <code>ask</code> and <code>wait</code> lines answered on stdin, ends every turn with one <code>turn_done</code>, and passes every outgoing string through <code>redactSecrets</code> and the values of <code>privateEnvNames</code> and profile keys. The protocol is in HOW_TO_USE.md. <code>forgeqe start</code>, <code>forgeqe mcp</code>, and <code>forgeqe chat</code> stop background monitors when they return, because <code>src/index.ts</code> calls <code>process.exit</code>.</p>
273
273
  <h2 id="tool-scope-srcmcpscopets-srccapabilities"><a href="#tool-scope-srcmcpscopets-srccapabilities" class="hash">#</a>Tool scope (<code>src/mcp/scope.ts</code>, <code>src/capabilities</code>)</h2>
274
274
  <p>Every model call carries the definitions of the tools the agent has, so the agent does not get every tool on every turn. The registry (<code>capabilities/registry.ts</code>) groups the tools into capabilities. Each capability has its tools, the requirements it needs (a model, a runtime, an app kind, a tracker), and keywords.</p>
275
275
  <div class="tbl"><table>
@@ -536,7 +536,7 @@ Add a GitHub Actions workflow that runs tests/cases.yaml on every PR, and make i
536
536
  <tr><td><code>/theme light|dark|auto</code></td><td>Colours for a light or a dark terminal. ForgeQE asks the terminal which it is when it starts and follows it when it changes (auto); a terminal that does not say is drawn dark. <code>FORGEQE_THEME=light</code> (or <code>dark</code>) sets it at start; <code>/theme</code> alone says which is in use</td></tr>
537
537
  <tr><td><code>/details [on|off]</code></td><td>Show everything the agents do while they work: the browser agent's reasoning, page memory, engine logs, every file the coding agent reads (off by default: step results, files written, test results, problems). <code>--verbose</code> or <code>FORGEQE_VERBOSE=1</code> starts with it on, for <code>start</code>, <code>run</code>, <code>suite</code>, <code>code</code>, and <code>heal</code> too</td></tr>
538
538
  <tr><td><code>/model</code></td><td>Pick the model from the profiles in <code>llms.json</code> (or click the model ▾ in the status line; Tab switches to the next one)</td></tr>
539
- <tr><td><code>/profile &lt;name&gt;</code></td><td>Switch LLM profile (or press Tab); the agent restarts with it</td></tr>
539
+ <tr><td><code>/profile &lt;name&gt;</code></td><td>Switch LLM profile (or press Tab); from your next message the agent goes on with it in the same session, or, for a profile it cannot switch to, starts again with the conversation so far</td></tr>
540
540
  <tr><td><code>/env [name]</code></td><td>The test environments in <code>env.yaml</code> and their apps, or switch to one</td></tr>
541
541
  <tr><td><code>/logs [shots]</code></td><td>Save this session's log and runs in one archive to share (<code>shots</code>: with screenshots)</td></tr>
542
542
  <tr><td><code>/features</code></td><td>What ForgeQE can do, and what each capability still needs here</td></tr>
@@ -728,7 +728,7 @@ forgeqe run &quot;Run the cases in smoke.yaml and don't post results&quot; --pla
728
728
  [--browser-provider local|docker|browserstack|testmu] [--devices a,b] [--max-steps N]
729
729
  [--replay MODE] [--no-memory] [--carry-over FILE] [--config forgeqe.yaml] [--verbose] [--debug]
730
730
  </code></pre></div>
731
- <p>The flags mean what they mean for <code>forgeqe run</code> and <code>forgeqe start</code>. <code>--jsonl</code> is required (the only format so far). <code>--carry-over FILE</code> is a JSON list <code>[{&quot;user&quot;: &quot;...&quot;, &quot;reply&quot;: &quot;...&quot;}, ...]</code>: the turns of an earlier conversation whose process has gone (a server closing idle chats). The first message then reaches the agent with those turns before it, as when you switch profiles in the shell. To change profiles, start a new process with <code>--profile</code> and <code>--carry-over</code>. <code>--verbose</code> also writes readable event lines to stderr.</p>
731
+ <p>The flags mean what they mean for <code>forgeqe run</code> and <code>forgeqe start</code>. <code>--jsonl</code> is required (the only format so far). <code>--carry-over FILE</code> is a JSON list <code>[{&quot;user&quot;: &quot;...&quot;, &quot;reply&quot;: &quot;...&quot;}, ...]</code>: the turns of an earlier conversation whose process has gone (a server closing idle chats). The first message then reaches the agent with those turns before it, as when you switch profiles in the shell. To change the model mid-chat, send a <code>model</code> line: the same agent session goes on with the new model (below). <code>--verbose</code> also writes readable event lines to stderr.</p>
732
732
  <p>The process opens ForgeQE's agent on the first message and keeps it for every later one; it ends it on <code>close</code>, the end of stdin, or a signal. It works like the shell: background monitors are allowed and stop when it exits, and passed runs become tests unless <code>--no-code</code>. A request that was run before and passed is run again as recorded, without the agent, as in the shell (Tier 0, <code>registry.mode</code>); its turn ends with the result as the reply. When the agent cannot run (no model, no agent runtime), the process writes <code>fatal</code> and exits 1 before it reads anything: it never falls back to a browser goal.</p>
733
733
  <p><strong>stdout</strong> carries only JSON lines: one object per line, UTF-8, ending in <code>\n</code>. Logs, warnings, and anything a library prints go to stderr. Lines can be long (a card, a suite result); do not assume a maximum length. Every line has <code>&quot;v&quot;: 1</code>, <code>&quot;seq&quot;</code> (1, 2, 3, … in this process), and <code>&quot;t&quot;</code> (ISO time). Every string is passed through the session's secret redaction, so a password given in a message never comes back out, not even inside a tool result; profile keys and the values of ForgeQE's own secret variables never appear.</p>
734
734
  <p><strong>Input</strong> (stdin), one JSON object per line:</p>
@@ -742,6 +742,7 @@ forgeqe run &quot;Run the cases in smoke.yaml and don't post results&quot; --pla
742
742
  <tr><td><code>continue</code></td><td><code>id</code> (from a <code>wait</code>), <code>ok</code> (<code>true</code> = Done, continue; <code>false</code> = Cancel)</td><td>Ends the pending wait</td></tr>
743
743
  <tr><td><code>stop</code></td><td></td><td>Stops the running turn (Esc or <code>/stop</code> in the shell). Nothing when idle</td></tr>
744
744
  <tr><td><code>settings</code></td><td><code>headed</code> and/or <code>writeTests</code> (each <code>true</code> or <code>false</code>, nothing else)</td><td>Changes the chat's choices from now on: whether browser runs are shown (as <code>--headed</code>), and whether passed runs become tests (as <code>--no-code</code>, off). The next browser run uses them; the agent is told of a change with your next message. Answered with <code>settings</code></td></tr>
745
+ <tr><td><code>model</code></td><td><code>profile</code> (a profile name, nothing else)</td><td>The chat's model from the next message, as a model picker does: the same agent session goes on, with the conversation, its tools and files, and the agent is told of the change with your next message; ForgeQE's tools use that profile too. Before the agent opens, any profile of llms.json; after, one of the <code>models</code> line. Refused with <code>error</code> <code>busy</code> while a turn runs, <code>bad_input</code> for anything else. Answered with <code>model</code></td></tr>
745
746
  <tr><td><code>close</code></td><td></td><td>Stops any turn, closes the agent, stops monitors and the containers it started, writes <code>closed</code>, exits 0</td></tr>
746
747
  </tbody>
747
748
  </table></div>
@@ -753,6 +754,8 @@ forgeqe run &quot;Run the cases in smoke.yaml and don't post results&quot; --pla
753
754
  </thead>
754
755
  <tbody>
755
756
  <tr><td><code>ready</code></td><td><code>protocol</code> (1), <code>version</code>, <code>cwd</code>, <code>writeTests</code>, <code>headed</code>, <code>profile</code> (<code>name</code> and <code>provider</code>, never a key)</td><td>Once, after the config is loaded and checked, before stdin is read</td></tr>
757
+ <tr><td><code>models</code></td><td><code>profile</code> (<code>name</code>, <code>provider</code>: the one answering), <code>models</code> (each <code>name</code> and <code>provider</code>, its own first; empty when it cannot switch)</td><td>When the agent opens: the profiles a <code>model</code> line may name. A custom agent's chat, and one with <code>code.model</code>, offer none</td></tr>
758
+ <tr><td><code>model</code></td><td><code>profile</code> (<code>name</code>, <code>provider</code>)</td><td>After a <code>model</code> line: the profile answering from the next message</td></tr>
756
759
  <tr><td><code>turn_start</code></td><td><code>id</code></td><td>A message was accepted</td></tr>
757
760
  <tr><td><code>settings</code></td><td><code>headed</code>, <code>writeTests</code></td><td>After a <code>settings</code> line: the choices now in force</td></tr>
758
761
  <tr><td><code>agent</code></td><td><code>id</code>, <code>event</code>: a <code>CodeEvent</code> (<code>stream</code>, <code>say</code>, <code>start</code>, <code>tool</code>, <code>plan</code>, <code>usage</code>, <code>context</code>, <code>test</code>, <code>info</code>, …)</td><td>While the turn runs</td></tr>
@@ -760,7 +763,7 @@ forgeqe run &quot;Run the cases in smoke.yaml and don't post results&quot; --pla
760
763
  <tr><td><code>ask</code></td><td><code>id</code> (<code>ask-N</code>), <code>turn</code>, <code>question</code> (<code>title</code>, <code>detail</code>, <code>lines</code>, <code>options[{id, label}]</code>)</td><td>A tool asks you to choose</td></tr>
761
764
  <tr><td><code>wait</code></td><td><code>id</code> (<code>wait-N</code>), <code>turn</code>, <code>prompt</code></td><td>A tool waits for you to do something by hand</td></tr>
762
765
  <tr><td><code>turn_done</code></td><td><code>id</code>, <code>outcome</code> (<code>done</code>, <code>failed</code>, <code>needs_input</code>, <code>stopped</code>), <code>reply</code> (the visible reply), <code>next</code> (follow-ups), <code>error</code> (when there is one), <code>usage</code> (the agent's usage so far, <code>null</code> before it opened)</td><td>The turn ended, whatever the way</td></tr>
763
- <tr><td><code>error</code></td><td><code>code</code> (<code>bad_input</code>, <code>busy</code>, <code>unknown_id</code>, <code>internal</code>), <code>message</code>, <code>turn</code> (when one runs)</td><td>A problem that does not end the process</td></tr>
766
+ <tr><td><code>error</code></td><td><code>code</code> (<code>bad_input</code>, <code>busy</code>, <code>unknown_id</code>, <code>model</code>, <code>internal</code>), <code>message</code>, <code>turn</code> (when one runs)</td><td>A problem that does not end the process</td></tr>
764
767
  <tr><td><code>fatal</code></td><td><code>message</code></td><td>The process cannot go on; exit code 1 follows</td></tr>
765
768
  <tr><td><code>closed</code></td><td></td><td>The last line before a clean exit</td></tr>
766
769
  </tbody>