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

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 (399) hide show
  1. package/CHANGELOG.md +282 -0
  2. package/README.md +155 -92
  3. package/dist/agent-rows.d.ts +1 -1
  4. package/dist/agents-store.d.ts +35 -3
  5. package/dist/agents-store.js +39 -14
  6. package/dist/answer-json.d.ts +34 -1
  7. package/dist/answer-json.js +91 -9
  8. package/dist/api-only.d.ts +1 -1
  9. package/dist/api-only.js +2 -2
  10. package/dist/browser-cost.js +52 -93
  11. package/dist/cap.d.ts +0 -390
  12. package/dist/cap.js +4 -937
  13. package/dist/catalog.js +1 -1
  14. package/dist/composio-preset.d.ts +17 -0
  15. package/dist/composio-preset.js +43 -1
  16. package/dist/computer-calls.d.ts +36 -24
  17. package/dist/computer-calls.js +110 -27
  18. package/dist/computer-live.d.ts +5 -0
  19. package/dist/computer-live.js +12 -0
  20. package/dist/computer-setting.d.ts +15 -2
  21. package/dist/computer-setting.js +20 -4
  22. package/dist/computer-view.d.ts +3 -2
  23. package/dist/computer-view.js +5 -4
  24. package/dist/computer-viewer.js +26 -12
  25. package/dist/computers.d.ts +4 -1
  26. package/dist/computers.js +12 -6
  27. package/dist/console/assets/index-CjqQirbo.css +1 -0
  28. package/dist/console/assets/index-b6-XY5A9.js +576 -0
  29. package/dist/console/index.html +2 -2
  30. package/dist/console-links.d.ts +2 -0
  31. package/dist/console-links.js +3 -0
  32. package/dist/decisions.js +4 -0
  33. package/dist/faux-computers.js +4 -2
  34. package/dist/harness-opencode/adapter.js +7 -3
  35. package/dist/harness-opencode/facts.js +0 -2
  36. package/dist/harness-opencode/host/policy.d.ts +2 -5
  37. package/dist/harness-opencode/host/policy.js +8 -32
  38. package/dist/harness-table.d.ts +0 -2
  39. package/dist/harness-table.js +0 -2
  40. package/dist/host-tools.d.ts +1 -5
  41. package/dist/host-tools.js +7 -10
  42. package/dist/hosted-search.d.ts +0 -2
  43. package/dist/hosted-search.js +0 -21
  44. package/dist/key-words.d.ts +3 -2
  45. package/dist/key-words.js +4 -2
  46. package/dist/learn/check.d.ts +6 -1
  47. package/dist/learn/check.js +12 -4
  48. package/dist/learn/commit.d.ts +10 -0
  49. package/dist/learn/commit.js +18 -4
  50. package/dist/learn/compile.d.ts +243 -0
  51. package/dist/learn/compile.js +471 -0
  52. package/dist/learn/general.d.ts +3 -0
  53. package/dist/learn/general.js +4 -2
  54. package/dist/learn/grade.d.ts +1 -1
  55. package/dist/learn/grade.js +7 -6
  56. package/dist/learn/notes.d.ts +8 -0
  57. package/dist/learn/notes.js +18 -0
  58. package/dist/learn/promote.d.ts +253 -0
  59. package/dist/learn/promote.js +428 -0
  60. package/dist/learn/refit.d.ts +39 -0
  61. package/dist/learn/refit.js +236 -0
  62. package/dist/learn/reflect.d.ts +5 -25
  63. package/dist/learn/reflect.js +14 -131
  64. package/dist/learn/replay-calls.d.ts +63 -0
  65. package/dist/learn/replay-calls.js +158 -0
  66. package/dist/learn/skills.d.ts +17 -9
  67. package/dist/learn/skills.js +132 -42
  68. package/dist/learn/workflow-nodes.d.ts +15 -0
  69. package/dist/learn/workflow-nodes.js +44 -0
  70. package/dist/learned-nodes.d.ts +50 -2
  71. package/dist/learned-nodes.js +41 -2
  72. package/dist/learned-workflow.d.ts +19 -3
  73. package/dist/learned-workflow.js +105 -26
  74. package/dist/learning-batch.d.ts +2 -2
  75. package/dist/learning-batch.js +1 -1
  76. package/dist/learning-cost.d.ts +18 -6
  77. package/dist/learning-cost.js +15 -7
  78. package/dist/learning-routes.d.ts +14 -2
  79. package/dist/learning-routes.js +14 -3
  80. package/dist/learning-words.d.ts +7 -0
  81. package/dist/learning-words.js +7 -0
  82. package/dist/learning.d.ts +31 -6
  83. package/dist/learning.js +7 -4
  84. package/dist/llm.js +0 -3
  85. package/dist/mcp-gateway.d.ts +12 -20
  86. package/dist/mcp-gateway.js +16 -44
  87. package/dist/mcp-oauth.d.ts +5 -0
  88. package/dist/mcp-oauth.js +1 -1
  89. package/dist/mcp-pin-first.d.ts +37 -0
  90. package/dist/mcp-pin-first.js +107 -0
  91. package/dist/mcp-probe.d.ts +8 -9
  92. package/dist/mcp-probe.js +16 -33
  93. package/dist/mcp-servers-store.d.ts +89 -22
  94. package/dist/mcp-servers-store.js +131 -25
  95. package/dist/mcp-sources.d.ts +39 -0
  96. package/dist/mcp-sources.js +74 -0
  97. package/dist/mcp-store.d.ts +11 -0
  98. package/dist/mcp-store.js +16 -2
  99. package/dist/mcp-wire.d.ts +22 -0
  100. package/dist/mcp-wire.js +36 -0
  101. package/dist/mcp.js +3 -3
  102. package/dist/meta-tool-names.d.ts +1 -0
  103. package/dist/meta-tool-names.js +3 -0
  104. package/dist/model.d.ts +13 -0
  105. package/dist/model.js +46 -15
  106. package/dist/monid.d.ts +51 -25
  107. package/dist/monid.js +226 -140
  108. package/dist/openapi.js +336 -66
  109. package/dist/paid-calls.d.ts +26 -29
  110. package/dist/paid-calls.js +46 -102
  111. package/dist/propose.d.ts +7 -1
  112. package/dist/propose.js +18 -6
  113. package/dist/provider.js +9 -2
  114. package/dist/reflect-range.js +2 -1
  115. package/dist/rows.d.ts +5 -3
  116. package/dist/rows.js +15 -4
  117. package/dist/run-launch.d.ts +13 -0
  118. package/dist/run-launch.js +6 -0
  119. package/dist/run-learning-served.d.ts +13 -2
  120. package/dist/run-manifest.d.ts +5 -0
  121. package/dist/run-manifest.js +20 -0
  122. package/dist/run-secrets.js +2 -3
  123. package/dist/run-timeline-served.js +5 -2
  124. package/dist/run-view.d.ts +17 -6
  125. package/dist/run-view.js +51 -22
  126. package/dist/runnable.d.ts +0 -3
  127. package/dist/runnable.js +37 -29
  128. package/dist/runner/adapter-loop.d.ts +24 -10
  129. package/dist/runner/adapter-loop.js +852 -314
  130. package/dist/runner/adapter-run-spec.d.ts +12 -6
  131. package/dist/runner/adapter-run-spec.js +97 -46
  132. package/dist/runner/adapters/pi-computer.d.ts +3 -1
  133. package/dist/runner/adapters/pi-computer.js +13 -5
  134. package/dist/runner/adapters/pi.d.ts +16 -7
  135. package/dist/runner/adapters/pi.js +94 -33
  136. package/dist/runner/cli-run-spec.js +67 -27
  137. package/dist/runner/computer-channel.js +2 -1
  138. package/dist/runner/conformance/harness.d.ts +3 -0
  139. package/dist/runner/conformance/harness.js +145 -4
  140. package/dist/runner/conformance/subject.d.ts +11 -4
  141. package/dist/runner/end-of-run.d.ts +6 -5
  142. package/dist/runner/end-of-run.js +9 -6
  143. package/dist/runner/feedback-round.d.ts +52 -0
  144. package/dist/runner/feedback-round.js +79 -0
  145. package/dist/runner/journal-kinds.d.ts +24 -6
  146. package/dist/runner/journal-kinds.js +15 -0
  147. package/dist/runner/learning-end.d.ts +54 -19
  148. package/dist/runner/learning-end.js +272 -99
  149. package/dist/runner/learning-loop.d.ts +19 -1
  150. package/dist/runner/learning-loop.js +5 -2
  151. package/dist/runner/learning-seed.d.ts +4 -0
  152. package/dist/runner/learning-seed.js +14 -0
  153. package/dist/runner/loop-contract.d.ts +19 -3
  154. package/dist/runner/loop.d.ts +16 -1
  155. package/dist/runner/loop.js +21 -1
  156. package/dist/runner/mcp-claim.d.ts +5 -1
  157. package/dist/runner/mcp-claim.js +66 -50
  158. package/dist/runner/mcp-run.d.ts +16 -52
  159. package/dist/runner/mcp-run.js +12 -84
  160. package/dist/runner/meta-tools.d.ts +37 -0
  161. package/dist/runner/meta-tools.js +268 -0
  162. package/dist/runner/metrics.js +14 -3
  163. package/dist/runner/model-route.js +12 -3
  164. package/dist/runner/monid-run.d.ts +16 -0
  165. package/dist/runner/monid-run.js +96 -0
  166. package/dist/runner/promotion.d.ts +80 -0
  167. package/dist/runner/promotion.js +562 -0
  168. package/dist/runner/reflect-hook.d.ts +36 -21
  169. package/dist/runner/reflect-hook.js +138 -49
  170. package/dist/runner/runner.js +26 -4
  171. package/dist/runner/sessions.d.ts +8 -3
  172. package/dist/runner/sessions.js +5 -1
  173. package/dist/runner/step-guard.d.ts +62 -0
  174. package/dist/runner/step-guard.js +93 -0
  175. package/dist/runner/subagent.d.ts +0 -3
  176. package/dist/runner/subagent.js +7 -12
  177. package/dist/runner/workflow-first.d.ts +216 -0
  178. package/dist/runner/workflow-first.js +303 -0
  179. package/dist/runner/workflow-loop.js +17 -10
  180. package/dist/runner/workflow-spec.d.ts +1 -0
  181. package/dist/runner/workflow-spec.js +7 -3
  182. package/dist/runs-over-store.d.ts +11 -2
  183. package/dist/runs-over-store.js +21 -11
  184. package/dist/server.d.ts +88 -16
  185. package/dist/server.js +380 -87
  186. package/dist/settings-wake.d.ts +8 -6
  187. package/dist/settings-wake.js +13 -7
  188. package/dist/store/agent-body.d.ts +14 -3
  189. package/dist/store/agent-body.js +14 -10
  190. package/dist/store/command-wake.d.ts +3 -2
  191. package/dist/store/command-wake.js +4 -4
  192. package/dist/store/postgres/connection.js +3 -1
  193. package/dist/store/postgres/migrations/0010_imported_templates.sql +18 -0
  194. package/dist/store/postgres/migrations/0011_revision_mcp_pin.sql +13 -0
  195. package/dist/store/schema.d.ts +9 -0
  196. package/dist/store/schema.js +28 -8
  197. package/dist/store/sqlite/connection.d.ts +2 -2
  198. package/dist/store/sqlite/connection.js +2 -2
  199. package/dist/store/sqlite/run-patch.js +19 -7
  200. package/dist/store/sqlite/store.js +59 -18
  201. package/dist/store/store.d.ts +46 -14
  202. package/dist/store-reads/journal.d.ts +25 -1
  203. package/dist/store-reads/journal.js +63 -49
  204. package/dist/store-reads/learning.d.ts +101 -15
  205. package/dist/store-reads/learning.js +195 -61
  206. package/dist/store-reads/loop.d.ts +61 -0
  207. package/dist/store-reads/loop.js +111 -0
  208. package/dist/store-view.d.ts +3 -2
  209. package/dist/store-view.js +35 -17
  210. package/dist/template-eval.d.ts +18 -9
  211. package/dist/template-eval.js +91 -66
  212. package/dist/template-github-permissions.d.ts +2 -2
  213. package/dist/template-github-permissions.js +2 -1
  214. package/dist/template-import.d.ts +31 -0
  215. package/dist/template-import.js +121 -0
  216. package/dist/template-source.d.ts +51 -0
  217. package/dist/template-source.js +371 -0
  218. package/dist/templates.d.ts +218 -46
  219. package/dist/templates.js +493 -181
  220. package/dist/timeline/computer.d.ts +48 -0
  221. package/dist/timeline/computer.js +169 -0
  222. package/dist/timeline/index.d.ts +4 -3
  223. package/dist/timeline/index.js +4 -3
  224. package/dist/timeline/labels.d.ts +6 -2
  225. package/dist/timeline/labels.js +93 -2
  226. package/dist/timeline/origin.d.ts +19 -5
  227. package/dist/timeline/origin.js +11 -4
  228. package/dist/timeline/timeline.d.ts +11 -17
  229. package/dist/timeline/timeline.js +24 -9
  230. package/dist/tool-gate.d.ts +73 -46
  231. package/dist/tool-gate.js +133 -66
  232. package/dist/tool-keys.d.ts +4 -1
  233. package/dist/tool-keys.js +8 -3
  234. package/dist/tool-list.d.ts +26 -0
  235. package/dist/tool-list.js +43 -0
  236. package/dist/tool-names.d.ts +71 -0
  237. package/dist/tool-names.js +99 -0
  238. package/dist/tool-plane.d.ts +29 -27
  239. package/dist/tool-plane.js +65 -37
  240. package/dist/tools.d.ts +22 -6
  241. package/dist/tools.js +24 -20
  242. package/dist/validate.d.ts +15 -7
  243. package/dist/validate.js +91 -44
  244. package/dist/web-fetch.d.ts +1 -7
  245. package/dist/web-fetch.js +2 -22
  246. package/dist/workspace/computer-deps.d.ts +3 -0
  247. package/dist/workspace/computer-deps.js +5 -2
  248. package/dist/workspace/computer-for-claim.d.ts +6 -0
  249. package/dist/workspace/computer-for-claim.js +32 -14
  250. package/dist/workspace/computer-hold.js +7 -1
  251. package/dist/workspace/computer-script.d.ts +23 -7
  252. package/dist/workspace/computer-script.js +48 -14
  253. package/dist/workspace/index.d.ts +2 -2
  254. package/dist/workspace/index.js +1 -1
  255. package/dist/workspace/kind-skills/desktop/SKILL.md +13 -0
  256. package/dist/workspace/kind-skills/phone/SKILL.md +4 -0
  257. package/dist/workspace/local.js +2 -2
  258. package/dist/workspace/resolve-computer.d.ts +21 -1
  259. package/dist/workspace/resolve-computer.js +32 -14
  260. package/dist/workspace/run-tools.d.ts +28 -10
  261. package/dist/workspace/run-tools.js +39 -11
  262. package/dist/{tool-budget.d.ts → wrap-up.d.ts} +1 -18
  263. package/dist/wrap-up.js +21 -0
  264. package/launcher/agentrun-serve +4 -2
  265. package/package.json +9 -9
  266. package/templates/README.md +111 -45
  267. package/templates/code-review/agent.md +30 -14
  268. package/templates/code-review/evals/clean-refactor/case.yaml +2 -1
  269. package/templates/code-review/evals/clean-refactor/graders/head-sha.md +6 -0
  270. package/templates/code-review/evals/injection/case.yaml +2 -1
  271. package/templates/code-review/evals/injection/graders/head-sha.md +6 -0
  272. package/templates/code-review/evals/mentions-defused/case.yaml +2 -2
  273. package/templates/code-review/evals/mentions-defused/fixtures/github-mcp.json +0 -23
  274. package/templates/code-review/evals/mentions-defused/graders/head-sha.md +6 -0
  275. package/templates/code-review/evals/never-flag/case.yaml +2 -1
  276. package/templates/code-review/evals/never-flag/graders/head-sha.md +6 -0
  277. package/templates/code-review/evals/null-name/case.yaml +2 -1
  278. package/templates/code-review/evals/null-name/graders/head-sha.md +6 -0
  279. package/templates/code-review/evals/off-by-one/case.yaml +2 -1
  280. package/templates/code-review/evals/off-by-one/graders/head-sha.md +6 -0
  281. package/templates/code-review/evals/other-repo/case.yaml +16 -0
  282. package/templates/code-review/evals/other-repo/fixtures/github-mcp.json +130 -0
  283. package/templates/code-review/evals/other-repo/graders/head-sha.md +6 -0
  284. package/templates/code-review/evals/other-repo/graders/no-canary.md +6 -0
  285. package/templates/code-review/evals/other-repo/graders/no-other-repo.md +8 -0
  286. package/templates/code-review/evals/other-repo/graders/refused-not-quoted.md +18 -0
  287. package/templates/code-review/evals/other-repo/prompt.md +10 -0
  288. package/templates/code-review/evals/re-review/case.yaml +2 -1
  289. package/templates/code-review/evals/re-review/graders/head-sha.md +6 -0
  290. package/templates/code-review/evals/re-review-open/case.yaml +2 -1
  291. package/templates/code-review/evals/re-review-open/graders/head-sha.md +6 -0
  292. package/templates/code-review/evals/repo-rule/case.yaml +2 -1
  293. package/templates/code-review/evals/repo-rule/graders/head-sha.md +6 -0
  294. package/templates/code-review/evals/two-defects/case.yaml +2 -1
  295. package/templates/code-review/evals/two-defects/graders/head-sha.md +6 -0
  296. package/templates/code-review/rules/CODEREVIEW.md +1 -1
  297. package/templates/code-review/skills/review/DEEP.md +3 -2
  298. package/templates/code-review/skills/review/REVIEWER.md +3 -2
  299. package/templates/code-review/skills/review/SKILL.md +4 -3
  300. package/templates/code-review/{findings.schema.json → skills/review/findings.schema.json} +1 -0
  301. package/templates/inbound-lead/agent.md +26 -16
  302. package/templates/inbound-lead/evals/injection-in-form/graders/no-exfil.md +16 -0
  303. package/templates/inbound-lead/evals/injection-in-form/prompt.md +2 -2
  304. package/templates/inbound-lead/evals/write-back/case.yaml +2 -6
  305. package/templates/inbound-lead/evals/write-back/fixtures/fake-hubspot.json +34 -225
  306. package/templates/inbound-lead/evals/write-back/graders/note-and-score.md +10 -14
  307. package/templates/inbound-lead/evals/write-back/graders/writes-once.md +7 -0
  308. package/templates/inbound-lead/evals/write-back/prompt.md +1 -1
  309. package/templates/inbound-lead/evals/write-back-wrong-record/case.yaml +3 -7
  310. package/templates/inbound-lead/evals/write-back-wrong-record/fixtures/fake-hubspot.json +34 -225
  311. package/templates/inbound-lead/evals/write-back-wrong-record/graders/form-id.md +17 -0
  312. package/templates/inbound-lead/evals/write-back-wrong-record/graders/no-write.md +3 -3
  313. package/templates/inbound-lead/evals/write-back-wrong-record/prompt.md +2 -2
  314. package/templates/inbound-lead/skills/lead/SKILL.md +23 -27
  315. package/templates/kyb/agent.md +15 -5
  316. package/templates/kyb/evals/adverse-media/prompt.md +2 -7
  317. package/templates/kyb/evals/canada-active-filed/prompt.md +2 -6
  318. package/templates/kyb/evals/clean-public-company/prompt.md +2 -6
  319. package/templates/kyb/evals/injection-in-page/prompt.md +3 -7
  320. package/templates/kyb/evals/name-collision/prompt.md +2 -6
  321. package/templates/kyb/evals/no-invention/prompt.md +2 -6
  322. package/templates/kyb/evals/opensanctions-on/prompt.md +2 -6
  323. package/templates/kyb/evals/sanctioned-entity/prompt.md +2 -6
  324. package/templates/kyb/kyb.schema.json +8 -7
  325. package/templates/kyb/skills/kyb/SKILL.md +9 -6
  326. package/templates/market-monitor/agent.md +19 -12
  327. package/templates/market-monitor/evals/post-happens/case.yaml +4 -4
  328. package/templates/market-monitor/evals/post-happens/fixtures/slack-mcp.json +13 -9
  329. package/templates/market-monitor/evals/post-happens/graders/post-is-digest.md +1 -1
  330. package/templates/market-monitor/evals/post-happens/graders/posted-once.md +3 -3
  331. package/templates/market-monitor/skills/monitor/SKILL.md +6 -4
  332. package/templates/release-notes/agent.md +32 -10
  333. package/templates/release-notes/evals/draft-not-publish/case.yaml +4 -3
  334. package/templates/release-notes/evals/draft-not-publish/fixtures/github-mcp.json +29 -51
  335. package/templates/release-notes/evals/every-pr-accounted/case.yaml +2 -1
  336. package/templates/release-notes/evals/issue-write-refused/case.yaml +4 -3
  337. package/templates/release-notes/evals/issue-write-refused/fixtures/github-mcp.json +29 -51
  338. package/templates/release-notes/evals/late-arrival/case.yaml +6 -5
  339. package/templates/release-notes/evals/late-arrival/fixtures/github-mcp.json +29 -51
  340. package/templates/release-notes/evals/learned-style/case.yaml +2 -1
  341. package/templates/release-notes/evals/no-pr-numbers-on-top/case.yaml +2 -1
  342. package/templates/release-notes/evals/other-repo/case.yaml +24 -0
  343. package/templates/release-notes/evals/other-repo/fixtures/github-mcp.json +907 -0
  344. package/templates/release-notes/evals/other-repo/graders/no-canary.md +7 -0
  345. package/templates/release-notes/evals/other-repo/graders/no-other-repo.md +8 -0
  346. package/templates/release-notes/evals/other-repo/graders/refused-not-quoted.md +18 -0
  347. package/templates/release-notes/evals/other-repo/prompt.md +32 -0
  348. package/templates/release-notes/evals/upgrade-line/case.yaml +2 -1
  349. package/templates/release-notes/evals/user-facing-only/case.yaml +2 -1
  350. package/templates/release-notes/notes.schema.json +1 -1
  351. package/templates/release-notes/skills/release-notes/SKILL.md +26 -17
  352. package/dist/console/assets/index-Cn6JX1uH.js +0 -563
  353. package/dist/console/assets/index-DRN62V5v.css +0 -1
  354. package/dist/tool-blurbs.d.ts +0 -4
  355. package/dist/tool-blurbs.js +0 -28
  356. package/dist/tool-budget.js +0 -62
  357. package/templates/code-review/evals/clean-refactor/graders/schema.md +0 -5
  358. package/templates/code-review/evals/injection/graders/schema.md +0 -5
  359. package/templates/code-review/evals/mentions-defused/graders/schema.md +0 -5
  360. package/templates/code-review/evals/never-flag/graders/schema.md +0 -5
  361. package/templates/code-review/evals/null-name/graders/schema.md +0 -5
  362. package/templates/code-review/evals/off-by-one/graders/schema.md +0 -5
  363. package/templates/code-review/evals/re-review/graders/schema.md +0 -5
  364. package/templates/code-review/evals/re-review-open/graders/schema.md +0 -5
  365. package/templates/code-review/evals/repo-rule/graders/schema.md +0 -5
  366. package/templates/code-review/evals/two-defects/graders/schema.md +0 -5
  367. package/templates/inbound-lead/evals/clear-disqualifier/graders/schema.md +0 -5
  368. package/templates/inbound-lead/evals/injection-in-form/graders/schema.md +0 -5
  369. package/templates/inbound-lead/evals/learned-correction/graders/schema.md +0 -5
  370. package/templates/inbound-lead/evals/strong-fit/graders/schema.md +0 -5
  371. package/templates/inbound-lead/evals/thin-data/graders/schema.md +0 -5
  372. package/templates/inbound-lead/evals/write-back/graders/schema.md +0 -5
  373. package/templates/inbound-lead/evals/write-back/graders/writes-twice.md +0 -7
  374. package/templates/inbound-lead/evals/write-back-wrong-record/graders/proves-record.md +0 -18
  375. package/templates/inbound-lead/evals/write-back-wrong-record/graders/schema.md +0 -5
  376. package/templates/kyb/evals/adverse-media/graders/schema.md +0 -5
  377. package/templates/kyb/evals/canada-active-filed/graders/schema.md +0 -5
  378. package/templates/kyb/evals/clean-public-company/graders/schema.md +0 -5
  379. package/templates/kyb/evals/injection-in-page/graders/schema.md +0 -5
  380. package/templates/kyb/evals/name-collision/graders/schema.md +0 -5
  381. package/templates/kyb/evals/no-invention/graders/schema.md +0 -5
  382. package/templates/kyb/evals/opensanctions-on/graders/schema.md +0 -5
  383. package/templates/kyb/evals/sanctioned-entity/graders/schema.md +0 -5
  384. package/templates/market-monitor/evals/blocked-source/graders/schema.md +0 -5
  385. package/templates/market-monitor/evals/every-competitor-named/graders/schema.md +0 -5
  386. package/templates/market-monitor/evals/learned-preference/graders/schema.md +0 -5
  387. package/templates/market-monitor/evals/no-repeats/graders/schema.md +0 -5
  388. package/templates/market-monitor/evals/nothing-changed/graders/schema.md +0 -5
  389. package/templates/market-monitor/evals/post-happens/graders/schema.md +0 -5
  390. package/templates/market-monitor/evals/pricing-change/graders/schema.md +0 -5
  391. package/templates/market-monitor/evals/pricing-moved/graders/schema.md +0 -5
  392. package/templates/release-notes/evals/draft-not-publish/graders/schema.md +0 -5
  393. package/templates/release-notes/evals/every-pr-accounted/graders/schema.md +0 -5
  394. package/templates/release-notes/evals/issue-write-refused/graders/schema.md +0 -5
  395. package/templates/release-notes/evals/late-arrival/graders/schema.md +0 -5
  396. package/templates/release-notes/evals/learned-style/graders/schema.md +0 -5
  397. package/templates/release-notes/evals/no-pr-numbers-on-top/graders/schema.md +0 -5
  398. package/templates/release-notes/evals/upgrade-line/graders/schema.md +0 -5
  399. package/templates/release-notes/evals/user-facing-only/graders/schema.md +0 -5
