@parcha/agentrun-serve 0.1.0-beta.61 → 0.1.0-beta.63

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 (228) hide show
  1. package/CHANGELOG.md +113 -0
  2. package/README.md +128 -20
  3. package/dist/adapters.js +4 -2
  4. package/dist/agent-delete.d.ts +3 -3
  5. package/dist/agent-delete.js +50 -4
  6. package/dist/api-only.d.ts +4 -0
  7. package/dist/api-only.js +5 -1
  8. package/dist/archil-settings.d.ts +9 -0
  9. package/dist/archil-settings.js +8 -1
  10. package/dist/bash-read-only.d.ts +3 -0
  11. package/dist/bash-read-only.js +6 -3
  12. package/dist/chatgpt-plan.d.ts +33 -8
  13. package/dist/chatgpt-plan.js +141 -24
  14. package/dist/claude-login.d.ts +12 -5
  15. package/dist/claude-login.js +28 -3
  16. package/dist/cli.js +19 -8
  17. package/dist/composio-triggers.d.ts +9 -3
  18. package/dist/computers.d.ts +3 -0
  19. package/dist/computers.js +2 -1
  20. package/dist/console/assets/{backend-C9ffXUR5.js → backend-BxQ2G1M0.js} +2 -2
  21. package/dist/console/assets/index-C8Y5Zl8x.js +639 -0
  22. package/dist/console/assets/share-CjBJ_rxP.js +6 -0
  23. package/dist/console/assets/{styles-fjQBFfMv.css → styles-D0SufbzK.css} +1 -1
  24. package/dist/console/index.html +3 -3
  25. package/dist/console/share.html +3 -3
  26. package/dist/cut-pool.d.ts +14 -0
  27. package/dist/cut-pool.js +98 -0
  28. package/dist/cut-worker.d.ts +14 -0
  29. package/dist/cut-worker.js +16 -0
  30. package/dist/decisions.d.ts +4 -0
  31. package/dist/decisions.js +9 -1
  32. package/dist/env-switch.d.ts +3 -0
  33. package/dist/env-switch.js +3 -0
  34. package/dist/harness-opencode/adapter.d.ts +3 -1
  35. package/dist/harness-opencode/adapter.js +6 -2
  36. package/dist/harness-opencode/harness.d.ts +4 -0
  37. package/dist/harness-opencode/harness.js +6 -1
  38. package/dist/harness-table.d.ts +7 -0
  39. package/dist/harness-table.js +6 -3
  40. package/dist/host-tools.d.ts +18 -3
  41. package/dist/host-tools.js +27 -4
  42. package/dist/import.d.ts +8 -1
  43. package/dist/import.js +36 -5
  44. package/dist/key-check.js +22 -8
  45. package/dist/learn/ledger.d.ts +37 -16
  46. package/dist/learn/ledger.js +56 -24
  47. package/dist/learn/promote.d.ts +4 -1
  48. package/dist/learned-nodes.d.ts +2 -1
  49. package/dist/learned-nodes.js +2 -1
  50. package/dist/learning-cost.d.ts +5 -3
  51. package/dist/learning-model.js +7 -5
  52. package/dist/learning-work.d.ts +69 -0
  53. package/dist/learning-work.js +148 -0
  54. package/dist/mcp-gateway.d.ts +24 -0
  55. package/dist/mcp-gateway.js +97 -8
  56. package/dist/mcp-servers-store.d.ts +7 -10
  57. package/dist/mcp-servers-store.js +15 -9
  58. package/dist/native/cli.js +5 -1
  59. package/dist/ollama-provider.d.ts +10 -3
  60. package/dist/ollama-provider.js +17 -7
  61. package/dist/openapi.js +51 -20
  62. package/dist/otel/tracer.d.ts +6 -3
  63. package/dist/otel/tracer.js +24 -6
  64. package/dist/page.d.ts +7 -0
  65. package/dist/page.js +17 -4
  66. package/dist/place.d.ts +25 -9
  67. package/dist/place.js +37 -11
  68. package/dist/print.d.ts +3 -2
  69. package/dist/print.js +8 -6
  70. package/dist/run-export.js +7 -4
  71. package/dist/run-launch.d.ts +6 -1
  72. package/dist/run-launch.js +26 -6
  73. package/dist/run-model-key.d.ts +2 -1
  74. package/dist/run-model-key.js +2 -1
  75. package/dist/run-reads-over-store.d.ts +7 -0
  76. package/dist/run-reads-over-store.js +32 -4
  77. package/dist/run-view.js +9 -3
  78. package/dist/runnable.d.ts +6 -3
  79. package/dist/runnable.js +21 -11
  80. package/dist/runner/adapter-loop.js +95 -28
  81. package/dist/runner/adapter-run-spec.d.ts +20 -4
  82. package/dist/runner/adapter-run-spec.js +64 -30
  83. package/dist/runner/adapters/index.d.ts +6 -0
  84. package/dist/runner/adapters/index.js +5 -1
  85. package/dist/runner/adapters/pi.d.ts +42 -3
  86. package/dist/runner/adapters/pi.js +114 -13
  87. package/dist/runner/audit.d.ts +8 -2
  88. package/dist/runner/audit.js +34 -18
  89. package/dist/runner/book-cut.d.ts +6 -0
  90. package/dist/runner/book-cut.js +38 -0
  91. package/dist/runner/claim-secrets.d.ts +12 -5
  92. package/dist/runner/claim-secrets.js +28 -12
  93. package/dist/runner/cli-run-spec.d.ts +0 -2
  94. package/dist/runner/cli-run-spec.js +54 -25
  95. package/dist/runner/dispatch.js +2 -0
  96. package/dist/runner/harness-loops.d.ts +5 -0
  97. package/dist/runner/harness-loops.js +4 -1
  98. package/dist/runner/held.d.ts +6 -3
  99. package/dist/runner/learned-first.d.ts +5 -0
  100. package/dist/runner/learned-first.js +1 -1
  101. package/dist/runner/learning-end.d.ts +15 -8
  102. package/dist/runner/learning-end.js +23 -7
  103. package/dist/runner/live-ticker.js +3 -1
  104. package/dist/runner/loop-contract.d.ts +8 -1
  105. package/dist/runner/main.js +2 -0
  106. package/dist/runner/mcp-run.d.ts +5 -0
  107. package/dist/runner/mcp-run.js +18 -0
  108. package/dist/runner/meta-tools.js +4 -4
  109. package/dist/runner/metrics.d.ts +4 -2
  110. package/dist/runner/metrics.js +5 -3
  111. package/dist/runner/model-route.d.ts +4 -0
  112. package/dist/runner/model-route.js +1 -1
  113. package/dist/runner/native-loop.js +2 -2
  114. package/dist/runner/pr-checkout.d.ts +12 -0
  115. package/dist/runner/pr-checkout.js +21 -2
  116. package/dist/runner/promotion.d.ts +9 -2
  117. package/dist/runner/promotion.js +79 -28
  118. package/dist/runner/reflect-hook.d.ts +7 -0
  119. package/dist/runner/reflect-hook.js +2 -1
  120. package/dist/runner/run-child-host.d.ts +10 -6
  121. package/dist/runner/run-child-host.js +65 -41
  122. package/dist/runner/run-child.js +2 -0
  123. package/dist/runner/runner.d.ts +9 -0
  124. package/dist/runner/runner.js +158 -25
  125. package/dist/runner/store-port.d.ts +4 -1
  126. package/dist/runner/workflow-calls.d.ts +4 -3
  127. package/dist/runner/workflow-calls.js +41 -12
  128. package/dist/runner/workflow-first.js +4 -3
  129. package/dist/runner/workflow-loop.js +13 -1
  130. package/dist/runner/workflow-spec.js +1 -1
  131. package/dist/secret-cut.d.ts +4 -0
  132. package/dist/secret-cut.js +1 -1
  133. package/dist/secret-rules.d.ts +2 -1
  134. package/dist/secret-rules.js +88 -24
  135. package/dist/server.d.ts +10 -1
  136. package/dist/server.js +131 -44
  137. package/dist/share-host.d.ts +111 -0
  138. package/dist/share-host.js +669 -0
  139. package/dist/store/schema.d.ts +4 -3
  140. package/dist/store/schema.js +4 -3
  141. package/dist/store/seal.d.ts +8 -2
  142. package/dist/store/seal.js +13 -2
  143. package/dist/store/sqlite/learning-rows.js +2 -1
  144. package/dist/store/sqlite/run-patch.js +4 -4
  145. package/dist/store/sqlite/store.js +28 -4
  146. package/dist/store/store.d.ts +5 -0
  147. package/dist/store-reads/analytics.d.ts +15 -0
  148. package/dist/store-reads/analytics.js +17 -0
  149. package/dist/store-reads/journal.d.ts +2 -0
  150. package/dist/store-reads/journal.js +1 -1
  151. package/dist/store-reads/learning.d.ts +4 -3
  152. package/dist/store-reads/learning.js +62 -18
  153. package/dist/store-view.d.ts +3 -0
  154. package/dist/store-view.js +18 -1
  155. package/dist/suggestions.js +32 -3
  156. package/dist/templates.d.ts +3 -1
  157. package/dist/templates.js +7 -3
  158. package/dist/tool-gate.d.ts +25 -9
  159. package/dist/tool-gate.js +58 -19
  160. package/dist/tool-list.d.ts +4 -0
  161. package/dist/tool-list.js +4 -0
  162. package/dist/tool-plane.d.ts +1 -0
  163. package/dist/tool-plane.js +6 -2
  164. package/dist/tools.js +2 -2
  165. package/dist/trigger-composio.js +1 -1
  166. package/dist/webhooks.d.ts +3 -0
  167. package/dist/webhooks.js +5 -0
  168. package/dist/workspace/archil-claim.d.ts +7 -3
  169. package/dist/workspace/archil-claim.js +13 -5
  170. package/dist/workspace/archil-mount-credential.d.ts +6 -0
  171. package/dist/workspace/archil-mount-credential.js +11 -0
  172. package/dist/workspace/attach.js +22 -5
  173. package/dist/workspace/computer-deps.d.ts +5 -3
  174. package/dist/workspace/computer-deps.js +11 -9
  175. package/dist/workspace/computer-for-claim.d.ts +6 -2
  176. package/dist/workspace/computer-for-claim.js +43 -12
  177. package/dist/workspace/computer-janitor.d.ts +7 -4
  178. package/dist/workspace/computer-janitor.js +7 -4
  179. package/dist/workspace/computer-kept.d.ts +7 -1
  180. package/dist/workspace/computer-kept.js +7 -1
  181. package/dist/workspace/kind-skills/desktop/SKILL.md +17 -4
  182. package/dist/workspace/mount-revoke-left.d.ts +16 -4
  183. package/dist/workspace/mount-revoke-left.js +42 -22
  184. package/dist/workspace/resolve-computer.d.ts +11 -5
  185. package/dist/workspace/resolve-computer.js +22 -13
  186. package/dist/workspace/run-end-computers.js +1 -1
  187. package/dist/workspace/run-tools.d.ts +10 -3
  188. package/dist/workspace/run-tools.js +5 -4
  189. package/dist/wrapped.d.ts +29 -2
  190. package/dist/wrapped.js +20 -3
  191. package/launcher/agentrun-serve +1 -1
  192. package/package.json +12 -12
  193. package/templates/kyb/agent.md +7 -1
  194. package/templates/kyb/evals/list-file-fuzzy-alias/case.yaml +10 -0
  195. package/templates/kyb/evals/list-file-fuzzy-alias/fixtures/web.json +58 -0
  196. package/templates/kyb/evals/list-file-fuzzy-alias/graders/finds-the-transliteration.md +17 -0
  197. package/templates/kyb/evals/list-file-fuzzy-alias/graders/greps-the-files.md +11 -0
  198. package/templates/kyb/evals/list-file-fuzzy-alias/graders/saves-the-uk-file.md +8 -0
  199. package/templates/kyb/evals/list-file-fuzzy-alias/prompt.md +7 -0
  200. package/templates/kyb/evals/list-file-hit/case.yaml +10 -0
  201. package/templates/kyb/evals/list-file-hit/fixtures/web.json +58 -0
  202. package/templates/kyb/evals/list-file-hit/graders/greps-the-files.md +11 -0
  203. package/templates/kyb/evals/list-file-hit/graders/hits-by-company-number.md +18 -0
  204. package/templates/kyb/evals/list-file-hit/graders/saves-the-uk-file.md +8 -0
  205. package/templates/kyb/evals/list-file-hit/prompt.md +7 -0
  206. package/templates/kyb/evals/list-file-no-hit/case.yaml +10 -0
  207. package/templates/kyb/evals/list-file-no-hit/fixtures/web.json +58 -0
  208. package/templates/kyb/evals/list-file-no-hit/graders/greps-the-files.md +11 -0
  209. package/templates/kyb/evals/list-file-no-hit/graders/no-hit-by-whole-file.md +12 -0
  210. package/templates/kyb/evals/list-file-no-hit/graders/saves-the-uk-file.md +8 -0
  211. package/templates/kyb/evals/list-file-no-hit/prompt.md +7 -0
  212. package/templates/kyb/evals/list-file-short-name/case.yaml +9 -0
  213. package/templates/kyb/evals/list-file-short-name/fixtures/web.json +58 -0
  214. package/templates/kyb/evals/list-file-short-name/graders/finds-the-short-name.md +19 -0
  215. package/templates/kyb/evals/list-file-short-name/graders/greps-the-files.md +11 -0
  216. package/templates/kyb/evals/list-file-short-name/graders/saves-the-uk-file.md +8 -0
  217. package/templates/kyb/evals/list-file-short-name/prompt.md +7 -0
  218. package/templates/kyb/evals/list-file-split-name/case.yaml +11 -0
  219. package/templates/kyb/evals/list-file-split-name/fixtures/web.json +58 -0
  220. package/templates/kyb/evals/list-file-split-name/graders/finds-the-director.md +18 -0
  221. package/templates/kyb/evals/list-file-split-name/graders/greps-the-files.md +11 -0
  222. package/templates/kyb/evals/list-file-split-name/graders/saves-the-uk-file.md +8 -0
  223. package/templates/kyb/evals/list-file-split-name/prompt.md +7 -0
  224. package/templates/kyb/kyb.schema.json +2 -2
  225. package/templates/kyb/rules/SANCTIONS.md +82 -13
  226. package/dist/console/assets/index-BnZV3lvW.js +0 -639
  227. package/dist/console/assets/share-B1o5mJ56.js +0 -6
  228. /package/dist/console/assets/{styles-D_znYrHR.js → styles-BGZxYkky.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,119 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## 0.1.0-beta.63 (2026-11-26)
6
+
7
+ - An agent on any CLI harness (claude-agent, codex, opencode, and Goose or Cursor where their owner installed them) now gets the browser, the same way it gets web_fetch. Before, granting `browser` to such an agent came back with "browser runs on pi here; on <harness> it is not bound yet", and a run of an agent whose computer is a browser was refused at its claim with "This agent's computer is a browser, which only the pi harness drives here". Now neither is refused on any of them. The harness is handed the browser's tools (`snapshot`, `run`, `screenshot` and the rest) as host tools. They drive the same session pi's would: the agent's browser computer, or else the vendor its tool plane picks. They use the same live view, the same spend held under the run's cap, and the same release when the run is let go. <!-- changes/browser-on-every-harness.md -->
8
+ - The person can take part as on pi: the agent's `browser_request_handoff` asks them and its call waits, with the run working, its row saying it waits for them in the browser, and its session held, until they hand the browser back; and the person can take the browser over in its live view unasked, while the agent's next browser call waits for them and is then told they had it. Either way the agent's later browser calls drive the same session, and none is made again.
9
+ - A browser call in flight when its runner dies is answered as interrupted ("may or may not have taken effect") when the run resumes on another runner, and is never sent to the browser again; the model goes on from that answer. The next claim takes back the session the run opened, and it is released once when the run ends. Each browser call's memo is its own, so nothing it kept carries into another call.
10
+ - Every browser answer the harness is handed (a page's snapshot text, the hand-over and take-over words) passes through the run's redactor first, as every other host tool's answer does: a secret the run holds that a page shows back reaches the CLI only as `[redacted]`.
11
+ - `subagent` still runs on pi only, and is refused in words on every other harness; `pdf_pages` and `llm` stay a workflow's node tools.
12
+ - `capabilities.tools` lists every harness under the browser's `harnesses`, not `pi` alone.
13
+ - The kyb template can screen a name against each sanctions list's own published file. With a shell it saves the file with `web_save` and greps every row, and its answer names the method `full_list_grep` with the list's version where the file or its URL gives one (`unknown` otherwise). Before it reports `no_hit` it has searched each identifier it holds, a short name such as `ADF Ltd` whole as a word, and, where a common name needs narrowing, whole UN records rather than lines, since the UN file keeps each part of a person's name on its own line. It reads a name with another in brackets, such as `ADF (Allied Democratic Forces)`, as both names, so a short name is not passed over as one word inside a longer name. It reads an EU entry's rows whole, the header line first, so a long remark no longer cuts off the name, birth date, documents or citizenship that come after it, and a `;` inside a quoted field shifts no column. Without a shell it screens through the list owners' indexes and records, as before. <!-- changes/kyb-list-files.md -->
14
+ - `agentrun share RUN --to URL` publishes an ended run to a share host and prints its link, `<URL>/r/<id>`. It exports the run again with `--restore`, checks the bundle against `--expect SHA` before anything is sent, and posts the bundle byte for byte to `POST <URL>/r/v2/shares`. A bundle whose sha256 changed since the preview page showed it is refused (exit 1), with words saying to open the page again. Before it sends anything, it prints that a share is public: anyone with the link can open it. The preview page's footer now shows the whole command, `agentrun share RUN --to <url> [--restore IDS] --expect SHA`, with `<url>` your share host's address, and how to sign in to it. The page names no default share host. <!-- changes/share-publish-cli.md -->
15
+ - `agentrun login --share URL < TOKEN_FILE` signs in to a share host: the token, read from stdin, is checked at `URL/r/v2/shares` and kept in a `share` entry of the same 0600 config file. The server's `base_url` and `api_key` stay as they were, so every other command still goes where it went, and a later `agentrun login` keeps the share entry. `agentrun logout --share` removes that entry alone; `agentrun logout` still removes the file.
16
+ - A share host's refusal is said in the CLI's own words, never its message or a value: a 422 prints its counts by rule (a rule the bundle's own records don't name counts as `unknown`), a 400 says the host does not take the bundle's format, a 413 gives its numbers, a full quota says to take a share down, and a refused token (exit 4) gives the login command. Publishing with no share login for that address refuses before the export, with the same command.
17
+ - `agentrun share delete URL` takes a share down with the same token (`DELETE <host>/r/v2/shares/<id>`); its page and bundle then answer 410. A share of another token's (exit 4), one the host does not have (exit 1) and one already deleted (exit 0) are each said plainly.
18
+ - `agentrun share RUN` with none of `--to`, `--dry-run` and `--out` still exits 2 and sends nothing; its words now name `--to`. `--to` with `--dry-run` or `--out` is refused.
19
+ - On a Linux desktop, `apps.list` leaves out, and `apps.launch` and `apps.terminate` refuse as `denied` naming the file and why, an app whose desktop file computerd's own user could change: on the way to it from `/`, every symbolic link followed, the user owns a folder, a link or the file (`~/.local/share/applications` among them), the mode bits let it write the file or a folder holding one of them, or computerd runs as root. The entry is read from the file that walk checked, opened without following a link and refused if another took its place. An app runs what its desktop file says, so before, an agent given `write` and the apps group, with bash denied and exec off, could write a desktop file there and `apps.launch` it, or shadow a system app's id, and run any command. Apps installed under the user's home, as on a paired machine's `~/.local/share/applications`, are no longer listed, and a computerd that runs as root lists none. <!-- changes/apps-launch-writable-desktop-files.md -->
20
+
21
+ The surface's `apps.open` (a script's `computer.apps.open`) refuses a `url` that starts with `-`, after leading whitespace too, as `invalid` before the call leaves it, in computerd's words, so a paired Linux machine on an older computerd doesn't hand it to the app as a flag. The computer README and `AppsLaunchParams.url`'s comment say what a `url` is on Linux. The words every offer of a computer's ops carries (`GUI_REACH`) and the desktop kind skill say that `apps.open` with a path reaches what a shell does for a file the agent wrote too, where `write` is granted.
22
+ - On a Linux desktop, `apps.launch` (a script's `computer.apps.open`) refuses a `url` that is neither an absolute URL with a scheme (`https://…`, `file:///…`) nor an absolute path, and starts nothing. Before, computerd put the `url` into the app's argv as it was: one starting with `-`, after leading whitespace too, reached the app as a flag (Chromium's `--renderer-cmd-prefix` runs a command, on a computer whose exec is off), and a relative path reached it as a file. A `url` starting with `-` is refused `invalid` in words of its own: `starts with "-": the app would take it as a flag, not a url`. The macOS and Android daemons already took only a URL with a scheme, handed to the OS rather than to an argv. <!-- changes/apps-open-url-guard.md -->
23
+
24
+ The words every offer of a computer's ops carries (`GUI_REACH`) now say that `apps.open` with a URL or a path, not only a `file://` URL, reaches what the shell and the file ops do. serve's README and the desktop kind skill no longer say that every op the gate refuses whatever its arguments is left out of `computer_op`'s list: only the ops held to a tool (the file ops, `shell.run`, `processes.start`) are; apps and raw input stay.
25
+ - A server's start lists the ChatGPT plan's models only with an access token OpenAI takes. The start never renews the token itself, so a stop right after it can't spend the refresh token and lose the sign-in. Until a run renews the token, the fallback list stays. Once one has, the server's next read of the sign-in (`GET /capabilities`, which the console reads, or the ChatGPT sign-in page) lists the models while that token is fresh, with no restart. A server's stop now also waits, within its 2 s, for the change its start's model list tells it. A renewal that loses its write-back to a new sign-in, and whose new pair OpenAI doesn't confirm revoked, now carries that pair in the saved row. If another process is renewing that row, it waits for that renewal first. The server's next start revokes the pair. <!-- changes/plan-settle-followups.md -->
26
+ - The scrubber now cuts a read of `.env` files named by a glob or a brace, such as `cat .env*`, `head .env.*` or `cat .env.{local,production}`. Before, these printed every file uncut. The dotfile exemption covers only a plain path, so these commands keep their `env` token and their output is an `env-dump` cut. <!-- changes/scrubber-env-globs.md -->
27
+
28
+ The env-dump reader now also catches:
29
+ - `process` with `.env` on the next line;
30
+ - the `Environment` property (`systemctl show -p Environment`) and `/etc/environment`;
31
+ - `heroku config` and its subcommands;
32
+ - `ps` with an uppercase `E` (`ps auxE`, `ps -E`).
33
+
34
+ A transcript's cut now also starts and ends at a full PS1 prompt: `user@host:~$`, `root@c:/#`, `[user@host dir]$`, with or without a `(venv) ` prefix.
35
+
36
+ A shared run's title now has one more env-dump cut. The title is the first message on one line, so `$ printenv` and its `NAME=value` output sat on the same line there and were shared uncut. The export now reads the title as a flattened transcript: after a prompt, when a command that prints the environment is followed by a `NAME=value` word, everything from that word to the next prompt is cut. This covers only that shape. Output that doesn't start with `NAME=` (`printenv NAME`, `echo $NAME`, `cat .env`, `docker inspect`, `heroku config`) is still carried in the title, though the row that holds the same message is cut. Only the title is read this way; a row or file keeps reading `$ env NAME=value command` as a command. A share host reads an uploaded bundle's title the same way.
37
+
38
+ A `.env` name in another case (`cat .ENV`, `cat .Env.local`) is now an env-dump. env-file matches only lower-case names, and the exemption used to drop these names anyway.
39
+ - A raise that reaches an agentic run's claim while that claim is parking the run again at its cap (a refused raise woke it, and the park is slow, as one that keeps a computer is) now waits for the run's next claim, which resumes the run. Before, the parking claim took the raise and the run was left parked with nothing to wake it. <!-- changes/serve-raise-during-repark.md -->
40
+ - A capped workflow run parked at its cap that a claim wakes with no raise that resumes it (a raise the cap's rule refuses, from a race of two raises or a retry) now parks again on the pause it stood at, with nothing written, before any step runs. Before, each such claim ran the held step into the same cap and wrote a new `agentrun.budget` entry. A refused raise's row is left untaken and wakes the run on every poll, so the entries grew without bound. <!-- changes/serve-refused-raise-claim-loop.md -->
41
+ - A capped workflow run writes one budget entry per cap in two more cases. A retry of the raise that resumed the run, reaching it once it parked again at the raised cap, is taken and leaves the new pause standing: its raise entry names the pause the raise answered, as an agentic run's does, not the one the run stands at since. A claim of a run paused at its cap whose row reads running (a woken claim lost before its release) parks the run again on its pause, as a claim of the parked run does. Before, each ran the held step into the same cap and wrote another `agentrun.budget` entry. A run's view shows the pause it stands at after such a retry: a raise entry clears only the pause it names. <!-- changes/serve-workflow-raise-retry-lost-claim.md -->
42
+ - A tool result is held to the model's context window, not only to the fixed 120,000-character bound: a model with a small window (an Ollama model at 65,536 tokens, a 16k one) is never handed a result that fills its context. <!-- changes/tool-result-window-bound.md -->
43
+ - `boundResult(text, budget?)` takes the model's window (`{ contextWindow, baseInputTokens? }`): a result may take at most a quarter of what the window leaves (`RESULT_WINDOW_SHARE`), at three characters a token (`RESULT_CHARS_PER_TOKEN`), and never more than `HOST_RESULT_MAX_CHARS`. Past that it is cut with a note saying it was cut to fit the window and how to read on; a window too small for any cut refuses the result in words, and a result of at most 400 characters (`RESULT_ALWAYS_WHOLE_CHARS`) always stands whole, so bounding a bound changes nothing. With no window the bound is exactly as before. `resultMaxChars(budget)` gives the bound, and `boundTo(text, max)` cuts to a given bound, saying how (`ResultBound`: the characters kept, the whole length, the bound).
44
+ - `SessionSpec.contextWindow` carries the session model's window, and each harness adapter (Claude, Codex, ACP, OpenCode) takes a `contextWindow` option for when the host passes none; Codex and OpenCode are told that window in place of their 272,000 guess. A Codex script cut off by a crash is answered within the same bound (`recoveryMaxChars`), not `EXEC_RECOVERY_MAX_CHARS`.
45
+ - agentrun-serve puts the run's model window from its catalog on every session, and pi now holds every tool result to it too: a host tool's and a pi-native one's (web_fetch, web_search, the browser's), which before reached the model up to pi's own output limits. What a host tool streams while it runs is held to the bound too (`boundedProgress`), since pi writes a call cut off past its restart limit from that text, without its hooks.
46
+ - A turn's results together fit what the window has left (`TurnBudget`, `ResultBudget.turn`): from what the context already holds (the last request's input tokens and its answer's output, else the session's system prompt and tool schemas counted with o200k), less the room kept for the model's answer (`answerReserve`: a quarter of the window, at most `ANSWER_RESERVE_MAX_TOKENS`, 16,384 tokens), each call the model made takes the smaller of its own bound and what is left over the calls still unanswered, so parallel calls split it, and below the least a cut keeps a result is refused in words. The kernel owns the rule; the session's model proxy reports each answer's facts (`ModelProxyOptions.turn`, its calls counted from the stream by `toolCallsIn`) for Claude, Codex, OpenCode and Goose, and pi and Claude Code on a person's login report them from their own hooks (pi's afterResponse, the login's stream booking). `windowBudget(window, system?)` builds the budget with its turn. A call whose result goes to the harness's own tool rather than the model (`ToolBridgeOptions.outsideTurn`: Codex's code-mode script calls) takes the per-result bound alone, outside the turn's split.
47
+ - The bridge records each cut it hands a harness (`bound:<callId>`, `boundKey`), and a replay of the call is cut by that record. Codex compares a nested call's two records on those lengths, never on the note's words; `boundOf` is gone. A session written before the record still agrees where Codex got the host's bound's cut, as before.
48
+ - On Claude, Codex, ACP and OpenCode, a turn's budget outlasts a process that stops in the turn (a park, a crash): each answer's facts and each result's length as it was handed go to the session's journal as they happen (`journalTurn`, `TURN_STREAM`), and a budget that has read no answer yet takes them back before any call claims (`TurnBudget.restore`). The calls a resume answers split what their answer left, and a result handed before the stop keeps its part. Codex's recovered script outputs claim their room in the turn too and are held to that claim (`ResultBudget.maxChars`). pi's turn budget is not journaled yet: a pi session opened again starts a fresh one, and each result there keeps its per-result bound.
49
+ - A run with `checkout: pull_request` or `checkout: repository` on a Mode 2 server whose Archil region has no serverless exec (gcp-us-central1) now gets its checkout: the server's git fetch runs in the run's sandbox computer once it has mounted the run's folder, the same script with the GitHub App's token on the process's stdin, never on its argv or in its environment. Before, the fetch went to Archil's exec, which that region refuses, and the run was told its checkout failed with "Exec is not enabled". A run there with no computer that mounts its folder is told up front that it has no checkout and why, and its timeline names a sandbox computer as the fix. A template whose computer list asks for a shell first (code-review, agent-scout) is applied there with the first sandbox whose keys are set and that mounts the run's folder (E2B, Modal or Agent37 on Archil), so its runs have a shell and their checkout. A computer's exec now takes stdin (process.write). Regions with exec and Mode 1 are unchanged. <!-- changes/archil-no-exec-checkout.md -->
50
+ - A CLI run's end-of-run turn (its learning step) now reads the turn's last message as its answer, as a pi run's always has. Before, it ran every message of the turn together, so a claude-agent turn whose stream stalled and was asked again whole stored the stalled part and the whole answer as one. The Claude adapter takes the stream idle limit from its host (`streamIdleMs`, `LOCAL_STREAM_IDLE_MS`) rather than from a route's `fetch`, and serve sets it only for a model on its own machine. <!-- changes/cli-end-of-run-answer.md -->
51
+
52
+ ## 0.1.0-beta.62 (2026-11-26)
53
+
54
+ **Breaking:**
55
+
56
+ - A script's file ops on a desktop or a phone need their tool among the agent's tools: `computer.files.read`, `files.list` and `files.stat` need `read`, and `files.write` needs `write`, as before. Naming a desktop no longer grants them: an agent that read files through `computer` without `read` in its `tools` is now refused in words (`computer_op files.read needs read among this agent's tools…`), whatever `read`'s setting says, on every desktop, mounted or not. Add `read` to the agent's `tools` to keep them. `computer_op`'s op list and a script's `computer` declarations offer only the ops the gate would let through: not one whose tool the agent is not given, nor one held to a tool set to deny, nor one held to a tool set to ask where no one can approve, nor one `bash`'s policy refuses whatever its command (`bash` set to deny drops `shell.run` and `processes.start`; the read-only policy drops `processes.start`). Both say that input ops on a computer with a terminal app or a GUI file manager, and `apps.open` with a `file://` URL, can do what a shell or the file ops do, whatever `bash`'s, `read`'s or `write`'s setting. `shell.run` and `processes.start` still follow `bash`'s setting, not a grant, so leaving `read` out keeps no file from an agent that has the shell, paired machines included: on a desktop with exec on, `computer.shell.run` reads and writes any file under `bash`'s setting, which allows by default. `computerDeclarations` takes the ops to leave out, and the kernel exports `withoutOps` for computer_op's definition and `GUI_REACH` for the words. <!-- changes/desktop-file-ops-need-grants.md -->
57
+ - A harness module's runner gets the run's redactor on its launch (`HarnessLaunch.redact`, required and typed) and no longer among the harness's own options, and every loop the runner makes refuses to start without the runner's redactor that holds keys. Upgrading: a harness module reads the run's redactor from `launch.redact` (required); `extra.redact` is no longer set. <!-- changes/run-keys-redact-followups.md -->
58
+ - A native run's loop, the runner's dispatch loop, a loop the live view wraps and a loop for a run in its own process now each refuse to start without the runner's held redactor, as the adapter, SDK and workflow loops already did. Before this release, a native run's loop given none ran on a redactor of the runner's environment alone, which holds no key a claim opens; the runner always hands its own, so only a caller outside the runner reached that.
59
+
60
+ **Changes:**
61
+
62
+ - Render Sandboxes as a computer provider (`render`, subpath `@parcha/agentrun-computer/render`): a Linux sandbox in a Render microVM, over Render's public REST API with no SDK. Settings → Computers shows a Render row that takes `RENDER_API_KEY` and `RENDER_WORKSPACE_ID`, and the server's launcher holds `RENDER_API_KEY` with the other providers' keys, never in the server's environment. `render` is a box the clients' types name. <!-- changes/computer-render-sandbox.md -->
63
+ Its sandboxes dial the server, as Fly Machines and Cloudflare do: Render runs a command with no stdin, so once a sandbox runs, the provider starts `agentrun-dial` in it through one `runs/sync` call, and it fetches the server's daemon and dials the attach route. A server with no public https address (`AGENTRUN_PUBLIC_URL`) refuses a Render computer in words before Render is called. `prepareImage()` imports the box image once into the workspace as a sandbox build named `agentrun-box-<tag>`. Network `none`, `open` and an allow list are init's, as on the other dial providers. Render keeps no labels, so a computer's name gives its own two and the rest live in a file in the sandbox; a listing whose file read fails fails in words. Render has no endpoint that lengthens a running sandbox, so there is no `extend()`, and a sandbox lives at most a day. No mount: a Render computer can't mount the server's run folders.
64
+ - `agentrun-serve --share-host` (or `AGENTRUN_SHARE_HOST=1`) starts a share host: a server that answers under `/r/` alone and stores shares in `DIR/shares/`. A share's page is `/r/<id>` (the console's `share.html`, with its asset URLs under `/r/_assets/` and a CSP that loads nothing from any other origin), its stored bytes are `/r/<id>/bundle.json` (`nosniff`, `X-Robots-Tag: noindex`), and its API is `POST /r/v2/shares`, `GET /r/v2/shares` (the caller's own), `DELETE /r/v2/shares/<id>` and a public `GET /r/v2/health`. Every other address is a 404, the console, `/v2`, MCP and every run, agent, key, computer and trigger route among them. A share host starts no runner and has no owner or console session: its API takes one of its tokens (`AGENTRUN_TOKENS`), whose id owns each share it uploads. <!-- changes/share-host.md -->
65
+ An upload is a run's `agentrun.share/1` bundle exactly as `GET /v2/runs/<id>/export` wrote it: canonical JSON at most 8 MiB, the export's closed fields and caps, each file's size and digest and the document's sha256 checked (a mismatch is `400`). The host then scrubs the whole body, and each of its strings alone, in cut mode with the values it holds (its keys and tokens). A value it finds refuses the upload unless a `restored` record names it exactly (pointer, rule, start, end) and the host's own scrub says its kind may be restored (label, personal, jev; never a key format, a held value or a dump); a restored record naming no value the host finds refuses it too (save a restore of Jev's rule, which the host never runs: taken unchecked, its value still scrubbed, and counted in `restored_unchecked`), and so does a scrub that fails. An upload that needs more than 50,000 string reads is `413` before any scrub. Each distinct string is one read for each context it is read under (a file's path, a workflow call's command), and a call's command is read once for all of its output. Each refusal is `422 input_invalid` with `details.reason` and counts by rule, never a value, and nothing is stored; the host never repairs a bundle. A stored share answers `201 {id, url, sha256}`, its id 128 random bits in base32 and its URL on `AGENTRUN_PUBLIC_URL` (never a Host header; a share host on an address other than loopback needs it to start). A token keeps at most 100 shares (`403 forbidden`, `details.reason: share_quota`, past it); shares never expire. Only the token that made a share deletes it (`204`); its bytes go, and its page and bundle then answer `410`. Run one replica with `DIR` on a persistent volume: the quota and the share index are the one process's.
66
+ A share page draws no image at all: not a run's file and not a provider's URL, in a workflow's graph or in a report.
67
+ The host re-reads a file's content with its path and a workflow call's output with that call's command. A Timeline row's output it re-reads without its call's context, since a bundle carries no calls, so the host's check of a row is the context-free rules' alone. The export still cuts the row with its call's context.
68
+ The share page has not yet been drawn in a real browser: its HTML, CSP and assets were fetched from a real console build on a loopback share host.
69
+ - Wrapped has a cache section, and the console draws its cache grade card. The import now analyzes each Claude Code, Codex and pi session's cache as it imports it, the same way `agentrun-import --cache` does, and keeps the numbers on the run: the cache read and whole prompt behind its hit rate, its breaks by cause, what they cost above a cache read, and how many have no known price. `GET /v2/wrapped` answers `cache` by adding up the year's runs from the store, so it reads no session file again. <!-- changes/wrapped-cache-card.md -->
70
+ - `cache` is null when no run of the year was analyzed. Only runs imported here count: a session left out of the import, or imported before this version, is not in it.
71
+ - The card shows a grade from the hit rate (A+ from 97%, then a step every three points down to D from 60%, F under that), the hit rate, what breaks cost, how many there were, and breaks by cause. The cost is "Unknown" when no break could be priced, and the foot line counts the breaks left out of it.
72
+ - `@parcha/agentrun-import` exports `fileCache`, `sessionBreaks` and `conversationOf`: the per-file analysis, the join `cacheHome` uses, and which subagent files are one conversation (a Codex subagent's thread that goes on in another rollout is one). Another reader of a session's files gets the same breaks.
73
+ - An API-only server (`AGENTRUN_API_ONLY=1`) now serves an ended run's share bundle (`GET /runs/{id}/export`, with its `?restore=`) to its token: before, it answered `404` and `agentrun share` failed against it. The bundle is the full server's, cut by the same scrubber, and a run that has not ended is still `409`. The share preview page stays the console's, which this profile refuses: use `agentrun share RUN --out FILE` there. <!-- changes/api-only-share-export.md -->
74
+ - On a Mode 2 server whose Archil region has no serverless exec (`gcp-us-central1`), a new agent that names `bash` (or another shell tool) and no computer is refused at its save or deploy and told to name a sandbox computer, instead of being saved with a shell that never runs (every bash call failed with "Exec is not enabled"). A new agent that names no tools is not refused: it saves on the runner with no tools, as Mode 2 always saved it. An agent already saved with `bash` and no computer is now refused at each run, `409 agent_not_runnable` at `definition.computer` in the same words, and no run starts; this holds for runs started by hand, by a schedule and by a trigger, and is intended: bash cannot run there, so give the agent a sandbox computer or remove `bash` from its tools. Capabilities' `places.default_place` is null there with a `default_reason` saying why, bash shows unavailable, and `GET /v2/computers` gives the no-computer choice no shell. Servers on Archil's AWS regions, and on a region serve doesn't know, are unchanged. <!-- changes/archil-no-exec-no-shell.md -->
75
+ - A package's composio trigger written with no `config` reads as `config: {}`, the config of an event whose schema needs no field (Slack's new channel): `agentrun deploy` no longer refuses it, and an apply makes, and a re-apply keeps, the trigger with the empty config. `POST /v2/triggers` still takes `config` as given; its refusal of one left out now says to send `{}` for such an event. <!-- changes/composio-trigger-config-default.md -->
76
+ - A run whose kept computer can't be taken back no longer shows the provider's refusal to the person. Before, a resumed run's timeline could read "The sandbox kept before could not be taken back: the computer … does not match this provider, so attach refuses it and it is left as it is: HostConfig.Mounts: …", with host paths and Docker's settings in it. Now it says why in serve's own words. When the runner that parked the run is gone: "The sandbox wasn't kept: the runner that kept it is gone." When that runner is still there, it says that runner ends it. Otherwise: "The sandbox wasn't kept: it couldn't be taken back." Each goes on to say the run has a new sandbox. The provider's full words go to the runner's log. When the new claim deletes that kept machine, its kept row is marked ended at once, so the run's end removes the row instead of leaving it marked ending until a janitor's pass. <!-- changes/computer-keeper-gone-words.md -->
77
+ - The janitor's pass over left Archil credential removes is bounded as a whole, and a failed leave is logged and tried again. <!-- changes/computer-night-followups-2.md -->
78
+ - The pass over the `archil_revoke:<run>` rows now has one bound for the whole pass, the kept delete bound. Once it passes, the remove being asked is cut, and the rows not yet asked stay for the next pass, reported in one line. Before, each row had its own bound, so N hanging rows held the provider sweep and the next wake for N bounds.
79
+ - Each pass starts after the last row the previous pass asked, wrapping around to the first, so a row whose remove hangs is retried last on the next pass and the rows after it are asked first. Every row is asked within as many passes as there are rows.
80
+ - When a run's claim ends and the store refuses to write the left row, the runner now logs `run <id>'s Archil mount credential remove could not be left for the janitor, so it lapses at its ttl: …`, and a later leave writes the row. Before, the failure was dropped, and the rejected write was cached, so no later leave could write the row.
81
+ - In the console, a search field's list is as wide as its field from the moment it opens: the app trigger's Event field and the Composio Toolkit field. The first time such a list opened it was drawn at its minimum width (192 px) for a frame or more, then jumped to its field's width. That jump is also why the console's `event-search` browser flow failed about one run in two: it read the list's width while the list was still narrow. The flow now reads every width the list has had on the page, so it fails on the jump itself and no longer depends on when it reads. <!-- changes/console-picker-list-width.md -->
82
+ - In Mode 2, where the runner's shell (Archil's serverless exec) runs bash, the console keeps bash on an agent with no computer: a new agent and a new race's pi lanes start with bash ticked, the Tools step lets you tick it, and a move to no computer keeps it, also on a server that gives new agents Docker's box. The console reads this from the run shell GET /v2/computers serves for each choice, the same one the server checks: bash stays on a runner place only where that shell is the runner's own. The background shell tools still need a box. A computer that mounts the run's folder (a desktop) has its own shell, which the server doesn't let on a runner place, so a move to one drops bash and the Computer step says so. A desktop or phone set to run no programs has no shell at all, so it never keeps bash. In Mode 1 no computer has no shell, and a move there still drops bash, as it does before the computers list is read. A new race waits for that list before it starts any lane, and if the list can't be read it says why and offers to read it again. <!-- changes/console-runner-keeps-bash-mode2.md -->
83
+ - The desktop skill now says where the run's folder is. Where it is mounted on the desktop, it is `/workspace`. The desktop's terminal opens in the desktop user's home, not there, so a file saved from the terminal or an app goes in `/workspace` to reach the run. Before, the skill never named the folder, and what an agent or a person saved from the desktop's terminal stayed on the desktop. <!-- changes/desktop-skill-run-folder.md -->
84
+ - The Free page no longer lists a template that can cost money through a tool. A template that names a Monid endpoint (`monid:…`) is left out: its calls are booked on the server's Monid key. So is one that grants `subagent`, unless its package names both its `fast` and `strong` models and each is free on the harness Apply makes the agent on. Apply keeps a tier's model only where that harness runs it, and a tier left out runs on the host's model for it, which may bill. <!-- changes/free-page-followup.md -->
85
+ - A template's Apply screen opened from a link whose `?model=` is not one of this server's free models now says so: its runs may cost money. "Use free" sends a free one. The warning stays when that model is carried into a prepared request in the API playground.
86
+ - A model pull no longer stops while Ollama checks the download. After `verifying sha256 digest`, Ollama hashes the whole model with no further output, and on a slow disk that takes minutes. A pull now waits up to 15 minutes there, and two minutes everywhere else as before.
87
+ - The pull's long-line error now says characters, as it counts, not bytes.
88
+ - The usage read's `unheld_quantity` and a computer interval's `booked_seconds` now say both are 0 on a provider that bills nothing (Docker), and that `unheld_quantity` is null when `quantity` is only on a provider that bills.
89
+ - A held Cursor run (`hold: true`) that its model kept from running at its create no longer opens `CURSOR_API_KEY` at its claim: the key is never decrypted, never laid on its environment, and a runner that starts each run in a process of its own hands that process none. With no `CURSOR_API_KEY` set, such a run holds its computer instead of failing its claim for the key. Such a run is never handed the Claude login either: its claim reads none, so a login turned on after its create (this machine's own, on a runner whose runs are users of their own) never refuses it, and a runner asked by the run's own process answers none. A launch whose `hold` is not an object (a corrupt row) is read as held with its model refused: its start and its messages are refused (`409 agent_not_runnable`) in words that name the field, and its claim opens no model key; before, it read as not held. <!-- changes/held-run-no-cursor-key-or-claude-login.md -->
90
+ - A run that sends no model key (one held because its model can't run, one on a `--faux` start, or one pinned to the faux model) no longer opens any saved model key or the Claude login at its start. A held run with decision nodes now gets its judge's key when that key is TypeSafe's or a model gateway's; before, its judge failed for want of it. Where each run runs as a user of its own and the Claude login is this machine's own (`~/.claude`), these runs are no longer refused at their start for a login they never use. Where runs run as the runner's own user (`AGENTRUN_RUN_USER=same`), such a run now runs as a process of its own instead of inside the runner on the login. <!-- changes/keyless-run-no-login.md -->
91
+ - An MCP tool's answer is cut by the run's redactor before the model reads it or it is filed in the run's files. Until now an answer was cut only of the credentials of the server that gave it, so a value only the run held (its own model or tool keys, another server's credential) came through as the server echoed it. The cut covers the model's answer and an error answer, the answer a tool's file setting files whole, the rest of an answer too long for the model, filed at `evidence/mcp/<server>/`, and a server's results its meter files. A whitespace-free run over 8,192 characters in a CLI harness's MCP answer, or in its filed copy, now arrives as `[redacted]`, as pi's already did. An image's or audio's data or a resource's blob filed whole is kept whole, however long, unless it holds a value the run holds, as written or in the bytes it decodes to; then that payload alone is `[redacted]`. In a run's own process, each credential its claim's MCP opens or refreshes and each GitHub token minted for it now joins its runner's redactor too. <!-- changes/mcp-answers-run-redactor.md -->
92
+ - A model Ollama lists after the server started no longer shows as the default with capabilities still saying no run is ready: a request that refreshes the login now reads what a run needs from the new listing too, as a capabilities request does. <!-- changes/ollama-ready-after-login.md -->
93
+ - MCP: only the message that reopens a run skips the per_run credential check. Before, if that message was refused or left for later, the next message skipped the check too, and a message that handed the credential of a server the run was left without ran without that server's tools instead of waiting for a turn that had them. A run waiting in its claim on a person's answer also parks on its question at once when the answer is refused after a later message was left for the run's next turn. Before, it stayed in its claim, holding its browser and the person's time under the cap, until a hold lapsed. A run that never started its agent, such as one its learned workflow answered alone, no longer keeps reading as working with nothing running when the message that reopens it is refused, as a trigger's message is in a session on its owner's sign-in: the run is back at the end it had before (stopped, or its workflow's answer), with nothing sent to the agent, no output retry and no model request, and a message sent after it runs as the run's next turn, after the job's input. <!-- changes/per-run-mcp-reopen-turn-followups.md -->
94
+ - MCP: a message that reopens a run is now that run's next turn even when a later message hands the credential of a per_run server the run was left without. Before, both messages waited for a turn that had the server's tools. A run that had never started its agent, such as one its learned workflow answered alone or one stopped before its first input was sent, then kept reading as working with nothing running until someone stopped it. The later message still waits, and runs as the turn after, with the server's tools. Its credentials do not wait with it: the run's model key, and the credential of any per_run server the run already had, take effect as the message arrives, so the reopened turn's later requests use them. <!-- changes/per-run-mcp-reopen-turn.md -->
95
+ - A ChatGPT sign-in is saved as soon as OpenAI answers its code, before its models are listed or the sign-in it replaces is revoked. Before, a server stopped in between left the new sign-in live at OpenAI and saved nowhere. The replaced sign-in now stays in the saved row until OpenAI confirms its revocation. The server's next start lists the models and revokes it again if a stop or an unconfirmed revocation cut that off. A model list OpenAI doesn't answer leaves the fallback list for the next start to replace. Only the server does this; a runner reading the sign-in for a claim never lists models or revokes. A sign-out revokes the replaced sign-ins the row still carries too. Rolling back to an earlier release drops any replaced sign-in the row still carries without revoking it: remove AgentRun in ChatGPT's settings to end it. <!-- changes/plan-keep-save-first.md -->
96
+ - A cut read of a run's file (`GET /v2/runs/{run_id}/files/{path}?cut=run`) makes its cut in a worker thread, off the server's event loop, under a deadline of 5 s for the read. Past it, or when the worker fails, the read is `503 unavailable` (retryable), never the file's text uncut. Before, the cut ran on the server's own thread, so a long cut of a large file held every other request on the server until it was done. The server keeps one worker for every cut read, made again after a cut is stopped at its deadline, so a grader reading 50 files of 20 KiB pays about 8 ms a file for its cut, about 3 ms more than a cut made inline, where a new worker per read would cost about 80 ms. The OpenAPI document lists the read's 503. <!-- changes/run-file-cut-worker.md -->
97
+ - A key no longer leaves the server, or a suggested agent's client, for a base URL with a user or password, a query or a fragment. The refusal names the URL's origin at most, never its password or query. <!-- changes/serve-https-base-everywhere.md -->
98
+ - A suggested agent's client (TypeScript, JavaScript and Python) refuses an `AGENTRUN_BASE_URL` with a user, a password, a query or a fragment before it sends anything, as AgentRun's SDK does. Before, it sent the request, and a failed fetch printed the whole URL, password included. It also follows no redirect: a start or a read answered with one throws, so the key goes to `AGENTRUN_BASE_URL` alone. Before, Python's urllib carried the key to any host a redirect named, http included. A client file written before this release still takes such an address and follows redirects.
99
+ - A workflow's Jev decisions on TypeSafe's route take `TYPESAFE_BASE_URL` by the same rule as the key check, and building a run's decision providers throws by the variable's name on one it refuses. Before, TypeSafe's SDK read the variable itself and sent `TYPESAFE_API_KEY` there, http included.
100
+ - A tool key's check sends no key to a `BROWSERBASE_BASE_URL`, `KERNEL_BASE_URL` or `TYPESAFE_BASE_URL` that `httpsBase` refuses, or to an `ANTHROPIC_BASE_URL` the model path's gateway rule refuses. The key is kept as not checked, and the reason names the variable. An `ANTHROPIC_BASE_URL` ending in `/v1` is checked at `<base>/v1/models`, where runs send, not at `<base>/v1/v1/models`.
101
+ - The Browserbase provider takes `BROWSERBASE_CONNECT_BASE_URL` by `keyBase`'s rule over wss and https: one with a user, a password, a query or a fragment now fails it, naming the variable and the gateway's origin alone. Before, those parts went into use (a query on it was dropped from every session's URL). A scheme other than wss or https now fails in `keyBase`'s words (`must be wss or https, so the key never crosses in the clear`).
102
+ - The OTLP trace export refuses an `OTEL_EXPORTER_OTLP_ENDPOINT` or `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT` with a user, a password, a query or a fragment: no exporter is built on it, nothing is sent, and the server and its runs carry on. The runner's start says once that tracing is off and why, naming the variable and the endpoint's origin alone (`[otel] tracing is off: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT takes no user or password, since the key goes to it: https://collector.example:4318`). http stays allowed there, as OTLP allows it, so a local collector keeps working. `/v1/traces` is added to the general endpoint's normalized form, so a bare trailing `?` or `#` no longer puts it in a query; a traces endpoint, once checked, is used as given.
103
+ - `agentrun native connect` refuses a server URL (`--url`, `AGENTRUN_BASE_URL`, `AGENTRUN_URL` or the recorded one) with a user, a password, a query or a fragment, naming where it came from, before it sends the server's token.
104
+ - `@parcha/agentrun-computer` exports `httpsBase`, and `keyBase`, the same rule over a list of schemes.
105
+ - Breaking: the key check and Jev's TypeSafe route now take `BROWSERBASE_BASE_URL`, `KERNEL_BASE_URL` and `TYPESAFE_BASE_URL` only as https URLs with no user, password, query or fragment, and the Browserbase provider refuses a `BROWSERBASE_CONNECT_BASE_URL` with any of those; the OTLP endpoints and native connect's server URL refuse a user, password, query or fragment; a suggested agent's client refuses any redirect. An http gateway set in one of the first three used to be accepted by these checks; point it at https, and move a credential in an OTLP endpoint to `OTEL_EXPORTER_OTLP_HEADERS`.
106
+ - Breaking: beta.59 traces to an OTLP endpoint with a user, a password, a query or a fragment, with those parts cut from its log lines; from this release tracing is off for such an endpoint, and the runner's log says why as it starts.
107
+ - A raise the cap's rule refuses (a race of two raises, or a retry after the run parked again) no longer writes a second `agentrun.budget` entry when it wakes an agentic run parked at its cap. The run parks again on the pause it stood at, with nothing written: one "Paused at the run's cap" row on its timeline, the row in the pause's words, and a later raise resumes that pause. <!-- changes/serve-refused-raise-no-repark.md -->
108
+ - An agent's tools on GET /v2/agents/{agent_id} now name the server's ceiling. Where the server's `kernel` for `web_fetch`, or its `native` or `off` for `web_search`, holds down the agent's own pick, the tool carries `ceiling` with that setting, next to `resolved`, the setting that runs. `provider` stays the agent's own pick, so the editor still shows what the agent asked for. <!-- changes/web-ceiling-followup.md -->
109
+ - A run in a process of its own is handed keys for its capped plane only. A run kept on Parallel and claimed after the server was set to `kernel` or `native` is no longer handed `PARALLEL_API_KEY`, which the run never used. The process now runs its tools on the plane its keys were chosen by, which the runner hands it, rather than reading the server's settings a second time: a setting changed between the two reads can no longer leave a tool on a provider whose key the process was not handed.
110
+ - The README and the settings description now say what the ceiling covers: `web_search` and `web_fetch`, not every way a run reaches the web. `browser`, `bash`, MCP and catalog tools, Jev's ranking, a workflow's `parallel` decision provider and a native job's own CLI are outside it. `deny`, read at each call, is the setting that stops a claim already running.
111
+ - The README no longer says a Parallel key keeps `web_fetch` URLs on the server: with one, `auto` is Parallel's extract, which sends Parallel each URL.
112
+ - A learned workflow call in a run's `workflow_calls` whose rerun was refused now reads `refused` only while every attempt the gate let go was closed by a refusal. One with an attempt left open (a crash cut it before it kept a record, or its record says it ran) reads `failed`, even when a sibling call ran beside it, so its model nodes' spend can't be told for its own: its `usd` is null there, and null for an attempt cut after the refused record. Before, it read `refused` at $0. A CLI's own side request on another model (its title or summary helper) inside a refused call's window no longer flips the call to `failed`. A tool that nests calls, issued again after an earlier attempt fixed a value or nested a call, is now asked at the gate as `replayed`. <!-- changes/workflow-calls-window.md -->
113
+ - A test now covers a follow-up correction on claude-agent: a correction sent to a finished run as a follow-up is saved to `corrections.md`, and the agent's next run gets it under `# Learned` in the system prompt its model receives. Until now only pi had this test. The cases also cover each run in a process of its own, a spend cap with a model key on the start and on the message, an end whose census was not made, and a follow-up's key revoked once it answered. CI's Postgres job runs every case on Postgres as well. <!-- changes/learn-follow-up-cli-test.md -->
114
+ - HARNESS.md and serve's README name the run's redactor that the adapter of a harness module's own runner gets on its launch (`launch.redact`, always given), which holds every key the run's claim opens. <!-- changes/launch-redact-docs.md -->
115
+ - On macOS, a sign-out that arrives while a status check is deleting the Keychain item a sign-in left under the account `unknown` waits on that delete, and when it fails or is killed at its limit, tries once more itself. Before, the sign-out answered with the item, which holds a refresh token, still in the login keychain. When the item may remain, serve's sign-out is not confirmed, and its words name the item's exact service, to search in Keychain Access or delete with one `security` command, so they never point at the person's own CLI's item. The harness exports that service as `claudeKeychainService`. It hashes the folder in Unicode's composed form (NFC), as the CLI does, so a folder path with a decomposed character no longer sends the delete to a service no item has, which answered the item gone while it stayed. <!-- changes/claude-signout-drop-retry.md -->
116
+ - An image's or audio's data or a resource's blob that an MCP answer files whole is now `[redacted]` when the text in the bytes it decodes to carries a secret's shape, such as a JWT or a private key block, even if the run holds no such value. Before, such a payload was cut only for values the run's redactor holds, so an unheld token or key in a file a server returned was filed as it came. The base64 text itself is not read for a shape, since a key's shape turns up there by chance in large images. The decoded bytes are read only through their runs of text, for shapes and held values alike: 8 or more printable characters, read past the bytes the redactor reads as nothing or as a blank (a NUL, a control character, a soft hyphen, a no-break space), so a value written as UTF-16 or UTF-32, or cut into short pieces by such a byte, is still found. Checking a 4 MiB image of random bytes takes about two seconds instead of close to two minutes; a payload whose bytes are all text costs what it did before. A claim's MCP now refuses to start without the run's held redactor, before it reads a credential or mints a GitHub token, and the MCP gateway refuses to start without a redactor. Before, the gateway fell back to cutting only the server's own credentials. <!-- changes/mcp-binary-redact-followups.md -->
117
+
5
118
  ## 0.1.0-beta.61 (2026-11-26)
