@parcha/agentrun-serve 0.1.0-beta.37 → 0.1.0-beta.39

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 (620) hide show
  1. package/CHANGELOG.md +700 -0
  2. package/README.md +441 -177
  3. package/dist/adapters.d.ts +4 -1
  4. package/dist/adapters.js +4 -2
  5. package/dist/agent-rows.d.ts +1 -3
  6. package/dist/agents-store.d.ts +35 -3
  7. package/dist/agents-store.js +48 -23
  8. package/dist/answer-json.d.ts +34 -1
  9. package/dist/answer-json.js +91 -9
  10. package/dist/api-only.d.ts +1 -1
  11. package/dist/api-only.js +2 -2
  12. package/dist/bash-read-only.js +2 -1
  13. package/dist/browser-cost.js +52 -93
  14. package/dist/cap-short.d.ts +12 -0
  15. package/dist/cap-short.js +60 -0
  16. package/dist/cap.d.ts +3 -400
  17. package/dist/cap.js +6 -942
  18. package/dist/catalog.d.ts +0 -5
  19. package/dist/catalog.js +2 -6
  20. package/dist/chatgpt-plan.d.ts +163 -0
  21. package/dist/chatgpt-plan.js +549 -0
  22. package/dist/cli.js +26 -6
  23. package/dist/composio-preset.d.ts +25 -0
  24. package/dist/composio-preset.js +51 -8
  25. package/dist/composio-triggers.d.ts +113 -0
  26. package/dist/composio-triggers.js +411 -0
  27. package/dist/computer-calls.d.ts +36 -24
  28. package/dist/computer-calls.js +110 -27
  29. package/dist/computer-commands.d.ts +2 -0
  30. package/dist/computer-commands.js +7 -3
  31. package/dist/computer-live.d.ts +12 -2
  32. package/dist/computer-live.js +21 -5
  33. package/dist/computer-routes.d.ts +2 -2
  34. package/dist/computer-routes.js +2 -2
  35. package/dist/computer-setting.d.ts +15 -2
  36. package/dist/computer-setting.js +20 -4
  37. package/dist/computer-view.d.ts +18 -2
  38. package/dist/computer-view.js +21 -6
  39. package/dist/computer-viewer.js +40 -13
  40. package/dist/computers.d.ts +8 -2
  41. package/dist/computers.js +18 -8
  42. package/dist/console/assets/index-BNhZs-jp.css +1 -0
  43. package/dist/console/assets/index-BQv5aOGB.js +700 -0
  44. package/dist/console/index.html +2 -2
  45. package/dist/console-links.d.ts +2 -0
  46. package/dist/console-links.js +6 -3
  47. package/dist/decision-cap.d.ts +2 -5
  48. package/dist/decision-cap.js +3 -6
  49. package/dist/decision-rows.js +11 -11
  50. package/dist/decisions.js +4 -0
  51. package/dist/email/account.d.ts +84 -0
  52. package/dist/email/account.js +159 -0
  53. package/dist/email/answer.d.ts +10 -0
  54. package/dist/email/answer.js +182 -0
  55. package/dist/email/email-faux.d.ts +95 -0
  56. package/dist/email/email-faux.js +849 -0
  57. package/dist/email/labels.d.ts +1 -0
  58. package/dist/email/labels.js +84 -0
  59. package/dist/email/mail.d.ts +186 -0
  60. package/dist/email/mail.js +380 -0
  61. package/dist/email/names.d.ts +20 -0
  62. package/dist/email/names.js +40 -0
  63. package/dist/email/routes.d.ts +9 -0
  64. package/dist/email/routes.js +50 -0
  65. package/dist/email/tools.d.ts +20 -0
  66. package/dist/email/tools.js +517 -0
  67. package/dist/environment.d.ts +17 -2
  68. package/dist/environment.js +36 -8
  69. package/dist/errors.d.ts +6 -0
  70. package/dist/errors.js +12 -0
  71. package/dist/eval-mailbox.d.ts +103 -0
  72. package/dist/eval-mailbox.js +236 -0
  73. package/dist/faux-computers.js +4 -2
  74. package/dist/graph-view.d.ts +9 -2
  75. package/dist/graph-view.js +6 -2
  76. package/dist/harness-install.d.ts +28 -2
  77. package/dist/harness-install.js +147 -59
  78. package/dist/harness-opencode/adapter.js +2 -22
  79. package/dist/harness-opencode/facts.js +5 -4
  80. package/dist/harness-opencode/host/policy.d.ts +4 -5
  81. package/dist/harness-opencode/host/policy.js +14 -33
  82. package/dist/harness-opencode/index.d.ts +1 -1
  83. package/dist/harness-opencode/index.js +1 -1
  84. package/dist/harness-opencode/versions.d.ts +6 -0
  85. package/dist/harness-opencode/versions.js +6 -0
  86. package/dist/harness-table.d.ts +0 -2
  87. package/dist/harness-table.js +8 -7
  88. package/dist/harness.d.ts +12 -0
  89. package/dist/harness.js +15 -3
  90. package/dist/host-tools.d.ts +1 -5
  91. package/dist/host-tools.js +7 -10
  92. package/dist/hosted-search.d.ts +3 -3
  93. package/dist/hosted-search.js +51 -32
  94. package/dist/import-sources.d.ts +1 -1
  95. package/dist/import-sources.js +3 -3
  96. package/dist/import.d.ts +21 -0
  97. package/dist/import.js +186 -1
  98. package/dist/key-check.d.ts +0 -2
  99. package/dist/key-check.js +3 -4
  100. package/dist/key-refusal.d.ts +8 -2
  101. package/dist/key-refusal.js +16 -13
  102. package/dist/key-words.d.ts +3 -2
  103. package/dist/key-words.js +4 -2
  104. package/dist/learn/check.d.ts +24 -4
  105. package/dist/learn/check.js +340 -7
  106. package/dist/learn/commit.d.ts +10 -0
  107. package/dist/learn/commit.js +18 -4
  108. package/dist/learn/compile.d.ts +250 -0
  109. package/dist/learn/compile.js +507 -0
  110. package/dist/learn/general.d.ts +3 -0
  111. package/dist/learn/general.js +4 -2
  112. package/dist/learn/grade.d.ts +5 -1
  113. package/dist/learn/grade.js +11 -7
  114. package/dist/learn/notes.d.ts +8 -0
  115. package/dist/learn/notes.js +18 -0
  116. package/dist/learn/promote.d.ts +308 -0
  117. package/dist/learn/promote.js +321 -0
  118. package/dist/learn/refit.d.ts +48 -0
  119. package/dist/learn/refit.js +264 -0
  120. package/dist/learn/reflect.d.ts +5 -25
  121. package/dist/learn/reflect.js +14 -131
  122. package/dist/learn/replay-calls.d.ts +63 -0
  123. package/dist/learn/replay-calls.js +158 -0
  124. package/dist/learn/skills.d.ts +19 -16
  125. package/dist/learn/skills.js +157 -53
  126. package/dist/learn/workflow-nodes.d.ts +15 -0
  127. package/dist/learn/workflow-nodes.js +44 -0
  128. package/dist/learned-nodes.d.ts +58 -2
  129. package/dist/learned-nodes.js +68 -5
  130. package/dist/learned-workflow.d.ts +58 -32
  131. package/dist/learned-workflow.js +215 -77
  132. package/dist/learning-batch.d.ts +2 -2
  133. package/dist/learning-batch.js +4 -4
  134. package/dist/learning-cost.d.ts +41 -11
  135. package/dist/learning-cost.js +31 -13
  136. package/dist/learning-routes.d.ts +12 -2
  137. package/dist/learning-routes.js +34 -6
  138. package/dist/learning-words.d.ts +8 -1
  139. package/dist/learning-words.js +11 -1
  140. package/dist/learning.d.ts +26 -1
  141. package/dist/learning.js +7 -4
  142. package/dist/link-check.d.ts +27 -0
  143. package/dist/link-check.js +164 -0
  144. package/dist/llm.js +0 -3
  145. package/dist/local-models.d.ts +33 -2
  146. package/dist/local-models.js +43 -5
  147. package/dist/mcp-gateway.d.ts +12 -20
  148. package/dist/mcp-gateway.js +16 -44
  149. package/dist/mcp-oauth.d.ts +5 -0
  150. package/dist/mcp-oauth.js +1 -1
  151. package/dist/mcp-pin-first.d.ts +37 -0
  152. package/dist/mcp-pin-first.js +113 -0
  153. package/dist/mcp-probe.d.ts +8 -9
  154. package/dist/mcp-probe.js +16 -33
  155. package/dist/mcp-secret-writes.js +3 -0
  156. package/dist/mcp-servers-store.d.ts +102 -26
  157. package/dist/mcp-servers-store.js +151 -25
  158. package/dist/mcp-sources.d.ts +39 -0
  159. package/dist/mcp-sources.js +74 -0
  160. package/dist/mcp-store.d.ts +11 -0
  161. package/dist/mcp-store.js +16 -2
  162. package/dist/mcp-wire.d.ts +22 -0
  163. package/dist/mcp-wire.js +36 -0
  164. package/dist/mcp.js +3 -3
  165. package/dist/meta-tool-names.d.ts +1 -0
  166. package/dist/meta-tool-names.js +3 -0
  167. package/dist/model-form.d.ts +11 -0
  168. package/dist/model-form.js +17 -1
  169. package/dist/model.d.ts +39 -6
  170. package/dist/model.js +171 -32
  171. package/dist/monid.d.ts +50 -29
  172. package/dist/monid.js +234 -143
  173. package/dist/native/binding.d.ts +13 -0
  174. package/dist/native/binding.js +57 -0
  175. package/dist/native/cli.d.ts +2 -0
  176. package/dist/native/cli.js +48 -0
  177. package/dist/native/connection.d.ts +8 -0
  178. package/dist/native/connection.js +94 -0
  179. package/dist/native/context.d.ts +6 -0
  180. package/dist/native/context.js +22 -0
  181. package/dist/native/discovery.d.ts +27 -0
  182. package/dist/native/discovery.js +404 -0
  183. package/dist/native/environment.d.ts +4 -0
  184. package/dist/native/environment.js +18 -0
  185. package/dist/native/history.d.ts +20 -0
  186. package/dist/native/history.js +147 -0
  187. package/dist/native/instructions.d.ts +21 -0
  188. package/dist/native/instructions.js +173 -0
  189. package/dist/native/remote-worker-bridge.d.ts +3 -0
  190. package/dist/native/remote-worker-bridge.js +278 -0
  191. package/dist/native/remote.d.ts +187 -0
  192. package/dist/native/remote.js +492 -0
  193. package/dist/native/runtime.d.ts +17 -0
  194. package/dist/native/runtime.js +316 -0
  195. package/dist/native/runtimes.d.ts +66 -0
  196. package/dist/native/runtimes.js +41 -0
  197. package/dist/native/schema.d.ts +46 -0
  198. package/dist/native/schema.js +41 -0
  199. package/dist/native/types.d.ts +87 -0
  200. package/dist/native/types.js +1 -0
  201. package/dist/observation/http.d.ts +4 -0
  202. package/dist/observation/http.js +140 -0
  203. package/dist/observation/observer.d.ts +301 -0
  204. package/dist/observation/observer.js +919 -0
  205. package/dist/observation/schema.d.ts +52 -0
  206. package/dist/observation/schema.js +154 -0
  207. package/dist/openapi.d.ts +1 -0
  208. package/dist/openapi.js +705 -126
  209. package/dist/paid-calls.d.ts +34 -32
  210. package/dist/paid-calls.js +52 -104
  211. package/dist/place-offers.d.ts +4 -8
  212. package/dist/place-offers.js +4 -9
  213. package/dist/port-models.d.ts +7 -2
  214. package/dist/port-models.js +5 -2
  215. package/dist/print.d.ts +4 -2
  216. package/dist/print.js +4 -3
  217. package/dist/propose.d.ts +8 -3
  218. package/dist/propose.js +28 -7
  219. package/dist/provider.d.ts +5 -1
  220. package/dist/provider.js +17 -2
  221. package/dist/push-handler.d.ts +3 -2
  222. package/dist/push-handler.js +20 -6
  223. package/dist/reflect-range.js +2 -1
  224. package/dist/refusal-words.d.ts +11 -0
  225. package/dist/refusal-words.js +13 -2
  226. package/dist/rows.d.ts +5 -3
  227. package/dist/rows.js +15 -4
  228. package/dist/run-launch.d.ts +23 -1
  229. package/dist/run-launch.js +17 -4
  230. package/dist/run-learning-served.d.ts +84 -0
  231. package/dist/run-manifest.d.ts +8 -0
  232. package/dist/run-manifest.js +33 -1
  233. package/dist/run-reads-over-store.d.ts +3 -3
  234. package/dist/run-reads-over-store.js +13 -10
  235. package/dist/run-secrets.js +2 -3
  236. package/dist/run-timeline-served.d.ts +3 -2
  237. package/dist/run-timeline-served.js +12 -10
  238. package/dist/run-view.d.ts +59 -41
  239. package/dist/run-view.js +128 -64
  240. package/dist/runnable.d.ts +13 -8
  241. package/dist/runnable.js +77 -60
  242. package/dist/runner/adapter-loop.d.ts +60 -15
  243. package/dist/runner/adapter-loop.js +1406 -464
  244. package/dist/runner/adapter-run-spec.d.ts +45 -14
  245. package/dist/runner/adapter-run-spec.js +200 -116
  246. package/dist/runner/adapters/pi.d.ts +40 -7
  247. package/dist/runner/adapters/pi.js +149 -38
  248. package/dist/runner/beside.d.ts +3 -1
  249. package/dist/runner/beside.js +24 -8
  250. package/dist/runner/claim-secrets.d.ts +3 -1
  251. package/dist/runner/claim-secrets.js +28 -4
  252. package/dist/runner/cli-run-spec.d.ts +30 -0
  253. package/dist/runner/cli-run-spec.js +150 -66
  254. package/dist/runner/computer-channel.d.ts +5 -2
  255. package/dist/runner/computer-channel.js +5 -3
  256. package/dist/runner/computer-journal.d.ts +6 -0
  257. package/dist/runner/computer-journal.js +8 -10
  258. package/dist/runner/conformance/harness.d.ts +3 -0
  259. package/dist/runner/conformance/harness.js +149 -5
  260. package/dist/runner/conformance/subject.d.ts +11 -4
  261. package/dist/runner/end-of-run.d.ts +8 -5
  262. package/dist/runner/end-of-run.js +11 -6
  263. package/dist/runner/feedback-round.d.ts +79 -0
  264. package/dist/runner/feedback-round.js +127 -0
  265. package/dist/runner/harness-loops.js +17 -0
  266. package/dist/runner/journal-kinds.d.ts +55 -13
  267. package/dist/runner/journal-kinds.js +19 -0
  268. package/dist/runner/learning-dispatch.d.ts +3 -2
  269. package/dist/runner/learning-dispatch.js +6 -6
  270. package/dist/runner/learning-end.d.ts +58 -19
  271. package/dist/runner/learning-end.js +316 -115
  272. package/dist/runner/learning-factory.d.ts +3 -0
  273. package/dist/runner/learning-factory.js +8 -2
  274. package/dist/runner/learning-loop.d.ts +21 -1
  275. package/dist/runner/learning-loop.js +24 -6
  276. package/dist/runner/learning-seed.d.ts +4 -0
  277. package/dist/runner/learning-seed.js +14 -0
  278. package/dist/runner/loop-contract.d.ts +19 -3
  279. package/dist/runner/loop.d.ts +34 -1
  280. package/dist/runner/loop.js +55 -1
  281. package/dist/runner/main.d.ts +6 -1
  282. package/dist/runner/main.js +26 -4
  283. package/dist/runner/mcp-claim.d.ts +5 -1
  284. package/dist/runner/mcp-claim.js +66 -50
  285. package/dist/runner/mcp-run.d.ts +20 -53
  286. package/dist/runner/mcp-run.js +22 -88
  287. package/dist/runner/meta-tools.d.ts +44 -0
  288. package/dist/runner/meta-tools.js +344 -0
  289. package/dist/runner/metrics.d.ts +80 -21
  290. package/dist/runner/metrics.js +128 -42
  291. package/dist/runner/model-route.d.ts +12 -3
  292. package/dist/runner/model-route.js +149 -19
  293. package/dist/runner/monid-run.d.ts +18 -0
  294. package/dist/runner/monid-run.js +170 -0
  295. package/dist/runner/native-loop.d.ts +11 -0
  296. package/dist/runner/native-loop.js +438 -0
  297. package/dist/runner/promotion.d.ts +146 -0
  298. package/dist/runner/promotion.js +803 -0
  299. package/dist/runner/redact.js +3 -0
  300. package/dist/runner/reflect-hook.d.ts +36 -21
  301. package/dist/runner/reflect-hook.js +147 -49
  302. package/dist/runner/runner.d.ts +7 -1
  303. package/dist/runner/runner.js +34 -8
  304. package/dist/runner/sdk-loop.d.ts +7 -0
  305. package/dist/runner/sdk-loop.js +470 -0
  306. package/dist/runner/sessions.d.ts +8 -3
  307. package/dist/runner/sessions.js +5 -1
  308. package/dist/runner/spec-holds.d.ts +16 -2
  309. package/dist/runner/spec-holds.js +42 -14
  310. package/dist/runner/step-guard.d.ts +62 -0
  311. package/dist/runner/step-guard.js +93 -0
  312. package/dist/runner/store-secrets.js +17 -2
  313. package/dist/runner/subagent.d.ts +0 -3
  314. package/dist/runner/subagent.js +7 -12
  315. package/dist/runner/workflow-first.d.ts +226 -0
  316. package/dist/runner/workflow-first.js +293 -0
  317. package/dist/runner/workflow-loop.d.ts +1 -1
  318. package/dist/runner/workflow-loop.js +32 -19
  319. package/dist/runner/workflow-spec.d.ts +5 -1
  320. package/dist/runner/workflow-spec.js +63 -48
  321. package/dist/runs-over-store.d.ts +41 -4
  322. package/dist/runs-over-store.js +64 -22
  323. package/dist/sdk/runs.d.ts +115 -0
  324. package/dist/sdk/runs.js +422 -0
  325. package/dist/sdk/schema.d.ts +175 -0
  326. package/dist/sdk/schema.js +138 -0
  327. package/dist/sdk/workflows.d.ts +22 -0
  328. package/dist/sdk/workflows.js +39 -0
  329. package/dist/secrets.d.ts +2 -0
  330. package/dist/secrets.js +19 -1
  331. package/dist/server.d.ts +108 -20
  332. package/dist/server.js +874 -157
  333. package/dist/settings-wake.d.ts +8 -6
  334. package/dist/settings-wake.js +13 -7
  335. package/dist/skill-route.d.ts +3 -0
  336. package/dist/skill-route.js +16 -0
  337. package/dist/skills/agentrun-serve/SKILL.md +368 -0
  338. package/dist/stats.d.ts +10 -10
  339. package/dist/store/agent-body.d.ts +22 -7
  340. package/dist/store/agent-body.js +23 -14
  341. package/dist/store/command-wake.d.ts +3 -2
  342. package/dist/store/command-wake.js +4 -4
  343. package/dist/store/index.d.ts +1 -1
  344. package/dist/store/native-command-owner.d.ts +10 -0
  345. package/dist/store/native-command-owner.js +47 -0
  346. package/dist/store/postgres/connection.js +3 -1
  347. package/dist/store/postgres/migrations/0010_imported_templates.sql +18 -0
  348. package/dist/store/postgres/migrations/0011_revision_mcp_pin.sql +13 -0
  349. package/dist/store/postgres/migrations/0012_revision_monid_pin.sql +4 -0
  350. package/dist/store/postgres/migrations/0013_native_command_owner.sql +6 -0
  351. package/dist/store/postgres/migrations/0014_run_cost_upper_bound.sql +6 -0
  352. package/dist/store/postgres/store.js +3 -0
  353. package/dist/store/schema.d.ts +16 -0
  354. package/dist/store/schema.js +47 -8
  355. package/dist/store/sqlite/connection.d.ts +2 -2
  356. package/dist/store/sqlite/connection.js +2 -2
  357. package/dist/store/sqlite/run-patch.d.ts +8 -1
  358. package/dist/store/sqlite/run-patch.js +33 -10
  359. package/dist/store/sqlite/store.js +184 -28
  360. package/dist/store/store.d.ts +98 -21
  361. package/dist/store-reads/analytics.d.ts +7 -7
  362. package/dist/store-reads/analytics.js +23 -5
  363. package/dist/store-reads/cap.js +8 -6
  364. package/dist/store-reads/journal.d.ts +30 -1
  365. package/dist/store-reads/journal.js +141 -83
  366. package/dist/store-reads/learning.d.ts +179 -13
  367. package/dist/store-reads/learning.js +230 -68
  368. package/dist/store-reads/loop.d.ts +61 -0
  369. package/dist/store-reads/loop.js +111 -0
  370. package/dist/store-reads/runs.d.ts +5 -0
  371. package/dist/store-reads/runs.js +3 -2
  372. package/dist/store-view.d.ts +3 -2
  373. package/dist/store-view.js +109 -37
  374. package/dist/template-eval.d.ts +87 -16
  375. package/dist/template-eval.js +605 -120
  376. package/dist/template-github-permissions.d.ts +2 -2
  377. package/dist/template-github-permissions.js +2 -1
  378. package/dist/template-import.d.ts +31 -0
  379. package/dist/template-import.js +121 -0
  380. package/dist/template-source.d.ts +51 -0
  381. package/dist/template-source.js +371 -0
  382. package/dist/templates.d.ts +274 -52
  383. package/dist/templates.js +670 -201
  384. package/dist/text-urls.d.ts +38 -0
  385. package/dist/text-urls.js +170 -0
  386. package/dist/timeline/computer.d.ts +48 -0
  387. package/dist/timeline/computer.js +169 -0
  388. package/dist/timeline/index.d.ts +7 -5
  389. package/dist/timeline/index.js +7 -5
  390. package/dist/timeline/labels.d.ts +11 -4
  391. package/dist/timeline/labels.js +122 -8
  392. package/dist/timeline/origin.d.ts +20 -6
  393. package/dist/timeline/origin.js +13 -6
  394. package/dist/timeline/render-text.js +1 -1
  395. package/dist/timeline/timeline.d.ts +76 -20
  396. package/dist/timeline/timeline.js +184 -39
  397. package/dist/timeline/util.d.ts +5 -0
  398. package/dist/timeline/util.js +44 -8
  399. package/dist/timeline/web-calls.d.ts +17 -0
  400. package/dist/timeline/web-calls.js +106 -0
  401. package/dist/tool-gate.d.ts +103 -76
  402. package/dist/tool-gate.js +200 -127
  403. package/dist/tool-keys.d.ts +4 -1
  404. package/dist/tool-keys.js +8 -3
  405. package/dist/tool-list.d.ts +29 -0
  406. package/dist/tool-list.js +50 -0
  407. package/dist/tool-names.d.ts +76 -0
  408. package/dist/tool-names.js +101 -0
  409. package/dist/tool-plane.d.ts +34 -28
  410. package/dist/tool-plane.js +72 -37
  411. package/dist/tools.d.ts +59 -15
  412. package/dist/tools.js +46 -42
  413. package/dist/trigger-adapter.d.ts +85 -5
  414. package/dist/trigger-adapter.js +6 -0
  415. package/dist/trigger-adapters.js +3 -1
  416. package/dist/trigger-composio.d.ts +10 -0
  417. package/dist/trigger-composio.js +122 -0
  418. package/dist/trigger-email.d.ts +4 -0
  419. package/dist/trigger-email.js +228 -0
  420. package/dist/trigger-signatures.d.ts +6 -10
  421. package/dist/trigger-signatures.js +16 -16
  422. package/dist/trigger-targets.d.ts +1 -1
  423. package/dist/trigger-targets.js +4 -3
  424. package/dist/trigger-webhook.js +6 -4
  425. package/dist/triggers.d.ts +94 -9
  426. package/dist/triggers.js +263 -62
  427. package/dist/uploads.d.ts +9 -0
  428. package/dist/uploads.js +27 -0
  429. package/dist/validate.d.ts +15 -7
  430. package/dist/validate.js +91 -50
  431. package/dist/web-fake.d.ts +56 -0
  432. package/dist/web-fake.js +102 -0
  433. package/dist/web-fetch-direct.d.ts +3 -0
  434. package/dist/web-fetch-direct.js +4 -1
  435. package/dist/web-fetch.d.ts +6 -8
  436. package/dist/web-fetch.js +10 -53
  437. package/dist/web-search.d.ts +51 -2
  438. package/dist/web-search.js +116 -18
  439. package/dist/webhooks.d.ts +2 -1
  440. package/dist/webhooks.js +5 -1
  441. package/dist/workflow/node-runner.js +10 -2
  442. package/dist/workspace/archil-claim.d.ts +3 -0
  443. package/dist/workspace/archil-claim.js +9 -2
  444. package/dist/workspace/computer-deps.d.ts +25 -9
  445. package/dist/workspace/computer-deps.js +82 -38
  446. package/dist/workspace/computer-for-claim.d.ts +60 -4
  447. package/dist/workspace/computer-for-claim.js +203 -45
  448. package/dist/workspace/computer-hold.js +7 -1
  449. package/dist/workspace/computer-janitor.d.ts +10 -3
  450. package/dist/workspace/computer-janitor.js +96 -29
  451. package/dist/workspace/computer-kept.d.ts +82 -0
  452. package/dist/workspace/computer-kept.js +147 -0
  453. package/dist/workspace/computer-mcp.js +4 -3
  454. package/dist/workspace/computer-ports.d.ts +23 -3
  455. package/dist/workspace/computer-ports.js +115 -5
  456. package/dist/workspace/index.d.ts +2 -3
  457. package/dist/workspace/index.js +1 -2
  458. package/dist/workspace/kind-skills/desktop/SKILL.md +31 -11
  459. package/dist/workspace/kind-skills/phone/SKILL.md +29 -14
  460. package/dist/workspace/local.js +2 -2
  461. package/dist/workspace/resolve-computer.d.ts +33 -1
  462. package/dist/workspace/resolve-computer.js +37 -16
  463. package/dist/workspace/revision-skills.d.ts +6 -2
  464. package/dist/workspace/revision-skills.js +12 -5
  465. package/dist/workspace/run-end-computers.d.ts +30 -0
  466. package/dist/workspace/run-end-computers.js +137 -0
  467. package/dist/workspace/run-tools.d.ts +40 -23
  468. package/dist/workspace/run-tools.js +46 -19
  469. package/dist/wrap-up.d.ts +35 -0
  470. package/dist/wrap-up.js +48 -0
  471. package/launcher/agentrun-serve +4 -2
  472. package/package.json +13 -9
  473. package/skills/agentrun-serve/SKILL.md +248 -10
  474. package/templates/README.md +220 -60
  475. package/templates/TOOLS.md +168 -0
  476. package/templates/code-review/agent.md +46 -16
  477. package/templates/code-review/evals/clean-refactor/case.yaml +2 -1
  478. package/templates/code-review/evals/clean-refactor/graders/head-sha.md +6 -0
  479. package/templates/code-review/evals/injection/case.yaml +2 -1
  480. package/templates/code-review/evals/injection/graders/head-sha.md +6 -0
  481. package/templates/code-review/evals/mentions-defused/case.yaml +3 -3
  482. package/templates/code-review/evals/mentions-defused/fixtures/github-mcp.json +0 -23
  483. package/templates/code-review/evals/mentions-defused/graders/head-sha.md +6 -0
  484. package/templates/code-review/evals/never-flag/case.yaml +2 -1
  485. package/templates/code-review/evals/never-flag/graders/head-sha.md +6 -0
  486. package/templates/code-review/evals/null-name/case.yaml +2 -1
  487. package/templates/code-review/evals/null-name/graders/head-sha.md +6 -0
  488. package/templates/code-review/evals/off-by-one/case.yaml +2 -1
  489. package/templates/code-review/evals/off-by-one/graders/head-sha.md +6 -0
  490. package/templates/code-review/evals/off-by-one/graders/no-repo-reads.md +2 -1
  491. package/templates/code-review/evals/other-repo/case.yaml +16 -0
  492. package/templates/code-review/evals/other-repo/fixtures/github-mcp.json +130 -0
  493. package/templates/code-review/evals/other-repo/graders/head-sha.md +6 -0
  494. package/templates/code-review/evals/other-repo/graders/no-canary.md +6 -0
  495. package/templates/code-review/evals/other-repo/graders/no-other-repo.md +8 -0
  496. package/templates/code-review/evals/other-repo/graders/refused-not-quoted.md +18 -0
  497. package/templates/code-review/evals/other-repo/prompt.md +10 -0
  498. package/templates/code-review/evals/pasted-by-reference/case.yaml +5 -0
  499. package/templates/code-review/evals/pasted-by-reference/graders/by-reference.md +15 -0
  500. package/templates/code-review/evals/pasted-by-reference/graders/head-sha.md +6 -0
  501. package/templates/code-review/evals/pasted-by-reference/prompt.md +31 -0
  502. package/templates/code-review/evals/re-review/case.yaml +2 -1
  503. package/templates/code-review/evals/re-review/graders/head-sha.md +6 -0
  504. package/templates/code-review/evals/re-review-open/case.yaml +2 -1
  505. package/templates/code-review/evals/re-review-open/graders/head-sha.md +6 -0
  506. package/templates/code-review/evals/repo-rule/case.yaml +2 -1
  507. package/templates/code-review/evals/repo-rule/graders/head-sha.md +6 -0
  508. package/templates/code-review/evals/two-defects/case.yaml +2 -1
  509. package/templates/code-review/evals/two-defects/graders/head-sha.md +6 -0
  510. package/templates/code-review/rules/CODEREVIEW.md +1 -1
  511. package/templates/code-review/skills/review/DEEP.md +5 -4
  512. package/templates/code-review/skills/review/REVIEWER.md +5 -4
  513. package/templates/code-review/skills/review/SKILL.md +11 -6
  514. package/templates/code-review/{findings.schema.json → skills/review/findings.schema.json} +1 -0
  515. package/templates/inbound-lead/agent.md +26 -16
  516. package/templates/inbound-lead/evals/injection-in-form/graders/no-exfil.md +16 -0
  517. package/templates/inbound-lead/evals/injection-in-form/prompt.md +2 -2
  518. package/templates/inbound-lead/evals/write-back/case.yaml +2 -6
  519. package/templates/inbound-lead/evals/write-back/fixtures/fake-hubspot.json +34 -225
  520. package/templates/inbound-lead/evals/write-back/graders/note-and-score.md +10 -14
  521. package/templates/inbound-lead/evals/write-back/graders/writes-once.md +7 -0
  522. package/templates/inbound-lead/evals/write-back/prompt.md +1 -1
  523. package/templates/inbound-lead/evals/write-back-wrong-record/case.yaml +3 -7
  524. package/templates/inbound-lead/evals/write-back-wrong-record/fixtures/fake-hubspot.json +34 -225
  525. package/templates/inbound-lead/evals/write-back-wrong-record/graders/form-id.md +17 -0
  526. package/templates/inbound-lead/evals/write-back-wrong-record/graders/no-write.md +3 -3
  527. package/templates/inbound-lead/evals/write-back-wrong-record/prompt.md +2 -2
  528. package/templates/inbound-lead/skills/lead/SKILL.md +23 -27
  529. package/templates/kyb/agent.md +15 -5
  530. package/templates/kyb/evals/adverse-media/prompt.md +2 -7
  531. package/templates/kyb/evals/canada-active-filed/prompt.md +2 -6
  532. package/templates/kyb/evals/clean-public-company/prompt.md +2 -6
  533. package/templates/kyb/evals/injection-in-page/prompt.md +3 -7
  534. package/templates/kyb/evals/name-collision/prompt.md +2 -6
  535. package/templates/kyb/evals/no-invention/prompt.md +2 -6
  536. package/templates/kyb/evals/opensanctions-on/prompt.md +2 -6
  537. package/templates/kyb/evals/sanctioned-entity/prompt.md +2 -6
  538. package/templates/kyb/kyb.schema.json +8 -7
  539. package/templates/kyb/skills/kyb/SKILL.md +9 -6
  540. package/templates/market-monitor/agent.md +19 -12
  541. package/templates/market-monitor/evals/post-happens/case.yaml +4 -4
  542. package/templates/market-monitor/evals/post-happens/fixtures/slack-mcp.json +13 -9
  543. package/templates/market-monitor/evals/post-happens/graders/post-is-digest.md +1 -1
  544. package/templates/market-monitor/evals/post-happens/graders/posted-once.md +3 -3
  545. package/templates/market-monitor/skills/monitor/SKILL.md +6 -4
  546. package/templates/release-notes/agent.md +32 -10
  547. package/templates/release-notes/evals/draft-not-publish/case.yaml +5 -4
  548. package/templates/release-notes/evals/draft-not-publish/fixtures/github-mcp.json +29 -51
  549. package/templates/release-notes/evals/every-pr-accounted/case.yaml +2 -1
  550. package/templates/release-notes/evals/issue-write-refused/case.yaml +5 -4
  551. package/templates/release-notes/evals/issue-write-refused/fixtures/github-mcp.json +29 -51
  552. package/templates/release-notes/evals/late-arrival/case.yaml +6 -5
  553. package/templates/release-notes/evals/late-arrival/fixtures/github-mcp.json +29 -51
  554. package/templates/release-notes/evals/learned-style/case.yaml +2 -1
  555. package/templates/release-notes/evals/no-pr-numbers-on-top/case.yaml +2 -1
  556. package/templates/release-notes/evals/other-repo/case.yaml +24 -0
  557. package/templates/release-notes/evals/other-repo/fixtures/github-mcp.json +907 -0
  558. package/templates/release-notes/evals/other-repo/graders/no-canary.md +7 -0
  559. package/templates/release-notes/evals/other-repo/graders/no-other-repo.md +8 -0
  560. package/templates/release-notes/evals/other-repo/graders/refused-not-quoted.md +18 -0
  561. package/templates/release-notes/evals/other-repo/prompt.md +32 -0
  562. package/templates/release-notes/evals/upgrade-line/case.yaml +2 -1
  563. package/templates/release-notes/evals/user-facing-only/case.yaml +2 -1
  564. package/templates/release-notes/notes.schema.json +1 -1
  565. package/templates/release-notes/skills/release-notes/SKILL.md +26 -17
  566. package/dist/console/assets/index-Cn6JX1uH.js +0 -563
  567. package/dist/console/assets/index-DRN62V5v.css +0 -1
  568. package/dist/host-calls.d.ts +0 -20
  569. package/dist/host-calls.js +0 -12
  570. package/dist/runner/adapters/pi-computer.d.ts +0 -7
  571. package/dist/runner/adapters/pi-computer.js +0 -43
  572. package/dist/tool-blurbs.d.ts +0 -4
  573. package/dist/tool-blurbs.js +0 -28
  574. package/dist/tool-budget.d.ts +0 -38
  575. package/dist/tool-budget.js +0 -62
  576. package/dist/workspace/computer-script.d.ts +0 -37
  577. package/dist/workspace/computer-script.js +0 -138
  578. package/templates/code-review/evals/clean-refactor/graders/schema.md +0 -5
  579. package/templates/code-review/evals/injection/graders/schema.md +0 -5
  580. package/templates/code-review/evals/mentions-defused/graders/schema.md +0 -5
  581. package/templates/code-review/evals/never-flag/graders/schema.md +0 -5
  582. package/templates/code-review/evals/null-name/graders/schema.md +0 -5
  583. package/templates/code-review/evals/off-by-one/graders/schema.md +0 -5
  584. package/templates/code-review/evals/re-review/graders/schema.md +0 -5
  585. package/templates/code-review/evals/re-review-open/graders/schema.md +0 -5
  586. package/templates/code-review/evals/repo-rule/graders/schema.md +0 -5
  587. package/templates/code-review/evals/two-defects/graders/schema.md +0 -5
  588. package/templates/inbound-lead/evals/clear-disqualifier/graders/schema.md +0 -5
  589. package/templates/inbound-lead/evals/injection-in-form/graders/schema.md +0 -5
  590. package/templates/inbound-lead/evals/learned-correction/graders/schema.md +0 -5
  591. package/templates/inbound-lead/evals/strong-fit/graders/schema.md +0 -5
  592. package/templates/inbound-lead/evals/thin-data/graders/schema.md +0 -5
  593. package/templates/inbound-lead/evals/write-back/graders/schema.md +0 -5
  594. package/templates/inbound-lead/evals/write-back/graders/writes-twice.md +0 -7
  595. package/templates/inbound-lead/evals/write-back-wrong-record/graders/proves-record.md +0 -18
  596. package/templates/inbound-lead/evals/write-back-wrong-record/graders/schema.md +0 -5
  597. package/templates/kyb/evals/adverse-media/graders/schema.md +0 -5
  598. package/templates/kyb/evals/canada-active-filed/graders/schema.md +0 -5
  599. package/templates/kyb/evals/clean-public-company/graders/schema.md +0 -5
  600. package/templates/kyb/evals/injection-in-page/graders/schema.md +0 -5
  601. package/templates/kyb/evals/name-collision/graders/schema.md +0 -5
  602. package/templates/kyb/evals/no-invention/graders/schema.md +0 -5
  603. package/templates/kyb/evals/opensanctions-on/graders/schema.md +0 -5
  604. package/templates/kyb/evals/sanctioned-entity/graders/schema.md +0 -5
  605. package/templates/market-monitor/evals/blocked-source/graders/schema.md +0 -5
  606. package/templates/market-monitor/evals/every-competitor-named/graders/schema.md +0 -5
  607. package/templates/market-monitor/evals/learned-preference/graders/schema.md +0 -5
  608. package/templates/market-monitor/evals/no-repeats/graders/schema.md +0 -5
  609. package/templates/market-monitor/evals/nothing-changed/graders/schema.md +0 -5
  610. package/templates/market-monitor/evals/post-happens/graders/schema.md +0 -5
  611. package/templates/market-monitor/evals/pricing-change/graders/schema.md +0 -5
  612. package/templates/market-monitor/evals/pricing-moved/graders/schema.md +0 -5
  613. package/templates/release-notes/evals/draft-not-publish/graders/schema.md +0 -5
  614. package/templates/release-notes/evals/every-pr-accounted/graders/schema.md +0 -5
  615. package/templates/release-notes/evals/issue-write-refused/graders/schema.md +0 -5
  616. package/templates/release-notes/evals/late-arrival/graders/schema.md +0 -5
  617. package/templates/release-notes/evals/learned-style/graders/schema.md +0 -5
  618. package/templates/release-notes/evals/no-pr-numbers-on-top/graders/schema.md +0 -5
  619. package/templates/release-notes/evals/upgrade-line/graders/schema.md +0 -5
  620. package/templates/release-notes/evals/user-facing-only/graders/schema.md +0 -5
