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

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 (466) hide show
  1. package/CHANGELOG.md +368 -0
  2. package/README.md +341 -208
  3. package/dist/adapters.d.ts +3 -4
  4. package/dist/adapters.js +18 -15
  5. package/dist/agent-rows.d.ts +99 -0
  6. package/dist/agent-rows.js +1 -0
  7. package/dist/agents-store.d.ts +6 -2
  8. package/dist/agents-store.js +75 -25
  9. package/dist/agents.d.ts +9 -125
  10. package/dist/agents.js +15 -305
  11. package/dist/answer-json.d.ts +23 -0
  12. package/dist/answer-json.js +58 -0
  13. package/dist/api-only.d.ts +1 -1
  14. package/dist/api-only.js +2 -2
  15. package/dist/archil-settings.d.ts +11 -1
  16. package/dist/archil-settings.js +10 -0
  17. package/dist/bash-read-only.d.ts +35 -0
  18. package/dist/bash-read-only.js +778 -0
  19. package/dist/box-settings.d.ts +3 -23
  20. package/dist/box-settings.js +7 -51
  21. package/dist/boxes.d.ts +17 -0
  22. package/dist/boxes.js +27 -20
  23. package/dist/browser-commands.d.ts +5 -2
  24. package/dist/browser-commands.js +4 -4
  25. package/dist/browser-computer.d.ts +5 -0
  26. package/dist/browser-computer.js +21 -0
  27. package/dist/browser-cost.d.ts +9 -6
  28. package/dist/browser-cost.js +95 -51
  29. package/dist/browser-live.d.ts +7 -20
  30. package/dist/browser-live.js +15 -93
  31. package/dist/browser-person.d.ts +18 -51
  32. package/dist/browser-person.js +94 -277
  33. package/dist/budget.d.ts +0 -5
  34. package/dist/budget.js +0 -5
  35. package/dist/cap.d.ts +14 -8
  36. package/dist/cap.js +19 -9
  37. package/dist/cli.js +71 -18
  38. package/dist/closed-pipes.d.ts +2 -0
  39. package/dist/closed-pipes.js +13 -0
  40. package/dist/computer-commands.d.ts +2 -0
  41. package/dist/computer-commands.js +2 -0
  42. package/dist/computer-keys.d.ts +20 -10
  43. package/dist/computer-keys.js +36 -54
  44. package/dist/computer-setting.d.ts +20 -3
  45. package/dist/computer-setting.js +58 -10
  46. package/dist/computers.d.ts +35 -2
  47. package/dist/computers.js +72 -11
  48. package/dist/confine.d.ts +120 -0
  49. package/dist/confine.js +436 -0
  50. package/dist/console/assets/index-B7NKTU8E.css +1 -0
  51. package/dist/console/assets/index-CXZMgJE7.js +550 -0
  52. package/dist/console/index.html +2 -2
  53. package/dist/content-filter.d.ts +7 -0
  54. package/dist/content-filter.js +23 -0
  55. package/dist/decision-cap.d.ts +7 -29
  56. package/dist/decision-cap.js +3 -94
  57. package/dist/decision-rows.d.ts +1 -1
  58. package/dist/decision-rows.js +1 -1
  59. package/dist/docker-daemon.d.ts +31 -0
  60. package/dist/docker-daemon.js +56 -0
  61. package/dist/effort-guidance.js +4 -3
  62. package/dist/environment.d.ts +0 -3
  63. package/dist/environment.js +3 -5
  64. package/dist/errors.d.ts +1 -2
  65. package/dist/errors.js +9 -9
  66. package/dist/explain.js +3 -1
  67. package/dist/filed-answer.d.ts +32 -0
  68. package/dist/filed-answer.js +160 -0
  69. package/dist/files.d.ts +1 -3
  70. package/dist/files.js +2 -4
  71. package/dist/github-connection.d.ts +1 -1
  72. package/dist/github-connection.js +25 -7
  73. package/dist/github-faux.d.ts +26 -0
  74. package/dist/github-faux.js +76 -0
  75. package/dist/github.d.ts +6 -2
  76. package/dist/github.js +5 -3
  77. package/dist/graph-served.d.ts +5 -3
  78. package/dist/graph-served.js +14 -6
  79. package/dist/graph-view.d.ts +3 -5
  80. package/dist/graph-view.js +9 -16
  81. package/dist/handed-values.d.ts +9 -0
  82. package/dist/handed-values.js +26 -0
  83. package/dist/harness-install.d.ts +1 -7
  84. package/dist/harness-install.js +1 -18
  85. package/dist/harness-opencode/adapter.d.ts +7 -0
  86. package/dist/harness-opencode/adapter.js +23 -6
  87. package/dist/harness-opencode/harness.js +0 -1
  88. package/dist/harness-opencode/host/policy.js +2 -2
  89. package/dist/harness-opencode/index.d.ts +1 -1
  90. package/dist/harness-opencode/index.js +1 -1
  91. package/dist/harness-opencode/verify.d.ts +17 -0
  92. package/dist/harness-opencode/verify.js +30 -10
  93. package/dist/harness-table.js +6 -1
  94. package/dist/heard.js +1 -1
  95. package/dist/held-fd.d.ts +5 -0
  96. package/dist/held-fd.js +14 -0
  97. package/dist/host-calls.d.ts +20 -0
  98. package/dist/host-calls.js +12 -0
  99. package/dist/host-tools.d.ts +4 -21
  100. package/dist/host-tools.js +4 -61
  101. package/dist/host.d.ts +2 -4
  102. package/dist/host.js +2 -7
  103. package/dist/import-summary.d.ts +1 -5
  104. package/dist/import-summary.js +0 -21
  105. package/dist/import.d.ts +6 -6
  106. package/dist/import.js +14 -15
  107. package/dist/index.d.ts +1 -0
  108. package/dist/index.js +1 -0
  109. package/dist/key-refusal.d.ts +5 -1
  110. package/dist/key-refusal.js +19 -4
  111. package/dist/learn/check.d.ts +8 -2
  112. package/dist/learn/check.js +85 -31
  113. package/dist/learn/folder.d.ts +11 -4
  114. package/dist/learn/folder.js +17 -19
  115. package/dist/learn/grade.d.ts +18 -1
  116. package/dist/learn/grade.js +108 -14
  117. package/dist/learn/index.d.ts +5 -5
  118. package/dist/learn/index.js +5 -5
  119. package/dist/learn/learning.sh +1 -14
  120. package/dist/learn/notes.d.ts +14 -3
  121. package/dist/learn/notes.js +16 -6
  122. package/dist/learn/reflect.d.ts +31 -2
  123. package/dist/learn/reflect.js +83 -6
  124. package/dist/learn/relevance.d.ts +24 -0
  125. package/dist/learn/relevance.js +91 -0
  126. package/dist/learn/secrets.d.ts +7 -1
  127. package/dist/learn/secrets.js +86 -19
  128. package/dist/learn/skills.d.ts +159 -18
  129. package/dist/learn/skills.js +644 -64
  130. package/dist/learned-nodes.d.ts +14 -0
  131. package/dist/learned-nodes.js +8 -0
  132. package/dist/learned-workflow.d.ts +41 -6
  133. package/dist/learned-workflow.js +153 -18
  134. package/dist/learning-routes.d.ts +49 -4
  135. package/dist/learning-routes.js +113 -31
  136. package/dist/learning-run.d.ts +16 -31
  137. package/dist/learning-run.js +31 -38
  138. package/dist/learning-words.d.ts +12 -5
  139. package/dist/learning-words.js +18 -9
  140. package/dist/learning.d.ts +91 -97
  141. package/dist/learning.js +176 -320
  142. package/dist/live/stream.js +1 -1
  143. package/dist/live/translate.js +12 -2
  144. package/dist/llm.d.ts +4 -1
  145. package/dist/llm.js +4 -2
  146. package/dist/local-models.d.ts +11 -5
  147. package/dist/local-models.js +13 -8
  148. package/dist/mcp-gateway.d.ts +17 -49
  149. package/dist/mcp-gateway.js +55 -136
  150. package/dist/mcp-oauth.d.ts +10 -14
  151. package/dist/mcp-oauth.js +14 -32
  152. package/dist/mcp-probe.d.ts +0 -7
  153. package/dist/mcp-probe.js +4 -10
  154. package/dist/mcp-servers-store.d.ts +18 -18
  155. package/dist/mcp-servers-store.js +12 -14
  156. package/dist/mcp-store.js +3 -4
  157. package/dist/mcp.js +4 -3
  158. package/dist/model.d.ts +9 -7
  159. package/dist/model.js +51 -27
  160. package/dist/monid.d.ts +0 -2
  161. package/dist/monid.js +3 -6
  162. package/dist/openapi.d.ts +8 -1
  163. package/dist/openapi.js +156 -58
  164. package/dist/page.d.ts +1 -3
  165. package/dist/page.js +6 -18
  166. package/dist/paid-calls.d.ts +21 -27
  167. package/dist/paid-calls.js +26 -61
  168. package/dist/pause.d.ts +2 -19
  169. package/dist/pause.js +5 -74
  170. package/dist/port-models.d.ts +10 -3
  171. package/dist/port-models.js +26 -6
  172. package/dist/propose.d.ts +2 -0
  173. package/dist/propose.js +80 -45
  174. package/dist/push-handler.d.ts +1 -1
  175. package/dist/reflect-range.d.ts +25 -0
  176. package/dist/reflect-range.js +30 -0
  177. package/dist/refusal-words.d.ts +5 -1
  178. package/dist/refusal-words.js +5 -1
  179. package/dist/rows.d.ts +1 -1
  180. package/dist/run-cut.d.ts +0 -6
  181. package/dist/run-cut.js +0 -6
  182. package/dist/run-db.d.ts +2 -11
  183. package/dist/run-db.js +2 -37
  184. package/dist/run-launch.d.ts +21 -2
  185. package/dist/run-launch.js +14 -5
  186. package/dist/run-learning-served.d.ts +21 -4
  187. package/dist/run-learning-served.js +23 -13
  188. package/dist/run-reads-over-store.d.ts +5 -3
  189. package/dist/run-reads-over-store.js +25 -14
  190. package/dist/run-secrets.d.ts +1 -1
  191. package/dist/run-timeline-served.d.ts +5 -1
  192. package/dist/run-timeline-served.js +27 -6
  193. package/dist/run-view.d.ts +37 -22
  194. package/dist/run-view.js +85 -38
  195. package/dist/runnable.d.ts +21 -10
  196. package/dist/runnable.js +35 -12
  197. package/dist/runner/adapter-loop.d.ts +36 -5
  198. package/dist/runner/adapter-loop.js +663 -69
  199. package/dist/runner/adapter-run-spec.d.ts +42 -8
  200. package/dist/runner/adapter-run-spec.js +186 -52
  201. package/dist/runner/adapters/index.js +11 -1
  202. package/dist/runner/adapters/pi.d.ts +40 -2
  203. package/dist/runner/adapters/pi.js +110 -27
  204. package/dist/runner/beside.d.ts +38 -3
  205. package/dist/runner/beside.js +54 -5
  206. package/dist/runner/claim-secrets.d.ts +16 -1
  207. package/dist/runner/claim-secrets.js +62 -14
  208. package/dist/runner/cli-run-spec.d.ts +5 -0
  209. package/dist/runner/cli-run-spec.js +159 -41
  210. package/dist/runner/commands.js +1 -1
  211. package/dist/runner/computer-journal.d.ts +15 -2
  212. package/dist/runner/computer-journal.js +41 -5
  213. package/dist/runner/conformance/harness.d.ts +1 -0
  214. package/dist/runner/conformance/harness.js +123 -13
  215. package/dist/runner/conformance/subject.d.ts +4 -1
  216. package/dist/runner/dispatch.d.ts +8 -1
  217. package/dist/runner/dispatch.js +81 -7
  218. package/dist/runner/end-of-run.d.ts +8 -2
  219. package/dist/runner/end-of-run.js +10 -4
  220. package/dist/runner/github-app.d.ts +7 -2
  221. package/dist/runner/github-app.js +47 -16
  222. package/dist/runner/harness-loops.d.ts +15 -2
  223. package/dist/runner/harness-loops.js +38 -2
  224. package/dist/runner/journal-kinds.d.ts +60 -6
  225. package/dist/runner/journal-kinds.js +43 -5
  226. package/dist/runner/journal-reader.d.ts +1 -1
  227. package/dist/runner/journal-reader.js +2 -2
  228. package/dist/runner/learning-ask.d.ts +4 -0
  229. package/dist/runner/learning-ask.js +15 -1
  230. package/dist/runner/learning-end.d.ts +18 -3
  231. package/dist/runner/learning-end.js +194 -20
  232. package/dist/runner/learning-loop.d.ts +7 -0
  233. package/dist/runner/learning-loop.js +36 -8
  234. package/dist/runner/learning-seed.d.ts +6 -0
  235. package/dist/runner/learning-seed.js +6 -0
  236. package/dist/runner/loop-contract.d.ts +4 -0
  237. package/dist/runner/main.d.ts +61 -9
  238. package/dist/runner/main.js +144 -20
  239. package/dist/runner/mcp-claim.d.ts +3 -0
  240. package/dist/runner/mcp-claim.js +7 -3
  241. package/dist/runner/mcp-github.d.ts +11 -2
  242. package/dist/runner/mcp-github.js +55 -4
  243. package/dist/runner/mcp-run.d.ts +2 -0
  244. package/dist/runner/mcp-run.js +16 -5
  245. package/dist/runner/memory-claim.d.ts +9 -0
  246. package/dist/runner/memory-claim.js +25 -0
  247. package/dist/runner/metrics.d.ts +46 -1
  248. package/dist/runner/metrics.js +156 -1
  249. package/dist/runner/model-route.d.ts +16 -0
  250. package/dist/runner/model-route.js +134 -10
  251. package/dist/runner/reflect-hook.d.ts +12 -1
  252. package/dist/runner/reflect-hook.js +33 -3
  253. package/dist/runner/runner.d.ts +20 -0
  254. package/dist/runner/runner.js +146 -18
  255. package/dist/runner/spec-holds.d.ts +7 -2
  256. package/dist/runner/spec-holds.js +4 -3
  257. package/dist/runner/store-port.d.ts +1 -1
  258. package/dist/runner/store-secrets.d.ts +3 -3
  259. package/dist/runner/store-secrets.js +8 -12
  260. package/dist/runner/text-tools.d.ts +44 -0
  261. package/dist/runner/text-tools.js +237 -0
  262. package/dist/runner/workflow-host.d.ts +7 -2
  263. package/dist/runner/workflow-host.js +3 -1
  264. package/dist/runner/workflow-loop.d.ts +10 -1
  265. package/dist/runner/workflow-loop.js +14 -6
  266. package/dist/runner/workflow-spec.d.ts +21 -0
  267. package/dist/runner/workflow-spec.js +217 -93
  268. package/dist/runs-over-store.d.ts +14 -3
  269. package/dist/runs-over-store.js +100 -23
  270. package/dist/seal-key.d.ts +0 -2
  271. package/dist/seal-key.js +5 -45
  272. package/dist/sealed-settings-store.d.ts +19 -4
  273. package/dist/sealed-settings-store.js +9 -9
  274. package/dist/sealing.d.ts +4 -0
  275. package/dist/sealing.js +20 -0
  276. package/dist/secret-cut.d.ts +1 -1
  277. package/dist/secret-cut.js +1 -1
  278. package/dist/secret-name.d.ts +9 -0
  279. package/dist/secret-name.js +15 -0
  280. package/dist/secret-writes.d.ts +0 -1
  281. package/dist/secret-writes.js +0 -1
  282. package/dist/server-fs.d.ts +4 -0
  283. package/dist/server-fs.js +8 -2
  284. package/dist/server-lock.d.ts +0 -24
  285. package/dist/server-lock.js +5 -85
  286. package/dist/server-secrets-store.d.ts +4 -4
  287. package/dist/server-secrets-store.js +9 -31
  288. package/dist/server-secrets.d.ts +4 -9
  289. package/dist/server-secrets.js +12 -36
  290. package/dist/server.d.ts +37 -56
  291. package/dist/server.js +322 -134
  292. package/dist/sign-ins-store.d.ts +34 -36
  293. package/dist/sign-ins-store.js +27 -38
  294. package/dist/sign-ins.d.ts +2 -119
  295. package/dist/sign-ins.js +5 -311
  296. package/dist/standard-webhooks.d.ts +1 -1
  297. package/dist/standard-webhooks.js +1 -1
  298. package/dist/stats.d.ts +3 -2
  299. package/dist/stats.js +1 -1
  300. package/dist/stop-signals.d.ts +4 -2
  301. package/dist/stop-signals.js +5 -3
  302. package/dist/store/agent-body.d.ts +12 -2
  303. package/dist/store/agent-body.js +22 -4
  304. package/dist/store/deadline.d.ts +18 -0
  305. package/dist/store/deadline.js +45 -0
  306. package/dist/store/index.d.ts +2 -2
  307. package/dist/store/index.js +2 -2
  308. package/dist/store/open.d.ts +6 -3
  309. package/dist/store/open.js +2 -2
  310. package/dist/store/postgres/connection.d.ts +22 -2
  311. package/dist/store/postgres/connection.js +211 -41
  312. package/dist/store/postgres/migrate.d.ts +4 -0
  313. package/dist/store/postgres/migrate.js +9 -2
  314. package/dist/store/postgres/migrations/0003_commands_one_answer.check.sql +19 -0
  315. package/dist/store/postgres/migrations/0003_commands_one_answer.sql +13 -0
  316. package/dist/store/postgres/store.d.ts +9 -2
  317. package/dist/store/postgres/store.js +9 -0
  318. package/dist/store/schema.js +1 -1
  319. package/dist/store/seal.js +2 -2
  320. package/dist/store/sqlite/connection.js +14 -5
  321. package/dist/store/sqlite/run-patch.d.ts +3 -0
  322. package/dist/store/sqlite/run-patch.js +3 -0
  323. package/dist/store/sqlite/store.js +41 -12
  324. package/dist/store/store.d.ts +35 -6
  325. package/dist/store/store.js +12 -2
  326. package/dist/store-reads/cap.d.ts +1 -1
  327. package/dist/store-reads/cap.js +22 -4
  328. package/dist/store-reads/journal.d.ts +9 -6
  329. package/dist/store-reads/journal.js +129 -18
  330. package/dist/store-reads/learning.d.ts +82 -8
  331. package/dist/store-reads/learning.js +184 -11
  332. package/dist/store-reads/workflow.d.ts +1 -1
  333. package/dist/store-reads/workflow.js +1 -1
  334. package/dist/store-view.d.ts +19 -1
  335. package/dist/store-view.js +95 -27
  336. package/dist/template-eval.d.ts +60 -4
  337. package/dist/template-eval.js +120 -54
  338. package/dist/templates.d.ts +33 -14
  339. package/dist/templates.js +82 -46
  340. package/dist/timeline/group.d.ts +33 -0
  341. package/dist/timeline/group.js +77 -0
  342. package/dist/timeline/index.d.ts +7 -0
  343. package/dist/timeline/index.js +7 -0
  344. package/dist/timeline/labels.d.ts +79 -0
  345. package/dist/timeline/labels.js +150 -0
  346. package/dist/timeline/origin.d.ts +56 -0
  347. package/dist/timeline/origin.js +92 -0
  348. package/dist/timeline/render-text.d.ts +11 -0
  349. package/dist/timeline/render-text.js +62 -0
  350. package/dist/timeline/timeline.d.ts +282 -0
  351. package/dist/timeline/timeline.js +1308 -0
  352. package/dist/timeline/util.d.ts +17 -0
  353. package/dist/timeline/util.js +49 -0
  354. package/dist/tool-budget.d.ts +18 -0
  355. package/dist/tool-budget.js +50 -0
  356. package/dist/tool-gate.d.ts +47 -218
  357. package/dist/tool-gate.js +87 -545
  358. package/dist/tool-keys-store.d.ts +11 -12
  359. package/dist/tool-keys-store.js +24 -31
  360. package/dist/tool-keys.d.ts +5 -101
  361. package/dist/tool-keys.js +8 -267
  362. package/dist/tool-plane.d.ts +23 -52
  363. package/dist/tool-plane.js +23 -81
  364. package/dist/tool-settings-store.d.ts +1 -2
  365. package/dist/tool-settings-store.js +5 -8
  366. package/dist/tools.d.ts +67 -25
  367. package/dist/tools.js +170 -119
  368. package/dist/trigger-adapter.d.ts +2 -2
  369. package/dist/trigger-targets.d.ts +13 -1
  370. package/dist/trigger-targets.js +31 -1
  371. package/dist/triggers.d.ts +2 -2
  372. package/dist/triggers.js +3 -3
  373. package/dist/turn-end.d.ts +1 -1
  374. package/dist/turn-end.js +1 -1
  375. package/dist/turns.d.ts +0 -6
  376. package/dist/turns.js +0 -19
  377. package/dist/uploads.d.ts +28 -5
  378. package/dist/uploads.js +83 -10
  379. package/dist/usage.d.ts +1 -49
  380. package/dist/usage.js +3 -84
  381. package/dist/validate.d.ts +4 -0
  382. package/dist/validate.js +33 -14
  383. package/dist/webhooks.d.ts +102 -76
  384. package/dist/webhooks.js +266 -233
  385. package/dist/workflow-run.d.ts +114 -0
  386. package/dist/workflow-run.js +144 -0
  387. package/dist/workspace/archil-claim.d.ts +2 -2
  388. package/dist/workspace/archil-claim.js +4 -3
  389. package/dist/workspace/archil-disk.d.ts +10 -1
  390. package/dist/workspace/archil-disk.js +4 -0
  391. package/dist/workspace/archil-exec.d.ts +12 -2
  392. package/dist/workspace/archil-exec.js +16 -0
  393. package/dist/workspace/archil.d.ts +2 -2
  394. package/dist/workspace/archil.js +25 -5
  395. package/dist/workspace/attach.js +2 -0
  396. package/dist/workspace/beneath.d.ts +19 -0
  397. package/dist/workspace/beneath.js +106 -0
  398. package/dist/workspace/computer-deps.d.ts +26 -9
  399. package/dist/workspace/computer-deps.js +144 -43
  400. package/dist/workspace/computer-for-claim.d.ts +17 -14
  401. package/dist/workspace/computer-for-claim.js +99 -26
  402. package/dist/workspace/computer-hold.d.ts +6 -1
  403. package/dist/workspace/computer-hold.js +6 -1
  404. package/dist/workspace/computer-janitor.d.ts +47 -0
  405. package/dist/workspace/computer-janitor.js +182 -0
  406. package/dist/workspace/computer-ledger.d.ts +1 -8
  407. package/dist/workspace/computer-ledger.js +0 -3
  408. package/dist/workspace/computer-providers.d.ts +5 -3
  409. package/dist/workspace/computer-providers.js +11 -9
  410. package/dist/workspace/grep-worker.d.ts +5 -0
  411. package/dist/workspace/grep-worker.js +9 -6
  412. package/dist/workspace/hands.d.ts +5 -2
  413. package/dist/workspace/hands.js +4 -3
  414. package/dist/workspace/index.d.ts +6 -5
  415. package/dist/workspace/index.js +4 -4
  416. package/dist/workspace/local.d.ts +14 -2
  417. package/dist/workspace/local.js +170 -43
  418. package/dist/workspace/paths.js +3 -2
  419. package/dist/workspace/pi-env.d.ts +4 -0
  420. package/dist/workspace/pi-env.js +3 -2
  421. package/dist/workspace/resolve-computer.d.ts +55 -10
  422. package/dist/workspace/resolve-computer.js +66 -14
  423. package/dist/workspace/run-tools.d.ts +15 -31
  424. package/dist/workspace/run-tools.js +19 -30
  425. package/dist/workspace/workspace.d.ts +5 -0
  426. package/dist/workspace-paths.d.ts +0 -17
  427. package/dist/workspace-paths.js +1 -41
  428. package/dist/workspace.d.ts +0 -17
  429. package/dist/workspace.js +4 -110
  430. package/package.json +14 -14
  431. package/skills/agentrun-serve/SKILL.md +1 -1
  432. package/templates/README.md +11 -5
  433. package/templates/code-review/evals/mentions-defused/case.yaml +15 -0
  434. package/templates/code-review/evals/mentions-defused/fixtures/github-mcp.json +254 -0
  435. package/templates/code-review/evals/mentions-defused/graders/no-pings.md +16 -0
  436. package/templates/code-review/evals/mentions-defused/graders/posted-a-review.md +5 -0
  437. package/templates/code-review/evals/mentions-defused/graders/schema.md +5 -0
  438. package/templates/code-review/evals/mentions-defused/prompt.md +10 -0
  439. package/templates/kyb/evals/clean-public-company/graders/no-opensanctions.md +5 -0
  440. package/templates/kyb/evals/opensanctions-on/case.yaml +5 -0
  441. package/templates/kyb/evals/opensanctions-on/graders/licence-and-evidence.md +18 -0
  442. package/templates/kyb/evals/opensanctions-on/graders/schema.md +5 -0
  443. package/templates/kyb/evals/opensanctions-on/prompt.md +11 -0
  444. package/templates/market-monitor/agent.md +2 -2
  445. package/templates/market-monitor/skills/monitor/SKILL.md +6 -4
  446. package/templates/release-notes/agent.md +11 -0
  447. package/dist/bound-files.d.ts +0 -4
  448. package/dist/bound-files.js +0 -164
  449. package/dist/coding-tools.d.ts +0 -47
  450. package/dist/coding-tools.js +0 -189
  451. package/dist/computer-adb.d.ts +0 -12
  452. package/dist/computer-adb.js +0 -14
  453. package/dist/console/assets/index-Dn0ngwG9.js +0 -535
  454. package/dist/console/assets/index-DvW6Aled.css +0 -1
  455. package/dist/grade.d.ts +0 -63
  456. package/dist/grade.js +0 -150
  457. package/dist/mcp-servers.d.ts +0 -269
  458. package/dist/mcp-servers.js +0 -456
  459. package/dist/packs.d.ts +0 -71
  460. package/dist/packs.js +0 -180
  461. package/dist/sealed-settings.d.ts +0 -60
  462. package/dist/sealed-settings.js +0 -171
  463. package/dist/sessions.d.ts +0 -6
  464. package/dist/sessions.js +0 -109
  465. package/dist/workspace/computer-serves.d.ts +0 -12
  466. package/dist/workspace/computer-serves.js +0 -15