6
119
 
7
120
  **Breaking:**
package/README.md CHANGED
@@ -333,7 +333,12 @@ and a line with the endpoint's origin and the time (`[otel] a trace export to ..
333
333
  dropped: Request timed out`), then at most one line a minute, said by the next failure once a minute has passed, that
334
334
  counts the failures since the last line (`[otel] 25 more trace exports to ... failed since ..., the last at ...`); never
335
335
  a line per span or per batch. Unset, or with `OTEL_SDK_DISABLED=true`, no OpenTelemetry code loads, nothing is sent and
336
- nothing is said.
336
+ nothing is said. The headers go to the endpoint, so it takes the rule of a URL a key goes to, over http or https: one
337
+ with a user, a password, a query or a fragment, or one that is not a URL, is refused, and tracing is off for it. The
338
+ server and its runs carry on, no OpenTelemetry code loads, nothing is sent, and the runner's start says why once, with
339
+ the variable and the origin alone: `[otel] tracing is off: OTEL_EXPORTER_OTLP_TRACES_ENDPOINT takes no user or
340
+ password, since the key goes to it: https://collector.example:4318` (or `takes no query or fragment: ...`, or `is not a
341
+ URL`). Put a credential in `OTEL_EXPORTER_OTLP_HEADERS` instead.
337
342
 
338
343
  [otel-agent-spans]: https://github.com/open-telemetry/semantic-conventions-genai/blob/d0e74ba6c48bcc4ded473b1828a8212f06b23753/docs/gen-ai/gen-ai-agent-spans.md#L213-L272
339
344
 
@@ -1020,8 +1025,23 @@ the screenshot are the tools of those names, and the rest (apps, the shell, file
1020
1025
  `computer_op` (`{op, args}`), a tool bound for scripts alone. Each call is held to the run's gate and recorded on the
1021
1026
  timeline like a tool's, and a crash rerun of the script answers a call that already ran from its record: a shell
1022
1027
  command (`shell.run`) is held to the agent's `bash` setting, a started process to `bash_background`, a file written to
1023
- `write`, and a file read, listed or looked up to `read`, after the kind's own setting for `computer_op`. A script's call
1024
- of a computer tool answers the tool's value. Codex's code mode takes no binding of ours, so a Codex run is offered
1028
+ `write`, and a file read, listed or looked up to `read`, after the kind's own setting for `computer_op`. A file op needs
1029
+ its tool among the agent's tools first, as the run's own file tools do: `files.write` needs `write`, and `files.read`,
1030
+ `files.list` and `files.stat` need `read`. An agent not given one is refused the op whatever its setting says, on every
1031
+ desktop, mounted or not. Naming a desktop does not grant its file ops. The shell's ops (`shell.run`, `processes.start`)
1032
+ follow `bash`'s setting alone, not a grant. `computer_op`'s op list and the script's `computer` declarations leave out
1033
+ an op held to a tool (the file ops to `read` and `write`, `shell.run` to `bash`, `processes.start` to
1034
+ `bash_background`) that the gate refuses whatever its arguments: its tool not given, set to deny, or set to ask on a
1035
+ server where no one can approve, or `bash`'s policy refusing it whatever its command (`processes.start` under the
1036
+ read-only policy). Apps and raw input are held to no tool, so they stay in the list. Leaving `read` out
1037
+ keeps no file from an agent that has the shell, paired machines included: on a desktop with exec on,
1038
+ `computer.shell.run` reads and writes any file the desktop's user can, held to `bash`'s setting alone, which allows by
1039
+ default. To keep files from such an agent, set `bash` to deny or turn the desktop's exec off. Input ops on a desktop
1040
+ with a terminal app or a GUI file manager, and `apps.open` with a URL or a path, including a file the agent wrote
1041
+ where `write` is granted, can do what a shell or the file ops do, whatever `bash`'s, `read`'s or `write`'s setting:
1042
+ to deny that, don't grant input ops or apps on that desktop, or
1043
+ use an image with neither a terminal nor a file manager. A script's call of a computer tool answers the
1044
+ tool's value. Codex's code mode takes no binding of ours, so a Codex run is offered
1025
1045
  `computer_op` beside the computer's tools and its scripts call them as nested calls, each answering the tool's value as
1026
1046
  JSON. A run whose `codemode` is set to deny lists them the same way, so its computer stays in reach. `computerMcp` (`src/workspace/computer-mcp.ts`) serves the same tools to an MCP
1027
1047
  client, each answer with its value as `structuredContent`.
@@ -1033,7 +1053,7 @@ is refused in words before the computer is asked. A screenshot with `save_as` is
1033
1053
  it too, after the kind's deny: the stricter decides (`write` set to deny refuses it before the computer is asked, set to
1034
1054
  ask puts it to a person); one with no `save_as` is held to the kind's setting alone. `save_as` needs `write` among the
1035
1055
  agent's tools: an agent not given `write` is not offered it, and the gate refuses one anyway whatever `write`'s setting
1036
- says. A script's `computer.files.write` needs `write` among the agent's tools the same way. `save_as` is offered only
1056
+ says, as a script's `computer.files.write` does. `save_as` is offered only
1037
1057
  where the gate would let a save through: not with `write` set to deny, nor set to ask on a server where no one can
1038
1058
  approve. On a desktop or a phone the run's folder is not mounted in (one with `exec: false`, or a provider that mounts
1039
1059
  none), the model is told this once in the run, as the server's note, after a due cap wrap-up; a run whose saves the
@@ -1063,7 +1083,7 @@ seals it in its store as every saved key under `AGENTRUN_SEAL_KEY`, and register
1063
1083
  key each restart, the old one left on the workspace), `MORPH_API_KEY`, `ORGO_API_KEY`, `PHONE_HARNESS_API_KEY`,
1064
1084
  `BROWSERBASE_API_KEY` and `BROWSERBASE_PROJECT_ID`, `KERNEL_API_KEY`, `BOXD_API_KEY` (with `BOXD_ORG` and
1065
1085
  `BOXD_REGION` optional), `SMOLCLOUD_API_KEY`, `GROUNDBOX_API_KEY`, `CLOUDFLARE_RELAY_URL` and `CLOUDFLARE_RELAY_TOKEN` (the relay Worker's,
1066
- `packages/computer/relays/cloudflare`), and `FLY_API_TOKEN` and `FLY_APP`; Docker takes none.
1086
+ `packages/computer/relays/cloudflare`), `FLY_API_TOKEN` and `FLY_APP`, and `RENDER_API_KEY` and `RENDER_WORKSPACE_ID`; Docker takes none.
1067
1087
  `GET /v2/computers/running` lists every run still going (queued, working, paused or waiting on its person) whose agent
1068
1088
  has a computer, newest first, each as `GET /v2/runs/{run_id}` answers it: its `computer` says the kind and provider,
1069
1089
  `starting`, `ready` or `taken_over` while its owner drives it, and a held run's hold. The runs list carries no
@@ -1556,7 +1576,7 @@ curl -s http://127.0.0.1:7340/v2/agents/support/runs -H "Authorization: Bearer $
1556
1576
  curl -s http://127.0.0.1:7340/v2/runs/$RUN_ID/messages -H "Authorization: Bearer $AGENTRUN_TOKEN" \
1557
1577
  -H 'content-type: application/json' -d "{\"content\": \"And the refund?\", \"model_key\": \"$NEXT_KEY\"}"
1558
1578
 
1559
- # When the run's turn has ended (run.ended), revoke it.
1579
+ # When the run is terminal and GET /v2/runs/$RUN_ID reads learning_work.state other than "running", revoke it.
1560
1580
  curl -s https://litellm.example.com/key/delete -H "Authorization: Bearer $LITELLM_MASTER_KEY" \
1561
1581
  -H 'content-type: application/json' -d "{\"keys\": [\"$KEY\"]}"
1562
1582
  ```