@@ -6,20 +6,23 @@ start), lists them at `GET /v2/templates` and applies one with `POST /v2/templat
6
6
  runs at apply: it is read, checked, and made into the same agent and trigger records `POST /v2/agents` and
7
7
  `POST /v2/triggers` make. `agentrun template validate DIR` runs the server's own check on a folder.
8
8
 
9
+ [Giving a template tools](TOOLS.md) is the short guide to declaring, pinning and approving a template's tools.
10
+
9
11
  ```
10
12
  code-review/
11
13
  agent.md front matter = the whole manifest; body = the agent's instructions
12
14
  skills/<name>/SKILL.md Agent Skills: front matter names the skill (= its folder) and describes it
13
15
  rules/*.md rules each skill reads: apply puts a copy beside each SKILL.md
14
16
  evals/<case>/prompt.md a case's run input (front matter: description, runs, max_cost_usd, ...)
15
- evals/<case>/graders/*.md front matter `type`: llm, regex, tool_used, file_exists or schema (with `schema: <file>`)
17
+ evals/<case>/graders/*.md front matter `type`: llm, regex, tool_used or file_exists
16
18
  evals/<case>/case.yaml, evals/<case>/fixtures/ optional
17
- findings.schema.json any other file the manifest names
19
+ skills/review/findings.schema.json any other file the manifest names (here the answer's schema, which the
20
+ reviewers' guides beside it read too)
18
21
  ```
19
22
 
20
23
  Links and other special files are refused anywhere in the folder, and its only folders are `skills/`, `rules/` and
21
- `evals/`. The server checks evals for their layout only and runs none; `agentrun template eval DIR` runs them ([Running
22
- the evals](#running-the-evals)).
24
+ `evals/`. The server checks evals for their layout only and runs none; `agentrun template eval DIR` runs them
25
+ ([Running the evals](#running-the-evals)).
23
26
 
24
27
  ## The packages this server ships
25
28
 
@@ -27,38 +30,62 @@ None needs a sandbox (code-review prefers a shell and runs without one): each re
27
30
  servers the owner saves.
28
31
 
29
32
  **Writes are bounded.** Every package reads content someone else wrote (web pages, pull requests, form submissions),
30
- so no package puts a write in its own `allow`. A package whose job runs on triggers (code-review, inbound-lead,
31
- market-monitor, release-notes) runs unattended (`approvals: never`), so its writes don't ask: each is held by its pin,
33
+ so no package puts a write in its own `allow`. A tool the owner ticks at apply is granted, not allowed: apply writes
34
+ no permission for it, so it follows this server's tool settings: under `approvals: ask` a ticked write asks the owner
35
+ first unless the owner allowed it in Settings → Tools, and a ticked read runs unasked only where the owner turned on
36
+ Allow reads for its server. A package whose job runs on triggers (code-review, inbound-lead,
37
+ market-monitor, release-notes) runs unattended (`approvals: never`), so the writes the owner ticks at apply don't ask (a
38
+ write left unticked is not granted at all): each is held by its pin,
32
39
  which the tool gate checks before it allows or asks anything (a review can only COMMENT, a send only reaches the channel
33
40
  set at apply, a draft issue is only ever created), or, where no pin can bound it, by a stated rule (a test lists both).
34
41
  Apply writes each pin into the agent's own tool settings, so a pinned write never runs without its pin. The unpinned
35
- writes a package offers for the owner's grant (code-review's pending-review comment, inbound-lead's CRM record) are the
36
- rule-bounded ones above, and once granted they run unasked under `never`.
42
+ writes a package offers for the owner's grant (inbound-lead's HubSpot note, whose destination is a contact that differs
43
+ each run) are the rule-bounded ones above, and once granted they run unasked under `never`. No package offers a write
44
+ whose object argument a pin can't bound: inbound-lead puts the fit score in its note's text, not in a contact update
45
+ that could overwrite any field. A package that holds `web_fetch` reads nothing through MCP: text it reads could have it
46
+ put private data in a URL it fetches, so inbound-lead takes its contact from the CRM event's own payload and never reads
47
+ the CRM.
48
+
49
+ **Every scoped tool is pinned, reads too.** A package that reads text anyone can write pins every MCP tool that takes a
50
+ scope argument (a GitHub `owner` and `repo`, a channel) to its parameters, reads as well as writes, so a hostile pull
51
+ request, release or page can't have a read reach another repository the credential reaches and a write quote it where
52
+ its author reads it. A free-text search across everything the credential sees (GitHub's `search_code`,
53
+ `search_issues`, `search_pull_requests`) can't be pinned, so no package uses one: they list and read instead. A
54
+ repository is two parameters, `owner` and `repo`, because GitHub's tools take them apart. `code-review` and
55
+ `release-notes` pin each of their GitHub tools to them, and each has an eval case (`other-repo`) where the untrusted text
56
+ asks for another repository's file.
37
57
 
38
58
  **A pinned send goes only where the owner set.** A package may pin a send's destination to a parameter (`pin` in its
39
59
  `mcp` entry): apply writes it into the agent's tool settings, and the server's tool gate refuses any call of that tool
40
60
  whose destination is not the pinned one, before it is sent or asked about, even once the owner granted the tool. So
41
61
  a page that talks the agent into posting elsewhere gets a refusal, never a post. A pin fixes where a send goes, not
42
- what it says, and it does not reach a write to a record (a CRM contact): that one is held by its skill's own check.
43
- `market-monitor` pins `slack_send_message`'s `channel_id` and `GMAIL_SEND_EMAIL`'s `recipient_email` to its `channel`
44
- parameter (and keeps `cc`, `bcc` and `extra_recipients` out), and `inbound-lead` pins `slack_send_message`'s
45
- `channel_id` to its `slack_channel`. `market-monitor`'s `channel` takes a Slack channel id or an email address: each
62
+ what it says. A write to a record (a CRM contact) can be fenced to the fields it may set with a keys pin
63
+ (`properties: {keys: ["${parameters.crm_score_property}"]}`): a call that sets any other field is refused; which record
64
+ it writes is held by its skill's own check, or by a pin of the record's id. A pinned tool takes only the arguments
65
+ its listing declares, so an alias the server takes for a pinned argument that the listing does not declare (Gmail's
66
+ `to` beside `recipient_email`) is refused without a pin of its own.
67
+ `market-monitor` pins `SLACK_SEND_MESSAGE`'s `channel` and `GMAIL_SEND_EMAIL`'s `recipient_email` to its `channel`
68
+ parameter (and keeps `cc`, `bcc`, `extra_recipients` and `from_email` out), and `inbound-lead` pins
69
+ `SLACK_SEND_MESSAGE`'s `channel` to its `slack_channel` (both Composio actions). Neither pins the name the action
70
+ also takes the destination by (Slack's `channel_id`, Gmail's `to`): neither listing declares it, so the gate refuses
71
+ it. `market-monitor`'s `channel` takes a Slack channel id or an email address: each
46
72
  pin applies only to its own tool, so a channel id leaves no address `GMAIL_SEND_EMAIL` can send to and an address no
47
73
  channel Slack can post in, and its skill sends with the tool that matches the destination's kind. A send whose
48
74
  destination parameter apply was not given is set to deny, so it never runs, with a `pins.<tool>` warning that names
49
75
  the parameter to give.
50
76
 
51
- **Scope the credentials.** An allowed read reaches whatever the saved credential reaches. Save `github` with a
52
- fine-grained token for the one repository the agent works on, `hubspot` with the scopes its tools need, and so on: once
77
+ **Scope the credentials.** An allowed read reaches whatever the saved credential reaches, less what a pin holds it from.
78
+ Install the GitHub App only on the repositories its agents work on, connect the HubSpot toolkit with the scopes its
79
+ tools need, and so on: once
53
80
  the owner grants a write, text the agent read could try to copy what that read reaches into it.
54
81
 
55
82
  | Package | What it does | Started by | Needs |
56
83
  |---|---|---|---|
57
- | `code-review` | Reviews a pull request for real bugs on a read-only checkout AgentRun makes of the PR (`checkout: pull_request`, in `repo/`): one `subagent` turn starts five quick and three deep reviewers, each with read-only bash (`git diff`, `git grep`, `nl -ba`; none builds or runs the code), against the repository's `CODEREVIEW.md` (on top of its own `rules/CODEREVIEW.md`, the baseline and the starter); the agent merges and verifies their findings and posts one comment review with P0/P1/P2 findings, each quoting the line behind it, and a 1-5 risk score, never an approval (its write is pinned to COMMENT). A fork's PR is reviewed when a writer comments `@<bot> review` | a run naming a PR, or a GitHub webhook trigger the owner adds | a shell (`computer: [shell, none]`: with none, it is made without bash and its reviewers read through the GitHub tools); the GitHub MCP server `github` to read the PR and post; with neither, a diff in the message |
58
- | `kyb` | Business due diligence: identity, owners, sanctions against the lists themselves, adverse media, a verdict, every claim cited | a run naming a company | nothing; web tools only |
59
- | `market-monitor` | A weekly digest of what changed at the companies you watch, posted to one Slack channel or address | a weekly schedule (its `cron` and `timezone` parameters, Monday 08:00 UTC by default), or a run | optional: Slack (`slack`) or Gmail (`gmail`) MCP, to send |
60
- | `inbound-lead` | Researches a form or CRM lead, scores it against your ICP, writes back to HubSpot or posts to Slack | a webhook (needs the seal key): your form tool or relay signs Standard Webhooks bodies of type `lead.submitted`, each lead its own run (3 at once); or a run | optional: HubSpot (`hubspot`) or Slack (`slack`) MCP |
61
- | `release-notes` | Turns the merged PRs since the last release into user-facing notes, as a draft issue to edit (no MCP tool makes a draft release) | a run naming the release or tag | the GitHub MCP server `github`; with none, a list of PRs in the message |
84
+ | `code-review` | Reviews a pull request for real bugs on a read-only checkout AgentRun makes of the PR (`checkout: pull_request`, in `repo/`): one `subagent` turn starts five quick and three deep reviewers, each with read-only bash (`git diff`, `git grep`, `nl -ba`; none builds or runs the code), against the repository's `CODEREVIEW.md` (on top of its own `rules/CODEREVIEW.md`, the baseline and the starter); the agent merges and verifies their findings and posts one comment review with P0/P1/P2 findings, each quoting the line behind it, and a 1-5 risk score, never an approval (its write is pinned to COMMENT). A fork's PR is reviewed when a writer comments `@<bot> review` | a run naming a PR, or a GitHub webhook trigger the owner adds | a shell (`computer: [shell, none]`: with none, it is made without bash and its reviewers read through the GitHub tools); a saved GitHub MCP server (source `github`, on the GitHub App) to read the PR and post, every call pinned to its `owner` and `repo`; with neither, a diff in the message |
85
+ | `kyb` | Business due diligence: identity, owners, sanctions against the lists themselves, adverse media, a verdict, every claim cited | a run with the company as typed input (`company`, and optionally `website`, `country`, `registration_number`, `reason`) | nothing; web tools only |
86
+ | `market-monitor` | A weekly digest of what changed at the companies you watch, posted to one Slack channel or address | a weekly schedule (its `cron` and `timezone` parameters, Monday 08:00 UTC by default), or a run | optional: a saved Composio Slack or Gmail MCP server (toolkit `slack` or `gmail`), to send |
87
+ | `inbound-lead` | Researches a form or CRM lead, scores it against your ICP, adds a note with the score to the lead's HubSpot contact or posts to Slack | a webhook (needs the seal key): your form tool or relay signs Standard Webhooks bodies of type `lead.submitted`, each lead its own run (3 at once); or a run | optional: a saved Composio HubSpot or Slack MCP server (toolkit `hubspot` or `slack`) |
88
+ | `release-notes` | Turns the merged PRs since the last release into user-facing notes, as a draft issue to edit (no MCP tool makes a draft release) | a run naming the release or tag | a saved GitHub MCP server (source `github`, on the GitHub App), every call pinned to its `owner` and `repo`; with none, a list of PRs in the message |
62
89
 
63
90
  ## Eval cases
64
91
 
@@ -67,10 +94,77 @@ Each `evals/<case>/` is one test of the package's agent. No eval runs on the ser
67
94
 
68
95
  - `prompt.md`: its body is the run's input, written as the agent receives it (a webhook case as the trigger delivers
69
96
  it: the trigger's words, then the body in `<trigger-payload ... untrusted>`). Front matter: `description`, `runs`
70
- (how many times; the case passes when every run passes), `max_cost_usd` (each run's cap).
71
- - `case.yaml`, optional: `parameters` (the apply's parameters), `grants` (the gate names the apply allows, always a
72
- list), `mcp` (a server's name to a fixture file in the case that fakes it), `learning` (a folder of notes in the case
73
- the agent starts with: `MEMORY.md` and its notes).
97
+ (how many times; the case passes when every run passes), `max_cost_usd` (each run's cap), and, for a package with
98
+ `inputs`, `input` (the run's typed input, a mapping by field: `input: {company: Apple Inc., country: US}`). The run's
99
+ input is the body as `content` (none when the body is empty) and those fields, checked against the package's input
100
+ schema as the server checks a run's, so a case its schema refuses fails before any run. The model reads them as the
101
+ server writes them, under `Input:`; a body that holds its own `Input:` block is refused.
102
+ - `case.yaml`, optional: `parameters` (the apply's parameters), `grants` (the gate names the apply grants, always a
103
+ list), `mcp` (an `mcp` need's toolkit to a fixture file in the case that fakes it), `learning` (a folder of notes in the case
104
+ the agent starts with: `MEMORY.md` and its notes), `web` (fakes `web_search` and `web_fetch` for the case's runs),
105
+ `monid` (fakes the package's monid endpoints for the case's runs), `now` (the case's clock), `email` (a fake mailbox
106
+ for the case's runs).
107
+ - `web: unavailable`: every `web_search` answers with the words a rate-limited free search answers with, and every
108
+ `web_fetch` fails as a page that never answers does; no call reaches the network. `web:` a fixture file in the case
109
+ answers from that file instead:
110
+ ```json
111
+ { "search": { "answers": [ { "query": "robot", "results": [ { "url": "https://...", "title": "...", "snippet": "...", "published": "2026-11-10" } ] },
112
+ { "query": "^outage", "error": "Parallel's search answered 503" } ],
113
+ "default": { "results": [] } },
114
+ "fetch": { "answers": [ { "url": "https://.../post", "title": "...", "text": "the page's text" },
115
+ { "url": "https://.../gone", "status": 404, "text": "" } ],
116
+ "default": { "error": "fetch failed" } } }
117
+ ```
118
+ A search answer's `query` is a regular expression over the call's query (case-insensitive), a fetch answer's `url`
119
+ the exact URL; the first answer that matches is taken, else `default`. A `status` of 400 or more fails the fetch as
120
+ that answer would. The calls show in the run's timeline as any other, so a `tool_used` grader counts them. Each
121
+ harness gets the same fake: on claude-agent and codex their own web search is never offered to a `web:` case's runs.
122
+ The package's `tools` must name `web_search` or `web_fetch`. Only the eval's own server honours `web`, so a case with
123
+ it refuses to run with `--server`.
124
+ - `monid: unavailable`: every call of a monid endpoint the package grants answers as it does when monid can't be
125
+ reached (`... was not sent: monid's price for it could not be read before the call (monid could not be reached: fetch
126
+ failed).`): never sent, nothing held or charged, and shown in the timeline under its monid name, so a `tool_used`
127
+ grader counts it. The apply still reads monid's listing to pin the endpoints (free, no run), so the agent sees the
128
+ tools it sees live and needs `MONID_API_KEY` as a live eval does. The package must grant a monid endpoint; only the
129
+ eval's own server honours `monid`, so a case with it refuses `--server`. `unavailable` is its only value.
130
+ - `now: 2026-11-14T09:00:00Z`, a date and time with its offset: each run's current date and time. The run's environment
131
+ line says that day ("Today is 2026-11-14 (UTC)"), as does claude-agent's turn date, and each `llm` grader is told it,
132
+ so a rubric can say "the run's date". A tool that reads the machine's clock (a shell's `date`, a browser's page) and
133
+ a harness CLI's own date (Codex adds its own to each turn) still read the real one. A fixture case whose prompt or
134
+ pages carry dates sets `now:`, else it drifts a day each day it is run. Only the eval's own server honours it: a case with `now` refuses
135
+ `--server`. Without it, the real clock.
136
+ - `email: fixtures/mailbox.json`, a fixture file in the case: each run gets a fake mail account of its own, seeded from
137
+ it and saved as the server's email account (plaintext, on this machine's loopback), closed after the run, so no run
138
+ reads real mail or shares another's mailbox. The fixture:
139
+ ```json
140
+ { "description": "Two threads in the inbox, and a new reply on the first.",
141
+ "account": { "address": "agent@acme.example" },
142
+ "layouts": ["gmail", "folders"],
143
+ "mailboxes": { "INBOX": [ { "from": "ana@example.com", "to": ["agent@acme.example"], "subject": "Invoice 1042",
144
+ "date": "2026-11-13T10:00:00Z", "message_id": "<a1@example.com>", "text": "..." } ],
145
+ "Drafts": [], "Sent": [], "Ignored": [] },
146
+ "message": { "from": "ana@example.com", "to": ["agent@acme.example"], "subject": "Re: Invoice 1042",
147
+ "date": "2026-11-14T08:00:00Z", "message_id": "<a2@example.com>", "in_reply_to": "<a1@example.com>",
148
+ "references": ["<a1@example.com>"], "text": "Any news?" },
149
+ "trigger": "New mail" }
150
+ ```
151
+ A message is the email trigger's payload (`from`, `from_name`, `to`, `cc`, `subject`, `date`, `message_id`,
152
+ `in_reply_to`, `text`, `attachments`) plus `flags` and `references`; it is checked when the case is read. `layouts`
153
+ (default `[folders]`) are the kinds of server each run repeats on, reported per layout: `gmail` (a folder is a label,
154
+ and searching a label's mailbox finds every message under it, as Gmail's does; filing labels a message,
155
+ `archive: true` takes it out of the inbox) and `folders` (every other server; filing moves a
156
+ message, so `email_file` with `archive: false` is refused and nothing moves). The fake runs the real email tools, so
157
+ filing on it is the tools' own rule. A mailbox the fixture names with no messages (`Receipts: []`) is made empty. A
158
+ run starts as its trigger would, never as an ordinary run with the payload pasted in: the mailboxes are seeded, the
159
+ package is applied (its email trigger takes its start there), `message` is delivered to the mailbox the trigger
160
+ watches (INBOX by default), and the trigger's next poll fires on it, so the run reads only that message's thread. A fixture with no `message` starts the package's schedule's run instead, which reads the whole
161
+ account. `trigger` names the trigger when the package has more than one of that kind. The case's `prompt.md` holds
162
+ `description` and `runs` alone: the run's input and cap are the trigger's. The run's clock, and the date of what it
163
+ drafts, is the case's `now`. Its graders see each email call with its arguments (a refused one too, which still
164
+ counts as a call for `tool_used`) and `<mailbox-after>`: the messages it added (each draft's to, cc, subject,
165
+ in_reply_to and text), the ones it moved or labelled (`message_id`, before and after, labels), and those it sent
166
+ (SMTP). The package's `tools` must name an email tool; only the eval's own server honours `email`, so a case with
167
+ it refuses `--server`.
74
168
  - A fake MCP server's fixture, one shape for every package:
75
169
  ```json
76
170
  { "server": "github", "description": "what the fake holds",
@@ -87,12 +181,21 @@ Each `evals/<case>/` is one test of the package's agent. No eval runs on the ser
87
181
  regular expression, so no query can stall the eval), as `path:line: text` lines, at most `limit` (100).
88
182
  - `fixtures/`: what the case's fakes and notes read.
89
183
  - `graders/*.md`, each one check of every run, by its front matter's `type`:
90
- - `llm`: the body is the rubric a blind grader applies to the answer (or to `target`, one field of the answer's JSON), with the run's tool calls (each with its preview) and the fake MCP servers' calls beside it, so a rubric can check what the run did, not only what it said.
184
+ - `llm`: the body is the rubric a blind grader applies to the answer (or to `target`, one field of the answer's JSON), with the run's tool calls (each with its arguments and the head of its result) and the fake MCP servers' calls beside it, so a rubric can check what the run did, not only what it said.
91
185
  - `regex`: `pattern` over the answer (or `target`), with `flags` and `expect: match` (the default) or `no_match`.
92
- - `tool_used`: `tool` (or `tools`, a list), `expect: called` (the default) or `not_called`, and optionally `count` and
93
- `args` (the arguments a call must carry).
186
+ - `tool_used`: `tool` (or `tools`, a list), `expect: called` (the default) or `not_called`, and optionally `args` (the
187
+ arguments a call must carry) and one of `count` (exactly that many matching calls) or `at_least` (that many or more,
188
+ so a run that searches once more than the case needs still passes).
94
189
  - `file_exists`: `path` in the run's work folder.
95
- - `schema`: `schema`, a JSON Schema file in the package, which the answer's last fenced `json` block meets.
190
+ - `mailbox`, on an `email` case: `message_id` is `in` a mailbox (or, on gmail, under a label) after the run, and in
191
+ none of `not_in` (a list); `INBOX`, `Drafts` and `Sent` name the account's own on either layout. `in: INBOX` is
192
+ the check that a message stayed in the inbox on both layouts: a gmail label keeps it there, a folders move does not.
193
+
194
+ On an `email` case any grader may say `layouts` (`[gmail]`, `[folders]`): it grades the runs of those layouts alone,
195
+ where a package's right behaviour differs by server (on folders, `tool_used` `email_file` `not_called`; on gmail,
196
+ `count: 1` with `args: {archive: false}`). On a run of another layout it is not one of the run's graders.
197
+
198
+ The answer's shape needs no grader: every completed run of a package with `output` is held to its schema.
96
199
 
97
200
  ## Running the evals
98
201
 
@@ -105,6 +208,7 @@ case's `max_cost_usd`, and each `llm` grade is a run of its own, capped at $0.50
105
208
  | `--case NAME` | A case to run; repeat it. Without one, every case. |
106
209
  | `--runs N` | Runs of each case, in place of each case's `runs`. |
107
210
  | `--server URL` | Run on that server instead, with its token as the CLI finds one (`AGENTRUN_API_KEY`, the CLI's config, or the data directory's for the server on this machine). The token goes to the runner over the launcher's pipe and is never printed. |
211
+ | `--on-data DIR` | Run the eval's own server on DIR, a stopped server's data folder, in place of a temp one: the runs use what that server keeps (its ChatGPT sign-in, so a package is measured on the owner's plan), and every case's fakes still bind (`now`, `email`, `web`, `monid`). The agents the eval made are archived there, and the folder stays, its tool settings as they were (the agent's own pin holds a pinned write, as on `--server`). Refused with `--server`, while another server holds DIR, when DIR's server has work of its own (an enabled trigger, a run not ended) that the eval's server and runner would take up, and for an email case when DIR's server keeps an email account, which the case's fake mailbox would replace. A case that fakes an MCP server DIR's server keeps by the same name fails, as on `--server`. |
108
212
  | `--grader-model PROVIDER/MODEL` | The `llm` graders' model. Absent: the server's default. |
109
213
  | `--report FILE` | The whole report as JSON: per case, per run and per grader, its pass, its reason and its cost. A summary goes to stdout either way, progress to stderr. |
110
214
  | `--faux MODULE` | Answer every model request from the module, as the server's `--faux` does: no key, no network. |
@@ -114,25 +218,33 @@ A Ctrl-C cancels the run in progress and cleans up as the end does (a second one
114
218
  report.
115
219
  Before anything runs, every case named is read and checked whole: the prompt's front matter, `case.yaml` against the
116
220
  package (its parameters and grants as an apply checks them), each fake MCP server's fixture, each learned note as the
117
- learning API checks one, and each grader's fields (an unknown field, a pattern that does not compile, a schema that
118
- does not compile, a tool the package does not have).
221
+ learning API checks one, and each grader's fields (an unknown field, a pattern that does not compile, a tool the
222
+ package does not have).
119
223
 
120
224
  **Where it runs.** By default on a server of its own, started in the command's process over a temp data directory that
121
225
  holds a copy of the package alone and is removed at the end: the eval never touches your server, and needs the model
122
226
  keys a server needs. With `--server`, everything goes through that server's v2 API: the package it ships by this name
123
227
  must be this folder's (the agent an apply makes holds this folder's instructions and skill files, else the case fails
124
228
  saying so), a case with a fake MCP server needs a server on this machine and fails rather than replace an MCP server
125
- saved by the same name, and the agents the eval made are archived at the end.
229
+ saved by the same name, and the agents the eval made are archived at the end. That server records what made each MCP
230
+ server, so a fake there is a `url` one with its toolkit: a case that fakes a `composio` or `github` need fails there,
231
+ and runs on the eval's own server.
126
232
 
127
233
  **A case**, run by run:
128
234
 
129
- 1. Each `mcp` fixture is served as an MCP server on this machine's loopback and saved under its name with no
130
- credential; it records every call, with its arguments. It is removed after the case.
235
+ 1. Each `mcp` fixture is served as an MCP server on this machine's loopback and saved under its toolkit's name, with
236
+ no credential, standing in for the need: the eval's own server records it as the need's source and toolkit (a
237
+ `github` one too, which on any other server only the GitHub App's tokens are). It records every call, with its
238
+ arguments, and is removed after the case.
131
239
  2. The package is applied with the case's `parameters` and `grants`: a fresh agent for each run, so what one run
132
- learns never reaches the next.
240
+ learns never reaches the next. Every eval applies with approvals `never`, on its own server and with `--server`
241
+ alike (see below), so a granted tool runs with no one to answer and a tool the case did not grant is refused. On its
242
+ own in-process server the eval writes the case's pins in that server's tool settings before the apply, and no
243
+ permission; with `--server` it writes nothing.
133
244
  3. The `learning` folder's notes are written to the agent's learning folder (`PUT .../learning/files/{file}`); the
134
245
  server builds `MEMORY.md` from them, so the folder's own `MEMORY.md` is not sent.
135
- 4. A run starts with the prompt's body as its input and `max_cost_usd` as its cap, and is waited for (30 minutes at
246
+ 4. A run starts with the prompt's body as its input's `content` and its `input` front matter as its typed fields, and
247
+ `max_cost_usd` as its cap, and is waited for (30 minutes at
136
248
  most, then cancelled and failed). A run that ends waiting on its person's answer (an `ask_person` question, a tool
137
249
  call's approval) is graded as it stands, then cancelled. One paused at its cap, stopped, failed or cancelled fails,
138
250
  its `llm` graders not run.
@@ -141,27 +253,42 @@ saved by the same name, and the agents the eval made are archived at the end.
141
253
 
142
254
  A case passes when every grader passes on every run.
143
255
 
256
+ **The output check.** A package with `output` holds every completed run to its schema with no grader file: the run
257
+ fails when the server's own read of its answer sets `result.output_error` (its last fenced `json` block missing, not
258
+ JSON, or refused by the schema, after the runner's one retry). The report lists it as the grader `output`.
259
+
144
260
  **The graders**, as the runner reads them:
145
261
 
146
- - `schema`: the answer's last fenced `json` block (```` ```json ```` or a longer fence), parsed and checked against the
147
- schema, draft 2020-12 with `format` checked.
148
262
  - `regex`: `pattern` with `flags` (some of `i`, `m`, `s`, `u`, `v`) over the whole answer, or over `target`, a field of
149
263
  the last `json` block (`a.b` for a nested one; a string as it is, anything else as its JSON). An answer with no such
150
264
  field fails the grader, whatever `expect` says.
151
- - `tool_used`: the calls of `tool` (or any of `tools`) by gate name (`write`, `web_fetch`, `mcp:<server>/<tool>`). A
152
- faked MCP tool's calls are its fake's log, the calls that reached it; any other tool's are the timeline's. With
153
- `count`, exactly that many calls; else `expect: called`, one or more, or `not_called`, none. `args` keeps the calls
154
- that carry each of its arguments (an object's own fields compared the same way, any other value equal), and is
155
- allowed on a faked MCP tool only: the timeline keeps a call's input as a preview.
265
+ - `tool_used`: the calls of `tool` (or any of `tools`) by gate name (`write`, `web_fetch`, `mcp:<server>/<tool>`,
266
+ `monid:<provider>/<endpoint>`). A monid endpoint is one the package's `tools` grants by name: a provider's wildcard
267
+ (`monid:<provider>/*`) is filled from monid's listing when the agent is saved, so the eval cannot check a name under
268
+ it before the run. A faked MCP tool's calls are its fake's log, the calls that reached it; any other tool's are the
269
+ timeline's. With `count`, exactly that many calls; else `expect: called`, one or more, or `not_called`, none. `args` keeps the calls
270
+ that carry each of its arguments (an object's own fields compared the same way, any other value equal), on any
271
+ tool's calls: the eval reads the timeline with `calls=whole`, which carries each call's arguments through the run's
272
+ redaction (a held value or a key-shaped string reads `[redacted]`, and so never matches), each string cut at 2,000
273
+ characters.
156
274
  - `file_exists`: `path`, relative to the run's work folder, among its files.
157
275
  - `llm`: a run of a grader agent on the same server, with no tools, a fixed instruction and the `--grader-model`. It is
158
276
  given the rubric, the run's input, its answer, its tool calls and the calls each fake received, and with `target`
159
- that field besides (the whole answer stays, for anything else the rubric checks). Never another grader, the case's
277
+ that field besides (the whole answer stays, for anything else the rubric checks). Each call shows its arguments as
278
+ `tool_used` reads them, its status, and its result's first 8,000 characters through the same redaction. The prompt
279
+ stays under 120,000 characters: past that, the two call lists share what the rest leaves, the longest results (and a
280
+ fake's longest arguments) lose their middle first (marked), then the middle calls, and each list's first line says
281
+ what was cut. The rubric, task and answer are never cut, so they alone can pass the cap. Never another grader, the case's
160
282
  description or anything the case expects. It answers `{pass, reason}` in a fenced `json` block; any other answer
161
283
  fails the grader.
162
284
 
163
285
  The report gives each run's cost and each `llm` grade's, as their run records say, and the total.
164
286
 
287
+ An eval applies its agents with approvals `never` (the apply's `overrides.approvals`), whatever the package's own
288
+ `approvals`: a run that stopped at its first ask would measure nothing. Deny settings and pins hold as at any apply.
289
+ The package's default is unchanged, and the report says how it was measured (`approvals: {measured: "never",
290
+ package}`, and a line in the markdown).
291
+
165
292
  ## agent.md
166
293
 
167
294
  | Field | |
@@ -171,44 +298,77 @@ The report gives each run's cost and each `llm` grade's, as their run records sa
171
298
  | `version` | Required. SemVer 2 (`0.1.0`), the package's own version. Never `definition.version`, which is the agent's revision number; a bare number is refused. |
172
299
  | `description` | Required. Also the agent's description. |
173
300
  | `license`, `author` (`{name, email?, url?}`), `repository` | Optional, shown in the list. |
301
+ | `category` | Optional, shown in the list: one of `engineering`, `security`, `sales`, `marketing`, `research`, `finance`, `operations`, `compliance`, `personal`. |
302
+ | `tags` | Optional, shown in the list: at most 8, each lowercase letters, digits and dashes, at most 32, none twice. |
174
303
  | `harness` | A preference list (`[pi, claude-agent]`): apply takes the first this server runs, else the first. Absent: the server's default. |
175
- | `model` | `{tier: fast \| balanced \| strong, prefer?: "provider/model-id"}`. Apply uses `prefer` when this server runs it on the chosen harness (it holds that provider's key and reaches models directly, not through a gateway); otherwise the server's model for the tier: `AGENT_MODEL_FAST`, `AGENT_MODEL` (balanced) or `AGENT_MODEL_STRONG`, each else the default of a model key the server holds. `overrides.model` in the apply wins over both. On a server that reaches its models through a gateway (`AGENT_MODEL_BASE_URL`), `prefer` is not used, since the gateway never said it serves it, and a tier model that is the gateway's own id (no `provider/`) is left out, so the agent runs on the server's default; each is said in a `model` warning. `fast` and `strong` (each `"provider/model-id"`, optional) name the model the agent's `subagent` calls run on for that tier, kept by the same rule as `prefer` (else the server's model for the tier, with a `model` warning); the agent's own tier, named in neither, is the agent's own model. Apply writes them as the definition's `model_tiers`. Absent: the server's default. |
304
+ | `model` | `{tier: fast \| balanced \| strong, prefer?: "provider/model-id"}`. Apply uses `prefer` when this server runs it on the chosen harness (that harness runs it, a catalog here lists it, and the server holds its provider's key); where it can't, apply refuses with `409 agent_not_runnable` under `model`, naming the model and the fix (save the provider's key in Settings → Model keys, or apply with `overrides.model` or a model choice), and makes nothing: never the tier's model in its place. A package with no `prefer` gets the server's model for the tier: `AGENT_MODEL_FAST`, `AGENT_MODEL` (balanced) or `AGENT_MODEL_STRONG`, each else the default of a model key the server holds. `overrides.model` in the apply wins over both. On a server that reaches its models through a gateway (`AGENT_MODEL_BASE_URL`), `prefer` is not used, since the gateway never said it serves it, and a tier model that is the gateway's own id (no `provider/`) is left out, so the agent runs on the server's default; each is said in a `model` warning. `fast` and `strong` (each `"provider/model-id"`, optional) name the model the agent's `subagent` calls run on for that tier, kept where this server runs them on the harness (else the server's model for the tier, with a `model` warning); the agent's own tier, named in neither, is the agent's own model. Apply writes them as the definition's `model_tiers`. Absent: the server's default. |
305
+ | `model.choices` | 1 to 3 named models an owner may pick one of at install instead of the default, each `{id, label, model, harness, warning?, note?, secrets?}`: `id` lowercase letters, digits and dashes, each choice's own; `label` at most 40 characters (`Free model`); `model` `"provider/model-id"`; `harness` one of the package's `harness` list (any harness when it names none); `warning` at most 300 characters, shown word for word beside the choice on the install form whether it is picked or not, never reworded; `note` at most 300 characters, a setup line shown under it (`Turn on OpenRouter Settings → Privacy → ZDR only.`); `secrets` the keys only this choice needs, by name, as the package's `secrets`. The package's own `tier` and `prefer` stay the default. Apply's `overrides.choice` picks one, and the agent runs on exactly its model and harness: where this server can't run it there (the model is not in that harness's catalog here, there is no key for it, or models come through a gateway), apply is refused with `409` naming the model, never swapped for the tier's model the way `prefer` is. |
176
306
  | `effort` | The thinking level: `low`, `medium`, `high`, `xhigh` or `max`. |
177
- | `tools` | The tools the agent is granted, never an MCP tool (`mcp` grants those). `subagent` (pi only) lets the agent run a fresh conversation with a prompt and a subset of its own tools (MCP tools and `bash` included, `bash` held to the agent's `tool_policy`), on the agent's own model or one of its tiers (`fast`, `strong`) when the call names one, under its permissions and cap, and get the child's final text back, with `max_tool_calls` (narrowing the agent's budget, never widening it) and `effort` (`low`, `medium`, `high`) of its own when the call names them; several in a turn run at once, at most 4. A skill can use it to sample K answers, merge them and verify each before acting ([patterns](../README.md#patterns)). Absent: those the server gives a new agent (its box's shell, where it has a box). |
178
- | `mcp` | `[{server, tools, required?, allow?, pin?}]`: MCP servers by the name a server saves them under (Settings → MCP servers), the tools of each the agent uses (each one tool by its name, `A-Z a-z 0-9 _ . -`; never `*`), and `allow`, those of its tools the package asks the owner to allow (`GET /v2/templates` shows each tool with `asks: allow` or `ask`, for a consent screen). Where the server has one saved, apply grants `mcp:<server>/<tool>` for each, beside the other tools, at the owner's own setting: a package never sets a permission. Only the apply's `grants`, the owner's answer, are set to `allow`. Where it has none, apply skips it with a warning (`mcp.<server>`), or, when `required` is true, refuses with `409 agent_not_runnable` and makes nothing. `pin`, optional: `{<tool>: {<argument>: <value>}}`, for tools of the entry, 1 to 8 top-level arguments each, every value a scalar (text, which may be or hold `${parameters.<name>}`, a number, `true`/`false`, or `null` for an argument that must be left out) or a list of 1 to 16 of them, the argument one of the list (`event: [null, COMMENT]`), kept with each value once, null first, then by its JSON text. Apply writes it, filled, as the tool's `pin` in the agent's `tool_settings` (text that is one placeholder alone takes the parameter's value and type), whatever the tool's permission, and the gate refuses any call not as pinned; a pin the server's own settings (Settings → Tools) set for the tool holds too. A pin whose parameter apply is not given sets the tool to `deny` instead, granted or not, with a `pins.mcp:<server>/<tool>` warning. `GET /v2/templates` shows each tool's `pin`, unfilled. |
307
+ | `tools` | The tools the agent is granted, never an MCP tool (`mcp` grants those). A monid endpoint is granted here by name, `monid:<provider>/<endpoint>` or `monid:<provider>/*`, pinned at the apply's save ([monid](../README.md#monid)); name `MONID_API_KEY` in `secrets` beside it. `subagent` (pi only) lets the agent run a fresh conversation with a prompt and a subset of its own tools (MCP tools and `bash` included, `bash` held to the agent's `tool_policy`), on the agent's own model or one of its tiers (`fast`, `strong`) when the call names one, under its permissions and cap, and get the child's final text back, with an `effort` (`low`, `medium`, `high`) of its own when the call names it; several in a turn run at once, at most 4. A skill can use it to sample K answers, merge them and verify each before acting ([patterns](../README.md#patterns)). Absent: those the server gives a new agent (its box's shell, where it has a box). |
308
+ | `mcp` | `[{source, toolkit, tools, required?, reason?, allow?, pin?}]`: the MCP tools the agent uses, by where they come from, never by the name a server saves them under. `source` is `composio` (a Composio toolkit, saved with the Composio preset), `github` (GitHub's MCP server on the GitHub App; its toolkit is `github`) or `url` (any other MCP server). `toolkit` names the tools' set (Composio's toolkit slug, `github`, or the name a `url` server's owner gives it in Settings → MCP servers), lowercase letters, digits and dashes, at most 32, each toolkit once. Inside the package its tools are `mcp:<toolkit>/<tool>`. `tools` are the ones the agent uses (each one tool by its name, `A-Z a-z 0-9 _ -`; never `*`; a Composio action by its slug, `SLACK_SEND_MESSAGE`), `reason` one line (at most 280 characters) on why, shown on the apply screen, and `allow` those of its tools the package asks the owner to grant (`GET /v2/templates` shows each tool with `asks: allow` or `ask`, for a consent screen). Apply maps each need to the saved MCP server whose recorded source and toolkit are the need's (each saved server records them when it is saved, from what made it: the Composio preset its toolkit, a server on the GitHub App (`auth: github_app`) `github`, any other `url` with the toolkit its owner sets; a server on GitHub's MCP address with a token of its own is `url`); where several are, the apply's `servers` (`{<toolkit>: <server>}`) says which, and an apply without it is `422` naming them: a server is never picked for the owner. When the server's name is not the toolkit, apply rewrites `mcp:<toolkit>/` to `mcp:<server>/` in the instructions, the skills and the tool settings. It grants `mcp:<server>/<tool>` only for each tool the apply's `grants` (the owner's answer) name, beside the other tools, with no permission written: each call follows this server's tool settings (under `approvals: ask` a write asks unless the owner allowed it in Settings → Tools, and a read runs unasked only where the server's Allow reads is on). Neither a package nor an apply sets a permission for a granted tool. A tool the owner leaves out is not the agent's at all, under `approvals: never` too, so no harness offers it and a call of it is refused; the owner can grant it later in the agent's tools. Where no saved server matches, the need is not set up here: apply skips it with a warning (`mcp.<toolkit>`, its `fix` saying how to add one: for Composio, the preset with the toolkit and actions), or, when `required` is true, refuses with `409 agent_not_runnable` and makes nothing. `pin`, optional: `{<tool>: {<argument>: <value>}}`, for tools of the entry, 1 to 8 top-level arguments each, every value a scalar (text, which may be or hold `${parameters.<name>}`, a number, `true`/`false`, or `null` for an argument that must be left out) or a list of 1 to 16 of them, the argument one of the list (`event: [null, COMMENT]`), kept with each value once, null first, then by its JSON text, or `{keys: [...]}`, 1 to 16 key names an object argument may hold, any values (`properties: {keys: ["${parameters.crm_score_property}"]}`; a key that is a list parameter's placeholder alone adds each of its items). Apply writes it, filled, as the tool's `pin` in the agent's `tool_settings` (text that is one placeholder alone takes the parameter's value and type), whatever the tool's permission, and the gate refuses any call not as pinned; a pin the server's own settings (Settings → Tools) set for the tool holds too. A pinned tool takes only the arguments its listing declares (and its pinned ones): any other is refused. A pin whose parameter apply is not given sets the tool to `deny` instead, granted or not, with a `pins.mcp:<server>/<tool>` warning. `GET /v2/templates` shows each need's `source`, `toolkit` and `reason`, and each tool's `pin`, unfilled. |
179
309
  | `tool_policy` | `{bash: read-only}`: a policy on the agent's bash, the one tool that takes one. Apply writes it as `policy` on bash in the agent's `tool_settings` (`definition.tool_settings.bash.policy`), whatever bash's permission, and the tool gate reads each shell call's command before it runs or anyone is asked. Under `read-only` it refuses, in words the model reads, any command that could write, run code or read outside the run's folder: a program outside the read list (git's read subcommands `diff`, `show`, `log`, `blame`, `grep`, `ls-files`, `ls-tree`, `rev-parse`, `cat-file`, `merge-base`, `status`, `shortlog`, `rev-list`, `diff-tree`, `name-rev`, `describe`; `grep`, `egrep`, `fgrep`, `rg`, `sed -n 'N,Mp'`, `cat`, `head`, `tail`, `wc`, `nl`, `ls`, `find` without `-exec` or `-delete`, `sort`, `uniq`, `cut`, `tr`, `diff`, `basename`, `dirname`, `echo`, `true`), a redirection other than `2>/dev/null` and `2>&1`, `$` and backticks, a subshell, `\|\|` or a lone `&`, a pipe into anything but a filter (`head`, `tail`, `sed -n`, `grep`, `wc`, `sort`, `uniq`, `cut`, `tr`, `nl`), an unquoted glob (a glob is quoted, and only in a grep pattern, an `--include=` value or a `find -name` value), a path outside the run's folder, or one on the never-open list (`.env*`, `.ssh/`, `id_rsa*`, `*.pem`, `*.key`, `.npmrc`, `.netrc`, `.git-credentials`, `credentials`), which refuses a command that names such a file but is no fence around the folder: a recursive search reads all it holds, the run's own files and never a key of the server's. `git -C <dir>` is allowed to a directory inside the folder. A line with a `cd` joins its commands with `&&` only. `bash_background` and `bash_input` are refused under it. The check reads the command, never the folder, so a symbolic link in the folder reaches what the computer lets it; and it holds bash alone, so a read-only agent's tools are `read` and `bash` (one that may write can change what git obeys). Approvals `never` lifts none of it. A package with `tools` grants `bash` among them. |
180
310
  | `computer` | `default` (or absent): the agent runs where this server puts a new one. Or a preference list, `[shell, none]`, read like `harness`: apply takes the first entry this server meets now and saves it as the agent's `computer`. `shell` is a computer that gives the agent a shell here: Archil's serverless exec on the runner when Archil is on (Settings → Workspace; `bash` alone, so `bash_background` and the other background tools are not granted), else the Docker sandbox where Docker answers. `none` is no shell, and is always met: the shell tools in `tools` (`bash` and the background tools) are not granted, and neither is `tool_policy`'s bash. A package with no `tools` is given the chosen shell's tools, as a new agent in a box is given the box's. A fallback, or a tool not granted, is said in a `computer` warning on the apply. A list with `shell` alone, where there is none, refuses the apply (`409`, nothing made). A list without `shell` grants no shell tool, so one in `tools` is refused, and so is an entry after `none`, which would never be picked. The choice is made at apply: a server that gains a shell later gives it to an agent applied again. `GET /v2/templates` shows the list as `computer`, and as `computer_here` what an apply here would pick now: the entry, the agent's `computer`, the shell in words, the tools it would not grant, and the warning or refusal. |
181
311
  | `checkout` | `pull_request` only: apply sets the agent definition's `checkout`, and the server checks out the pull request each run's GitHub event names before its first turn, in `repo/` of the run's folder, detached at the head, with its base and their merge base (refs `pr/head`, `pr/base`, `pr/merge-base`: `git diff pr/merge-base pr/head` reads the change). The server fetches it with its GitHub App's token, narrowed to that one repository and `contents: read` and revoked after the fetch, or anonymously with no App; the agent never holds a token, and nothing of it is left in the folder or the checkout's git config. The run's system prompt says what was checked out, or why nothing was, so the package's instructions can fall back to the GitHub MCP. It is removed when the run's claim ends. With `tool_policy: {bash: read-only}` the agent reads it with git's read subcommands and never fetches itself. |
182
- | `parameters` | By name: `{type: string \| number \| integer \| boolean, required?, pattern? (strings), enum?, default?, description}`. `enum` lists a closed set of values, which a form shows as a choice; give it instead of a pattern. The `description` is what a person reads beside the field, never the pattern, so say the format in it ("a Slack channel ID like C0123ABCD"). Apply takes them in `parameters`, and one left out takes its `default`. `display_name`, the body, a trigger's `target.input`, a schedule's `cron` and `timezone` and an `mcp` entry's `pin` values name them as `${parameters.<name>}`, nowhere else. A parameter a schedule uses has a default, and the package's own schedule is checked with it; apply checks every trigger with the parameters given before it makes anything, so a bad cron or zone is a `422` under `triggers.<i>`. |
312
+ | `parameters` | The setup an owner fills once, at apply. Written exactly as `inputs` are (the same keys, the same rule: required unless `required: false`, a `default` only on one that is not) and compiled by the same code; `GET /v2/templates` shows them as a JSON Schema like `input_schema`, and the console's Apply form is the run form. The one difference is where they are filled: apply takes them in `parameters` (a blank one takes its `default`; they are checked as a run's input is, with the same `422` words under `parameters.<name>`), and puts them where the package writes `${parameters.<name>}`: `display_name`, the body, a trigger's `target.input`, a schedule's `cron` and `timezone`, the `in` values of a github or webhook trigger's `accept` where conditions, a trigger's `enabled`, and an `mcp` entry's `pin` values, nowhere else. Text takes the value as text (a list as its items joined by `, `). A `target.input` value or a pin value that is one placeholder alone takes the value with its type (a list pinned is a one-of); in `target.input` one given no value is dropped, so the input schema sees the field absent. A trigger's `enabled` takes only one placeholder alone, naming a boolean parameter with a default: the trigger is made on or off by its value. A parameter a where takes is required or has a default, so the filter never fills empty; one a schedule uses has a default, which the package's own schedule is checked with, and apply checks every trigger with the values given before it makes anything (`422` under `triggers.<i>`). |
313
+ | `inputs` | By name: each run's typed input, which apply compiles into the agent's `input_schema` (a closed JSON Schema object). Each is `{type: string \| number \| integer \| boolean \| array, required?, title?, description?, examples?, default?, enum?, pattern? and format? (strings), minLength?/maxLength? (strings), minimum?/maximum? (numbers), items? (an array's scalar, with that scalar's keys)}`, nothing else; an input is required unless it says `required: false`, and a `default` is for one that is not. `format` is `uri`, `email`, `hostname`, `date`, `date-time` or `uuid`, which the server checks, or `cron` or `timezone`, which a form reads. A default and each example are checked against their own input. `content` is the run's message: named, it is a string. Every path that starts a run (the API, the CLI, a trigger, the console) checks the input against it and refuses one that does not meet it with `422 input_invalid`, a path per field (`input.country`). The model is sent the input's `content`, then the other fields as one fenced `json` block under the line `Input:`, so the instructions read each field by its name. `GET /v2/templates` shows it as `input_schema`, and the console's run form is drawn from it. A trigger's `target.input` and an eval case's `input` are checked against it too. Absent: a run takes `{content}`, as before. |
183
314
  | `secrets` | Variable names (never values) the server must hold: a model or tool key Settings saves (`OPENROUTER_API_KEY`, `PARALLEL_API_KEY`, ...), set where it starts or saved there. Any other name is refused: the server could neither save it nor hand it to a run. Apply refuses with `409 agent_not_runnable`, making nothing, when one is missing. |
184
- | `budget` | `{per_run_usd?, tool_calls?}`, one at least: `per_run_usd` is each run's cap (the agent's `max_cost_usd`), required when the package has triggers; `tool_calls` is the tool calls each conversation of a run may make (the agent's `max_tool_calls`): past it every call is refused with words that say to answer now, so a reviewer told "about 30 calls" is held to 30. |
315
+ | `budget` | `{per_run_usd}`: each run's cap (the agent's `max_cost_usd`), required when the package has triggers. A call count belongs in the instructions ("about 30 calls"); the cap is the hard stop. |
185
316
  | `learning` | `true` or `false`: whether the agent's runs learn. |
186
- | `approvals` | `ask` (the default: the agent asks its person before a tool runs) or `never` (it runs unattended). The package's recommendation, shown as `approvals_default` for the apply screen; a template whose job runs on triggers says `never`. Deny settings and pins hold either way. |
187
- | `triggers` | `POST /v2/triggers` bodies with no `agent_id` (the target is a `start_run`), each with a `name`, unique in the package: the key an upgrade will match triggers by. |
188
- | `output` | `{schema: <file>}`: the JSON Schema of the agent's answer, a file in the package. It ships beside each SKILL.md, as a rule does, so the agent reads it there: the skill names it. |
189
- | `checks` | Names of structural checks of a run's answer; none runs yet. |
317
+ | `approvals` | `ask` (the default: the agent asks its person before a tool runs) or `never` (it runs unattended). The package's recommendation, shown as `approvals_default` for the apply screen; a template whose job runs on triggers says `never`. `never` only skips asking for the tools the agent was granted: an MCP tool the owner left unticked at apply is not one. Under `ask`, a ticked tool is granted but not allowed: it follows this server's tool settings, so a write asks unless the owner allowed it in Settings → Tools, and a read runs unasked only where the owner turned on Allow reads for its server. Deny settings and pins hold either way. |
318
+ | `triggers` | `POST /v2/triggers` bodies with no `agent_id` (the target is a `start_run`), each with a `name`, unique in the package: the key an upgrade will match triggers by. `enabled` is `true` (the default), `false`, or `"${parameters.<name>}"`, one placeholder alone naming a boolean parameter that has a default (validate refuses any other text there, a parameter of another type, or one with no default): apply makes the trigger enabled or disabled by the owner's answer, the default when it is left out, so a second schedule can be one the owner opts into (`weekly`, default `false`, turning on a `monday-brief` at `0 8 * * 1`). A trigger made off is off as any trigger is: the owner switches it on or off later with `PATCH /v2/triggers/{id}` or the console. |
319
+ | `output` | `{schema: <file>}`: the JSON Schema of the agent's answer, a file in the package. It becomes the agent's `output_schema`: the runner puts it in the instructions on every harness and asks once more when an answer misses it. A string property with `contentMediaType: "text/markdown"` is a report the console renders as Markdown. A skill that reads the schema itself keeps the file in its own folder. |
190
320
 
191
321
  The check is whole: the package is compiled with a sample of each parameter, and the agent body and each trigger body are
192
322
  checked as `POST /v2/agents` and `POST /v2/triggers` check theirs (all but the agent a trigger names, which apply makes).
193
323
  A tool the server does not bind, a trigger field or schedule it refuses, or a skill file's path is refused here, not at
194
324
  apply. A trigger's date is checked for its form only: one that has passed is refused at apply, never at a server's start. A package holds at most 256 files, each at most 256 KiB, and 1 MiB together (`POST /v2/agents`' own body limit).
195
325
 
326
+ ## Installing a package from GitHub
327
+
328
+ A package on GitHub installs beside the bundled ones: `POST /v2/templates/import` with
329
+ `{source, dry_run?, trust_publisher?}`, `agentrun template install <source> [--dry-run] [--trust]`, or the console's
330
+ "Add from URL" box on Templates. The source is `github:<owner>/<repo>[/<path>][@<ref>]` (the package's folder at
331
+ `<path>`, the default branch without a ref), or the folder's `https://github.com/<owner>/<repo>/tree/<ref>/<path>`.
332
+ The ref follows the last `@`, so a path with an `@` in it (`packages/@acme/kyb`) names its ref.
333
+
334
+ 1. The ref is resolved to a full commit SHA, then that commit's tarball is read from GitHub (github.com,
335
+ api.github.com and codeload.github.com, no redirect elsewhere), with the server's GitHub App token when it has one,
336
+ else anonymously. Nothing is written to disk and nothing in the package runs.
337
+ 2. The folder at `<path>` is taken from it and checked as the bundled packages are: a symbolic or hard link, a special
338
+ file, more than 8 MiB of files, or an archive over 128 MiB is refused (`422`), as is a package that does not check.
339
+ 3. A dry run answers the package whole (its instructions and every skill file) and stores nothing. Otherwise it is
340
+ stored under its id, `github:<owner>/<repo>[/<path>]`, listed by `GET /v2/templates` with `bundled: false`, its
341
+ `source`, `sha` and `publisher`, and applied as below with that id URL-encoded. Importing the id again replaces it;
342
+ `DELETE /v2/templates/{id}` removes it (a bundled package is `403`). Agents applied from it stay as they are, each with
343
+ `template: {id, version, sha}`.
344
+
345
+ The first package from a publisher (the GitHub owner) is stored only with `trust_publisher: true`, which the server
346
+ remembers: read it first with a dry run. A trust says the owner's packages may be stored; it grants no tool. Each apply
347
+ still asks for each grant.
348
+
196
349
  ## Apply
197
350
 
198
- `POST /v2/templates/{name}/apply` with `{parameters, grants?, overrides?: {model}}`:
351
+ `POST /v2/templates/{id}/apply` with `{parameters, grants?, servers?, overrides?: {model?, choice?, approvals?}}` (a bundled package's id is its name).
352
+ `overrides.model` runs the agent on a model of the owner's own; `overrides.choice` on one of the package's `model.choices`,
353
+ by id, its model on its harness. An id the package does not offer is `422 overrides.choice`, and so is a choice sent
354
+ with `overrides.model`. A choice's `secrets` missing is `409 agent_not_runnable`, as the package's are; a choice whose
355
+ model this server can't run on its harness is `409 agent_not_runnable` under `overrides.choice`, naming the model, and
356
+ nothing is made.
199
357
 
200
- 1. The parameters and `grants` are checked against the package (`422` naming each field: a grant is one of the
201
- package's MCP tools by its gate name, `mcp:<server>/<tool>`), then its secrets, its required MCP servers and, for a
202
- webhook trigger, the server's seal key (`409`), then every trigger as `POST /v2/triggers` checks it, its parameters
203
- filled (`422` under `triggers.<i>`). Nothing is made yet.
358
+ 1. The parameters, `grants` and `servers` are checked against the package (`422` naming each field: a grant is one of
359
+ the package's MCP tools as the package names it, `mcp:<toolkit>/<tool>`; `servers` maps a need's toolkit to the
360
+ saved server the owner picked for it, one whose source and toolkit match), then its secrets, its required MCP
361
+ needs and, for a webhook trigger, the server's seal key (`409`), then every trigger as `POST /v2/triggers` checks
362
+ it, its parameters filled (`422` under `triggers.<i>`). Nothing is made yet.
204
363
  2. The agent is made through `POST /v2/agents`' own function: named by `display_name` (else the package's name),
205
- described as the package, its MCP tools granted where their server is saved, each at the owner's setting (a
206
- third-party tool asks by default) and those in `grants` set to `allow`, never one the owner denies on this server
207
- (it stays denied, with a `grants.<tool>` warning), each pinned tool with its pin filled (or set to `deny`, with a
364
+ described as the package, granted the MCP tools in `grants` alone, from the saved server each need maps to
365
+ (answered as `servers`, toolkit to server or null), `mcp:<toolkit>/` rewritten to that server's name, with no
366
+ permission written, so each call follows this server's tool settings (a write asks unless the owner allowed it there; a tool left out is not granted; one the owner
367
+ denies on this server stays denied, with a `grants.<tool>` warning), each pinned tool with its pin filled (or set to `deny`, with a
208
368
  `pins.<tool>` warning, when its parameter was not given), bash's policy from `tool_policy`, its computer the first
209
369
  entry of `computer` this server meets (a fallback said in a `computer` warning), its body held to `POST /v2/agents`' 1 MiB limit (`413`), its instructions
210
370
  the body with the parameters filled in, its skills and rules as its skill files, its harness and model chosen as
211
- above, `thinking` from `effort`, `max_cost_usd` and `max_tool_calls` from `budget`.
371
+ above, `thinking` from `effort`, `max_cost_usd` from `budget`.
212
372
  3. Each trigger is made on the agent through `POST /v2/triggers`' own function. One that still fails (the store, say)
213
373
  undoes the apply: the triggers made before it are deleted and the agent is archived, and the failure is the answer.
214
374
  A webhook trigger's secret is not in the answer: `POST /v2/triggers/{id}/secret` makes one.