@@ -1,32 +1,18 @@
1
- // One server per data root, written for AgentRun. A server takes <data>/server.lock before anything reads or writes the
2
- // data root, and holds it until it closes; a second server on the same root is refused by name and touches nothing.
1
+ // One server per data root, written for AgentRun. A server takes <data>/server.lock once it holds its store (server.ts
2
+ // dataRootLock), and holds it until it closes; a second server on the same root is refused by name. The store's owner
3
+ // lock holds one store; this one holds the data root beside it (the token, the seal key, uploads, harness installs), which
4
+ // two servers on two stores (two Postgres schemas, or SQLite and Postgres) would otherwise share.
3
5
  //
4
6
  // The lock is SQLite's EXCLUSIVE lock, as a run's store holds it: held on one connection for the server's life,
5
7
  // dropped by the kernel when the process dies (a crashed server's file is reused by the next start, never refused for
6
8
  // existing), and refused to a second connection whether it is in another process or in this one. The file is opened by
7
9
  // SQLite alone: a POSIX lock is dropped when any descriptor the process holds on the file is closed, so no other code
8
10
  // may open it (its mode is set by path).
9
- //
10
- // pi-durable-disk forgets a command record written in another pid namespace only under the precondition this lock
11
- // keeps: two servers never hold one data root at once.
12
- //
13
- // A server that stops keeps the lock until its runs' processes have drained and exited, which takes up to their drain
14
- // and a second. It says so in <data>/server.state: written once as the server starts, right after it takes the lock
15
- // (its pid, not stopping), and rewritten in place as its close begins (when its stop is over at the latest). A stop never
16
- // adds an entry to the data root, so a caller that removes the directory as soon as it signals the stop meets nothing
17
- // new there. A start that finds the lock held reads that file only then, and waits for a server that is stopping instead
18
- // of refusing it; a record whose pid is gone or whose time has passed is no stop.
19
- import { chmodSync, closeSync, openSync, readFileSync, writeFileSync, writeSync } from "node:fs";
11
+ import { chmodSync } from "node:fs";
20
12
  import { join } from "node:path";
