@parcha/agentrun-serve 0.1.0-beta.53 → 0.1.0-beta.54
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 +29 -2
- package/README.md +82 -13
- package/dist/agent-package.js +1 -1
- package/dist/agent-rows.d.ts +1 -1
- package/dist/agents-store.js +1 -1
- package/dist/api-only.d.ts +1 -2
- package/dist/api-only.js +1 -2
- package/dist/cli.js +6 -1
- package/dist/composio-preset.d.ts +3 -2
- package/dist/composio-preset.js +4 -3
- package/dist/computer-needs.d.ts +1 -1
- package/dist/computer-needs.js +1 -1
- package/dist/computer-setting.d.ts +4 -2
- package/dist/computers.d.ts +0 -2
- package/dist/computers.js +1 -1
- package/dist/console/assets/index-B_85An2t.js +745 -0
- package/dist/console/assets/index-n1YsbnYh.css +1 -0
- package/dist/console/index.html +2 -2
- package/dist/errors.d.ts +4 -0
- package/dist/errors.js +7 -0
- package/dist/github-connection.d.ts +50 -1
- package/dist/github-connection.js +96 -3
- package/dist/github-faux.d.ts +11 -2
- package/dist/github-faux.js +138 -7
- package/dist/github-pull-request.d.ts +37 -0
- package/dist/github-pull-request.js +110 -0
- package/dist/live-reach.d.ts +34 -7
- package/dist/live-reach.js +76 -11
- package/dist/mcp-probe.js +2 -2
- package/dist/openapi.js +108 -4
- package/dist/runner/adapter-run-spec.js +1 -1
- package/dist/runner/cli-run-spec.js +1 -1
- package/dist/runner/metrics.d.ts +4 -2
- package/dist/runner/metrics.js +15 -3
- package/dist/runner/pr-checkout.d.ts +21 -4
- package/dist/runner/pr-checkout.js +103 -4
- package/dist/runner/run-child-host.js +7 -4
- package/dist/runner/runner-check.d.ts +3 -0
- package/dist/runner/runner-check.js +23 -0
- package/dist/server.d.ts +11 -0
- package/dist/server.js +80 -10
- package/dist/store/agent-body.d.ts +2 -2
- package/dist/store/agent-body.js +2 -2
- package/dist/suggestions.d.ts +282 -0
- package/dist/suggestions.js +919 -0
- package/dist/telemetry.d.ts +8 -1
- package/dist/telemetry.js +12 -4
- package/dist/template-import.d.ts +17 -0
- package/dist/template-import.js +32 -0
- package/dist/templates.d.ts +78 -73
- package/dist/templates.js +10 -8
- package/dist/trigger-launch-hook.d.ts +5 -3
- package/dist/trigger-launch-hook.js +5 -4
- package/dist/triggers.js +1 -1
- package/dist/validate.d.ts +1 -1
- package/dist/validate.js +2 -2
- package/dist/workspace/synced-folder.d.ts +1 -1
- package/dist/workspace/synced-folder.js +11 -14
- package/launcher/agentrun-serve +1 -1
- package/package.json +10 -10
- package/templates/README.md +3 -2
- package/templates/agent-scout/agent.md +46 -0
- package/templates/agent-scout/skills/scout/SKILL.md +88 -0
- package/templates/agent-scout/skills/scout/suggestions.schema.json +112 -0
- package/dist/console/assets/index-BFgyZzF_.js +0 -734
- package/dist/console/assets/index-DbilxljH.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,33 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## 0.1.0-beta.54 (2026-11-23)
|
|
6
|
+
|
|
7
|
+
**Breaking:**
|
|
8
|
+
|
|
9
|
+
- `@parcha/agentrun-computer` no longer exports `PUSHED_MTIME` or `MAX_TAR_MTIME`. A caller that pushed a folder into a synced computer and stamped each file with `PUSHED_MTIME` itself now calls the new `FolderSync.push(entries, options)`: it gives each file the pushed mtime, pushes the tar, and takes the baseline, and its failure says which of the two steps failed. `baseline()` stays for a folder pushed some other way. <!-- changes/b26-sync-record-cleanup.md -->
|
|
10
|
+
- `GET /v2/computers`: a kind's `record` is now one of `{ available: true }` and `{ available: false, why }`, `why` always present when `available` is false (it was optional). A client that read `record.why` as possibly absent can drop its fallback, and the generated TypeScript and Python types narrow on `available`.
|
|
11
|
+
- The `path` option of `createComputerRoutes` is gone: a kind's `record` looks for ffmpeg on the PATH of the `env` option, the server's own when it has none.
|
|
12
|
+
- The synced folder's serve test no longer waits a real second to prove a pushed file is not racy; it reads the pushed mtime from the computer.
|
|
13
|
+
|
|
14
|
+
**Changes:**
|
|
15
|
+
|
|
16
|
+
- A Groundbox provider: `providerFor("groundbox", { apiKey })` makes each computer a Groundbox sandbox, a Firecracker microVM started from the box image (the public tag its `prepareImage()` answers, which Groundbox turns into a disk at the first create), or from a spec's own image: `"default"` (the team's default template, else Groundbox's own Ubuntu image), a template of the key's team, or any other public image. It is a `MachineHost` on the shared adapter: `src/groundbox.ts` calls Groundbox's REST API with `fetch`, and the daemon runs as a child of one resumable command of the WebSocket command stream, handed to `framedExec`: when a socket closes, as every one does within the hour, a new one attaches from the last output position read, so no output is lost or read twice, and each stdin write is one answered call that writes the command's fifo. The daemon is uploaded through the files API. Network none, open and a list are init's, and the run's folder is a synced folder. Its lifetime is the janitor's, by the deadline label, and Groundbox's own timer ends every sandbox at the adapter's backstop; a computer may live up to 30 days less 6 minutes, a day by default. `list` is one call, filtered by `live=true` and the labels as metadata. A spec's `cpus` (whole, 1 to 16) and `memoryMb` (whole GiB, at most 4 a CPU) are the sandbox's size. With `kind: "desktop"` a computer is a desktop: the box image's Xvfb and xfwm4, started through the daemon as on E2B and boxd (Groundbox's own image, which lacks xfwm4, is refused for it). No Archil mount yet. Groundbox's own image keeps toolchains under `/opt` deeper than the isolation probe searches, so `isolation.vendor-agent` can't pass on it; on the box image it does. Settings takes `GROUNDBOX_API_KEY`. `AGENTRUN_COMPUTER_LIVE_GROUNDBOX=1 COMPUTER_GROUNDBOX_API_KEY=... npm run conformance -w @parcha/agentrun-computer -- --provider groundbox` runs the conformance kit on real Groundbox, and `sweep.js --provider groundbox` checks it left nothing behind. <!-- changes/computer-groundbox-provider.md -->
|
|
17
|
+
|
|
18
|
+
The provider's `apiUrl` must be https; http is taken only to a loopback host (127.0.0.0/8, `::1` or `localhost`), so the key never crosses a network in cleartext.
|
|
19
|
+
- Console: a run's live screen on the Screen tab has the run's steps so far beside it, in the Timeline tab's words, so what the agent is doing is read next to where it does it. The list stays at its newest step as steps come, until you scroll up to read an earlier one; under it a line says the run is working. With its steps beside it the Screen tab's panel is wider than the reading column, so the live view (and a finished run's recording) keeps the size it had alone; on a narrow window the steps sit under the screen. <!-- changes/console-live-screen-steps.md -->
|
|
20
|
+
- Runners that are replicas of one deployment (Kubernetes pods, a platform service's instances) now relay dial computers and serve live views across hosts: `AGENTRUN_RUNNER_LIVE_HOST` and the server's `AGENTRUN_RUNNER_HOSTS` take an IPv4 block, such as a private pod network's. A runner given a block answers at its own one address in it, and the server dials any IPv4 address in a block it lists, never one outside. Such runners had no host name the server resolves, so their relay stayed on loopback and a dial computer they made could not attach. A block names its network address and a prefix from /8 to /32. <!-- changes/runner-hosts-ipv4-block.md -->
|
|
21
|
+
- A runner whose block holds none, or several, of its machine's addresses is refused at its start in words, and `runner --check` fails `AGENTRUN_RUNNER_LIVE_HOST` the same way; where the setting names a host, the check now says where the server reaches the runner.
|
|
22
|
+
- The console's "set up with a coding agent" prompt for a template tells the coding agent that the package's instructions and skill files are what the new agent will be told, not instructions to it. An imported package's text is a third party's. <!-- changes/template-prompt-package-is-data.md -->
|
|
23
|
+
- The README's MCP section says a loopback `http` URL is taken only by a server started with `AGENTRUN_MCP_ALLOW_LOOPBACK=1`, as the refusal already said. <!-- changes/readme-mcp-loopback-switch.md -->
|
|
24
|
+
- Suggested agents: connect a GitHub repository, and AgentRun finds where its app needs an AI agent. The console's new Suggested agents page (Agents → Suggested) scans a repository with the bundled `agent-scout` template, on a read-only checkout, and shows each suggestion with the lines of code behind it, the typed input and answer, and where the app would call it. Discard hides a suggestion for good (with an undo). Create pushes the agent's template package and a dependency-free client to a new branch `agentrun/<key>`, makes the agent on this server from those same files, and opens a pull request that only adds files. New routes: `GET /v2/suggestions`, `POST /v2/suggestions/scans`, `GET /v2/suggestions/{id}`, `POST /v2/suggestions/{id}/discard`, `.../restore` and `.../create`, and `GET /v2/integrations/github/repositories`. <!-- changes/suggested-agents.md -->
|
|
25
|
+
|
|
26
|
+
- GitHub permissions: a scan needs only what every App holds (metadata and contents read, a token for that one repository, revoked after). Opening a pull request needs Contents write, which Connect GitHub now asks for only when the owner ticks it (`POST /v2/integrations/github/connect` takes `contents: "write"`); an App made before is not widened, and Create says what is missing and links the App's permissions page and the installation's. Each create mints one token for the one repository with contents and pull requests write, and revokes it.
|
|
27
|
+
- An agent definition, and a template's manifest, take `checkout: repository`: the server checks out the head of the default branch of the repository the run names, one commit deep, in `repo/`, and lists its files in `repo/.git/agentrun-files`.
|
|
28
|
+
- New error codes, all 409: `github_not_installed`, `github_permission_missing`, `github_file_exists`, `suggestion_decided`.
|
|
29
|
+
- The anonymous usage counts (`docs/telemetry.md`) say how suggested agents are used, with three new events: `suggestions_scanned` (a scan of a repository starts), `suggestion_discarded` (a suggestion is discarded) and `suggested_agent_created` (a suggested agent's pull request opens, once per suggestion). Each is its name alone, with the fields every event already holds; it never says the repository, the suggestion, its agent or its pull request. The same settings turn them off (`AGENTRUN_TELEMETRY=0`, `DO_NOT_TRACK=1`, CI, a test runner, `--faux`), and the start that prints the notice sends none of them: a use that day is not counted. `startServe` takes `onUsage`, which hears each event's name. <!-- changes/suggestion-usage-counts.md -->
|
|
30
|
+
- A live run on your Claude plan (or a ChatGPT plan) no longer reads "not priced" while a request is in flight: the run's cost counts that request at $0 on the plan, as the ended run does, so the header reads its tokens and "On your Claude plan" and the timeline's "Cost so far" counts no plan request as not priced. <!-- changes/plan-cost-live.md -->
|
|
31
|
+
|
|
5
32
|
## 0.1.0-beta.53 (2026-11-22)
|
|
6
33
|
|
|
7
34
|
- An agent can be exported as a template package: `GET /v2/agents/{agent_id}/package` answers its current revision as the files of a package (`agent.md` with the instructions as its body, `skills/`, `rules/`, an output schema) and their sha256, and `agentrun export AGENT --out DIR` writes them as a folder that `agentrun template validate` reads and any AgentRun applies. `agent.md` always names the model and approvals. MCP tools become needs by their saved server's source and toolkit, and triggers carry no agent and no secret. What names this host (its box, its computer's provider, its pins of this server's tool listings, its place) is left out. The answer's `report` names what can't travel as it is: `blocked` (an MCP server saved nowhere here, on this machine's loopback, or sending its own auth header) and `remade` (webhook, GitHub, Composio and email triggers, browser sign-ins, a paired computer, what the agent learned). `agentrun export` prints both, and with anything blocked it writes nothing and exits 2. A native, CLI learning, SDK or another system's agent, or a workflow, answers `409 not_exportable`. <!-- changes/agent-export.md -->
|
|
@@ -111,11 +138,11 @@
|
|
|
111
138
|
- Console: a finished run's recording on the Screen tab has the run's steps beside it. Each step the run took while the file was recorded is listed at its time on the video, in the Timeline tab's words; clicking one moves the video there, and the step the video is at is marked as it plays. A step's time is its timeline time since the row that says the recording began, so a run whose timeline has no such row plays its recording alone, as before. The steps sit beside the player on a wide window and under it on a narrow one. <!-- changes/console-recording-steps.md -->
|
|
112
139
|
- Launch hook: with `AGENTRUN_LAUNCH_HOOK_URL` and `AGENTRUN_LAUNCH_HOOK_SECRET` set, each trigger firing that would start a run is POSTed to the host instead, signed as Standard Webhooks (`{firing_id, trigger_id, agent_id, revision_id, input, fired_at}`), and the host starts the run through the API with its own keys and cap. The host passes the new `trigger_firing` (`{trigger_id, firing_id}`) on `POST /agents/{agent_id}/runs`, so the run is the firing's: it carries the trigger, its title and input origin, and the firing reads `started` with it, counted by the overlap check and `max_active_runs`. The host may start the run before or after it answers: a 2xx without the run records the firing `sent` with `start_by`, 10 minutes after that answer, and it takes that one start until then. The 10 minutes run from the answer, not from `fired_at`, so a catch-up, a firing that waited on `max_active_runs` or one handed again after a restart gets the same time. Any other answer, or none in 10 s, records it `skipped` with why. The hook URL is https, or http to 127.0.0.0/8, `::1` or `localhost` alone; any other http URL stops the start. On an API-only server (`AGENTRUN_API_ONLY=1`), the hook is what lets a template's apply make its schedule and feed triggers. Unset, firings start their runs as before, and `trigger_firing` is refused. <!-- changes/trigger-launch-hook.md -->
|
|
113
140
|
- `GET /v2/settings/mcp-server-names` answers the names of the MCP servers saved here, `{names}`, and nothing else of them: no URL, auth type, header, tool or Composio record. It takes the server's token and is served on an API-only server too (`AGENTRUN_API_ONLY=1`), so a host that builds runs from saved servers can hold back a job whose server isn't saved before its launch is refused for it. <!-- changes/mcp-server-names.md -->
|
|
114
|
-
- A Composio user id may hold a
|
|
141
|
+
- A Composio user id may now hold a `:` (a team's, say), in a save's `user_id` and a run's `mcp_auth`. A space, a slash and a `~` are still refused. <!-- changes/composio-team-user.md -->
|
|
115
142
|
- A key a run brings in `keys` or `model_key` is text of 8 or more characters with no space or control character: a shorter one could not be cut from what the run writes, so it is now 422 `invalid` at `keys.<NAME>` or `model_key`, the value never echoed. With `AGENTRUN_RUN_KEYS=1`, no trigger is made whose firings would run an agent without the tool keys each of its runs must bring: a template's apply skips such triggers with a warning at `triggers.<N>` (`not_set_up_here`, the apply still 201) unless the launch hook is set, and `POST /v2/triggers`, or a `PATCH` that moves a trigger, is 409 `agent_not_runnable` naming the keys for one that would start such runs with no hook, or message one of them. <!-- changes/run-keys-hardening.md -->
|
|
116
143
|
- A run's view, and so every runs list, is several times faster for runs with long timelines: redacting a timeline's rows no longer derives every held value's forms again for each row (its path spellings, base64 at three alignments, percent forms, hex and folded patterns). What is derived of a set of values is kept per array and derived again when the array's values change, so a value a caller adds is still cut, and what is cut is unchanged. On a store of code-review runs of about 2,500 journal writes each, one run's view went from about 3.2 s to 0.7 s, and a list of ten runs from about 22 s to 5 s. <!-- changes/redact-derived-once.md -->
|
|
117
144
|
- A server runs a harness recipe it is started with: `agentrun-serve --harness-recipe FILE` (repeatable, or `AGENTRUN_SERVE_HARNESS_RECIPES`), and `agentrun-serve runner` takes the same flag. The harness is listed, and a run starts, only once a `harness-check` passed on the data directory for that recipe file, binary and tree (`<id>.checked`; else `HARNESS_NOT_CHECKED`); each start digests the binary and tree again. A proxy-billed agent runs on the server's model proxy. A plan-billed one runs on keys saved for its harness, which no server saves yet (`HARNESS_KEYS_NOT_SAVED`), or, on a server its owner starts with `--harness-sign-in` on their own machine (loopback, its own SQLite store, its runs as its own user, one owner; else `HARNESS_SIGN_IN_NOT_LOCAL`), on the owner's own sign-in for a run a person starts; a scheduled or triggered run on it is refused at its claim, and a `message_run` trigger to a run on it is refused when made and skipped at each firing. `harness-check` runs on a recipe's keys alone, never the sign-in, and a plan-billed recipe must name a key. `agentrun harness sign-in` prints one warning line that the vendor's terms (the recipe's new `signIn.terms`) may not cover use through AgentRun. A run's agent reaches beyond loopback only through the server's egress proxy, to the recipe's `model.hosts`. The loader now refuses a key whose name is not shaped as a key (`FOO_CRED`: `RECIPE_KEY_NOT_OWN`). <!-- changes/recipe-run-path.md -->
|
|
118
|
-
- A template package can be read on its own: `GET /v2/templates/{template}`
|
|
145
|
+
- A template package can be read on its own: `GET /v2/templates/{template}` reads one package, bundled or imported, as `GET /v2/templates` lists it, with its instructions and every skill file in full (placeholders unfilled) and its apply page as `console_url`; an unknown id is `404`, an imported id is URL-encoded. CLI: `agentrun template get TEMPLATE`; clients: `template.get(id)`. <!-- changes/get-one-template.md -->
|
|
119
146
|
- A backend SDK run (`POST /agents/{agent_id}/sdk-runs`) can now run longer than an hour, be reported after it began, and carry its own title and labels. <!-- changes/sdk-run-start-fields.md -->
|
|
120
147
|
- Each events batch, an empty `events: []` one included, moves the run's deadline to an hour after that batch, up to 24 hours after its start. A run that misses its deadline still ends with an unknown outcome, as before.
|
|
121
148
|
- The start takes optional `started_at` (RFC 3339, at most 60 seconds ahead of the server's clock and 7 days behind it), which becomes the run's `created_at`. The deadline is still counted from the start request. Those bounds apply to a new start only: a retry under the same `Idempotency-Key` and body of a start that was made gets that run's receipt, however late it comes.
|
package/README.md
CHANGED
|
@@ -211,9 +211,10 @@ names no run, and a store with no such run says nothing; quiet keeps it too.
|
|
|
211
211
|
|
|
212
212
|
## Anonymous usage counts
|
|
213
213
|
|
|
214
|
-
The server sends
|
|
215
|
-
|
|
216
|
-
|
|
214
|
+
The server sends six anonymous events: `server_started`, a daily `heartbeat`, `first_run_completed`, and, for
|
|
215
|
+
suggested agents, `suggestions_scanned`, `suggestion_discarded` and `suggested_agent_created`. Each holds a random id
|
|
216
|
+
kept in the data directory (`.telemetry.json`), the version, the platform and how many runs ended as a range; never a
|
|
217
|
+
prompt, a file, a key, a name or a repository.
|
|
217
218
|
`AGENTRUN_TELEMETRY=0` or `DO_NOT_TRACK=1` turns it off, as do `CI`, a test runner (`node --test`) and `--faux`; `AGENTRUN_TELEMETRY=debug` prints each
|
|
218
219
|
event on stderr and sends none. The start that first could send prints one notice and sends nothing at that start.
|
|
219
220
|
[docs/telemetry.md](../../docs/telemetry.md) lists every field.
|
|
@@ -277,7 +278,7 @@ which also says dial for E2B, Daytona or Modal made with `connect: "dial"`) work
|
|
|
277
278
|
server's public address, `AGENTRUN_PUBLIC_URL` (the image gives both processes the same environment). The machine dials
|
|
278
279
|
the server, and the server relays its socket to the runner that made it: the runner keeps its own attach hub on a
|
|
279
280
|
private listener (loopback; across hosts, its `AGENTRUN_RUNNER_LIVE_HOST`, which the server's `AGENTRUN_RUNNER_HOSTS`
|
|
280
|
-
must list), and the server reaches it only with a proof under the seal key for that machine's token, that runner and a
|
|
281
|
+
must list; runners that are replicas with no host name of their own give both an IPv4 block instead, below), and the server reaches it only with a proof under the seal key for that machine's token, that runner and a
|
|
281
282
|
time within 10 seconds, taken once. A dial it cannot relay (its runner gone, not answering, or restarted since) is
|
|
282
283
|
answered 503 in words that name the run, `a dial for run <run> (machine <machine>)`, and never the machine's token. The
|
|
283
284
|
runner's create, waiting for that machine, ends at once in the same words and deletes it; the run makes a new machine at
|
|
@@ -823,8 +824,8 @@ Settings → Computers. The kind says what the agent is given, and the provider
|
|
|
823
824
|
| Kind | What the agent gets | Providers |
|
|
824
825
|
|---|---|---|
|
|
825
826
|
| `none` | The run's folder alone: no computer, and no provider (`{"kind": "none"}`) | |
|
|
826
|
-
| `sandbox` | A Linux shell, with files and processes | `docker`, `daytona`, `modal`, `e2b`, `boxd`, `smolcloud`, `cloudflare` (through a relay Worker you deploy) |
|
|
827
|
-
| `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 |
|
|
827
|
+
| `sandbox` | A Linux shell, with files and processes | `docker`, `daytona`, `modal`, `e2b`, `boxd`, `smolcloud`, `groundbox`, `cloudflare` (through a relay Worker you deploy) |
|
|
828
|
+
| `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`, `groundbox`, or [a paired computer](#a-persons-own-computer) by its id |
|
|
828
829
|
| `phone` | A rented Android, through the same computer tools | `phone-harness` |
|
|
829
830
|
| `browser` | A hosted browser (the browser tools) | `browserbase`, `kernel` |
|
|
830
831
|
|
|
@@ -860,7 +861,7 @@ the provider with them and starts nothing. A key set in the server's environment
|
|
|
860
861
|
`DAYTONA_API_KEY` (with `DAYTONA_API_URL` and `DAYTONA_TARGET` optional), `MODAL_TOKEN_ID` and `MODAL_TOKEN_SECRET`,
|
|
861
862
|
`E2B_API_KEY`, `AGENT37_API_KEY` and `AGENT37_SSH_KEY`, `MORPH_API_KEY`, `ORGO_API_KEY`, `PHONE_HARNESS_API_KEY`,
|
|
862
863
|
`BROWSERBASE_API_KEY` and `BROWSERBASE_PROJECT_ID`, `KERNEL_API_KEY`, `BOXD_API_KEY` (with `BOXD_ORG` and
|
|
863
|
-
`BOXD_REGION` optional), `SMOLCLOUD_API_KEY`, `CLOUDFLARE_RELAY_URL` and `CLOUDFLARE_RELAY_TOKEN` (the relay Worker's,
|
|
864
|
+
`BOXD_REGION` optional), `SMOLCLOUD_API_KEY`, `GROUNDBOX_API_KEY`, `CLOUDFLARE_RELAY_URL` and `CLOUDFLARE_RELAY_TOKEN` (the relay Worker's,
|
|
864
865
|
`packages/computer/relays/cloudflare`), and `FLY_API_TOKEN` and `FLY_APP`; Docker takes none.
|
|
865
866
|
The vendors bill their computers by time on their own pages: this server meters no
|
|
866
867
|
computer time. The older [`place`](#place) is this setting's v2 view: `{"mode": "runner"}` is kind `none`, and
|
|
@@ -2197,7 +2198,8 @@ Streamable HTTP with the official MCP SDK client (`@modelcontextprotocol/client`
|
|
|
2197
2198
|
`output_schema` and `annotations` (the server's own claims, not checked). It stores nothing. `auth` is `{type: "none"}`
|
|
2198
2199
|
(or absent), `{type: "bearer", token}` (sent as `Authorization: Bearer <token>`) or `{type: "headers", headers: {Name:
|
|
2199
2200
|
value}}` (up to 8). An `oauth` server is signed in to first ([below](#signing-in-with-oauth)), then previewed by name.
|
|
2200
|
-
`url` is `https`, or `http` on loopback
|
|
2201
|
+
`url` is `https`, or `http` on loopback when the server was started with `AGENTRUN_MCP_ALLOW_LOOPBACK=1`
|
|
2202
|
+
([start-time switches](#start-time-switches)); without it a loopback URL is `422` on `url`, in words that name the switch.
|
|
2201
2203
|
|
|
2202
2204
|
A server advertising MCP resources also lists three AgentRun-generated read operations, including when it has no
|
|
2203
2205
|
tools: `agentrun_list_resources` (`resource: "list"`), `agentrun_list_resource_templates` (`resource: "templates"`)
|
|
@@ -2259,8 +2261,8 @@ handed none, so a per-run server never calls as a default account. A malformed u
|
|
|
2259
2261
|
other server, are `422` at `mcp_auth.<server>`, and no run starts. A per-run server makes no Composio trigger: a trigger
|
|
2260
2262
|
runs as one account. A server saved for one user before this mode keeps calling as that user.
|
|
2261
2263
|
|
|
2262
|
-
With `user_id: "per_run"`, whoever can start a run chooses its Composio user, so the host
|
|
2263
|
-
|
|
2264
|
+
With `user_id: "per_run"`, whoever can start a run chooses its Composio user, so the host owns which user each run
|
|
2265
|
+
binds: it binds each run to its own person and never takes the ids from that person. Only `agentrun` is
|
|
2264
2266
|
refused, so a host must not bind a per-run server to a `user_id` that a single-user server calls as.
|
|
2265
2267
|
|
|
2266
2268
|
What can go wrong, told apart:
|
|
@@ -2883,8 +2885,9 @@ has each instance on, and the subscription's place.
|
|
|
2883
2885
|
### GitHub triggers (Connect GitHub)
|
|
2884
2886
|
|
|
2885
2887
|
A server has at most one GitHub App, made with GitHub's app-manifest flow, and every `github` trigger (and every
|
|
2886
|
-
GitHub template) uses it. In the console, Connect GitHub calls `POST /v2/integrations/github/connect` (`{org?}
|
|
2887
|
-
the App under an organization
|
|
2888
|
+
GitHub template) uses it. In the console, Connect GitHub calls `POST /v2/integrations/github/connect` (`{org?, contents?}`:
|
|
2889
|
+
`org` makes the App under an organization; `contents: "write"` asks for Contents write too, which suggested agents' pull
|
|
2890
|
+
requests need, below) and posts the form it answers to GitHub: `action`, GitHub's new-App page, and
|
|
2888
2891
|
`manifest`, which names a name GitHub lets the person edit, the server's public URL, its hook `/v2/hooks/github`, its
|
|
2889
2892
|
callback and setup URLs, the permissions (pull requests write; contents, metadata and issues read) and the events
|
|
2890
2893
|
(`pull_request`, `issue_comment`, `release`). It needs the address GitHub can reach, `AGENTRUN_PUBLIC_URL` (`409 github_no_public_url`,
|
|
@@ -3027,6 +3030,71 @@ is outside this email's thread"). The pending approval carries the reason as `as
|
|
|
3027
3030
|
says above the call's arguments ("Asks because ..."). With accounts off, where no one can
|
|
3028
3031
|
approve, such a send is refused in those words.
|
|
3029
3032
|
|
|
3033
|
+
An agent whose definition says `checkout: repository` starts each run in a checkout of the repository the run names: its
|
|
3034
|
+
start's `repo`, else the first `https://github.com/<owner>/<repo>` in its first message (a github trigger's run, its
|
|
3035
|
+
payload's). The same command, token and rules as a pull request's checkout fetch the remote's `HEAD` (its default branch)
|
|
3036
|
+
one commit deep and check it out detached in `repo/` (ref `repo/head`), and list its files one a line in
|
|
3037
|
+
`repo/.git/agentrun-files`, so an agent with `read` and no shell can still find what to open. The run's system prompt
|
|
3038
|
+
names the repository, the branch, the commit and the list, or why there is no checkout.
|
|
3039
|
+
|
|
3040
|
+
### Suggested agents
|
|
3041
|
+
|
|
3042
|
+
The console's Suggested agents page (`#/suggestions`) connects a GitHub repository, finds where its app needs an agent,
|
|
3043
|
+
and lets a person create or discard each suggestion. Every write to GitHub is the server's, made when a person presses
|
|
3044
|
+
Create; no run ever holds a token that can write.
|
|
3045
|
+
|
|
3046
|
+
1. **Connect.** Connect GitHub as above. The page asks for `contents: "write"` unless the person unticks it; a scan needs
|
|
3047
|
+
only what every App holds (metadata and contents read). `GET /v2/integrations/github/repositories` lists what the
|
|
3048
|
+
App's installations cover (a metadata-read token per installation, revoked after; at most 500; an installation GitHub
|
|
3049
|
+
did not list is in `unread`).
|
|
3050
|
+
2. **Scan.** `POST /v2/suggestions/scans` with `{repo}` (`owner/name` or its github.com URL) runs the bundled `agent-scout`
|
|
3051
|
+
template's agent, applied here the first time and reused: a read-only checkout of the default branch (`checkout:
|
|
3052
|
+
repository`), read-only bash where there is a shell, and an answer of at most five suggestions against its schema.
|
|
3053
|
+
Its first message lists the suggestions already decided on that repository, so none comes back. 202 with the run;
|
|
3054
|
+
200 while one runs; what the apply or the start refuses is the answer (`409 agent_not_runnable` with no model key).
|
|
3055
|
+
A scan whose run stopped without ending (at its cost cap or asking for input, or paused) is listed as `waiting`: it is
|
|
3056
|
+
resumed or cancelled on its run's page, and a new scan starts a new run.
|
|
3057
|
+
3. **List.** `GET /v2/suggestions` (`?repo=`, `?status=open|created|discarded|all`; open and created by default) answers
|
|
3058
|
+
GitHub's state, each repository's newest scan, and its suggestions. A scan that ended is read once: each suggestion is
|
|
3059
|
+
checked again field by field (paths inside the repository, a client path in its language's extension and outside
|
|
3060
|
+
`.github/`, `.git` and `.agentrun/agents/`, typed inputs and answer, answer labels that can't end a string or a
|
|
3061
|
+
comment), and one that fails is dropped and listed with why in `scan.dropped`. A suggestion's id comes from its
|
|
3062
|
+
repository and key, so a newer scan replaces the open ones of the scan before, and a decision outlives every rescan.
|
|
3063
|
+
Decisions are kept in the store's settings (`suggestions.item.<id>`, `suggestions.scan.<repo>`).
|
|
3064
|
+
4. **Discard.** `POST /v2/suggestions/{id}/discard` hides it and keeps later scans from suggesting it again;
|
|
3065
|
+
`POST .../restore` brings it back (the page's Undo). A created one is `409 suggestion_decided`.
|
|
3066
|
+
5. **Create.** `GET /v2/suggestions/{id}` shows the suggestion whole: the files a create adds, rendered now, whether its
|
|
3067
|
+
package checks, and whether the App can open its pull request now (read from GitHub: the installation that covers the
|
|
3068
|
+
repository and its permissions), with the App's permissions page and the installation's page when it can't.
|
|
3069
|
+
`POST /v2/suggestions/{id}/create` (`{name?}`) then:
|
|
3070
|
+
- claims the suggestion on its row in the store, which every server on that store shares: another create of it, a
|
|
3071
|
+
discard or a scan's answer meanwhile is `409 home_busy` or leaves the row alone, so one agent and one pull request
|
|
3072
|
+
are made. A claim older than 15 minutes (a server that stopped mid-create) is taken over. A scan is reserved the
|
|
3073
|
+
same way before its run starts;
|
|
3074
|
+
- refuses before anything is written: `409 github_not_connected`, `409 github_not_installed` (`details.install_url`),
|
|
3075
|
+
`409 github_permission_missing` when the installation lacks Contents or Pull requests write (`details.missing`,
|
|
3076
|
+
`permissions_url`, `installation_url`), or `409 github_file_exists` when the repository has a file it would add;
|
|
3077
|
+
- mints one installation token for that repository with `{contents: write, pull_requests: write, metadata: read}`,
|
|
3078
|
+
revoked at the end whatever happens;
|
|
3079
|
+
- commits, over the default branch's head on a new branch `agentrun/<key>` (GitHub's Git Data API, no clone), the
|
|
3080
|
+
agent's package (`.agentrun/agents/<key>/agent.md` and `output.schema.json`, rendered here from the checked fields)
|
|
3081
|
+
and a client at the suggestion's path (TypeScript or JavaScript over `fetch`, Python over `urllib` taking the input
|
|
3082
|
+
as one dict, or a Markdown page of the HTTP calls for any other language; no dependency). It only adds files;
|
|
3083
|
+
- keeps that package as the imported template `github:<owner>/<repo>/.agentrun/agents/<key>` at the pushed commit,
|
|
3084
|
+
then applies it here (an apply refused takes the package back, deletes the branch and makes nothing). The push is
|
|
3085
|
+
recorded on the suggestion first, so a create after a write that failed finds the agent made from that template at
|
|
3086
|
+
that commit and reuses it, never making a second one;
|
|
3087
|
+
- opens the pull request, naming the agent's id and the variables the client reads (`AGENTRUN_URL`,
|
|
3088
|
+
`AGENTRUN_API_KEY`, `AGENTRUN_AGENT_<KEY>`). A pull request GitHub refuses keeps the agent (`502 github_failed`,
|
|
3089
|
+
`details.agent_id`), and the next create opens the pull request alone. A created suggestion answers `200` as it is.
|
|
3090
|
+
|
|
3091
|
+
`--faux-github` (with `--faux`) serves the list, the checks and the create from its fake App: its installation holds
|
|
3092
|
+
contents write, its one repository answers the Git Data API and pull requests, `GET /_faux/state` on its API shows what a
|
|
3093
|
+
create wrote, and `POST /_faux/permissions` changes what the installation holds. Its repository is also a bare git
|
|
3094
|
+
repository beside the data, which a test's own runner checks out from. The CLI's runner is never pointed at it (a
|
|
3095
|
+
runner's GitHub API and site have one way in, a test runner's option), so a scan on a faux CLI server finds no repository
|
|
3096
|
+
to check out and is told so.
|
|
3097
|
+
|
|
3030
3098
|
## Templates
|
|
3031
3099
|
|
|
3032
3100
|
A template package makes a working agent in one call: its definition, its skills and rules, and its triggers, from a
|
|
@@ -3037,7 +3105,8 @@ package's `version` is SemVer and never `definition.version`, the agent's revisi
|
|
|
3037
3105
|
need's toolkit as its `server` (`server: github` for a required `{source: composio, toolkit: github}` need), and apply makes it
|
|
3038
3106
|
on the saved Composio server that need maps to, its `config` filled from the parameters it names
|
|
3039
3107
|
(`repo: "${parameters.repo}"`); one this server can't set up yet (no public URL, say) is skipped with a
|
|
3040
|
-
warning, as a github trigger is with GitHub not connected. The first package is `code-review`, a code review agent for one GitHub repository
|
|
3108
|
+
warning, as a github trigger is with GitHub not connected. The first package is `code-review`, a code review agent for one GitHub repository;
|
|
3109
|
+
`agent-scout` finds where a repository's app needs an agent ([Suggested agents](#suggested-agents)). The format and the
|
|
3041
3110
|
rules of an apply are in [templates/README.md](https://github.com/Parcha-ai/agentrun/blob/main/packages/serve/templates/README.md);
|
|
3042
3111
|
`agentrun template validate DIR` checks a folder as the server does.
|
|
3043
3112
|
|
package/dist/agent-package.js
CHANGED
|
@@ -319,7 +319,7 @@ export function agentPackage(input) {
|
|
|
319
319
|
...(plain ? { tools: plain } : {}), ...(mcp.length ? { mcp } : {}),
|
|
320
320
|
...(typeof bash === "string" && plain?.includes("bash") ? { tool_policy: { bash } } : {}),
|
|
321
321
|
...(computers ? { computer: computers } : {}), ...(needs ? { needs } : {}),
|
|
322
|
-
...(definition.checkout === "pull_request" ? { checkout:
|
|
322
|
+
...(definition.checkout === "pull_request" || definition.checkout === "repository" ? { checkout: definition.checkout } : {}),
|
|
323
323
|
...(inputs ? { inputs } : {}), ...(secrets.length ? { secrets } : {}),
|
|
324
324
|
...(cost !== undefined ? { budget: { per_run_usd: cost, ...(requests !== undefined ? { max_requests: requests } : {}) } } : {}),
|
|
325
325
|
...(learning !== undefined ? { learning } : {}),
|
package/dist/agent-rows.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export type AgenticBody = {
|
|
|
42
42
|
maxCostUsd?: number;
|
|
43
43
|
inputSchema?: Record<string, unknown>;
|
|
44
44
|
outputSchema?: Record<string, unknown>;
|
|
45
|
-
checkout?: "pull_request";
|
|
45
|
+
checkout?: "pull_request" | "repository";
|
|
46
46
|
};
|
|
47
47
|
export type WorkflowBody = {
|
|
48
48
|
workflow: Workflow;
|
package/dist/agents-store.js
CHANGED
|
@@ -99,7 +99,7 @@ function revisionInputOf(definition, files) {
|
|
|
99
99
|
...(definition.approvals === "ask" || definition.approvals === "never" ? { approvals: definition.approvals } : {}),
|
|
100
100
|
...(isObject(definition.input_schema) ? { inputSchema: definition.input_schema } : {}),
|
|
101
101
|
...(isObject(definition.output_schema) ? { outputSchema: definition.output_schema } : {}),
|
|
102
|
-
...(definition.checkout === "pull_request" ? { checkout:
|
|
102
|
+
...(definition.checkout === "pull_request" || definition.checkout === "repository" ? { checkout: definition.checkout } : {}),
|
|
103
103
|
...common,
|
|
104
104
|
...learning,
|
|
105
105
|
...capped,
|
package/dist/api-only.d.ts
CHANGED
|
@@ -10,8 +10,7 @@ import type { Route } from "./server.js";
|
|
|
10
10
|
* and resets it (deleteAgentLearning: the agent and its runs kept) when it erases what an agent learned;
|
|
11
11
|
* - a run's usage lines (what its cost.usd joins, by meter) are a read of that run alone, cut as the run's read is;
|
|
12
12
|
* - an operator or a scaler reads the runners' capacity (getCapacity, capacity.ts) from the server whose runners run apart;
|
|
13
|
-
* - a backend
|
|
14
|
-
* credential, to hold back a job whose server isn't saved before its launch is refused for it;
|
|
13
|
+
* - a backend reads the saved MCP servers' names (listMcpServerNames), never a URL or a credential;
|
|
15
14
|
* - a backend uploads an agent's package (importTemplate, as {files} alone: a GitHub source is refused in this profile's
|
|
16
15
|
* words, template-import.ts), which an apply then makes into its agent;
|
|
17
16
|
* - a backend that deploys agents here applies their template, reads the agent and its revisions, moves its current
|
package/dist/api-only.js
CHANGED
|
@@ -15,8 +15,7 @@ import { LAUNCH_HOOK_SECRET_ENV, LAUNCH_HOOK_URL_ENV } from "./trigger-launch-ho
|
|
|
15
15
|
* and resets it (deleteAgentLearning: the agent and its runs kept) when it erases what an agent learned;
|
|
16
16
|
* - a run's usage lines (what its cost.usd joins, by meter) are a read of that run alone, cut as the run's read is;
|
|
17
17
|
* - an operator or a scaler reads the runners' capacity (getCapacity, capacity.ts) from the server whose runners run apart;
|
|
18
|
-
* - a backend
|
|
19
|
-
* credential, to hold back a job whose server isn't saved before its launch is refused for it;
|
|
18
|
+
* - a backend reads the saved MCP servers' names (listMcpServerNames), never a URL or a credential;
|
|
20
19
|
* - a backend uploads an agent's package (importTemplate, as {files} alone: a GitHub source is refused in this profile's
|
|
21
20
|
* words, template-import.ts), which an apply then makes into its agent;
|
|
22
21
|
* - a backend that deploys agents here applies their template, reads the agent and its revisions, moves its current
|
package/dist/cli.js
CHANGED
|
@@ -578,6 +578,8 @@ const [{ fauxEnvOf, startServe }, { besideRunnerOptions, besideStopping, runnerB
|
|
|
578
578
|
Object.assign(process.env, startedWith({ ...(values.port !== undefined ? { port: values.port } : {}), open: values.open === true }));
|
|
579
579
|
let serve;
|
|
580
580
|
let serveOptions;
|
|
581
|
+
// The anonymous counts start once the server has (below); a feature used before then, in the start's first moment, is not counted.
|
|
582
|
+
let used;
|
|
581
583
|
const trustedProxies = (process.env.AGENTRUN_TRUSTED_PROXIES ?? "").split(",").map((entry) => entry.trim()).filter(Boolean);
|
|
582
584
|
try {
|
|
583
585
|
serve = await startServe(serveOptions = {
|
|
@@ -587,6 +589,7 @@ try {
|
|
|
587
589
|
console.error(`agentrun-serve: ${error.message}`);
|
|
588
590
|
process.exit(1);
|
|
589
591
|
},
|
|
592
|
+
onUsage: (event) => used?.(event),
|
|
590
593
|
data, port, ...(values.port === undefined ? { nextFreePort: true } : {}), ...(early ? { listener: early } : {}), ...(values.listen ? { host: values.listen } : {}), ...(given ? { token: given } : {}), ...(givenList ? { tokens: givenList } : {}), ...(values.faux ? { faux: values.faux } : {}), ...(values["faux-browser"] ? { fauxBrowser: values["faux-browser"] } : {}), ...(values["faux-github"] ? { fauxGitHub: true } : {}), allowHosts: values["allow-host"],
|
|
591
594
|
...(values["max-runs"] !== undefined ? { maxRuns: Number(values["max-runs"]) } : {}),
|
|
592
595
|
// The owner's harness modules: --harness-module, else AGENTRUN_SERVE_HARNESS_MODULES (harness-table.ts).
|
|
@@ -617,8 +620,10 @@ catch (error) {
|
|
|
617
620
|
// (besideRunnerOptions): at most --max-runs runs at once, the rest waiting queued, and on the stop each busy run finishes
|
|
618
621
|
// its turn for up to --drain-timeout.
|
|
619
622
|
let runnerProc;
|
|
620
|
-
// Anonymous usage counts (docs/telemetry.md). It hears each run's end from the runner beside the server
|
|
623
|
+
// Anonymous usage counts (docs/telemetry.md). It hears each run's end from the runner beside the server (with --no-runner it
|
|
624
|
+
// counts no runs), and each use of suggested agents from the server (onUsage).
|
|
621
625
|
const telemetry = startTelemetry({ data: resolve(data), ...(values.faux ? { faux: true } : {}) });
|
|
626
|
+
used = telemetry.used;
|
|
622
627
|
const { loops, loopsTold, drainMs } = besideRunnerOptions(serveOptions, process.env);
|
|
623
628
|
// A stop asked during the server's start starts no runner: nothing is claimed for the stop to cut.
|
|
624
629
|
if (!values["no-runner"] && askedAt === undefined) {
|
|
@@ -10,9 +10,10 @@ export type ComposioControl = {
|
|
|
10
10
|
export declare const COMPOSIO_USER = "agentrun";
|
|
11
11
|
/** A Composio toolkit's slug, as a save takes it once trimmed and lower-cased. */
|
|
12
12
|
export declare const COMPOSIO_TOOLKIT: RegExp;
|
|
13
|
-
/** A Composio user id, as a save's `user_id` and a run's binding
|
|
14
|
-
* a host names a team's connected accounts by a user such as `team:<tenant>`. */
|
|
13
|
+
/** A Composio user id, as a save's `user_id` and a run's binding take it. */
|
|
15
14
|
export declare const COMPOSIO_USER_ID: RegExp;
|
|
15
|
+
/** COMPOSIO_USER_ID in words, for the messages that refuse a user id. */
|
|
16
|
+
export declare const COMPOSIO_USER_ID_WORDS = "letters, digits and . _ @ : - (1 to 128)";
|
|
16
17
|
/** The `user_id` a save names for a per-run server, reserved for that and never a Composio user: the server keeps no user
|
|
17
18
|
* and no connected account, and each run names its own (mcp_auth.<server> = {composio_user_id, connected_account_id?}). */
|
|
18
19
|
export declare const COMPOSIO_PER_RUN = "per_run";
|
package/dist/composio-preset.js
CHANGED
|
@@ -16,9 +16,10 @@ export const COMPOSIO_USER = "agentrun";
|
|
|
16
16
|
/** A Composio toolkit's slug, as a save takes it once trimmed and lower-cased. */
|
|
17
17
|
export const COMPOSIO_TOOLKIT = /^[a-z0-9][a-z0-9_-]{0,63}$/;
|
|
18
18
|
const TOOLKIT = COMPOSIO_TOOLKIT;
|
|
19
|
-
/** A Composio user id, as a save's `user_id` and a run's binding
|
|
20
|
-
* a host names a team's connected accounts by a user such as `team:<tenant>`. */
|
|
19
|
+
/** A Composio user id, as a save's `user_id` and a run's binding take it. */
|
|
21
20
|
export const COMPOSIO_USER_ID = /^[A-Za-z0-9._@:-]{1,128}$/;
|
|
21
|
+
/** COMPOSIO_USER_ID in words, for the messages that refuse a user id. */
|
|
22
|
+
export const COMPOSIO_USER_ID_WORDS = "letters, digits and . _ @ : - (1 to 128)";
|
|
22
23
|
const USER_ID = COMPOSIO_USER_ID;
|
|
23
24
|
/** The `user_id` a save names for a per-run server, reserved for that and never a Composio user: the server keeps no user
|
|
24
25
|
* and no connected account, and each run names its own (mcp_auth.<server> = {composio_user_id, connected_account_id?}). */
|
|
@@ -197,7 +198,7 @@ export async function composioSave(body, control, save, name, signal, savedUrl)
|
|
|
197
198
|
if (!tools.length || tools.length > MAX_TOOLS || !tools.every((t) => typeof t === "string" && t && t.length <= MAX_SLUG))
|
|
198
199
|
issues.push(issue("tools", "invalid", `Send the slugs of the actions to grant: 1 to ${MAX_TOOLS} of them, each at most ${MAX_SLUG} characters.`));
|
|
199
200
|
if (!USER_ID.test(user))
|
|
200
|
-
issues.push(issue("user_id", "invalid", `A user_id is
|
|
201
|
+
issues.push(issue("user_id", "invalid", `A user_id is ${COMPOSIO_USER_ID_WORDS}, or "${COMPOSIO_PER_RUN}" for a server each run names its own account for.`));
|
|
201
202
|
if (price !== undefined && !priceValid(price))
|
|
202
203
|
issues.push(issue("price_usd", "invalid", "price_usd is what each call of the server's actions costs, in USD: a finite number, 0 or more."));
|
|
203
204
|
if (ownConfig !== undefined && !COMPOSIO_AUTH_CONFIG_ID.test(ownConfig))
|
package/dist/computer-needs.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export type NeedsAnswer = {
|
|
|
24
24
|
export declare function missingNeeds(client: ComputerClient, needs: readonly string[], signal?: AbortSignal): Promise<NeedsAnswer>;
|
|
25
25
|
/** How to give the Docker box an image that has what a sandbox needs. */
|
|
26
26
|
export declare const DOCKER_IMAGE_FIX = "Set AGENTRUN_DOCKER_IMAGE to an image that has them and restart the server. For video (chrome, ffmpeg, ffprobe, hyperframes), build the media image: docker build -t agentrun-media:<first 12 hex of its sha256> - < packages/computer/media/Dockerfile, and name that tag. For decks, documents and sheets (python-pptx, python-docx, openpyxl, pptxgenjs, docx, exceljs), build the documents image: docker build -t agentrun-documents:<first 12 hex of the sha256 of its Dockerfile and documents.sh> packages/computer/documents, and name that tag.";
|
|
27
|
-
/** The words a run ends with when its setting needs
|
|
27
|
+
/** The words a run ends with when its setting has needs but is no sandbox (`what`: "none", "a desktop on E2B"):
|
|
28
28
|
* only a sandbox's box is checked for them, so nothing ran. The validator keeps needs to a sandbox; a stored body and a
|
|
29
29
|
* launch's computer are read as given, so the claim refuses this too, never running without them. */
|
|
30
30
|
export declare function needsNoSandboxWords(needs: readonly string[], what: string): string;
|
package/dist/computer-needs.js
CHANGED
|
@@ -63,7 +63,7 @@ function fixFor(entry) {
|
|
|
63
63
|
return `Set ${entry.imageEnv} to an image of ${entry.label}'s that has them and restart the server, or run this agent on the Docker box with an image that has them (AGENTRUN_DOCKER_IMAGE).`;
|
|
64
64
|
return `Give this agent a computer whose image has them: on the Docker box, set AGENTRUN_DOCKER_IMAGE to such an image (the media image, ${MEDIA_RECIPE_PATH}, has chrome, ffmpeg, ffprobe and hyperframes).`;
|
|
65
65
|
}
|
|
66
|
-
/** The words a run ends with when its setting needs
|
|
66
|
+
/** The words a run ends with when its setting has needs but is no sandbox (`what`: "none", "a desktop on E2B"):
|
|
67
67
|
* only a sandbox's box is checked for them, so nothing ran. The validator keeps needs to a sandbox; a stored body and a
|
|
68
68
|
* launch's computer are read as given, so the claim refuses this too, never running without them. */
|
|
69
69
|
export function needsNoSandboxWords(needs, what) {
|
|
@@ -48,8 +48,10 @@ export declare const gpuOf: (computer: {
|
|
|
48
48
|
export declare const kindSettings: (kind: ComputerKind) => string[];
|
|
49
49
|
/** Whether a run of a kind can record its screen on this server (GET /v2/computers' `record`), and why not, in words. */
|
|
50
50
|
export type RecordView = {
|
|
51
|
-
available:
|
|
52
|
-
|
|
51
|
+
available: true;
|
|
52
|
+
} | {
|
|
53
|
+
available: false;
|
|
54
|
+
why: string;
|
|
53
55
|
};
|
|
54
56
|
/** Whether a run of `kind` can record its screen here: the kind takes record (OPTIONAL's record.kinds) and ffmpeg is on
|
|
55
57
|
* `path` (recorderMissing, the server's PATH now when absent), as a save of record: true is checked. */
|
package/dist/computers.d.ts
CHANGED
|
@@ -56,8 +56,6 @@ export interface ComputerRoutesOptions {
|
|
|
56
56
|
* relays each socket to it, so a dial provider's runs can use it and its row says nothing. Read once per view and per
|
|
57
57
|
* test. Absent: none does. A paired computer's socket is never relayed. */
|
|
58
58
|
readonly relayed?: () => Promise<boolean>;
|
|
59
|
-
/** The PATH a kind's `record` looks for ffmpeg on. Absent: the server's, read at each view, as a save's check reads it. */
|
|
60
|
-
readonly path?: string;
|
|
61
59
|
}
|
|
62
60
|
/** A provider as Settings shows it: `metered` straight from the kind registry (its computers are billed by the vendor);
|
|
63
61
|
* its keys as SecretMeta under `secrets`, each named "computer:<provider>:<KEY>", and `required`, the names of the ones
|
package/dist/computers.js
CHANGED
|
@@ -194,7 +194,7 @@ export function createComputerRoutes(options) {
|
|
|
194
194
|
const why = offered ? undefined
|
|
195
195
|
: serving.length && serving.every(refusedOpen) ? `every provider of a ${kind} computer needs a network, and this server's ${BOX_ALLOW_ENV} is none (no network)`
|
|
196
196
|
: serving.length ? `no provider of a ${kind} computer can reach this server's run folders` : `no provider serves a ${kind} computer`;
|
|
197
|
-
return { kind, offered, ...(why ? { why } : {}), groups: [...spec.required, ...spec.optional], tools: [...tools(kind)], settings: kindSettings(kind), record: recordOf(kind, options.
|
|
197
|
+
return { kind, offered, ...(why ? { why } : {}), groups: [...spec.required, ...spec.optional], tools: [...tools(kind)], settings: kindSettings(kind), record: recordOf(kind, options.env?.PATH), providers, ...(kind === "none" ? choice({ kind: "none" }) : {}) };
|
|
198
198
|
}),
|
|
199
199
|
paired,
|
|
200
200
|
};
|