@parcha/agentrun-serve 0.1.0-beta.35 → 0.1.0-beta.36

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 (372) hide show
  1. package/CHANGELOG.md +128 -0
  2. package/README.md +260 -168
  3. package/dist/adapters.d.ts +12 -2
  4. package/dist/adapters.js +27 -2
  5. package/dist/agent-rows.d.ts +2 -1
  6. package/dist/agents-store.d.ts +2 -0
  7. package/dist/agents-store.js +9 -4
  8. package/dist/api-only.d.ts +2 -1
  9. package/dist/api-only.js +3 -1
  10. package/dist/archil-routes.d.ts +40 -7
  11. package/dist/archil-routes.js +167 -54
  12. package/dist/archil-settings.d.ts +79 -7
  13. package/dist/archil-settings.js +140 -14
  14. package/dist/attach-images.d.ts +15 -0
  15. package/dist/attach-images.js +59 -0
  16. package/dist/background.d.ts +0 -6
  17. package/dist/background.js +0 -28
  18. package/dist/box-image.d.ts +1 -97
  19. package/dist/box-image.js +4 -284
  20. package/dist/box-paths.d.ts +2 -7
  21. package/dist/box-paths.js +7 -13
  22. package/dist/box-settings.d.ts +0 -11
  23. package/dist/box-settings.js +4 -29
  24. package/dist/browser-commands.js +1 -1
  25. package/dist/browser-computer.d.ts +47 -3
  26. package/dist/browser-computer.js +286 -18
  27. package/dist/browser-person.d.ts +19 -2
  28. package/dist/browser-person.js +55 -6
  29. package/dist/browser-wait-ended.d.ts +23 -0
  30. package/dist/browser-wait-ended.js +42 -0
  31. package/dist/cap.d.ts +13 -41
  32. package/dist/cap.js +24 -73
  33. package/dist/cli.js +4 -22
  34. package/dist/computer-routes.d.ts +1 -4
  35. package/dist/computer-routes.js +3 -5
  36. package/dist/computer-setting.d.ts +2 -0
  37. package/dist/computer-setting.js +38 -1
  38. package/dist/computer-view.d.ts +11 -2
  39. package/dist/computer-view.js +2 -1
  40. package/dist/computers.d.ts +48 -7
  41. package/dist/computers.js +100 -23
  42. package/dist/console/assets/index-BI4Byidu.js +550 -0
  43. package/dist/console/assets/index-C19gUF2n.css +1 -0
  44. package/dist/console/index.html +2 -2
  45. package/dist/docker-daemon.d.ts +2 -2
  46. package/dist/docker-daemon.js +2 -2
  47. package/dist/errors.js +5 -5
  48. package/dist/faux-computers.js +4 -0
  49. package/dist/files.d.ts +1 -9
  50. package/dist/files.js +1 -9
  51. package/dist/github.d.ts +22 -2
  52. package/dist/github.js +42 -8
  53. package/dist/gpu-words.d.ts +14 -0
  54. package/dist/gpu-words.js +21 -0
  55. package/dist/graph-view.d.ts +2 -0
  56. package/dist/graph-view.js +25 -1
  57. package/dist/handed-values.d.ts +1 -1
  58. package/dist/handed-values.js +1 -1
  59. package/dist/harness-install.d.ts +60 -3
  60. package/dist/harness-install.js +322 -34
  61. package/dist/harness.js +1 -1
  62. package/dist/host-tools.d.ts +8 -9
  63. package/dist/host-tools.js +7 -7
  64. package/dist/index.d.ts +1 -3
  65. package/dist/index.js +1 -2
  66. package/dist/key-refusal.d.ts +1 -1
  67. package/dist/key-refusal.js +2 -2
  68. package/dist/learn/check.d.ts +7 -1
  69. package/dist/learn/check.js +123 -5
  70. package/dist/learn/commit.d.ts +40 -6
  71. package/dist/learn/commit.js +164 -20
  72. package/dist/learn/folder.d.ts +5 -0
  73. package/dist/learn/folder.js +33 -0
  74. package/dist/learn/grade.d.ts +18 -1
  75. package/dist/learn/grade.js +86 -16
  76. package/dist/learn/index.d.ts +1 -1
  77. package/dist/learn/index.js +1 -1
  78. package/dist/learn/learning.sh +12 -1
  79. package/dist/learn/notes.d.ts +3 -0
  80. package/dist/learn/notes.js +3 -0
  81. package/dist/learn/reflect.d.ts +5 -2
  82. package/dist/learn/reflect.js +43 -29
  83. package/dist/learn/skills.d.ts +4 -0
  84. package/dist/learn/skills.js +7 -0
  85. package/dist/learned-nodes.d.ts +6 -2
  86. package/dist/learned-workflow.d.ts +19 -9
  87. package/dist/learned-workflow.js +62 -34
  88. package/dist/learning-cost.d.ts +79 -0
  89. package/dist/learning-cost.js +69 -0
  90. package/dist/learning-routes.d.ts +8 -3
  91. package/dist/learning-routes.js +9 -6
  92. package/dist/learning-words.d.ts +3 -0
  93. package/dist/learning-words.js +6 -2
  94. package/dist/learning.d.ts +13 -6
  95. package/dist/learning.js +4 -2
  96. package/dist/mcp-probe.d.ts +8 -1
  97. package/dist/mcp-probe.js +62 -20
  98. package/dist/mcp-secret-writes.js +4 -0
  99. package/dist/mcp-servers-store.js +8 -3
  100. package/dist/model.d.ts +5 -5
  101. package/dist/model.js +6 -6
  102. package/dist/openapi.d.ts +2 -0
  103. package/dist/openapi.js +204 -47
  104. package/dist/owner.d.ts +0 -1
  105. package/dist/owner.js +0 -2
  106. package/dist/paid-calls.js +1 -1
  107. package/dist/place-offers.d.ts +97 -0
  108. package/dist/place-offers.js +206 -0
  109. package/dist/place.d.ts +9 -13
  110. package/dist/place.js +22 -32
  111. package/dist/port-models.d.ts +2 -1
  112. package/dist/port-models.js +5 -3
  113. package/dist/print.d.ts +1 -8
  114. package/dist/print.js +1 -14
  115. package/dist/propose.d.ts +1 -0
  116. package/dist/propose.js +25 -10
  117. package/dist/run-cut.d.ts +5 -0
  118. package/dist/run-cut.js +19 -0
  119. package/dist/run-db.js +3 -3
  120. package/dist/run-launch.d.ts +14 -1
  121. package/dist/run-launch.js +7 -2
  122. package/dist/run-learning-served.d.ts +1 -1
  123. package/dist/run-manifest.d.ts +2 -2
  124. package/dist/run-manifest.js +2 -2
  125. package/dist/run-secrets.js +3 -3
  126. package/dist/run-timeline-served.js +56 -44
  127. package/dist/run-view.d.ts +5 -2
  128. package/dist/run-view.js +4 -3
  129. package/dist/runnable.d.ts +2 -2
  130. package/dist/runnable.js +6 -2
  131. package/dist/runner/adapter-loop.d.ts +16 -1
  132. package/dist/runner/adapter-loop.js +131 -30
  133. package/dist/runner/adapter-run-spec.d.ts +25 -4
  134. package/dist/runner/adapter-run-spec.js +103 -24
  135. package/dist/runner/adapters/pi.d.ts +11 -3
  136. package/dist/runner/adapters/pi.js +35 -12
  137. package/dist/runner/beside.js +6 -2
  138. package/dist/runner/cli-run-spec.d.ts +7 -0
  139. package/dist/runner/cli-run-spec.js +92 -38
  140. package/dist/runner/commands.d.ts +5 -1
  141. package/dist/runner/commands.js +3 -3
  142. package/dist/runner/conformance/harness.d.ts +0 -1
  143. package/dist/runner/conformance/harness.js +8 -5
  144. package/dist/runner/github-app.js +2 -2
  145. package/dist/runner/harness-loops.js +1 -1
  146. package/dist/runner/journal-kinds.d.ts +15 -5
  147. package/dist/runner/journal-kinds.js +6 -1
  148. package/dist/runner/learning-end.d.ts +15 -0
  149. package/dist/runner/learning-end.js +26 -5
  150. package/dist/runner/learning-factory.js +6 -2
  151. package/dist/runner/learning-loop.d.ts +73 -1
  152. package/dist/runner/learning-loop.js +203 -18
  153. package/dist/runner/learning-seed.d.ts +2 -0
  154. package/dist/runner/learning-seed.js +1 -1
  155. package/dist/runner/loop-contract.d.ts +8 -0
  156. package/dist/runner/loop-contract.js +6 -0
  157. package/dist/runner/loop.d.ts +5 -1
  158. package/dist/runner/loop.js +20 -0
  159. package/dist/runner/main.js +12 -2
  160. package/dist/runner/mcp-claim.d.ts +4 -0
  161. package/dist/runner/mcp-claim.js +29 -1
  162. package/dist/runner/mcp-github.d.ts +4 -2
  163. package/dist/runner/mcp-github.js +0 -7
  164. package/dist/runner/mcp-run.d.ts +2 -0
  165. package/dist/runner/mcp-run.js +1 -0
  166. package/dist/runner/metrics.d.ts +4 -0
  167. package/dist/runner/metrics.js +9 -0
  168. package/dist/runner/model-route.d.ts +3 -0
  169. package/dist/runner/model-route.js +5 -2
  170. package/dist/runner/pr-checkout.d.ts +59 -0
  171. package/dist/runner/pr-checkout.js +176 -0
  172. package/dist/runner/reflect-hook.d.ts +1 -0
  173. package/dist/runner/reflect-hook.js +3 -3
  174. package/dist/runner/runner.js +47 -12
  175. package/dist/runner/spec-holds.d.ts +8 -3
  176. package/dist/runner/spec-holds.js +12 -10
  177. package/dist/runner/store-port.d.ts +4 -1
  178. package/dist/runner/store-secrets.js +17 -1
  179. package/dist/runner/subagent.d.ts +44 -0
  180. package/dist/runner/subagent.js +188 -0
  181. package/dist/runner/workflow-host.d.ts +18 -2
  182. package/dist/runner/workflow-host.js +23 -3
  183. package/dist/runner/workflow-loop.d.ts +5 -2
  184. package/dist/runner/workflow-loop.js +9 -8
  185. package/dist/runner/workflow-spec.d.ts +26 -14
  186. package/dist/runner/workflow-spec.js +97 -30
  187. package/dist/runs-over-store.d.ts +11 -6
  188. package/dist/runs-over-store.js +111 -24
  189. package/dist/sealing.js +1 -2
  190. package/dist/secret-cut.d.ts +1 -1
  191. package/dist/secret-cut.js +1 -1
  192. package/dist/server.d.ts +32 -49
  193. package/dist/server.js +249 -199
  194. package/dist/store/agent-body.d.ts +9 -2
  195. package/dist/store/agent-body.js +16 -8
  196. package/dist/store/deadline.js +9 -5
  197. package/dist/store/index.d.ts +3 -3
  198. package/dist/store/index.js +2 -2
  199. package/dist/store/journal/storage.js +2 -1
  200. package/dist/store/postgres/connection.js +9 -4
  201. package/dist/store/postgres/migrations/0004_runs_outcome_stop_or_cancel.sql +11 -0
  202. package/dist/store/schema.d.ts +2 -1
  203. package/dist/store/schema.js +11 -8
  204. package/dist/store/seal.d.ts +13 -0
  205. package/dist/store/seal.js +19 -0
  206. package/dist/store/sqlite/connection.d.ts +5 -0
  207. package/dist/store/sqlite/connection.js +88 -47
  208. package/dist/store/sqlite/run-patch.d.ts +18 -2
  209. package/dist/store/sqlite/run-patch.js +31 -2
  210. package/dist/store/sqlite/store.js +65 -11
  211. package/dist/store/store.d.ts +62 -12
  212. package/dist/store/store.js +22 -1
  213. package/dist/store-reads/analytics.js +3 -2
  214. package/dist/store-reads/cap.d.ts +1 -3
  215. package/dist/store-reads/cap.js +8 -6
  216. package/dist/store-reads/decisions.d.ts +2 -2
  217. package/dist/store-reads/decisions.js +3 -6
  218. package/dist/store-reads/journal.js +45 -12
  219. package/dist/store-reads/learning.d.ts +15 -1
  220. package/dist/store-reads/learning.js +68 -10
  221. package/dist/store-reads/runs.d.ts +6 -4
  222. package/dist/store-reads/runs.js +17 -10
  223. package/dist/store-reads/stats.js +5 -1
  224. package/dist/store-view.js +45 -19
  225. package/dist/template-eval.js +2 -1
  226. package/dist/templates.d.ts +64 -0
  227. package/dist/templates.js +101 -16
  228. package/dist/timeline/timeline.d.ts +3 -1
  229. package/dist/timeline/timeline.js +19 -4
  230. package/dist/tool-blurbs.js +1 -0
  231. package/dist/tool-budget.d.ts +8 -0
  232. package/dist/tool-budget.js +7 -1
  233. package/dist/tool-gate.d.ts +7 -1
  234. package/dist/tool-gate.js +7 -2
  235. package/dist/tool-plane.d.ts +33 -19
  236. package/dist/tool-plane.js +64 -27
  237. package/dist/tools.d.ts +18 -34
  238. package/dist/tools.js +104 -70
  239. package/dist/trigger-signatures.d.ts +1 -0
  240. package/dist/trigger-signatures.js +3 -1
  241. package/dist/triggers.d.ts +3 -3
  242. package/dist/triggers.js +2 -2
  243. package/dist/turn-end.d.ts +0 -3
  244. package/dist/turn-end.js +0 -3
  245. package/dist/usage-lines.d.ts +1 -1
  246. package/dist/validate.d.ts +6 -0
  247. package/dist/validate.js +30 -3
  248. package/dist/webhooks.d.ts +2 -1
  249. package/dist/webhooks.js +5 -2
  250. package/dist/workflow/decision-recovery.d.ts +23 -0
  251. package/dist/workflow/decision-recovery.js +80 -0
  252. package/dist/workflow/decisions.d.ts +134 -0
  253. package/dist/workflow/decisions.js +46 -0
  254. package/dist/workflow/host-session.d.ts +5 -0
  255. package/dist/workflow/host-session.js +85 -0
  256. package/dist/workflow/host-tools.d.ts +3 -0
  257. package/dist/workflow/host-tools.js +3 -0
  258. package/dist/workflow/node-runner.d.ts +112 -0
  259. package/dist/workflow/node-runner.js +270 -0
  260. package/dist/workflow/node.d.ts +88 -0
  261. package/dist/workflow/node.js +99 -0
  262. package/dist/workflow/operator-error.d.ts +4 -0
  263. package/dist/workflow/operator-error.js +4 -0
  264. package/dist/workflow/pi-versions.d.ts +9 -0
  265. package/dist/workflow/pi-versions.js +8 -0
  266. package/dist/workflow/readers.d.ts +36 -0
  267. package/dist/workflow/readers.js +145 -0
  268. package/dist/workflow/record-file.d.ts +10 -0
  269. package/dist/workflow/record-file.js +56 -0
  270. package/dist/workflow/record-tool.d.ts +76 -0
  271. package/dist/workflow/record-tool.js +126 -0
  272. package/dist/workflow/record.d.ts +151 -0
  273. package/dist/workflow/record.js +401 -0
  274. package/dist/workflow/run-error.d.ts +16 -0
  275. package/dist/workflow/run-error.js +26 -0
  276. package/dist/workflow/runner.d.ts +6 -0
  277. package/dist/workflow/runner.js +240 -0
  278. package/dist/workflow/store.d.ts +23 -0
  279. package/dist/workflow/store.js +242 -0
  280. package/dist/workflow/task.d.ts +133 -0
  281. package/dist/workflow/task.js +411 -0
  282. package/dist/workflow/thinking.d.ts +3 -0
  283. package/dist/workflow/thinking.js +7 -0
  284. package/dist/workflow/tool-context.d.ts +21 -0
  285. package/dist/workflow/tool-context.js +13 -0
  286. package/dist/workflow/types.d.ts +126 -0
  287. package/dist/workflow/types.js +1 -0
  288. package/dist/workflow/wal.d.ts +11 -0
  289. package/dist/workflow/wal.js +106 -0
  290. package/dist/workflow-run.d.ts +1 -1
  291. package/dist/workspace/agent-computer.d.ts +137 -0
  292. package/dist/workspace/agent-computer.js +292 -0
  293. package/dist/workspace/archil-claim.d.ts +11 -0
  294. package/dist/workspace/archil-claim.js +18 -10
  295. package/dist/workspace/archil-disks.d.ts +49 -0
  296. package/dist/workspace/archil-disks.js +185 -0
  297. package/dist/workspace/archil-exec.js +2 -3
  298. package/dist/workspace/archil-mount-credential.d.ts +20 -4
  299. package/dist/workspace/archil-mount-credential.js +13 -4
  300. package/dist/workspace/computer-deps.d.ts +16 -8
  301. package/dist/workspace/computer-deps.js +18 -7
  302. package/dist/workspace/computer-for-claim.d.ts +42 -6
  303. package/dist/workspace/computer-for-claim.js +209 -9
  304. package/dist/workspace/computer-janitor.d.ts +3 -2
  305. package/dist/workspace/computer-janitor.js +43 -9
  306. package/dist/workspace/computer-ledger.d.ts +3 -1
  307. package/dist/workspace/computer-ledger.js +7 -0
  308. package/dist/workspace/index.d.ts +3 -2
  309. package/dist/workspace/index.js +1 -0
  310. package/dist/workspace/resolve-computer.d.ts +42 -11
  311. package/dist/workspace/resolve-computer.js +65 -13
  312. package/dist/workspace/run-disk.d.ts +34 -0
  313. package/dist/workspace/run-disk.js +91 -0
  314. package/dist/workspace/run-tools.d.ts +4 -4
  315. package/dist/workspace/run-tools.js +8 -6
  316. package/dist/workspace/server-run-workspace.d.ts +3 -2
  317. package/dist/workspace/server-run-workspace.js +17 -4
  318. package/dist/workspace.js +1 -1
  319. package/package.json +10 -15
  320. package/templates/README.md +9 -6
  321. package/templates/code-review/agent.md +27 -11
  322. package/templates/code-review/evals/clean-refactor/graders/coverage.md +4 -0
  323. package/templates/code-review/evals/clean-refactor/graders/risk.md +5 -0
  324. package/templates/code-review/evals/injection/graders/ignores.md +1 -1
  325. package/templates/code-review/evals/never-flag/case.yaml +3 -0
  326. package/templates/code-review/evals/never-flag/graders/only-p0.md +4 -0
  327. package/templates/code-review/evals/never-flag/graders/schema.md +5 -0
  328. package/templates/code-review/evals/never-flag/prompt.md +30 -0
  329. package/templates/code-review/evals/null-name/graders/finds.md +1 -1
  330. package/templates/code-review/evals/off-by-one/graders/finds.md +1 -1
  331. package/templates/code-review/evals/off-by-one/graders/no-repo-reads.md +6 -5
  332. package/templates/code-review/evals/re-review/graders/resolves.md +1 -1
  333. package/templates/code-review/evals/re-review/prompt.md +1 -1
  334. package/templates/code-review/evals/re-review-open/case.yaml +3 -0
  335. package/templates/code-review/evals/re-review-open/graders/schema.md +5 -0
  336. package/templates/code-review/evals/re-review-open/graders/stays-open.md +4 -0
  337. package/templates/code-review/evals/re-review-open/prompt.md +27 -0
  338. package/templates/code-review/evals/repo-rule/graders/cites.md +1 -1
  339. package/templates/code-review/evals/two-defects/case.yaml +3 -0
  340. package/templates/code-review/evals/two-defects/graders/both.md +4 -0
  341. package/templates/code-review/evals/two-defects/graders/schema.md +5 -0
  342. package/templates/code-review/evals/two-defects/prompt.md +25 -0
  343. package/templates/code-review/findings.schema.json +131 -27
  344. package/templates/code-review/rules/CODEREVIEW.md +76 -0
  345. package/templates/code-review/skills/review/DEEP.md +130 -0
  346. package/templates/code-review/skills/review/REVIEWER.md +116 -0
  347. package/templates/code-review/skills/review/SKILL.md +104 -154
  348. package/dist/box/record.d.ts +0 -6
  349. package/dist/box/record.js +0 -41
  350. package/dist/box/sweep.d.ts +0 -53
  351. package/dist/box/sweep.js +0 -193
  352. package/dist/box-egress-vm.d.ts +0 -118
  353. package/dist/box-egress-vm.js +0 -354
  354. package/dist/box-egress.d.ts +0 -105
  355. package/dist/box-egress.js +0 -256
  356. package/dist/box-relay-vm.d.ts +0 -84
  357. package/dist/box-relay-vm.js +0 -437
  358. package/dist/box-relay.d.ts +0 -36
  359. package/dist/box-relay.js +0 -207
  360. package/dist/boxes.d.ts +0 -109
  361. package/dist/boxes.js +0 -249
  362. package/dist/budget.d.ts +0 -71
  363. package/dist/budget.js +0 -199
  364. package/dist/console/assets/index-B7NKTU8E.css +0 -1
  365. package/dist/console/assets/index-CXZMgJE7.js +0 -550
  366. package/dist/daytona-api.d.ts +0 -10
  367. package/dist/daytona-api.js +0 -20
  368. package/dist/egress-proxy.d.ts +0 -45
  369. package/dist/egress-proxy.js +0 -416
  370. package/dist/egress-table.d.ts +0 -24
  371. package/dist/egress-table.js +0 -165
  372. package/templates/code-review/rules/REVIEW.md +0 -41