@@ -1576,15 +1596,32 @@ Custody, as for a per_run MCP server's `mcp_auth`:
1576
1596
  keeps failing, the message waits untaken and is delivered again, never run on the key held before it or the
1577
1597
  server's. A stop or cancel sent after it still reaches the run. A message without one keeps the key the run holds.
1578
1598
 
1579
- **The revoke-at-turn-end contract.** The write that ends a run's turn erases its key from the store, and the run
1580
- reports the turn ended (`run.ended`, the run's `completed`, `failed` or `stopped` status) only after that write. Every model request
1581
- tied to the turn finishes before then: the job, its subagents, its learned workflows' nodes, its end-of-run compile
1582
- turn. So a caller may revoke the key as soon as it sees the turn end, and no request of that run will
1583
- answer 401 for it. Model spend that would run after the turn ends is never sent on the run's key or the server's:
1599
+ **The revoke contract: `learning_work`.** The write that ends a run's turn erases its key from the store. Every model
1600
+ request tied to the turn finishes before then: the job, its subagents, its learned workflows' nodes, its end-of-run
1601
+ compile turn. A run that learns also starts learning work on its key at its end: a learned workflow's check (replay
1602
+ runs) and its audit (a shadow run). Each of those runs takes a copy of the key sealed for it alone, and the write that
1603
+ ends that run (or its purge) erases the copy. They are capped at their share of what the run's cap leaves at its end;
1604
+ with too little left they are dropped and spend nothing. GET `/v2/runs/{run_id}` says where that work stands in
1605
+ `learning_work`:
1606
+
1607
+ - `state`: `none` (the run started none), `running` (its compile turn, or a run in `runs`, is still going) or `ended`
1608
+ (all of it finished or dropped, at `ended_at`). It only moves forward once the run is terminal; a lost or cancelled
1609
+ child counts as ended.
1610
+ - Revoke the key once the run is terminal and `learning_work.state` is not `running`. No request of the run or its
1611
+ children answers 401 for it then.
1612
+ - `deadline_at`, while `running`: the latest instant that work may still spend on the key. It is the later of the
1613
+ compile turn's start plus its 10 minute timeout and each child's start plus 30 minutes, and it only moves later. The
1614
+ server cancels a child still at work at its 30 minutes, as a person's cancel is, and it then counts as ended. Set
1615
+ the key's expiry no earlier than `deadline_at` as a backstop for a missed read; `state` stays the signal to revoke on.
1616
+ - A purge of the run (`DELETE /v2/runs/{run_id}`) while its check's replays still run cancels them and erases their
1617
+ copies first, and answers only once they have ended: after a 204 nothing spends on the key. A live shadow audit
1618
+ refuses the purge (409 `run_not_final`), as any run made from it does.
1619
+ - What those runs spend is the run's own learning: its `cost.learning_usd`, with the replays as `cost.check_usd` and
1620
+ the shadow as `cost.shadow_usd`, never a workflow revision's spend.
1584
1621
 
