@parcha/agentrun-serve 0.1.0-beta.58 → 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 (474) hide show
  1. package/CHANGELOG.md +402 -1
  2. package/README.md +516 -190
  3. package/dist/acp-package.d.ts +5 -1
  4. package/dist/acp-package.js +19 -2
  5. package/dist/adapters.d.ts +23 -2
  6. package/dist/adapters.js +106 -33
  7. package/dist/agent-delete.d.ts +6 -9
  8. package/dist/agent-delete.js +5 -3
  9. package/dist/agent-package.js +11 -1
  10. package/dist/agents-store.js +1 -1
  11. package/dist/answer-text.d.ts +3 -0
  12. package/dist/answer-text.js +22 -0
  13. package/dist/api-only.d.ts +2 -2
  14. package/dist/api-only.js +3 -3
  15. package/dist/archil-routes.d.ts +4 -1
  16. package/dist/archil-routes.js +15 -12
  17. package/dist/archil-settings.d.ts +18 -8
  18. package/dist/archil-settings.js +35 -17
  19. package/dist/attach-conformance.js +5 -4
  20. package/dist/box-paths.d.ts +3 -2
  21. package/dist/box-paths.js +5 -4
  22. package/dist/browser-computer.d.ts +3 -8
  23. package/dist/browser-computer.js +12 -35
  24. package/dist/browser-cost.js +94 -20
  25. package/dist/capacity.d.ts +1 -1
  26. package/dist/capacity.js +3 -3
  27. package/dist/chatgpt-plan.d.ts +7 -0
  28. package/dist/chatgpt-plan.js +35 -11
  29. package/dist/claude-login-token.d.ts +20 -11
  30. package/dist/claude-login-token.js +175 -107
  31. package/dist/claude-login.d.ts +124 -33
  32. package/dist/claude-login.js +562 -85
  33. package/dist/claude-sign-in.d.ts +3 -0
  34. package/dist/claude-sign-in.js +10 -1
  35. package/dist/cli-learning/connections.js +1 -1
  36. package/dist/cli.js +323 -292
  37. package/dist/composio-made.d.ts +1 -6
  38. package/dist/composio-made.js +1 -6
  39. package/dist/composio-owners.d.ts +26 -0
  40. package/dist/composio-owners.js +36 -0
  41. package/dist/composio-preset.d.ts +56 -23
  42. package/dist/composio-preset.js +173 -77
  43. package/dist/composio-triggers.d.ts +4 -4
  44. package/dist/composio-triggers.js +6 -7
  45. package/dist/compute-cost.js +11 -2
  46. package/dist/computer-attach.d.ts +6 -3
  47. package/dist/computer-attach.js +41 -29
  48. package/dist/computer-held-routes.d.ts +1 -1
  49. package/dist/computer-held-routes.js +9 -4
  50. package/dist/computer-keys.d.ts +11 -1
  51. package/dist/computer-keys.js +26 -1
  52. package/dist/computer-record.js +3 -1
  53. package/dist/computer-view.d.ts +5 -3
  54. package/dist/computer-view.js +10 -6
  55. package/dist/computer-viewer.js +36 -7
  56. package/dist/computers.d.ts +2 -1
  57. package/dist/computers.js +6 -3
  58. package/dist/console/THIRD-PARTY-NOTICES.txt +50 -0
  59. package/dist/console/assets/backend-QnwGVBeU.js +166 -0
  60. package/dist/console/assets/index-DZi-muIj.js +629 -0
  61. package/dist/console/assets/share-pz61zIn9.js +6 -0
  62. package/dist/console/assets/styles-CcceGcu2.js +291 -0
  63. package/dist/console/assets/styles-fjQBFfMv.css +1 -0
  64. package/dist/console/index.html +4 -3
  65. package/dist/console/share.html +17 -0
  66. package/dist/decisions.d.ts +17 -7
  67. package/dist/decisions.js +41 -15
  68. package/dist/dial-relay.js +10 -4
  69. package/dist/docker-daemon.js +4 -5
  70. package/dist/docker-host-addresses.js +29 -11
  71. package/dist/email/account.d.ts +6 -0
  72. package/dist/email/account.js +6 -0
  73. package/dist/email/authentication.d.ts +21 -0
  74. package/dist/email/authentication.js +106 -0
  75. package/dist/email/email-faux.d.ts +11 -2
  76. package/dist/email/email-faux.js +21 -5
  77. package/dist/email/mail.d.ts +25 -0
  78. package/dist/email/mail.js +58 -2
  79. package/dist/email/names.js +2 -2
  80. package/dist/email/tools.d.ts +9 -4
  81. package/dist/email/tools.js +95 -13
  82. package/dist/env-switch.d.ts +12 -2
  83. package/dist/env-switch.js +23 -3
  84. package/dist/errors.d.ts +1 -0
  85. package/dist/errors.js +2 -0
  86. package/dist/factory-activity.d.ts +68 -0
  87. package/dist/factory-activity.js +153 -0
  88. package/dist/factory-runs.d.ts +11 -0
  89. package/dist/factory-runs.js +52 -0
  90. package/dist/fal-price.d.ts +11 -1
  91. package/dist/fal-price.js +33 -0
  92. package/dist/faux-computers.js +1 -1
  93. package/dist/filed-answer.d.ts +2 -2
  94. package/dist/filed-answer.js +2 -2
  95. package/dist/filed-tool.d.ts +32 -0
  96. package/dist/filed-tool.js +122 -0
  97. package/dist/graph-served.d.ts +10 -5
  98. package/dist/graph-served.js +40 -10
  99. package/dist/handed-values.js +1 -2
  100. package/dist/harness-check.d.ts +2 -1
  101. package/dist/harness-check.js +45 -12
  102. package/dist/harness-keys.d.ts +1 -2
  103. package/dist/harness-keys.js +10 -8
  104. package/dist/harness-opencode/facts.js +2 -0
  105. package/dist/harness-recipe-entry.d.ts +9 -3
  106. package/dist/harness-recipe-entry.js +18 -9
  107. package/dist/harness-recipe.d.ts +21 -0
  108. package/dist/harness-recipe.js +25 -3
  109. package/dist/harness-table.d.ts +12 -0
  110. package/dist/harness-table.js +21 -6
  111. package/dist/harness.js +6 -2
  112. package/dist/helper-env.d.ts +4 -1
  113. package/dist/helper-env.js +4 -1
  114. package/dist/host-check.d.ts +2 -3
  115. package/dist/host-check.js +13 -7
  116. package/dist/hosted-search.js +1 -1
  117. package/dist/import-worker.js +2 -2
  118. package/dist/import.d.ts +20 -8
  119. package/dist/import.js +448 -187
  120. package/dist/key-refusal.d.ts +14 -2
  121. package/dist/key-refusal.js +97 -33
  122. package/dist/learn/audit.d.ts +28 -27
  123. package/dist/learn/audit.js +87 -62
  124. package/dist/learn/check.js +1 -1
  125. package/dist/learn/commit.d.ts +35 -43
  126. package/dist/learn/commit.js +62 -270
  127. package/dist/learn/compile.d.ts +9 -6
  128. package/dist/learn/compile.js +51 -28
  129. package/dist/learn/corrections.js +1 -1
  130. package/dist/learn/delete.d.ts +5 -12
  131. package/dist/learn/delete.js +17 -30
  132. package/dist/learn/field-check.d.ts +111 -0
  133. package/dist/learn/field-check.js +174 -0
  134. package/dist/learn/forget-run.d.ts +16 -0
  135. package/dist/learn/forget-run.js +53 -0
  136. package/dist/learn/index.js +1 -1
  137. package/dist/learn/learning-of.d.ts +0 -4
  138. package/dist/learn/learning-of.js +0 -5
  139. package/dist/learn/ledger.d.ts +32 -29
  140. package/dist/learn/ledger.js +26 -19
  141. package/dist/learn/{folder.d.ts → legacy/folder.d.ts} +2 -1
  142. package/dist/learn/{folder.js → legacy/folder.js} +4 -7
  143. package/dist/learn/legacy/place.d.ts +16 -0
  144. package/dist/{workspace/learning-workspace.js → learn/legacy/place.js} +12 -42
  145. package/dist/learn/legacy/scrub.d.ts +28 -0
  146. package/dist/learn/legacy/scrub.js +258 -0
  147. package/dist/learn/promote.d.ts +119 -102
  148. package/dist/learn/promote.js +119 -262
  149. package/dist/learn/reset-ledger.d.ts +18 -0
  150. package/dist/learn/reset-ledger.js +14 -0
  151. package/dist/learn/rows.d.ts +186 -0
  152. package/dist/learn/rows.js +376 -0
  153. package/dist/learn/secrets.d.ts +4 -0
  154. package/dist/learn/secrets.js +12 -0
  155. package/dist/learn/workflow-draft.d.ts +4 -1
  156. package/dist/learn/workflow-draft.js +12 -2
  157. package/dist/learned-nodes.d.ts +8 -5
  158. package/dist/learned-nodes.js +8 -5
  159. package/dist/learned-workflow.d.ts +2 -1
  160. package/dist/learned-workflow.js +13 -10
  161. package/dist/learning-cost.d.ts +25 -8
  162. package/dist/learning-cost.js +23 -8
  163. package/dist/learning-reset.d.ts +1 -1
  164. package/dist/learning-reset.js +9 -11
  165. package/dist/learning-routes.d.ts +60 -81
  166. package/dist/learning-routes.js +187 -360
  167. package/dist/learning-setting.d.ts +6 -0
  168. package/dist/learning-setting.js +11 -1
  169. package/dist/learning-words.d.ts +2 -0
  170. package/dist/learning-words.js +2 -0
  171. package/dist/learning.d.ts +18 -24
  172. package/dist/learning.js +35 -66
  173. package/dist/listen-first.d.ts +5 -4
  174. package/dist/listen-first.js +4 -5
  175. package/dist/live-reach.d.ts +7 -0
  176. package/dist/live-reach.js +7 -0
  177. package/dist/mcp-api-only-origins.d.ts +15 -0
  178. package/dist/mcp-api-only-origins.js +40 -0
  179. package/dist/mcp-gateway.d.ts +22 -2
  180. package/dist/mcp-gateway.js +85 -11
  181. package/dist/mcp-oauth.d.ts +1 -1
  182. package/dist/mcp-oauth.js +3 -2
  183. package/dist/mcp-probe.d.ts +3 -0
  184. package/dist/mcp-probe.js +3 -0
  185. package/dist/mcp-resources.d.ts +1 -1
  186. package/dist/mcp-secret-writes.d.ts +24 -2
  187. package/dist/mcp-secret-writes.js +30 -2
  188. package/dist/mcp-servers-store.d.ts +52 -14
  189. package/dist/mcp-servers-store.js +165 -61
  190. package/dist/mcp-sources.d.ts +1 -2
  191. package/dist/mcp-sources.js +1 -2
  192. package/dist/mcp-store.d.ts +5 -5
  193. package/dist/mcp-store.js +3 -3
  194. package/dist/mcp.js +1 -1
  195. package/dist/model-gateway.d.ts +1 -1
  196. package/dist/model-gateway.js +20 -36
  197. package/dist/native/discovery.d.ts +6 -0
  198. package/dist/native/discovery.js +14 -1
  199. package/dist/native/remote.d.ts +5 -0
  200. package/dist/native/remote.js +16 -0
  201. package/dist/native/runtime.js +3 -2
  202. package/dist/observation/observer.d.ts +6 -6
  203. package/dist/ollama-provider.d.ts +23 -9
  204. package/dist/ollama-provider.js +49 -20
  205. package/dist/openapi.js +290 -79
  206. package/dist/otel/genai.d.ts +83 -7
  207. package/dist/otel/genai.js +69 -9
  208. package/dist/otel/tracer.d.ts +42 -13
  209. package/dist/otel/tracer.js +241 -56
  210. package/dist/page.d.ts +7 -1
  211. package/dist/page.js +76 -22
  212. package/dist/paid-calls.d.ts +6 -4
  213. package/dist/paid-calls.js +15 -7
  214. package/dist/place-offers.d.ts +58 -34
  215. package/dist/place-offers.js +96 -54
  216. package/dist/place.d.ts +41 -20
  217. package/dist/place.js +97 -47
  218. package/dist/print.js +1 -1
  219. package/dist/provider.d.ts +3 -2
  220. package/dist/provider.js +17 -8
  221. package/dist/purged-workflow.d.ts +0 -33
  222. package/dist/purged-workflow.js +3 -71
  223. package/dist/redact/match.d.ts +42 -9
  224. package/dist/redact/match.js +356 -54
  225. package/dist/run-census.d.ts +1 -1
  226. package/dist/run-census.js +4 -5
  227. package/dist/run-cut.js +4 -5
  228. package/dist/run-export-store.d.ts +15 -0
  229. package/dist/run-export-store.js +30 -0
  230. package/dist/run-export.d.ts +139 -0
  231. package/dist/run-export.js +379 -0
  232. package/dist/run-file-cut.d.ts +5 -0
  233. package/dist/run-file-cut.js +13 -0
  234. package/dist/run-launch.d.ts +3 -3
  235. package/dist/run-launch.js +16 -3
  236. package/dist/run-learning-served.d.ts +3 -3
  237. package/dist/run-learning-served.js +1 -1
  238. package/dist/run-listing.d.ts +1 -1
  239. package/dist/run-model-key.d.ts +15 -6
  240. package/dist/run-model-key.js +30 -31
  241. package/dist/run-reads-over-store.js +4 -4
  242. package/dist/run-secrets.js +3 -5
  243. package/dist/run-timeline-served.d.ts +1 -1
  244. package/dist/run-timeline-served.js +8 -5
  245. package/dist/runnable.js +26 -9
  246. package/dist/runner/adapter-loop.d.ts +35 -18
  247. package/dist/runner/adapter-loop.js +94 -47
  248. package/dist/runner/adapter-run-spec.d.ts +14 -1
  249. package/dist/runner/adapter-run-spec.js +73 -46
  250. package/dist/runner/adapters/pi.js +4 -2
  251. package/dist/runner/audit.d.ts +10 -9
  252. package/dist/runner/audit.js +64 -67
  253. package/dist/runner/beside.js +5 -6
  254. package/dist/runner/claim-secrets.d.ts +10 -3
  255. package/dist/runner/claim-secrets.js +29 -13
  256. package/dist/runner/cli-run-spec.d.ts +18 -0
  257. package/dist/runner/cli-run-spec.js +87 -58
  258. package/dist/runner/compare-end.d.ts +2 -3
  259. package/dist/runner/compare-end.js +30 -11
  260. package/dist/runner/conformance/harness.js +2 -3
  261. package/dist/runner/conformance/subject.d.ts +4 -1
  262. package/dist/runner/disk-free.d.ts +15 -4
  263. package/dist/runner/disk-free.js +25 -7
  264. package/dist/runner/feedback-round.d.ts +1 -1
  265. package/dist/runner/feedback-round.js +2 -2
  266. package/dist/runner/harness-loops.js +3 -4
  267. package/dist/runner/held.d.ts +5 -12
  268. package/dist/runner/held.js +0 -25
  269. package/dist/runner/journal-kinds.d.ts +8 -2
  270. package/dist/runner/journal-kinds.js +23 -5
  271. package/dist/runner/learned-first.d.ts +0 -2
  272. package/dist/runner/learned-first.js +23 -7
  273. package/dist/runner/learning-end.d.ts +14 -24
  274. package/dist/runner/learning-end.js +52 -94
  275. package/dist/runner/learning-seed.d.ts +13 -16
  276. package/dist/runner/learning-seed.js +13 -23
  277. package/dist/runner/live-ticker.js +7 -5
  278. package/dist/runner/loop-contract.d.ts +0 -2
  279. package/dist/runner/loop.d.ts +7 -0
  280. package/dist/runner/loop.js +1 -0
  281. package/dist/runner/main.js +13 -12
  282. package/dist/runner/mcp-claim.js +21 -5
  283. package/dist/runner/mcp-run.d.ts +4 -0
  284. package/dist/runner/mcp-run.js +2 -0
  285. package/dist/runner/meta-tools.js +3 -2
  286. package/dist/runner/metrics.d.ts +7 -0
  287. package/dist/runner/metrics.js +19 -0
  288. package/dist/runner/model-route.d.ts +10 -7
  289. package/dist/runner/model-route.js +79 -15
  290. package/dist/runner/native-loop.js +12 -11
  291. package/dist/runner/presence.d.ts +1 -4
  292. package/dist/runner/presence.js +6 -8
  293. package/dist/runner/promotion.d.ts +39 -36
  294. package/dist/runner/promotion.js +168 -112
  295. package/dist/runner/redact.d.ts +3 -1
  296. package/dist/runner/redact.js +5 -3
  297. package/dist/runner/reflect-hook.d.ts +2 -2
  298. package/dist/runner/reflect-hook.js +4 -1
  299. package/dist/runner/responses-fetch.d.ts +36 -0
  300. package/dist/runner/responses-fetch.js +511 -0
  301. package/dist/runner/run-child-host.d.ts +21 -14
  302. package/dist/runner/run-child-host.js +187 -141
  303. package/dist/runner/run-child.js +11 -4
  304. package/dist/runner/runner-check.js +5 -1
  305. package/dist/runner/runner.d.ts +3 -4
  306. package/dist/runner/runner.js +13 -9
  307. package/dist/runner/sdk-loop.js +10 -12
  308. package/dist/runner/spec-holds.d.ts +8 -1
  309. package/dist/runner/spec-holds.js +9 -4
  310. package/dist/runner/workflow-calls.d.ts +9 -0
  311. package/dist/runner/workflow-calls.js +150 -0
  312. package/dist/runner/workflow-first.d.ts +120 -32
  313. package/dist/runner/workflow-first.js +218 -94
  314. package/dist/runner/workflow-spec.js +1 -1
  315. package/dist/runs-over-store.js +8 -7
  316. package/dist/save-once.d.ts +14 -0
  317. package/dist/save-once.js +31 -0
  318. package/dist/scrub-command.d.ts +34 -31
  319. package/dist/scrub-command.js +116 -147
  320. package/dist/sdk/check.d.ts +1 -4
  321. package/dist/sdk/check.js +2 -3
  322. package/dist/sdk/runs.d.ts +26 -7
  323. package/dist/sdk/runs.js +194 -78
  324. package/dist/seal-key.js +4 -4
  325. package/dist/secret-cut.d.ts +3 -0
  326. package/dist/secret-cut.js +7 -1
  327. package/dist/secret-rules.d.ts +8 -1
  328. package/dist/secret-rules.js +482 -53
  329. package/dist/secrets.d.ts +55 -9
  330. package/dist/secrets.js +345 -21
  331. package/dist/server-fs.d.ts +1 -1
  332. package/dist/server-fs.js +1 -1
  333. package/dist/server-keys.d.ts +10 -3
  334. package/dist/server-keys.js +16 -3
  335. package/dist/server-secrets-store.js +2 -4
  336. package/dist/server.d.ts +30 -18
  337. package/dist/server.js +520 -238
  338. package/dist/share-context.d.ts +22 -0
  339. package/dist/share-context.js +76 -0
  340. package/dist/shell-lex.d.ts +105 -0
  341. package/dist/shell-lex.js +646 -0
  342. package/dist/sign-ins-store.d.ts +5 -7
  343. package/dist/sign-ins-store.js +12 -16
  344. package/dist/sign-ins.d.ts +7 -11
  345. package/dist/sign-ins.js +40 -41
  346. package/dist/skills/agentrun-serve/SKILL.md +5 -2
  347. package/dist/source-sync/auxiliary.js +2 -2
  348. package/dist/start-switches.d.ts +6 -5
  349. package/dist/start-switches.js +8 -4
  350. package/dist/stats.d.ts +5 -1
  351. package/dist/stats.js +1 -1
  352. package/dist/store/agent-body.js +2 -2
  353. package/dist/store/dialect.d.ts +4 -0
  354. package/dist/store/dialect.js +1 -0
  355. package/dist/store/index.d.ts +2 -2
  356. package/dist/store/index.js +1 -1
  357. package/dist/store/mcp-record-keys.d.ts +10 -0
  358. package/dist/store/mcp-record-keys.js +13 -0
  359. package/dist/store/postgres/dialect.js +2 -0
  360. package/dist/store/postgres/migrations/0029_run_launch_census_settle.sql +28 -0
  361. package/dist/store/postgres/migrations/0030_learning_ledger_epoch.sql +40 -0
  362. package/dist/store/postgres/migrations/0031_learning_ledger_calls.sql +12 -0
  363. package/dist/store/postgres/migrations/0032_learning_rows.sql +65 -0
  364. package/dist/store/postgres/store.js +4 -0
  365. package/dist/store/schema.d.ts +60 -11
  366. package/dist/store/schema.js +147 -17
  367. package/dist/store/seal.d.ts +4 -1
  368. package/dist/store/sqlite/learning-rows.d.ts +23 -0
  369. package/dist/store/sqlite/learning-rows.js +559 -0
  370. package/dist/store/sqlite/run-launch.d.ts +3 -10
  371. package/dist/store/sqlite/run-launch.js +12 -23
  372. package/dist/store/sqlite/run-patch.d.ts +17 -10
  373. package/dist/store/sqlite/run-patch.js +50 -13
  374. package/dist/store/sqlite/store.d.ts +9 -0
  375. package/dist/store/sqlite/store.js +194 -46
  376. package/dist/store/store-schema.js +3 -4
  377. package/dist/store/store.d.ts +286 -38
  378. package/dist/store/store.js +27 -11
  379. package/dist/store-reads/analytics.d.ts +2 -1
  380. package/dist/store-reads/analytics.js +7 -5
  381. package/dist/store-reads/journal.d.ts +33 -3
  382. package/dist/store-reads/journal.js +99 -4
  383. package/dist/store-reads/learning.d.ts +50 -45
  384. package/dist/store-reads/learning.js +153 -116
  385. package/dist/store-reads/loop.js +1 -1
  386. package/dist/store-reads/stats.d.ts +2 -2
  387. package/dist/store-reads/stats.js +13 -7
  388. package/dist/store-view.d.ts +24 -2
  389. package/dist/store-view.js +49 -17
  390. package/dist/suggestions.d.ts +1 -1
  391. package/dist/suggestions.js +29 -13
  392. package/dist/template-eval.d.ts +72 -9
  393. package/dist/template-eval.js +358 -64
  394. package/dist/templates.d.ts +10 -2
  395. package/dist/templates.js +31 -4
  396. package/dist/timeline/labels.d.ts +1 -1
  397. package/dist/timeline/labels.js +4 -3
  398. package/dist/timeline/timeline.d.ts +23 -11
  399. package/dist/timeline/timeline.js +115 -31
  400. package/dist/timeline/web-calls.d.ts +8 -6
  401. package/dist/timeline/web-calls.js +10 -6
  402. package/dist/tool-gate.d.ts +13 -1
  403. package/dist/tool-gate.js +43 -3
  404. package/dist/tool-keys-store.js +2 -4
  405. package/dist/tool-keys.d.ts +11 -0
  406. package/dist/tool-keys.js +16 -0
  407. package/dist/tool-plane.d.ts +54 -13
  408. package/dist/tool-plane.js +103 -32
  409. package/dist/tools.d.ts +5 -1
  410. package/dist/tools.js +7 -7
  411. package/dist/trigger-email.js +12 -6
  412. package/dist/triggers.d.ts +15 -34
  413. package/dist/triggers.js +119 -126
  414. package/dist/validate.d.ts +8 -1
  415. package/dist/validate.js +163 -23
  416. package/dist/web-fake.d.ts +2 -1
  417. package/dist/web-fake.js +8 -6
  418. package/dist/web-fetch.d.ts +8 -6
  419. package/dist/web-fetch.js +13 -11
  420. package/dist/web-holds.d.ts +34 -0
  421. package/dist/web-holds.js +89 -0
  422. package/dist/web-run.d.ts +32 -5
  423. package/dist/web-run.js +76 -28
  424. package/dist/web-save.js +23 -12
  425. package/dist/web-search.js +14 -25
  426. package/dist/wires.d.ts +4 -3
  427. package/dist/wires.js +5 -4
  428. package/dist/workspace/archil-claim.d.ts +12 -5
  429. package/dist/workspace/archil-claim.js +45 -5
  430. package/dist/workspace/archil-exec.js +1 -1
  431. package/dist/workspace/archil.d.ts +1 -1
  432. package/dist/workspace/archil.js +1 -1
  433. package/dist/workspace/attach.js +52 -19
  434. package/dist/workspace/attached-computers.d.ts +6 -2
  435. package/dist/workspace/attached-computers.js +5 -4
  436. package/dist/workspace/computer-deps.d.ts +23 -6
  437. package/dist/workspace/computer-deps.js +38 -18
  438. package/dist/workspace/computer-for-claim.d.ts +21 -4
  439. package/dist/workspace/computer-for-claim.js +160 -54
  440. package/dist/workspace/computer-intervals.d.ts +2 -0
  441. package/dist/workspace/computer-intervals.js +1 -1
  442. package/dist/workspace/computer-janitor.d.ts +48 -14
  443. package/dist/workspace/computer-janitor.js +153 -44
  444. package/dist/workspace/computer-kept.d.ts +158 -32
  445. package/dist/workspace/computer-kept.js +288 -63
  446. package/dist/workspace/computer-providers.d.ts +19 -4
  447. package/dist/workspace/computer-providers.js +40 -6
  448. package/dist/workspace/index.d.ts +2 -3
  449. package/dist/workspace/index.js +2 -3
  450. package/dist/workspace/local.js +41 -1
  451. package/dist/workspace/mount-revoke-left.d.ts +31 -0
  452. package/dist/workspace/mount-revoke-left.js +72 -0
  453. package/dist/workspace/paired-route.js +4 -5
  454. package/dist/workspace/paths.d.ts +0 -4
  455. package/dist/workspace/paths.js +0 -6
  456. package/dist/workspace/resolve-computer.d.ts +5 -2
  457. package/dist/workspace/resolve-computer.js +9 -3
  458. package/dist/workspace/run-end-computers.d.ts +11 -5
  459. package/dist/workspace/run-end-computers.js +153 -28
  460. package/dist/workspace/run-tools.d.ts +22 -3
  461. package/dist/workspace/run-tools.js +17 -5
  462. package/dist/workspace/run-workspace.d.ts +14 -1
  463. package/dist/workspace/run-workspace.js +34 -1
  464. package/dist/workspace/workspace.d.ts +7 -1
  465. package/dist/workspace/workspace.js +1 -1
  466. package/package.json +13 -14
  467. package/skills/agentrun-serve/SKILL.md +5 -2
  468. package/templates/README.md +22 -6
  469. package/templates/TOOLS.md +46 -0
  470. package/dist/console/assets/backend-CSAWUqtZ.js +0 -166
  471. package/dist/console/assets/index-Bwn1oTem.css +0 -1
  472. package/dist/console/assets/index-DPh29cyz.js +0 -747
  473. package/dist/workspace/learning-workspace.d.ts +0 -24
  474. /package/dist/learn/{learning.sh → legacy/learning.sh} +0 -0