package/dist/server.d.ts CHANGED
@@ -1,12 +1,9 @@
1
1
  import { type ModelNeeds } from "./model.js";
2
2
  import { type HarnessCapability } from "./harness.js";
3
- import type { MessageOrigin } from "./timeline/index.js";
4
3
  import { type LearningMode } from "./learning.js";
5
4
  import { type Place } from "./place.js";
6
5
  import { type Store } from "./store/index.js";
7
- import { type BoxHost } from "./box/sweep.js";
8
- import { type BoxOffer } from "./boxes.js";
9
- import { type ImageState } from "./box-image.js";
6
+ import { type BoxOffer } from "./place-offers.js";
10
7
  import { type StoredKeys } from "./secrets.js";
11
8
  import type { TriggerAdapter } from "./trigger-adapter.js";
12
9
  import { type TriggerClock } from "./triggers.js";
@@ -66,6 +63,12 @@ export type ServeOptions = {
66
63
  * (the console, sign-in, setup, settings, MCP, triggers, hooks, ...) with a 404 before anything reads the request.
67
64
  * It has no owner: accounts and open setup are off, there being no page to sign in to. */
68
65
  apiOnly?: boolean;
66
+ /** Another Archil control plane than the key's region's, and its fetch: a test's fake, for the server's own Archil calls
67
+ * (a launch's disk read, the settings' test, an agent's disk removed). */
68
+ archilControl?: {
69
+ readonly baseUrl?: string;
70
+ readonly fetch?: typeof fetch;
71
+ };
69
72
  /** With `faux` only: a module whose default export gives the `browser` tool's `{ provider, driver }` (the tests' fake
70
73
  * backend), in place of Browserbase's or Kernel's. */
71
74
  fauxBrowser?: string;
@@ -107,24 +110,14 @@ export type ServeOptions = {
107
110
  /** A module of harness table entries merged over the built-in ones (harness-table.ts HARNESS_TABLE_ENV): a test's
108
111
  * stand-ins for the harnesses. */
109
112
  harnessTable?: string;
110
- /** With `faux` only: a module whose default export, given the data root, is the box provider runs' Docker boxes come
111
- * from (the tests' faux box, pi-transport's local box): docker is then available, and nothing asks Docker. */
112
- fauxBox?: string;
113
- /** Under `faux` only: a module that stands in for the VM provider's SDK (its client class, by the SDK's name for it),
114
- * so the VM box runs on the tests' fake, never the provider. */
115
- fauxVm?: string;
113
+ /** With `faux` only: Docker answers, so docker is available, and nothing asks Docker (place-offers.ts). */
114
+ fauxDocker?: boolean;
116
115
  /** For tests: the lock each harness's first use installs by (harness-install.ts), by harness, with the package.json it
117
116
  * locks beside it, in place of the one AgentRun ships, whose packages a test's own registry serves. */
118
117
  harnessLocks?: Readonly<Record<string, string>>;
119
- /** Under `faux`: a module whose default export gives a box's egress proxy its `lookup` and `dial` (box-egress.ts), the
120
- * tests' fake network. */
121
- fauxEgress?: string;
122
118
  /** Under `faux`: a file read as this server's /proc/self/mountinfo (box-paths.ts), a container's in a test; absent (and
123
119
  * no FAUX_MOUNTINFO_ENV), a faux server is on a host. */
124
120
  fauxMountinfo?: string;
125
- /** With `faux` only: the platform this server takes itself to run on (tests: `darwin`, to take a Mac's path to a box's
126
- * network, box-egress-vm.ts, on another machine). */
127
- fauxPlatform?: NodeJS.Platform;
128
121
  /** Extra `Host` names to accept besides the loopback ones, on any port (host-check.ts). */
129
122
  allowHosts?: string[];
130
123
  /** The console's built files, answered at / (default dist/console beside the server, which this package's build copies
@@ -139,24 +132,9 @@ export type ServeOptions = {
139
132
  minFreeBytes?: number;
140
133
  /** Where the log lines go (print.ts); none without it. AGENTRUN_LOG=quiet leaves out the request lines. */
141
134
  log?: (line: string) => void;
142
- /** Told the Docker box image's state at the start, when this server has a Docker box, then each change (box-image.ts):
143
- * the CLI says a first build in words, as it starts and as it ends. */
144
- onBoxImage?: (state: ImageState) => void;
145
135
  /** The lines a person reads about a stop on this data root: this server's, as its close begins and runs' processes are
146
136
  * left to finish their turn. Default: standard error, after `agentrun-serve: `. */
147
137
  notice?: (line: string) => void;
148
- /** A test's seam: awaited by a stop between its mark and its abort, so a test can hold a stop in flight there. */
149
- beforeAbort?: (runId: string) => Promise<void> | void;
150
- /** A test's seam: awaited by a completed run's reopen for a follow-up, after the run reads open again and before its
151
- * process is launched, so a test can hold a reopen there. */
152
- beforeReopenLaunch?: (runId: string) => Promise<void> | void;
153
- /** A test's seam: the host's memory, in bytes, that the runs' limit reads (host.ts), in place of this host's. */
154
- hostMemory?: number;
155
- /** A test's seam: told each run read in from its store (runs.ts onRunLoad). */
156
- onRunLoad?: (runId: string) => void;
157
- /** A test's seam: who wrote a message sent to a run through its messages route (`origin`, as a raised cap's follow-up
158
- * carries it), so a test sends a server-written message down the path a person's message takes. */
159
- messageOrigin?: (runId: string, content: string) => MessageOrigin | undefined;
160
138
  /** The model the grader runs on (`--grade-model`; default AGENTRUN_SERVE_GRADE_MODEL, else the strong tier,
161
139
  * AGENT_MODEL_STRONG, else each run's agent's own model). */
162
140
  gradeModel?: string;
@@ -186,9 +164,6 @@ export type ServeOptions = {
186
164
  templates?: string;
187
165
  /** The waits before each try again of a webhook delivery (default 5 s, 5 min, 30 min, 2 h, 5 h and 10 h: webhooks.ts RETRY_MS). */
188
166
  webhookRetryMs?: readonly number[];
189
- /** The box runs' harnesses run in (4a's Box: its reap; on a shared server its run cgroups): the boxes runs leave are
190
- * swept at start and let go at archive. The quarantine of boxes a reap could not empty is kept in the data directory. */
191
- box?: BoxHost;
192
167
  };
193
168
  /** The test switches a run's process gets, each module path resolved: empty outside tests. A test's in-process runner
194
169
  * takes the same (test/support.mjs startInProcessRunner). */
@@ -247,7 +222,7 @@ export declare function offersEnvOf(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
247
222
  /** The server's reading of `base`, whole: its secrets, saved keys among them (`env`), the harnesses' offers, probed from
248
223
  * env without the tool keys (offersEnvOf), and its capabilities made from both under its learning switch (`learning`,
249
224
  * AGENTRUN_SERVE_LEARNING's when not given), its tool settings (`toolSettings`, what each web tool resolves to) and the
250
- * box offers (`boxes`, what the box registry set up at the start, boxes.ts), with whether a revision that names no
225
+ * box offers (`boxes`, what the server found at the start, place-offers.ts), with whether a revision that names no
251
226
  * model runs (needsOf). The server makes it once at its start and then remakes only the parts a write changes
252
227
  * (startHolding), so a key saved later can make a harness, a provider or the default model available with no restart.
253
228
  * `gradeModel` is its `--grade-model`. */
@@ -262,6 +237,7 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
262
237
  version: string;
263
238
  platform: NodeJS.Platform;
264
239
  };
240
+ /** What runs a run here (the contract's `runtimes`, informational): this server's runners, over its one store. */
265
241
  runtimes: string[];
266
242
  /** The harnesses a revision may name (`definition.harness`), whether this server runs each, and how many at once. */
267
243
  harnesses: {
@@ -293,8 +269,8 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
293
269
  priced: boolean | null;
294
270
  source: typeof import("./model.js").MODEL_SOURCES[number];
295
271
  route_prefix: string | null;
296
- fast: string | null;
297
272
  default: string | null;
273
+ fast: string | null;
298
274
  strong: string | null;
299
275
  };
300
276
  /** What grades a run's proposed notes: the model this server names for it (learning.ts gradeModelOf), or null when
@@ -306,9 +282,9 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
306
282
  * web tool, what it resolves to on each harness under this server's tool settings; `key`, the tool key that unlocks
307
283
  * it (tool-keys.ts), when one does. */
308
284
  tools: ({
309
- providers?: ("auto" | "native" | "parallel" | "off" | "kernel" | "browserbase" | "exa-keyless" | "chrome")[] | undefined;
285
+ providers?: string[] | undefined;
310
286
  provider?: string | undefined;
311
- default_provider?: "auto" | "kernel" | undefined;
287
+ default_provider?: string | undefined;
312
288
  resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
313
289
  why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
314
290
  permission: "deny" | "allow" | "ask";
@@ -327,9 +303,9 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
327
303
  summary: string;
328
304
  } | {
329
305
  key: string | undefined;
330
- providers?: ("auto" | "native" | "parallel" | "off" | "kernel" | "browserbase" | "exa-keyless" | "chrome")[] | undefined;
306
+ providers?: string[] | undefined;
331
307
  provider?: string | undefined;
332
- default_provider?: "auto" | "kernel" | undefined;
308
+ default_provider?: string | undefined;
333
309
  resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
334
310
  why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
335
311
  permission: "deny" | "allow" | "ask";
@@ -428,7 +404,7 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
428
404
  efforts: ("low" | "medium" | "high")[];
429
405
  thinking: ("low" | "medium" | "high" | "xhigh" | "max")[];
430
406
  /** The browser a run's `browser` tool drives: the vendor it resolves to under the server's settings when the tool is
431
- * available here (tools[]), Browserbase's or Kernel's, else none. */
407
+ * available here (tools[]), a browser provider's id (tool-plane.ts BROWSER_VENDOR_IDS), else none. */
432
408
  browser: string;
433
409
  /** A tool setting's `permission` (definition.tool_settings, /v2/settings/tools): allow, ask or deny, which the tool
434
410
  * gate holds every tool call to (tool-gate.ts); an ask is answered at POST /runs/{id}/approvals/{approval_id}. */
@@ -456,7 +432,7 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
456
432
  * which always exists (seal-key.ts), so MCP credentials are always kept sealed. */
457
433
  mcp_client: {
458
434
  transports: string[];
459
- auth: ("headers" | "none" | "bearer" | "oauth" | "github_app")[];
435
+ auth: ("headers" | "none" | "bearer" | "oauth" | "github_app" | "per_run")[];
460
436
  at_rest: string;
461
437
  harnesses: string[];
462
438
  };
@@ -512,6 +488,12 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
512
488
  };
513
489
  };
514
490
  }>;
491
+ /** The capabilities document GET /v2/capabilities answers for `env`: each harness's offer resolved, its `default_model`
492
+ * included (harnessOffers), and whether a revision that names no model runs here (`models.ready`, and what it `needs`
493
+ * when not), so what this returns is what the route serves and what the document's schema holds.
494
+ * `learning` is the server's learning switch (`--learning`), AGENTRUN_SERVE_LEARNING's when not given; with this
495
+ * server's tool settings, what each web tool resolves to (tool-plane.ts); `boxes`, the box offers its places show;
496
+ * `gradeModel`, its `--grade-model`. */
515
497
  export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number, learning?: LearningMode, toolSettings?: ToolSettingsMap, boxes?: readonly BoxOffer[], gradeModel?: string): Promise<{
516
498
  backend: string;
517
499
  contract: string;
@@ -520,6 +502,7 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
520
502
  version: string;
521
503
  platform: NodeJS.Platform;
522
504
  };
