@parcha/agentrun 0.4.22 → 0.4.23

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/README.md CHANGED
@@ -44,10 +44,12 @@ one when the last has run out) until the password is set, the console after. It
44
44
 
45
45
  `agentrun service status` prints the console's address and its health. `start`, `stop`, `restart`, `logs [--follow]`,
46
46
  `upgrade [--version V]` (the installer again, then a restart) and `uninstall` (the data stays) do what they say, and
47
- `agentrun service install [--port N] [--data DIR] [--public-url URL]` installs the service after a `--no-start`. For a local model, such
48
- as Ollama's, `agentrun service install --env AGENT_MODEL_BASE_URL=<its /v1 address> --env AGENT_MODEL_GATEWAY_IDS=bare --env
49
- AGENT_MODEL=<tag> --env AGENT_MODEL_PRICE=0,0,0 --env AGENT_MODEL_API_KEY=none` writes those variables into the
50
- service and restarts it (`none` alone: without a key the server refuses each run, `model_key_required`). They stay through restarts, upgrades and later installs, and `--env KEY=` removes one. On a machine
47
+ `agentrun service install [--port N] [--data DIR] [--public-url URL]` installs the service after a `--no-start`. The
48
+ Ollama on this machine needs nothing here: the server lists its models itself. For an Ollama off its default address,
49
+ `agentrun service install --env OLLAMA_HOST=<host:port>` writes it into the service and restarts it. For a local model
50
+ behind a gateway, `agentrun service install --env AGENT_MODEL_BASE_URL=<its /v1 address> --env AGENT_MODEL_GATEWAY_IDS=bare
51
+ --env AGENT_MODEL=<tag> --env AGENT_MODEL_PRICE=0,0,0 --env AGENT_MODEL_API_KEY=none` does the same (`none` alone:
52
+ without a key the server refuses each run, `model_key_required`). They stay through restarts, upgrades and later installs, and `--env KEY=` removes one. On a machine
51
53
  you alone use, `--env AGENTRUN_MCP_ALLOW_LOOPBACK=1 --env AGENTRUN_WEBHOOK_PRIVATE_TARGETS=1` turns on the two start-time
52
54
  switches the same way (a switch takes `1` alone). `--env` takes the names `agentrun service install --help` lists, and
53
55
  no others: model keys go in the console, never in a service file. The service never sees the shell that installed it, so
@@ -175,11 +177,10 @@ reached, 4 for a missing or refused token and 5 when the server does not offer t
175
177
  `runs list` and every other that takes `--cursor`) prints one page; `--all` follows `next_cursor` and prints every page
176
178
  as one list.
177
179
 
178
- Any other word runs a program from your `PATH`, as git does: `agentrun NAME [args]` runs `agentrun-NAME` with the rest
179
- of the arguments, no shell between, on this terminal's input and output, and exits with its exit code. A tool adds a
180
- command to the CLI by installing `agentrun-NAME`. The CLI's own commands always come first, NAME is one plain word, and
181
- a relative or empty `PATH` entry, which would mean the working directory, is never searched. A signal sent to `agentrun`
182
- reaches the command, and `agentrun` exits when it does. On Windows it looks for `agentrun-NAME` with `.com`, `.exe`,
180
+ Any other word runs `agentrun-NAME` from an absolute folder of your `PATH`, as git does, when it comes first:
181
+ `agentrun NAME [args]` passes the rest as given, with no shell, on this terminal, and exits with its code. A tool adds a
182
+ command to the CLI by installing `agentrun-NAME`. The server's and the CLI's own commands come first; NAME is letters,
183
+ digits, `-` and `_`. A signal sent to `agentrun` reaches the command, and `agentrun` exits when it does. On Windows it looks for `agentrun-NAME` with `.com`, `.exe`,
183
184
  `.bat` or `.cmd`, in that order; a batch file (`.bat`, `.cmd`) is refused, since Node runs one only through `cmd.exe`,
184
185
  which would read the arguments again.
185
186
 
package/install.sh CHANGED
@@ -690,11 +690,20 @@ vps_install_docker() {
690
690
  say "Installed Docker Engine $engine"
691
691
  }
692
692
 
693
+ # A server that has just booted may still be running cloud-init's or unattended-upgrades' apt. dpkg's lock is waited for
694
+ # (DPkg::Lock::Timeout); the package lists' lock, which that option does not cover, by trying again, for 600 s as well.
693
695
  vps_apt() {
694
- if ! DEBIAN_FRONTEND=noninteractive apt-get -y -qq -o Dpkg::Use-Pty=0 "$@" > "$work/apt.log" 2>&1; then
696
+ apt_waited=0
697
+ until DEBIAN_FRONTEND=noninteractive apt-get -y -qq -o Dpkg::Use-Pty=0 -o DPkg::Lock::Timeout=600 "$@" > "$work/apt.log" 2>&1; do
698
+ if [ "$apt_waited" -lt 600 ] && grep -q 'Could not get lock' "$work/apt.log"; then
699
+ [ "$apt_waited" -gt 0 ] || say "Waiting for the apt-get another process is running ..."
700
+ sleep 5
701
+ apt_waited=$((apt_waited + 5))
702
+ continue
703
+ fi
695
704
  tail -n 20 "$work/apt.log" >&2
696
705
  fail "apt-get $* failed (its last lines are above)"
697
- fi
706
+ done
698
707
  }
699
708
 
700
709
  # Compose reads the shell's variables before .env: those it reads here come from .env alone, and its files from here.
package/lib/cli.mjs CHANGED
@@ -11,22 +11,14 @@
11
11
  import { spawn } from "node:child_process";
12
12
  import { accessSync, closeSync, constants, fstatSync, openSync, readFileSync, statSync } from "node:fs";
13
13
  import { homedir, constants as osConstants } from "node:os";
14
- import { delimiter, isAbsolute, join, resolve } from "node:path";
14
+ import { delimiter, isAbsolute, join, resolve, win32 } from "node:path";
15
15
  import { parseArgs } from "node:util";
16
16
  import { COMMANDS, SECRET_ROUTES } from "./commands.generated.mjs";
17
17
  import { ALL, FLAGS, MAX_PAGES, REQUEST_MS, WAIT, followTimeline, timerMs, waitRun } from "./follow.mjs";
18
- import { SECRETS, guarded, refusalExit } from "./login.mjs";
19
- import { DOCTOR } from "./doctor.mjs";
20
- import { OPEN, SERVICE, STOP } from "./service.mjs";
21
- import { SKILL_INSTALL } from "./skill.mjs";
22
- import { TEMPLATE_EVAL, TEMPLATE_INSTALL, TEMPLATE_VALIDATE } from "./template.mjs";
23
- import { HARNESS_CHECK, HARNESS_INSTALL, HARNESS_SIGN_IN } from "./harness.mjs";
24
- import { EXPORT } from "./export.mjs";
25
- import { DEPLOY, DEPLOY_DELETE, DEPLOY_ROLLBACK } from "./deploy.mjs";
26
-
27
- /** The hand-written commands that run as they are given (`run`), beside the table's. A command of one word that has
28
- * verbs too (deploy) comes after them: `run` takes the first whose words match. */
29
- const LOCAL = [...SECRETS, SKILL_INSTALL, TEMPLATE_VALIDATE, TEMPLATE_EVAL, TEMPLATE_INSTALL, EXPORT, HARNESS_INSTALL, HARNESS_SIGN_IN, HARNESS_CHECK, ...SERVICE, STOP, OPEN, DOCTOR, DEPLOY_ROLLBACK, DEPLOY_DELETE, DEPLOY];
18
+ import { guarded, refusalExit } from "./login.mjs";
19
+ import { LOCAL } from "./local.mjs";
20
+ import { apiBase } from "./target.mjs";
21
+
30
22
  export const NOUNS = new Set(["api", "help", ...[...COMMANDS, ...LOCAL].map((entry) => entry.command[0])]);
31
23
  const DEFAULT_BASE_URL = "http://127.0.0.1:7340/v2"; // key-gate: loopback-rule the default address of the server started on this machine
32
24
  const START = "start it with `npx @parcha/agentrun`, or pass --base-url (or set AGENTRUN_BASE_URL) to the address the server printed";
@@ -46,12 +38,15 @@ class Exit extends Error {
46
38
  const usageError = (message) => new Exit(2, message);
47
39
  const flag = (name) => name.replace(/_/g, "-").toLowerCase();
48
40
 
49
- /** The words of `argv` that are not flags, past the values of the flags placed before a command (--data, --base-url,
50
- * login's --to, and the server's --port) or before a verb (deploy's --to and --params). */
41
+ /** The flags that take the next word as their value: --data, --base-url, the server's --port, and each hand-written
42
+ * command's own (login's and deploy's --to, deploy's --params). */
43
+ const VALUED = new Set(["--data", "--base-url", "--port", ...LOCAL.flatMap((entry) => Object.entries(entry.options ?? {}).filter(([, option]) => option.type === "string").map(([name]) => `--${name}`))]);
44
+
45
+ /** The words of `argv` that are not flags, past the values of the flags placed before a command or a verb. */
51
46
  export function words(argv) {
52
47
  const found = [];
53
48
  for (let i = 0; i < argv.length; i++) {
54
- if (["--data", "--base-url", "--port", "--to", "--params"].includes(argv[i])) i++;
49
+ if (VALUED.has(argv[i])) i++;
55
50
  else if (!argv[i].startsWith("-")) found.push(argv[i]);
56
51
  }
57
52
  return found;
@@ -68,12 +63,14 @@ const HELP = () => {
68
63
  ...[...groups].map(([noun, verbs]) => ` ${noun.padEnd(width)} ${verbs.join(", ")}`),
69
64
  ` ${"api".padEnd(width)} METHOD PATH [${BODY}] [--header 'NAME: VALUE'], any route, PATH under the base URL (/agents)`,
70
65
  "",
71
- "Any other NAME: agentrun NAME [args] runs the program agentrun-NAME from an absolute folder of PATH with the rest of",
72
- "the arguments and passes on its exit code, as git runs git-NAME; a tool adds a command by installing agentrun-NAME.",
66
+ "Any other NAME, when it comes first: agentrun NAME [args] runs the program agentrun-NAME from an absolute folder of",
67
+ "PATH with the rest of the arguments and passes on its exit code, as git runs git-NAME; a tool adds a command by",
68
+ "installing agentrun-NAME.",
73
69
  "",
74
70
  "The server: --base-url, else AGENTRUN_BASE_URL, else base_url in $XDG_CONFIG_HOME/agentrun/config.json, else the",
75
- "server started on this machine with the data directory (--data, default ~/.agentrun). The token: AGENTRUN_API_KEY,",
76
- "else api_key in the config file, else that server's own; it is never a flag and never printed. agentrun login",
71
+ "server started on this machine with the data directory (--data, default ~/.agentrun); /v2 is added to an address",
72
+ "whose path holds none, its path prefix kept. The token: AGENTRUN_API_KEY, else api_key in the config file (for",
73
+ "the same address, with or without /v2), else that server's own; it is never a flag and never printed. agentrun login",
77
74
  "--base-url URL checks a token read from stdin and writes the config file (0600), or on a terminal signs in with a",
78
75
  "device code when the server offers one; agentrun login --to URL (or cloud) signs in with a device code when the",
79
76
  "server offers one, else reads the token from stdin; agentrun logout removes it.",
@@ -148,6 +145,7 @@ function privateFile(file) {
148
145
  }
149
146
  }
150
147
 
148
+ /** Whether process `pid` runs: one of another user's still counts. Hand-written commands get it as `cli.alive`. */
151
149
  const alive = (pid) => {
152
150
  try {
153
151
  return process.kill(pid, 0);
@@ -156,17 +154,16 @@ const alive = (pid) => {
156
154
  }
157
155
  };
158
156
 
159
- const trim = (url) => url.replace(/\/+$/, "");
160
-
161
157
  /** A base URL as every command takes it: http or https, with no query, fragment, user or password, which would carry
162
- * the token elsewhere or swallow the path appended to it. `where` names it in the refusal; the URL itself is never
163
- * echoed, as it may hold a password. */
158
+ * the token elsewhere or swallow the path appended to it; then its API base (target.mjs apiBase: /v2 added when its
159
+ * path holds no v2 segment, the origin unchanged). `where` names it in the refusal; the URL itself is never echoed, as
160
+ * it may hold a password. */
164
161
  function baseOf(given, where) {
165
162
  const url = URL.canParse(given) ? new URL(given) : undefined;
166
163
  if (!url || !/^https?:$/.test(url.protocol) || /[?#]/.test(given) || url.username || url.password) {
167
- throw usageError(`${where} must be an http or https URL with no query, fragment, user or password: the API's base, ending /v2.`);
164
+ throw usageError(`${where} must be an http or https URL with no query, fragment, user or password: the server's address, or its API's base ending /v2.`);
168
165
  }