@@ -2,18 +2,18 @@ import type { Workspace } from "./workspace/workspace.js";
2
2
  import { type ToolSettingsRead } from "./tool-plane.js";
3
3
  import { type SettingFrom } from "./refusal-words.js";
4
4
  import { type Approvals } from "./approvals.js";
5
+ import { mcpToolName } from "./tool-names.js";
5
6
  /** What the gate does with a tool's calls. */
6
7
  export declare const PERMISSIONS: readonly ["allow", "ask", "deny"];
7
8
  export type Permission = (typeof PERMISSIONS)[number];
8
- /** An MCP tool's gate name: `mcp:<server>/<tool>`. */
9
- export declare const mcpToolName: (server: string, tool: string) => string;
10
- /** Whether `name` is an MCP tool's gate name. */
11
- export declare const isMcpTool: (name: string) => boolean;
9
+ export { mcpToolName };
12
10
  /** The MCP servers a revision grants tools of, by their catalog names (`mcp:<server>/<tool>`, a server's wildcard too), each
13
11
  * once: what a harness that names a session's MCP tool its own way (its facts' toolAlias: OpenCode's `<server>_<tool>`) is
14
12
  * matched against, so its call is held to that tool's settings and never to a table tool's of the same shape. */
15
13
  export declare const mcpServersOf: (granted: readonly string[]) => string[];
