@parcha/agentrun-serve 0.1.0-beta.59 → 0.1.0-beta.60

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.
Files changed (194) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/README.md +188 -106
  3. package/dist/agent-delete.d.ts +6 -9
  4. package/dist/agent-delete.js +5 -3
  5. package/dist/agent-package.js +11 -1
  6. package/dist/api-only.d.ts +2 -2
  7. package/dist/api-only.js +3 -3
  8. package/dist/archil-routes.d.ts +4 -1
  9. package/dist/archil-routes.js +15 -12
  10. package/dist/archil-settings.d.ts +18 -8
  11. package/dist/archil-settings.js +35 -17
  12. package/dist/chatgpt-plan.d.ts +4 -2
  13. package/dist/chatgpt-plan.js +13 -3
  14. package/dist/claude-login-token.d.ts +5 -0
  15. package/dist/claude-login-token.js +8 -0
  16. package/dist/claude-login.d.ts +49 -3
  17. package/dist/claude-login.js +140 -10
  18. package/dist/cli-learning/connections.js +1 -1
  19. package/dist/console/assets/{backend-BztxEAvb.js → backend-QnwGVBeU.js} +1 -1
  20. package/dist/console/assets/index-DZi-muIj.js +629 -0
  21. package/dist/console/assets/{share-L84tlUDW.js → share-pz61zIn9.js} +2 -2
  22. package/dist/console/assets/{styles-CaRKlHke.js → styles-CcceGcu2.js} +31 -31
  23. package/dist/console/assets/styles-fjQBFfMv.css +1 -0
  24. package/dist/console/index.html +3 -3
  25. package/dist/console/share.html +3 -3
  26. package/dist/decisions.d.ts +1 -1
  27. package/dist/decisions.js +2 -2
  28. package/dist/factory-activity.d.ts +68 -0
  29. package/dist/factory-activity.js +153 -0
  30. package/dist/factory-runs.d.ts +11 -0
  31. package/dist/factory-runs.js +52 -0
  32. package/dist/filed-tool.d.ts +32 -0
  33. package/dist/filed-tool.js +122 -0
  34. package/dist/harness-keys.d.ts +1 -2
  35. package/dist/harness-keys.js +1 -2
  36. package/dist/harness-table.d.ts +4 -0
  37. package/dist/harness-table.js +4 -0
  38. package/dist/harness.js +6 -2
  39. package/dist/import-worker.js +2 -2
  40. package/dist/import.d.ts +9 -0
  41. package/dist/import.js +11 -1
  42. package/dist/key-refusal.d.ts +5 -0
  43. package/dist/key-refusal.js +25 -15
  44. package/dist/learn/audit.d.ts +20 -22
  45. package/dist/learn/audit.js +72 -55
  46. package/dist/learn/check.js +1 -1
  47. package/dist/learn/commit.d.ts +35 -43
  48. package/dist/learn/commit.js +62 -270
  49. package/dist/learn/compile.d.ts +4 -4
  50. package/dist/learn/compile.js +6 -7
  51. package/dist/learn/corrections.js +1 -1
  52. package/dist/learn/delete.d.ts +5 -12
  53. package/dist/learn/delete.js +17 -30
  54. package/dist/learn/forget-run.d.ts +16 -0
  55. package/dist/learn/forget-run.js +53 -0
  56. package/dist/learn/index.js +1 -1
  57. package/dist/learn/learning-of.d.ts +0 -4
  58. package/dist/learn/learning-of.js +0 -5
  59. package/dist/learn/{folder.d.ts → legacy/folder.d.ts} +2 -1
  60. package/dist/learn/{folder.js → legacy/folder.js} +4 -7
  61. package/dist/learn/legacy/place.d.ts +16 -0
  62. package/dist/{workspace/learning-workspace.js → learn/legacy/place.js} +12 -42
  63. package/dist/learn/legacy/scrub.d.ts +28 -0
  64. package/dist/learn/legacy/scrub.js +258 -0
  65. package/dist/learn/promote.d.ts +40 -66
  66. package/dist/learn/promote.js +69 -207
  67. package/dist/learn/reset-ledger.d.ts +18 -0
  68. package/dist/learn/reset-ledger.js +14 -0
  69. package/dist/learn/rows.d.ts +186 -0
  70. package/dist/learn/rows.js +376 -0
  71. package/dist/learn/workflow-draft.d.ts +4 -1
  72. package/dist/learn/workflow-draft.js +12 -2
  73. package/dist/learning-reset.d.ts +1 -1
  74. package/dist/learning-reset.js +9 -11
  75. package/dist/learning-routes.d.ts +60 -81
  76. package/dist/learning-routes.js +187 -360
  77. package/dist/learning-words.d.ts +2 -0
  78. package/dist/learning-words.js +2 -0
  79. package/dist/learning.d.ts +18 -24
  80. package/dist/learning.js +35 -66
  81. package/dist/mcp-gateway.d.ts +6 -0
  82. package/dist/mcp-gateway.js +44 -8
  83. package/dist/mcp-resources.d.ts +1 -1
  84. package/dist/native/discovery.d.ts +6 -0
  85. package/dist/native/discovery.js +14 -1
  86. package/dist/native/remote.d.ts +5 -0
  87. package/dist/native/remote.js +16 -0
  88. package/dist/native/runtime.js +3 -2
  89. package/dist/observation/observer.d.ts +6 -6
  90. package/dist/openapi.js +89 -29
  91. package/dist/place-offers.d.ts +3 -0
  92. package/dist/place-offers.js +3 -0
  93. package/dist/place.d.ts +33 -11
  94. package/dist/place.js +61 -26
  95. package/dist/purged-workflow.d.ts +0 -33
  96. package/dist/purged-workflow.js +3 -71
  97. package/dist/redact/match.d.ts +19 -4
  98. package/dist/redact/match.js +123 -30
  99. package/dist/run-launch.d.ts +3 -3
  100. package/dist/run-learning-served.d.ts +3 -3
  101. package/dist/run-learning-served.js +1 -1
  102. package/dist/run-listing.d.ts +1 -1
  103. package/dist/run-timeline-served.d.ts +1 -1
  104. package/dist/run-timeline-served.js +6 -5
  105. package/dist/runnable.js +25 -8
  106. package/dist/runner/adapter-run-spec.js +11 -20
  107. package/dist/runner/audit.d.ts +2 -4
  108. package/dist/runner/audit.js +28 -51
  109. package/dist/runner/cli-run-spec.js +8 -14
  110. package/dist/runner/compare-end.d.ts +0 -2
  111. package/dist/runner/compare-end.js +6 -2
  112. package/dist/runner/disk-free.d.ts +15 -4
  113. package/dist/runner/disk-free.js +25 -7
  114. package/dist/runner/feedback-round.d.ts +1 -1
  115. package/dist/runner/feedback-round.js +2 -2
  116. package/dist/runner/harness-loops.js +2 -3
  117. package/dist/runner/held.d.ts +0 -10
  118. package/dist/runner/held.js +0 -25
  119. package/dist/runner/journal-kinds.d.ts +4 -1
  120. package/dist/runner/journal-kinds.js +1 -1
  121. package/dist/runner/learned-first.d.ts +0 -2
  122. package/dist/runner/learned-first.js +3 -3
  123. package/dist/runner/learning-end.d.ts +12 -16
  124. package/dist/runner/learning-end.js +41 -75
  125. package/dist/runner/learning-seed.d.ts +13 -16
  126. package/dist/runner/learning-seed.js +13 -23
  127. package/dist/runner/main.js +1 -1
  128. package/dist/runner/mcp-run.d.ts +4 -0
  129. package/dist/runner/mcp-run.js +2 -0
  130. package/dist/runner/native-loop.js +2 -3
  131. package/dist/runner/promotion.d.ts +19 -28
  132. package/dist/runner/promotion.js +50 -69
  133. package/dist/runner/reflect-hook.d.ts +2 -2
  134. package/dist/runner/reflect-hook.js +4 -1
  135. package/dist/runner/run-child-host.d.ts +1 -9
  136. package/dist/runner/run-child-host.js +11 -67
  137. package/dist/runner/runner.d.ts +1 -1
  138. package/dist/runner/sdk-loop.js +2 -4
  139. package/dist/sdk/check.d.ts +1 -4
  140. package/dist/sdk/check.js +2 -3
  141. package/dist/sdk/runs.d.ts +20 -7
  142. package/dist/sdk/runs.js +105 -68
  143. package/dist/secrets.d.ts +4 -0
  144. package/dist/secrets.js +44 -10
  145. package/dist/server-fs.d.ts +1 -1
  146. package/dist/server-fs.js +1 -1
  147. package/dist/server-keys.d.ts +6 -0
  148. package/dist/server-keys.js +12 -0
  149. package/dist/server.d.ts +15 -15
  150. package/dist/server.js +214 -164
  151. package/dist/source-sync/auxiliary.js +2 -2
  152. package/dist/store/index.d.ts +1 -1
  153. package/dist/store/index.js +1 -1
  154. package/dist/store/postgres/migrations/0032_learning_rows.sql +65 -0
  155. package/dist/store/schema.d.ts +28 -2
  156. package/dist/store/schema.js +81 -5
  157. package/dist/store/sqlite/learning-rows.d.ts +23 -0
  158. package/dist/store/sqlite/learning-rows.js +559 -0
  159. package/dist/store/sqlite/store.d.ts +7 -1
  160. package/dist/store/sqlite/store.js +84 -18
  161. package/dist/store/store.d.ts +219 -6
  162. package/dist/store/store.js +13 -0
  163. package/dist/store-reads/journal.d.ts +33 -3
  164. package/dist/store-reads/journal.js +99 -4
  165. package/dist/store-reads/learning.d.ts +18 -22
  166. package/dist/store-reads/learning.js +35 -26
  167. package/dist/store-reads/loop.js +1 -1
  168. package/dist/store-view.d.ts +24 -2
  169. package/dist/store-view.js +40 -11
  170. package/dist/templates.d.ts +10 -2
  171. package/dist/templates.js +31 -4
  172. package/dist/tool-plane.d.ts +4 -2
  173. package/dist/tool-plane.js +9 -2
  174. package/dist/web-holds.d.ts +2 -0
  175. package/dist/web-holds.js +5 -2
  176. package/dist/web-run.js +2 -1
  177. package/dist/workspace/archil-exec.js +1 -1
  178. package/dist/workspace/archil.d.ts +1 -1
  179. package/dist/workspace/archil.js +1 -1
  180. package/dist/workspace/computer-deps.js +5 -3
  181. package/dist/workspace/computer-providers.d.ts +11 -1
  182. package/dist/workspace/computer-providers.js +29 -2
  183. package/dist/workspace/index.d.ts +1 -2
  184. package/dist/workspace/index.js +1 -2
  185. package/dist/workspace/paths.d.ts +0 -4
  186. package/dist/workspace/paths.js +0 -6
  187. package/dist/workspace/workspace.d.ts +1 -1
  188. package/dist/workspace/workspace.js +1 -1
  189. package/package.json +13 -13
  190. package/templates/TOOLS.md +46 -0
  191. package/dist/console/assets/index-LwNL4L9q.js +0 -619
  192. package/dist/console/assets/styles-DQo8rzY-.css +0 -1
  193. package/dist/workspace/learning-workspace.d.ts +0 -24
  194. /package/dist/learn/{learning.sh → legacy/learning.sh} +0 -0