21
13
  import { DatabaseSync } from "node:sqlite";
22
- import { processAlive } from "@parcha/agentrun-kernel/host";
23
14
  import { sqliteBusy } from "./agents.js";
24
15
  export const SERVER_LOCK = "server.lock";
25
- /** The data root's server, as it last said: `{ pid, until }`, `until` (epoch ms) when it stops, null while it runs. */
26
- export const SERVER_STATE = "server.state";
27
- /** The record's length on disk: its JSON padded with spaces, so a rewrite in place leaves no tail of an earlier one. */
28
- const STATE_BYTES = 128;
29
- const stateOf = (until) => Buffer.from(JSON.stringify({ pid: process.pid, until }).padEnd(STATE_BYTES - 1) + "\n");
30
16
  /** Another server holds the data root. Its message is the one line the CLI prints before it exits 1. */
31
17
  export class ServerLockHeldError extends Error {
32
18
  code = "SERVER_LOCK_HELD";
@@ -72,69 +58,3 @@ export function takeServerLock(dataRoot, options = {}) {
72
58
  },
73
59
  };
74
60
  }
75
- /** Records the data root's server as this process, running: once, as it starts, right after it takes the lock. */
76
- export function markRunning(dataRoot) {
77
- writeFileSync(join(dataRoot, SERVER_STATE), stateOf(null), { mode: 0o600 });
78
- }
79
- /** Records the data root's server as stopping until `until`, as its close begins: the same file, rewritten in place in one
80
- * write of the same length, never made again (a record that is gone is left gone), so the stop adds no entry. */
81
- export function markStopping(dataRoot, until) {
82
- let fd;
83
- try {
84
- fd = openSync(join(dataRoot, SERVER_STATE), "r+");
85
- }
86
- catch (error) {
87
- if (error.code === "ENOENT")
88
- return;
89
- throw error;
90
- }
91
- try {
92
- writeSync(fd, stateOf(until), 0, STATE_BYTES, 0);
93
- }
94
- finally {
95
- closeSync(fd);
96
- }
97
- }
98
- /** The data root's server, when its record says it is stopping, its process lives and its time is still ahead; none
99
- * otherwise (no record, one that can't be read, a server that runs, or one that died as it stopped). */
100
- export function stoppingOf(dataRoot, now = Date.now()) {
101
- let mark;
102
- try {
103
- mark = JSON.parse(readFileSync(join(dataRoot, SERVER_STATE), "utf8"));
104
- }
105
- catch {
106
- return undefined;
107
- }
108
- const { pid, until } = (mark ?? {});
109
- if (typeof pid !== "number" || !Number.isSafeInteger(pid) || pid <= 0 || typeof until !== "number" || !(until > now))
110
- return undefined;
111
- return processAlive(pid) ? { pid, until } : undefined;
112
- }
113
- /** Takes the data root's server lock, as takeServerLock. When another server holds it and is stopping (its record),
114
- * waits for that server as long as its process lives, under one cap, its record's `until` (the server's whole close:
115
- * its runs' drain, their carry backs and their boxes' cleanup), retrying every `everyMs`, and tells `waiting` once as it
116
- * starts to. A server that is not stopping is refused at once with ServerLockHeldError, as is one that still holds the
117
- * lock at its `until`, or a holder that is not the stopping server (its process gone, the lock still held). */
118
- export async function takeServerLockAfterStop(dataRoot, options = {}) {
119
- try {
120
- return takeServerLock(dataRoot);
121
- }
122
- catch (error) {
123
- if (!(error instanceof ServerLockHeldError))
124
- throw error;
125
- const stopping = stoppingOf(dataRoot);
126
- if (!stopping)
127
- throw error;
128
- options.waiting?.(stopping);
129
- for (;;) {
130
- await new Promise((resolve) => setTimeout(resolve, options.everyMs ?? 250));
131
- try {
132
- return takeServerLock(dataRoot);
133
- }
134
- catch (again) {
135
- if (!(again instanceof ServerLockHeldError) || Date.now() >= stopping.until || !processAlive(stopping.pid))
136
- throw again;
137
- }
138
- }
139
- }
140
- }
@@ -1,5 +1,5 @@
1
1
  import { type SealedSettingsOverStore } from "./sealed-settings-store.js";