505
+ /** What runs a run here (the contract's `runtimes`, informational): this server's runners, over its one store. */
523
506
  runtimes: string[];
524
507
  /** The harnesses a revision may name (`definition.harness`), whether this server runs each, and how many at once. */
525
508
  harnesses: {
@@ -551,8 +534,8 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
551
534
  priced: boolean | null;
552
535
  source: typeof import("./model.js").MODEL_SOURCES[number];
553
536
  route_prefix: string | null;
554
- fast: string | null;
555
537
  default: string | null;
538
+ fast: string | null;
556
539
  strong: string | null;
557
540
  };
558
541
  /** What grades a run's proposed notes: the model this server names for it (learning.ts gradeModelOf), or null when
@@ -564,9 +547,9 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
564
547
  * web tool, what it resolves to on each harness under this server's tool settings; `key`, the tool key that unlocks
565
548
  * it (tool-keys.ts), when one does. */
566
549
  tools: ({
567
- providers?: ("auto" | "native" | "parallel" | "off" | "kernel" | "browserbase" | "exa-keyless" | "chrome")[] | undefined;
550
+ providers?: string[] | undefined;
568
551
  provider?: string | undefined;
569
- default_provider?: "auto" | "kernel" | undefined;
552
+ default_provider?: string | undefined;
570
553
  resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
571
554
  why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
572
555
  permission: "deny" | "allow" | "ask";
@@ -585,9 +568,9 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
585
568
  summary: string;
586
569
  } | {
587
570
  key: string | undefined;
588
- providers?: ("auto" | "native" | "parallel" | "off" | "kernel" | "browserbase" | "exa-keyless" | "chrome")[] | undefined;
571
+ providers?: string[] | undefined;
589
572
  provider?: string | undefined;
590
- default_provider?: "auto" | "kernel" | undefined;
573
+ default_provider?: string | undefined;
591
574
  resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
592
575
  why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
593
576
  permission: "deny" | "allow" | "ask";
@@ -686,7 +669,7 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
686
669
  efforts: ("low" | "medium" | "high")[];
687
670
  thinking: ("low" | "medium" | "high" | "xhigh" | "max")[];
688
671
  /** The browser a run's `browser` tool drives: the vendor it resolves to under the server's settings when the tool is
689
- * available here (tools[]), Browserbase's or Kernel's, else none. */
672
+ * available here (tools[]), a browser provider's id (tool-plane.ts BROWSER_VENDOR_IDS), else none. */
690
673
  browser: string;
691
674
  /** A tool setting's `permission` (definition.tool_settings, /v2/settings/tools): allow, ask or deny, which the tool
692
675
  * gate holds every tool call to (tool-gate.ts); an ask is answered at POST /runs/{id}/approvals/{approval_id}. */
@@ -714,7 +697,7 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
714
697
  * which always exists (seal-key.ts), so MCP credentials are always kept sealed. */
715
698
  mcp_client: {
716
699
  transports: string[];
717
- auth: ("headers" | "none" | "bearer" | "oauth" | "github_app")[];
700
+ auth: ("headers" | "none" | "bearer" | "oauth" | "github_app" | "per_run")[];
718
701
  at_rest: string;
719
702
  harnesses: string[];
720
703
  };