@parcha/agentrun-serve 0.1.0-beta.40 → 0.1.0-beta.42
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 +130 -0
- package/NOTICE +2 -0
- package/README.md +149 -21
- package/dist/agent-rows.d.ts +1 -1
- package/dist/agents-store.js +3 -1
- package/dist/api-only.d.ts +3 -1
- package/dist/api-only.js +4 -2
- package/dist/api-token.d.ts +30 -0
- package/dist/api-token.js +89 -0
- package/dist/calendar/address.d.ts +49 -0
- package/dist/calendar/address.js +153 -0
- package/dist/calendar/fetch.d.ts +24 -0
- package/dist/calendar/fetch.js +146 -0
- package/dist/calendar/ics-faux.d.ts +39 -0
- package/dist/calendar/ics-faux.js +236 -0
- package/dist/calendar/labels.d.ts +3 -0
- package/dist/calendar/labels.js +61 -0
- package/dist/calendar/names.d.ts +52 -0
- package/dist/calendar/names.js +54 -0
- package/dist/calendar/parse.d.ts +108 -0
- package/dist/calendar/parse.js +625 -0
- package/dist/calendar/routes.d.ts +17 -0
- package/dist/calendar/routes.js +81 -0
- package/dist/calendar/tools.d.ts +23 -0
- package/dist/calendar/tools.js +124 -0
- package/dist/cli.js +22 -6
- package/dist/composio-made.d.ts +54 -0
- package/dist/composio-made.js +83 -0
- package/dist/composio-preset.d.ts +16 -8
- package/dist/composio-preset.js +106 -43
- package/dist/composio-triggers.d.ts +7 -2
- package/dist/composio-triggers.js +13 -7
- package/dist/computer-attach.d.ts +29 -11
- package/dist/computer-attach.js +141 -47
- package/dist/computer-keys.d.ts +4 -0
- package/dist/computer-keys.js +5 -0
- package/dist/computer-record.d.ts +55 -0
- package/dist/computer-record.js +315 -0
- package/dist/computer-setting.d.ts +1 -0
- package/dist/computer-setting.js +15 -2
- package/dist/computers.d.ts +11 -1
- package/dist/computers.js +23 -26
- package/dist/console/assets/{index-B8Zn1Iqn.css → index-C3gNPz58.css} +1 -1
- package/dist/console/assets/index-DYJ_wj27.js +711 -0
- package/dist/console/index.html +2 -2
- package/dist/decisions.js +9 -2
- package/dist/eval-feed.d.ts +26 -0
- package/dist/eval-feed.js +72 -0
- package/dist/eval-mailbox.d.ts +4 -1
- package/dist/eval-mailbox.js +11 -3
- package/dist/exa-keyless.d.ts +1 -1
- package/dist/exa-keyless.js +1 -1
- package/dist/feed/feed-faux.d.ts +62 -0
- package/dist/feed/feed-faux.js +123 -0
- package/dist/feed/fetch.d.ts +41 -0
- package/dist/feed/fetch.js +128 -0
- package/dist/feed/parse.d.ts +42 -0
- package/dist/feed/parse.js +291 -0
- package/dist/feed/pointer.d.ts +2 -0
- package/dist/feed/pointer.js +17 -0
- package/dist/file-types.js +1 -0
- package/dist/host-command.d.ts +3 -0
- package/dist/host-command.js +18 -0
- package/dist/host.d.ts +3 -0
- package/dist/host.js +3 -0
- package/dist/learn/check.d.ts +17 -1
- package/dist/learn/check.js +240 -5
- package/dist/learn/compile.d.ts +48 -27
- package/dist/learn/compile.js +134 -101
- package/dist/learn/promote.d.ts +61 -5
- package/dist/learn/promote.js +12 -2
- package/dist/learned-nodes.d.ts +21 -4
- package/dist/learned-nodes.js +21 -8
- package/dist/learned-workflow.d.ts +3 -3
- package/dist/learned-workflow.js +14 -5
- package/dist/learning-setting.d.ts +23 -0
- package/dist/learning-setting.js +51 -0
- package/dist/learning-words.d.ts +3 -0
- package/dist/learning-words.js +3 -0
- package/dist/learning.d.ts +3 -2
- package/dist/learning.js +5 -3
- package/dist/mcp-oauth.d.ts +23 -1
- package/dist/mcp-oauth.js +46 -5
- package/dist/mcp-pin-first.d.ts +4 -2
- package/dist/mcp-pin-first.js +4 -3
- package/dist/mcp-private-hosts.d.ts +13 -0
- package/dist/mcp-private-hosts.js +16 -0
- package/dist/mcp-servers-store.d.ts +58 -5
- package/dist/mcp-servers-store.js +136 -17
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +2 -2
- package/dist/observation/http.d.ts +4 -1
- package/dist/observation/http.js +5 -4
- package/dist/openapi.d.ts +1 -0
- package/dist/openapi.js +151 -21
- package/dist/print.d.ts +6 -3
- package/dist/print.js +4 -2
- package/dist/run-files.d.ts +6 -2
- package/dist/run-files.js +29 -7
- package/dist/run-labels.d.ts +23 -0
- package/dist/run-labels.js +79 -0
- package/dist/run-learning-served.d.ts +1 -1
- package/dist/run-reads-over-store.d.ts +5 -1
- package/dist/run-reads-over-store.js +8 -4
- package/dist/run-recordings.d.ts +20 -0
- package/dist/run-recordings.js +133 -0
- package/dist/run-secrets.js +12 -4
- package/dist/runner/adapter-loop.d.ts +1 -1
- package/dist/runner/adapter-loop.js +94 -16
- package/dist/runner/adapter-run-spec.d.ts +19 -0
- package/dist/runner/adapter-run-spec.js +57 -36
- package/dist/runner/beside.d.ts +6 -3
- package/dist/runner/beside.js +9 -7
- package/dist/runner/cli-run-spec.js +41 -32
- package/dist/runner/conformance/harness.js +69 -14
- package/dist/runner/conformance/subject.d.ts +4 -1
- package/dist/runner/feedback-round.d.ts +9 -25
- package/dist/runner/feedback-round.js +22 -40
- package/dist/runner/learning-end.d.ts +17 -7
- package/dist/runner/learning-end.js +79 -53
- package/dist/runner/main.d.ts +12 -1
- package/dist/runner/main.js +31 -4
- package/dist/runner/mcp-claim.d.ts +3 -0
- package/dist/runner/mcp-claim.js +1 -1
- package/dist/runner/mcp-run.d.ts +6 -2
- package/dist/runner/mcp-run.js +5 -3
- package/dist/runner/model-route.d.ts +4 -2
- package/dist/runner/model-route.js +8 -8
- package/dist/runner/promotion.d.ts +44 -4
- package/dist/runner/promotion.js +323 -21
- package/dist/runner/reflect-hook.d.ts +5 -0
- package/dist/runner/reflect-hook.js +22 -14
- package/dist/runner/store-secrets.js +3 -1
- package/dist/runner/workflow-first.d.ts +6 -11
- package/dist/runner/workflow-first.js +16 -20
- package/dist/runs-over-store.d.ts +1 -1
- package/dist/runs-over-store.js +5 -2
- package/dist/sdk/runs.d.ts +7 -1
- package/dist/sdk/runs.js +21 -7
- package/dist/secret-cut.js +3 -1
- package/dist/secrets.js +5 -3
- package/dist/server.d.ts +31 -5
- package/dist/server.js +240 -61
- package/dist/store/agent-body.d.ts +5 -3
- package/dist/store/agent-body.js +14 -10
- package/dist/store/dialect.d.ts +3 -0
- package/dist/store/dialect.js +1 -0
- package/dist/store/index.d.ts +1 -1
- package/dist/store/postgres/dialect.js +1 -0
- package/dist/store/postgres/migrations/0015_run_labels.sql +5 -0
- package/dist/store/postgres/migrations/0016_minted_tokens.sql +21 -0
- package/dist/store/schema.d.ts +9 -0
- package/dist/store/schema.js +26 -2
- package/dist/store/sqlite/connection.js +11 -3
- package/dist/store/sqlite/run-patch.d.ts +2 -1
- package/dist/store/sqlite/run-patch.js +3 -2
- package/dist/store/sqlite/store.js +64 -10
- package/dist/store/store.d.ts +38 -1
- package/dist/store-reads/journal.js +2 -1
- package/dist/store-reads/learning.d.ts +1 -1
- package/dist/store-reads/learning.js +6 -1
- package/dist/store-reads/loop.d.ts +1 -0
- package/dist/store-reads/loop.js +14 -4
- package/dist/store-reads/runs.d.ts +4 -3
- package/dist/store-reads/runs.js +3 -2
- package/dist/store-view.d.ts +5 -0
- package/dist/store-view.js +8 -2
- package/dist/template-eval.d.ts +11 -0
- package/dist/template-eval.js +177 -52
- package/dist/templates.d.ts +13 -1
- package/dist/templates.js +89 -18
- package/dist/timeline/computer.js +2 -1
- package/dist/timeline/origin.d.ts +1 -1
- package/dist/timeline/origin.js +2 -2
- package/dist/tool-list.js +1 -0
- package/dist/tools.d.ts +7 -0
- package/dist/tools.js +11 -0
- package/dist/trigger-adapter.d.ts +9 -4
- package/dist/trigger-adapters.js +2 -1
- package/dist/trigger-feed.d.ts +12 -0
- package/dist/trigger-feed.js +420 -0
- package/dist/triggers.d.ts +2 -1
- package/dist/triggers.js +23 -5
- package/dist/validate.js +7 -2
- package/dist/webhooks.js +9 -5
- package/dist/workspace/computer-deps.d.ts +5 -1
- package/dist/workspace/computer-deps.js +2 -2
- package/dist/workspace/computer-for-claim.d.ts +7 -0
- package/dist/workspace/computer-for-claim.js +12 -2
- package/dist/workspace/index.d.ts +1 -0
- package/dist/workspace/index.js +2 -0
- package/dist/workspace/paths.d.ts +4 -0
- package/dist/workspace/paths.js +9 -0
- package/dist/workspace/resolve-computer.d.ts +35 -4
- package/dist/workspace/resolve-computer.js +47 -9
- package/launcher/agentrun-serve +34 -22
- package/package.json +11 -9
- package/templates/README.md +38 -4
- package/dist/console/assets/index-Jbxjcmdp.js +0 -705
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,136 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## 0.1.0-beta.42 (2026-11-17)
|
|
6
|
+
|
|
7
|
+
- A learned workflow is compiled once and checked once against the agent's own answers. An agent definition's `learning` takes an object, `{ compile_after?, agree_min?, alone_min? }`, which is on (as `true`) with those numbers set; each one left out is its default (20, 0.8, 0.7), and `true` is every default. A number out of range or an unknown key is a 422 `wrong_type` on `definition.learning`.
|
|
8
|
+
- The first compile is asked once the agent has `compile_after` completed runs of its own. A count of kept notes no longer triggers it.
|
|
9
|
+
- A new revision's first claim replays it on the inputs of the agent's last `compile_after` completed runs. Each input is scored against the agent's own recorded answer, not a grade. The revision is promoted (promotion `source: "check"`) when it answered at least `alone_min` of them alone and at least `agree_min` of those said what the agent said. An input a guard or a recorded escalate would hand back when serving is not answered alone. Every reserved input counts in `n`: a replay run never created, or not ended by the check's deadline, is a failed input. A draft with nothing to check it on (no input of the agent's it takes, or every input skipped at a write) is never promoted: it stops (`check.stopped`, `n: 0`) with a reason that starts "nothing to check it on", shown as the compile's draft error, and asks no recompile. Under either bar it is held, and the agent's next run asks one revision with the inputs it disagreed on. That revision is checked the same way; held again, it stops (`check.stopped`), the agent keeps its runs, and nothing compiles again.
|
|
10
|
+
- The promotion record carries `check`: the bar, `n`, `agreed`, `alone`, the runs read, the tools that stopped skipped inputs (`skipped_tools`), and on a hold the disagreements. A promotion by check is not moved by later grades or refits, and a newer revision waits for a running check instead of queueing.
|
|
11
|
+
- Upgrading: promotion is now by agreement with the agent's own answers, not by grades. To compile sooner or hold drafts to a stricter bar, set `learning: { compile_after: 5, agree_min: 0.9 }` on the agent. A client that reads `definition.learning` as a boolean or `"notes"` must also accept an object, and treat it as on.
|
|
12
|
+
- A run's phone can carry real apps: the operator names APK files on the machine that drives the phones in `PHONE_HARNESS_APKS`, a comma list of `<absolute path>@sha256:<hex>`, and each phone installs them before the agent starts on it. A file that is not there, or whose bytes are not its pin, refuses the claim in words before a phone is rented. Breaking: the phone-harness provider's `apks` option takes `{ path, sha256 }` entries, not bare paths.
|
|
13
|
+
- The timeline names a phone's Clock, Contacts and Files apps and the Wikipedia app by the names on their icons (it said "Deskclock" for the Clock).
|
|
14
|
+
- A calendar for agents: an owner saves the server's one calendar by its secret iCal address (Google Calendar's "Secret address in iCal format", Outlook's ICS link, iCloud's public link), and the new host tool `calendar_events {from?, to?}` reads its events.
|
|
15
|
+
- The calendar's routes (the console's page for it comes next): `GET`, `PUT` and `DELETE /v2/settings/calendar` and `POST /v2/settings/calendar/test`, the owner's signed-in session alone (a secret write; the token is 403). `PUT {url}` takes https, and reads `webcal://` as https. The address is sealed in the store's sealed keys. It is in no answer, event, log line, error or run input, a failed fetch's words and the calendar's own name included. Each text is scrubbed before it is cut short, and the address's secret token (a path segment or query value that reads as one) is scrubbed on its own too, so no part of it gets through. When the address redirects, the address it was redirected to is scrubbed too, in every one of those places. `GET` answers `{configured, host, name, time_zone}`. The test answers in words, "Work: 214 events, time zone America/New_York, next: Standup, Mon Nov 17 09:30", for the saved address or the body's, saving nothing.
|
|
16
|
+
- `calendar_events`: the window defaults to now through 7 days on, and is at most 62 days (a longer one is refused in words). A `from` or `to` whose parts name no time (Feb 30, 25:00, 24:00, minute 61), with or without an offset, is refused in words, never rolled over to another day. It answers `{calendar, time_zone, from, to, count, truncated, events}` sorted by start, at most 200 events. Each event: `{title, start, end, all_day, location, description (cut at 500), status, recurring, organizer, attendees: [{name, email}]}`. Repeating events are expanded in the window (RRULE, RDATE, EXDATE). An RDATE period keeps its own end or duration. A moved instance (RECURRENCE-ID) is in its new place, and a cancelled one is left out; with RANGE=THISANDFUTURE, the move or cancellation applies to every later instance too. One read has a work budget across all its series: 15,000 rule steps, and at most 1 s. A calendar that needs more, such as hundreds of old every-minute series, is answered in words (it has too many repeating events to read), never as a partial list. A rule that ended before the window is not walked, and a plain rule starts just before the window instead of at its first instance years back. Each event keeps its own time zone, so a 09:30 meeting stays at 09:30 across a DST change, and floating times read in the calendar's X-WR-TIMEZONE, else the server's. As RFC 5545 says, a time a spring-forward skips takes the offset from before the change (02:30 reads 03:30), and a time a fall-back repeats is its first occurrence, whether the zone is named or is the file's own VTIMEZONE. An all-day event's start and end are dates. It runs on every harness, beside `web_fetch` and the email tools. An event's words are untrusted, as a page's are. It is allowed by default and not metered. The timeline reads "Calendar: 8 events, Nov 17-23", or "Calendar: couldn't read the calendar".
|
|
17
|
+
- The fetch is held to the server's one address rule, the one an MCP server's is: https only, a private address refused unless its host is allowed in Settings → MCP servers (private hosts), link-local and this machine never, loopback only on a local install and never at the server's own ports (where it listens, and its public address when that is on loopback), each redirect checked again and every hop dialled at the address checked. The tool's read on the runner beside a local install is held to the same own ports as the server's read: the server tells that runner its addresses (`Serve.own`), so a calendar saved at the server's address, or one that redirects there, is refused in words before anything is sent. 10 MB, 20 s, 5 redirects. A read is reused for 5 minutes, then revalidated with its ETag and Last-Modified (a 304 keeps the parsed copy). Those go only to the address the kept copy came from, so an address that now redirects somewhere else is read there in full.
|
|
18
|
+
- Templates: a package's `tools` may name `calendar_events`. With no calendar saved, it applies as the email tools do, and the tool answers that no calendar is saved. A template eval case may say `calendar: <file>.ics`: a fake calendar server on loopback serves it as the eval server's calendar, and the case's `now` is the window's clock.
|
|
19
|
+
- New dependency: `ical.js` 2.2.1, pinned exact (MPL-2.0, no dependencies of its own; 268 KB `dist/ical.js`, 1.2 MB unpacked). It loads at a calendar read only, never with the server.
|
|
20
|
+
- The compile turn's worked example is now the cascade a repeated job compiles to, and two checks hold drafts to it. The example fetches a page with a call step, has a fast-tier extract step copy compact facts from it, answers on the agent's model from those facts and its own draft alone, re-picks once in a loop of 2 until its quotes pass `quote_missing`, then hands back a second miss or a case the policy does not cover at an escalate step. It carries no guard.
|
|
21
|
+
- DSL: a whole-string placeholder marked optional, `"{draft?}"`, is null while its path is absent and the path's value once present. A re-pick loop's answer step reads its failed draft that way through its `state` map: null on the first pass, the draft on the second. An unmarked placeholder still fails with `missing_interpolation`, and `{x?}` inside a longer string stays literal text. The Lean model and the conformance corpus cover it. `placeholderValue(state, path)` is exported: the lookup every placeholder reads through (the path as written, then the path after `state.`), for a host that checks what a step reads. So is `placeholdersOf(text)`: the placeholders a string holds as interpolation fills them (a marked one only as the whole string).
|
|
22
|
+
- Compact state: a learned workflow draft is refused when a model step off the fast tier reads a page a call step fetched, through its `state` map or, with no map, the whole state. One refusal line names the step and what to give it.
|
|
23
|
+
- The quote check's re-pick now asks for that `state` map (the compact facts and `"draft": "{answer?}"`), where it asked for no map at all, which read every page on the agent's model.
|
|
24
|
+
- Upgrading: the compile turn asks for no step guard and refuses a draft with one (`guard`, its threshold and signal). Learned workflows already saved keep running as they are; a revision of one drops its guards.
|
|
25
|
+
- A Morph provider: `providerFor("morph", { apiKey })`, or `@parcha/agentrun-computer/morph`. A Morph computer is kind `linux`, an instance started from a snapshot over Morph's REST API, with its lifetime as Morph's TTL (action stop) and every command over SSH through Morph's gateway, as the instance id with the instance's own key (read over REST), so the account's key never goes over SSH. Its image is a snapshot id; `prepareImage()` finds or builds the box image as a snapshot in the key's account (digest `agentrun-box-<recipe hash>`). It has no Archil mount and no desktop yet. Network none, open and a list are init's, since Morph has no egress control. serve reads its key as `MORPH_API_KEY`.
|
|
26
|
+
- Conformance: `AGENTRUN_COMPUTER_LIVE_MORPH=1 COMPUTER_MORPH_API_KEY=... npm run conformance -w @parcha/agentrun-computer -- --provider morph`, and the live sweep takes `--provider morph`.
|
|
27
|
+
- A feed trigger reading a JSON list takes two optional pointers. `fields`, 1 to 50 JSON Pointers into an item (`["/number", "/title", "/user/login"]`), keeps only those in the payload's `item`, each at its own place, before the 16 KB cap: a GitHub pull request, which is over the cap whole, now fires without `item_truncated`. `updated`, a pointer to the item's date (`"/updated_at"`), lets an item fire again with `update: true` when that date moves on; without it a JSON list's item fires only once, as before.
|
|
28
|
+
- `validate-template` now refuses an eval case's `web:` fixture with no `search` (or any other shape `eval-template` refuses), in the same words.
|
|
29
|
+
- An eval's feed fake matches the item it delivers by the trigger's `id` pointer, not by `.id`, so a JSON list read at `/number` gets an update in place of the pull request it names, not a duplicate.
|
|
30
|
+
- `fields` and every feed pointer (`items`, `id`, `updated`) read and write an item's own keys only: a name such as `__proto__` or `constructor` is never reached through the prototype.
|
|
31
|
+
- A feed's seen set now tells a missing date from a real one: an item dated 1970-01-01 or earlier fires `update: true` when its date moves on. A cursor saved before this reads a JSON list's recorded 0 as a missing date, once.
|
|
32
|
+
- Fly Machines is a computer provider (`fly`, `@parcha/agentrun-computer/fly`): a dial host whose machines boot the box image and dial the server, with `FLY_API_TOKEN` and `FLY_APP` (the Fly app its machines live in) saved in Settings → Computers. Its Core runs inside the server the machines dial: `node packages/serve/scripts/dial-conformance.mjs --provider fly`, with `COMPUTER_FLY_API_TOKEN`, `COMPUTER_FLY_APP`, `AGENTRUN_PUBLIC_URL` and `PORT` set, which the server's image carries. It prints its report between two marker lines and then idles until stopped (`--exit` exits instead), so a host that restarts an exited process does not start a second run.
|
|
33
|
+
- A learned workflow is asked for a revision only when its promotion record holds it, once per hold. A hand-back, a stop by the money rule and a wrong grade of a served run no longer each ask a compile turn: one bad case is one sample, and the hold (a replay under the bar, or graded runs under the agent's accuracy) reads it among the workflow's others. The first compile is still asked as before.
|
|
34
|
+
- A wrong grade of a run its learned workflow answered opens no feedback round. The grade is kept (PUT /runs/{id}/grade answers `feedback: null`), and the graded hold, replay and refit read it. The `revise` feedback round is gone; `look_back` is the only one.
|
|
35
|
+
- The money rule still stops a workflow that costs more than the agent and may hold it. The stop asks for no compile; the agent takes the run.
|
|
36
|
+
- An agent run of an agent with `learning: true` asks no look-back turn unless its owner gave feedback on it: a grade's words, or a message after the run's first. A run without it spends $0 looking back and keeps its learning dropped `empty`, saying it looks back only on feedback. A compile that is due is still asked. `learning: "notes"` runs look back as before. An SDK run carries no owner feedback, so an SDK agent with `learning: true` learns through its compile turn alone.
|
|
37
|
+
- A new draft's compile ask asks for no step guard, Jev or `self`, whether or not the run can call Jev, and the checks refuse a draft with one (see the compile turn's upgrading note above).
|
|
38
|
+
- Upgrading: a workflow agent's runs stop looking back on their own; give feedback (a grade with words, or a follow-up message) on the runs it should learn from. A client that read `feedback: "revise"` on a grade reads `null` for a served run now.
|
|
39
|
+
- An agent's desktop or phone can record a video of each run's screen: `definition.computer.record: true` (off by default).
|
|
40
|
+
- The recorder watches the screen on a connection of its own, from the claim's attach until the computer's release or the run's end, with or without a viewer open. A park pauses it; the resumed run goes on in a new file. It never holds up the live view or the agent: a frame that comes while the encoder is busy replaces the one waiting, and is counted.
|
|
41
|
+
- One ffmpeg per recorded computer, frames piped in and stamped as they come: at most 10 frames a second, 1280 pixels on the long side, no audio, H.264 in fragmented MP4. A frame of another format (a phone's PNG, then JPEG) goes on in the next file.
|
|
42
|
+
- The files are `recordings/<computer>.mp4` in the run's folder on the machine that runs it, beside `work/`, never in it. Caps: 500 MB across a run's files, and 2 hours from the recording's start or the run's resume. A cap, an encoder that stops (a crash, a full disk) or a screen that stops answering ends the recording with a line on the run's timeline; the run never fails because of it.
|
|
43
|
+
- The video shows everything on the screen, a person's typing during a take-over and any secret included: pixels can't be redacted.
|
|
44
|
+
- A server without ffmpeg on its `PATH` refuses `record: true` at save: 422 `not_allowed` on `definition.computer.record`, naming the fix. The published image now has an `ffmpeg` built for the recorder alone (about 6 MB). A desktop or a phone only: on another kind, 422 `not_allowed`.
|
|
45
|
+
- A runner in its own process (`agentrun-serve runner`, beside a server started with `--no-runner` or in a service of its own) now honours `AGENTRUN_MCP_ALLOW_LOOPBACK=1` from its own environment, as the server and the runner inside the server's process already did. Before, every call such a runner made to an MCP server on loopback was refused as a private address, nothing sent.
|
|
46
|
+
Each process reads only its own variable, never the server's, the store's or the data directory's, so a runner never inherits it. Loopback means the machine (or container) the runner runs on: a runner in another container or service needs its own server or forwarder at the MCP server's address, and its own `=1`. A runner with the variable never reaches loopback at a server's own port: 7340 (where a server listens unless `--port` says otherwise), the port of a loopback `AGENTRUN_PUBLIC_URL` in its environment, and the addresses the server now keeps in the store at each start (`mcp.server_own`: where it listens, whatever its port), read at each claim. Those addresses are all a runner reads of the server. It says on stderr at its start that it takes the variable. A runner without it is refused as before, even when the server has it.
|
|
47
|
+
On a server started without the variable, a run of a revision saved before pins (pinned at its first run) whose MCP server is on loopback was refused (409) with "save the agent again to pin it", though a save is refused too. The 409 now names the cause: `its server <name> can't be listed here to pin it: 127.0.0.1 is this machine; set AGENTRUN_MCP_ALLOW_LOOPBACK=1 when starting the server, ...`. With the variable set on the server, such a revision is pinned at its first run and runs, as before.
|
|
48
|
+
- The image's ffmpeg is one static binary of about 6 MB built for the screen recorder alone (PNG and JPEG frames in, H.264 in fragmented MP4 out), in place of Debian's `ffmpeg` and its libraries: the image is 163 MB smaller than with Debian's, and 2.8 MB larger than with no ffmpeg at all. FFmpeg 9.0.2, x264 and zlib, each pinned by sha256, cross-compiled for arm64. The image build runs the recorder on it and fails unless it makes H.264 files from both kinds of frame. It is GPL, as Debian's ffmpeg is; the licence files are in `/usr/local/share/doc/ffmpeg`.
|
|
49
|
+
- The launcher (`agentrun-serve`) hands over secrets of any total size. Before, it refused to start once the secrets it names came to more than 4,096 bytes, which a host with a dozen real keys, or one RSA `AGENT37_SSH_KEY`, could reach. A fork of the launcher's shell now writes the pipe as the server reads it, and exits once the last byte is in, or at its next write once a server that exited without reading leaves no read end. No secret goes into an argument, the server's environment or a file, as before.
|
|
50
|
+
- A run's screen recordings can be read through the API and exported from the console.
|
|
51
|
+
- The run read lists them in `recordings`: each one's `path`, `computer`, `seconds`, `bytes` and whether it is `finished`. Empty when the agent doesn't record.
|
|
52
|
+
- `GET /v2/runs/{run_id}/files/recordings/<computer>.mp4` serves one as `video/mp4`, read-only, to whoever may read the run's other files; `?download=1` for an attachment. One still being written is served as it stands.
|
|
53
|
+
- The files route answers one byte range (`Range`, `206` with `Content-Range`; past the end, `416 range_not_satisfiable`) for every file, so a `<video>` can seek: `features.files.range` is now true.
|
|
54
|
+
- A recording reaches the disk as it is made, a fragment every 2 seconds or so: a quiet screen's few frames no longer sit in ffmpeg's input probe (and a phone's PNG frames in its decoder's threads) until the recording's end.
|
|
55
|
+
- The console's Screen tab says "Recording" while a recording is written, and offers Export once it is finished.
|
|
56
|
+
- Breaking: a folder an agent makes named `recordings` at the root of its run's `work/` is no longer listed or served: that path is the run's recordings.
|
|
57
|
+
|
|
58
|
+
## 0.1.0-beta.41 (2026-11-16)
|
|
59
|
+
|
|
60
|
+
- A message sent to a working `claude-agent` run now steers it mid-turn. Before, it waited for the turn's end, and a run whose whole job is one turn read it only after the work was done. The model now reads it at its next step, after the tool calls in flight finish, in the same turn. `POST /v2/runs/{id}/messages` answers mode `steer` for a working claude-agent run (it answered `follow_up`), and `GET /v2/capabilities` lists `claude-agent` with `steer: true`.
|
|
61
|
+
- The Timeline shows the message where the model read it: after the tool call it was sent during, never where it waited in the queue. Its command row is taken in that commit.
|
|
62
|
+
- A message sent as the turn ends starts the next turn, and the run ends only after that turn.
|
|
63
|
+
- A runner lost after it placed the message, before the model took it, neither loses it nor sends it twice. The next runner places nothing again, its resumed turn carries the message if the CLI never had it, and the message is on the Timeline once.
|
|
64
|
+
- A trigger's message that answers nothing (`answers: false`), and the answer to a question the run's last turn ended on, still run as turns of their own, as before.
|
|
65
|
+
- Adapters: `AdapterEvent` gains `message_taken` (`ids`): the submissions the model was given, for a host that keeps the run's record itself. `@parcha/agentrun-harness-claude`'s session implements `steer()`, places nothing again for an id it already holds, and says `message_taken`.
|
|
66
|
+
- Deleting a Composio server in Settings → MCP servers now also removes what its save made in your Composio account, not just the Composio MCP server. That covers the connected account its connect link started (the pending link with it) and the auth config it made.
|
|
67
|
+
- **Kept while shared:** what another saved server still uses stays until the last of them is deleted.
|
|
68
|
+
- **Never deleted:** anything that was there before the save, such as an auth config or account you already had.
|
|
69
|
+
- **The answer:** a Composio server's `DELETE /v2/settings/mcp-servers/{name}` answers `200 {deleted: true, composio: {removed, note}}`. The note says what it removed, what it kept and why, and what is left when Composio refused or didn't answer (`removed: false`). The server is forgotten here either way. Before, a full removal answered `204` with no words.
|
|
70
|
+
- **Older servers:** a server saved before this change has no record of what its save made, so its delete removes only the Composio MCP server, as before.
|
|
71
|
+
- **A failed save:** a save that fails after Composio made something removes what it made (the MCP server, the account its connect link started, the auth config it made), never what it found. When Composio refuses that too, the error says what is left there. A save refused on a field (422) also says it in `details.composio`, and the console shows it under the field's words.
|
|
72
|
+
- **A save over a server:** saving a Composio server again removes the Composio MCP server the earlier save made, once the new one is saved. Saving it as another `user_id`, or with another toolkit, also removes the account or auth config the earlier save made and the server no longer uses, unless another saved server uses it. The save's answer then carries `composio: {removed, note}`, as a delete's does. While Composio triggers use the server, a save as another `user_id` or auth config is refused (`409 composio_in_use`, naming them), as its delete is; a save that keeps what they run as goes through.
|
|
73
|
+
- **Moved off Composio:** an ordinary `PUT /v2/settings/mcp-servers/{name}` that points a Composio server at another address removes what the preset made for it in Composio, as its delete would, and answers `composio: {removed, note}` too. It is refused (`409 composio_in_use`) while Composio triggers use the server.
|
|
74
|
+
- **One at a time:** Composio saves and MCP server deletes now run one after another, so a delete never removes an auth config or account that a save still in progress is reusing. An ordinary save of a Composio server lists its tools at once, and takes its turn only to write the server and clean up. If a Composio save over the server moved it meanwhile, a save that keeps the credential is refused (`412 precondition_failed`) and writes nothing, so it never points the server back at the MCP server that save removed. Other MCP servers' saves don't wait.
|
|
75
|
+
- **The console:** it shows the note, as a success when nothing is left.
|
|
76
|
+
- A self-hosted Daytona target with an Archil egress relay takes Archil mounts again; Daytona's hosted cloud still refuses them. `DAYTONA_ARCHIL_EGRESS` is a Daytona key again (optional), filling `DaytonaProvider`'s `archilEgress` option, `<IPv4 gateway>:<mount lane>:<data lane>`, checked at construction as the shared adapter checks it. A provider made with it declares `capabilities().mount` `["archil"]`, `check()` and `create()` take an Archil mount, and the helper's mount and revoke go through the relay. A provider made without it is unchanged: `check()` and `create()` refuse an Archil mount up front, before any request, in the descriptor's `unmounted.archil` words, now "Archil mounts don't work on Daytona's hosted cloud, where Archil's client hangs on its sandboxes; a self-hosted Daytona target takes one once its operator sets DAYTONA_ARCHIL_EGRESS". Set the key only for a self-hosted target: on the hosted cloud the mount waits out its bound. A Daytona GPU computer still takes no mount.
|
|
77
|
+
A descriptor may declare `mountsWith: { <kind>: "<KEY>" }`, a mount kind its computers take only where the operator sets that optional key (the kind is in `unmounted` too), and `mountsOf(descriptor, set)` gives the mounts for the keys set; `defineProvider` refuses a `mountsWith` that names no optional key or a kind `unmounted` lacks. The conformance module reads `COMPUTER_DAYTONA_ARCHIL_EGRESS`, and its `mountFor("archil")` makes a run folder only with it set.
|
|
78
|
+
In serve, a Mode 2 Daytona sandbox is ready, at its save and its run's start, where `DAYTONA_ARCHIL_EGRESS` is saved or set and `AGENTRUN_DAYTONA_SNAPSHOT` names a snapshot of `box/Dockerfile`. With the relay but no snapshot named, it is refused, saying to name one there; without the relay, it is refused as before. Settings → Computers now refuses a key saved as whitespace alone (422, `wrong_type`), as the Archil routes already do and as the environment reads one as unset: such a relay would have shown a Daytona sandbox ready that its run's start refused.
|
|
79
|
+
- The console makes and edits a feed trigger. Triggers has New feed trigger (`#/triggers/new-feed`), and a first trigger card for it when there is no trigger yet.
|
|
80
|
+
- The form takes 1 to 20 URLs, one a line, and says each one that is not http or https, holds a user or password, or is there twice, under its place in the list sent (`source.urls[i]`, as the server names it). It reads them every 15 minutes unless told, and not under the server's floor (capabilities' `min_every_s`). A JSON list's `items` and `id` pointers sit behind a "JSON list" disclosure, and "Only when" conditions on the item become its filter (`accept: [{event: "item", where}]`).
|
|
81
|
+
- There is no Test button. PLAN-feed's "What a person sees" had one that read the feeds before saving; serve has no such route. Instead, the create lands on the trigger's page, which says its first check (the create waits for it) and the note of what it starts from ("Watching 2 feeds from now: the 130 items already there won't start runs.").
|
|
82
|
+
- A feed trigger's page shows its feeds, how often they are read, its pointers, its filter, and its last check: ok or failed, its words, and when. A trigger turned off because every feed stopped says to edit its feeds. The list says each trigger's last check under its last firing.
|
|
83
|
+
- Edit feed sends the URLs, the interval, the pointers and the filter as a PATCH of the source alone, and nothing when nothing changed. A line under the URLs says that a feed added starts from now: what is in it already won't start runs.
|
|
84
|
+
- A feed trigger: `{kind: "feed", urls, every_s?: 900, items?, id?, accept?}` starts a run for each new or updated item in 1 to 20 feeds, RSS, Atom, JSON Feed or a JSON list such as GitHub's pulls API (read at its `items` and `id` pointers). It polls, so nothing outside has to reach the server.
|
|
85
|
+
- It starts watching at its first poll, which a create or a turn-on runs at once and waits on (10 seconds at most); the items already there start no run, and the check says how many. Turning it on again forgets what it read.
|
|
86
|
+
- An item fires once, and again with `update: true` when its `updated` time moves on. Each URL keeps the keys it has seen (the larger of 1,000 and twice the feed's length) in the trigger's settings, with no store change. One poll starts 20 runs at most across all its URLs, oldest first, and the check says how many wait for the next. Reads are conditional on ETag and Last-Modified.
|
|
87
|
+
- A `410`, or a `404` three checks running, stops that URL and the check names it; the trigger turns itself off (`source_unreadable`) only when every URL has stopped.
|
|
88
|
+
- Reads are held to the MCP servers' address check (no private, link-local or own address; each of at most 5 redirects checked again), plain `http` on a public address only, 20 s and 5 MB at most, and no entity declared in a DTD (such a feed is refused in words; the trigger stays on). Only XML's five named references and numeric character references decode. An Atom title, summary or content written as XHTML reads as its text, in the order it is written.
|
|
89
|
+
- The payload: `{id, link, title, published, updated, author, summary, categories, feed: {title, url}, update}` for a feed, `{id, link, title, item, update}` for a JSON list.
|
|
90
|
+
- Template packages may use feed triggers: `urls` takes parameters inside a URL, or one whole array parameter (required or with a default; given empty, apply skips the trigger with a `triggers.<i>` warning and the agent stands); `every_s`, `items` and `id` take none; `where` in values are filtered as the other kinds' are. A template eval case's `feed:` fixture serves fake feeds to the case's run and fires on its new or updated item. A triggered case, an email one included, now puts its mail or item in only once the trigger's first poll has read, so a slow first poll no longer takes it as part of the start.
|
|
91
|
+
- The generated clients and the console's types know the kind; the console lists a feed trigger with its words.
|
|
92
|
+
- The parser is fast-xml-parser 4.5.7, pinned exact (198 kB unpacked, with strnum 1.1.2 at 19 kB).
|
|
93
|
+
- A template eval's trigger clock fires a timer it moves past at once, and one the engine armed a millisecond past the time it moves to a moment later, never after the real wait it was armed with.
|
|
94
|
+
- Settings → MCP servers: the add form offers five URL presets above "Or any MCP URL", the servers the free templates use. Each one fills the name (the first free one), address, credential and toolkit, and shows a one-line note:
|
|
95
|
+
- Parallel Search (`https://mcp.parallel.ai/mcp`, no credential).
|
|
96
|
+
- Firecrawl (`https://mcp.firecrawl.dev/v2/mcp`, no credential): free without a key and rate limited. A Firecrawl key added later as a bearer token gives more.
|
|
97
|
+
- GitHub (token) (`https://api.githubcopilot.com/mcp/`, a fine-grained token as a bearer token). It has a Read-only switch for `https://api.githubcopilot.com/mcp/readonly`. It sits beside the GitHub App credential, which is unchanged.
|
|
98
|
+
- Linear (`https://mcp.linear.app/mcp`) and Notion (`https://mcp.notion.com/mcp`), with Sign in.
|
|
99
|
+
|
|
100
|
+
Preview and Save are the same as for any address. `#/settings/mcp?add=<name>&preset=<id>` (`parallel`, `firecrawl`, `github-token`, `linear` or `notion`) opens the form with that preset filled. A preset id that is none of these opens the plain form.
|
|
101
|
+
|
|
102
|
+
Choosing a preset clears a token, header rows, scopes or client typed for another server, so none of them goes to the preset's address. The presets wait until the saved servers have been read. A new server whose name is already saved can't be saved or signed in, because saving it would replace that server.
|
|
103
|
+
- A hosted machine of a dial provider can dial this server. The server mints each machine a token at its create (`art_` and 64 hex, kept as its SHA-256 until the machine's backstop or its delete), and the attach socket (`GET /v2/computers/attach`) takes it as it takes a paired computer's: the socket stands for that machine, and a hello of another kind, os or arch than the machine was made as is closed with 4400. The machine fetches this server's own computerd build with the same token from the new `GET /v2/computers/daemon?arch=amd64|arm64` (ten fetches a minute per machine, then 429). An unknown, revoked or expired token is 401 on both, and the token is in no log line. An API-only server (`AGENTRUN_API_ONLY=1`) serves both to a run's machines, and takes a paired computer's token there as unknown. The runner beside the server builds every remote provider with the server's dial: the address its machines dial (`AGENTRUN_PUBLIC_URL`; without one, a dial provider's create refuses), the tokens and the hub. A runner in its own process has none.
|
|
104
|
+
- A learned workflow whose answer quotes the pages it fetched re-picks once on a quote miss before it hands back. The learning checks refuse a draft whose step writing the answer hands back on its first miss: that step must be the body of a `loop` with `maxIters` 2 whose `until` is `not` of the answer's `quote_missing` check (the same `path`, `field` and `pages`), followed by the `quote_missing` escalate. The check is a step of the top-level chain after the loop, never inside it: a draft with a `quote_missing` escalate in the loop's body is refused, since that escalate would hand back on the first miss. The step in the loop has no `state` map, so it reads the whole run state; a `state` map passes only the keys it names, so its second pass would never see the failed draft, and a draft with one there is refused. A first miss writes the answer once more with the failed draft in its state; a second miss hands back. A loop's `until` is one predicate, so the answer's quotes must have one check: a draft whose quotes need two different `quote_missing` checks (`quotes: string | [{quote}]`, or quotes in two places) is refused, the detail asking for one place one check reads. The compile prompt asks for the same loop and the same single place. On the H5d test, re-picking kept 26 of 31 misses at about half the cost of handing every miss to the agent.
|
|
105
|
+
- A run's metrics carry `loops`: one row per loop exit of its learned workflows, `{node, iterations, met, workflow}`, so a re-pick (`iterations` 2) and whether its quotes were found (`met`) can be counted. Its model request is booked as any node's.
|
|
106
|
+
- Upgrading: a learned workflow already merged keeps serving as it is; its next compiled revision must carry the re-pick loop to pass the checks.
|
|
107
|
+
- A run takes `labels` at its start (`POST /agents/{agent_id}/runs` and `POST /runs`): a map of the caller's own strings, at most 16 keys of 1 to 63 letters, digits, `.`, `_`, `-` or `/`, each value 1 to 256 characters with no control character and no lone UTF-16 surrogate. The run keeps them as given and serves them as `labels` on every read (`{}` when none), and `GET /runs` and `GET /agents/{agent_id}/runs` take `label=<key>:<value>`, once per request, to list only the runs holding that label. Labels out of bounds are `422` under `labels` or `labels.<key>`; a filter that does not read is `400`. The server reads nothing else from them, so they are no place for a secret.
|
|
108
|
+
- On Postgres the store applies migration `0015_run_labels` (a nullable `runs.labels` column) at the server's start.
|
|
109
|
+
- On SQLite the store keeps its schema version: the server adds the nullable `runs.labels` column at its open to a data directory an earlier release set up, and every run started before reads as given none. Start the upgraded server before its runners: a runner of this release opening a data directory its server has not opened yet is refused with "Start the AgentRun server to add each run's labels before opening a runner", and nothing in the directory changes.
|
|
110
|
+
- The server takes a list of API tokens, each with an id, so a token rotates with no caller refused: add the new token, move every caller to it, then remove the old one. `AGENTRUN_TOKENS` holds the list as `id:secret` entries separated by commas or whitespace; `AGENTRUN_TOKEN` (or `DIR/.token`) keeps working as the one entry `default`, so a server with a single token needs no change. Any listed token opens every route the token opens (`/v2`, `/mcp`, `/api/v2/control`, the setup code's field); every presented token is compared against every entry in constant time, with no early return. Each request log line names the id of the token used (`token=<id>`), never the secret, and the banner lists the ids when there is more than one. An entry that is not `id:secret`, a secret under 32 characters or with whitespace or a comma, or an id or secret given twice stops the start. Set alone, `AGENTRUN_TOKENS` takes `DIR/.token`'s place (the file is neither read nor made). The list is a secret on the launcher's list, and never reaches a run's process or a runner's loops. An SDK run's credential (`ar_sdk_…`) is now signed with a secret derived from the seal key instead of the token, so no change to the list strands a live run; one signed by an earlier server keeps working while its token is listed. `deploy/README.md` gives the three steps.
|
|
111
|
+
- A template whose feed trigger takes `urls` from an array parameter with `default: []` now passes validation and reads. Apply already skipped such a trigger with a `triggers.<i>` warning; validate-template and readPackage refused it with "urls is a list of 1 to 20 feed URLs", and now agree with apply.
|
|
112
|
+
- The launcher (`agentrun-serve`) now takes `ARCHIL_API_KEY`, `E2B_API_KEY`, `ORGO_API_KEY`, `PHONE_HARNESS_API_KEY`, `AGENT37_API_KEY` and `AGENT37_SSH_KEY` out of the server's environment and hands them over its pipe, as it already did for Daytona's and Modal's keys. Before, each one set where the server started stayed in the server's own environment (`/proc/<pid>/environ`), where any process of the same user could read it and any child the server spawned with `process.env` inherited it.
|
|
113
|
+
- Archil's settings, the server's view of a run's files and Settings → Computers now read a key set where the server starts from the secrets the server holds, not from `process.env`. Before, they read `process.env`, so Settings → Computers showed Daytona's, Modal's, Browserbase's and Kernel's keys, set where the server started, as not set by the environment, and its test used only a saved key.
|
|
114
|
+
- No run is handed one of these keys. The runner's claim still reads them, and the Archil claim mints each run's own mount credential from the account key.
|
|
115
|
+
- `AGENT37_SSH_KEY` is a private key. An RSA key can take the secrets past the 4,096 bytes the launcher's pipe holds, and then the launcher refuses to start. Save that key in Settings → Computers instead, or use an Ed25519 key.
|
|
116
|
+
- A run's `learned_workflow` tool runs only what serves: a learned workflow's champion (the revision promoted last), never a revision that is replaying, queued, held or not yet decided. Before, a run its workflow did not serve first (the revision replaying with nothing promoted yet, the champion held, or the champion not taking the run's input) handed the agent the folder's newest revision to call, so an unpromoted draft could answer the run. A workflow with nothing promoted is left out of the tool; one no promotion record names (no run's input fit it yet) is offered as before.
|
|
117
|
+
- A run's learning that settles while it is read (GET /runs/{id}/learning, GET /sdk-runs/{id}) no longer reads merged or dropped with the proposal's time as its `at` once, then the learning run's end time on every read after. The learning run's row was read before its journal, so its last save could land between the two; the row is now read again when the journal holds an end the row had not seen.
|
|
118
|
+
- Signing in to a Google-backed MCP server asks for offline access, so it gets a refresh token and stays signed in. A sign-in whose authorization endpoint is on `accounts.google.com` adds `access_type=offline` and `prompt=consent`; every other authorization server's sign-in is unchanged.
|
|
119
|
+
- When the keyless web search is rate-limited, its words now name the free option too: add the free Parallel Search server in Settings → MCP servers and grant the agent its web_search. The paid Parallel key on Tool keys is still named. The Parallel Search preset's address is `https://mcp.parallel.ai/mcp`, the one Parallel's docs give; `search.parallel.ai/mcp` is its legacy address.
|
|
120
|
+
- The runner beside a local install now holds its loopback requests to the rule the server's settings routes use: never at the server's own ports (where it listens, and its public address when that is on loopback). The server tells that runner its addresses as it starts (`Serve.own`, `runnerBeside`'s `mcpOwn`). An MCP server's call, an authorization server's refresh or a pin's listing at one of those ports is refused unsent, in the server's words.
|
|
121
|
+
- Applying a template: a url MCP need whose toolkit is one of the URL presets (parallel, firecrawl, github, linear, notion) now links to Settings → MCP servers with that preset filled (`&preset=<id>`, github's is `github-token`), not an empty add form under the toolkit's name.
|
|
122
|
+
- A run whose revision has skills, whose folder is on Archil and whose computer mounts that folder no longer fails at its claim with `mkdir ".agents/skills": … 409 OperationAborted … another client holds a write delegation`. The claim now lays the revision's skills, and a learning run's seed, in the run's folder before it starts the computer. Before, it laid them after the computer's mount had taken Archil's write delegation for the folder. The disk then refused each write over its file API, and the run failed once the Workspace's retry window ran out.
|
|
123
|
+
- Both the pi spec and the CLI harnesses' spec lay in this order.
|
|
124
|
+
- A later claim of the same run lays only the skill folders that are missing. The folders an earlier claim laid, and the run's edits to them, stay as they are.
|
|
125
|
+
- Before, a learning run's seed failed silently under such a mount: the run started with no learned notes or skills laid.
|
|
126
|
+
- On SQLite, a begin, write or statement whose wait for the write lock ran out while the process was held up, on a transaction of the same process, no longer fails StoreBusy when that transaction's commit is read before the wait's busy answer: it waits on and lands. Two connections' answers come back in no set order, so the holder was looked for after it had let go.
|
|
127
|
+
- A webhook delivery whose receiver's name lookup was still out when the server stopped no longer leaves that lookup's failure (a name that answers NXDOMAIN) as an unhandled rejection, which could end the process as it stopped. The try gives up in words ("not reached: the server is stopping"). `ServeOptions.webhookLookup` is a test's seam for the receiver's name lookup, so the tests' servers answer their example webhook hosts without the system resolver.
|
|
128
|
+
- Model requests AgentRun sends to OpenRouter carry OpenRouter's app attribution headers: `HTTP-Referer: https://github.com/Parcha-ai/agentrun`, `X-OpenRouter-Title: AgentRun` and `X-OpenRouter-Categories: cloud-agent,personal-agent`. Usage then counts toward AgentRun's page on OpenRouter (openrouter.ai/apps?url=https://github.com/Parcha-ai/agentrun), including a self-hosted server's usage on its owner's own key. Set `AGENTRUN_OPENROUTER_ATTRIBUTION=off` where AgentRun starts to send none.
|
|
129
|
+
- The headers go only where a request goes to openrouter.ai itself, which covers every harness: the model proxy (claude-agent, codex, opencode, and pi on OpenRouter's Anthropic and OpenAI models), pi's translation route (every other OpenRouter model, the free ones included), and the server's Decisions providers on OpenRouter (OpenRouter's models, and Parallel's through OpenRouter). Anthropic, OpenAI, a ChatGPT plan and a gateway at another URL never get them.
|
|
130
|
+
- The kernel's host entry (`OPENROUTER_APP`, `openRouterApp`, `openRouterAttribution`) is the one place that names the app; the server hands it to the Decisions provider.
|
|
131
|
+
- The Decisions provider's `app` option takes `categories` and sends `title` as `X-OpenRouter-Title` (OpenRouter's current name for `X-Title`).
|
|
132
|
+
- `GET /v2/computers` never lists a paired computer as online with `seen_at: null`. The attach hub has a socket live before the store keeps its hello, and a list between the two read online and never seen. `seen_at` is now the live socket's hello time while the computer is attached (`AttachHub.since(id)`), else the last one kept.
|
|
133
|
+
- The probe's diagnose test holds its closed UDP port for the whole test (a socket connected elsewhere, so the kernel refuses the probe's datagram) instead of binding and freeing one, which another process on a CI runner bound and answered from.
|
|
134
|
+
|
|
5
135
|
## 0.1.0-beta.40 (2026-11-16)
|
|
6
136
|
|
|
7
137
|
- Learning: a running replay finishes. A learned workflow's revision that arrives while another revision replays no longer cancels that replay: it is queued (promotion record `decided: "queued"`), and replays at the first run's claim once the running replay is decided, whose verdict (promote or hold) stands. Only the newest queued revision replays next: one queued before it is `decided: "skipped"`, with `skipped_by` naming the newer revision and a reason that says so. The queue is the promotion records in the store, so a restart keeps it. Upgrading: `decided: "superseded"` and `superseded_by` are gone from the promotion records, and from a replay read's `decided`; read `queued`, `skipped` and `skipped_by` instead.
|
package/NOTICE
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
AgentRun
|
|
2
2
|
Copyright 2026 Parcha Labs, Inc.
|
|
3
3
|
|
|
4
|
+
The boxd computer provider (packages/computer/src/boxd.ts) was contributed by Michiel Voortman.
|
|
5
|
+
|
|
4
6
|
The console in dist/console bundles third-party software. dist/console/THIRD-PARTY-NOTICES.txt names each
|
|
5
7
|
package it holds, with its version, its license and its license text.
|
|
6
8
|
|
package/README.md
CHANGED
|
@@ -91,6 +91,16 @@ address people open (a container's published port, or a proxy's URL): the printe
|
|
|
91
91
|
use it. `AGENTRUN_FREE_MODEL_REQUESTS` (default 60) is the most requests on free models a run makes
|
|
92
92
|
([a limit on free requests](#a-limit-on-free-requests)).
|
|
93
93
|
|
|
94
|
+
`AGENTRUN_TOKENS`, when set, is a list of more tokens, each with an id: `id:secret` entries separated by commas or
|
|
95
|
+
whitespace (each secret follows the token's rules, and holds no comma). `AGENTRUN_TOKEN`'s token is the entry `default`;
|
|
96
|
+
set alone, the list takes `DIR/.token`'s place, and its first entry is the server's token. Any token on the list opens
|
|
97
|
+
every route the token opens (`/v2`, `/mcp`, the setup code's field), and each presented token is compared against every
|
|
98
|
+
entry in constant time. Each request line names the id of the token used (`token=<id>`), or `session=owner` or
|
|
99
|
+
`session=console` for the console's own requests, never a secret. The banner lists the ids when there is more than one.
|
|
100
|
+
An id or a secret given twice, or an entry that is not `id:secret`, stops the start. The list is a secret like the token:
|
|
101
|
+
the launcher hands it over its pipe, and no run's process or runner loop gets it. A rotation adds the new token, moves
|
|
102
|
+
callers, then removes the old one ([deploy/README.md](../../deploy/README.md#rotating-the-api-token)).
|
|
103
|
+
|
|
94
104
|
## Sandbox in 60 seconds
|
|
95
105
|
|
|
96
106
|
An agent with a shell, in a Docker container of its own: on a machine with Docker, in a checkout built as above, with
|
|
@@ -630,6 +640,10 @@ has the Docker client (Debian's `docker-cli`) and no daemon; `group_add` gives t
|
|
|
630
640
|
with the file tools and no shell.
|
|
631
641
|
- On a host the server finds no container of its own and asks Docker nothing: a box binds this machine's paths and its
|
|
632
642
|
proxy's directory is under `/tmp`, as before.
|
|
643
|
+
- **ffmpeg.** The image has an `ffmpeg` built for the screen recorder alone, which records an agent's screen where its
|
|
644
|
+
computer says `record: true` ([A video of each run](#computers)): one static binary of about 6 MB that reads PNG and
|
|
645
|
+
JPEG frames and writes H.264 in MP4, and nothing else. FFmpeg 9.0.2 with x264, so it is GPL, as Debian's ffmpeg is;
|
|
646
|
+
the licence files are in `/usr/local/share/doc/ffmpeg`.
|
|
633
647
|
|
|
634
648
|
<a id="boxes"></a>
|
|
635
649
|
|
|
@@ -641,8 +655,8 @@ Settings → Computers. The kind says what the agent is given, and the provider
|
|
|
641
655
|
| Kind | What the agent gets | Providers |
|
|
642
656
|
|---|---|---|
|
|
643
657
|
| `none` | The run's folder alone: no computer, and no provider (`{"kind": "none"}`) | |
|
|
644
|
-
| `sandbox` | A Linux shell, with files and processes | `docker`, `daytona`, `modal`, `e2b` |
|
|
645
|
-
| `desktop` | The computer's tools (`computer_observe`, `computer_act`, `computer_screenshot`), the computer as `codemode`'s `computer`, and a shell where its provider mounts the run's folder | `docker` (with an image that has an X server), `e2b`, `orgo`, or [a paired computer](#a-persons-own-computer) by its id |
|
|
658
|
+
| `sandbox` | A Linux shell, with files and processes | `docker`, `daytona`, `modal`, `e2b`, `boxd`, `cloudflare` (through a relay Worker you deploy) |
|
|
659
|
+
| `desktop` | The computer's tools (`computer_observe`, `computer_act`, `computer_screenshot`), the computer as `codemode`'s `computer`, and a shell where its provider mounts the run's folder | `docker` (with an image that has an X server), `e2b`, `orgo`, `boxd`, or [a paired computer](#a-persons-own-computer) by its id |
|
|
646
660
|
| `phone` | A rented Android, through the same computer tools | `phone-harness` |
|
|
647
661
|
| `browser` | A hosted browser (the browser tools) | `browserbase`, `kernel` |
|
|
648
662
|
|
|
@@ -676,8 +690,11 @@ whether this server offers it now, the tools it brings, and each provider with i
|
|
|
676
690
|
the owner's signed-in session only (the API token is 403), and `POST /v2/computers/{provider}/test` makes one read at
|
|
677
691
|
the provider with them and starts nothing. A key set in the server's environment wins over the saved one. The keys are
|
|
678
692
|
`DAYTONA_API_KEY` (with `DAYTONA_API_URL` and `DAYTONA_TARGET` optional), `MODAL_TOKEN_ID` and `MODAL_TOKEN_SECRET`,
|
|
679
|
-
`E2B_API_KEY`, `
|
|
680
|
-
`
|
|
693
|
+
`E2B_API_KEY`, `AGENT37_API_KEY` and `AGENT37_SSH_KEY`, `MORPH_API_KEY`, `ORGO_API_KEY`, `PHONE_HARNESS_API_KEY`,
|
|
694
|
+
`BROWSERBASE_API_KEY` and `BROWSERBASE_PROJECT_ID`, `KERNEL_API_KEY`, `BOXD_API_KEY` (with `BOXD_ORG` and
|
|
695
|
+
`BOXD_REGION` optional), `CLOUDFLARE_RELAY_URL` and `CLOUDFLARE_RELAY_TOKEN` (the relay Worker's,
|
|
696
|
+
`packages/computer/relays/cloudflare`), and `FLY_API_TOKEN` and `FLY_APP`; Docker takes none.
|
|
697
|
+
The vendors bill their computers by time on their own pages: this server meters no
|
|
681
698
|
computer time. The older [`place`](#place) is this setting's v2 view: `{"mode": "runner"}` is kind `none`, and
|
|
682
699
|
`{"mode": "sandbox", "box": X}` is a sandbox on provider X. Writing either sets both.
|
|
683
700
|
|
|
@@ -690,6 +707,13 @@ They apply to Docker computers only: a vendor's computer (Daytona, Modal, E2B, O
|
|
|
690
707
|
size its provider makes it, and is never given them. A value the Docker provider refuses stops the server's start, in
|
|
691
708
|
the provider's words.
|
|
692
709
|
|
|
710
|
+
**A phone's apps.** A phone has its stock apps. To give every phone more, the operator names APK files on the machine
|
|
711
|
+
that drives the phones (the server's, or its runner's) in that machine's environment, each pinned by its sha256:
|
|
712
|
+
`PHONE_HARNESS_APKS=/srv/apks/wikipedia.apk@sha256:<64 hex digits>`, a comma list. Only the operator sets it: no agent
|
|
713
|
+
setting, API or Settings page names an APK, and the server downloads nothing. Each phone installs them
|
|
714
|
+
(`pm install -r`) before the agent starts on it. A file that is not there, or whose bytes are not its pin, refuses the
|
|
715
|
+
claim in words before a phone is rented; a value that is not such a list refuses every phone, naming the entry.
|
|
716
|
+
|
|
693
717
|
**GPUs.** A sandbox may ask for GPUs: `computer: {"kind": "sandbox", "provider": "daytona", "gpu": {"type": "H100",
|
|
694
718
|
"count": 1}}`. `GET /v2/computers` shows each sandbox provider's `gpu`: the types it gives, by the vendor's own names, the
|
|
695
719
|
most one computer gets, and where a GPU computer differs from its others. A provider whose GPU computers cannot hold
|
|
@@ -701,9 +725,9 @@ computer is made with the GPUs asked.
|
|
|
701
725
|
`types: ["H100"]`, `max: 1`); another type or count needs a snapshot of its own, so it is refused. A GPU sandbox is
|
|
702
726
|
made from that snapshot, with its 16 vCPUs, 100 GiB of memory and 400 GiB of disk, in region `earth`. Stopping it
|
|
703
727
|
deletes it: it has no pause and no snapshot, so nothing on it outlives the run. A Daytona GPU may be preempted, so a
|
|
704
|
-
run on one can be cut short. The Daytona org needs GPU credits.
|
|
705
|
-
|
|
706
|
-
|
|
728
|
+
run on one can be cut short. The Daytona org needs GPU credits. A Daytona GPU sandbox takes no Archil mount (its
|
|
729
|
+
GPU host gives no `/dev/fuse`), so it can't hold the run's folder: Mode 2 refuses it, and in Mode 1 a sandbox runs
|
|
730
|
+
on Docker only, so a Daytona GPU sandbox runs on neither mode's server today.
|
|
707
731
|
- **Modal** declares its GPUs, but a Modal GPU sandbox runs on gVisor, and the Archil mount the run's folder needs is not
|
|
708
732
|
proven there. So this server refuses a Modal sandbox with a `gpu` for now. A Modal GPU is also preemptible.
|
|
709
733
|
|
|
@@ -724,6 +748,37 @@ one computer that it keeps between runs, instead of a fresh one for each run:
|
|
|
724
748
|
- The computer is owned by this server's id (kept in its store) and the agent's id, so two servers on one vendor
|
|
725
749
|
account never take each other's. The janitor deletes an agent's computer only once its agent no longer wants it.
|
|
726
750
|
|
|
751
|
+
**A video of each run.** `computer: {"kind": "desktop", "provider": "e2b", "record": true}` records the computer's
|
|
752
|
+
screen during each of the agent's runs. Off by default; a desktop or a phone only (another kind is 422).
|
|
753
|
+
|
|
754
|
+
- **It shows everything on the screen.** That includes what a person types while they have taken over the computer, and
|
|
755
|
+
any password, key or private page shown on it. Pixels can't be redacted. Turn it on only for an agent whose screen
|
|
756
|
+
you would be fine to keep and share.
|
|
757
|
+
- **What it records.** The screen while the run holds its computer: from the claim's attach until the computer's
|
|
758
|
+
release or the run's end. A parked run's recording pauses and goes on in a new file when the run resumes. At most 10
|
|
759
|
+
frames a second, 1280 pixels on the long side, no sound, H.264 in fragmented MP4, so a file cut short still plays.
|
|
760
|
+
Each frame is stamped with the time it came, so the video plays at the screen's own pace. The recorder watches the screen on a connection of its own, so it
|
|
761
|
+
records with no viewer open, and it never holds up the live view or the agent: a frame that comes while the encoder is
|
|
762
|
+
still busy replaces the one waiting.
|
|
763
|
+
- **Where it goes.** `recordings/<computer>.mp4` in the run's folder on the machine that runs it
|
|
764
|
+
(`<data>/disk/agents/<agent>/runs/<run>/recordings`, beside the run's `work/` folder, never in it, so the agent can't
|
|
765
|
+
read or change it). It is kept with the run's files. A phone whose frames change from PNG to JPEG, and a resumed run,
|
|
766
|
+
go on in `<computer>-2.mp4` and so on.
|
|
767
|
+
- **Reading it.** The run read (`GET /v2/runs/{run_id}`) lists them in `recordings`: each one's `path`, `computer`,
|
|
768
|
+
`seconds`, `bytes` and whether it is `finished` (false while it is still being written; every file is finished a few
|
|
769
|
+
seconds after the run ends, once its encoder has let go of it). A recording reaches the disk as it is made, a
|
|
770
|
+
fragment every 2 seconds or so. `GET /v2/runs/{run_id}/files/recordings/<computer>.mp4` serves one as `video/mp4`, read-only, to
|
|
771
|
+
whoever may read the run's other files, with byte ranges (`206`) so a `<video>` can seek, and `?download=1` for an
|
|
772
|
+
attachment. One still being written is served as it stands: it plays up to its last whole fragment. The console's
|
|
773
|
+
Screen tab says "Recording" while one is written and offers Export once it is finished. The server reads the folder
|
|
774
|
+
on its own machine, where the runner beside it recorded. A folder the agent makes named `recordings` at the root of
|
|
775
|
+
its `work/` is neither listed nor served: that path is its recordings. What the video can show is said above.
|
|
776
|
+
- **Its caps.** 500 MB across a run's files, a resumed run's included, and 2 hours of recording from its start or the
|
|
777
|
+
run's resume, whichever comes first. At a cap the recording stops, and the run's timeline says so. So does an encoder that stops by itself (a crash, a full disk) or a screen that stops
|
|
778
|
+
answering. The run itself never fails because of its recording.
|
|
779
|
+
- **It needs ffmpeg** on the server's `PATH` (the published image has it). A server without it refuses `record: true`
|
|
780
|
+
when the agent is saved, with 422 `not_allowed` naming the fix.
|
|
781
|
+
|
|
727
782
|
#### A person's own computer
|
|
728
783
|
|
|
729
784
|
A computer of your own (a laptop, a desktop, a phone) can be an agent's computer. A driver on it dials this server and
|
|
@@ -776,7 +831,12 @@ passes the binding's conformance cases (below) needs no change here.
|
|
|
776
831
|
work. E2B's says `prepareImage` as well, and it answers our public box template by name
|
|
777
832
|
(`<publisher>/agentrun-archil-<recipe hash>`, which the release builds and makes public), with no call, so an E2B
|
|
778
833
|
sandbox and desktop are ready once the key works; the desktop mounts the folder too (it has files and exec). Docker's
|
|
779
|
-
sandbox is refused, since it cannot mount the disk
|
|
834
|
+
sandbox is refused, since it cannot mount the disk. Daytona's is refused on Daytona's hosted cloud, where Archil's
|
|
835
|
+
client hangs on its sandboxes. On a self-hosted Daytona target whose sandboxes reach Archil through an Archil egress
|
|
836
|
+
relay, save the relay's address as `DAYTONA_ARCHIL_EGRESS` (Settings → Computers, beside `DAYTONA_API_KEY`) and name
|
|
837
|
+
a snapshot of `box/Dockerfile` in `AGENTRUN_DAYTONA_SNAPSHOT` (below): the Daytona sandbox then mounts the run's
|
|
838
|
+
folder and is ready. With the relay but no snapshot named, it is refused, saying to name one. A boxd sandbox takes no
|
|
839
|
+
mount yet, so it is refused in both modes; a boxd desktop runs in either.
|
|
780
840
|
|
|
781
841
|
The PUT is a secret write, so it takes the owner's signed-in session. A server with none to give it (API only, or
|
|
782
842
|
`AGENTRUN_ACCOUNTS=0` reached beyond loopback) is set where it is started instead: `AGENTRUN_ARCHIL_REGION` and
|
|
@@ -841,8 +901,9 @@ the computer package's `box/Dockerfile` is built in the organization of `DAYTONA
|
|
|
841
901
|
DAYTONA_API_KEY=... python3 packages/computer/box/build-daytona.py # prints snapshot=agentrun-archil-<12 hex>
|
|
842
902
|
```
|
|
843
903
|
|
|
844
|
-
A Daytona computer
|
|
845
|
-
|
|
904
|
+
A Daytona computer mounts the run's folder only where `DAYTONA_ARCHIL_EGRESS` names a self-hosted target's Archil
|
|
905
|
+
egress relay (see Mode 2 above), and then it needs this snapshot. A changed recipe is a new name, so build again after
|
|
906
|
+
an upgrade that changes `box/`. A Daytona [box](#sandbox) never reads it.
|
|
846
907
|
|
|
847
908
|
A desktop, a phone and a browser run in either mode. The run's folder is at
|
|
848
909
|
`/workspace` in every computer that mounts it: a sandbox always, and a desktop whose provider mounts the mode's folder
|
|
@@ -1272,7 +1333,8 @@ Exa takes keyless use only over IPv4, straight to its endpoint (through a proxy
|
|
|
1272
1333
|
free limit Exa answers a `429` with a Retry-After, or a tool result it marks rate-limited (`ai.exa/rateLimited`); the
|
|
1273
1334
|
search is tried once more after a jittered 1 to 3 s, or the Retry-After Exa names when it is 5 s or less (a longer one, as
|
|
1274
1335
|
for its daily limit, is not waited out). Still limited, the tool answers `{error}` in our words: `Free web search is
|
|
1275
|
-
rate-limited right now. Try again in a minute
|
|
1336
|
+
rate-limited right now. Try again in a minute; add the free Parallel Search server in Settings → MCP servers and grant
|
|
1337
|
+
the agent its web_search; or add a Parallel key in Settings → Tool keys to search with a key.` Any
|
|
1276
1338
|
other failure Exa answers reads `Free web search failed. Exa said: "<the first sentence of its text>"`, cut at 120
|
|
1277
1339
|
characters; Exa's own instructions (a key for its MCP URL) are never passed on.
|
|
1278
1340
|
|
|
@@ -1668,7 +1730,7 @@ out an action it was allowed (it did for `HACKERNEWS_GET_FRONTPAGE`), so the ans
|
|
|
1668
1730
|
action the saved server doesn't list. Both routes are the owner's
|
|
1669
1731
|
session alone, and a saved Composio server is gated, approved and shown on the Timeline as any MCP server's tools are,
|
|
1670
1732
|
"not metered" until you price them. Composio's own meta tools stay refused, and the helper actions that connect an
|
|
1671
|
-
account are left off the server's address. Deleting the server in Settings deletes
|
|
1733
|
+
account are left off the server's address. Deleting the server in Settings deletes what its save made in Composio too, with the saved key: the Composio MCP server, the connected account its connect link started (the link with it) and the auth config it made (Composio's "already gone" is fine). What another saved server uses is kept until the last of them goes, and what was there before the save (an auth config or account you had) is never deleted. The `DELETE` answers `200 {deleted: true, composio: {removed, note}}`: the note says what it removed, what it kept and why, and, when Composio refuses or does not answer, what is left to remove in Composio yourself (`removed: false`; the server is still forgotten here). The console shows it. A save that fails removes in Composio what it made there and never what it found, and its error names what is left when Composio refuses that too (a 422 on a field says it in `details.composio` as well). A save over a preset server removes, once it is saved, the Composio MCP server its earlier save made, and what that save made and the new one no longer stands on (the account of another `user_id`, the auth config of another toolkit), with the key it was made with, unless another saved server uses it, and answers `composio: {removed, note}` saying so. An ordinary `PUT` that moves a preset server to another address makes it another service's server: it removes what the preset made for it in Composio as its delete would, and answers `composio` too. While Composio triggers use the server, that move, and a preset save over it as another `user_id` or auth config, are refused as its delete is (`409 composio_in_use`, naming them). Preset saves and MCP server deletes run one at a time, so a delete never removes what a save in progress reuses; an ordinary save of a preset server lists its tools at once and takes its turn only to write the server and clean up.
|
|
1672
1734
|
[Connect Composio tools and triggers](../../docs/tutorials/composio.md) walks through the preset and a Composio
|
|
1673
1735
|
trigger in the console, with each step's API call.
|
|
1674
1736
|
|
|
@@ -1767,7 +1829,21 @@ every request to one) must be `https` and resolve to no private, loopback or lin
|
|
|
1767
1829
|
refresh is refused with words and nothing is sent. A loopback MCP server (a `127.0.0.1` or `localhost` URL) is taken only
|
|
1768
1830
|
by a server started with `AGENTRUN_MCP_ALLOW_LOOPBACK=1`, which says this is a local install: set it only on a machine you
|
|
1769
1831
|
alone use, since loopback is this machine's other services too. Without it such a URL is refused at the save, the preview
|
|
1770
|
-
and the sign-in, in words naming the variable, and a runner never reaches one
|
|
1832
|
+
and the sign-in, in words naming the variable, and a runner never reaches one. The runner beside such a server reaches
|
|
1833
|
+
one, never at that server's own ports (where it listens, and its public address when that is on loopback), which the
|
|
1834
|
+
server tells it as it starts.
|
|
1835
|
+
|
|
1836
|
+
A runner in its own process (`agentrun-serve runner`, in the server's container or in a service of its own) takes the
|
|
1837
|
+
variable from its own environment alone, never from the server, the store or the data directory. Started with
|
|
1838
|
+
`AGENTRUN_MCP_ALLOW_LOOPBACK=1`, its runs reach an MCP server on its own loopback: the machine (or container) that runner
|
|
1839
|
+
runs on, which is the server's only when they share one. So each such runner needs the variable and, at the MCP
|
|
1840
|
+
server's address, a server or forwarder on its own loopback. Without the variable it is refused, whatever the server
|
|
1841
|
+
says. Such a runner never reaches loopback at a server's own port: 7340 (where a server listens unless `--port` says
|
|
1842
|
+
otherwise), its own `AGENTRUN_PUBLIC_URL`'s port when that address is on loopback, and the addresses the server keeps in
|
|
1843
|
+
the store at each start (where it listens, whatever its port), read at each claim. Those addresses are all it reads of
|
|
1844
|
+
the server; it says on stderr at its start that it takes the variable. For any runner, an MCP server, a refresh's endpoint or a calendar at a refused port is refused unsent, as at a
|
|
1845
|
+
save.
|
|
1846
|
+
|
|
1771
1847
|
An MCP server's URL is shown on every read as its origin and `/…`: its path and query are held as a secret, sent only to
|
|
1772
1848
|
the server itself, and sending the shown URL back for a saved server keeps the saved one. A loopback MCP server is a development-only exception: its
|
|
1773
1849
|
authorization server may name endpoints on the MCP server's own loopback host, exactly as its URL writes it (never
|
|
@@ -1775,7 +1851,9 @@ another loopback address, the IPv6 loopback, or a name for this machine in its p
|
|
|
1775
1851
|
loopback endpoint is refused the same way. The host is pinned, not the port, as a local authorization server listens on
|
|
1776
1852
|
its own port. What that leaves: such an authorization server can still have this server send its sign-in and refresh
|
|
1777
1853
|
requests to other ports on that same loopback host (a port Docker publishes there, say), blind, learning only the
|
|
1778
|
-
endpoint and its status, never a body. That is why the allowance is for development only.
|
|
1854
|
+
endpoint and its status, never a body. That is why the allowance is for development only. A sign-in at Google's authorization endpoint
|
|
1855
|
+
(`accounts.google.com`) asks for offline access (`access_type=offline` and `prompt=consent`), the one way Google gives a
|
|
1856
|
+
refresh token; any other authorization server's page is opened as it was. The callback exchanges the code, seals the token set (access and refresh tokens, expiry,
|
|
1779
1857
|
scopes, the client and its secret) under `AGENTRUN_SEAL_KEY`, bound to the server's name, lists the tools as a `PUT`
|
|
1780
1858
|
does, and redirects to the console's MCP servers page, `/#/settings/mcp?server=<name>&sign_in=ok` (or
|
|
1781
1859
|
`sign_in=failed&error=<code>`). The redirect URI is this server's own callback under its address: on loopback, the
|
|
@@ -2367,14 +2445,14 @@ failed, 2 when nothing ran. The runner, the graders and the report are in
|
|
|
2367
2445
|
| `POST /agents/{id}/current` | `{revision}`: one of the agent's revisions becomes current again. |
|
|
2368
2446
|
| `POST /agents/{id}/archive`, `POST /agents/{id}/unarchive` | [Archiving](#archiving): hides the agent and its runs from the lists, or shows them again. Answers the agent, with `archived_at`. |
|
|
2369
2447
|
| `DELETE /agents/{id}/sign-ins/{key}` | This server's own route (`x-agentrun-serve: "signins/1"`): forgets one of the agent's [saved sign-ins](#saved-sign-ins), at its vendor and here. `409 sign_in_held` while a run holds its save lease, or while a run it was handed is still going. |
|
|
2370
|
-
| `POST /agents/{id}/runs`, `GET /agents/{id}/runs` | A run of the current revision, or of `revision`. An agentic run's input is `{content: string}`; a workflow run's is what its workflow's input schema takes. `file_ids` names [uploaded](#uploads) files, copied into the run's `work/inputs/` before it starts and named in its first message. The agent's runs, newest first. |
|
|
2371
|
-
| `GET /runs` | Every agent's runs, newest first, a page of at most 100; `agent`, `revision` and `status` narrow it, and `archived=true` lists only archived ones. A failed run's summary carries its `error`, and a waiting run's its `pending`. |
|
|
2448
|
+
| `POST /agents/{id}/runs`, `GET /agents/{id}/runs` | A run of the current revision, or of `revision`. An agentic run's input is `{content: string}`; a workflow run's is what its workflow's input schema takes. `file_ids` names [uploaded](#uploads) files, copied into the run's `work/inputs/` before it starts and named in its first message. `labels` (this server's own, `runlabels/1`) is the caller's map of its own strings for the run: at most 16 keys, each 1 to 63 letters, digits, `.`, `_`, `-` or `/` starting with a letter or a digit, each value 1 to 256 characters with no control character; kept as given, served as `labels` on every read of the run (`{}` when none), never read by the server otherwise, so no place for a secret. The agent's runs, newest first; `label` filters them as `GET /runs` does. |
|
|
2449
|
+
| `GET /runs` | Every agent's runs, newest first, a page of at most 100; `agent`, `revision` and `status` narrow it, `label=<key>:<value>` (`runlabels/1`, split at the first `:`, once per request) keeps the runs holding that label, and `archived=true` lists only archived ones. A failed run's summary carries its `error`, and a waiting run's its `pending`. |
|
|
2372
2450
|
| `GET /runs/{id}` | The run: its revision, kind, status, state, result, error, `pending` (this server's own, `pending/1`: what a waiting run waits on, by `kind`: `{kind: "question", question, asked_at}` for a question it asked a person; `approval` for a tool call held for a person's approval, with the tool, its arguments and its price; `budget` for a run paused at its cap ([a run paused at its cap](#a-run-paused-at-its-cap)); `{kind: "browser", instruction, completion_condition, asked_at, expires_at}` for its agent's ask for the owner in its browser; or `{kind: "computer", computer: "desktop" | "phone", instruction, completion_condition, asked_at, expires_at}` for its agent's ask for the owner on its desktop or phone; else null, a stopped turn's included) and cost (`basis: estimate`; $0 before its first model request, a cancelled run's included). |
|
|
2373
2451
|
| `GET /runs/{id}/timeline` | JSON pages with the change-number cursor (`after`, `next_after`, `reset`, `drop`, `has_more`, `final`, `wait_ms` long poll, and this server's own `limit`, 1 to 500 rows a page, default 500), or server-sent events with `Accept: text/event-stream` (`id` is the cursor, `Last-Event-ID` resumes). Rows sort by `seq`; the usage row (`Cost so far`), the run's running total, is always the last row, and moves to the end when a row comes after it. |
|
|
2374
2452
|
| `POST /runs/{id}/messages` | To an agentic run: `steer` while the agent works, `answer` when it asked the person, `follow_up` after a stop or after it completed: a completed run opens again, the same run on its own session and store, takes a place under `--max-runs` (it waits for one when none is free), and completes again. A failed or cancelled run, an archived run and a run of an archived agent are `409 not_continuable`; a workflow run takes none (`501`). |
|
|
2375
2453
|
| `POST /runs/{id}/stop`, `POST /runs/{id}/cancel` | Stop ends an agentic run's turn and leaves the run `input_required` and idle. Cancel ends a run `cancelled` once its process has exited. |
|
|
2376
2454
|
| `POST /runs/{id}/archive`, `POST /runs/{id}/unarchive` | [Archiving](#archiving) one run. Answers the run, with `archived_at`. |
|
|
2377
|
-
| `GET /runs/{id}/files`, `GET /runs/{id}/files/{path}` | The files under the run's `work/`, raw. |
|
|
2455
|
+
| `GET /runs/{id}/files`, `GET /runs/{id}/files/{path}` | The files under the run's `work/`, raw, one byte range at a time on asking (`Range`, `206`); and its screen recordings under `recordings/` ([A video of each run](#computers)). |
|
|
2378
2456
|
| `POST /files`, `PUT /files/{id}`, `GET /files`, `GET` and `DELETE /files/{id}` | [Uploads](#uploads): a file sent in one call (`POST /v2/files?path=...`, its bytes the body), or reserved and then sent (`PUT /v2/files/{id}`); the server's uploads listed, read and deleted. |
|
|
2379
2457
|
| `GET /agents/{id}/home/files`, and `GET`, `PUT`, `DELETE` on a file's path below it | The files in the agent's home, listed, read, written and deleted ([agent home](#agent-home)). This server's own routes (`x-agentrun-serve: "home/1"`). |
|
|
2380
2458
|
| `GET /stats` | This server's own route, outside the contract (`x-agentrun-serve: "stats/1"`): the agents, the runs (`total`, `active`, `needs_input`, `failed`, `needs_review`, `status_unknown`), each agent's run count, the cost and what is archived, read from the agent store's aggregates alone, no run's files opened. Archived agents and runs are left out of every number but `archived`. A completed or cancelled run counts only in `runs.total`, but for an escalated one (completed, waiting for a person's review), which `needs_review` (`stats/3`) counts; `failed` never does. Each running run is in exactly one of `active` (queued or working) and `needs_input` (`input_required`), both from the runs this server holds, and `status_unknown`: a running run it does not hold, or holds as ended before its end is written. `cost.usd` sums the runs that ended with a cost and is null when none did, never $0, with `basis` `estimate`, or null beside a null `usd`; `unknown_runs` counts the rest. `analytics` (`stats/2`) sums the runs' metrics over the runs not archived that `from` and `to` (RFC 3339 date-times to the millisecond, an impossible one or a finer fraction refused; runs started in [`from`, `to`)) and `agent` pick, each optional, 400 when malformed: `filter` echoes them; `totals` (runs, completed, an escalated run included, `needs_review` (`stats/3`), failed, never an escalated run, `runs_with_metrics`, tokens and each token kind, requests, unmetered, `cost_usd` and `unknown_cost_runs`), `time` (`wall_ms` over the ended runs, `active_ms` where metrics have it), `by_harness_effort`, `by_day` (UTC), `by_source` (`live` or the import source) and the top 20 `tools`. A run with no metrics counts in `runs` and in no token sum. `learning` (`learning/1`) counts the runs that tried to learn over the same filters, from the store ([Learning](#learning)). The query bounds `analytics` and `learning` alone. |
|
|
@@ -2398,6 +2476,50 @@ Quotes answer `501 unsupported_here` naming the feature. Home export and import
|
|
|
2398
2476
|
`info.x-agentrun-serve.not_served` lists them). Capabilities declare each of the four false. No run waits out `input_wait_s` here (`null`). `limits.max_cost_usd` is the highest cap a run may name: `null` here, as any cap
|
|
2399
2477
|
above $0 is taken; it does not mean caps are unsupported ([spend cap](#spend-cap)).
|
|
2400
2478
|
|
|
2479
|
+
### Feed triggers
|
|
2480
|
+
|
|
2481
|
+
A feed trigger starts a run for each new or updated item in one or more feeds: RSS (2.0 and 1.0), Atom, JSON Feed, or a
|
|
2482
|
+
plain JSON list such as GitHub's pulls API. It polls, as the email trigger does, so nothing outside has to reach the
|
|
2483
|
+
server.
|
|
2484
|
+
|
|
2485
|
+
**The source.** `{kind: "feed", urls, every_s?: 900, items?, id?, accept?}`. `urls` is 1 to 20 `http` or `https` URLs,
|
|
2486
|
+
no two alike, each read every `every_s` seconds (the schedules' bounds). `items` and `id` are JSON Pointers for a JSON
|
|
2487
|
+
list: where its array is (`""`, the whole answer, by default) and where each item's id is (`/id` by default). A rule's
|
|
2488
|
+
`accept` takes the event `item`; its `where` reads the payload.
|
|
2489
|
+
|
|
2490
|
+
**From the first poll.** A feed trigger starts watching at its first poll: making it, or turning it on again, polls at
|
|
2491
|
+
once and answers when that poll has (10 s at most). The items already in its feeds start no run, and the check says so
|
|
2492
|
+
(`Watching <feed> from now: the 25 items already there won't start runs.`). Turning it on again forgets what it read, so it
|
|
2493
|
+
starts again from that poll; editing it keeps what it read. A URL added by an edit starts the same way at its own first
|
|
2494
|
+
read.
|
|
2495
|
+
|
|
2496
|
+
**What fires.** Each item fires once, and again when its `updated` time moves past the one it fired on (an
|
|
2497
|
+
incident that is updated); items with no id are told apart by link, then by title and date. Each URL keeps the keys of
|
|
2498
|
+
the items it has seen, the larger of 1,000 and twice the feed's length, so an item that drops off and comes back stays seen.
|
|
2499
|
+
One poll starts 20 runs at most across all its URLs, oldest first; the rest wait for the next poll, which the check says
|
|
2500
|
+
(`Read <feed>: 26 new, 6 more at the next check.`). Each read is conditional on the last ETag and Last-Modified, and a
|
|
2501
|
+
`304` reads nothing. A JSON list's item has no feed date of its own: it fires once, and again with `update: true` only when
|
|
2502
|
+
the source names an `updated` pointer (`"/updated_at"`) and the date there moves on. An item first seen with no date there
|
|
2503
|
+
does not fire when it gains one.
|
|
2504
|
+
|
|
2505
|
+
**When a feed fails.** A read that fails (no answer, an HTTP error, a body that isn't a feed) is said in the trigger's last
|
|
2506
|
+
check and read again at the next poll; nothing it saw is lost. A `410`, or a `404` three checks running, stops that URL:
|
|
2507
|
+
it is no longer read and the check names it. The trigger turns itself off (`source_unreadable`) only when every URL it
|
|
2508
|
+
reads has stopped; edit its `urls`, then turn it on again.
|
|
2509
|
+
|
|
2510
|
+
**Where it may read.** The same address check as an [MCP server](#mcp-servers)'s requests: no private, link-local or
|
|
2511
|
+
loopback address and no address of this machine, every address a name resolves to checked and the one dialled checked
|
|
2512
|
+
again, each redirect (5 at most) checked as the first URL is. Plain `http` is read on a public address only; a private host
|
|
2513
|
+
the owner allows for MCP sign-in is read over `https` only. A read takes 20 s at most and a body over 5 MB is refused.
|
|
2514
|
+
A feed that declares an entity in a DTD is refused.
|
|
2515
|
+
|
|
2516
|
+
**The payload.** An RSS, Atom or JSON Feed item: `{id, link, title, published, updated, author, summary, categories,
|
|
2517
|
+
feed: {title, url}, update}`, with `summary` as plain text of 4,000 characters at most and `update` true when the item
|
|
2518
|
+
was seen before and has been updated since. A JSON list item: `{id, link, title, item, update}`, `item` the raw object (cut down,
|
|
2519
|
+
with `item_truncated`, when it would pass 16 KB). A JSON list's source may name `fields`, 1 to 50 JSON Pointers into an
|
|
2520
|
+
item (`["/number", "/title", "/html_url", "/user/login"]`): `item` then keeps only those, each at its own place, before the
|
|
2521
|
+
16 KB cap, so a pull request that is large whole fires without `item_truncated`. A run it starts is titled `Feed <trigger name>: <item title>`, and its payload is marked untrusted.
|
|
2522
|
+
|
|
2401
2523
|
### API only
|
|
2402
2524
|
|
|
2403
2525
|
`AGENTRUN_API_ONLY=1` is for a server that runs behind its caller's backend and is never opened in a browser. It
|
|
@@ -2588,6 +2710,7 @@ than one segment after its provider (`anthropic/anthropic/claude-sonnet-5.5`) is
|
|
|
2588
2710
|
that refuses the run's key (401) fails the run naming the key and where to set it ("OpenRouter refused
|
|
2589
2711
|
OPENROUTER_API_KEY (401: User not found): set it where AgentRun starts, or save it in Settings → Model keys."), on every
|
|
2590
2712
|
harness, with the provider's first sentence only.
|
|
2713
|
+
Every request to OpenRouter carries AgentRun's app attribution (`HTTP-Referer: https://github.com/Parcha-ai/agentrun`, `X-OpenRouter-Title: AgentRun`), so a self-hosted server's usage on its own key counts toward AgentRun's listing on OpenRouter; `AGENTRUN_OPENROUTER_ATTRIBUTION=off` where AgentRun starts sends none.
|
|
2591
2714
|
|
|
2592
2715
|
`claude-agent` loads the revision's skills itself: the model is shown each as `agentrun:<name>`, loads one with the Skill
|
|
2593
2716
|
tool and reads its other files with `read_skill_file`, and the system prompt holds the instructions alone. A skill the
|
|
@@ -2997,7 +3120,10 @@ less the active notes), that `No notes.` is a fine answer, and what not to keep.
|
|
|
2997
3120
|
with no reserve, and within 5 minutes; its rows are labelled `learning`, and the run's answer stays the job's. While it
|
|
2998
3121
|
runs, the run reads `reflecting` on every harness. A run whose only tool work was its learned workflows, each answering,
|
|
2999
3122
|
with nothing said after its first message, is not asked: no request is sent, and its learning ends `dropped` (`empty`),
|
|
3000
|
-
"Nothing new: the run only ran a learned workflow."
|
|
3123
|
+
"Nothing new: the run only ran a learned workflow." A run of an agent with `learning: true` (one that compiles workflows)
|
|
3124
|
+
is not asked either unless its owner gave feedback on it: a grade's words, or a message after the run's first. It spends
|
|
3125
|
+
$0 looking back, its learning ends `dropped` (`empty`) saying it looks back only on feedback, and a compile turn that is
|
|
3126
|
+
due is still asked. A `learning: "notes"` run is asked as above.
|
|
3001
3127
|
|
|
3002
3128
|
The same turn may give one skill (only when the job completed) and one workflow draft, when the work repeats. Once a
|
|
3003
3129
|
learned skill the run was given has been given to 3 earlier runs of its agent, with no learned workflow of that name,
|
|
@@ -3597,13 +3723,14 @@ carries no cost at all, as from a provider that does not price the model. The te
|
|
|
3597
3723
|
- A run has no door of its own. The server and a run's runner meet in the store: a message, stop or approval is a
|
|
3598
3724
|
command row the runner reads, so no port a run listens on takes a token.
|
|
3599
3725
|
- A run's tools run under the runner's environment (the `AGENT_MODEL` variables among it) without the server's token or
|
|
3600
|
-
any key: no `AGENTRUN_TOKEN`, no `AGENTRUN_API_KEY`, no variable whose value is
|
|
3726
|
+
any key: no `AGENTRUN_TOKEN`, no `AGENTRUN_TOKENS`, no `AGENTRUN_API_KEY`, no variable whose value is a token, and no variable named like a key
|
|
3601
3727
|
(one of its `_`-separated segments, in any case, is `KEY`, `TOKEN`, `SECRET`, `PASSWORD`, `PASSWD`, `PASS`, `PAT`,
|
|
3602
3728
|
`CREDENTIAL`, `CREDENTIALS` or `DSN`, or its last is `PWD` after another: `SERVICE_KEY`, `GITHUB_TOKEN_RO`, `DB_PASS`,
|
|
3603
3729
|
`SENTRY_DSN`, `DB_PWD`; never `PWD` or `OLDPWD`), whether the launcher's list names it or not. The rule is
|
|
3604
3730
|
`keyShaped` (`src/secret-cut.ts`), which an import's cut and a harness's log take too. The keys a
|
|
3605
3731
|
run needs are read from the store at its claim, opened with the seal key, and are put on that run's environment alone.
|
|
3606
|
-
It gets none of the
|
|
3732
|
+
It gets none of the computer providers' account keys ([Sandbox](#sandbox)) and not the Archil account key
|
|
3733
|
+
(`ARCHIL_API_KEY`), from which the claim mints the run's own mount credential. A tool key reaches it only when its
|
|
3607
3734
|
revision names a tool the key unlocks (`MONID_API_KEY` a monid tool, `BROWSERBASE_API_KEY` and `KERNEL_API_KEY` `browser`; a workflow's
|
|
3608
3735
|
tools are those its model and call nodes name), and a model key only when its model needs it ([Models](#models)), read
|
|
3609
3736
|
from the revision at each claim, a resume after a restart included.
|
|
@@ -3640,7 +3767,8 @@ carries no cost at all, as from a provider that does not price the model. The te
|
|
|
3640
3767
|
- The launcher hands the server every secret on its list that is set over one pipe, which holds 4,096 bytes for sure
|
|
3641
3768
|
before the server reads it: each set secret costs its name, its value and two bytes. Past that it refuses to start,
|
|
3642
3769
|
saying `the secrets come to N bytes, more than the 4096 a pipe is sure to hold`, and starts nothing. A long value adds up
|
|
3643
|
-
fast (an AWS session token is often over 1,000 bytes): set only the keys the
|
|
3770
|
+
fast (an AWS session token is often over 1,000 bytes, an RSA `AGENT37_SSH_KEY` over 3,000): set only the keys the
|
|
3771
|
+
server needs where it starts, and save a long one in Settings instead.
|
|
3644
3772
|
|
|
3645
3773
|
### Known gaps
|
|
3646
3774
|
|
package/dist/agent-rows.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export type AgenticBody = {
|
|
|
36
36
|
harness?: string;
|
|
37
37
|
place?: RevisionPlace;
|
|
38
38
|
computer?: RevisionComputer;
|
|
39
|
-
learning?:
|
|
39
|
+
learning?: import("./learning-setting.js").LearningSetting;
|
|
40
40
|
toolSettings?: Record<string, Record<string, string>>;
|
|
41
41
|
approvals?: "never";
|
|
42
42
|
maxCostUsd?: number;
|
package/dist/agents-store.js
CHANGED
|
@@ -10,6 +10,7 @@ import { agentLink } from "./console-links.js";
|
|
|
10
10
|
import { approvalsOf } from "./approvals.js";
|
|
11
11
|
import { ApiError, invalid } from "./errors.js";
|
|
12
12
|
import { harnessOfBody } from "./harness.js";
|
|
13
|
+
import { learningSettingIssue } from "./learning-setting.js";
|
|
13
14
|
import { storedHarness } from "./harness-table.js";
|
|
14
15
|
import { AgentBodyInvalid, RevisionMoved, bodyOf, canonical, isObject, StoreConstraint, } from "./store/index.js";
|
|
15
16
|
import { canonicalToolSettings, settingsIssues } from "./tool-plane.js";
|
|
@@ -102,7 +103,8 @@ function revisionInputOf(definition, files) {
|
|
|
102
103
|
// permissionOf with the revision's approvals): a call node on a tool set to ask runs under never, as on main.
|
|
103
104
|
if (isObject(definition.workflow))
|
|
104
105
|
return { kind: "workflow", workflow: definition.workflow, ...(definition.approvals === "never" ? { approvals: "never" } : {}), ...common, ...capped };
|
|
105
|
-
|
|
106
|
+
// true, false, "notes" or the loop's numbers (learning-setting.ts), checked by validate.ts and again by the body.
|
|
107
|
+
const learning = definition.learning !== undefined && learningSettingIssue(definition.learning) === undefined ? { learning: definition.learning } : {};
|
|
106
108
|
return {
|
|
107
109
|
kind: "agentic",
|
|
108
110
|
instructions: definition.instructions,
|
package/dist/api-only.d.ts
CHANGED
|
@@ -3,7 +3,9 @@ import type { Route } from "./server.js";
|
|
|
3
3
|
export declare const API_ONLY_ENV = "AGENTRUN_API_ONLY";
|
|
4
4
|
/** The routes (server.ts ROUTES, by name) an API-only server serves: a run's launch, read, list, timeline, messages,
|
|
5
5
|
* stop, cancel, cap raise and grade; its files and the uploads a launch names; an agent's Archil disk, read and removed (the
|
|
6
|
-
* agent layer of a run's disk, archil-routes.ts); capabilities, health and usage
|
|
6
|
+
* agent layer of a run's disk, archil-routes.ts); capabilities, health and usage; and a run's hosted machine that dials
|
|
7
|
+
* fetching this server's computerd with its own token (computer-attach.ts), as it dials the attach socket, which the
|
|
8
|
+
* upgrade takes for such a machine alone (a paired computer is the console's). */
|
|
7
9
|
export declare const API_ONLY_ROUTES: ReadonlySet<string>;
|
|
8
10
|
/** Whether `env` turns the profile on: `1` or `true` on; unset, empty, `0` or `false` off. Any other value is refused in
|
|
9
11
|
* words (a TypeError), so a typo never leaves the console open on a server meant to be API-only. */
|