@parcha/agentrun-serve 0.1.0-beta.61 → 0.1.0-beta.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/README.md +102 -13
- package/dist/api-only.d.ts +4 -0
- package/dist/api-only.js +5 -1
- package/dist/archil-settings.d.ts +9 -0
- package/dist/archil-settings.js +8 -1
- package/dist/bash-read-only.d.ts +3 -0
- package/dist/bash-read-only.js +6 -3
- package/dist/chatgpt-plan.d.ts +26 -8
- package/dist/chatgpt-plan.js +89 -21
- package/dist/claude-login.d.ts +12 -5
- package/dist/claude-login.js +28 -3
- package/dist/cli.js +19 -8
- package/dist/composio-triggers.d.ts +9 -3
- package/dist/computers.d.ts +3 -0
- package/dist/computers.js +2 -1
- package/dist/console/assets/{backend-C9ffXUR5.js → backend-DEgVn5lC.js} +1 -1
- package/dist/console/assets/index-CG5tELph.js +639 -0
- package/dist/console/assets/share-CIeFK2Oe.js +6 -0
- package/dist/console/assets/{styles-fjQBFfMv.css → styles-D0SufbzK.css} +1 -1
- package/dist/console/index.html +3 -3
- package/dist/console/share.html +3 -3
- package/dist/cut-pool.d.ts +14 -0
- package/dist/cut-pool.js +98 -0
- package/dist/cut-worker.d.ts +14 -0
- package/dist/cut-worker.js +16 -0
- package/dist/decisions.d.ts +4 -0
- package/dist/decisions.js +9 -1
- package/dist/env-switch.d.ts +3 -0
- package/dist/env-switch.js +3 -0
- package/dist/harness-table.d.ts +7 -0
- package/dist/harness-table.js +6 -3
- package/dist/import.d.ts +8 -1
- package/dist/import.js +36 -5
- package/dist/key-check.js +22 -8
- package/dist/learned-nodes.d.ts +2 -1
- package/dist/learned-nodes.js +2 -1
- package/dist/mcp-gateway.d.ts +24 -0
- package/dist/mcp-gateway.js +97 -8
- package/dist/mcp-servers-store.d.ts +7 -10
- package/dist/mcp-servers-store.js +15 -9
- package/dist/native/cli.js +5 -1
- package/dist/ollama-provider.d.ts +10 -3
- package/dist/ollama-provider.js +17 -7
- package/dist/openapi.js +29 -12
- package/dist/otel/tracer.d.ts +6 -3
- package/dist/otel/tracer.js +24 -6
- package/dist/page.d.ts +7 -0
- package/dist/page.js +17 -4
- package/dist/place.d.ts +25 -9
- package/dist/place.js +37 -11
- package/dist/print.d.ts +3 -2
- package/dist/print.js +8 -6
- package/dist/run-launch.js +16 -3
- package/dist/run-model-key.d.ts +2 -1
- package/dist/run-model-key.js +2 -1
- package/dist/run-reads-over-store.d.ts +7 -0
- package/dist/run-reads-over-store.js +32 -4
- package/dist/runnable.d.ts +6 -3
- package/dist/runnable.js +16 -6
- package/dist/runner/adapter-loop.js +64 -25
- package/dist/runner/adapter-run-spec.d.ts +6 -1
- package/dist/runner/adapter-run-spec.js +14 -11
- package/dist/runner/adapters/index.d.ts +4 -0
- package/dist/runner/adapters/index.js +2 -1
- package/dist/runner/claim-secrets.d.ts +3 -1
- package/dist/runner/claim-secrets.js +18 -7
- package/dist/runner/cli-run-spec.js +12 -8
- package/dist/runner/dispatch.js +2 -0
- package/dist/runner/harness-loops.d.ts +5 -0
- package/dist/runner/harness-loops.js +4 -1
- package/dist/runner/live-ticker.js +3 -1
- package/dist/runner/loop-contract.d.ts +4 -1
- package/dist/runner/mcp-run.d.ts +5 -0
- package/dist/runner/mcp-run.js +18 -0
- package/dist/runner/meta-tools.js +4 -4
- package/dist/runner/metrics.d.ts +4 -2
- package/dist/runner/metrics.js +5 -3
- package/dist/runner/native-loop.js +2 -2
- package/dist/runner/run-child-host.d.ts +10 -6
- package/dist/runner/run-child-host.js +44 -29
- package/dist/runner/run-child.js +1 -0
- package/dist/runner/runner.js +2 -0
- package/dist/runner/workflow-calls.d.ts +4 -3
- package/dist/runner/workflow-calls.js +41 -12
- package/dist/runner/workflow-spec.js +1 -1
- package/dist/secret-rules.d.ts +0 -1
- package/dist/secret-rules.js +25 -5
- package/dist/server.d.ts +10 -1
- package/dist/server.js +114 -38
- package/dist/share-host.d.ts +111 -0
- package/dist/share-host.js +666 -0
- package/dist/store-reads/analytics.d.ts +15 -0
- package/dist/store-reads/analytics.js +17 -0
- package/dist/suggestions.js +32 -3
- package/dist/templates.d.ts +3 -1
- package/dist/templates.js +7 -3
- package/dist/tool-gate.d.ts +25 -9
- package/dist/tool-gate.js +58 -19
- package/dist/tool-plane.d.ts +1 -0
- package/dist/tool-plane.js +6 -2
- package/dist/trigger-composio.js +1 -1
- package/dist/webhooks.d.ts +3 -0
- package/dist/webhooks.js +5 -0
- package/dist/workspace/archil-claim.d.ts +7 -3
- package/dist/workspace/archil-claim.js +13 -5
- package/dist/workspace/archil-mount-credential.d.ts +6 -0
- package/dist/workspace/archil-mount-credential.js +11 -0
- package/dist/workspace/computer-deps.d.ts +5 -3
- package/dist/workspace/computer-deps.js +11 -9
- package/dist/workspace/computer-for-claim.d.ts +6 -2
- package/dist/workspace/computer-for-claim.js +43 -12
- package/dist/workspace/computer-janitor.d.ts +7 -4
- package/dist/workspace/computer-janitor.js +7 -4
- package/dist/workspace/computer-kept.d.ts +7 -1
- package/dist/workspace/computer-kept.js +7 -1
- package/dist/workspace/kind-skills/desktop/SKILL.md +12 -3
- package/dist/workspace/mount-revoke-left.d.ts +16 -4
- package/dist/workspace/mount-revoke-left.js +42 -22
- package/dist/workspace/resolve-computer.d.ts +11 -5
- package/dist/workspace/resolve-computer.js +22 -13
- package/dist/workspace/run-end-computers.js +1 -1
- package/dist/workspace/run-tools.d.ts +10 -3
- package/dist/workspace/run-tools.js +5 -4
- package/dist/wrapped.d.ts +29 -2
- package/dist/wrapped.js +20 -3
- package/launcher/agentrun-serve +1 -1
- package/package.json +12 -12
- package/dist/console/assets/index-BnZV3lvW.js +0 -639
- package/dist/console/assets/share-B1o5mJ56.js +0 -6
- /package/dist/console/assets/{styles-D_znYrHR.js → styles-BGZxYkky.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,72 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## 0.1.0-beta.62 (2026-11-26)
|
|
6
|
+
|
|
7
|
+
**Breaking:**
|
|
8
|
+
|
|
9
|
+
- 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 -->
|
|
10
|
+
- 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 -->
|
|
11
|
+
- 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.
|
|
12
|
+
|
|
13
|
+
**Changes:**
|
|
14
|
+
|
|
15
|
+
- 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 -->
|
|
16
|
+
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.
|
|
17
|
+
- `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 -->
|
|
18
|
+
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.
|
|
19
|
+
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.
|
|
20
|
+
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.
|
|
21
|
+
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.
|
|
22
|
+
- 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 -->
|
|
23
|
+
- `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.
|
|
24
|
+
- 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.
|
|
25
|
+
- `@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.
|
|
26
|
+
- 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 -->
|
|
27
|
+
- 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 -->
|
|
28
|
+
- 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 -->
|
|
29
|
+
- 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 -->
|
|
30
|
+
- 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 -->
|
|
31
|
+
- 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.
|
|
32
|
+
- 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.
|
|
33
|
+
- 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.
|
|
34
|
+
- 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 -->
|
|
35
|
+
- 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 -->
|
|
36
|
+
- 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 -->
|
|
37
|
+
- 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 -->
|
|
38
|
+
- 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.
|
|
39
|
+
- 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.
|
|
40
|
+
- The pull's long-line error now says characters, as it counts, not bytes.
|
|
41
|
+
- 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.
|
|
42
|
+
- 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 -->
|
|
43
|
+
- 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 -->
|
|
44
|
+
- 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 -->
|
|
45
|
+
- 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 -->
|
|
46
|
+
- 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 -->
|
|
47
|
+
- 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 -->
|
|
48
|
+
- 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 -->
|
|
49
|
+
- 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 -->
|
|
50
|
+
- 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 -->
|
|
51
|
+
- 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.
|
|
52
|
+
- 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.
|
|
53
|
+
- 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`.
|
|
54
|
+
- 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`).
|
|
55
|
+
- 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.
|
|
56
|
+
- `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.
|
|
57
|
+
- `@parcha/agentrun-computer` exports `httpsBase`, and `keyBase`, the same rule over a list of schemes.
|
|
58
|
+
- 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`.
|
|
59
|
+
- 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.
|
|
60
|
+
- 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 -->
|
|
61
|
+
- 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 -->
|
|
62
|
+
- 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.
|
|
63
|
+
- 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.
|
|
64
|
+
- 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.
|
|
65
|
+
- 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 -->
|
|
66
|
+
- 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 -->
|
|
67
|
+
- 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 -->
|
|
68
|
+
- 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 -->
|
|
69
|
+
- 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 -->
|
|
70
|
+
|
|
5
71
|
## 0.1.0-beta.61 (2026-11-26)
|
|
6
72
|
|
|
7
73
|
**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,21 @@ 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
|
|
1024
|
-
|
|
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. An op the gate refuses whatever its arguments is not offered:
|
|
1033
|
+
`computer_op`'s op list and the script's `computer` declarations leave out an op whose tool the agent is not given, one
|
|
1034
|
+
held to a tool set to deny, one held to a tool set to ask on a server where no one can approve, and one `bash`'s policy
|
|
1035
|
+
refuses whatever its command (`processes.start` under the read-only policy). Leaving `read` out
|
|
1036
|
+
keeps no file from an agent that has the shell, paired machines included: on a desktop with exec on,
|
|
1037
|
+
`computer.shell.run` reads and writes any file the desktop's user can, held to `bash`'s setting alone, which allows by
|
|
1038
|
+
default. To keep files from such an agent, set `bash` to deny or turn the desktop's exec off. Input ops on a desktop
|
|
1039
|
+
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
|
|
1040
|
+
do, whatever `bash`'s, `read`'s or `write`'s setting: to deny that, don't grant input ops or apps on that desktop, or
|
|
1041
|
+
use an image with neither a terminal nor a file manager. A script's call of a computer tool answers the
|
|
1042
|
+
tool's value. Codex's code mode takes no binding of ours, so a Codex run is offered
|
|
1025
1043
|
`computer_op` beside the computer's tools and its scripts call them as nested calls, each answering the tool's value as
|
|
1026
1044
|
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
1045
|
client, each answer with its value as `structuredContent`.
|
|
@@ -1033,7 +1051,7 @@ is refused in words before the computer is asked. A screenshot with `save_as` is
|
|
|
1033
1051
|
it too, after the kind's deny: the stricter decides (`write` set to deny refuses it before the computer is asked, set to
|
|
1034
1052
|
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
1053
|
agent's tools: an agent not given `write` is not offered it, and the gate refuses one anyway whatever `write`'s setting
|
|
1036
|
-
says
|
|
1054
|
+
says, as a script's `computer.files.write` does. `save_as` is offered only
|
|
1037
1055
|
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
1056
|
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
1057
|
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 +1081,7 @@ seals it in its store as every saved key under `AGENTRUN_SEAL_KEY`, and register
|
|
|
1063
1081
|
key each restart, the old one left on the workspace), `MORPH_API_KEY`, `ORGO_API_KEY`, `PHONE_HARNESS_API_KEY`,
|
|
1064
1082
|
`BROWSERBASE_API_KEY` and `BROWSERBASE_PROJECT_ID`, `KERNEL_API_KEY`, `BOXD_API_KEY` (with `BOXD_ORG` and
|
|
1065
1083
|
`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 `
|
|
1084
|
+
`packages/computer/relays/cloudflare`), `FLY_API_TOKEN` and `FLY_APP`, and `RENDER_API_KEY` and `RENDER_WORKSPACE_ID`; Docker takes none.
|
|
1067
1085
|
`GET /v2/computers/running` lists every run still going (queued, working, paused or waiting on its person) whose agent
|
|
1068
1086
|
has a computer, newest first, each as `GET /v2/runs/{run_id}` answers it: its `computer` says the kind and provider,
|
|
1069
1087
|
`starting`, `ready` or `taken_over` while its owner drives it, and a held run's hold. The runs list carries no
|
|
@@ -1848,7 +1866,11 @@ has the row **Use Claude Code's login on this machine**, over these routes:
|
|
|
1848
1866
|
CLI said. Each removal stands alone: one that fails is named in the answer and the rest still happen. It answers
|
|
1849
1867
|
`{ "confirmed": true, "login": <the view, off> }`; `confirmed` false adds a `message` saying what may remain: the
|
|
1850
1868
|
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
|
|
1869
|
+
could not remove, by path, or, on macOS, an older Keychain item a sign-in left under the account `unknown`, which
|
|
1870
|
+
holds a refresh token and which the sign-out deletes too, could not be removed, with how to delete that item alone:
|
|
1871
|
+
its exact service, `Claude Code-credentials-` and 8 hex of AgentRun's folder, to search in Keychain Access, and the
|
|
1872
|
+
one `security delete-generic-password -a unknown -s "<that service>"` command. The words never name the bare
|
|
1873
|
+
`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
1874
|
unconfirmed sign-out confirms only where the CLI does. The next turn-on reads `signed_out` and the sign-in starts as
|
|
1853
1875
|
before. `<data>/claude-login`
|
|
1854
1876
|
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 +2298,32 @@ off for a run, `web_search` answers `search is unavailable for the rest of this
|
|
|
2276
2298
|
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
2299
|
guard's own check, and one it refuses (a private, loopback, link-local or intranet address, a name that resolves to one,
|
|
2278
2300
|
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
|
|
2280
|
-
|
|
2301
|
+
to Exa or to Parallel. To keep every URL on the server, pick `kernel` for `web_fetch` (with a Parallel key, `auto`
|
|
2302
|
+
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
2303
|
template's among them) over it, except for these. The server's `kernel` for `web_fetch`, and its `native` or `off` for
|
|
2282
2304
|
`web_search`, are a ceiling: an agent's pick of `firecrawl-keyless`, `exa-keyless`, `auto` or `parallel` resolves as the
|
|
2283
2305
|
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").
|
|
2306
|
+
server's setting, kernel, is a ceiling over this agent's pick of auto"). An agent's own view (`GET /agents/{agent_id}`,
|
|
2307
|
+
its `tools`) keeps the agent's pick as `provider`, shows what runs as `resolved`, and names the server's setting that
|
|
2308
|
+
capped it as `ceiling`. Under `off`, an agent's `native` is off too;
|
|
2285
2309
|
under `native`, it is the ceiling's own. To let agents use Parallel, set `parallel` server-wide; any server pick but
|
|
2286
2310
|
these three (`auto`, `firecrawl-keyless`, `exa-keyless`, `parallel`) is only a default an agent's pick replaces. A
|
|
2287
2311
|
server's `deny` is absolute: set `web_fetch` or `web_search` to `deny` to refuse every agent's calls, whatever it picks.
|
|
2288
2312
|
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.
|
|
2290
|
-
|
|
2291
|
-
be read.
|
|
2313
|
+
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
|
|
2314
|
+
is the setting that stops a claim already running. Tool settings a claim cannot read fail closed: a capability kept on a
|
|
2315
|
+
keyless service or on Parallel runs nothing, its tool saying the settings could not be read.
|
|
2316
|
+
|
|
2317
|
+
The ceiling covers `web_search` and `web_fetch`, not every way a run reaches the web:
|
|
2318
|
+
- `browser` sends each URL to its provider, and `bash` (`curl`) and MCP or catalog tools reach the web on their own; set
|
|
2319
|
+
them to `deny` to stop them.
|
|
2320
|
+
- Jev, where it is on, sends a kernel fetch's page text, or a native pi search's query and result URLs, to TypeSafe;
|
|
2321
|
+
`AGENTRUN_WEB_JEV_OFF=1` turns it off.
|
|
2322
|
+
- A workflow's typed questions on the `parallel` decision provider send the workflow's state to Parallel, which answers
|
|
2323
|
+
from live web research, whatever `web_search` says. A server `deny` on `parallel` refuses it to learned workflows; a
|
|
2324
|
+
workflow agent's own decision nodes run on it wherever the server holds `PARALLEL_API_KEY`.
|
|
2325
|
+
- A native job runs the user's own Claude Code or Codex CLI with that CLI's own configuration, which these settings do
|
|
2326
|
+
not reach.
|
|
2292
2327
|
|
|
2293
2328
|
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
2329
|
Firecrawl, then, where Firecrawl gives no page, the guarded fetch's 30 s and 5 s to read the page.
|
|
@@ -3850,6 +3885,10 @@ serves these routes alone:
|
|
|
3850
3885
|
- 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
3886
|
run's read is;
|
|
3852
3887
|
- its files (`GET /runs/{id}/files`, `GET /runs/{id}/files/{path}`) and [uploads](#uploads) (`/files`);
|
|
3888
|
+
- an ended run's share bundle (`GET /runs/{id}/export`, with its `?restore=`), the `agentrun.share/1` document the full
|
|
3889
|
+
server answers, cut by the same scrubber: `409` before the run ends. A workflow run's bundle carries its graph, cut,
|
|
3890
|
+
where `GET /runs/{id}/graph` stays refused. The share preview page (`/share/{run}`) is the console's, refused here:
|
|
3891
|
+
`agentrun share RUN --out FILE` writes the bundle;
|
|
3853
3892
|
- an agent's Archil disk (`GET` and `DELETE /agents/{id}/archil`);
|
|
3854
3893
|
- the [delete of an agent another system owns](#deleting-an-agent-another-system-owns) (`DELETE /agents/{id}`), for
|
|
3855
3894
|
the backend whose inline runs made it;
|
|
@@ -3989,6 +4028,53 @@ whole server, as before; any value other than these and `1` or `true` stops the
|
|
|
3989
4028
|
So on an API-only server a run is launched inline (`POST /runs` with its definition), on an agent a template's apply
|
|
3990
4029
|
made, or on an agent made before the profile was turned on.
|
|
3991
4030
|
|
|
4031
|
+
### Share host
|
|
4032
|
+
|
|
4033
|
+
`agentrun-serve --share-host` (or `AGENTRUN_SHARE_HOST=1`) is the server behind a public share link such as
|
|
4034
|
+
`https://agentrun.ai/r/<id>`. It answers under `/r/` alone, so a site in front of it routes one path to it:
|
|
4035
|
+
|
|
4036
|
+
- `/r/<id>`: the share's page, the console's `share.html`, with its asset URLs under `/r/_assets/` and a CSP that loads
|
|
4037
|
+
nothing from another origin;
|
|
4038
|
+
- `/r/<id>/bundle.json`: the bytes that were uploaded, exactly (`nosniff`, `X-Robots-Tag: noindex`);
|
|
4039
|
+
- `POST /r/v2/shares`: stores a run's `agentrun.share/1` bundle (`GET /v2/runs/{id}/export`'s body) and answers
|
|
4040
|
+
`201 {id, url, sha256}`;
|
|
4041
|
+
- `GET /r/v2/shares`: the caller's own shares and its quota; `DELETE /r/v2/shares/<id>`: deletes one;
|
|
4042
|
+
- `GET /r/v2/health`: without a credential.
|
|
4043
|
+
|
|
4044
|
+
Every other address is `404 not_found`, answered before the request is read further: the console, `/v2`, MCP and
|
|
4045
|
+
every run, agent, key, computer and trigger route. It starts no runner and has no owner, accounts or console session.
|
|
4046
|
+
Its API takes one of its tokens (`AGENTRUN_TOKENS`, `id:secret` entries) as a Bearer header: the token's id owns the
|
|
4047
|
+
shares it uploads.
|
|
4048
|
+
|
|
4049
|
+
An upload is checked in this order, and refused with nothing stored at the first failure: the token; its quota (100
|
|
4050
|
+
shares a token, `403 forbidden` with `details.reason: share_quota`; shares never expire, and a delete makes room); the
|
|
4051
|
+
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
|
|
4052
|
+
and digest, and the document's sha256 (`400`); then the scrubber in cut mode, with the values this host holds (its keys and
|
|
4053
|
+
tokens), over the whole body and over each of its strings alone. A value the scrubber finds is refused unless the bundle
|
|
4054
|
+
declares it restored: a `restored` record naming it exactly (its string's pointer, rule, start and end) and a kind the
|
|
4055
|
+
host's own scrub says may be restored (label, personal, jev; never a key format, a held value or a dump, whatever the
|
|
4056
|
+
record says). Each refusal is `422 input_invalid` with `details.reason` and counts by rule id, never a value:
|
|
4057
|
+
`scrub_found` (a value no restore declares), `restored_unmatched` (a restored record naming no value the host finds: a
|
|
4058
|
+
stale or edited bundle) or `scrub_failed` (the scrub failed or threw). The one record taken unchecked is a restore of
|
|
4059
|
+
Jev's rule (Scrubber beta 3): the host never runs Jev, so it can't find that value, and the answer counts such records
|
|
4060
|
+
in `restored_unchecked`; the value is still scrubbed by every other rule, and a hit there needs its own record.
|
|
4061
|
+
|
|
4062
|
+
The bounds on what one upload asks of the host: the body is at most 8 MiB (`413` past it, from its `Content-Length`
|
|
4063
|
+
before a byte is read), the scrubber reads that body once whole, and then reads each distinct string alone, at most
|
|
4064
|
+
50,000 of them (`SHARE_STRINGS`; `413` with `details.reason: share_strings` past it, before any scrub), which together
|
|
4065
|
+
hold no more than the body. The host never repairs a bundle:
|
|
4066
|
+
what it serves is what was uploaded and scanned. Shares are kept in `DIR/shares/<id>/` (`bundle.json` and `meta.json`,
|
|
4067
|
+
`0600`). Only the token that made a share deletes it (`204`); its bytes go, and its page and bundle then answer `410`.
|
|
4068
|
+
|
|
4069
|
+
A share's URL is on `AGENTRUN_PUBLIC_URL`, never a request's Host header. A share host on an address other than
|
|
4070
|
+
loopback refuses to start without it.
|
|
4071
|
+
|
|
4072
|
+
Not yet checked: the share page drawn in a real browser. Its HTML, CSP and every asset it references were fetched from a
|
|
4073
|
+
real console build on a loopback share host; the page's own reads are covered by the console's unit tests.
|
|
4074
|
+
|
|
4075
|
+
Run one replica, with `DIR` on a persistent volume. The quota and the share index are kept by the one process (a
|
|
4076
|
+
second replica would neither see the other's shares nor hold the quota), and a share lives only in `DIR`.
|
|
4077
|
+
|
|
3992
4078
|
### Launch hook
|
|
3993
4079
|
|
|
3994
4080
|
For an install that hosts agents for other people, where the host decides who pays for each run and with which keys,
|
|
@@ -4300,7 +4386,9 @@ A module exports `entries(builtins, kit)`, which returns new entries by id. [HAR
|
|
|
4300
4386
|
writing one, and [examples/harness-module](../../examples/harness-module/README.md) is a whole one.
|
|
4301
4387
|
|
|
4302
4388
|
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)
|
|
4389
|
+
`refusal` and its `runner`, and may give `promises`; a run of it runs on its runner's `adapter(launch, extra)`, where
|
|
4390
|
+
`launch.redact` is the run's redactor (required: it holds every key the run's claim opens) and `extra` the harness's
|
|
4391
|
+
own options. Every
|
|
4304
4392
|
harness is admitted by the `runMib` its entry declares. A module adds harnesses and never replaces one: the built-in
|
|
4305
4393
|
harnesses' facts, offers, key rows, default models and tool names are the same with any module loaded. The start of the
|
|
4306
4394
|
server, or of a separate runner, is refused, naming the module and the id, when a module:
|
|
@@ -5242,6 +5330,7 @@ is unpriced.
|
|
|
5242
5330
|
seconds between the end's booking and its delete included), and one whose delete failed run on with no claim to hold
|
|
5243
5331
|
them. Their time is on the usage read (`unheld_quantity`, and the
|
|
5244
5332
|
interval's `booked_seconds` beside its life) but in no cap and no cost: check `computer_intervals` for such a computer.
|
|
5333
|
+
On a provider that bills nothing (Docker) both are 0: its time costs nothing, held or not.
|
|
5245
5334
|
A computer a later claim takes back is held again from then on.
|
|
5246
5335
|
- A run whose process keeps no ledger here (a runner of its own with no run ledger) holds and books nothing, as if
|
|
5247
5336
|
unpriced.
|
package/dist/api-only.d.ts
CHANGED
|
@@ -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
|
package/dist/api-only.js
CHANGED
|
@@ -17,6 +17,10 @@ import { LAUNCH_HOOK_SECRET_ENV, LAUNCH_HOOK_URL_ENV } from "./trigger-launch-ho
|
|
|
17
17
|
* - a backend reads what its agents learned (loop, promotions, audits, cost per run, a run's learning), cut as the
|
|
18
18
|
* console's, and resets it (deleteAgentLearning: the agent and its runs kept) when it erases what an agent learned;
|
|
19
19
|
* - 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;
|
|
20
|
+
* - a backend shares a run it ran (getRunExport, run-export.ts): an ended run's agentrun.share/1 bundle, every string
|
|
21
|
+
* cut by the scrubber as on the full server, its ?restore= a stateless re-export of cuts a preview may restore. A
|
|
22
|
+
* workflow run's bundle carries its graph, cut, though getRunGraph stays refused here; the share page (/share/{run})
|
|
23
|
+
* is the console's, refused with the rest of it;
|
|
20
24
|
* - an operator or a scaler reads the runners' capacity (getCapacity, capacity.ts) from the server whose runners run apart;
|
|
21
25
|
* - a backend reads the saved MCP servers' names (listMcpServerNames), never a URL or a credential;
|
|
22
26
|
* - a backend uploads an agent's package (importTemplate, as {files} alone: a GitHub source is refused in this profile's
|
|
@@ -52,7 +56,7 @@ export const API_ONLY_ROUTES = new Set([
|
|
|
52
56
|
"getLearningLoop", "listLearningPromotions", "listLearningAudits", "getLearningCost", "getRunLearning",
|
|
53
57
|
"getRun", "getRunUsage", "listRuns", "listAllRuns", "getTimeline",
|
|
54
58
|
"sendMessage", "stopRun", "cancelRun", "raiseRunCap", "gradeRun",
|
|
55
|
-
"listRunFiles", "readRunFile",
|
|
59
|
+
"listRunFiles", "readRunFile", "getRunExport",
|
|
56
60
|
"createFile", "listFiles", "getFile", "uploadFile", "deleteFile",
|
|
57
61
|
"getCapabilities", "getHealth", "getUsage", "getCapacity", "listMcpServerNames",
|
|
58
62
|
"importTemplate", "applyTemplate", "getAgent", "listRevisions", "setCurrent", "archiveAgent", "unarchiveAgent",
|
|
@@ -68,6 +68,15 @@ export declare function saveArchilSettings(store: {
|
|
|
68
68
|
export declare function clearArchilSettings(store: {
|
|
69
69
|
settings: Pick<Settings, "remove">;
|
|
70
70
|
}): Promise<void>;
|
|
71
|
+
/** The Archil region of a Mode 2 server (its settings, `archil`) where the region has no serverless exec
|
|
72
|
+
* (archil-mount-credential.ts archilHasExec): a run there with no computer that mounts its folder has no shell
|
|
73
|
+
* (resolve-computer.ts shellPlaceOf). Undefined in Mode 1 (`archil` undefined) and where the region has exec. */
|
|
74
|
+
export declare const noExecRegionOf: (archil: {
|
|
75
|
+
readonly region: string;
|
|
76
|
+
} | undefined) => string | undefined;
|
|
77
|
+
/** Why a run with no computer has no shell on a Mode 2 server whose Archil region `region` has no serverless exec
|
|
78
|
+
* (noExecRegionOf), in the words each refusal and note of it starts from. */
|
|
79
|
+
export declare const noExecWords: (region: string) => string;
|
|
71
80
|
/** Whether the server is in Mode 2 (the Archil settings are set, in `env` or saved). */
|
|
72
81
|
export declare function inArchilMode(store: {
|
|
73
82
|
settings: Pick<Settings, "get">;
|
package/dist/archil-settings.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import { createHash, randomBytes } from "node:crypto";
|
|
13
13
|
import { envValue } from "./key-meta.js";
|
|
14
14
|
import { pinnedImage } from "./workspace/archil-disk.js";
|
|
15
|
-
import { ARCHIL_CONTROL_URLS } from "./workspace/archil-mount-credential.js";
|
|
15
|
+
import { ARCHIL_CONTROL_URLS, archilHasExec } from "./workspace/archil-mount-credential.js";
|
|
16
16
|
/** The settings key the Archil configuration lives under in store.settings. */
|
|
17
17
|
export const ARCHIL_SETTINGS_KEY = "archil";
|
|
18
18
|
/** The sealed-key row of the Archil account key (the file API and exec), saved through server-keys.ts. Named *_ROW: a
|
|
@@ -126,6 +126,13 @@ export async function saveArchilSettings(store, settings) {
|
|
|
126
126
|
export async function clearArchilSettings(store) {
|
|
127
127
|
await store.settings.remove(ARCHIL_SETTINGS_KEY);
|
|
128
128
|
}
|
|
129
|
+
/** The Archil region of a Mode 2 server (its settings, `archil`) where the region has no serverless exec
|
|
130
|
+
* (archil-mount-credential.ts archilHasExec): a run there with no computer that mounts its folder has no shell
|
|
131
|
+
* (resolve-computer.ts shellPlaceOf). Undefined in Mode 1 (`archil` undefined) and where the region has exec. */
|
|
132
|
+
export const noExecRegionOf = (archil) => (archil !== undefined && !archilHasExec(archil.region) ? archil.region : undefined);
|
|
133
|
+
/** Why a run with no computer has no shell on a Mode 2 server whose Archil region `region` has no serverless exec
|
|
134
|
+
* (noExecRegionOf), in the words each refusal and note of it starts from. */
|
|
135
|
+
export const noExecWords = (region) => `this server's Archil region ${region} has no serverless exec`;
|
|
129
136
|
/** Whether the server is in Mode 2 (the Archil settings are set, in `env` or saved). */
|
|
130
137
|
export async function inArchilMode(store, env = {}) {
|
|
131
138
|
return (await loadArchilSettings(store, env)) !== undefined;
|
package/dist/bash-read-only.d.ts
CHANGED
|
@@ -30,6 +30,9 @@ export type Folder = readonly string[];
|
|
|
30
30
|
/** Throws, with the reason, unless `command` is a read-only command line run from `folder`'s first name (relative to the
|
|
31
31
|
* folder: `start`, "" for the folder itself). */
|
|
32
32
|
export declare function checkReadOnly(command: string, folder: Folder, start?: string): void;
|
|
33
|
+
/** Why the read-only policy refuses every call of shell tool `tool`, whatever its arguments (a shell tool but bash and
|
|
34
|
+
* the watchers), or undefined for one whose call it reads: bash, whose command decides (readOnlyReason). */
|
|
35
|
+
export declare function readOnlyToolReason(tool: string): string | undefined;
|
|
33
36
|
/** Why the read-only policy refuses shell tool `tool`'s call with `args`, or undefined when it may go on to the gate's
|
|
34
37
|
* permission. `folder`: the run's folder by its names (the first is where a command starts). */
|
|
35
38
|
export declare function readOnlyReason(tool: string, args: unknown, folder: Folder): string | undefined;
|
package/dist/bash-read-only.js
CHANGED
|
@@ -755,13 +755,16 @@ function commandOf(args, folder) {
|
|
|
755
755
|
}
|
|
756
756
|
return { reason: "it carries no command this policy can read" };
|
|
757
757
|
}
|
|
758
|
+
/** Why the read-only policy refuses every call of shell tool `tool`, whatever its arguments (a shell tool but bash and
|
|
759
|
+
* the watchers), or undefined for one whose call it reads: bash, whose command decides (readOnlyReason). */
|
|
760
|
+
export function readOnlyToolReason(tool) {
|
|
761
|
+
return tool === "bash" || WATCHERS.has(tool) ? undefined : `${tool} is not offered: a read-only shell runs one command at a time, in the foreground, with bash`;
|
|
762
|
+
}
|
|
758
763
|
/** Why the read-only policy refuses shell tool `tool`'s call with `args`, or undefined when it may go on to the gate's
|
|
759
764
|
* permission. `folder`: the run's folder by its names (the first is where a command starts). */
|
|
760
765
|
export function readOnlyReason(tool, args, folder) {
|
|
761
|
-
if (WATCHERS.has(tool))
|
|
762
|
-
return undefined;
|
|
763
766
|
if (tool !== "bash")
|
|
764
|
-
return
|
|
767
|
+
return readOnlyToolReason(tool);
|
|
765
768
|
const read = commandOf(args, folder);
|
|
766
769
|
if ("reason" in read)
|
|
767
770
|
return read.reason;
|
package/dist/chatgpt-plan.d.ts
CHANGED
|
@@ -62,7 +62,8 @@ export declare function signInFailure(error: unknown): {
|
|
|
62
62
|
words: string;
|
|
63
63
|
};
|
|
64
64
|
export interface ChatGPTPlanDeps {
|
|
65
|
-
/** `settings`: where a server keeps its host id, for a sign-in
|
|
65
|
+
/** `settings`: where a server keeps its host id, for a sign-in. A runner's reader may be given a store with settings
|
|
66
|
+
* too (its whole store): it never signs in, and never settles (settleLeft). */
|
|
66
67
|
readonly store: {
|
|
67
68
|
readonly sealedKeys: Pick<SealedKeys, "get" | "put" | "replaceIf" | "removeIf" | "clock">;
|
|
68
69
|
readonly settings?: Pick<Settings, "putIfAbsent">;
|
|
@@ -103,15 +104,22 @@ export declare class ChatGPTPlan implements PlanReader {
|
|
|
103
104
|
private readTaken;
|
|
104
105
|
/** `row` as the snapshot, by a write that knows it is the row's latest (a sign-in kept, a renewal, a sign-out). */
|
|
105
106
|
private wrote;
|
|
106
|
-
/** The row sealed as `bytes`, opened (its tokens held for redaction); none when they
|
|
107
|
+
/** The row sealed as `bytes`, opened (its tokens held for redaction, and those of each pair it carries); none when they
|
|
108
|
+
* do not open. */
|
|
107
109
|
private open;
|
|
108
110
|
/** `row` sealed as the store keeps it: fresh bytes at each seal. */
|
|
109
111
|
private seal;
|
|
110
112
|
/** `row` saved only while the store still holds `was` (SealedKeys.replaceIf): the bytes it was saved as, or none when
|
|
111
113
|
* the row had changed. */
|
|
112
114
|
private swap;
|
|
113
|
-
/** Reads the sealed row into the state a reader sees. Returns this. */
|
|
115
|
+
/** Reads the sealed row into the state a reader sees. Returns this. A read never settles (settleLeft). */
|
|
114
116
|
load(): Promise<this>;
|
|
117
|
+
/** What a stop left in the row (a sign-in it cut off after its save: keep) settled, out of the caller's way: the
|
|
118
|
+
* server's, once, at its start, once its first offers are made. Models it lists are told to the server (its change
|
|
119
|
+
* callback, as a sign-in's are), so the offers made from the fallback list are made again. A runner's reader
|
|
120
|
+
* (planReaderOf, at each claim) never calls it, so no runner lists the plan's models or sends a refresh token to
|
|
121
|
+
* OpenAI's revocation endpoint. */
|
|
122
|
+
settleLeft(): void;
|
|
115
123
|
view(): PlanView;
|
|
116
124
|
/** This server's id at OpenAI (its agent host id): a UUID made once and kept in the store's settings. Not a credential. */
|
|
117
125
|
private hostId;
|
|
@@ -130,10 +138,20 @@ export declare class ChatGPTPlan implements PlanReader {
|
|
|
130
138
|
* is refused in words and the sign-in keeps waiting; one OpenAI refuses ends it. */
|
|
131
139
|
finishSignIn(redirectUrl: unknown): Promise<PlanView>;
|
|
132
140
|
/** A credential from the sign-in started at `epoch`, checked and sealed with what a view shows. A sign-out or a newer
|
|
133
|
-
* sign-in since then wins: the credential is dropped, never written, and revoked at OpenAI.
|
|
134
|
-
*
|
|
135
|
-
*
|
|
141
|
+
* sign-in since then wins: the credential is dropped, never written, and revoked at OpenAI. It is saved before anything
|
|
142
|
+
* slow, so a stop that cuts it off never leaves its pair live at OpenAI and saved nowhere: a sign-in it takes the place
|
|
143
|
+
* of rides in the row (`retired`, with any it carried) until it is revoked, and its models are listed after (settle).
|
|
144
|
+
* The row is replaced only while it still holds what was read (a renewal that wrote back meanwhile is read and carried
|
|
145
|
+
* in turn), so no earlier pair is left alive and unsaved. */
|
|
136
146
|
private keep;
|
|
147
|
+
/** What a saved sign-in leaves (keep), done: its models listed (`unlisted`), and each pair it carries (`retired`)
|
|
148
|
+
* revoked at OpenAI and dropped from the row once OpenAI confirms it. `revoked`: whether every carried pair was
|
|
149
|
+
* confirmed, none when the row carried none; `listed`: whether it wrote the models OpenAI listed. The server's alone,
|
|
150
|
+
* one at a time: only a sign-in (keep) and the server's start (settleLeft) settle, and a runner does neither. The row
|
|
151
|
+
* is written only while it holds what was read and no renewal's lease is live (a renewal writes back over the row it
|
|
152
|
+
* leased, and carries these fields); what is left stays for the server's next start. Never throws. */
|
|
153
|
+
private settle;
|
|
154
|
+
private settleOnce;
|
|
137
155
|
/** Tells the server the sign-in changed (its change callback: env read again, the listings relisted, the offers
|
|
138
156
|
* probed). What the server does with it is not the change's to fail: a failure is owed, said in the log (once: not
|
|
139
157
|
* again for `again`, a retry of one owed), and taken again at the server's next read (refresh). */
|
|
@@ -143,8 +161,8 @@ export declare class ChatGPTPlan implements PlanReader {
|
|
|
143
161
|
* what it offers does not wait for a restart. One at a time: a read while one is out waits for that one (the console
|
|
144
162
|
* polls, and each change relists and probes). */
|
|
145
163
|
refresh(): Promise<void>;
|
|
146
|
-
/** The plan's models from OpenAI's list (GET /v1/models with the token), those of the current families
|
|
147
|
-
* list when it can't be read
|
|
164
|
+
/** The plan's models from OpenAI's list (GET /v1/models with the token), those of the current families (the fallback
|
|
165
|
+
* list when it names none); none when the list can't be read, so the row stays `unlisted`. */
|
|
148
166
|
private listModels;
|
|
149
167
|
/** The access token to send now: the sealed one, renewed first when it ends within 5 minutes. Throws PlanUnavailable,
|
|
150
168
|
* in words, when there is none. */
|