2
- import { ServerSecrets } from "./server-secrets.js";
2
+ import { type ServerSecrets } from "./server-secrets.js";
3
3
  import type { TriggerAdapter } from "./trigger-adapter.js";
4
4
  import type { TriggerSettings } from "./store/index.js";
5
5
  /** The store slice this layer needs (handed to each adapter's sealed settings). */
@@ -7,11 +7,11 @@ type ServerSecretsStore = {
7
7
  readonly triggerSettings: Pick<TriggerSettings, "get" | "put" | "removeScope">;
8
8
  flush(): Promise<void>;
9
9
  };
10
- /** The server's own secrets over the store: the owner's token and the session secret (still files beside the store), the
11
- * outbound webhook's secret, and every adapter's sealed settings (now store rows), which are returned too, by adapter id,
10
+ /** The server's own secrets over the store: what it keeps beside the store (besideTheStore), every adapter's sealed
11
+ * settings and the outbound webhook's (OUTBOUND_WEBHOOK, its signing secret), store rows, which are returned too, by id,
12
12
  * for the server to keep using. Loads each adapter's settings before it answers (awaited once at start), so the redaction
13
13
  * list is whole from the first use. A value that does not open is said to `say`. */
14
- export declare function openServerSecretsOverStore(store: ServerSecretsStore, data: string, env: NodeJS.ProcessEnv, adapters: readonly TriggerAdapter[], say?: (fields: Record<string, string>) => void): Promise<{
14
+ export declare function openServerSecretsOverStore(store: ServerSecretsStore, data: string, env: NodeJS.ProcessEnv, adapters: readonly Pick<TriggerAdapter, "id" | "settings">[], say?: (fields: Record<string, string>) => void): Promise<{
15
15
  secrets: ServerSecrets;
16
16
  settings: Map<string, SealedSettingsOverStore>;
17
17
  }>;
@@ -1,46 +1,24 @@
1
- // The server's own secrets as one redaction list, over the one store, the store-backed replacement for openServerSecrets
2
- // (server-secrets.ts). What changes from the file version: each trigger source's sealed settings are store rows
3
- // (sealed-settings-store.ts, store.triggerSettings), not per-adapter files; the deleted per-run door token (.door-token) is
4
- // no longer a source. What stays a file: the owner's API token (.token, the CLI reads it) and the sign-in session secret,
5
- // which the cutover keeps beside the store; and the outbound webhook's signing secret, read as before. The list is still
1
+ // The server's own secrets as one redaction list, over the one store: each trigger source's sealed settings and the
2
+ // outbound webhook's signing secret are store rows (sealed-settings-store.ts, store.triggerSettings); the owner's API
3
+ // token (.token, the CLI reads it) and the sign-in session secret stay beside the store (server-secrets.ts besideTheStore). The list is
6
4
  // the one the server never shows (server.ts serverSecrets): what a run shows, what learning keeps and what the server
7
5
  // answers are cut of it.
8
- import { readFileSync } from "node:fs";
9
- import { join } from "node:path";
10
- import { TOKEN_FILE } from "./files.js";
11
- import { SESSION_SECRET_FILE } from "./owner.js";
12
6
  import { sealedSettingsOverStore } from "./sealed-settings-store.js";
13
- import { ServerSecrets } from "./server-secrets.js";
7
+ import { besideTheStore } from "./server-secrets.js";
14
8
  import { SEAL_KEY_ENV, sealKeyOf } from "./tool-keys.js";
15
- import { webhookSecretIn } from "./webhooks.js";
16
- /** The file `name` in `data`, trimmed; empty when it is not there. */
17
- const fileIn = (data, name) => {
18
- try {
19
- return readFileSync(join(data, name), "utf8").trim();
20
- }
21
- catch {
22
- return "";
23
- }
24
- };
25
- /** The server's own secrets over the store: the owner's token and the session secret (still files beside the store), the
26
- * outbound webhook's secret, and every adapter's sealed settings (now store rows), which are returned too, by adapter id,
9
+ import { OUTBOUND_WEBHOOK } from "./webhooks.js";
10
+ /** The server's own secrets over the store: what it keeps beside the store (besideTheStore), every adapter's sealed
11
+ * settings and the outbound webhook's (OUTBOUND_WEBHOOK, its signing secret), store rows, which are returned too, by id,
27
12
  * for the server to keep using. Loads each adapter's settings before it answers (awaited once at start), so the redaction
28
13
  * list is whole from the first use. A value that does not open is said to `say`. */
29
14
  export async function openServerSecretsOverStore(store, data, env, adapters, say = () => { }) {
30
- const secrets = new ServerSecrets();
31
- // Each read until it is there, then kept: they are made once, and a redaction reads the list often.
32
- const read = new Map();
33
- const kept = (name) => read.get(name) || (read.set(name, fileIn(data, name)), read.get(name));
34
- // The owner's API token and the sign-in session secret stay files beside the store; the per-run door token is gone.
35
- secrets.add("files", () => [kept(TOKEN_FILE), kept(SESSION_SECRET_FILE)]);
36
- const webhook = webhookSecretIn(data, env);
37
- secrets.add("webhook", () => (webhook && "secret" in webhook ? [webhook.secret] : []));
38
15
  // The server always has its seal key (seal-key.ts bootSealKey, at its start): no setting is ever kept in the clear.
39
16
  const key = sealKeyOf(env[SEAL_KEY_ENV]);
40
17
  if (!key)
41
18
  throw new Error(`the server starts with its seal key (${SEAL_KEY_ENV}), made at the first start when none is handed over`);
19
+ const secrets = besideTheStore(data);
42
20
  const settings = new Map();
43
- for (const adapter of adapters) {
21
+ for (const adapter of [...adapters, OUTBOUND_WEBHOOK]) {
44
22
  if (!adapter.settings)
45
23
  continue;
46
24
  const adapterSettings = sealedSettingsOverStore(store, adapter.id, adapter.settings, key, say);
@@ -1,5 +1,3 @@
1
- import { SealedSettings } from "./sealed-settings.js";
2
- import type { TriggerAdapter } from "./trigger-adapter.js";
3
1
  export declare class ServerSecrets {
4
2
  private readonly sources;
5
3
  /** Sources whose every value is listed as it is, of any length and whitespace and all: a PEM key's lines and whole. */
@@ -14,10 +12,7 @@ export declare class ServerSecrets {
14
12
  * in every spelling of it (standard-webhooks.ts secretForms). */
15
13
  values(): string[];
16
14
  }
17
- /** The server's own secrets data directory `data` keeps, each store opened with the seal key of `env`: the tokens' and
18
- * the session secret's files, the outbound webhook's secret, and every adapter's sealed settings (a value that does not
19
- * open is said to `say`), which are returned too, by adapter id, for the server to keep using. */
20
- export declare function openServerSecrets(data: string, env: NodeJS.ProcessEnv, adapters: readonly TriggerAdapter[], say?: (fields: Record<string, string>) => void): {
21
- secrets: ServerSecrets;
22
- settings: Map<string, SealedSettings>;
23
- };
15
+ /** The server's own secrets data directory `data` keeps beside the store: the owner's API token and the sign-in session
16
+ * secret (files the CLI and the console's sign-in read). Each file is read until it is there, then kept: they are made
17
+ * once, and a redaction reads the list often. */
18
+ export declare function besideTheStore(data: string): ServerSecrets;
@@ -1,17 +1,14 @@
1
- // The server's own secrets, as one list: its API token, its door token, its sign-in sessions' secret, its outbound
2
- // webhook's signing secret, and every value a trigger source keeps sealed (sealed-settings.ts). Each store adds itself
3
- // when it opens, as a reader, so a secret made or rotated since is in the list at once. With the host's, they are the one
4
- // list a server never shows (server.ts serverSecrets): what a run shows (runs.ts), what learning keeps (learning-run.ts),
5
- // what the server answers and the VM relay's errors are cut of it, and what an import writes (import.ts) of these; none
6
- // of them assembles its own.
7
- import { existsSync, readFileSync } from "node:fs";
1
+ // The server's own secrets, as one list: its API token, its sign-in sessions' secret, and every value the server keeps
2
+ // sealed among its settings (sealed-settings-store.ts): each trigger source's, and the outbound webhook's signing secret. Each source is added as a reader, so a
3
+ // secret made or rotated since is in the list at once. With the host's, they are the one list a server never shows
4
+ // (server.ts serverSecrets): what a run shows, what learning keeps, what the server answers and what an import writes are
5
+ // cut of it; none of them assembles its own. The trigger settings are store rows (server-secrets-store.ts); what stays
6
+ // beside the store in the data directory is read here (besideTheStore), by the server and by a runner that shares it.
7
+ import { readFileSync } from "node:fs";
8
8
  import { join } from "node:path";
9
9
  import { TOKEN_FILE } from "./files.js";
10
10
  import { SESSION_SECRET_FILE } from "./owner.js";
11
- import { SealedSettings } from "./sealed-settings.js";
12
11
  import { secretForms } from "./standard-webhooks.js";
13
- import { SEAL_KEY_ENV, sealKeyOf } from "./tool-keys.js";
14
- import { webhookSecretIn } from "./webhooks.js";
15
12
  export class ServerSecrets {
16
13
  sources = new Map();
17
14
  /** Sources whose every value is listed as it is, of any length and whitespace and all: a PEM key's lines and whole. */
@@ -43,34 +40,13 @@ const fileIn = (data, name) => {
43
40
  return "";
44
41
  }
45
42
  };
46
- /** The server's own secrets data directory `data` keeps, each store opened with the seal key of `env`: the tokens' and
47
- * the session secret's files, the outbound webhook's secret, and every adapter's sealed settings (a value that does not
48
- * open is said to `say`), which are returned too, by adapter id, for the server to keep using. */
49
- export function openServerSecrets(data, env, adapters, say = () => { }) {
43
+ /** The server's own secrets data directory `data` keeps beside the store: the owner's API token and the sign-in session
44
+ * secret (files the CLI and the console's sign-in read). Each file is read until it is there, then kept: they are made
45
+ * once, and a redaction reads the list often. */
46
+ export function besideTheStore(data) {
50
47
  const secrets = new ServerSecrets();
51
- // Each read until it is there, then kept: they are made once, and a redaction reads the list often.
52
48
  const read = new Map();
53
49
  const kept = (name) => read.get(name) || (read.set(name, fileIn(data, name)), read.get(name));
54
50
  secrets.add("files", () => [kept(TOKEN_FILE), kept(SESSION_SECRET_FILE)]);
55
- const webhook = webhookSecretIn(data, env);
56
- secrets.add("webhook", () => (webhook && "secret" in webhook ? [webhook.secret] : []));
57
- // Where a webhook trigger's secret was kept before its source's sealed settings were: no longer read.
58
- const leftover = join(data, "trigger-secrets.json");
59
- if (existsSync(leftover))
60
- say({ condition: "trigger_secrets_left_over", file: leftover, effect: "not read: give each webhook trigger made before a new secret with POST /v2/triggers/{id}/secret, or make it again" });
61
- // There is always a seal key (seal-key.ts): every caller hands this one.
62
- const key = sealKeyOf(env[SEAL_KEY_ENV]);
63
- if (!key)
64
- throw new Error(`the server's own secrets open only under its seal key (${SEAL_KEY_ENV}), and none was handed`);
65
- const settings = new Map();
66
- for (const adapter of adapters) {
67
- if (!adapter.settings)
68
- continue;
69
- const store = new SealedSettings(data, adapter.id, adapter.settings, key, say);
70
- settings.set(adapter.id, store);
71
- secrets.add(`trigger-settings:${adapter.id}`, () => store.values());
72
- // A PEM key's lines, its short last one too, and the key whole: listed with no floor.
73
- secrets.add(`trigger-settings-pem:${adapter.id}`, () => store.pemValues(), { whole: true });
74
- }
75
- return { secrets, settings };
51
+ return secrets;
76
52
  }
package/dist/server.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { type ModelNeeds } from "./model.js";
2
2
  import { type HarnessCapability } from "./harness.js";
3
- import type { MessageOrigin } from "@parcha/pi-durable-agent/timeline";
3
+ import type { MessageOrigin } from "./timeline/index.js";
4
4
  import { type LearningMode } from "./learning.js";
5
5
  import { type Place } from "./place.js";
6
6
  import { type Store } from "./store/index.js";
@@ -16,6 +16,9 @@ export declare const DEFAULT_PORT = 7340;
16
16
  export type ServeOptions = {
17
17
  /** The data directory: the agent store (`store.sqlite`) and its runs (`runs/<id>/`). */
18
18
  data: string;
19
+ /** On Postgres: told when this server's owner lock is lost for good (another server took the schema, or the lock could
20
+ * not be taken back): every store call is refused from then. The CLI exits 1 on it, so the platform restarts the server. */
21
+ onStoreLost?: (error: Error) => void;
19
22
  /** The owner, signed in with a password (owner.ts): the page asks for it, and the token stays for scripts and the CLI. */
20
23
  accounts?: boolean;
21
24
  /** With accounts: the first visit sets the password with no setup code (a server with no public address). Honored only
@@ -66,6 +69,10 @@ export type ServeOptions = {
66
69
  /** With `faux` only: a module whose default export gives the `browser` tool's `{ provider, driver }` (the tests' fake
67
70
  * backend), in place of Browserbase's or Kernel's. */
68
71
  fauxBrowser?: string;
72
+ /** With `faux` only: a fake GitHub App, connected at the start, its API in this process on loopback (github-faux.ts),
73
+ * so the console's GitHub flows run with nothing sent to GitHub. Its webhook secret is kept beside the data
74
+ * (FAUX_GITHUB_FILE) for a test's signed delivery. Refused on a data directory another GitHub App is connected in. */
75
+ fauxGitHub?: boolean;
69
76
  /** With `faux` only: a module whose default export is the fetch the check of a Kernel key goes through (the tests'
70
77
  * fake), in place of Kernel's API. */
71
78
  fauxKernel?: string;
@@ -130,52 +137,26 @@ export type ServeOptions = {
130
137
  maxRuns?: number;
131
138
  /** Free disk under the data directory below which GET /v2/health fails (default 64 MiB, or AGENTRUN_MIN_FREE_MB). */
132
139
  minFreeBytes?: number;
133
- /** How often a carry back the store refused is tried again while the server lives (default 30 s). */
134
- settleRetryMs?: number;
135
140
  /** Where the log lines go (print.ts); none without it. AGENTRUN_LOG=quiet leaves out the request lines. */
136
141
  log?: (line: string) => void;
137
142
  /** Told the Docker box image's state at the start, when this server has a Docker box, then each change (box-image.ts):
138
143
  * the CLI says a first build in words, as it starts and as it ends. */
139
144
  onBoxImage?: (state: ImageState) => void;
140
145
  /** The lines a person reads about a stop on this data root: this server's, as its close begins and runs' processes are
141
- * left to finish their turn, and this start's, when it waits for a server that is stopping (server-lock.ts). Default:
142
- * standard error, after `agentrun-serve: `. */
146
+ * left to finish their turn. Default: standard error, after `agentrun-serve: `. */
143
147
  notice?: (line: string) => void;
144
- /** The waits between carry backs that found the store held by another writer (default 0.5, 1, 2, 4 and 8 s), and a
145
- * hook called at each such refusal. */
146
- /** A test hook the per-run process used for carry-back; the runner owns carry-back now (unused by the server cut). */
147
- carryBackRetry?: unknown;
148
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
149
  beforeAbort?: (runId: string) => Promise<void> | void;
150
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
151
  * process is launched, so a test can hold a reopen there. */
152
152
  beforeReopenLaunch?: (runId: string) => Promise<void> | void;
153
- /** A test's seam: awaited where a raise that opens a let-go workflow pins what its launch needs, after its place is
154
- * taken (runs.ts finishRaise); one that throws stands for a pin that fails there. */
155
- beforeRaiseLaunch?: (runId: string) => Promise<void> | void;
156
153
  /** A test's seam: the host's memory, in bytes, that the runs' limit reads (host.ts), in place of this host's. */
157
154
  hostMemory?: number;
158
- /** A test's seam: told each stat and each read of a workflow run's pause by its watch (runs.ts watchPause). */
159
- onPauseCheck?: (runId: string, what: "stat" | "read") => void;
160
- /** A test's seam: awaited by a message before it goes to the run's door, so a test can act while it is in flight. */
161
- beforeSubmit?: (runId: string, content: string) => Promise<void> | void;
162
155
  /** A test's seam: told each run read in from its store (runs.ts onRunLoad). */
163
156
  onRunLoad?: (runId: string) => void;
164
- /** A test's seam: awaited before a run's serve.json is written (runs.ts beforeMetaSave). */
165
- beforeMetaSave?: (runId: string, meta: Readonly<Record<string, unknown>>) => Promise<void> | void;
166
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
167
158
  * carries it), so a test sends a server-written message down the path a person's message takes. */
168
159
  messageOrigin?: (runId: string, content: string) => MessageOrigin | undefined;
169
- /** How long a request waits for a run's door, its process coming up or a settle in progress (default 45 s). */
170
- readyTimeoutMs?: number;
171
- /** How long a launched run's process has to open its run before it is stopped and the run opened again (default 45 s,
172
- * READY_TIMEOUT_MS: the wait of a run's first message). */
173
- openTimeoutMs?: number;
174
- /** With `faux` only: the door nonce each run's process is handed in place of its launch's own, so its door answers the
175
- * launch's proof wrongly (a test of a door that fails its proof). */
176
- fauxHandedNonce?: string;
177
- /** How long a run's end-of-run turn may take before it is aborted and the run finishes without it (default 5 min). */
178
- reflectTimeoutMs?: number;
179
160
  /** The model the grader runs on (`--grade-model`; default AGENTRUN_SERVE_GRADE_MODEL, else the strong tier,
180
161
  * AGENT_MODEL_STRONG, else each run's agent's own model). */
181
162
  gradeModel?: string;
@@ -184,8 +165,8 @@ export type ServeOptions = {
184
165
  * its agent's definition says, and its `learning` is null. */
185
166
  learning?: LearningMode;
186
167
  /** How much of what a run learned its instructions hold under `# Learned`, in UTF-8 bytes (`--learning-budget`;
187
- * default AGENTRUN_SERVE_LEARNING_BUDGET, else 8000): every note whole while they fit, else the index and the notes
188
- * changed last, whole, while they fit (learning.ts learnedOf). */
168
+ * default AGENTRUN_SERVE_LEARNING_BUDGET, else 8000): every note whole while they fit, else the notes that bear on
169
+ * the run's input whole and a line for each of the rest (learning.ts learnedParts, its note selector). */
189
170
  learningBudget?: number;
190
171
  /** A test's seam: the triggers' clock and timer (triggers.ts), in place of Date.now and setTimeout. */
191
172
  triggerClock?: TriggerClock;
@@ -325,14 +306,14 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
325
306
  * web tool, what it resolves to on each harness under this server's tool settings; `key`, the tool key that unlocks
326
307
  * it (tool-keys.ts), when one does. */
327
308
  tools: ({
328
- providers?: ("auto" | "native" | "parallel" | "browserbase" | "kernel" | "off" | "exa-keyless" | "chrome")[] | undefined;
309
+ providers?: ("auto" | "native" | "parallel" | "off" | "kernel" | "browserbase" | "exa-keyless" | "chrome")[] | undefined;
329
310
  provider?: string | undefined;
330
311
  default_provider?: "auto" | "kernel" | undefined;
331
312
  resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
332
313
  why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
333
- permission: "deny" | "ask" | "allow";
334
- default_permission: "deny" | "ask" | "allow";
335
- permissions: ("deny" | "ask" | "allow")[];
314
+ permission: "deny" | "allow" | "ask";
315
+ default_permission: "deny" | "allow" | "ask";
316
+ permissions: ("deny" | "allow" | "ask")[];
336
317
  harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
337
318
  missing?: string[] | undefined;
338
319
  reason?: string | undefined;
@@ -346,14 +327,14 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
346
327
  summary: string;
347
328
  } | {
348
329
  key: string | undefined;
349
- providers?: ("auto" | "native" | "parallel" | "browserbase" | "kernel" | "off" | "exa-keyless" | "chrome")[] | undefined;
330
+ providers?: ("auto" | "native" | "parallel" | "off" | "kernel" | "browserbase" | "exa-keyless" | "chrome")[] | undefined;
350
331
  provider?: string | undefined;
351
332
  default_provider?: "auto" | "kernel" | undefined;
352
333
  resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
353
334
  why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
354
- permission: "deny" | "ask" | "allow";
355
- default_permission: "deny" | "ask" | "allow";
356
- permissions: ("deny" | "ask" | "allow")[];
335
+ permission: "deny" | "allow" | "ask";
336
+ default_permission: "deny" | "allow" | "ask";
337
+ permissions: ("deny" | "allow" | "ask")[];
357
338
  harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
358
339
  missing?: string[] | undefined;
359
340
  reason?: string | undefined;
@@ -460,13 +441,13 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
460
441
  take_over: boolean;
461
442
  ask: boolean;
462
443
  };
463
- /** An agent's browser stays signed in between its runs (sign-ins.ts): with a seal key to keep each pointer under, and a
464
- * browser vendor here (Browserbase's or Kernel's; local Chrome keeps none). */
444
+ /** An agent's browser stays signed in between its runs (sign-ins-store.ts), each pointer sealed under the server's seal
445
+ * key: with a browser vendor here (Browserbase's or Kernel's; local Chrome keeps none). */
465
446
  sign_ins: boolean;
466
447
  vault: boolean;
467
448
  query: boolean;
468
- /** GET, PUT and DELETE /settings/tool-keys: a tool's key saved by name, kept sealed under the launcher's seal key
469
- * (tool-keys.ts); with none handed over, nothing is kept, never in the clear. */
449
+ /** GET, PUT and DELETE /settings/tool-keys: a tool's key saved by name, kept sealed under the server's seal key
450
+ * (tool-keys-store.ts), never in the clear. */
470
451
  tool_keys: {
471
452
  routes: boolean;
472
453
  at_rest: string;
@@ -482,7 +463,7 @@ export declare function readingOf(base: NodeJS.ProcessEnv, maxRuns: number, stor
482
463
  /** This server's learning switch (`--learning`): on, a run learns when its agent says `learning: true`; off, none does. */
483
464
  learning: "on" | "off";
484
465
  /** /settings/webhook: one URL POSTed, signed by the Standard Webhooks spec, when a run needs its person and when it
485
- * ends (webhooks.ts); its secret kept sealed under the same seal key, so with none no webhook is set. */
466
+ * ends (webhooks.ts); its secret kept sealed under the same seal key. */
486
467
  webhooks: {
487
468
  routes: boolean;
488
469
  events: ("run.needs_input" | "run.ended" | "trigger.failed")[];
@@ -583,14 +564,14 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
583
564
  * web tool, what it resolves to on each harness under this server's tool settings; `key`, the tool key that unlocks
584
565
  * it (tool-keys.ts), when one does. */
585
566
  tools: ({
586
- providers?: ("auto" | "native" | "parallel" | "browserbase" | "kernel" | "off" | "exa-keyless" | "chrome")[] | undefined;
567
+ providers?: ("auto" | "native" | "parallel" | "off" | "kernel" | "browserbase" | "exa-keyless" | "chrome")[] | undefined;
587
568
  provider?: string | undefined;
588
569
  default_provider?: "auto" | "kernel" | undefined;
589
570
  resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
590
571
  why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
591
- permission: "deny" | "ask" | "allow";
592
- default_permission: "deny" | "ask" | "allow";
593
- permissions: ("deny" | "ask" | "allow")[];
572
+ permission: "deny" | "allow" | "ask";
573
+ default_permission: "deny" | "allow" | "ask";
574
+ permissions: ("deny" | "allow" | "ask")[];
594
575
  harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
595
576
  missing?: string[] | undefined;
596
577
  reason?: string | undefined;
@@ -604,14 +585,14 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
604
585
  summary: string;
605
586
  } | {
606
587
  key: string | undefined;
607
- providers?: ("auto" | "native" | "parallel" | "browserbase" | "kernel" | "off" | "exa-keyless" | "chrome")[] | undefined;
588
+ providers?: ("auto" | "native" | "parallel" | "off" | "kernel" | "browserbase" | "exa-keyless" | "chrome")[] | undefined;
608
589
  provider?: string | undefined;
609
590
  default_provider?: "auto" | "kernel" | undefined;
610
591
  resolves?: Record<"opencode" | "codex" | "pi" | "claude-agent", import("./tool-plane.js").Resolution> | undefined;
611
592
  why?: Record<"opencode" | "codex" | "pi" | "claude-agent", string> | undefined;
612
- permission: "deny" | "ask" | "allow";
613
- default_permission: "deny" | "ask" | "allow";
614
- permissions: ("deny" | "ask" | "allow")[];
593
+ permission: "deny" | "allow" | "ask";
594
+ default_permission: "deny" | "allow" | "ask";
595
+ permissions: ("deny" | "allow" | "ask")[];
615
596
  harnesses: ("opencode" | "codex" | "pi" | "claude-agent")[];
616
597
  missing?: string[] | undefined;
617
598
  reason?: string | undefined;
@@ -718,13 +699,13 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
718
699
  take_over: boolean;
719
700
  ask: boolean;
720
701
  };
721
- /** An agent's browser stays signed in between its runs (sign-ins.ts): with a seal key to keep each pointer under, and a
722
- * browser vendor here (Browserbase's or Kernel's; local Chrome keeps none). */
702
+ /** An agent's browser stays signed in between its runs (sign-ins-store.ts), each pointer sealed under the server's seal
703
+ * key: with a browser vendor here (Browserbase's or Kernel's; local Chrome keeps none). */
723
704
  sign_ins: boolean;
724
705
  vault: boolean;
725
706
  query: boolean;
726
- /** GET, PUT and DELETE /settings/tool-keys: a tool's key saved by name, kept sealed under the launcher's seal key
727
- * (tool-keys.ts); with none handed over, nothing is kept, never in the clear. */
707
+ /** GET, PUT and DELETE /settings/tool-keys: a tool's key saved by name, kept sealed under the server's seal key
708
+ * (tool-keys-store.ts), never in the clear. */
728
709
  tool_keys: {
729
710
  routes: boolean;
730
711
  at_rest: string;
@@ -740,7 +721,7 @@ export declare function capabilities(env?: NodeJS.ProcessEnv, maxRuns?: number,
740
721
  /** This server's learning switch (`--learning`): on, a run learns when its agent says `learning: true`; off, none does. */
741
722
  learning: "on" | "off";
742
723
  /** /settings/webhook: one URL POSTed, signed by the Standard Webhooks spec, when a run needs its person and when it
743
- * ends (webhooks.ts); its secret kept sealed under the same seal key, so with none no webhook is set. */
724
+ * ends (webhooks.ts); its secret kept sealed under the same seal key. */
744
725
  webhooks: {
745
726
  routes: boolean;
746
727
  events: ("run.needs_input" | "run.ended" | "trigger.failed")[];