@parcha/agentrun-serve 0.1.0-beta.49 → 0.1.0-beta.51
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 +173 -9
- package/README.md +246 -39
- package/dist/agent-delete.d.ts +3 -2
- package/dist/agent-delete.js +29 -4
- package/dist/agents-store.js +7 -3
- package/dist/api-only.d.ts +8 -10
- package/dist/api-only.js +11 -12
- package/dist/capacity.d.ts +50 -0
- package/dist/capacity.js +49 -0
- package/dist/cli-learning/claude-wire.d.ts +41 -0
- package/dist/cli-learning/claude-wire.js +258 -0
- package/dist/cli-learning/cli.d.ts +11 -0
- package/dist/cli-learning/cli.js +241 -0
- package/dist/cli-learning/codex-worktree.d.ts +10 -0
- package/dist/cli-learning/codex-worktree.js +119 -0
- package/dist/cli-learning/connections.d.ts +62 -0
- package/dist/cli-learning/connections.js +87 -0
- package/dist/cli-learning/entry.d.ts +1 -0
- package/dist/cli-learning/entry.js +4 -0
- package/dist/cli-learning/evidence.d.ts +78 -0
- package/dist/cli-learning/evidence.js +492 -0
- package/dist/cli-learning/hook.d.ts +33 -0
- package/dist/cli-learning/hook.js +544 -0
- package/dist/cli-learning/install.d.ts +33 -0
- package/dist/cli-learning/install.js +335 -0
- package/dist/cli-learning/observation-proof.d.ts +14 -0
- package/dist/cli-learning/observation-proof.js +10 -0
- package/dist/cli-learning/policy.d.ts +48 -0
- package/dist/cli-learning/policy.js +363 -0
- package/dist/cli-learning/schema.d.ts +16 -0
- package/dist/cli-learning/schema.js +27 -0
- package/dist/cli-learning/state.d.ts +23 -0
- package/dist/cli-learning/state.js +61 -0
- package/dist/cli.js +24 -2
- package/dist/compute-cost.d.ts +101 -0
- package/dist/compute-cost.js +250 -0
- package/dist/console/assets/index-Bt1B51b7.js +733 -0
- package/dist/console/assets/index-sVftE9Ht.css +1 -0
- package/dist/console/index.html +2 -2
- package/dist/email/email-faux.d.ts +3 -1
- package/dist/email/email-faux.js +3 -2
- package/dist/email/routes.js +22 -12
- package/dist/eval-previous.d.ts +52 -0
- package/dist/eval-previous.js +164 -0
- package/dist/file-types.d.ts +2 -0
- package/dist/file-types.js +3 -1
- package/dist/harness-install.d.ts +6 -2
- package/dist/harness-install.js +40 -8
- package/dist/harness.d.ts +1 -1
- package/dist/harness.js +3 -2
- package/dist/learn/check.d.ts +8 -5
- package/dist/learn/check.js +25 -24
- package/dist/learn/repick.d.ts +22 -13
- package/dist/learn/repick.js +57 -56
- package/dist/learn/secrets.js +14 -3
- package/dist/learn/workflow-draft.d.ts +4 -0
- package/dist/learn/workflow-draft.js +10 -7
- package/dist/learned-workflow.js +8 -8
- package/dist/learning-setting.js +2 -2
- package/dist/learning-words.d.ts +1 -1
- package/dist/learning-words.js +1 -1
- package/dist/mcp-pin-first.js +2 -1
- package/dist/mcp-private-hosts.d.ts +24 -3
- package/dist/mcp-private-hosts.js +53 -3
- package/dist/model-gateway.d.ts +2 -0
- package/dist/model-gateway.js +3 -1
- package/dist/native/runtimes.d.ts +2 -0
- package/dist/native/runtimes.js +2 -0
- package/dist/observation/learning.d.ts +32 -0
- package/dist/observation/learning.js +66 -0
- package/dist/observation/observer.d.ts +8 -1
- package/dist/observation/observer.js +89 -9
- package/dist/observation/schema.js +12 -4
- package/dist/observation/usage-identity.d.ts +9 -0
- package/dist/observation/usage-identity.js +11 -0
- package/dist/openapi.js +113 -29
- package/dist/paid-calls.d.ts +13 -6
- package/dist/paid-calls.js +14 -8
- package/dist/run-launch.d.ts +16 -2
- package/dist/run-launch.js +6 -1
- package/dist/run-timeline-served.js +5 -3
- package/dist/run-usage.d.ts +23 -8
- package/dist/run-usage.js +100 -18
- package/dist/run-view.d.ts +2 -0
- package/dist/run-view.js +12 -7
- package/dist/runner/adapter-loop.d.ts +4 -0
- package/dist/runner/adapter-loop.js +44 -27
- package/dist/runner/adapter-run-spec.d.ts +8 -3
- package/dist/runner/adapter-run-spec.js +15 -8
- package/dist/runner/beside.d.ts +13 -0
- package/dist/runner/beside.js +27 -8
- package/dist/runner/big-writes.d.ts +33 -0
- package/dist/runner/big-writes.js +105 -0
- package/dist/runner/cli-run-spec.js +16 -8
- package/dist/runner/disk-free.d.ts +44 -0
- package/dist/runner/disk-free.js +96 -0
- package/dist/runner/feedback-round.d.ts +12 -8
- package/dist/runner/feedback-round.js +16 -30
- package/dist/runner/harness-loops.js +3 -1
- package/dist/runner/held.d.ts +4 -1
- package/dist/runner/journal-kinds.d.ts +1 -1
- package/dist/runner/learning-end.js +13 -4
- package/dist/runner/main.d.ts +17 -6
- package/dist/runner/main.js +187 -45
- package/dist/runner/metrics.d.ts +4 -0
- package/dist/runner/metrics.js +9 -0
- package/dist/runner/presence.d.ts +11 -2
- package/dist/runner/presence.js +31 -3
- package/dist/runner/run-child-host.d.ts +27 -17
- package/dist/runner/run-child-host.js +70 -116
- package/dist/runner/run-child.js +3 -0
- package/dist/runner/run-errors.js +2 -0
- package/dist/runner/runner-check.d.ts +51 -0
- package/dist/runner/runner-check.js +206 -0
- package/dist/runner/runner-metrics.d.ts +19 -0
- package/dist/runner/runner-metrics.js +49 -0
- package/dist/runner/runner.d.ts +37 -0
- package/dist/runner/runner.js +43 -3
- package/dist/runner/save-slots.d.ts +9 -0
- package/dist/runner/save-slots.js +91 -0
- package/dist/runner/sdk-loop.js +34 -22
- package/dist/runs-over-store.d.ts +8 -1
- package/dist/runs-over-store.js +57 -9
- package/dist/sdk/runs.d.ts +25 -6
- package/dist/sdk/runs.js +107 -35
- package/dist/sdk/runtimes.d.ts +19 -0
- package/dist/sdk/runtimes.js +23 -0
- package/dist/sdk/schema.d.ts +14 -8
- package/dist/sdk/schema.js +18 -6
- package/dist/server.d.ts +7 -0
- package/dist/server.js +151 -28
- package/dist/skills/agentrun-serve/SKILL.md +52 -7
- package/dist/start-switches.js +2 -0
- package/dist/stats.d.ts +4 -0
- package/dist/stats.js +1 -1
- package/dist/store/agent-body.d.ts +13 -2
- package/dist/store/agent-body.js +19 -4
- package/dist/store/dialect.d.ts +2 -0
- package/dist/store/dialect.js +1 -0
- package/dist/store/index.d.ts +3 -3
- package/dist/store/index.js +2 -2
- package/dist/store/postgres/connection.d.ts +5 -2
- package/dist/store/postgres/connection.js +19 -7
- package/dist/store/postgres/dialect.js +1 -0
- package/dist/store/postgres/migrate.d.ts +30 -0
- package/dist/store/postgres/migrate.js +72 -5
- package/dist/store/postgres/migration-lint.d.ts +8 -0
- package/dist/store/postgres/migration-lint.js +119 -0
- package/dist/store/postgres/migrations/0023_computer_interval_resources.sql +14 -0
- package/dist/store/postgres/migrations/0024_runner_capacity.sql +28 -0
- package/dist/store/postgres/store.d.ts +8 -3
- package/dist/store/postgres/store.js +31 -11
- package/dist/store/schema.d.ts +26 -4
- package/dist/store/schema.js +45 -4
- package/dist/store/sqlite/connection.d.ts +3 -3
- package/dist/store/sqlite/connection.js +3 -3
- package/dist/store/sqlite/run-launch.d.ts +9 -1
- package/dist/store/sqlite/run-launch.js +44 -0
- package/dist/store/sqlite/store.d.ts +19 -4
- package/dist/store/sqlite/store.js +180 -93
- package/dist/store/store-schema.d.ts +34 -0
- package/dist/store/store-schema.js +125 -0
- package/dist/store/store.d.ts +61 -2
- package/dist/store/store.js +13 -0
- package/dist/store-reads/analytics.d.ts +3 -2
- package/dist/store-reads/analytics.js +20 -8
- package/dist/store-reads/cap.d.ts +9 -5
- package/dist/store-reads/cap.js +28 -2
- package/dist/store-reads/decisions.d.ts +21 -0
- package/dist/store-reads/decisions.js +22 -0
- package/dist/store-reads/journal.d.ts +8 -2
- package/dist/store-reads/journal.js +27 -8
- package/dist/store-view.d.ts +9 -4
- package/dist/store-view.js +48 -25
- package/dist/template-eval.d.ts +15 -1
- package/dist/template-eval.js +92 -13
- package/dist/templates.d.ts +4 -3
- package/dist/templates.js +4 -3
- package/dist/timeline/labels.js +17 -0
- package/dist/tool-gate.d.ts +4 -2
- package/dist/tool-list.js +1 -0
- package/dist/tools.d.ts +6 -2
- package/dist/tools.js +13 -1
- package/dist/trigger-targets.d.ts +21 -5
- package/dist/trigger-targets.js +13 -10
- package/dist/unified-usage.d.ts +24 -0
- package/dist/unified-usage.js +400 -0
- package/dist/uploads-archil.d.ts +100 -0
- package/dist/uploads-archil.js +430 -0
- package/dist/uploads.d.ts +55 -1
- package/dist/uploads.js +185 -98
- package/dist/validate.js +1 -1
- package/dist/web-fake.d.ts +25 -0
- package/dist/web-fake.js +38 -1
- package/dist/web-save.d.ts +75 -0
- package/dist/web-save.js +235 -0
- package/dist/workspace/archil-claim.d.ts +5 -2
- package/dist/workspace/archil-claim.js +5 -2
- package/dist/workspace/archil-disk.d.ts +11 -1
- package/dist/workspace/archil-disk.js +43 -10
- package/dist/workspace/archil.d.ts +3 -0
- package/dist/workspace/archil.js +102 -16
- package/dist/workspace/computer-for-claim.d.ts +14 -0
- package/dist/workspace/computer-for-claim.js +46 -7
- package/dist/workspace/computer-intervals.d.ts +9 -3
- package/dist/workspace/computer-intervals.js +17 -8
- package/dist/workspace/pieced.d.ts +14 -0
- package/dist/workspace/pieced.js +23 -0
- package/dist/workspace/run-disk.js +32 -12
- package/dist/workspace/run-workspace.d.ts +1 -1
- package/dist/workspace/run-workspace.js +11 -6
- package/package.json +10 -10
- package/skills/agentrun-serve/SKILL.md +52 -7
- package/templates/README.md +36 -7
- package/dist/console/assets/index-Bzn4eUYF.js +0 -715
- package/dist/console/assets/index-CR2ZGei1.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,25 +2,189 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## 0.1.0-beta.51 (2026-11-21)
|
|
6
|
+
|
|
7
|
+
**Breaking:**
|
|
8
|
+
|
|
9
|
+
- A pending approval says why a call its setting allows asks in a field of its own, `asks_because` (on `pending` of GET /runs/{run_id} and the run list), and no longer among the call's arguments: `args_preview` is the model's arguments alone, with no `asked_because` key, and `summary` no longer ends "Asks because ...". A client that read the reason from `args_preview`'s `asked_because` (or from the end of `summary`) breaks: read `asks_because` instead, absent on a call that asks by its setting. The console's approval card, on the run page and on Mission Control, says "Asks because <why>." above the arguments' box. <!-- changes/approval-asks-because.md -->
|
|
10
|
+
- A runner can run on a disk of its own, and `runner --check` checks its environment by name. A runner with `AGENTRUN_STORE_URL`, `AGENTRUN_SEAL_KEY` and a local `--data` never reads the server's data directory: in Mode 2 (Archil settings saved) it runs every run; while the server is in Mode 1 it claims nothing and says why, on its log and to the server, which refuses a new run in those words (`503 runner_refused`) while no runner on its own data directory is there. The mode is the server's (its saved settings, or the Archil settings in its own environment), never the runner's. The runner never fails the run itself. The server tells the disks apart by an id it keeps in `/data/data-root.id` and says in the store at each start, beside the names (never the values) of its run-facing environment. <!-- changes/disk-free-runner.md -->
|
|
11
|
+
What breaks: `runner --check --data D --name N` now also checks the runner's environment (the store opens, the seal key is the store's, the runner holds every run-facing name the server holds, an upstream on loopback answers) and fails on any gap. A health check run with an empty environment (compose's `env -i`) now fails: run it with the container's environment (the check prints names, never values), or use `runner --check --heartbeat --data D --name N` for the heartbeat alone. `runner --check --env [--data D]` checks the environment alone, before a runner starts. Not yet on a disk of its own: screen recordings. See deploy/README.md, "A runner on a disk of its own".
|
|
12
|
+
|
|
13
|
+
**Changes:**
|
|
14
|
+
|
|
15
|
+
- A disk removed at Archil while a run is on it now fails that run's next disk call as the disk being gone (`UNAVAILABLE`, in Archil's words), not as a missing file. <!-- changes/archil-disk-gone-midrun.md -->
|
|
16
|
+
- Email: Save signs in before it keeps the account, and the console opens and makes email triggers. <!-- changes/email-save-signs-in.md -->
|
|
17
|
+
- Behavior change: `PUT /v2/settings/email` signs in to IMAP and SMTP first, as Test does, sending nothing. If either refuses or can't be reached, it answers 424 `upstream_failed` with `details.imap` and `details.smtp` (each `{ok, message}`) and saves nothing, keeping any account saved before. It used to save any password. A body that doesn't read is still 422 by field, before any sign-in. The console's Save shows the refusal beside the form.
|
|
18
|
+
- Public API addition: the apply answer (`POST /v2/templates/{template}/apply`, Apply and Update) carries `agent_change`: `made`, `updated` (a new revision written) or `unchanged` (an update with `agent_id` whose package and parameters the current revision already holds, no revision written), with `revision_version` the agent's current revision once it is done. It also carries `triggers`, every trigger the apply made or kept, in the package's order, each `{trigger_id, name, kind, enabled}`; `trigger_ids` is unchanged. The TypeScript and Python clients' `ApplyTemplateResponse` gain both. The console's Apply and Update result lists each trigger by its name and kind in words, on or off, an email trigger beside its schedules (a schedule keeps its line and next time); it used to list the schedules alone.
|
|
19
|
+
- An email trigger's page opens in the console: the account and mailbox it watches, how often, its last check, its filter, its agent and its firings, with Pause, Run now and Delete. It carries the same "Waits for your approval" warning the other triggers' pages do when its agent has a tool that asks (refused, with accounts off), and Run unattended. It used to say the page didn't open it yet.
|
|
20
|
+
- Triggers → New makes an email trigger (`#/triggers/new-email`), beside the schedule, webhook, GitHub, app and feed forms: its agent, mailbox (INBOX unless changed), how often it reads, what each run is asked, its cost cap and whether it is on, with the same approval warning and Run unattended. With no account saved it says so and links to Settings → Email. An email trigger used to be made through the API or a template alone.
|
|
21
|
+
- A template's apply result, on Templates and in the API playground, says from the answer's `agent_change` what the apply did: an update that changed nothing reads "Nothing to update: rev 2 is current.", never that the agent is made or applied. <!-- changes/lookback-tidy.md -->
|
|
22
|
+
The console also:
|
|
23
|
+
- Takes a run with only a field for an agent whose `input_schema` fields are all optional, as the server does, and says a refusal of neither at the message box. Filling a field clears the server's issue at the message only where the message is optional; a required message keeps its issue until it is fixed.
|
|
24
|
+
- Offers the Grade form on an ended run whose learning reads `reflecting`, and says a `409 run_learning` in the server's words, keeping the choice.
|
|
25
|
+
- Says on every tool row of a template's install page that the template asks you to grant it, and on a tool whose `asks` is `ask` that each call waits for your OK unless you allowed it in Settings or pick Never ask; no listed tool reads as one the template does not ask for.
|
|
26
|
+
- Says on a Triggers row, of any kind, whose agent has tools that ask "Waits for your approval: <tools>" (or "Refused without your approval" with accounts off), as the trigger's page does, reading each agent once.
|
|
27
|
+
- Names each trigger's agent on Triggers when the agent was made after the console opened (a template applied from a URL makes one with its triggers): the agents' names are read again each time Triggers opens, as Runs and Mission Control read them. It used to show the agent's id.
|
|
28
|
+
|
|
29
|
+
A look-back cut by a stop or cancel is said as "a stop or cancel cut it while it wrote what it learned", and the learning state's `reflecting` description names the run's end it reads.
|
|
30
|
+
- A run whose revision ships skills no longer fails at its claim on a fresh Mode 2 (Archil) folder with `".agents/skills" is not there` when it runs in its own process. A `WorkspaceError` now crosses the run's channel as a `WorkspaceError` with its `code`, as the other run errors do, so `layOwnSkills` (and every other check of `instanceof WorkspaceError` in the run's process) reads a missing folder as `NOT_FOUND` again. Runs in the runner's process were not affected. <!-- changes/run-process-workspace-error.md -->
|
|
31
|
+
- A runner that holds many customers' runs keeps per-run users without putting its own user in 256 groups, and its operator can stop owners from allowing private-network hosts (`AGENTRUN_PRIVATE_HOSTS`). See [docs/multi-tenant-runners.md](https://github.com/Parcha-ai/agentrun/blob/main/docs/multi-tenant-runners.md) for the threat model. <!-- changes/runner-per-run-users-one-group.md -->
|
|
32
|
+
|
|
33
|
+
- In the image, the server's user (node) is now in one group, its own, and in no slot's group. A platform that reads a user's groups at start (Northflank's environment injector refused node's 257 groups) can run the image with per-run users on, so `AGENTRUN_RUN_USER=same` is no longer needed there.
|
|
34
|
+
- A run's folders are given to its slot before it starts (`agentrun-runas own <slot>`: the slot's uid, node's group, folders `2770` with the setgid bit) and back to node at its end (`own runner`). The server reads a running run's files through its one group; no other slot can enter them, nor the slot's next run. The helper gains `cap_chown` (kept alone while it gives folders, each entry changed through a descriptor opened without following a link); `reown` and `reap --fix` are gone. A give-back that fails retires the slot, as a reap that does not hold does.
|
|
35
|
+
- A run that shuts one of its folders (`chmod 700`, which drops its setgid bit) hides it from the server until the run ends.
|
|
36
|
+
- `AGENTRUN_PRIVATE_HOSTS` bounds the private-network hosts an owner may allow an MCP server or a calendar on (Settings → MCP servers). Unset, the owner's list holds, as before. `none` reads no owner's list and saves only an empty one (422, naming the switch, otherwise): set it on a server or runner many customers share, and on each runner, which reads its own environment and says the bound at its start. A comma list of address ranges (`10.20.0.0/16,fd12:3456::/32`) allows a listed host only inside them. A value that is neither reads as `none`. `GET /v2/capabilities` lists it under `switches`.
|
|
37
|
+
- `GET /v2/capacity` (`capacity/1`) says how much room the runners have, read from the store alone, so a server with no runner beside it (`--no-runner`, `AGENTRUN_API_ONLY=1`, where it is served too) answers for every runner on its store. It gives the runs waiting for a runner (`runs.queued`: queued, handed back, or with a claim that ran out, past any backoff) and the runs a live claim holds (`runs.executing`). It lists each live runner by name with its build's `version`, its `slots` (the most runs it holds at once), what it holds (`executing`) and its `free_slots`, plus the total `free_slots`. It counts the runs handed back still running within `?window=` minutes (`hand_backs`: 1 to 1440, default 15). It names no run, agent or address, and it takes the server's token like every route but capabilities and health. An operator or a scaler reads it to size the runners by backlog, not CPU. <!-- changes/runner-capacity.md -->
|
|
38
|
+
Each runner's row now says its version and slots (`runners.version`, `runners.slots`), and every release that leaves its run running writes a row to a new `hand_backs` table, kept for a day. Postgres migration `0024_runner_capacity.sql` adds both, and a SQLite store gets them at the server's open. Both are additive. A runner of an earlier build that is already running keeps working, with its version and slots read as null. On SQLite, one also starts again as before. On Postgres, a runner of an earlier build that starts after the migration refuses the store, as for any migration it does not know: upgrade Postgres runners with the server. A runner of this build waits on SQLite for a server that added them.
|
|
39
|
+
A runner prints metric lines in the server's log format (`at=… event=… key=value`), so a log-based metric can count them: `runner_claimed`, with `took_over=1` when it took over a run whose lease ran out; `runner_hand_back` with a `cause` (`drain`, `interrupted`, `end_retry`, `give_back`, or `claim_lost` with its `why`); `runner_drained` (`ms`, `held`, `left`), once per close that held a run; and `runner_gauge` every minute (`active`, `slots`, `rss_mib`). The existing `Runner … claimed` and `ready` lines are unchanged. A runner beside a server prints the same lines where the server prints its own.
|
|
40
|
+
- A runner on Postgres no longer needs the store's schema to match its own version exactly. The server can migrate first while the earlier release's runners keep running, as long as the migrations are additive. Each store keeps a runner floor: the oldest schema version a runner's build must know. A migration marked `-- runners: breaking` raises the floor to its own version. Every runner reads the floor again every 10 s, whether or not it holds runs. When the floor rises above its version, it claims nothing more, drains, hands its runs back and exits 3. A runner that starts below the floor exits 3 and says to run a runner of the server's release. A runner on a store its server has not migrated yet still exits 3, as before. Runners of earlier releases still need an exact match, so roll this release's runners with its server as before; from this release on, a runner keeps running beside the next releases' additive migrations. <!-- changes/runner-floor.md -->
|
|
41
|
+
- `agentrun-serve store-schema [--data DIR]` prints the store's schema version and runner floor beside this build's version, and what this build's server and runner do on that store, as one line of JSON. It reads only: no lock, no migration. `--build` prints the build's own versions with no store. `GET /v2/capabilities` carries the same live values in `store_schema` (`version`, `runner_floor`, `known`), for a deploy check that refuses a build older than its store.
|
|
42
|
+
- A Postgres migration that drops or renames anything, changes a column's type, makes a column NOT NULL, or adds a NOT NULL column with no default must carry the `-- runners: breaking` header. A test fails one that does not. Migrations up to 0022 predate the rule and count as breaking; 0023, the first the lint reads, is additive. A SQLite runner still opens only its own schema version.
|
|
43
|
+
- With Archil on (Mode 2), uploads live on Archil and the server places a run's files in its folder at the run's start, so a runner reads no upload and needs no disk of the server's. `POST` and `PUT /v2/files` keep each file on the server's own uploads disk, `agentrun-<server id>-files` (made by the first upload), at `files/<file_id>/`, and listing, reading and deleting read it there. A run started with `file_ids` has each file copied into its folder at `work/inputs/<path>` before it is queued (2 files at a time across every start on the server, at most 45 s). Its launch records `files_placed` and the disk it used, and its claim copies nothing. A copy that fails refuses the start with `424 upstream_failed` in words, and no run is made. <!-- changes/uploads-on-archil.md -->
|
|
44
|
+
In Mode 2, an uploaded file that no run names is deleted after `AGENTRUN_UPLOAD_RETENTION` (default `7d`, or `off`), swept hourly (`event=uploads_expired`). Mode 1 is unchanged: uploads stay in `DIR/files/`, are copied in at the claim, and are never deleted. Files uploaded under one mode are not seen under the other.
|
|
45
|
+
- Connect independently started Codex CLI and Claude Code sessions with `learning connect`, without <!-- changes/existing-cli-learning.md -->
|
|
46
|
+
an SDK wrapper or replacing the source task launcher. Hooks record completed prompt windows and
|
|
47
|
+
reported usage; later prompts receive pinned owner corrections from AgentRun. Source task dialogue
|
|
48
|
+
never becomes a standing correction automatically. Source hooks do not expose a workflow execution
|
|
49
|
+
bridge or launch extra native reflection sessions. Retired automatic notes and skills stay on disk
|
|
50
|
+
but are not served or converted to owner corrections. Existing CLI profiles with a stored
|
|
51
|
+
`learning: "notes"` setting read as enabled under the current learning model; new definitions use
|
|
52
|
+
its boolean or loop settings.
|
|
53
|
+
|
|
54
|
+
Connection credentials are scoped, installation preserves unrelated hooks, and disconnect removes
|
|
55
|
+
only its own hooks. Incomplete evidence and cancellations stay explicit. The console offers capture
|
|
56
|
+
and correction delivery enrollment for existing applications while execution and editing stay in
|
|
57
|
+
their original setup. Initial enrollment requires a local AgentRun server and the selected CLI's
|
|
58
|
+
sign-in; metadata observation alone does not enable it.
|
|
59
|
+
|
|
60
|
+
Private pending capture journals are bound to their destination and credential generation. A reconnect
|
|
61
|
+
starts a fresh journal; prior or unbound records remain on disk and are not automatically migrated,
|
|
62
|
+
uploaded or deleted. `learning retry` reports `blocked_journals` and exits with status 1 when those
|
|
63
|
+
records need review.
|
|
64
|
+
|
|
65
|
+
Disconnect disables local capture before removing hooks or contacting the server. If server revocation is
|
|
66
|
+
pending, loaded hooks and retries stay disabled until disconnect completes; status exposes `capture_enabled`.
|
|
67
|
+
Retries advance across retained sessions, queued hooks and unfinished turns so older entries cannot indefinitely
|
|
68
|
+
hide later uploads. Interrupted connection commands recover an abandoned lock while a live owner keeps it.
|
|
69
|
+
Recovery also recognizes a proven previous kernel boot on the same host. A different namespace from the
|
|
70
|
+
same boot, or an unknown boot identity, stays protected until its owner's death can be established.
|
|
71
|
+
Project installer and shared Codex hook locks now keep private owner records and recover after a proven
|
|
72
|
+
owner death. Legacy empty or malformed installer locks stay protected regardless of age; the error names
|
|
73
|
+
the lock and requires stopping and verifying all relevant installers before manually removing that lock.
|
|
74
|
+
- Observe token usage from already-running Codex sessions without restarting their native processes. Polling subscriptions follow loaded interactive, exec and delegated sessions; explicitly selected historical sessions remain available. Input, output and reported cache counters use native model metadata and source UTC dates, with cumulative baselines, atomic local checkpoints and sequence deduplication preventing duplicate accounting. <!-- changes/existing-codex-polling-usage.md -->
|
|
75
|
+
|
|
76
|
+
Polling usage requires the receiver’s advertised capability. Existing lifetime totals are not backfilled; missing counters, tail gaps and queue drops remain partial coverage. Conversation content stays local, existing learning consent is unchanged, and OTLP ingestion keeps its existing behavior.
|
|
77
|
+
|
|
78
|
+
Selected failed sessions remain eligible for bounded usage polling, so counters flushed after Codex reports a system error are retained. Acknowledged counters are not counted again after another poll or a connector restart.
|
|
79
|
+
- The CLI capture API uses `agentrun cli-learning enroll|list|revoke|start|get|events|complete`. <!-- changes/cli-capture-command-routing.md -->
|
|
80
|
+
Its earlier generated `CLI learning` group was one word internally and did not accept the documented
|
|
81
|
+
invocations. The generated TypeScript resource is `cliLearning` with the same verbs, and Python uses
|
|
82
|
+
`cli_learning`; API paths and operation IDs are unchanged. The local `learning connect`, `status`,
|
|
83
|
+
`disconnect`, `retry` and `hook` commands and the existing learning API commands keep their routes.
|
|
84
|
+
- Keep delayed CLI hook retries in source order. An older queued submit or session ending cannot <!-- changes/cli-capture-retry-boundaries.md -->
|
|
85
|
+
interrupt a newer prompt. When earlier dialogue cannot be ordered safely, retain it privately and
|
|
86
|
+
mark the capture incomplete instead of presenting it as prior context.
|
|
87
|
+
|
|
88
|
+
Bound newly captured prompts, answers and dialogue to the server's text and event limits, including
|
|
89
|
+
after secret redaction. Truncated evidence remains explicitly incomplete and can be uploaded instead
|
|
90
|
+
of retrying an oversized request indefinitely. Already frozen historical requests remain unchanged
|
|
91
|
+
because an uncertain earlier upload may have committed their immutable payloads.
|
|
92
|
+
|
|
93
|
+
Serialize session journals with the existing token-fenced ownership lock. Concurrent recovery of a
|
|
94
|
+
dead owner cannot remove a new owner's lock. Legacy empty or PID-only locks remain pending rather
|
|
95
|
+
than being removed on age alone; remove such a lock only after confirming no hook or retry process
|
|
96
|
+
still owns that journal.
|
|
97
|
+
|
|
98
|
+
A pending local disconnect no longer advertises learning as ready while hook removal or remote
|
|
99
|
+
revocation is blocked. The connector withholds its readiness proof until the connection is active.
|
|
100
|
+
- Install Codex learning hooks in linked worktrees through the main-checkout `hooks.json` that native <!-- changes/cli-learning-worktree-hooks.md -->
|
|
101
|
+
Codex actually loads. Reconnecting migrates unchanged owned hooks without changing the learning
|
|
102
|
+
connection or credential. Shared-file locking and stable hook group positions preserve other enrolled
|
|
103
|
+
projects and their native trust keys; worktree-local TOML stays untouched. Observation readiness checks
|
|
104
|
+
the derived shared configuration and does not mark ignored local hooks ready. Modified configuration,
|
|
105
|
+
invalid Git ownership and size overflow fail without replacement; interrupted migrations retain both
|
|
106
|
+
ownership records for safe disconnect. Loaded Codex project configuration requires a new or reopened
|
|
107
|
+
session before hooks activate. A nested linked worktree cannot also learn through its enclosing checkout.
|
|
108
|
+
- Capture reported token usage for new Codex and Claude Code CLI learning prompts, deduplicating native response records within each prompt. The dashboard's unified `analytics.usage` includes retained source observations and recorded runs, using verified session identity to group potentially overlapping usage. When exact overlap is unavailable, the total keeps the larger coherent source or recorded view as a lower bound, with incomplete coverage explicit. A stale or zero source report cannot erase a larger completed prompt total; distinct immutable CLI turns can sum, while upload dates alone do not prove separate native execution. Range and session filters apply to the combined total; unavailable cache breakdowns, partial boundary days, missing reports and the 90-day source retention limit stay explicit. Unbound observation identities cannot be matched to separately recorded runs. Missing, ambiguous or incomplete prompt usage remains unknown; existing run completions are not rewritten. An enabled CLI learning profile with no recorded prompts explains that its next source prompt starts capture and that earlier conversations are not imported automatically. <!-- changes/cli-prompt-usage-coverage.md -->
|
|
109
|
+
|
|
110
|
+
The dashboard and Agents page share one connected-agent inventory. Source sessions and AgentRun agents appear together, including profiles awaiting their first captured prompt, and the separate observed-session sections are removed. Selecting a source session filters its reported usage without treating the session as a completed run or requesting a server-agent run endpoint.
|
|
111
|
+
|
|
112
|
+
Ordinary analytics reads project the saved accounting and identity fields instead of transferring full CLI policies and SDK replay records. Historical identity still selects the right source usage across date ranges. PostgreSQL records containing unsupported Unicode escapes retain the earlier JavaScript parsing path for that record, preserving their counters and exact native identity. Unexpected accounting read failures are surfaced by the usage endpoint.
|
|
113
|
+
- Show connected coding agents in the same searchable inventory and count as registered agents, with <!-- changes/connected-agent-inventory.md -->
|
|
114
|
+
project, session, model, activity and token details. Preserve loaded cards when another source is
|
|
115
|
+
loading or unavailable, and exclude nonarchivable connections from the archived view.
|
|
116
|
+
|
|
117
|
+
Identify coding sessions by their native title, project basename or delegated task name, with a stable
|
|
118
|
+
ID suffix for unnamed sessions. Names refresh even while idle. The observer sends bounded labels only
|
|
119
|
+
to receivers advertising support; prompts, conversation previews, full paths and obvious credentials
|
|
120
|
+
are excluded. Token accounting and selection scopes stay unchanged.
|
|
121
|
+
Unicode labels respect queue and delivery byte limits so long multilingual names cannot stall delivery.
|
|
122
|
+
- Give connected coding sessions the same card layout and coding-agent Run/Edit handoffs as other <!-- changes/connected-agent-learning-controls.md -->
|
|
123
|
+
agents, with learning status and setup or settings actions. Project learning connections remain
|
|
124
|
+
available in Learning Dojo but no longer appear as duplicate agents in the active inventory.
|
|
125
|
+
|
|
126
|
+
The connector can associate a session with an existing project/runtime learning connection using
|
|
127
|
+
its installed hook receipt and a scoped proof. Learning is shown as on only after that exact session
|
|
128
|
+
has reported a hook window and the server and project settings allow learning. Missing setup,
|
|
129
|
+
unverified activation and unsupported delegated sessions remain explicit. Revoked or invalid proofs
|
|
130
|
+
do not grant access or prevent ordinary activity and token reports. This does not install hooks,
|
|
131
|
+
enroll additional projects, import conversations or change how coding sessions are started.
|
|
132
|
+
- Dashboard and agent analytics show exact, comma-separated token totals, input and output counts whenever they fit. Counts adapt to the actual column width and font, using compact notation only when needed. The full number remains available on hover and to screen readers when abbreviated. <!-- changes/console-exact-token-counts.md -->
|
|
133
|
+
- The dashboard and agent analytics show Input and Output counts beneath the token total. Input includes cached tokens, including when a connected source reports total and output usage without a cache breakdown. Missing counts display a dash, and genuine zero counts remain zero. The token card no longer shows cache percentages or model-request diagnostics; incomplete coverage and history limits remain visible. <!-- changes/console-token-breakdown.md -->
|
|
134
|
+
- Show Mission Control's activity and token-usage charts directly below the main agent and run counts, <!-- changes/mission-analytics-placement.md -->
|
|
135
|
+
before the observed-session summary.
|
|
136
|
+
- Keep verified session identity privately beside retained observation usage, independently of current <!-- changes/observation-usage-identity.md -->
|
|
137
|
+
learning readiness. Disconnecting, replacing credentials, or receiving an older client's activity
|
|
138
|
+
no longer counts observed tokens separately from the same session's captured runs. Existing verified
|
|
139
|
+
associations migrate when another observation arrives; the accounting identity grants no learning
|
|
140
|
+
authorization and is removed with the retained session.
|
|
141
|
+
|
|
142
|
+
If an earlier disconnect already discarded the verified identity, it cannot be reconstructed. Where
|
|
143
|
+
unidentified observations may overlap recorded native runs, usage compares the complete native view
|
|
144
|
+
with each collector's complete observation view and reports a conservative total with incomplete
|
|
145
|
+
coverage. It does not add possibly overlapping collectors or infer an identity from unverified fields.
|
|
146
|
+
|
|
147
|
+
A verified report that tries to assign a different native identity to an already identified observed
|
|
148
|
+
session is refused with `409 connector_session_identity_conflict`. The entire batch remains uncommitted,
|
|
149
|
+
including its usage and receipts; distinct native sessions must use distinct external session IDs.
|
|
150
|
+
- Template packages such as Inbound Lead and KYB accept and retain their `learning.agree_on` settings through import, apply and later edits. A learned workflow's promotion check and shadow audit compare the declared answer fields, with each dotted path required in the template's output schema; a missing path disagrees. Without `agree_on`, the existing whole-answer comparison remains. The console and API describe which fields the check compared. <!-- changes/template-learning-compat.md -->
|
|
151
|
+
|
|
152
|
+
## 0.1.0-beta.50 (2026-11-20)
|
|
153
|
+
|
|
154
|
+
- An API-only server (`AGENTRUN_API_ONLY=1`) serves four learning reads with its token: an agent's loop, promotions and cost per run, and a run's learning. <!-- changes/api-only-learning-reads.md -->
|
|
155
|
+
- Computer time is priced the way providers bill it: by the resources a computer holds, never by a size. An operator copies its provider's per-resource rates from the provider's price sheet into `AGENTRUN_COMPUTE_USD_PER_VCPU_SECOND_<PROVIDER>`, `AGENTRUN_COMPUTE_USD_PER_GIB_SECOND_<PROVIDER>`, `AGENTRUN_COMPUTE_USD_PER_GPU_SECOND_<PROVIDER>_<GPU_TYPE>` and `AGENTRUN_COMPUTE_USD_PER_DISK_GB_MONTH_<PROVIDER>` (a month of 730 hours). A priced computer's time is held on the run's ledger under its `max_cost_usd`, one 5-minute stretch ahead, as browser time is: a claim's computer, made while the run is set up, has its first stretch held as soon as the run's cap can judge, so the run's first request is judged beside it (a cap with no room parks the run there); a computer made later in the run (a lost sandbox's new one) has its first stretch held before its create, and a cap with no room makes nothing and fails the run in the cap's words; a cap with no room for a later stretch pauses the run for a raise; and the time it ran is booked before the run's end is written, so the end's `cost.usd` holds it all. The run's ledger tells a caller whether its cap can judge yet (`RunLedger.judges`), and a paid step asked while the run's spec is built waits for it instead of failing. With no price set nothing changes: the computer runs outside the cap, as a tool call with no price does, and is never refused. A resource set to `0` is booked at $0 and reads $0, never `unpriced`. `GET /v2/runs/{run_id}/usage` gives `compute_time` lines (`runusage/4`), one per provider and resource, with the raw quantity, its unit, its basis and the dollars the run's ledger booked, so `total` stays the run's `cost.usd`; the time no claim held (a computer kept for a follow-up, one deleted after its run, one whose delete failed) is said apart as `unheld_quantity` and is in no cost. Each computer interval gives `disk_gb` and `booked_seconds` (Postgres migration `0023_computer_interval_resources.sql`; a SQLite store gets both columns at the server's open). A computer's figures are its provider's own where its answer gives them: `CreatedComputer.resources` in `@parcha/agentrun-computer`, filled from Daytona's sandbox (vCPUs, memory, disk and GPUs), E2B's `getInfo` and Fly's machine guest (vCPUs and memory), and `Machine.resources` for a hosted provider's read of its machine. <!-- changes/compute-prices.md -->
|
|
156
|
+
- The file viewer shows images and plays video and audio from the run's file route, which now serves `.webm`, `.mp3`, `.wav`, `.m4a` and `.ogg` inline with their types. Settings → MCP servers has two fal presets, fal (key) and fal (sign in); fal bills your fal account, and a run's spend cap does not count it. <!-- changes/console-media-viewer-and-fal-preset.md -->
|
|
157
|
+
- A template eval case can name `previous: fixtures/previous.json`, the earlier completed results of the package's schedule trigger, each checked against its own `output_schema` (else the package's) when the case is read; the eval writes them in its own server's store as completed runs of the run's agent, each started by a firing of that trigger, then fires the trigger on its clock, so the run is handed its last result whole, as its `x-carried` fields with the first entries dropped and counted, or nothing, said so, exactly as a scheduled run is. What the run was handed is on its report as `handed_previous`, and a new `handed` grader checks it (`expect: whole | carried | too_large | none`, with `dropped` counts for carried arrays). <!-- changes/eval-previous-run.md -->
|
|
158
|
+
- A workflow decision Parallel answered on its own API (the `parallel` provider on the server's `PARALLEL_API_KEY`, booked at Parallel's list price, $0.001 a request) now counts as a paid call Parallel charged, beside `web_search` and `web_fetch`: it is in the run's `cost.tools_usd` (`toolsusd/2`), on the `parallel` `tools` line of `GET /v2/runs/{run_id}/usage` (`charged_by` and `provider` `parallel`, one call each, `basis` `estimate`), and on the `tools` meter of `GET /v2/usage`. It used to be on a `tokens` line under its model (`parallel-fast`). It moves; it is not added: `total` is still the run's `cost.usd`, and `cost.usd` does not change. A `parallel` decision sent through OpenRouter (no `PARALLEL_API_KEY`, on the OpenRouter key) is OpenRouter's to charge, at the cost OpenRouter reported, and stays a `tokens` line, as Jev's and other decision models' do. <!-- changes/parallel-decision-tool-lines.md -->
|
|
159
|
+
|
|
160
|
+
A Parallel search is now priced by its `mode`, from [Parallel's pricing page](https://docs.parallel.ai/resources/pricing) (read 2026-11-20): `turbo` or `fast` $0.001 a request, `basic` or `advanced` $0.005, each with 10 results included, and $0.001 for each result past them. `web_search` always searches `fast`, so what it books does not change. A search body in a mode with no price here, or naming none, is never sent, as a request to an endpoint with no price is not: it is never booked at $0 or at `fast`'s price.
|
|
161
|
+
- SDK runs accept externally executed agents through `sdk: {runtime: "external", platform: "OpenClaw"}`. Use `"Capy"` or another platform label without adding a runtime. The required label is 1–80 Unicode characters with no leading or trailing whitespace, control characters or unpaired UTF-16 surrogates; it is preserved in the console and on each recorded run. Registration and run start must name the same runtime and platform. Other SDK runtimes reject `platform`. See [Report runs from an external platform](../../docs/tutorials/platform-sdk-runs.md). <!-- changes/sdk-runs-openclaw-capy.md -->
|
|
162
|
+
Execution stays on the platform: managed launch, stop, cancel and follow-up requests are refused. External sources receive the owner's corrections when learning is on, with no workflows. Starts carrying `workflow_tools` or `workflow_adapters` are refused (422) before recording a run. `BackendLearningClient`, imported from `@parcha/agentrun-client/learning`, accepts the external binding and refuses a `workflows` bridge before any request. Existing Claude Agent SDK, Codex SDK and eve integrations retain their behavior.
|
|
163
|
+
The generated TypeScript `StartSdkRunBody` is now a union. Consumers that extend it with an interface or index its workflow fields must use a type intersection or select the SDK branch; the [client README](../client/README.md#learning-for-existing-backend-sdk-agents) describes the migration. `BackendLearningStart` remains extensible, and existing Python TypedDict constructors and CLI flags are preserved.
|
|
164
|
+
- `web_save {url, path}`, a new host tool, saves one public file (at most 200 MiB) into the run's `work/`, a bare name under `media/`. It downloads through `web_fetch`'s guard, never overwrites, and saves media only when the bytes, the declared type and the extension agree. An agent gets it by naming it. pi-browser adds `publicDownload`, the bytes version of `publicFetch`. A template eval's `web:` fixture takes an optional `save` section. <!-- changes/web-save-tool.md -->
|
|
165
|
+
- An API-only server (`AGENTRUN_API_ONLY=1`) now serves `GET /v2/runs/{run_id}/usage`, a run's usage lines. It answered `404` before, so a backend could read a run and its `cost.usd` but not the lines that make it up. The route reads only that run, takes the server's token, and cuts the host's secrets out of its names as `GET /v2/runs/{run_id}` does. Every other route the profile refused is still refused. <!-- changes/api-only-run-usage.md -->
|
|
166
|
+
- A run on an Archil disk that Archil no longer has fails at its claim, before any file call, saying so: the agent's disk is read at Archil at every claim (one GET), as a launch's disk already was, and a disk that is gone, or one in another region than the key's, refuses the run naming the disk, the region and the way out (`DELETE /v2/agents/{id}/archil` drops it, and the agent's next run makes a new one). No new disk is made in its place: the agent's learning and its runs' folders were on it. Before, such a run failed at its first claim with `".agents/skills" is not there`, since every call on the missing disk answered 404 and a 404 read as a folder that was not there. <!-- changes/archil-disk-gone.md -->
|
|
167
|
+
- An Archil run folder makes its folders before it writes: Archil can answer 404 to a put whose folder is not there (it made no parent for an expert run's `.agents/skills/` on a fresh run folder, so every expert run failed at its claim with `".agents/skills" is not there`). A write, an append, a mkdir, the run folder's own put and a synced folder's push now make each missing folder above the key, from the highest down, and put again; a folder already there is left as it is.
|
|
168
|
+
- An Archil workspace keeps Archil's own words in a failure: a missing file or folder is still `NOT_FOUND`, naming the call (list, read, write, append, mkdir, put) and what Archil said after it, and a disk Archil has no record of is `UNAVAILABLE` naming the disk and its region, never a missing folder.
|
|
169
|
+
- A run's folder on its Archil disk that can't be made fails the claim with the reason, where it was a log line; a folder already there is not put again, so a later claim whose kept computer holds it opens at once.
|
|
170
|
+
- With `learning.repick: true`, a learned workflow whose answer is written by a composed workflow now re-picks from the pages in that composed workflow, where before it was committed as compiled without a word. A re-pick the rewrite still does not reach (one that is not a single model step, or whose marker names are taken) is kept as compiled, and the server's log says so. <!-- changes/learning-repick-reach.md -->
|
|
171
|
+
- `POST /v2/templates/{template}/apply` now answers `revision_version`: the number of the agent's revision the apply wrote, its current one now (`1` for an agent it made; on an update with `agent_id`, the new revision's). This is a public API addition: the TypeScript and Python clients carry the field, and the console says "Updated: rev N" from it with no second read of the agent. A purged run's answer and input no longer stay in the server's in-process caches after its `DELETE` (or its agent's): the purge drops them, and a read under way when the purge lands keeps none of them. A SQLite purge whose WAL checkpoint another connection holds back now leaves the store's scrub marker (`store.sqlite.scrub`), and the next start's scrub truncates the log before it serves, a crash in between included; it no longer retries or logs a warning. A secret rewrite running beside the purge never removes the marker the purge left. When that marker cannot be written (a full disk), the purge has still committed: the `DELETE` answers 500 `internal`, saying so, and the server logs it; the run's cached answer and input are dropped all the same, and the next `DELETE` answers 204. <!-- changes/purge-tidy.md -->
|
|
172
|
+
|
|
173
|
+
Upgrade note: a retried apply whose answer was saved before the upgrade replays without `revision_version`; it ages out within a day.
|
|
174
|
+
|
|
5
175
|
## 0.1.0-beta.49 (2026-11-20)
|
|
6
176
|
|
|
7
|
-
-
|
|
8
|
-
quote from the pages its run fetched, not from its compact notes alone. The server rewrites the passing draft before it
|
|
9
|
-
commits it: the answer's re-pick loop runs the answer step as compiled first, then, on a miss, the same step reading
|
|
10
|
-
the pages, told they are untrusted data and never instructions, with no tools. `learning.repick_max_chars` (150000 by
|
|
11
|
-
default, 1 to 400000) caps the characters that second pass sends, the longest pages cut first. Its cost is the served
|
|
12
|
-
run's, under the run's cost cap. The setting is read at each compile, so a change reaches only workflows compiled after
|
|
13
|
-
it; agents whose workflows run through an SDK bridge ignore it.
|
|
177
|
+
- `learning.repick: true` (off by default) has a learned workflow's quote re-pick read the pages its run fetched, sent as untrusted data to a step with no tools; `learning.repick_max_chars` (150,000 by default) caps what it sends. It reaches workflows compiled after it is set, and agents on an SDK bridge ignore it. <!-- changes/learning-repick-pages.md -->
|
|
14
178
|
- A purged run's or agent's content no longer stays in the SQLite store's file bytes: every store connection writes with `secure_delete` on, so a deleted or overwritten row's bytes are zeroed in its page, and a purge checkpoints the WAL (`TRUNCATE`) once it commits, so neither `store.sqlite` nor its `-wal` keeps an earlier copy. The checkpoint waits a few milliseconds for another connection, never the store's 10 s busy wait, so it holds up no other request. One another connection holds back is retried once, then logged (the next purge's checkpoint or the server's stop clears it), and never fails the `DELETE`. Postgres is not covered: `VACUUM` only makes a purged row's space reusable, so its bytes stay until a later write overwrites them; `VACUUM FULL` rewrites the table; Postgres's WAL, archived WAL and backups keep the old values for their own lifetimes. <!-- changes/purge-secure-delete.md -->
|
|
15
179
|
- `DELETE /v2/runs/{run_id}` purges a run that is not live: its launch, journal and timeline, messages, outputs and files, folders, kept answers, its agent's grades of it, its kept learning's content and what its agent's promotion records copied from it (a disagreement's input and answers; each record's decision, numbers and run ids stay) go, with the runs made from it (its audit's shadow run, the replay runs of its input, a learning run that grades it); no replay or shadow run of a purged run is started. Its row stays as a tombstone (id, agent, state, times, cost, purge time): `/usage`, `/stats` and a cap's spend read are unchanged, every route of the run answers `410 purged` with the tombstone in `details`, and no run list shows it. A second `DELETE` is `204`; a live run (queued, working, waiting on a person, or held by a runner) is `409 run_not_final`, nothing purged; a purge stopped part way is finished by the next `DELETE`. A message, a trigger's message or a grade sent to the run while its `DELETE` runs waits for it and is then `410 purged`. `DELETE /v2/agents/{agent_id}` now purges an archived agent made here the same way (its definition, learning, triggers, sign-ins, computer, disk and folders go, its runs become tombstones, its row is a tombstone answering `410 purged`); one not archived is `409 agent_not_archived`, which replaces `agent_not_external`. An unarchive or a write sent to the agent while its purge runs (its home, its definition, a move of its current revision) is `410 purged` once it ends, as is a definition edit or a template update whose body arrives after it, and a trigger made for a purged agent or moved to it: nothing of a purged agent is written again; after a purge stopped part way, each is `409 agent_not_runnable` until a `DELETE` finishes it. An agent another system owns is deleted whole, as before. Both deletes take the owner's session or the API token: any other console session is `403 forbidden`. The TypeScript client, the Python client and the CLI (`agentrun runs delete`) carry the new operation. <!-- changes/run-delete.md -->
|
|
16
180
|
- `GET /v2/runs/{run_id}/usage` (`runusage/1`) says what one run cost, line by line, and whose invoice each part lands on: `tokens` per model (`model`, and `provider` where the server sent the requests itself; null behind a gateway), `tools` per charger (`charged_by`, with calls of unpriced tools in `not_metered_calls`), and `browser_time` per browser provider (`provider`, seconds). Each line has its quantity as measured, its dollars as the run's booking holds them, and its basis (`reported`, `estimate`, `unpriced`). It reads the same for a pi run, a CLI-harness run and a workflow run (its decisions on the model that answered them). The lines join to `total`, the run's `cost.usd`; a charge of unknown cost is null with what is known beside it, never $0. `ended_at` is the end the lines cover: a follow-up can reopen an ended run, and a later read with another `ended_at` says it moved. The console's Dev tools tab shows the lines as "Cost by line". In the kernel, a paid request may say `reported` (it settles at the provider's own figure), written on its `runner.request`. <!-- changes/run-usage-lines.md -->
|
|
17
181
|
- `GET /v2/computers`' `folder` field is described by its rule alone, naming no vendor: `bind` a folder of this machine (Mode 1), `archil` the owner's Archil disk where the provider takes an Archil mount, has Archil's image and does not dial this server, `sync` a synced folder the runner keeps for any other computer that takes a folder in Mode 2, null none. The computer package's README no longer says a program of the user can join the window manager's namespace with nsenter: root made it, and the user holds no capability there. A Daytona desktop on exec is refused in the shared refusal's words alone. `runConformance` takes `onScreenshot(png)`, called with screen.screenshot-size's last whole screenshot. <!-- changes/computer-untangle-16.md -->
|
|
18
182
|
- In the console, updating an agent from a template (Update <agent>) now says it was updated and names the new revision ("Updated: rev 2"). It used to say the template was applied and "The agent is made", as if the apply had made a new agent. Only an Apply that makes a new agent says "made". <!-- changes/template-update-says-updated.md -->
|
|
19
183
|
- A scheduled run handed its previous result's `x-carried` fields is told how many entries each carried array lost from its front, "the first N entries" (the template keeps the array oldest first), no longer "the N oldest": the engine drops from the front and reads no dates. A stored `x-carried` the save would refuse (a repeated, unknown or empty name) is read as none, so its run gets the too-large line. `submitParameters` leaves every `x-` keyword out of submit tool schemas, as it does `criteria`, not only `x-carried`; a property or definition so named keeps its name. <!-- changes/x-carried-first-entries.md -->
|
|
20
|
-
- A run's look-back (its own after its job, or the feedback round a grade opens) keeps the run's end: GET, the list, SSE and the console show it completed (or failed) with its answer and `ended_at` while its learning reads `reflecting`, polled until it settles, and it tells `run.ended` once. Stop and cancel refuse it then, and a runner-side stop or cancel that lands mid-round drops only the round, so a graded run is never left cancelled or stopped. A runner lost during the look-back leaves the next one the same end at the same time. `PUT /runs/{run_id}/grade` during a look-back is `409 run_learning` (a new error code), nothing kept: grade the run once its learning moves on from `reflecting`.
|
|
184
|
+
- A run's look-back (its own after its job, or the feedback round a grade opens) keeps the run's end: GET, the list, SSE and the console show it completed (or failed) with its answer and `ended_at` while its learning reads `reflecting`, polled until it settles, and it tells `run.ended` once. Stop and cancel refuse it then, and a runner-side stop or cancel that lands mid-round drops only the round, so a graded run is never left cancelled or stopped. A runner lost during the look-back leaves the next one the same end at the same time. `PUT /v2/runs/{run_id}/grade` during a look-back is `409 run_learning` (a new error code), nothing kept: grade the run once its learning moves on from `reflecting`. <!-- changes/grade-keeps-run-end.md -->
|
|
21
185
|
- `GET /v2/runs/{run_id}/usage` gives `browser_sessions` (`runusage/2`): one record per browser session the run opened, with the provider's session id, when the server opened it and let it go, why it ended, the seconds charged for it, and the provider's own record of it (`provider_record`: its start, end and proxy bytes), read once when the session is let go. With it a person running AgentRun sees how long each session ran, spots one that ended late or was lost, and finds each on the provider's own dashboard and invoice by its id. A provider that keeps no record, or a read that fails, says so in `provider_record_status`, with the record null, never zeros. In the computer package, a browser provider may offer `sessionUsage(ref)`, the vendor's record of a session; Browserbase's reads `GET /v1/sessions/{id}`. <!-- changes/run-usage-browser-sessions.md -->
|
|
22
186
|
- `GET /v2/runs/{run_id}/usage` gives `computer_intervals` (`runusage/3`): one record per computer the run made through its provider (a sandbox, a desktop or a phone), by when each was made, with the provider's own id for it (`provider_id`), its `kind`, what its create asked for (`gpu`, `cpus`, `memory_mb`; null where it asked none, never a guess), when the create answered (`started_at`), when the provider's delete of it answered ok (`ended_at`), and whether the run's park kept it past its claim (`kept`). With it a person running AgentRun sees how long each of a run's computers lived, finds one left running after its run (`ended_at` null: no delete was proven, never a guessed end), and matches the provider's invoice by its id. The server writes the store's new `computer_intervals` table (Postgres migration `0022_computer_intervals.sql`; a SQLite store gets it at the server's open) at the claim's create, the park, and every delete that answers ok: the claim's release, a later claim letting an earlier one's go, the run's end, a kept computer's end, and the janitor's sweeps. A write that fails is said on the runner's log and never fails the run. The agent's own computer, a paired one and `--faux`'s have no record. Computer time is not priced: it is on no line and not in `total`. A `tools` line now names its `provider` too, the same vendor as `charged_by`; a `tokens` line behind a model gateway keeps `provider` null, since the server does not know the gateway's upstream. <!-- changes/computer-intervals.md -->
|
|
23
|
-
- An agent whose `input_schema`
|
|
187
|
+
- An agent whose `input_schema` fields are all optional takes a run that gives one of them and no `content` (`{"pr_number": 3318}` was refused 422). An input with neither is still refused at `input.content`. <!-- changes/input-content-or-field.md -->
|
|
24
188
|
|
|
25
189
|
## 0.1.0-beta.48 (2026-11-20)
|
|
26
190
|
|