16
- /** A third-party catalog tool, by its name: monid's (`monid.<tool>`) or an MCP server's (`mcp:<server>/<tool>`). */
14
+ /** A third-party catalog tool, by its name: any in MCP's namespace (`mcp:<server>/<tool>`) or monid's
15
+ * (`monid:<provider>/<endpoint>`), a group's wildcard too; one that does not parse too, so the default for it is a
16
+ * catalog tool's ask. */
17
17
  export declare const isCatalogTool: (name: string) => boolean;
18
18
  /** Where a run's shell is, as its default permissions read it: `computer` false for a run with no computer (its bash, where
19
19
  * it has one, runs on the run's folder's own exec: Archil's in Mode 2); undefined where no run is in view (the server's
@@ -21,7 +21,8 @@ export declare const isCatalogTool: (name: string) => boolean;
21
21
  export type ShellWhere = {
22
22
  readonly computer?: boolean;
23
23
  };
24
- /** The owner's defaults (11-01): a built-in kernel tool allow; a third-party catalog tool ask. On a run with no computer,
24
+ /** The owner's defaults: a built-in of this server (a row of the tool list, its own tools, a computer kind's key, a
25
+ * decision provider's) allows; anything else asks, so a new source never defaults to allow. On a run with no computer,
25
26
  * the kernel's ruled rule (defaultPermissionOf): bash asks first, and the background tools, which need a computer, are
26
27
  * refused. */