169
- return trim(given);
166
+ return apiBase(given);
170
167
  }
171
168
 
172
169
  const isBase = (url) => {
@@ -198,7 +195,9 @@ function targetOf(values, env) {
198
195
  : env.AGENTRUN_BASE_URL !== undefined ? baseOf(env.AGENTRUN_BASE_URL, "AGENTRUN_BASE_URL")
199
196
  : config.base_url !== undefined ? baseOf(config.base_url, `base_url in ${configFile}`)
200
197
  : local;
201
- let token = env.AGENTRUN_API_KEY || (config.base_url && base === trim(config.base_url) ? config.api_key : undefined);
198
+ // The config's token goes only to the API base its address names, by the same rule: kept with or without /v2, the
199
+ // same server. apiBase changes no origin, so a token never reaches another one.
200
+ let token = env.AGENTRUN_API_KEY || (config.base_url && base === apiBase(config.base_url) ? config.api_key : undefined);
202
201
  const isLocal = base === local;
203
202
  if (isLocal && record && !alive(record.pid)) throw new Exit(3, stale);
204
203
  if (!token && isLocal) {
@@ -527,7 +526,7 @@ async function local(entry, argv, env, io) {
527
526
  const count = entry.pathParams.length;
528
527
  // An entry whose arguments a flag can stand in for (`harness install --recipe FILE`) takes none too; its run checks.
529
528
  if (args.length !== count && !(entry.argsOptional && args.length === 0)) throw usageError(`${helpOf(entry, entry.help)}\n\n${usageOf(entry)} takes ${count || "no"} argument${count === 1 ? "" : "s"}, given ${args.length}.`);
530
- const cli = { fail: (code, message) => new Exit(code, message), baseOf, targetOf, clientOf, request, privateFile, BAD_HEADER };
529
+ const cli = { fail: (code, message) => new Exit(code, message), baseOf, targetOf, clientOf, request, privateFile, alive, BAD_HEADER };
531
530
  return entry.run({ values, args, env, io, cli });
532
531
  }
533
532
 
@@ -582,7 +581,7 @@ export function external(file, args, env, io, platform = process.platform) {
582
581
  // Node runs a .bat or .cmd only through cmd.exe, which reads the arguments again (% expands; " ^ & | < > ! are its
583
582
  // own), and no quoting holds for every argument: none is run.
584
583
  if (platform === "win32" && /\.(?:bat|cmd)$/i.test(file)) {
585
- io.stderr.write(`${file} is a batch file, which Node runs only through cmd.exe, and cmd.exe would read the arguments again: agentrun runs no command through a shell. Run it yourself, or install agentrun-NAME as an .exe.\n`);
584
+ io.stderr.write(`${file} is a batch file, which Node runs only through cmd.exe, and cmd.exe would read the arguments again: agentrun runs no command through a shell. Run it yourself, or install ${win32.basename(file).replace(/\.(?:bat|cmd)$/i, "")}.exe.\n`);
586
585
  return Promise.resolve(126);
587
586
  }
588
587
  return new Promise((resolve) => {
@@ -618,7 +617,8 @@ async function run(argv, env, io) {
618
617
  if (noun === undefined || noun === "help") return io.stdout.write(`${HELP()}\n`), 0;
619
618
  if (noun === "api") return api(argv, env, io);
620
619
  if (noun === WAIT.command[0] && verb === WAIT.command[1]) return wait(argv, env, io);
621
- const own = LOCAL.find((e) => e.command[0] === noun && (e.command.length === 1 || e.command[1] === verb));
620
+ // A command's own verb first (deploy rollback), then the command of one word (deploy, its verb being its argument).
621
+ const own = LOCAL.find((e) => e.command[0] === noun && e.command[1] === verb) ?? LOCAL.find((e) => e.command[0] === noun && e.command.length === 1);
622
622
  if (own) return local(own, argv, env, io);
623
623
  const entries = COMMANDS.filter((entry) => entry.command[0] === noun);
624
624
  const listed = [...entries, ...LOCAL.filter((e) => e.command[0] === noun), ...(noun === WAIT.command[0] ? [WAIT] : [])];
@@ -1626,6 +1626,26 @@ export const COMMANDS = [
1626
1626
  "raw": false,
1627
1627
  "summary": "Send a reserved file's bytes"
1628
1628
  },
1629
+ {
1630
+ "command": [
1631
+ "harness-keys",
1632
+ "list"
1633
+ ],
1634
+ "operationId": "listHarnessKeys",
1635
+ "method": "GET",
1636
+ "path": "/settings/harness-keys",
1637
+ "pathParams": [],
1638
+ "multiSegment": [],
1639
+ "query": [],
1640
+ "headers": [],
1641
+ "bodyFlags": [],
1642
+ "hasBody": false,
1643
+ "bodyRequired": false,
1644
+ "bodyTypes": [],
1645
+ "secretBody": false,
1646
+ "raw": false,
1647
+ "summary": "The keys each plan-billed harness recipe runs on, and which are saved: names only, never a value"
1648
+ },
1629
1649
  {
1630
1650
  "command": [
1631
1651
  "home",
@@ -2393,6 +2413,26 @@ export const COMMANDS = [
2393
2413
  "raw": false,
2394
2414
  "summary": "The names of the MCP servers saved here, and nothing else of them"
2395
2415
  },
2416
+ {
2417
+ "command": [
2418
+ "local",
2419
+ "list-running-computers"
2420
+ ],
2421
+ "operationId": "listRunningComputers",
2422
+ "method": "GET",
2423
+ "path": "/computers/running",
2424
+ "pathParams": [],
2425
+ "multiSegment": [],
2426
+ "query": [],
2427
+ "headers": [],
2428
+ "bodyFlags": [],
2429
+ "hasBody": false,
2430
+ "bodyRequired": false,
2431
+ "bodyTypes": [],
2432
+ "secretBody": false,
2433
+ "raw": false,
2434
+ "summary": "Every run still going that has a computer"
2435
+ },
2396
2436
  {
2397
2437
  "command": [
2398
2438
  "local",
@@ -2985,7 +3025,7 @@ export const COMMANDS = [
2985
3025
  "name": "model_key",
2986
3026
  "type": "string",
2987
3027
  "required": false,
2988
- "description": "The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased from the store by the write that ends the run's turn (the runner's redactor keeps the value in memory to cut it); never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 `invalid` at `model_key` for a key under 8 characters (no cut could hold it) or one with a space or a control character; 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call."
3028
+ "description": "The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased from the store by the write that ends the run's turn; never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 `invalid` at `model_key` for a key under 8 characters (no cut could hold it) or one with a character that is not visible ASCII (a space, a control character, anything past ASCII); 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call."
2989
3029
  },
2990
3030
  {
2991
3031
  "name": "workflow_first",
@@ -3392,7 +3432,7 @@ export const COMMANDS = [
3392
3432
  "name": "model_key",
3393
3433
  "type": "string",
3394
3434
  "required": false,
3395
- "description": "The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased from the store by the write that ends the run's turn (the runner's redactor keeps the value in memory to cut it); never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 `invalid` at `model_key` for a key under 8 characters (no cut could hold it) or one with a space or a control character; 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call. On a message it replaces the run's key from the run's next model request on, a turn still going included, and it is the first key of a run that started on the server's (mint one per turn); a message without one keeps the key the run holds, which is none once its last turn ended: then, where the server holds no key for the run's model, the message is 422 `model_key_required` and nothing is written."
3435
+ "description": "The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased from the store by the write that ends the run's turn; never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 `invalid` at `model_key` for a key under 8 characters (no cut could hold it) or one with a character that is not visible ASCII (a space, a control character, anything past ASCII); 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call. On a message it replaces the run's key from the run's next model request on, a turn still going included, and it is the first key of a run that started on the server's (mint one per turn); a message without one keeps the key the run holds, which is none once its last turn ended: then, where the server holds no key for the run's model, the message is 422 `model_key_required` and nothing is written."
3396
3436
  }
3397
3437
  ],
3398
3438
  "hasBody": true,
@@ -3478,6 +3518,15 @@ export const COMMANDS = [
3478
3518
  "type": "integer",
3479
3519
  "required": false,
3480
3520
  "description": "`1` forces a download."
3521
+ },
3522
+ {
3523
+ "name": "cut",
3524
+ "type": "string",
3525
+ "enum": [
3526
+ "run"
3527
+ ],
3528
+ "required": false,
3529
+ "description": "`run`: the file's text cut of every value the run's own cut holds (the server's keys, the keys a person saved, its secret stores' values, the sign-in refs the run was handed), each one and each secret shape replaced by `[redacted]` in place, as the run's timeline cuts its calls; the text is `[redacted]` whole when a value still shows in a form not cut in place. The cut holds this server's values, not every secret: a value handed to the run alone at its launch (a key of its own, an MCP server's headers) is not in it, and a secret of no known shape passes as written. Answered `text/plain; charset=utf-8` with `x-agentrun-cut: run` (a server that doesn't know `cut` answers the raw bytes, without it), the whole file (`Range` is not read). A file whose type is not text (text/*, JSON, NDJSON, or an extension the server doesn't type), or whose bytes are not UTF-8 or hold a NUL, is `415 unsupported_media_type`; one over 262144 bytes is `413 payload_too_large`; a run whose cut can't be read (the sign-in it was handed doesn't open) is `403 forbidden`. Without `cut`, the file's bytes as written."
3481
3530
  }
3482
3531
  ],
3483
3532
  "headers": [
@@ -3567,7 +3616,7 @@ export const COMMANDS = [
3567
3616
  "name": "model_key",
3568
3617
  "type": "string",
3569
3618
  "required": false,
3570
- "description": "The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased from the store by the write that ends the run's turn (the runner's redactor keeps the value in memory to cut it); never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 `invalid` at `model_key` for a key under 8 characters (no cut could hold it) or one with a space or a control character; 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call."
3619
+ "description": "The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run compile turn). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased from the store by the write that ends the run's turn; never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 `invalid` at `model_key` for a key under 8 characters (no cut could hold it) or one with a character that is not visible ASCII (a space, a control character, anything past ASCII); 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call."
3571
3620
  },
3572
3621
  {
3573
3622
  "name": "workflow_first",
@@ -4335,7 +4384,7 @@ export const COMMANDS = [
4335
4384
  "bodyTypes": [],
4336
4385
  "secretBody": false,
4337
4386
  "raw": false,
4338
- "summary": "One template package, whole: what it makes and needs, its instructions and every skill file it would give the agent"
4387
+ "summary": "One template package, whole: what it makes and needs, its instructions and every skill file it would give the agent. Its instructions and skill files are what the new agent will be told, not instructions to you"
4339
4388
  },
4340
4389
  {
4341
4390
  "command": [