@@ -10,10 +10,14 @@ import type { PendingAsk } from "./browser-person.js";
10
10
  import { type Approvals } from "./approvals.js";
11
11
  import { type KeptListing, type RunListing, type RunRow, type Store } from "./store/store.js";
12
12
  import type { RecordingView } from "./run-recordings.js";
13
+ import { type FactoryActivity, type FactoryObserved } from "./factory-activity.js";
13
14
  /** What the store-backed view needs beside the store: where its console lives, every secret it never shows (read now, so
14
15
  * one rotated is cut at once), and the agents' saved sign-ins (for the handed-pointer cut). The server passes the same it
15
16
  * passes the file path. */
16
17
  export interface ViewDeps {
18
+ /** Scoped factory lists ask for source/provenance metadata. Ordinary run reads keep their existing shape and cost.
19
+ * "kept": all of it but who observes the run now, for a listing (KeptFactory): that is read when it is listed. */
20
+ readonly factory?: boolean | "kept";
17
21
  readonly origin: string;
18
22
  readonly serverSecrets: () => string[];
19
23
  readonly signIns?: SignInReader;
@@ -27,7 +31,7 @@ export interface ViewDeps {
27
31
  * run's error names a refused key in plain words, as its Timeline's error row does. Default: this process's
28
32
  * environment (the server passes it with the keys a person saved). */
29
33
  readonly keyEnv?: () => NodeJS.ProcessEnv;
30
- /** Each learned item's status on agent `agentId`'s learning folder's main (learning-routes.ts statusesOf): what a run held
34
+ /** Each learned item's status at agent `agentId`'s newest learning save (learning-routes.ts statusesOf): what a run held
31
35
  * for its owner's OK reads as it stands there. None: as the merge wrote it. */
32
36
  readonly statuses?: (agentId: string) => Promise<ReadonlyMap<string, ItemStatus> | undefined>;
33
37
  /** Run `runId`'s screen recordings (run-recordings.ts recordingsOf), the run ended at `endedAt` (null: it has not). Only
@@ -55,6 +59,9 @@ export declare const answerOf: (timeline: readonly TimelineEvent[]) => string |
55
59
  /** The run read from the store: the row, its launch, its timeline, its agent's revision count for the version, its
56
60
  * learning end, and the sign-in cut it serves through. Undefined for an unknown run. */
57
61
  interface StoreRun {
62
+ readonly factory?: Omit<FactoryActivity, "controls" | "observation"> & {
63
+ readonly observation?: FactoryActivity["observation"];
64
+ };
58
65
  readonly native?: Record<string, unknown>;
59
66
  readonly sdk?: Record<string, unknown>;
60
67
  readonly cli_learning?: Record<string, unknown>;
@@ -134,6 +141,10 @@ interface StoreRun {
134
141
  * look-back's own end is in (poll_after_ms 1000, the timeline not final). */
135
142
  readonly lookingBack?: true;
136
143
  }
144
+ /** A runner holds the run's claim now: it is not in a final state, a runner is named on its row, and its lease has not run
145
+ * out (claimed_until >= now, the predicate the claimable query's `claimed_until < ?` is the negation of). `now` is the
146
+ * server's clock, so a test on a moved clock reads a fresh claim as live. */
147
+ export declare function liveOf(runRow: RunRow, now: number): boolean;
137
148
  /** Whether the run's turn stands on a person: a tool call asked for their approval with no answer in its journal (the
138
149
  * view's `approvals`, asksOf), or a browser or desktop hand-over neither answered in its journal nor by a hand-back row.
139
150
  * By the journal alone, never by the clock: a hand-over past its expiry still holds the turn until its expiry is written
@@ -164,7 +175,7 @@ export declare function lookingBackEnd(store: Store, stored: RunRow): Promise<Ke
164
175
  * and for an unknown run. */
165
176
  export declare function toolsUsdOverStore(store: Store, runId: string): Promise<number | null>;
166
177
  /** The start sweep's heal of run `runId` (cost-heal.ts): the same rule as its run read's (bookedCostOf, healOf), from its
167
- * row, its launch and its journal alone, so a sweep over many runs reads no timeline and no learning folder. True when
178
+ * row, its launch and its journal alone, so a sweep over many runs reads no timeline and no learning. True when
168
179
  * it wrote the booking's figure; a failed read or write throws, for the sweep to count. */
169
180
  export declare function healedOverStore(store: Store, runId: string): Promise<boolean>;
170
181
  /** GET /runs/{id}'s answer from the store, byte-identical to runs.ts's view for the same run. Undefined for an unknown run. */
@@ -182,6 +193,17 @@ export declare function summaryOfView(view: Record<string, unknown>): Record<str
182
193
  * sign-in it was handed could not be read: that read may fail only for now, and the run reads whole once it recovers);
183
194
  * and what outside the run it read (LISTING_HELD, LISTING_KEYED). Undefined for an unknown run. */
184
195
  export declare function listingOverStore(store: Store, runId: string, deps: ViewDeps): Promise<RunListing | undefined>;
196
+ /** What a listing keeps for the Agent Factory (RunListing.factory): the run's factory projection as the build's view gave
197
+ * it (`activity`: its watermark of that build's snapshot, its source, controls, last activity, GitHub work and children,
198
+ * all of which move only with a write that moves the run's mark), and who the run is observed through (`observed`), which
199
+ * a scoped list reads at each request (factory-activity.ts observationOf): a lease renewed writes nothing to the run. */
200
+ export type KeptFactory = {
201
+ readonly activity: Omit<FactoryActivity, "observation">;
202
+ readonly observed: FactoryObserved;
203
+ };
204
+ /** What `listing` keeps for the Agent Factory, cut again of the server's secrets as `listedItem` cuts its item when they
205
+ * moved since its build; undefined for a listing built before one was kept, which a scoped list builds again, once. */
206
+ export declare function keptFactory(listing: KeptListing, serverSecrets: readonly string[]): KeptFactory | undefined;
185
207
  /** Whether `listing` is cut of the server's secrets as they are now. A list builds any other again before it shows it
186
208
  * (server.ts runsPage): the run's view cuts a value whole where it holds a secret (a note's name reads [redacted]), which
187
209
  * cutting the built item again could not do. */
@@ -8,7 +8,7 @@ import { isDeepStrictEqual } from "node:util";
8
8
  import { BACKGROUND_CONTEXT } from "@earendil-works/chord/context";
9
9
  import { CAPS, isMessageRow } from "./timeline/index.js";
10
10
  import { runLink } from "./console-links.js";
11
- import { redacted, redactedAnswer, redactedOutput, withheldWhole, withoutLoopback } from "./key-refusal.js";
11
+ import { redacted, redactedAnswer, redactedOutput, redactedOutputWhole, withoutLoopback } from "./key-refusal.js";
12
12
  import { structuredAnswer } from "./answer-json.js";
13
13
  import { isObject } from "./validate.js";
14
14
  import { currentLearning, holdsForOk, learningView, LEARNING_LABEL, secretsShown, shortOf } from "./learning.js";
@@ -28,7 +28,7 @@ import { capNowOf, KINDS } from "./runner/journal-kinds.js";
28
28
  import { laidOf, pathViewOf, roundsOf, runLearningEnd, usedOnly } from "./store-reads/learning.js";
29
29
  import { inReflect, reflectRanges } from "./runner/end-of-run.js";
30
30
  import { correctionCount } from "./learn/corrections.js";
31
- import { forgetServedAnswers, isCliRecord, servedSince, runReflect, runTimeline, wholeAnswerFor, wholeAnswers, withoutFeedbackRounds } from "./store-reads/journal.js";
31
+ import { forgetServedAnswers, isCliRecord, rowCutsOnce, servedSince, runReflect, runTimeline, wholeAnswerFor, wholeAnswers, withoutFeedbackRounds } from "./store-reads/journal.js";
32
32
  import { costOfRun, readRun, runReadState } from "./store-reads/runs.js";
33
33
  import { feedbackOf, keptEndOf } from "./runner/feedback-round.js";
34
34
  import { runCutValues, runErrorWordsOf, underCut } from "./run-cut.js";
@@ -41,6 +41,7 @@ import { approvalsOf } from "./approvals.js";
41
41
  import { FINAL_STATES, stoppedByPerson } from "./store/store.js";
42
42
  import { LISTING_HELD, LISTING_KEYED } from "./store/schema.js";
43
43
  import { createHash } from "node:crypto";
44
+ import { factoryChildren, factoryGithub, factoryLastActivity, factoryObservation, factoryObserved, factorySource } from "./factory-activity.js";
44
45
  /** A run that has ended reads one of these (the old RunRow state → the v2 status: an escalation is a completion with a
45
46
  * review; a stopped run is a cancellation), as runs.ts's STATUS_OF mapped them. A running run reads its status from the
46
47
  * journal, and so does an agentic run a person stopped, which reads running (runReadState). */
@@ -94,9 +95,10 @@ export function forgetServed(store, runId) {
94
95
  }
95
96
  /** A run's answer as served: redactedAnswer's, once per answer and held value set. */
96
97
  const servedOnce = (store, runId, input, values, since) => keptOnce(store, `answer ${runId}`, input, values, since, () => redactedAnswer(input, values));
97
- /** Whether a run's input is served (store-view's `input`): only when the cut a run's words get (redactedOutput) leaves it
98
- * exactly as given, so "Run again" never sends an altered task. Read once per input and held value set. */
99
- const inputWhole = (store, runId, input, values, since) => keptOnce(store, `input ${runId}`, JSON.stringify(input), values, since, () => isDeepStrictEqual(redactedOutput(input, values), input));
98
+ /** Whether a run's input is served (store-view's `input`): only when the cut a run's words get, read whole first
99
+ * (redactedOutputWhole: a held value split across two of its fields withholds it), leaves it exactly as given, so "Run
100
+ * again" never sends an altered task. Read once per input and held value set. */
101
+ const inputWhole = (store, runId, input, values, since) => keptOnce(store, `input ${runId}`, JSON.stringify(input), values, since, () => isDeepStrictEqual(redactedOutputWhole(input, values), input));
100
102
  /** A run's whole answer as answerOfRun read it from the rows: its newest final-answer row, never the learning turn's, and
101
103
  * never an earlier turn's: a final answer row before the person's last message belongs to the turn that message
102
104
  * followed, so a follow-up whose own stop said nothing (no text block: a thinking-only stop) has no answer, null, not
@@ -152,7 +154,7 @@ function pausedOf(runRow, entries) {
152
154
  /** A runner holds the run's claim now: it is not in a final state, a runner is named on its row, and its lease has not run
153
155
  * out (claimed_until >= now, the predicate the claimable query's `claimed_until < ?` is the negation of). `now` is the
154
156
  * server's clock, so a test on a moved clock reads a fresh claim as live. */
155
- function liveOf(runRow, now) {
157
+ export function liveOf(runRow, now) {
156
158
  return !FINAL_STATES.includes(runRow.state) && runRow.runner !== null && runRow.claimedUntil !== null && runRow.claimedUntil >= now;
157
159
  }
158
160
  /** Whether the run's turn stands on a person: a tool call asked for their approval with no answer in its journal (the
@@ -192,7 +194,7 @@ async function storeRunOf(store, runId, deps) {
192
194
  await healStoredCost(store, runId, run.heal);
193
195
  if (!run?.shownEnd || !holdsForOk(run.shownEnd) || !deps.statuses)
194
196
  return run && { ...run, learningEnd: run.shownEnd, since };
195
- // What the learning end held for its owner's OK reads as it stands now on its agent's folder's main (learning.ts
197
+ // What the learning end held for its owner's OK reads as it stands now at its agent's newest save (learning.ts
196
198
  // currentLearning); its record stays as the merge wrote it.
197
199
  return { ...run, learningEnd: currentLearning(run.shownEnd, await deps.statuses(run.row.agent)), since };
198
200
  }
@@ -266,7 +268,9 @@ async function storeRunIn(store, runId, deps, cut, since) {
266
268
  // Its final answer whole (store-reads/journal.ts wholeAnswers), as main served a run's answer: a row's cut is no answer's.
267
269
  // A run that ended reads settled, and its usage row says its cost ("Cost: …"), never what it has cost so far. One
268
270
  // looking back is still going: its look-back's rows come yet.
269
- const timelineOptions = { settled: terminal && !lookingBack, ended: terminal && !lookingBack, redact: (text) => redacted(text, values), holds: (text) => withheldWhole(text, values) };
271
+ // A call's arguments, or a web call's output, split across two strings are withheld whole (TimelineOptions.holds).
272
+ // Each text cut once per held value set (rowCutsOnce): a polled view cuts only what an earlier read had not.
273
+ const timelineOptions = { settled: terminal && !lookingBack, ended: terminal && !lookingBack, ...rowCutsOnce(store, runId, cut, since) };
270
274
  // Rendered from the records read above, so its usage row and the cost's `plan` (bookedSpend over the same entries) are
271
275
  // of one read.
272
276
  const timeline = withAsks(await wholeAnswers(store, runId, context, await runTimeline(store, runId, context, timelineOptions, records), timelineOptions, wholeAnswerFor(values), since));
@@ -422,7 +426,15 @@ async function storeRunIn(store, runId, deps, cut, since) {
422
426
  const endSaidCost = endCost && !lookingBack ? endSaid !== undefined : false;
423
427
  const endUnread = !lookingBack && bookedCost !== undefined && !endCost && endSaid === null;
424
428
  const heal = lookingBack ? undefined : healOf(endCost, runRow);
425
- return { ...(cli_learning ? { cli_learning } : {}), ...(sdk ? { sdk } : {}), ...(native ? { native } : {}), row, runRow, launch, rows, version, harness, learningEnd: shownEnd, shownEnd, view, unshown, values, live, updatedAtMs, lastProgressAt, budget, paused, browserAsk, computerAsk, approvalsMode, output, ...(review ? { review } : {}), structured, decisions, model, windDown, ...(endCost ? { endCost, endSaidCost } : {}), ...(endUnread ? { endUnread } : {}), ...(heal ? { heal } : {}), ...(lookingBack ? { lookingBack: true } : {}) };
429
+ const factory = deps.factory ? {
430
+ lifecycle_version: await store.runs.changesHead(),
431
+ ...factorySource(launch, harness),
432
+ ...(deps.factory === "kept" ? {} : { observation: await factoryObservation(store, launch, live, liveRow?.updatedAt, deps.now ?? Date.now) }),
433
+ last_activity_at: factoryLastActivity(records),
434
+ github: unshown ? null : factoryGithub(launch, (text) => withoutLoopback(redacted(text, values))),
435
+ children: terminal || FINAL_STATES.includes(runRow.state) || unshown ? [] : await factoryChildren(store, runId, records, (text) => withoutLoopback(redacted(text, values))),
436
+ } : undefined;
437
+ return { ...(factory ? { factory } : {}), ...(cli_learning ? { cli_learning } : {}), ...(sdk ? { sdk } : {}), ...(native ? { native } : {}), row, runRow, launch, rows, version, harness, learningEnd: shownEnd, shownEnd, view, unshown, values, live, updatedAtMs, lastProgressAt, budget, paused, browserAsk, computerAsk, approvalsMode, output, ...(review ? { review } : {}), structured, decisions, model, windDown, ...(endCost ? { endCost, endSaidCost } : {}), ...(endUnread ? { endUnread } : {}), ...(heal ? { heal } : {}), ...(lookingBack ? { lookingBack: true } : {}) };
426
438
  }
427
439
  /** Run read `read` (a run still going, as the store holds it) as the end `ended` keeps (its state, summary and end time:
428
440
  * the end a run looking back keeps), its cost as read. */
@@ -565,7 +577,7 @@ function healOf(endCost, runRow) {
565
577
  return { epoch: runRow.epoch, endedAt: runRow.endedAt, costUsd: endCost.usd, costUpperBound };
566
578
  }
567
579
  /** The start sweep's heal of run `runId` (cost-heal.ts): the same rule as its run read's (bookedCostOf, healOf), from its
568
- * row, its launch and its journal alone, so a sweep over many runs reads no timeline and no learning folder. True when
580
+ * row, its launch and its journal alone, so a sweep over many runs reads no timeline and no learning. True when
569
581
  * it wrote the booking's figure; a failed read or write throws, for the sweep to count. */
570
582
  export async function healedOverStore(store, runId) {
571
583
  const heal = await store.snapshot(async (snapshot) => {
@@ -602,10 +614,11 @@ async function viewOfRun(store, runId, deps, run, read) {
602
614
  const finalAnswer = row.kind === "workflow" || unshown ? null : answerOf(run.rows) ?? row.summary ?? null;
603
615
  // A workflow run's output, as its end kept it; an agentic run's, its final answer's structured part when its agent has
604
616
  // an output schema and the answer's json block (answer-json.ts jsonBlockOf) meets it (storeRunOf's `structured`), else none. Served as
605
- // runs.ts serves it (servedOutput): each string in it cut of the values the run holds, its shape kept; none while the
606
- // run's sign-in can't be read back.
617
+ // runs.ts serves it (servedOutput): read whole first, so a held value split across two of its fields withholds it as
618
+ // "[redacted]" (redactedOutputWhole), else each string in it cut of the values the run holds, its shape kept; none
619
+ // while the run's sign-in can't be read back.
607
620
  const ownOutput = row.kind === "workflow" ? output : status === "completed" && structured && "value" in structured ? structured.value : null;
608
- const servedOutput = !unshown && ownOutput !== null && ownOutput !== undefined ? redactedOutput(ownOutput, values) : null;
621
+ const servedOutput = !unshown && ownOutput !== null && ownOutput !== undefined ? redactedOutputWhole(ownOutput, values) : null;
609
622
  // A run its cap ended once its cost passed it (spend_cap_reached) keeps the answer it paid for, as main kept it: the
610
623
  // response that crossed the cap was answered and billed, so its text is the run's answer, cut as it came.
611
624
  // Its answer is the newest answer row, else (a response cut at its length) the newest text it said; never the row's
@@ -646,6 +659,11 @@ async function viewOfRun(store, runId, deps, run, read) {
646
659
  const settled = terminal && ended && !run.lookingBack;
647
660
  return {
648
661
  ...(run.cli_learning && !unshown ? { cli_learning: redactedOutput(run.cli_learning, values) } : {}),
662
+ ...(run.factory ? { factory: { ...run.factory, controls: {
663
+ stop: run.factory.control === "managed" && row.kind === "agentic" && status === "working" && state === "working",
664
+ cancel: run.factory.control === "managed" && !terminal && !FINAL_STATES.includes(runRow.state),
665
+ approve: run.factory.control === "managed" && !FINAL_STATES.includes(runRow.state) && pending?.kind === "approval",
666
+ } } } : {}),
649
667
  ...(run.sdk && !unshown ? { sdk: redactedOutput(run.sdk, values) } : {}),
650
668
  ...(run.native && !unshown ? { native: redactedOutput(run.native, values) } : {}),
651
669
  run_id: row.id,
@@ -719,6 +737,7 @@ export function summaryOfView(view) {
719
737
  return {
720
738
  run_id, agent_id, agent_version, console_url, revision, kind, sha, status, state, title,
721
739
  ...(view.cli_learning ? { cli_learning: view.cli_learning } : {}),
740
+ ...(view.factory ? { factory: view.factory, ...(view.computer ? { computer: view.computer } : {}) } : {}),
722
741
  ...(view.sdk ? { sdk: view.sdk } : {}),
723
742
  ...(view.native ? { native: view.native } : {}),
724
743
  ...(effort ? { effort } : {}),
@@ -738,11 +757,12 @@ export function summaryOfView(view) {
738
757
  * and what outside the run it read (LISTING_HELD, LISTING_KEYED). Undefined for an unknown run. */
739
758
  export async function listingOverStore(store, runId, deps) {
740
759
  const cut = secretsDigest(deps.serverSecrets());
741
- const run = await storeRunOf(store, runId, deps);
760
+ // The same read gives what a scoped list shows beside the item (KeptFactory), so that list reads rows alone too.
761
+ const run = await storeRunOf(store, runId, { ...deps, factory: "kept" });
742
762
  if (!run)
743
763
  return undefined;
744
764
  const read = { withheld: false };
745
- const summary = summaryOfView(await viewOfRun(store, runId, deps, run, read));
765
+ const { factory: activity, computer: _computer, ...summary } = summaryOfView(await viewOfRun(store, runId, deps, run, read));
746
766
  const status = String(summary.status);
747
767
  const terminal = TERMINAL.has(status);
748
768
  const asks = terminal ? [] : [run.browserAsk?.expires_at, run.computerAsk?.expires_at].map((at) => (typeof at === "string" ? Date.parse(at) : Number.NaN)).filter((at) => Number.isFinite(at));
@@ -755,8 +775,18 @@ export async function listingOverStore(store, runId, deps) {
755
775
  live: run.live,
756
776
  until: expiries.length ? Math.min(...expiries) : null,
757
777
  flags,
778
+ factory: { activity, observed: factoryObserved(run.launch) },
758
779
  };
759
780
  }
781
+ /** What `listing` keeps for the Agent Factory, cut again of the server's secrets as `listedItem` cuts its item when they
782
+ * moved since its build; undefined for a listing built before one was kept, which a scoped list builds again, once. */
783
+ export function keptFactory(listing, serverSecrets) {
784
+ const kept = listing.factory;
785
+ if (!isObject(kept) || !isObject(kept.activity) || !isObject(kept.observed))
786
+ return undefined;
787
+ const { activity, observed } = kept;
788
+ return listing.cut === secretsDigest(serverSecrets) ? { activity, observed } : { activity: redactedOutput(activity, [...serverSecrets]), observed };
789
+ }
760
790
  /** Whether `listing` is cut of the server's secrets as they are now. A list builds any other again before it shows it
761
791
  * (server.ts runsPage): the run's view cuts a value whole where it holds a secret (a note's name reads [redacted]), which
762
792
  * cutting the built item again could not do. */
@@ -773,8 +803,10 @@ export function listedItem(listing, origin, archivedAt, serverSecrets) {
773
803
  const item = { ...listing.item, console_url: runLink(origin, String(listing.item.run_id)), archived_at: archivedAt === null ? null : iso(archivedAt) };
774
804
  return listing.cut === secretsDigest(serverSecrets) ? item : redactedOutput(item, [...serverSecrets]);
775
805
  }
776
- /** A set of secrets' digest, the same for the same set in any order: what a listing was cut of. */
777
- const secretsDigest = (values) => createHash("sha256").update([...new Set(values)].sort().join("\0")).digest("hex");
806
+ /** A set of secrets' digest, the same for the same set in any order: what a listing was cut of. Of the sorted values'
807
+ * JSON, which escapes a lone surrogate and a NUL as written, so no two sets share it: as UTF-8 every lone surrogate is
808
+ * the one replacement character, and values joined by a NUL read as one value that holds it. */
809
+ const secretsDigest = (values) => createHash("sha256").update(JSON.stringify([...new Set(values)].sort())).digest("hex");
778
810
  /** A run's facts as its view states them, and none of its words: its kind, revision, agent, status and times, and whether
779
811
  * its output is withheld (`unshown`). What a read that serves its own parts (the graph) needs of the run: read off the
780
812
  * run as viewOverStore reads it, with nothing of it served, so nothing is redacted here. Undefined for an unknown run. */
@@ -182,7 +182,7 @@ export type SuggestionsDeps = {
182
182
  }>;
183
183
  /** The agent made here from the imported template `id` at commit `sha`, not archived; undefined when there is none. */
184
184
  agentFrom(id: string, sha: string): Promise<string | undefined>;
185
- /** This server's public URL, which the pull request names as AGENTRUN_URL. */
185
+ /** This server's public URL: the pull request gives it, with /v2, as AGENTRUN_BASE_URL (the banner's line, print.ts). */
186
186
  readonly publicUrl?: string;
187
187
  /** Told each time a scan starts, a suggestion is discarded and a suggested agent's pull request opens: the anonymous
188
188
  * counts' `used` (telemetry.ts), which hears the event's name and nothing else. It never fails the request. */
@@ -272,7 +272,7 @@ function header(s, repo, commit, mark) {
272
272
  `wire it in at ${oneLine(s.integration.call_site.path)}:${s.integration.call_site.line}. ${oneLine(s.integration.call_site.note)}`,
273
273
  "",
274
274
  "Configure in the app's environment (never commit the key):",
275
- ...[["AGENTRUN_URL", "the AgentRun server, like https://agentrun.example.com"], ["AGENTRUN_API_KEY", "an API key of that server (make one in its console: Settings > AgentRun API keys)"], [agentVariable(s.key), "the agent's id there (the pull request that added this file names it)"]].map(([name, what], _, all) => ` ${name.padEnd(Math.max(...all.map(([n]) => n.length)) + 2)}${what}`),
275
+ ...[["AGENTRUN_BASE_URL", "the AgentRun server's API, like https://agentrun.example.com/v2 (the /v2 may be left out)"], ["AGENTRUN_API_KEY", "an API key of that server (make one in its console: Settings > AgentRun API keys)"], [agentVariable(s.key), "the agent's id there (the pull request that added this file names it)"]].map(([name, what], _, all) => ` ${name.padEnd(Math.max(...all.map(([n]) => n.length)) + 2)}${what}`),
276
276
  ];
277
277
  return lines.map((line) => (line ? `${mark} ${line}` : mark)).join("\n");
278
278
  }
@@ -306,19 +306,23 @@ const ENDED = ["completed", "failed", "cancelled", "input_required", "paused"];
306
306
  ${ts ? "" : `\n/**\n * @param {${input}} input\n * @param {{ signal?: AbortSignal, timeoutMs?: number }} [options]\n * @returns {Promise<${answer}>}\n */`}
307
307
  ${cjs ? "async function" : "export async function"} ${fn}(input${t(`: ${input}`)}, options${t(": { signal?: AbortSignal; timeoutMs?: number }")} = {})${t(`: Promise<${answer}>`)} {
308
308
  const env = (globalThis${t(" as { process?: { env: Record<string, string | undefined> } }")}).process?.env ?? {};
309
- const base = (env.AGENTRUN_URL ?? "").replace(/\\/+$/, "");
309
+ const address = (env.AGENTRUN_BASE_URL ?? "").replace(/\\/+$/, "");
310
310
  const key = env.AGENTRUN_API_KEY;
311
311
  const agent = env.${env};
312
- if (!base || !key || !agent) throw new Error("Set AGENTRUN_URL, AGENTRUN_API_KEY and ${env} to run the ${s.key} agent.");
312
+ if (!address || !key || !agent) throw new Error("Set AGENTRUN_BASE_URL, AGENTRUN_API_KEY and ${env} to run the ${s.key} agent.");
313
+ // The address with or without /v2, as AgentRun's own clients and CLI take AGENTRUN_BASE_URL.
314
+ const url = (() => { try { return new URL(address); } catch { return undefined; } })();
315
+ if (!url || !/^https?:$/.test(url.protocol)) throw new Error("AGENTRUN_BASE_URL must be an http or https URL, like https://agentrun.example.com/v2.");
316
+ const base = url.pathname.split("/").includes("v2") ? address : \`\${address}/v2\`;
313
317
  const headers = { authorization: \`Bearer \${key}\`, "content-type": "application/json" };
314
- const started = await fetch(\`\${base}/v2/agents/\${encodeURIComponent(agent)}/runs\`, { method: "POST", headers, body: JSON.stringify({ input }), signal: options.signal });
318
+ const started = await fetch(\`\${base}/agents/\${encodeURIComponent(agent)}/runs\`, { method: "POST", headers, body: JSON.stringify({ input }), signal: options.signal });
315
319
  if (!started.ok) throw new Error(\`AgentRun did not start the ${s.key} agent (HTTP \${started.status}): \${await started.text()}\`);
316
320
  let run = (await started.json())${t(" as Run")};
317
321
  const until = Date.now() + (options.timeoutMs ?? 300_000);
318
322
  while (!ENDED.includes(run.status)) {
319
323
  if (Date.now() > until) throw new Error(\`The ${s.key} agent's run \${run.run_id} did not end in time.\`);
320
324
  await new Promise((resolve) => setTimeout(resolve, 1_500));
321
- const read = await fetch(\`\${base}/v2/runs/\${encodeURIComponent(run.run_id)}\`, { headers, signal: options.signal });
325
+ const read = await fetch(\`\${base}/runs/\${encodeURIComponent(run.run_id)}\`, { headers, signal: options.signal });
322
326
  if (!read.ok) throw new Error(\`AgentRun did not read the run \${run.run_id} (HTTP \${read.status}).\`);
323
327
  run = (await read.json())${t(" as Run")};
324
328
  }
@@ -349,6 +353,7 @@ ${s.agent.output.map((f) => `# ${f.name}: ${oneLine(f.description)}`).join("\n
349
353
  import json
350
354
  import os
351
355
  import time
356
+ import urllib.parse
352
357
  import urllib.request
353
358
  from typing import Any, Dict, Optional, TypedDict
354
359
 
@@ -370,18 +375,26 @@ def run_${py}(inputs: ${input}, timeout_s: float = 300.0) -> Dict[str, Any]:
370
375
  missing = [name for name in _REQUIRED if name not in fields]
371
376
  if missing:
372
377
  raise ValueError(f"run_${py} needs {', '.join(missing)}.")
373
- base = os.environ.get("AGENTRUN_URL", "").rstrip("/")
378
+ address = os.environ.get("AGENTRUN_BASE_URL", "").rstrip("/")
374
379
  key = os.environ.get("AGENTRUN_API_KEY")
375
380
  agent = os.environ.get("${env}")
376
- if not base or not key or not agent:
377
- raise RuntimeError("Set AGENTRUN_URL, AGENTRUN_API_KEY and ${env} to run the ${s.key} agent.")
378
- run = _call("POST", f"{base}/v2/agents/{agent}/runs", key, {"input": fields})
381
+ if not address or not key or not agent:
382
+ raise RuntimeError("Set AGENTRUN_BASE_URL, AGENTRUN_API_KEY and ${env} to run the ${s.key} agent.")
383
+ # The address with or without /v2, as AgentRun's own clients and CLI take AGENTRUN_BASE_URL.
384
+ try:
385
+ url = urllib.parse.urlsplit(address)
386
+ except ValueError:
387
+ url = None
388
+ if url is None or url.scheme not in ("http", "https") or not url.netloc:
389
+ raise RuntimeError("AGENTRUN_BASE_URL must be an http or https URL, like https://agentrun.example.com/v2.")
390
+ base = address if "v2" in url.path.split("/") else f"{address}/v2"
391
+ run = _call("POST", f"{base}/agents/{agent}/runs", key, {"input": fields})
379
392
  until = time.monotonic() + timeout_s
380
393
  while run.get("status") not in _ENDED:
381
394
  if time.monotonic() > until:
382
395
  raise TimeoutError(f"The ${s.key} agent's run {run.get('run_id')} did not end in time.")
383
396
  time.sleep(1.5)
384
- run = _call("GET", f"{base}/v2/runs/{run['run_id']}", key)
397
+ run = _call("GET", f"{base}/runs/{run['run_id']}", key)
385
398
  output = (run.get("result") or {}).get("output")
386
399
  if run.get("status") != "completed" or not output:
387
400
  raise RuntimeError(f"The ${s.key} agent's run {run.get('run_id')} ended {run.get('status')}.")
@@ -400,11 +413,14 @@ Added by AgentRun's agent scout from a scan of ${repo}${commit ? ` at ${commit.s
400
413
 
401
414
  Start a run, then read it until its \`status\` is \`completed\`; the answer is its \`result.output\`.
402
415
 
416
+ \`AGENTRUN_BASE_URL\` is the AgentRun server's API, ending in \`/v2\`, like \`https://agentrun.example.com/v2\`: the value
417
+ the pull request that added this file gives, and the one the server prints when it starts.
418
+
403
419
  \`\`\`sh
404
- curl -sS -X POST "$AGENTRUN_URL/v2/agents/$${env}/runs" \\
420
+ curl -sS -X POST "$AGENTRUN_BASE_URL/agents/$${env}/runs" \\
405
421
  -H "authorization: Bearer $AGENTRUN_API_KEY" -H "content-type: application/json" \\
406
422
  -d '${JSON.stringify({ input: example }).replace(/'/g, "'\\''")}'
407
- curl -sS "$AGENTRUN_URL/v2/runs/<run_id>" -H "authorization: Bearer $AGENTRUN_API_KEY"
423
+ curl -sS "$AGENTRUN_BASE_URL/runs/<run_id>" -H "authorization: Bearer $AGENTRUN_API_KEY"
408
424
  \`\`\`
409
425
 
410
426
  | Answer field | Type | What it holds |
@@ -443,7 +459,7 @@ The app's own code is not changed: nothing calls the agent until you wire it in.
443
459
 
444
460
  | Variable | Value |
445
461
  | --- | --- |
446
- | \`AGENTRUN_URL\` | ${at.publicUrl ? `\`${at.publicUrl}\`` : "your AgentRun server's address"} |
462
+ | \`AGENTRUN_BASE_URL\` | ${at.publicUrl ? `\`${at.publicUrl.replace(/\/+$/, "")}/v2\`` : "your AgentRun server's address, ending in `/v2`"} |
447
463
  | \`AGENTRUN_API_KEY\` | an API key of that server, made in its console under ${at.publicUrl ? `[Settings → AgentRun API keys](${at.publicUrl.replace(/\/+$/, "")}${API_KEYS_PAGE})` : "Settings → AgentRun API keys"} and shown once: keep it in your secrets, never in the repository |
448
464
  | \`${agentVariable(s.key)}\` | \`${at.agentId}\` |
449
465
 
@@ -3,6 +3,10 @@ import { type FeedFixture } from "./eval-feed.js";
3
3
  import { type PreviousFixture } from "./eval-previous.js";
4
4
  import type { PreviousHandover } from "./trigger-targets.js";
5
5
  import type { MonidFake } from "./runner/monid-run.js";
6
+ import { CALLS_PAGE_ROWS } from "./timeline/index.js";
7
+ /** The rows a calls=whole timeline page holds at most, the page size this eval reads with: learn-bench reads its steps'
8
+ * timelines the same way. */
9
+ export { CALLS_PAGE_ROWS };
6
10
  import { type WebFake } from "./web-fake.js";
7
11
  import { type Package } from "./templates.js";
8
12
  import { type Json } from "./validate.js";
@@ -11,8 +15,10 @@ export declare const GRADER_INSTRUCTIONS = "You grade one run of an AI agent aga
11
15
  /** Each grader run's cap, in dollars. */
12
16
  export declare const GRADER_CAP_USD = 0.5;
13
17
  /** The most characters an llm grader's prompt takes (about 30k tokens, under GRADER_CAP_USD at $15 per million input
14
- * tokens): past it, its calls and a fake MCP server's calls share what is left, each list cut in proportion to its
15
- * size, the middle of the longest results (or arguments) first, then the middle calls (fitCalls). The rubric, the task
18
+ * tokens): past it, the final files take room first, never so much that the calls' arguments get less than half of it,
19
+ * the tool state's texts left out before a file of the run's own is cut (fitFiles); its calls and a fake MCP server's
20
+ * calls share what is left, each list cut in proportion to its size and the fake's given at least half, the middle of
21
+ * the longest results (or arguments) first, then the middle calls (fitCalls), and a <cuts> note counts it all. The rubric, the task
16
22
  * and the answer are never cut: they are what the grader judges, so a prompt can pass the cap by what they hold alone,
17
23
  * and then the calls are cut to a note that says so. */
18
24
  export declare const GRADER_PROMPT_MAX = 120000;
@@ -47,7 +53,9 @@ export type Grader = ({
47
53
  expect: "called" | "not_called";
48
54
  count?: number;
49
55
  atLeast?: number;
56
+ atMost?: number;
50
57
  args?: Json;
58
+ argsFile?: string;
51
59
  } | {
52
60
  file: string;
53
61
  type: "file_exists";
@@ -159,7 +167,8 @@ export declare function readCases(dir: string, names?: readonly string[]): {
159
167
  cases: EvalCase[];
160
168
  };
161
169
  /** A call a run made: from its timeline (`tool`, its gate name, a preview of its input, its `arguments` through the run's
162
- * redaction, and the head of its `result`) or, for a faked MCP tool, from the fake's own log (`arguments` whole). */
170
+ * redaction, the head of its `result`, and `refused` when the run refused it before it ran) or, in RunRecord.fakeLog
171
+ * alone, from a fake MCP server's own log (`arguments` whole). */
163
172
  export type ToolCall = {
164
173
  tool: string;
165
174
  name?: string;
@@ -167,6 +176,7 @@ export type ToolCall = {
167
176
  status?: string | null;
168
177
  result?: string | null;
169
178
  arguments?: Json;
179
+ refused?: true;
170
180
  };
171
181
  /** A file a run left in its work folder, as a grader is told of it: its name (its path under the run's cut, the listing's
172
182
  * `name`; absent from a server that doesn't cut its listing's names, when the file is shown by no name, never its path),
@@ -180,15 +190,28 @@ export type FinalFile = {
180
190
  export type RunRecord = {
181
191
  /** The run's final answer, or "" when it has none. */
182
192
  answer: string;
183
- /** Its tool calls as its timeline shows them, in order. */
193
+ /** Its tool calls as its timeline shows them, in order (callRecordOf). */
184
194
  calls: ToolCall[];
185
- /** The calls each fake MCP server received, with their arguments, in order. */
195
+ /** The calls on the fake MCP servers' tools that ran, as its timeline shows them (the faked servers' calls of `calls`
196
+ * not refused and with a result, mcpCallsOf, each argument through the run's redaction), in order: what an llm grader
197
+ * and the report are shown. */
186
198
  mcpCalls: ToolCall[];
199
+ /** Each fake MCP server's own log of the calls that reached it, their arguments whole: read only to match a tool_used
200
+ * grader's `args` on a faked tool, never shown to a grader nor put in the report (a value the run's cut holds, handed
201
+ * to a fake tool, is whole here). */
202
+ fakeLog: ToolCall[];
187
203
  /** The paths of its files, from its work folder. */
188
204
  files: string[];
189
205
  /** Its work folder's files as it left them, for its llm graders (finalFilesOf): each text file with its whole `text`,
190
206
  * any other (media, a binary, one past what was read) with its size alone. */
191
207
  finalFiles?: FinalFile[];
208
+ /** Each file a tool_used grader's args_file names, by its path: its whole text under the run's cut, or why it has none
209
+ * (argsFilesOf). */
210
+ argsFiles?: Record<string, {
211
+ text: string;
212
+ } | {
213
+ why: string;
214
+ }>;
192
215
  /** The clock it ran on, its case's `now`; absent, the real one. */
193
216
  now?: string;
194
217
  /** Its fake mailbox after it, for a case with `email` (eval-mailbox.ts). */
@@ -210,6 +233,15 @@ export declare function searched(search: FakeSearch, query: string): string;
210
233
  export declare function gradeDeterministic(grader: Exclude<Grader, {
211
234
  type: "llm";
212
235
  }>, run: RunRecord, faked: readonly string[]): Verdict;
236
+ /** A tool_used grader's verdict on its args_file: each listed argument object carried (carries) by its own call of
237
+ * `calls` (the grader's tools, its `args` kept), no call standing for two entries, and as many calls as the list has
238
+ * entries (or `count`). The entries are given calls by a maximum matching, so one call that carries two entries counts
239
+ * for one of them, whatever order they are listed in. */
240
+ export declare function argsFileVerdict(path: string, file: {
241
+ text: string;
242
+ } | {
243
+ why: string;
244
+ } | undefined, calls: readonly ToolCall[], said: string, count?: number): Verdict;
213
245
  /** The output check of a completed run of a package that declares `output`, beside its case's graders: the server's own
214
246
  * verdict (`result.output_error`, why the answer still missed the schema after the runner's one retry), so no case
215
247
  * carries a grader for it. Undefined for a package with no output schema. */
@@ -220,6 +252,12 @@ export declare function outputVerdict(pkg: Package, result: unknown): GraderResu
220
252
  export declare function graderInput(grader: Extract<Grader, {
221
253
  type: "llm";
222
254
  }>, input: string, run: RunRecord, max?: number): string;
255
+ /** Each call's arguments (their JSON, none for a call with none) in at most `room` characters in all: undefined when they
256
+ * fit whole; else each past a length L keeps its first two thirds and last third of L with its middle cut and marked
257
+ * (middle), L the longest that fits, so the longest are cut first. A list no longer than L and a marker (40 characters)
258
+ * stays whole, so a cut never takes a short list's text for a marker as long; when even L = 0 passes the room, the
259
+ * short lists stay whole, the long ones show their marker alone, and fitCalls drops calls as it does. */
260
+ export declare function fitArgs(args: readonly (string | undefined)[], room: number): (string | undefined)[] | undefined;
223
261
  /** A grader's calls, one line each (`head`, then `: <result>`), in at most `room` characters: whole when they fit; else
224
262
  * each result past a length L keeps its first two thirds and last third of L with its middle cut and marked, L the
225
263
  * longest that fits, a web call's (`tool`, web-calls.ts) every url whole and each of its snippets or its page's text cut
@@ -238,6 +276,9 @@ export declare function fitCalls(lines: readonly {
238
276
  * its size on a last line, cut to the room when even that passes it. Each file is named by its cut name alone: one with
239
277
  * none is in a block with no path, or counted. */
240
278
  export declare function fitFiles(files: readonly FinalFile[], room: number): string;
279
+ /** Whether a final file is a tool's state, not the run's work: under a folder whose name starts with "." (the package's
280
+ * own skills copied under `.agents/skills`, a tool's cache such as `film/.hyperframes`). A file with no name is not. */
281
+ export declare function toolState(name: string | undefined): boolean;
241
282
  /** A grader run's answer read as its verdict: its json block's (jsonBlockOf), else the last flat JSON object's, {pass, reason}. */
242
283
  export declare function verdictOf(answer: string): {
243
284
  pass: boolean;
@@ -250,7 +291,8 @@ export type Fake = {
250
291
  close: () => Promise<void>;
251
292
  };
252
293
  /** A fake MCP server for `fixture` on loopback, Streamable HTTP through the official SDK, one stateless server per
253
- * request; every tool call is recorded (its gate name and arguments) and answered from the fixture. */
294
+ * request; every tool call is recorded (its gate name and arguments) and answered from the fixture as it is written, so
295
+ * the agent and a script it runs read the answer a real server of that shape gives (a JSON text parses as JSON). */
254
296
  export declare function startFake(name: string, fixture: McpFixture): Promise<Fake>;
255
297
  type Answered = {
256
298
  status: number;
@@ -290,11 +332,23 @@ export declare function waitRun(api: Api, runId: string, deadline: number, signa
290
332
  waiting?: string;
291
333
  why?: string;
292
334
  }>;
335
+ /** The calls on the faked MCP servers `faked` that ran, as the run's timeline shows them (`calls`, from callsOf: each
336
+ * argument through the run's redaction): each call on a faked server's tool the run did not refuse before it ran and
337
+ * whose result row the timeline holds. A call refused (a deny, a cap, an approval never given) never reached the fake,
338
+ * and one with no result (cut off) has no outcome to show. One that failed on its way to the fake shows, with its
339
+ * error as its result, never as a success; a tool_used grader counts only what the fake logged (fakeLog). What an llm
340
+ * grader's <mcp-calls> and the report's `mcp_calls` show, never the fake's own log. */
341
+ export declare function mcpCallsOf(calls: readonly ToolCall[], faked: readonly string[]): ToolCall[];
342
+ /** A run's calls for its graders and its report, from its timeline's (callsOf) and the fakes it ran against: its calls,
343
+ * its fake MCP calls (mcpCallsOf) and the fakes' own log whole. The template eval's runs and learn-bench's steps both
344
+ * read them here. */
345
+ export declare function callRecordOf(calls: readonly ToolCall[], faked: readonly string[], fakes: readonly Pick<Fake, "calls">[]): Pick<RunRecord, "calls" | "mcpCalls" | "fakeLog">;
293
346
  /** A run's tool calls, each named as a grader names it: the gate's own rule (RunGate.enter), its settings key, but a
294
347
  * shell tool held to bash's setting (bash_background, bash_output, ...) keeps its own name, so its grader sees it. A
295
348
  * call on a saved server `toolkits` names ({<saved server>: <the package's toolkit>}, a need an owner's server filled
296
349
  * under another name) is named on the package's toolkit, as the package's graders name it. Each with its arguments and
297
- * its output as the rows of a calls=whole read carry them (tool_input, tool_result_text), else its previews. */
350
+ * its output as the rows of a calls=whole read carry them (tool_input, tool_result_text), else its previews, and
351
+ * `refused` when its result row says the run refused it before it ran (a deny, a pin, an approval never given). */
298
352
  export declare function callsOf(rows: readonly Json[], harness: string, toolkits?: Readonly<Record<string, string>>): ToolCall[];
299
353
  /** A file of a run's work folder as its listing names it: its path (for this eval's own reads, never a grader's prompt),
300
354
  * its name under the run's cut (the listing's `name`, absent from a server that doesn't cut it), its size, its type
@@ -313,13 +367,23 @@ export declare const FILE_READ_TIMEOUT_MS = 10000;
313
367
  export declare const FILE_READS_TIMEOUT_MS = 30000;
314
368
  /** A run's final files for its llm graders: each text file's whole text, read smallest first while the texts read stay
315
369
  * within GRADER_PROMPT_MAX UTF-8 bytes in all (one grader input holds that many characters, and a character is at least
316
- * a byte), every other file by its size alone. Each is read under the run's own cut, on the server that holds its
370
+ * a byte), the run's own files before any of tool state (toolState), every other file by its size alone. Each is read under the run's own cut, on the server that holds its
317
371
  * secrets (`?cut=run`, run-reads-over-store.ts cutRunFile): every value its timeline's calls are cut of, and every secret
318
372
  * shape, is "[redacted]" in the text a grader sees. An answer without the cut's mark (`x-agentrun-cut: run`: a server
319
373
  * that doesn't know the cut and would serve the raw bytes) leaves the text out. A read that fails, is refused (403, 413,
320
374
  * 415), takes longer than `readTimeoutMs`, or would pass the budget leaves that file's text out, never the grade, and
321
375
  * the files after it are still read; past FILE_READS_TIMEOUT_MS in all, the rest are left out. In the listing's order. */
322
376
  export declare function finalFilesOf(api: Api, runId: string, listed: readonly Listed[], signal?: AbortSignal, readTimeoutMs?: number): Promise<FinalFile[]>;
377
+ /** The most bytes of an args_file a tool_used grader reads: the most a cut read answers (run-files.ts). */
378
+ export declare const ARGS_FILE_MAX: number;
379
+ /** Each file a tool_used grader's args_file names, read whole under the run's cut (as finalFilesOf reads a file: an
380
+ * answer without the cut's mark is refused), by its path: its text, or why there is none (absent, refused, past
381
+ * ARGS_FILE_MAX bytes, a read that failed or took past `readTimeoutMs`). */
382
+ export declare function argsFilesOf(api: Api, runId: string, paths: readonly string[], signal?: AbortSignal, readTimeoutMs?: number): Promise<Record<string, {
383
+ text: string;
384
+ } | {
385
+ why: string;
386
+ }>>;
323
387
  /** How long a run's metrics read may take before the run is reported without them. */
324
388
  export declare const METRICS_TIMEOUT_MS = 10000;
325
389
  /** The metrics of the one run `agentId` made (RunMetrics), from GET /stats?agent=; null when the server kept none (the run
@@ -460,4 +524,3 @@ export declare const CANCEL_WAIT_MS = 30000;
460
524
  * any case failed, however many passed beside it. (2: nothing ran, and 130: stopped, are the CLI's own.) */
461
525
  export declare const exitCodeOf: (report: Pick<Report, "cases">) => 0 | 1;
462
526
  export declare function markdownReport(report: Report): string;
463
- export {};