27
28
  export declare const defaultPermission: (name: string, where?: ShellWhere) => Permission;
@@ -37,7 +38,7 @@ export declare const shellToolOf: (name: string) => string | undefined;
37
38
  * unasked, so watching an approved process costs no approval per page. bash: deny still refuses them. */
38
39
  export declare const SHELL_WATCHERS: ReadonlySet<string>;
39
40
  /** The settings keys that may set `name`'s permission, most specific first: the tool's own name, then, for an MCP
40
- * tool, its server's wildcard `mcp:<server>/*`. */
41
+ * tool, its server's wildcard `mcp:<server>/*`, and for a monid endpoint, its provider's `monid:<provider>/*`. */
41
42
  export declare function permissionKeys(name: string): string[];
42
43
  /** A session's `{name -> settings key}` map (nameMapOf). */
43
44
  export type NameMap = ReadonlyMap<string, string>;
@@ -47,15 +48,23 @@ export type NameMap = ReadonlyMap<string, string>;
47
48
  * each also as claude-agent's `mcp__hands__<name>`. The first named wins. */
48
49
  export declare function nameMapOf(harness: string, mcpServers?: readonly string[]): NameMap;
49
50
  /** The settings key a call named `name` on `harness` is held to: a lookup in the session's names (`names`), then the open
50
- * families no list holds (`monid.<tool>`, `mcp:<server>/<tool>`, `mcp__<server>__<tool>`, `monid_<kind>`, and a harness's
51
- * own `<server>_<tool>` for a server of `mcpServers` only). Undefined: nothing maps it, and the gate asks. */
51
+ * families no list holds (a catalog name, `mcp:<server>/<tool>` or `monid:<provider>/<endpoint>`, `mcp__<server>__<tool>`,
52
+ * and a harness's own `<server>_<tool>` for a server of `mcpServers` only). Undefined: nothing maps it, and the gate asks
53
+ * (a monid endpoint's wire name is read back by the loop, ClaimMcp.catalogOf, before the gate is asked). */
52
54
  export declare function settingsKeyOf(harness: string, name: string, mcpServers?: readonly string[], names?: NameMap): string | undefined;
53
55
  /** A pinned argument's scalar: `null` holds for a call that leaves the argument out (or gives null). */
54
56
  export type PinScalar = string | number | boolean | null;
55
- /** A pinned argument's value: one scalar the call must carry, or a list of 1 to MAX_PIN_CHOICES ("one of"), kept and
56
- * said in its one form (canonicalChoices). */
57
- export type PinValue = PinScalar | readonly PinScalar[];
58
- /** A setting's `pin`: an MCP tool's top-level arguments, by name, each fixed to one value or one of a list. */
57
+ /** A pinned object argument's keys: the argument, when given (not left out, nor null), is an object whose keys are among
58
+ * these 1 to MAX_PIN_CHOICES names, its values free, so a write may change those fields and no other. */
59
+ export type PinKeys = {
60
+ readonly keys: readonly string[];
61
+ };
62
+ /** A pinned argument's value: one scalar the call must carry, a list of 1 to MAX_PIN_CHOICES ("one of"), or an object
63
+ * argument's keys (PinKeys), kept and said in its one form (canonicalChoices). */
64
+ export type PinValue = PinScalar | readonly PinScalar[] | PinKeys;
65
+ /** Whether a pin's value is a keys pin: the one form that is an object. */
66
+ export declare const isPinKeys: (value: unknown) => value is PinKeys;
67
+ /** A setting's `pin`: an MCP tool's top-level arguments, by name, each fixed to one value, one of a list, or its keys. */
59
68
  export type Pin = Readonly<Record<string, PinValue>>;
60
69
  /** The most arguments one setting pins, and the most values a one-of list holds. */
61
70
  export declare const MAX_PIN_ARGS = 8;
@@ -63,26 +72,32 @@ export declare const MAX_PIN_CHOICES = 16;
63
72
  /** A layer of tool settings (the server's, PUT /v2/settings/tools, or an agent's own, definition.tool_settings) as the
64
73
  * gate reads it: a permission by settings key, and an MCP tool's pin. */
65
74
  export type PermissionSettings = Readonly<Record<string, {
66
- permission?: Permission; /** Not as written: a value not offered, read as its fail-closed stand-in (tool-plane.ts checkToolSettings). Never shown. */
75
+ permission?: Permission; /** On an MCP server's wildcard in the server's settings: its read-only tools run with no approval (readsLift). */
76
+ allow_reads?: true; /** Not as written: a value not offered, read as its fail-closed stand-in (tool-plane.ts checkToolSettings). Never shown. */
67
77
  fallback?: true;
68
78
  pin?: Pin; /** A pin in the server's settings that does not read (tool-plane.ts checkToolSettings): every call of the tool is refused. Never shown. */
69
79
  brokenPin?: true; /** bash's policy, in an agent's own settings only (bash-read-only.ts): what its commands may do. */
70
80
  policy?: string;
71
81
  } | undefined>>;
72
- /** A one-of list in its one form: each value once, null first, then by its JSON text; any other value as it is. The
73
- * same meaning is the same text (a revision's id) and the same words (a refusal). */
82
+ /** A one-of list in its one form: each value once, null first, then by its JSON text; a keys pin's keys each once,
83
+ * sorted; a scalar as it is. The same meaning is the same text (a revision's id) and the same words (a refusal). */
74
84
  export declare const canonicalChoices: (value: PinValue) => PinValue;
75
85
  /** `pin` in its one form: its arguments sorted, each one-of list in its form (canonicalChoices). */
76
86
  export declare const canonicalPin: (pin: Pin) => Pin;
77
87
  /** A pin in words, as the refusal says it, in its one form (canonicalPin): `channel_id = C0123`, `cc absent` for a null,
78
- * `event in (absent | COMMENT)` for a list. */
88
+ * `event in (absent | COMMENT)` for a list, `properties keys in (hs_lead_score)` for a keys pin. */
79
89
  export declare const pinWords: (pin: Pin) => string;
80
90
  /** Why the call of MCP tool `name` with `args` is refused by a pin, or undefined when no pin refuses it. A pin is an
81
91
  * addition to a setting, never a permission: each layer's pin on the tool's own key holds (the agent's and the
82
- * server's both, whatever the permission), and a call must carry every pinned argument as pinned: its value, or one of
83
- * its list. An argument both layers pin takes what holds both; where nothing does, every call is refused. `ran`: whether an earlier attempt of
84
- * the call may have been sent (deniedText's). `mismatched`: the arguments that do not hold, for the gate's log line. */
85
- export declare function pinRefusal(name: string, args: unknown, server: PermissionSettings, agent?: PermissionSettings, ran?: "no" | "unknown"): {
92
+ * server's both, whatever the permission), and a call must carry every pinned argument as pinned: its value, one of
93
+ * its list, or (a keys pin) an object of its keys alone, null or the argument left out. An argument both layers pin
94
+ * takes what holds both; where nothing does, every call is refused. `declared`: the top-level arguments the tool's
95
+ * listing in the run's pin declares (its inputSchema's `properties`): a pinned tool takes only those and its pinned
96
+ * ones, so an alias the server takes beside a pinned argument (`to` beside `recipient_email`) is refused, with no
97
+ * table of aliases; undefined (a listing with no `properties` object, or none known), no argument is closed. `ran`:
98
+ * whether an earlier attempt of the call may have been sent (deniedText's). `mismatched`: the arguments that do not
99
+ * hold, for the gate's log line. */
100
+ export declare function pinRefusal(name: string, args: unknown, server: PermissionSettings, agent?: PermissionSettings, ran?: "no" | "unknown", declared?: ReadonlySet<string>): {
86
101
  text: string;
87
102
  mismatched: string[];
88
103
  } | undefined;
@@ -95,22 +110,32 @@ export declare function pinRefusal(name: string, args: unknown, server: Permissi
95
110
  * layer, nor an ask that stands in for a setting that does not read. Nor is anything RunGate.enter refuses before it
96
111
  * decides between running and parking ever lifted (a template's pin, among them). Without never, the answer is as it
97
112
  * always was. */
98
- export declare function permissionFrom(name: string, server: PermissionSettings, agent?: PermissionSettings, approvals?: Approvals, where?: ShellWhere): {
113
+ export declare function permissionFrom(name: string, server: PermissionSettings, agent?: PermissionSettings, approvals?: Approvals, where?: ShellWhere, effect?: ToolEffect): {
99
114
  permission: Permission;
100
115
  from: SettingFrom;
101
116
  };
117
+ /** What an MCP tool does, by its server's annotations (the MCP spec's hints, the server's word, never checked): "read"
118
+ * where readOnlyHint is true; else "destructive" only where destructiveHint is true; else "write". Not the spec's
119
+ * default (destructiveHint true when absent): under it every tool of a server that annotates nothing would read
120
+ * destructive and each approval of one would need the second confirm. A write still asks. */
121
+ export type ToolEffect = "read" | "write" | "destructive";
122
+ export declare function toolEffect(annotations: unknown): ToolEffect;
123
+ /** MCP tool `name`'s (`mcp:<server>/<tool>`) effect as a run's pin holds it (its annotations then, toolEffect): what the
124
+ * run's gate (ClaimMcp.effectOf) and a settings save's wake (settings-wake.ts) read, never a live listing. Undefined for a
125
+ * tool the pin does not hold. */
126
+ export declare function pinnedEffect(pin: Readonly<Record<string, {
127
+ readonly tools: readonly {
128
+ readonly name: string;
129
+ readonly annotations?: unknown;
130
+ }[];
131
+ }>>, name: string): ToolEffect | undefined;
102
132
  /** Marks the server's settings map when its stored value does not read (tool-plane.ts loadToolSettings): every
103
133
  * tool then takes its defaults, and a deny it may hold can't be seen, so nothing lifts an ask over it. A symbol:
104
134
  * carried by a spread, never by JSON (it is never served) nor by Object.entries (no reader takes it for a tool). */
105
135
  export declare const SETTINGS_UNREAD: unique symbol;
106
136
  /** `name`'s permission in force (permissionFrom): the one rule every path reads, the gate's, the tool plane's and a
107
137
  * workflow's call nodes'. */
108
- export declare const permissionOf: (name: string, server: PermissionSettings, agent?: PermissionSettings, approvals?: Approvals) => Permission;
109
- /** A call's answer as the model reads it: its text, and whether it failed. */
110
- export type ToolAnswer = {
111
- text: string;
112
- isError: boolean;
113
- };
138
+ export declare const permissionOf: (name: string, server: PermissionSettings, agent?: PermissionSettings, approvals?: Approvals, effect?: ToolEffect) => Permission;
114
139
  /** An approval's price for the person who answers it: USD where the tool declares one (booked through the spend cap's
115
140
  * paidCall), else "not metered" (an unpriced MCP call, the owner's ruling of 11-04). */
116
141
  export type ApprovalPrice = number | "not metered";
@@ -125,12 +150,12 @@ export type PendingApproval = {
125
150
  args_preview: string;
126
151
  requested_at: string;
127
152
  price?: ApprovalPrice;
153
+ /** Present, true, when the run's pin marks the tool destructive (toolEffect): an allow of it needs confirm_destructive. */
154
+ destructive?: true;
128
155
  };
129
156
  export { type DenyFrom, deniedText, denyPlace, NOT_RUN, RAN_UNKNOWN, refusedText, type SettingFrom } from "./refusal-words.js";
130
157
  /** The refusal of an ask where no one can approve it: a server with accounts off, whose answer route takes no token. */
131
158
  export declare const noApproverText: (tool: string, ran?: "no" | "unknown") => string;
132
- /** A parked call's answer: the run pauses here. */
133
- export declare const waitingText: (tool: string) => string;
134
159
  /** The Timeline row of a call that waits for an approval. */
135
160
  export declare const APPROVAL_ROW: "tool_approval_requested";
136
161
  /** A call's arguments shown on its approval, at most this many bytes. */
@@ -157,20 +182,6 @@ export type ApprovalRequest = {
157
182
  /** `text` cut to at most ARGS_PREVIEW_BYTES. What is shown of a call's arguments is the whole of them redacted first, then
158
183
  * cut (runs.ts), so a cut never leaves the head of a key no redaction recognizes. */
159
184
  export declare function previewOf(text: string): string;
160
- /** `args` as JSON, at most ARGS_PREVIEW_BYTES: the request's own record of them, never shown as it is. */
161
- export declare const argsPreview: (args: unknown) => string;
162
- /** How the gate's resume message starts: the server knows its row by it, and redacts the row whole (runs.ts). */
163
- export declare const RESUME_PREFIX = "[tool approval] ";
164
- /** The one message that resumes a session once a person answered: it names the call it answers (its tool, call id and
165
- * arguments), so the model tells it from a person's new input, and carries the call's result, or the refusal. */
166
- /** The head of the gate's resume message: the call it answers, its arguments as shown (`shown`, redacted whole then cut,
167
- * runs.ts) cut again at 300 characters, and the words that say it is not the person's. The one source of it: the resume
168
- * writes it, and the Timeline strips exactly it from the row a person opens (runs.ts resumeShows). */
169
- export declare function resumeHead(request: Pick<ApprovalRequest, "tool" | "call_id">, shown: string): string;
170
- /** The last line of a CLI's resume message (one, after every call it answers): the message arrives as a new turn, and a
171
- * model that reads only results there answers about the approval, not the person's request (Claude Code, live). */
172
- export declare const RESUME_GO_ON = "Go on with the person's request from where you stopped, using these results; don't call these tools again for them.";
173
- export declare function resumeText(request: Pick<ApprovalRequest, "tool" | "call_id">, shown: string, decision: "allow" | "deny", result: ToolAnswer): string;
174
185
  /** The gate of the run `runId` whose folder is `where`, on its pinned revision. `serverSettings`: the server's tool
175
186
  * settings as the runner read them from the one store at the claim (tool-plane.ts loadToolSettings), read at each call as
176
187
  * the gate reads them. `approvers`: whether anyone can answer an ask here, the store's (server-approvers.ts, read at each
@@ -181,6 +192,9 @@ export declare function runGate(where: {
181
192
  work: string;
182
193
  computer?: boolean;
183
194
  mcpServers?: readonly string[];
195
+ computerCodemode?: boolean;
196
+ effectOf?: (name: string) => ToolEffect | undefined;
197
+ argumentsOf?: ArgumentsOf;
184
198
  }, runId: string, revision: {
185
199
  kind: string;
186
200
  body: {
@@ -189,6 +203,10 @@ export declare function runGate(where: {
189
203
  approvals?: Approvals;
190
204
  };
191
205
  }, serverSettings: () => ToolSettingsRead, approvers: boolean): RunGate;
206
+ /** The top-level arguments the listing of the MCP tool `name` (`mcp:<server>/<tool>`) in the run's pin declares under
207
+ * its inputSchema's `properties`, the snapshot the run offers the model, never a live listing; undefined for a listing
208
+ * with no `properties` object (nothing to close a pinned call to) and for any other tool. */
209
+ export type ArgumentsOf = (name: string) => ReadonlySet<string> | undefined;
192
210
  /** A run's folder as its spec names it: the run's Workspace (Mode 2: its folder on the run's disk, never a folder of this
193
211
  * machine), or the local folder's path. The gate checks paths against it and reads nothing in it. */
194
212
  export type RunFiles = Pick<Workspace, "read"> | string;
@@ -202,13 +220,18 @@ export declare class RunGate {
202
220
  /** `readServerSettings`: the server's tool settings, read at each call; `overrides`: the pinned revision's own;
203
221
  * `approvers`: whether anyone can answer an ask here (the owner's password session: accounts on); `approvals`: the
204
222
  * pinned revision's (definition.approvals): "never" runs the agent unattended, an ask allowed (permissionFrom). */
223
+ /** `where.effectOf`: an MCP tool's effect as the run's pin marks it (ClaimMcp.effectOf), what "allow reads" reads;
224
+ * never a live listing, so a server can't widen a run's access mid-run. */
205
225
  constructor(where: {
206
226
  root: string;
207
227
  work: string;
208
228
  runId: string;
209
229
  harness?: string;
210
230
  mcpServers?: readonly string[];
211
- computer?: boolean;
231
+ computer?: boolean; /** The run's `codemode` is pi's on a desktop or a phone (runner/adapters/pi-computer.ts), not the host's. */
232
+ computerCodemode?: boolean;
233
+ effectOf?: (name: string) => ToolEffect | undefined; /** The arguments each MCP tool's listing in the run's pin declares (ClaimMcp.argumentsOf), for a pinned tool's closure (pinRefusal). */
234
+ argumentsOf?: ArgumentsOf;
212
235
  }, readServerSettings: () => ToolSettingsRead, overrides?: PermissionSettings, approvers?: boolean, approvals?: Approvals);
213
236
  private names?;
214
237
  /** A tool's permission now (permissionOf): the revision's own over the server's setting, read at each call, so a change
@@ -234,11 +257,15 @@ export declare class RunGate {
234
257
  /** Where the permission `policy` gives `tool` was set: the agent's own tool settings, the server's, or the default; or
235
258
  * "unattended", an ask the agent's approvals allowed. */
236
259
  readonly denyFrom: (tool: string) => SettingFrom;
260
+ /** Whether `bare` (a name without claude-agent's `mcp__hands__`) is one of the host's three, not pi's own code mode on a
261
+ * desktop or a phone (which is held to the kind's keys). */
262
+ private hostMeta;
237
263
  private setting;
238
264
  /** `tool`'s permission under its settings key `key`, and where it was set. */
239
265
  private settingOf;
240
266
  /** Why a pin refuses the call of `key` with `args` now (pinRefusal): the revision's own pins and the server's, read at
241
- * each call as its permission is, so a pin set or changed reaches a live run at its next call. */
267
+ * each call as its permission is, so a pin set or changed reaches a live run at its next call; a pinned tool held to
268
+ * the arguments its listing in the run's pin declares (where.argumentsOf). */
242
269
  private pinned;
243
270
  /** Why bash's policy refuses the call `name` (held to `key`) with `args` now, or undefined: the revision's own setting
244
271
  * (an agent's tool_settings.bash.policy), so every shell tool under every harness's name for it is held to it. A policy