1585
1622
  | Spend | With the run's key | Server holds no key, run brought none |
1586
1623
  | --- | --- | --- |
1587
- | A shadow audit, a learned workflow's replay check | Skipped, logged | Skipped, logged |
1624
+ | A shadow audit, a learned workflow's replay check | On a sealed copy of the run's key, at its end, within its cap's room (listed in `learning_work`) | Skipped, logged |
1588
1625
  | A grade's feedback round (`PUT /runs/{id}/grade`) | A new turn with no key: the server's, else not opened | Not opened; the grade is kept |
1589
1626
  | An owner's replay, an SDK run's compile turn | Tied to no run's key | 409 or skipped, in words |
1590
1627
  | A trigger's firing | Starts a run with no key | 422 `model_key_required` for the firing |
@@ -1848,7 +1885,11 @@ has the row **Use Claude Code's login on this machine**, over these routes:
1848
1885
  CLI said. Each removal stands alone: one that fails is named in the answer and the rest still happen. It answers
1849
1886
  `{ "confirmed": true, "login": <the view, off> }`; `confirmed` false adds a `message` saying what may remain: the
1850
1887
  CLI didn't confirm its own sign-out, or its step failed, named (on macOS its Keychain item may remain), or a file it
1851
- could not remove, by path. The CLI's sign-out runs where the folder is already gone too, so a retry after an
1888
+ could not remove, by path, or, on macOS, an older Keychain item a sign-in left under the account `unknown`, which
1889
+ holds a refresh token and which the sign-out deletes too, could not be removed, with how to delete that item alone:
1890
+ its exact service, `Claude Code-credentials-` and 8 hex of AgentRun's folder, to search in Keychain Access, and the
1891
+ one `security delete-generic-password -a unknown -s "<that service>"` command. The words never name the bare
1892
+ `Claude Code-credentials`, the person's own CLI's item. The CLI's sign-out runs where the folder is already gone too, so a retry after an
1852
1893
  unconfirmed sign-out confirms only where the CLI does. The next turn-on reads `signed_out` and the sign-in starts as