package/dist/secrets.d.ts CHANGED
@@ -43,6 +43,10 @@ export declare const secret: (name: string, stored?: StoredKeys) => string | und
43
43
  * the object, or a spawn given it (Node builds a child's environment from its enumerable keys), leaves it out. Which
44
44
  * came from a saved key is said too (savedIn), never a value. */
45
45
  export declare const withSecrets: (env: NodeJS.ProcessEnv, which?: "all" | "own", stored?: StoredKeys) => NodeJS.ProcessEnv;
46
+ /** A copy of `env` (one withSecrets made) with every own property as it is: each secret still read by name and never
47
+ * enumerated, savedIn still saying which were saved, and its symbols. A spread keeps none of the secrets, so a copy
48
+ * that is read for a key is made with this (env-copy.test.mjs scans for spreads). */
49
+ export declare const copyEnv: <T extends object>(env: T) => T;
46
50
  /** The secrets of `env` (one withSecrets made) that were saved on the server, not its own, by name. */
47
51
  export declare const savedIn: (env: NodeJS.ProcessEnv) => ReadonlySet<string>;
48
52
  /** The environment a child gets: `env` with every secret name taken out, and every other name shaped like a key
package/dist/secrets.js CHANGED
@@ -182,6 +182,10 @@ export const withSecrets = (env, which = "all", stored) => {
182
182
  Object.defineProperty(out, SAVED, { value: saved, enumerable: false });
183
183
  return out;
184
184
  };
185
+ /** A copy of `env` (one withSecrets made) with every own property as it is: each secret still read by name and never
186
+ * enumerated, savedIn still saying which were saved, and its symbols. A spread keeps none of the secrets, so a copy
187
+ * that is read for a key is made with this (env-copy.test.mjs scans for spreads). */
188
+ export const copyEnv = (env) => Object.create(Object.getPrototypeOf(env), Object.getOwnPropertyDescriptors(env));
185
189
  /** The secrets of `env` (one withSecrets made) that were saved on the server, not its own, by name. */
186
190
  export const savedIn = (env) => env[SAVED] ?? new Set();
187
191
  /** The environment a child gets: `env` with every secret name taken out, and every other name shaped like a key
@@ -398,26 +402,54 @@ const urlSpans = (value) => {
398
402
  };
399
403
  /** The breaks between a header value's `name=value` pairs: `;`, `&`, a comma (or its `%2C`) and spaces; and, for a
400
404
  * second, finer read, also `?`, `#` and `/`, so a pair inside a URL that is itself a pair's value
401
- * (`upstream=https://relay/v1#access_token=<token>`) or a path's segment stands alone; and, for a third, all but `;`,
402
- * so a credential with a raw `;` in it (`api_key=<key;rest>&region=us`) is held whole too. */
405
+ * (`upstream=https://relay/v1#access_token=<token>`) or a path's segment stands alone; and three whole reads, which keep
406
+ * a raw `;` in a value: all but `;` (LIST_BREAK), so a credential with a `;` in a list joined by `%2C`, the usual way to
407
+ * write one (`api_key=<key;rest>%2Cregion=us`), is held as itself, and `&` and spaces alone (WHOLE_BREAK), so one with
408
+ * a comma in it too (`api_key=<key;rest%2Cmore>&region=us`) is held whole, and again at their `%26` and `%20`
409
+ * (ENCODED_BREAK), so that key before an encoded `&` or space is held as written too, not only decoded, and again at
410
+ * `%26` alone (ENCODED_AMP_BREAK), so a key with a `%20` in it before a `%26` is held, as written and decoded; a text
411
+ * with neither (ENCODED_SEEN) splits at both as at WHOLE_BREAK, so those reads are skipped for it. All are held:
412
+ * every redactor matches a held value exactly, so the longer reading of any never covers a line quoting the key alone.
413
+ * WHOLE_BREAK also holds a value with the comma that ends it (sentry's `sentry_key=<key>%2C`); the others hold the value
414
+ * alone. */
403
415
  const PAIR_BREAK = /[;&,\s]+|%2C/i;
404
416
  const PIECE_BREAK = /[;&,\s?#/]+|%2C/i;
405
- const WHOLE_BREAK = /[&,\s]+|%2C/i;
417
+ const LIST_BREAK = /[&,\s]+|%2C/i;
418
+ const WHOLE_BREAK = /[&\s]+/;
419
+ const ENCODED_BREAK = /[&\s]+|%26|%20/i;
420
+ const ENCODED_AMP_BREAK = /[&\s]+|%26/i;
421
+ const ENCODED_SEEN = /%26|%20/i;
422
+ /** What a credential's value whose part before its first `;` is empty (`;<key>`) holds after that `;`, whole and up to
423
+ * its next `;`, as a reader that skips an empty part reads it; nothing for any other value. */
424
+ const afterEmpty = (value) => {
425
+ if (!value.startsWith(";"))
426
+ return [];
427
+ const after = value.replace(/^;+/, "");
428
+ return [after, after.split(";")[0]];
429
+ };
406
430
  /** The value of each `name=value` pair of `text` split at `breaks` whose name says it is a credential (credentialNamed),
407
- * out of any quotes around it, as written and decoded. A name is what follows the last `/`, `?`, `#` or `:` before its
408
- * `=` (a URL's query or fragment, `https://relay/v1?region=us`, names `region`). A value of only `=` (a base64
409
- * credential's padding, read as a pair) is not taken. */
431
+ * out of any quotes around it, raw or written `%22` or `%27`, as written and decoded. A name is what follows the last
432
+ * `/`, `?`, `#` or `:` before its `=` (a URL's query or fragment, `https://relay/v1?region=us`, names `region`). A
433
+ * value whose part before its first `;` is empty, as written or decoded (`token=;<key>` read whole, `token=%3B<key>`),
434
+ * is taken after that `;` too (afterEmpty). A value of only `=`, `;` and quotes, as written or decoded (a base64 credential's padding read as a
435
+ * pair, `token=;` before a space, a lone `'` or its `%27`), is not taken: otlpHeaderCut has no length floor, and it
436
+ * would cut that character everywhere in the tracer's lines. */
410
437
  const pairValues = (text, breaks) => text.split(breaks).flatMap((pair) => {
411
438
  const at = pair.indexOf("=");
412
439
  if (at <= 0)
413
440
  return [];
414
441
  const name = pair.slice(0, at).split(/[/?#:]/).at(-1) ?? "";
415
- const inner = pair.slice(at + 1).replace(/^(["'])(.*)\1$/, "$2");
416
- return /[^=]/.test(inner) && credentialNamed(decoded(name) ?? name) ? [inner, decoded(inner) ?? inner] : [];
442
+ if (!credentialNamed(decoded(name) ?? name))
443
+ return [];
444
+ const inner = pair.slice(at + 1).replace(/^(["']|%22|%27)(.*)\1$/, "$2");
445
+ return [inner, ...afterEmpty(inner)]
446
+ .flatMap((value) => [value, decoded(value) ?? value])
447
+ .concat(afterEmpty(decoded(inner) ?? inner))
448
+ .filter((value) => /[^=;"']/.test(value));
417
449
  });
418
450
  /** The credentials a header value carries inside it, the union of two reads over the whole value as written: the value
419
- * of each `name=value` pair whose name says it is a credential (pairValues, at each of PAIR_BREAK, PIECE_BREAK and
420
- * WHOLE_BREAK: a cookie's `session=<token>`, sentry's
451
+ * of each `name=value` pair whose name says it is a credential (pairValues, at each of PAIR_BREAK, PIECE_BREAK,
452
+ * LIST_BREAK, WHOLE_BREAK, ENCODED_BREAK and ENCODED_AMP_BREAK: a cookie's `session=<token>`, sentry's
421
453
  * `sentry_key=<key>`, a path's `;jsessionid=<id>`, a URL query's or fragment's `session=` or `access_token=`), and the
422
454
  * user, password and key parameters of each URL in it (urlSpans, urlCredentials: a DSN's `https://<key>@host/1`, a
423
455
  * relay's whole `user:pa;ss`). A URL only adds readings: the pair read covers its text too. A value that escapes its
@@ -429,7 +461,9 @@ const innerCredentials = (value) => {
429
461
  return [
430
462
  ...pairValues(text, PAIR_BREAK),
431
463
  ...pairValues(text, PIECE_BREAK),
464
+ ...pairValues(text, LIST_BREAK),
432
465
  ...pairValues(text, WHOLE_BREAK),
466
+ ...(ENCODED_SEEN.test(text) ? [...pairValues(text, ENCODED_BREAK), ...pairValues(text, ENCODED_AMP_BREAK)] : []),
433
467
  ...urlSpans(text).flatMap(({ start, end }) => urlCredentials(text, start, end, queriesRead)),
434
468
  ];
435
469
  };
@@ -15,7 +15,7 @@ export declare const defaultData: (env?: NodeJS.ProcessEnv) => string;
15
15
  /** The server's own data directory, on its reading of the environment (startServe): an npx hint names it (adapters.ts
16
16
  * npxLine). */
17
17
  export declare const DATA_ENV = "AGENTRUN_SERVE_DATA";
18
- /** Agent `agentId`'s folder on the disk, which holds its learning folder (learning.ts) and its runs: `<data>/disk/agents/<agent>`. */
18
+ /** Agent `agentId`'s folder on the disk, which holds its runs: `<data>/disk/agents/<agent>`. */
19
19
  /** The folder of a data directory that holds each agent's disk: its runs and its learning. */
20
20
  export declare const DISK_DIR = "disk";
21
21
  /** Agent `agentId`'s folder on the disk of data directory `data`: `<data>/disk/agents/<name>`. */
package/dist/server-fs.js CHANGED
@@ -31,7 +31,7 @@ export const defaultData = (env = process.env) => join(env.XDG_DATA_HOME || join
31
31
  /** The server's own data directory, on its reading of the environment (startServe): an npx hint names it (adapters.ts
32
32
  * npxLine). */
33
33
  export const DATA_ENV = "AGENTRUN_SERVE_DATA";
34
- /** Agent `agentId`'s folder on the disk, which holds its learning folder (learning.ts) and its runs: `<data>/disk/agents/<agent>`. */
34
+ /** Agent `agentId`'s folder on the disk, which holds its runs: `<data>/disk/agents/<agent>`. */
35
35
  /** The folder of a data directory that holds each agent's disk: its runs and its learning. */
36
36
  export const DISK_DIR = "disk";
37
37
  /** An agent's folder's name on the disk: its id in lower case, then 16 hex digits of the id's SHA-256, so ids that differ
@@ -24,6 +24,12 @@ export declare function openSealed(sealKey: Buffer, name: string, sealed: Uint8A
24
24
  export declare function putSealedKey(store: {
25
25
  sealedKeys: Pick<SealedKeys, "put">;
26
26
  }, sealKey: Buffer, name: string, value: string): Promise<void>;
27
+ /** The value kept under `name`, opened now: the one saved there that opens under `sealKey`, else `value`, saved so that of
28
+ * writers racing on the row one's is kept and every one reads it back. A row that does not open (sealed under another
29
+ * key, or damaged) is replaced only while it holds the bytes read. Undefined only when the row still does not open. */
30
+ export declare function keepSealedKey(store: {
31
+ sealedKeys: Pick<SealedKeys, "get" | "putIfAbsent" | "replaceIf">;
32
+ }, sealKey: Buffer, name: string, value: string): Promise<string | undefined>;
27
33
  /** The value saved under `name`, opened now; undefined with none saved, or one that does not open under this seal key
28
34
  * (sealed under another key, or damaged). Never a value the store could read in the clear. */
29
35
  export declare function getSealedKey(store: {
@@ -32,6 +32,18 @@ export function openSealed(sealKey, name, sealed, fp) {
32
32
  export async function putSealedKey(store, sealKey, name, value) {
33
33
  await store.sealedKeys.put(name, sealColumn(sealKey, sealedAt.sealedKey(name), value));
34
34
  }
35
+ /** The value kept under `name`, opened now: the one saved there that opens under `sealKey`, else `value`, saved so that of
36
+ * writers racing on the row one's is kept and every one reads it back. A row that does not open (sealed under another
37
+ * key, or damaged) is replaced only while it holds the bytes read. Undefined only when the row still does not open. */
38
+ export async function keepSealedKey(store, sealKey, name, value) {
39
+ const was = await store.sealedKeys.get(name);
40
+ const sealed = sealColumn(sealKey, sealedAt.sealedKey(name), value);
41
+ if (was === undefined)
42
+ await store.sealedKeys.putIfAbsent(name, sealed);
43
+ else if (!("value" in openSealed(sealKey, name, was, undefined)))
44
+ await store.sealedKeys.replaceIf(name, was, sealed);
45
+ return getSealedKey(store, sealKey, name);
46
+ }
35
47
  /** The value saved under `name`, opened now; undefined with none saved, or one that does not open under this seal key
36
48
  * (sealed under another key, or damaged). Never a value the store could read in the clear. */
37
49
  export async function getSealedKey(store, sealKey, name) {
package/dist/server.d.ts CHANGED
@@ -257,7 +257,7 @@ export type ServeOptions = {
257
257
  /** A test's seam: the scrubber GET /runs/{id}/export cuts with (run-export.ts), in place of secret-cut.ts scrub. */
258
258
  shareScrub?: CutScrub;
259
259
  /** A test's seam: step 2 of DELETE /agents/{id} (agent-delete.ts) in place of the learning module's deleteLearning over
260
- * the agent's learning folder (learn/delete.ts), the server's own. */
260
+ * the agent's learning (learn/delete.ts), the server's own. */
261
261
  deleteLearning?: DeleteLearning;
262
262
  /** A test's seam: awaited at each step's point of DELETE /agents/{id} and DELETE /runs/{id} (agent-delete.ts
263
263
  * AgentDeleteStep), with the agent's id or the run's, so a throw there stops the delete as a crash would. */
@@ -439,16 +439,18 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
439
439
  run_memory_mib: number;
440
440
  needs?: import("./harness.js").HarnessNeed[];
441
441
  }[];
442
- /** The places a revision may name (`definition.place`), this host's default, and whether this server has each box. */
442
+ /** The places a revision may name (`definition.place`), this host's default (null where a new agent must name one),
443
+ * and whether this server has each box. */
443
444
  places: {
444
445
  boxes: BoxOffer[];
445
446
  allow: string[];
446
447
  default_place: Place;
448
+ default_reason?: undefined;
447
449
  modes: ("runner" | "sandbox")[];
448
450
  } | {
449
451
  boxes: BoxOffer[];
450
452
  allow: string[];
451
- default_place: Place;
453
+ default_place: null;
452
454
  default_reason: string;
453
455
  modes: ("runner" | "sandbox")[];
454
456
  };
@@ -561,7 +563,7 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
561
563
  * `models.default`, `models.strong`) with the tools it names of `node_tools`; a node that names no thinking level
562
564
  * thinks at the run's effort, or medium. */
563
565
  workflows: {
564
- nodes: ("agent" | "report" | "extract" | "decide")[];
566
+ nodes: ("agent" | "decide" | "extract" | "report")[];
565
567
  node_tools: string[];
566
568
  adapters: string[];
567
569
  decisions: {
@@ -656,14 +658,12 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
656
658
  at_rest: string;
657
659
  };
658
660
  /** GET /settings/harness-keys and PUT/DELETE of one key: a plan-billed recipe's keys, saved for that harness alone
659
- * (harness-keys.ts); `harnesses` its ids here, and `kept` each id with keys saved whose recipe it no longer names
660
- * (a running server's, from its store: HarnessKeysOverStore.unnamed), so the console offers the page only where
661
- * there is one or a key to remove. */
661
+ * (harness-keys.ts); `harnesses` its ids here. The page's own GET lists the ids with keys kept whose recipe the
662
+ * server no longer names, so the console offers the page on `routes`, as it does tool keys'. */
662
663
  harness_keys: {
663
664
  routes: boolean;
664
665
  at_rest: string;
665
666
  harnesses: string[];
666
- kept: string[];
667
667
  };
668
668
  /** /settings/mcp-servers: remote MCP servers previewed and saved, each credential sealed under the server's seal key,
669
669
  * which always exists (seal-key.ts), so MCP credentials are always kept sealed. Every harness of the table runs a
@@ -790,16 +790,18 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
790
790
  run_memory_mib: number;
791
791
  needs?: import("./harness.js").HarnessNeed[];
792
792
  }[];
793
- /** The places a revision may name (`definition.place`), this host's default, and whether this server has each box. */
793
+ /** The places a revision may name (`definition.place`), this host's default (null where a new agent must name one),
794
+ * and whether this server has each box. */
794
795
  places: {
795
796
  boxes: BoxOffer[];
796
797
  allow: string[];
797
798
  default_place: Place;
799
+ default_reason?: undefined;
798
800
  modes: ("runner" | "sandbox")[];
799
801
  } | {
800
802
  boxes: BoxOffer[];
801
803
  allow: string[];
802
- default_place: Place;
804
+ default_place: null;
803
805
  default_reason: string;
804
806
  modes: ("runner" | "sandbox")[];
805
807
  };
@@ -912,7 +914,7 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
912
914
  * `models.default`, `models.strong`) with the tools it names of `node_tools`; a node that names no thinking level
913
915
  * thinks at the run's effort, or medium. */
914
916
  workflows: {
915
- nodes: ("agent" | "report" | "extract" | "decide")[];
917
+ nodes: ("agent" | "decide" | "extract" | "report")[];
916
918
  node_tools: string[];
917
919
  adapters: string[];
918
920
  decisions: {
@@ -1007,14 +1009,12 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
1007
1009
  at_rest: string;
1008
1010
  };
1009
1011
  /** GET /settings/harness-keys and PUT/DELETE of one key: a plan-billed recipe's keys, saved for that harness alone
1010
- * (harness-keys.ts); `harnesses` its ids here, and `kept` each id with keys saved whose recipe it no longer names
1011
- * (a running server's, from its store: HarnessKeysOverStore.unnamed), so the console offers the page only where
1012
- * there is one or a key to remove. */
1012
+ * (harness-keys.ts); `harnesses` its ids here. The page's own GET lists the ids with keys kept whose recipe the
1013
+ * server no longer names, so the console offers the page on `routes`, as it does tool keys'. */
1013
1014
  harness_keys: {
1014
1015
  routes: boolean;
1015
1016
  at_rest: string;
1016
1017
  harnesses: string[];
1017
- kept: string[];
1018
1018
  };
1019
1019
  /** /settings/mcp-servers: remote MCP servers previewed and saved, each credential sealed under the server's seal key,
1020
1020
  * which always exists (seal-key.ts), so MCP credentials are always kept sealed. Every harness of the table runs a