1853
1894
  before. `<data>/claude-login`
1854
1895
  is a folder AgentRun keeps itself: a turn-on where it is a link is refused, and a sign-out that finds a link there
@@ -2276,19 +2317,32 @@ off for a run, `web_search` answers `search is unavailable for the rest of this
2276
2317
  sees the URL, its query string included, so a token in a URL's query goes to Firecrawl with it. A URL first passes the
2277
2318
  guard's own check, and one it refuses (a private, loopback, link-local or intranet address, a name that resolves to one,
2278
2319
  or a URL holding a user name or password) is refused as the guarded direct fetch refuses it, and never sent to Firecrawl,
2279
- to Exa or to Parallel. To keep every URL on the server, pick `kernel` for `web_fetch`, or hold a Parallel key, where
2280
- `auto` is the guarded direct fetch. A server's pick is the default only, an agent's own `tool_settings` (an imported
2320
+ to Exa or to Parallel. To keep every URL on the server, pick `kernel` for `web_fetch` (with a Parallel key, `auto`
2321
+ is Parallel's extract, which sends Parallel each URL). A server's pick is the default only, an agent's own `tool_settings` (an imported
2281
2322
  template's among them) over it, except for these. The server's `kernel` for `web_fetch`, and its `native` or `off` for
2282
2323
  `web_search`, are a ceiling: an agent's pick of `firecrawl-keyless`, `exa-keyless`, `auto` or `parallel` resolves as the
2283
2324
  server's setting does, so nothing goes to Firecrawl, to Exa or to Parallel, and capabilities' `why` says so ("the
2284
- server's setting, kernel, is a ceiling over this agent's pick of auto"). Under `off`, an agent's `native` is off too;
2325
+ server's setting, kernel, is a ceiling over this agent's pick of auto"). An agent's own view (`GET /agents/{agent_id}`,
2326
+ its `tools`) keeps the agent's pick as `provider`, shows what runs as `resolved`, and names the server's setting that
2327
+ capped it as `ceiling`. Under `off`, an agent's `native` is off too;
2285
2328
  under `native`, it is the ceiling's own. To let agents use Parallel, set `parallel` server-wide; any server pick but
2286
2329
  these three (`auto`, `firecrawl-keyless`, `exa-keyless`, `parallel`) is only a default an agent's pick replaces. A
2287
2330
  server's `deny` is absolute: set `web_fetch` or `web_search` to `deny` to refuse every agent's calls, whatever it picks.
2288
2331
  A server setting applies at a run's next claim (its start, a follow-up, a resume or a reclaim): a claim keeps the plane
2289
- it began with to its end, through any approval it waits on while it holds the run. Tool settings a claim cannot read
2290
- fail closed: a capability kept on a keyless service or on Parallel runs nothing, its tool saying the settings could not
2291
- be read.
2332
+ it began with to its end, through any approval it waits on while it holds the run. `deny` is read at each call, so it
2333
+ is the setting that stops a claim already running. Tool settings a claim cannot read fail closed: a capability kept on a
2334
+ keyless service or on Parallel runs nothing, its tool saying the settings could not be read.
2335
+
2336
+ The ceiling covers `web_search` and `web_fetch`, not every way a run reaches the web:
2337
+ - `browser` sends each URL to its provider, and `bash` (`curl`) and MCP or catalog tools reach the web on their own; set
2338
+ them to `deny` to stop them.
2339
+ - Jev, where it is on, sends a kernel fetch's page text, or a native pi search's query and result URLs, to TypeSafe;
2340
+ `AGENTRUN_WEB_JEV_OFF=1` turns it off.
2341
+ - A workflow's typed questions on the `parallel` decision provider send the workflow's state to Parallel, which answers
2342
+ from live web research, whatever `web_search` says. A server `deny` on `parallel` refuses it to learned workflows; a
2343
+ workflow agent's own decision nodes run on it wherever the server holds `PARALLEL_API_KEY`.
2344
+ - A native job runs the user's own Claude Code or Codex CLI with that CLI's own configuration, which these settings do
2345
+ not reach.
2292
2346
 
2293
2347
  A `web_fetch` through keyless Firecrawl takes at most about 95 s: up to 30 s for the guard's check of the URL, 30 s for
2294
2348
  Firecrawl, then, where Firecrawl gives no page, the guarded fetch's 30 s and 5 s to read the page.
@@ -3850,6 +3904,10 @@ serves these routes alone:
3850
3904
  - a run's usage lines (`GET /runs/{id}/usage`): what its `cost.usd` joins, by meter, cut of the host's secrets as the
3851
3905
  run's read is;
3852
3906
  - its files (`GET /runs/{id}/files`, `GET /runs/{id}/files/{path}`) and [uploads](#uploads) (`/files`);
3907
+ - an ended run's share bundle (`GET /runs/{id}/export`, with its `?restore=`), the `agentrun.share/1` document the full
3908
+ server answers, cut by the same scrubber: `409` before the run ends. A workflow run's bundle carries its graph, cut,
3909
+ where `GET /runs/{id}/graph` stays refused. The share preview page (`/share/{run}`) is the console's, refused here:
3910
+ `agentrun share RUN --out FILE` writes the bundle;
3853
3911
  - an agent's Archil disk (`GET` and `DELETE /agents/{id}/archil`);
3854
3912
  - the [delete of an agent another system owns](#deleting-an-agent-another-system-owns) (`DELETE /agents/{id}`), for
3855
3913
  the backend whose inline runs made it;
@@ -3989,6 +4047,53 @@ whole server, as before; any value other than these and `1` or `true` stops the
3989
4047
  So on an API-only server a run is launched inline (`POST /runs` with its definition), on an agent a template's apply
3990
4048
  made, or on an agent made before the profile was turned on.
3991
4049
 
4050
+ ### Share host
4051
+
4052
+ `agentrun-serve --share-host` (or `AGENTRUN_SHARE_HOST=1`) is the server behind a public share link such as
4053
+ `https://agentrun.ai/r/<id>`. It answers under `/r/` alone, so a site in front of it routes one path to it:
4054
+
4055
+ - `/r/<id>`: the share's page, the console's `share.html`, with its asset URLs under `/r/_assets/` and a CSP that loads
4056
+ nothing from another origin;
4057
+ - `/r/<id>/bundle.json`: the bytes that were uploaded, exactly (`nosniff`, `X-Robots-Tag: noindex`);
4058
+ - `POST /r/v2/shares`: stores a run's `agentrun.share/1` bundle (`GET /v2/runs/{id}/export`'s body) and answers
4059
+ `201 {id, url, sha256}`;
4060
+ - `GET /r/v2/shares`: the caller's own shares and its quota; `DELETE /r/v2/shares/<id>`: deletes one;
4061
+ - `GET /r/v2/health`: without a credential.
4062
+
4063
+ Every other address is `404 not_found`, answered before the request is read further: the console, `/v2`, MCP and
4064
+ every run, agent, key, computer and trigger route. It starts no runner and has no owner, accounts or console session.
4065
+ Its API takes one of its tokens (`AGENTRUN_TOKENS`, `id:secret` entries) as a Bearer header: the token's id owns the
4066
+ shares it uploads.
4067
+
4068
+ An upload is checked in this order, and refused with nothing stored at the first failure: the token; its quota (100
4069
+ shares a token, `403 forbidden` with `details.reason: share_quota`; shares never expire, and a delete makes room); the
4070
+ body, at most 8 MiB of canonical JSON (`413` over it); the bundle's closed fields and the export's caps, each file's size
4071
+ and digest, and the document's sha256 (`400`); then the scrubber in cut mode, with the values this host holds (its keys and
4072
+ tokens), over the whole body and over each of its strings alone. A value the scrubber finds is refused unless the bundle
4073
+ declares it restored: a `restored` record naming it exactly (its string's pointer, rule, start and end) and a kind the
4074
+ host's own scrub says may be restored (label, personal, jev; never a key format, a held value or a dump, whatever the
4075
+ record says). Each refusal is `422 input_invalid` with `details.reason` and counts by rule id, never a value:
4076
+ `scrub_found` (a value no restore declares), `restored_unmatched` (a restored record naming no value the host finds: a
4077
+ stale or edited bundle) or `scrub_failed` (the scrub failed or threw). The one record taken unchecked is a restore of
4078
+ Jev's rule (Scrubber beta 3): the host never runs Jev, so it can't find that value, and the answer counts such records
4079
+ in `restored_unchecked`; the value is still scrubbed by every other rule, and a hit there needs its own record.
4080
+
4081
+ The bounds on what one upload asks of the host: the body is at most 8 MiB (`413` past it, from its `Content-Length`
4082
+ before a byte is read), the scrubber reads that body once whole, and then reads each distinct string alone, at most
4083
+ 50,000 of them (`SHARE_STRINGS`; `413` with `details.reason: share_strings` past it, before any scrub), which together
4084
+ hold no more than the body. The host never repairs a bundle:
4085
+ what it serves is what was uploaded and scanned. Shares are kept in `DIR/shares/<id>/` (`bundle.json` and `meta.json`,
4086
+ `0600`). Only the token that made a share deletes it (`204`); its bytes go, and its page and bundle then answer `410`.
4087
+
4088
+ A share's URL is on `AGENTRUN_PUBLIC_URL`, never a request's Host header. A share host on an address other than
4089
+ loopback refuses to start without it.
4090
+
4091
+ Not yet checked: the share page drawn in a real browser. Its HTML, CSP and every asset it references were fetched from a
4092
+ real console build on a loopback share host; the page's own reads are covered by the console's unit tests.
4093
+
4094
+ Run one replica, with `DIR` on a persistent volume. The quota and the share index are kept by the one process (a
4095
+ second replica would neither see the other's shares nor hold the quota), and a share lives only in `DIR`.
4096
+
3992
4097
  ### Launch hook
3993
4098
 
3994
4099
  For an install that hosts agents for other people, where the host decides who pays for each run and with which keys,
@@ -4300,7 +4405,9 @@ A module exports `entries(builtins, kit)`, which returns new entries by id. [HAR
4300
4405
  writing one, and [examples/harness-module](../../examples/harness-module/README.md) is a whole one.
4301
4406
 
4302
4407
  An entry made without `kit` gives `label`, `steer`, `runMib`, `oneAlwaysFits`, `runs`, `onWire`, `model`, `priceModel`,
4303
- `refusal` and its `runner`, and may give `promises`; a run of it runs on its runner's `adapter(launch, extra)`. Every
4408
+ `refusal` and its `runner`, and may give `promises`; a run of it runs on its runner's `adapter(launch, extra)`, where
4409
+ `launch.redact` is the run's redactor (required: it holds every key the run's claim opens) and `extra` the harness's
4410
+ own options. Every
4304
4411
  harness is admitted by the `runMib` its entry declares. A module adds harnesses and never replaces one: the built-in
4305
4412
  harnesses' facts, offers, key rows, default models and tool names are the same with any module loaded. The start of the
4306
4413
  server, or of a separate runner, is refused, naming the module and the id, when a module:
@@ -5242,6 +5349,7 @@ is unpriced.
5242
5349
  seconds between the end's booking and its delete included), and one whose delete failed run on with no claim to hold
5243
5350
  them. Their time is on the usage read (`unheld_quantity`, and the
5244
5351
  interval's `booked_seconds` beside its life) but in no cap and no cost: check `computer_intervals` for such a computer.
5352
+ On a provider that bills nothing (Docker) both are 0: its time costs nothing, held or not.
5245
5353
  A computer a later claim takes back is held again from then on.
5246
5354
  - A run whose process keeps no ledger here (a runner of its own with no run ledger) holds and books nothing, as if
5247
5355
  unpriced.
package/dist/adapters.js CHANGED
@@ -14,6 +14,7 @@ import { CLAUDE_SDK, codexBinaryIn, HarnessNotInstalled, installDirOf, installLi
14
14
  import { commandData } from "./harness-owned.js";
15
15
  import { DATA_ENV, defaultData } from "./files.js";
16
16
  import { harnessOf, onAdapter } from "./harness-table.js";
17
+ import { OLLAMA_PROVIDER } from "./ollama-provider.js";
17
18
  import { HarnessUnavailable, heldRefusedProvider, providerFor } from "./provider.js";
18
19
  import { keyShaped } from "./secret-cut.js";
19
20
  import { servedSkills } from "./learn/workflow-draft.js";
@@ -412,8 +413,9 @@ export async function claudeOf(env, needs, load = loadClaude, sdkOf = (version,
412
413
  // whoever bills it (its priceModel).
413
414
  const endpoint = provider ? { origin: provider.origin, credential: provider.credential, auth: provider.auth, ...(provider.headers ? { headers: provider.headers } : {}) } : { origin: "", credential: () => "" };
414
415
  // A model the route translates onto the wire (an Ollama model): its proxy forwards with the route's own fetch, and the
415
- // provider's own web search (nativeOptions), which the translation cannot run, is not offered.
416
- const forward = provider?.fetch ? { fetch: provider.fetch } : {};
416
+ // provider's own web search (nativeOptions), which the translation cannot run, is not offered. One on this machine says
417
+ // nothing while it loads, reads its prompt or thinks, so the CLI waits it out (the runner's route.local reads the same).
418
+ const forward = provider?.fetch ? { fetch: provider.fetch, ...(provider.priceModel.provider === OLLAMA_PROVIDER ? { streamIdleMs: claude.LOCAL_STREAM_IDLE_MS } : {}) } : {};
417
419
  const priced = provider ? { ...needs, model: provider.priceModel } : native;
418
420
  // Its CLI checked off the event loop first (hashed and run as a child), so the server goes on answering: a pass is
419
421
  // kept, and the adapter's own check answers from it. A CLI that fails its pins is the adapter's to report, in its
@@ -71,9 +71,9 @@ export declare function purgeAgent(host: AgentDeleteHost, agentId: string): Prom
71
71
  /** The setting that marks agent `agentId`'s purge begun and not finished (purgeAgent). */
72
72
  export declare const purgingKey: (agentId: string) => string;
73
73
  /** Purges run `runId` with every run made from it, as the header says. 404 not_found when it is not there; 409
74
- * run_not_final, nothing purged, while it or a run made from it is live. A purged run's only work is forgetCopies again,
75
- * which finds nothing left once a purge finished it; its store scrub was marked before the purge changed a row
76
- * (sqlite/store.ts #purging). */
74
+ * run_not_final, nothing purged, while it or a run made from it is live. Its learning work still going is ended first
75
+ * (endLearningWork). A purged run's only work is forgetCopies again, which finds nothing left once a purge finished it;
76
+ * its store scrub was marked before the purge changed a row (sqlite/store.ts #purging). */
77
77
  export declare function purgeRun(host: AgentDeleteHost, runId: string): Promise<void>;
78
78
  /** One delete of an agent at a time: a second DELETE of the same agent waits for the first, then finds it gone (404) or
79
79
  * finishes what the first left. `queued`, a test's seam: told each time a work waits behind another of its agent's,
@@ -18,7 +18,9 @@
18
18
  // agent kept and refusing runs. A trigger that reached it anyway keeps its row (store TriggersLeft): the same 503.
19
19
  import { ApiError } from "./errors.js";
20
20
  import { LearningInFlight } from "./learn/delete.js";
21
- import { FINAL_STATES, RunsMadeFromLeft, StoreConstraint, TriggersLeft } from "./store/index.js";
21
+ import { learningChildrenOf } from "./learning-work.js";
22
+ import { sendCommand } from "./runner/commands.js";
23
+ import { FINAL_STATES, RunFinal, RunsMadeFromLeft, StoreConstraint, TriggersLeft } from "./store/index.js";
22
24
  import { forgetServed } from "./store-view.js";
23
25
  import { requireSourceIOIdle } from "./source-sync/io.js";
24
26
  const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
@@ -95,12 +97,55 @@ export async function purgeAgent(host, agentId) {
95
97
  // Its tombstone refuses every write from here (410 purged).
96
98
  await host.store.settings.remove(purgingKey(agentId));
97
99
  }
100
+ /** Run `runId`'s learning work still going, ended before anything of the run is purged: the replay runs of its learned
101
+ * workflow's check (learning-work.ts names them), which are made from the runs whose input they replay, never from it,
102
+ * so neither its live check nor the store's purge waits for them. Its caller reads the run's `learning_work` to know
103
+ * when the run's own model key may be revoked, and a purged run reads nothing: so each one still going has its sealed
104
+ * launch secrets (its copy of the run's key, its handed MCP credentials) erased in the same store write as its cancel
105
+ * (runs.command's launchSealed), no claim of it from here opening a key, and is waited for until it is final and let go,
106
+ * its spend booked. Each child is named in the run's record before it is created, under the run's own claim
107
+ * (runner/promotion.ts startReplay, runner/audit.ts startAudit; a keyed one is never relaunched), and this runs only once
108
+ * that claim let the run go (liveOf): none starts after it. Its audit's shadow is made from it, so a live one refused
109
+ * the purge above (409) and none is here. One not ended by the wait's end refuses the purge with 409 run_not_final,
110
+ * nothing of the run purged; its cancel stands, and the next DELETE finds it ended. */
111
+ async function endLearningWork(host, runId) {
112
+ const going = async () => {
113
+ const out = [];
114
+ for (const child of await learningChildrenOf(host.store.settings, runId)) {
115
+ if (child.run === null || out.includes(child.run))
116
+ continue;
117
+ const row = await host.store.runs.get(child.run);
118
+ if (row && row.purgedAt === null && isLive(row))
119
+ out.push(child.run);
120
+ }
121
+ return out;
122
+ };
123
+ let live = await going();
124
+ if (!live.length)
125
+ return;
126
+ for (const id of live) {
127
+ try {
128
+ await sendCommand(host.store, id, { kind: "cancel", body: {} }, { launchSealed: () => null });
129
+ }
130
+ catch (error) {
131
+ // Final already: the write that ended it erased its secrets with it.
132
+ if (!(error instanceof RunFinal))
133
+ throw error;
134
+ }
135
+ }
136
+ const deadline = Date.now() + host.waitMs;
137
+ while ((live = await going()).length && Date.now() < deadline)
138
+ await sleep(host.pollMs);
139
+ if (live.length) {
140
+ throw liveRuns(`The run ${runId}'s learning work was cancelled and has not ended yet (${live.join(", ")}): send the DELETE again once ${live.length === 1 ? "it has" : "they have"} ended. Nothing was purged.`, live);
141
+ }
142
+ }
98
143
  /** The setting that marks agent `agentId`'s purge begun and not finished (purgeAgent). */
99
144
  export const purgingKey = (agentId) => `agent.purging.${agentId}`;
100
145
  /** Purges run `runId` with every run made from it, as the header says. 404 not_found when it is not there; 409
101
- * run_not_final, nothing purged, while it or a run made from it is live. A purged run's only work is forgetCopies again,
102
- * which finds nothing left once a purge finished it; its store scrub was marked before the purge changed a row
103
- * (sqlite/store.ts #purging). */
146
+ * run_not_final, nothing purged, while it or a run made from it is live. Its learning work still going is ended first
147
+ * (endLearningWork). A purged run's only work is forgetCopies again, which finds nothing left once a purge finished it;
148
+ * its store scrub was marked before the purge changed a row (sqlite/store.ts #purging). */
104
149
  export async function purgeRun(host, runId) {
105
150
  const run = await host.store.runs.get(runId);
106
151
  if (!run)
@@ -111,6 +156,7 @@ export async function purgeRun(host, runId) {
111
156
  const live = await liveOf(host, [run, ...made]);
112
157
  if (live.length)
113
158
  throw notFinal(runId, live);
159
+ await endLearningWork(host, runId);
114
160
  for (const one of made)
115
161
  await purgeOneOrRefuse(host, one.agentId, one.id, runId, true);
116
162
  await host.at?.("run_made_from_gone", runId);
@@ -11,6 +11,10 @@ import type { Route } from "./server.js";
11
11
  * - a backend reads what its agents learned (loop, promotions, audits, cost per run, a run's learning), cut as the
12
12
  * console's, and resets it (deleteAgentLearning: the agent and its runs kept) when it erases what an agent learned;
13
13
  * - a run's usage lines (what its cost.usd joins, by meter) are a read of that run alone, cut as the run's read is;
14
+ * - a backend shares a run it ran (getRunExport, run-export.ts): an ended run's agentrun.share/1 bundle, every string
15
+ * cut by the scrubber as on the full server, its ?restore= a stateless re-export of cuts a preview may restore. A
16
+ * workflow run's bundle carries its graph, cut, though getRunGraph stays refused here; the share page (/share/{run})
17
+ * is the console's, refused with the rest of it;
14
18
  * - an operator or a scaler reads the runners' capacity (getCapacity, capacity.ts) from the server whose runners run apart;
15
19
  * - a backend reads the saved MCP servers' names (listMcpServerNames), never a URL or a credential;
16
20
  * - a backend uploads an agent's package (importTemplate, as {files} alone: a GitHub source is refused in this profile's