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

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 (423) hide show
  1. package/CHANGELOG.md +455 -0
  2. package/README.md +376 -125
  3. package/dist/adapters.d.ts +4 -1
  4. package/dist/adapters.js +4 -2
  5. package/dist/agent-rows.d.ts +0 -2
  6. package/dist/agents-store.d.ts +5 -5
  7. package/dist/agents-store.js +14 -14
  8. package/dist/bash-read-only.js +2 -1
  9. package/dist/cap-short.d.ts +12 -0
  10. package/dist/cap-short.js +60 -0
  11. package/dist/cap.d.ts +3 -10
  12. package/dist/cap.js +2 -5
  13. package/dist/catalog.d.ts +0 -5
  14. package/dist/catalog.js +1 -5
  15. package/dist/chatgpt-plan.d.ts +163 -0
  16. package/dist/chatgpt-plan.js +549 -0
  17. package/dist/cli.js +26 -6
  18. package/dist/composio-preset.d.ts +8 -0
  19. package/dist/composio-preset.js +8 -7
  20. package/dist/composio-triggers.d.ts +113 -0
  21. package/dist/composio-triggers.js +411 -0
  22. package/dist/computer-calls.js +2 -2
  23. package/dist/computer-commands.d.ts +2 -0
  24. package/dist/computer-commands.js +7 -3
  25. package/dist/computer-live.d.ts +7 -2
  26. package/dist/computer-live.js +9 -5
  27. package/dist/computer-routes.d.ts +2 -2
  28. package/dist/computer-routes.js +2 -2
  29. package/dist/computer-setting.d.ts +3 -3
  30. package/dist/computer-setting.js +5 -5
  31. package/dist/computer-view.d.ts +15 -0
  32. package/dist/computer-view.js +16 -2
  33. package/dist/computer-viewer.js +14 -1
  34. package/dist/computers.d.ts +5 -2
  35. package/dist/computers.js +9 -5
  36. package/dist/console/assets/index-B8Zn1Iqn.css +1 -0
  37. package/dist/console/assets/index-Jbxjcmdp.js +705 -0
  38. package/dist/console/index.html +2 -2
  39. package/dist/console-links.js +3 -3
  40. package/dist/decision-cap.d.ts +2 -5
  41. package/dist/decision-cap.js +3 -6
  42. package/dist/decision-rows.js +11 -11
  43. package/dist/email/account.d.ts +83 -0
  44. package/dist/email/account.js +159 -0
  45. package/dist/email/answer.d.ts +15 -0
  46. package/dist/email/answer.js +217 -0
  47. package/dist/email/email-faux.d.ts +95 -0
  48. package/dist/email/email-faux.js +849 -0
  49. package/dist/email/labels.d.ts +1 -0
  50. package/dist/email/labels.js +84 -0
  51. package/dist/email/mail.d.ts +186 -0
  52. package/dist/email/mail.js +373 -0
  53. package/dist/email/names.d.ts +50 -0
  54. package/dist/email/names.js +74 -0
  55. package/dist/email/routes.d.ts +10 -0
  56. package/dist/email/routes.js +50 -0
  57. package/dist/email/tools.d.ts +27 -0
  58. package/dist/email/tools.js +562 -0
  59. package/dist/environment.d.ts +17 -2
  60. package/dist/environment.js +36 -8
  61. package/dist/errors.d.ts +6 -0
  62. package/dist/errors.js +12 -0
  63. package/dist/eval-mailbox.d.ts +103 -0
  64. package/dist/eval-mailbox.js +236 -0
  65. package/dist/graph-view.d.ts +9 -2
  66. package/dist/graph-view.js +6 -2
  67. package/dist/harness-install.d.ts +28 -2
  68. package/dist/harness-install.js +147 -59
  69. package/dist/harness-opencode/adapter.js +2 -26
  70. package/dist/harness-opencode/facts.js +5 -2
  71. package/dist/harness-opencode/host/policy.d.ts +2 -0
  72. package/dist/harness-opencode/host/policy.js +10 -5
  73. package/dist/harness-opencode/index.d.ts +1 -1
  74. package/dist/harness-opencode/index.js +1 -1
  75. package/dist/harness-opencode/versions.d.ts +6 -0
  76. package/dist/harness-opencode/versions.js +6 -0
  77. package/dist/harness-table.js +8 -5
  78. package/dist/harness.d.ts +12 -0
  79. package/dist/harness.js +15 -3
  80. package/dist/hosted-search.d.ts +3 -1
  81. package/dist/hosted-search.js +51 -11
  82. package/dist/import-sources.d.ts +1 -1
  83. package/dist/import-sources.js +3 -3
  84. package/dist/import.d.ts +21 -0
  85. package/dist/import.js +186 -1
  86. package/dist/key-check.d.ts +0 -2
  87. package/dist/key-check.js +3 -4
  88. package/dist/key-refusal.d.ts +8 -2
  89. package/dist/key-refusal.js +16 -13
  90. package/dist/learn/check.d.ts +18 -3
  91. package/dist/learn/check.js +328 -3
  92. package/dist/learn/compile.d.ts +12 -4
  93. package/dist/learn/compile.js +57 -20
  94. package/dist/learn/grade.d.ts +4 -0
  95. package/dist/learn/grade.js +4 -1
  96. package/dist/learn/promote.d.ts +130 -64
  97. package/dist/learn/promote.js +113 -202
  98. package/dist/learn/refit.d.ts +21 -12
  99. package/dist/learn/refit.js +51 -23
  100. package/dist/learn/replay-calls.js +1 -1
  101. package/dist/learn/skills.d.ts +2 -7
  102. package/dist/learn/skills.js +28 -14
  103. package/dist/learned-nodes.d.ts +15 -7
  104. package/dist/learned-nodes.js +29 -5
  105. package/dist/learned-workflow.d.ts +41 -31
  106. package/dist/learned-workflow.js +122 -63
  107. package/dist/learning-batch.js +3 -3
  108. package/dist/learning-cost.d.ts +35 -8
  109. package/dist/learning-cost.js +27 -9
  110. package/dist/learning-routes.d.ts +2 -4
  111. package/dist/learning-routes.js +20 -3
  112. package/dist/learning-words.d.ts +1 -1
  113. package/dist/learning-words.js +4 -1
  114. package/dist/learning.d.ts +5 -5
  115. package/dist/link-check.d.ts +27 -0
  116. package/dist/link-check.js +164 -0
  117. package/dist/local-models.d.ts +39 -2
  118. package/dist/local-models.js +49 -5
  119. package/dist/mcp-pin-first.js +6 -0
  120. package/dist/mcp-secret-writes.js +3 -0
  121. package/dist/mcp-servers-store.d.ts +25 -16
  122. package/dist/mcp-servers-store.js +23 -3
  123. package/dist/model-form.d.ts +11 -0
  124. package/dist/model-form.js +17 -1
  125. package/dist/model.d.ts +26 -6
  126. package/dist/model.js +126 -18
  127. package/dist/monid.d.ts +26 -31
  128. package/dist/monid.js +84 -79
  129. package/dist/native/binding.d.ts +13 -0
  130. package/dist/native/binding.js +57 -0
  131. package/dist/native/cli.d.ts +2 -0
  132. package/dist/native/cli.js +48 -0
  133. package/dist/native/connection.d.ts +8 -0
  134. package/dist/native/connection.js +94 -0
  135. package/dist/native/context.d.ts +6 -0
  136. package/dist/native/context.js +22 -0
  137. package/dist/native/discovery.d.ts +27 -0
  138. package/dist/native/discovery.js +404 -0
  139. package/dist/native/environment.d.ts +4 -0
  140. package/dist/native/environment.js +18 -0
  141. package/dist/native/history.d.ts +20 -0
  142. package/dist/native/history.js +147 -0
  143. package/dist/native/instructions.d.ts +21 -0
  144. package/dist/native/instructions.js +173 -0
  145. package/dist/native/remote-worker-bridge.d.ts +3 -0
  146. package/dist/native/remote-worker-bridge.js +278 -0
  147. package/dist/native/remote.d.ts +187 -0
  148. package/dist/native/remote.js +492 -0
  149. package/dist/native/runtime.d.ts +17 -0
  150. package/dist/native/runtime.js +316 -0
  151. package/dist/native/runtimes.d.ts +66 -0
  152. package/dist/native/runtimes.js +41 -0
  153. package/dist/native/schema.d.ts +46 -0
  154. package/dist/native/schema.js +41 -0
  155. package/dist/native/types.d.ts +87 -0
  156. package/dist/native/types.js +1 -0
  157. package/dist/observation/http.d.ts +4 -0
  158. package/dist/observation/http.js +140 -0
  159. package/dist/observation/observer.d.ts +301 -0
  160. package/dist/observation/observer.js +919 -0
  161. package/dist/observation/schema.d.ts +52 -0
  162. package/dist/observation/schema.js +154 -0
  163. package/dist/openapi.d.ts +2 -1
  164. package/dist/openapi.js +404 -93
  165. package/dist/paid-calls.d.ts +8 -3
  166. package/dist/paid-calls.js +6 -2
  167. package/dist/place-offers.d.ts +4 -8
  168. package/dist/place-offers.js +4 -9
  169. package/dist/port-models.d.ts +10 -2
  170. package/dist/port-models.js +6 -2
  171. package/dist/print.d.ts +4 -2
  172. package/dist/print.js +4 -3
  173. package/dist/propose.d.ts +1 -2
  174. package/dist/propose.js +10 -1
  175. package/dist/provider.d.ts +5 -1
  176. package/dist/provider.js +8 -0
  177. package/dist/push-handler.d.ts +3 -2
  178. package/dist/push-handler.js +20 -6
  179. package/dist/refusal-words.d.ts +14 -0
  180. package/dist/refusal-words.js +16 -2
  181. package/dist/run-launch.d.ts +12 -1
  182. package/dist/run-launch.js +13 -4
  183. package/dist/run-learning-served.d.ts +75 -2
  184. package/dist/run-manifest.d.ts +3 -0
  185. package/dist/run-manifest.js +13 -1
  186. package/dist/run-reads-over-store.d.ts +3 -3
  187. package/dist/run-reads-over-store.js +13 -10
  188. package/dist/run-timeline-served.d.ts +3 -2
  189. package/dist/run-timeline-served.js +8 -9
  190. package/dist/run-view.d.ts +44 -38
  191. package/dist/run-view.js +93 -56
  192. package/dist/runnable.d.ts +13 -5
  193. package/dist/runnable.js +69 -60
  194. package/dist/runner/adapter-loop.d.ts +48 -13
  195. package/dist/runner/adapter-loop.js +691 -254
  196. package/dist/runner/adapter-run-spec.d.ts +38 -12
  197. package/dist/runner/adapter-run-spec.js +175 -106
  198. package/dist/runner/adapters/pi.d.ts +24 -0
  199. package/dist/runner/adapters/pi.js +59 -9
  200. package/dist/runner/beside.d.ts +3 -1
  201. package/dist/runner/beside.js +24 -8
  202. package/dist/runner/claim-secrets.d.ts +3 -1
  203. package/dist/runner/claim-secrets.js +28 -4
  204. package/dist/runner/cli-run-spec.d.ts +30 -0
  205. package/dist/runner/cli-run-spec.js +95 -50
  206. package/dist/runner/computer-channel.d.ts +5 -2
  207. package/dist/runner/computer-channel.js +3 -2
  208. package/dist/runner/computer-journal.d.ts +6 -0
  209. package/dist/runner/computer-journal.js +8 -10
  210. package/dist/runner/conformance/harness.js +6 -3
  211. package/dist/runner/end-of-run.d.ts +2 -0
  212. package/dist/runner/end-of-run.js +3 -1
  213. package/dist/runner/feedback-round.d.ts +40 -13
  214. package/dist/runner/feedback-round.js +64 -16
  215. package/dist/runner/harness-loops.js +17 -0
  216. package/dist/runner/journal-kinds.d.ts +59 -13
  217. package/dist/runner/journal-kinds.js +48 -5
  218. package/dist/runner/learning-dispatch.d.ts +3 -2
  219. package/dist/runner/learning-dispatch.js +6 -6
  220. package/dist/runner/learning-end.d.ts +4 -0
  221. package/dist/runner/learning-end.js +64 -36
  222. package/dist/runner/learning-factory.d.ts +3 -0
  223. package/dist/runner/learning-factory.js +8 -2
  224. package/dist/runner/learning-loop.d.ts +2 -0
  225. package/dist/runner/learning-loop.js +19 -4
  226. package/dist/runner/loop.d.ts +18 -0
  227. package/dist/runner/loop.js +34 -0
  228. package/dist/runner/main.d.ts +6 -1
  229. package/dist/runner/main.js +26 -4
  230. package/dist/runner/mcp-run.d.ts +4 -1
  231. package/dist/runner/mcp-run.js +11 -5
  232. package/dist/runner/meta-tools.d.ts +10 -3
  233. package/dist/runner/meta-tools.js +112 -36
  234. package/dist/runner/metrics.d.ts +80 -21
  235. package/dist/runner/metrics.js +114 -39
  236. package/dist/runner/model-route.d.ts +14 -3
  237. package/dist/runner/model-route.js +155 -19
  238. package/dist/runner/monid-run.d.ts +8 -6
  239. package/dist/runner/monid-run.js +117 -43
  240. package/dist/runner/native-loop.d.ts +11 -0
  241. package/dist/runner/native-loop.js +438 -0
  242. package/dist/runner/promotion.d.ts +76 -10
  243. package/dist/runner/promotion.js +476 -154
  244. package/dist/runner/redact.js +3 -0
  245. package/dist/runner/reflect-hook.js +9 -0
  246. package/dist/runner/runner.d.ts +7 -1
  247. package/dist/runner/runner.js +8 -4
  248. package/dist/runner/sdk-loop.d.ts +7 -0
  249. package/dist/runner/sdk-loop.js +470 -0
  250. package/dist/runner/spec-holds.d.ts +16 -2
  251. package/dist/runner/spec-holds.js +42 -14
  252. package/dist/runner/store-secrets.js +17 -2
  253. package/dist/runner/workflow-first.d.ts +30 -20
  254. package/dist/runner/workflow-first.js +22 -32
  255. package/dist/runner/workflow-loop.d.ts +1 -1
  256. package/dist/runner/workflow-loop.js +18 -12
  257. package/dist/runner/workflow-spec.d.ts +4 -1
  258. package/dist/runner/workflow-spec.js +56 -45
  259. package/dist/runs-over-store.d.ts +30 -2
  260. package/dist/runs-over-store.js +46 -14
  261. package/dist/sdk/runs.d.ts +115 -0
  262. package/dist/sdk/runs.js +422 -0
  263. package/dist/sdk/schema.d.ts +175 -0
  264. package/dist/sdk/schema.js +138 -0
  265. package/dist/sdk/workflows.d.ts +22 -0
  266. package/dist/sdk/workflows.js +39 -0
  267. package/dist/secrets.d.ts +2 -0
  268. package/dist/secrets.js +19 -1
  269. package/dist/server.d.ts +48 -32
  270. package/dist/server.js +568 -137
  271. package/dist/skill-route.d.ts +3 -0
  272. package/dist/skill-route.js +16 -0
  273. package/dist/skills/agentrun-serve/SKILL.md +368 -0
  274. package/dist/stats.d.ts +10 -10
  275. package/dist/store/agent-body.d.ts +12 -8
  276. package/dist/store/agent-body.js +9 -4
  277. package/dist/store/dialect.d.ts +3 -0
  278. package/dist/store/dialect.js +1 -0
  279. package/dist/store/index.d.ts +1 -1
  280. package/dist/store/native-command-owner.d.ts +10 -0
  281. package/dist/store/native-command-owner.js +47 -0
  282. package/dist/store/postgres/connection.d.ts +11 -5
  283. package/dist/store/postgres/connection.js +44 -17
  284. package/dist/store/postgres/dialect.js +5 -0
  285. package/dist/store/postgres/migrations/0012_revision_monid_pin.sql +4 -0
  286. package/dist/store/postgres/migrations/0013_native_command_owner.sql +6 -0
  287. package/dist/store/postgres/migrations/0014_run_cost_upper_bound.sql +6 -0
  288. package/dist/store/postgres/store.d.ts +7 -3
  289. package/dist/store/postgres/store.js +4 -0
  290. package/dist/store/schema.d.ts +7 -0
  291. package/dist/store/schema.js +20 -1
  292. package/dist/store/sqlite/connection.js +72 -8
  293. package/dist/store/sqlite/run-launch.d.ts +11 -0
  294. package/dist/store/sqlite/run-launch.js +8 -0
  295. package/dist/store/sqlite/run-patch.d.ts +8 -1
  296. package/dist/store/sqlite/run-patch.js +14 -3
  297. package/dist/store/sqlite/store.js +170 -34
  298. package/dist/store/sqlite/worker.d.ts +2 -0
  299. package/dist/store/sqlite/worker.js +13 -10
  300. package/dist/store/store.d.ts +67 -7
  301. package/dist/store-reads/analytics.d.ts +7 -7
  302. package/dist/store-reads/analytics.js +23 -5
  303. package/dist/store-reads/cap.js +8 -6
  304. package/dist/store-reads/journal.d.ts +5 -0
  305. package/dist/store-reads/journal.js +85 -41
  306. package/dist/store-reads/learning.d.ts +115 -18
  307. package/dist/store-reads/learning.js +170 -68
  308. package/dist/store-reads/runs.d.ts +5 -0
  309. package/dist/store-reads/runs.js +3 -2
  310. package/dist/store-view.js +75 -21
  311. package/dist/template-eval.d.ts +73 -11
  312. package/dist/template-eval.js +535 -75
  313. package/dist/templates.d.ts +84 -21
  314. package/dist/templates.js +254 -47
  315. package/dist/text-urls.d.ts +38 -0
  316. package/dist/text-urls.js +170 -0
  317. package/dist/timeline/index.d.ts +3 -2
  318. package/dist/timeline/index.js +3 -2
  319. package/dist/timeline/labels.d.ts +5 -2
  320. package/dist/timeline/labels.js +29 -6
  321. package/dist/timeline/origin.d.ts +1 -1
  322. package/dist/timeline/origin.js +2 -2
  323. package/dist/timeline/render-text.js +1 -1
  324. package/dist/timeline/timeline.d.ts +66 -4
  325. package/dist/timeline/timeline.js +160 -30
  326. package/dist/timeline/util.d.ts +5 -0
  327. package/dist/timeline/util.js +44 -8
  328. package/dist/timeline/web-calls.d.ts +17 -0
  329. package/dist/timeline/web-calls.js +106 -0
  330. package/dist/tool-gate.d.ts +46 -44
  331. package/dist/tool-gate.js +101 -92
  332. package/dist/tool-list.d.ts +4 -1
  333. package/dist/tool-list.js +8 -1
  334. package/dist/tool-names.d.ts +18 -13
  335. package/dist/tool-names.js +19 -17
  336. package/dist/tool-plane.d.ts +17 -13
  337. package/dist/tool-plane.js +12 -5
  338. package/dist/tools.d.ts +57 -16
  339. package/dist/tools.js +33 -28
  340. package/dist/trigger-adapter.d.ts +56 -5
  341. package/dist/trigger-adapter.js +6 -0
  342. package/dist/trigger-adapters.js +3 -1
  343. package/dist/trigger-composio.d.ts +10 -0
  344. package/dist/trigger-composio.js +122 -0
  345. package/dist/trigger-email.d.ts +4 -0
  346. package/dist/trigger-email.js +181 -0
  347. package/dist/trigger-signatures.d.ts +6 -10
  348. package/dist/trigger-signatures.js +16 -16
  349. package/dist/trigger-targets.d.ts +1 -1
  350. package/dist/trigger-targets.js +4 -3
  351. package/dist/trigger-webhook.js +6 -4
  352. package/dist/triggers.d.ts +105 -8
  353. package/dist/triggers.js +286 -62
  354. package/dist/uploads.d.ts +9 -0
  355. package/dist/uploads.js +27 -0
  356. package/dist/validate.js +1 -7
  357. package/dist/web-fake.d.ts +56 -0
  358. package/dist/web-fake.js +102 -0
  359. package/dist/web-fetch-direct.d.ts +3 -0
  360. package/dist/web-fetch-direct.js +4 -1
  361. package/dist/web-fetch.d.ts +5 -1
  362. package/dist/web-fetch.js +8 -31
  363. package/dist/web-search.d.ts +51 -2
  364. package/dist/web-search.js +116 -18
  365. package/dist/webhooks.d.ts +2 -1
  366. package/dist/webhooks.js +5 -1
  367. package/dist/workflow/decision-recovery.js +5 -2
  368. package/dist/workflow/decisions.d.ts +7 -0
  369. package/dist/workflow/node-runner.js +10 -2
  370. package/dist/workspace/archil-claim.d.ts +3 -0
  371. package/dist/workspace/archil-claim.js +9 -2
  372. package/dist/workspace/computer-deps.d.ts +22 -9
  373. package/dist/workspace/computer-deps.js +78 -37
  374. package/dist/workspace/computer-for-claim.d.ts +54 -4
  375. package/dist/workspace/computer-for-claim.js +179 -39
  376. package/dist/workspace/computer-janitor.d.ts +10 -3
  377. package/dist/workspace/computer-janitor.js +96 -29
  378. package/dist/workspace/computer-kept.d.ts +82 -0
  379. package/dist/workspace/computer-kept.js +147 -0
  380. package/dist/workspace/computer-mcp.js +4 -3
  381. package/dist/workspace/computer-ports.d.ts +23 -3
  382. package/dist/workspace/computer-ports.js +115 -5
  383. package/dist/workspace/index.d.ts +1 -2
  384. package/dist/workspace/index.js +1 -2
  385. package/dist/workspace/kind-skills/desktop/SKILL.md +25 -18
  386. package/dist/workspace/kind-skills/phone/SKILL.md +28 -17
  387. package/dist/workspace/resolve-computer.d.ts +15 -3
  388. package/dist/workspace/resolve-computer.js +10 -7
  389. package/dist/workspace/revision-skills.d.ts +6 -2
  390. package/dist/workspace/revision-skills.js +12 -5
  391. package/dist/workspace/run-end-computers.d.ts +30 -0
  392. package/dist/workspace/run-end-computers.js +137 -0
  393. package/dist/workspace/run-tools.d.ts +28 -29
  394. package/dist/workspace/run-tools.js +29 -30
  395. package/dist/wrap-up.d.ts +19 -5
  396. package/dist/wrap-up.js +31 -4
  397. package/package.json +13 -9
  398. package/skills/agentrun-serve/SKILL.md +248 -10
  399. package/templates/README.md +117 -23
  400. package/templates/TOOLS.md +168 -0
  401. package/templates/code-review/agent.md +18 -4
  402. package/templates/code-review/evals/mentions-defused/case.yaml +1 -1
  403. package/templates/code-review/evals/off-by-one/graders/no-repo-reads.md +2 -1
  404. package/templates/code-review/evals/other-repo/case.yaml +1 -1
  405. package/templates/code-review/evals/pasted-by-reference/case.yaml +5 -0
  406. package/templates/code-review/evals/pasted-by-reference/graders/by-reference.md +15 -0
  407. package/templates/code-review/evals/pasted-by-reference/graders/head-sha.md +6 -0
  408. package/templates/code-review/evals/pasted-by-reference/prompt.md +31 -0
  409. package/templates/code-review/skills/review/DEEP.md +2 -2
  410. package/templates/code-review/skills/review/REVIEWER.md +2 -2
  411. package/templates/code-review/skills/review/SKILL.md +7 -3
  412. package/templates/release-notes/evals/draft-not-publish/case.yaml +1 -1
  413. package/templates/release-notes/evals/issue-write-refused/case.yaml +1 -1
  414. package/templates/release-notes/evals/late-arrival/case.yaml +1 -1
  415. package/templates/release-notes/evals/other-repo/case.yaml +1 -1
  416. package/dist/console/assets/index-CjqQirbo.css +0 -1
  417. package/dist/console/assets/index-b6-XY5A9.js +0 -576
  418. package/dist/host-calls.d.ts +0 -20
  419. package/dist/host-calls.js +0 -12
  420. package/dist/runner/adapters/pi-computer.d.ts +0 -9
  421. package/dist/runner/adapters/pi-computer.js +0 -51
  422. package/dist/workspace/computer-script.d.ts +0 -53
  423. package/dist/workspace/computer-script.js +0 -172
@@ -1,3 +1,4 @@
1
+ import { SHELL_FAMILY, SHELL_WATCHERS, shellToolOf } from "@parcha/agentrun-kernel/kernel";
1
2
  import type { Workspace } from "./workspace/workspace.js";
2
3
  import { type ToolSettingsRead } from "./tool-plane.js";
3
4
  import { type SettingFrom } from "./refusal-words.js";
@@ -7,14 +8,6 @@ import { mcpToolName } from "./tool-names.js";
7
8
  export declare const PERMISSIONS: readonly ["allow", "ask", "deny"];
8
9
  export type Permission = (typeof PERMISSIONS)[number];
9
10
  export { mcpToolName };
10
- /** The MCP servers a revision grants tools of, by their catalog names (`mcp:<server>/<tool>`, a server's wildcard too), each
11
- * once: what a harness that names a session's MCP tool its own way (its facts' toolAlias: OpenCode's `<server>_<tool>`) is
12
- * matched against, so its call is held to that tool's settings and never to a table tool's of the same shape. */
13
- export declare const mcpServersOf: (granted: readonly string[]) => string[];
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
- export declare const isCatalogTool: (name: string) => boolean;
18
11
  /** Where a run's shell is, as its default permissions read it: `computer` false for a run with no computer (its bash, where
19
12
  * 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
20
13
  * settings page, capabilities), which reads the computer's defaults. */
@@ -26,32 +19,29 @@ export type ShellWhere = {
26
19
  * the kernel's ruled rule (defaultPermissionOf): bash asks first, and the background tools, which need a computer, are
27
20
  * refused. */
28
21
  export declare const defaultPermission: (name: string, where?: ShellWhere) => Permission;
29
- /** The tools that run a command in the run's box (background.ts SHELL_TOOLS), each held to bash's setting: bash: deny
30
- * refuses bash_background as it refuses bash, and none of them is a settings key of its own. Under bash: ask the
31
- * watchers (SHELL_WATCHERS) run unasked. */
32
- export declare const SHELL_FAMILY: Readonly<Record<string, string>>;
33
- /** The shell tool a call named `name` is, under claude-agent's host-tool name too (`mcp__hands__bash_background`), when
34
- * it is one held to another's setting: its own name, which its request, its refusal and its approved call keep. */
35
- export declare const shellToolOf: (name: string) => string | undefined;
36
- /** The shell tools that only watch or end a process the run already started, by its own id (background.ts: an id is
37
- * digits under the run's own work/background/, and another's is "no background process"): under bash: ask they run
38
- * unasked, so watching an approved process costs no approval per page. bash: deny still refuses them. */
39
- export declare const SHELL_WATCHERS: ReadonlySet<string>;
22
+ export { SHELL_FAMILY, SHELL_WATCHERS, shellToolOf };
40
23
  /** The settings keys that may set `name`'s permission, most specific first: the tool's own name, then, for an MCP
41
24
  * tool, its server's wildcard `mcp:<server>/*`, and for a monid endpoint, its provider's `monid:<provider>/*`. */
42
25
  export declare function permissionKeys(name: string): string[];
26
+ /** The tool a call of `name` with `args` is held to, with the arguments that tool's gate reads, where it is not its own:
27
+ * a computer_op whose op runs what one of the run's own tools runs (OP_HELD_AS), with its command and cwd, or its path.
28
+ * Undefined for any other call. */
29
+ export declare function heldAs(name: string, args: unknown): {
30
+ readonly tool: string;
31
+ readonly args: unknown;
32
+ } | undefined;
43
33
  /** A session's `{name -> settings key}` map (nameMapOf). */
44
34
  export type NameMap = ReadonlyMap<string, string>;
45
- /** Every name a session on `harness` (with MCP servers `mcpServers`) gives its tools, to the settings key each is held to:
46
- * the shell family (bash's), table, own and decision tools, read_skill_file (`read`, unless the harness's alias makes it a
47
- * configured server's tool), the kinds' tools (a shared one by its first kind), nativeTools, the browser's registrations;
48
- * each also as claude-agent's `mcp__hands__<name>`. The first named wins. */
49
- export declare function nameMapOf(harness: string, mcpServers?: readonly string[]): NameMap;
35
+ /** Every name a session on `harness` gives its tools, to the settings key each is held to: the shell family (bash's),
36
+ * table, own and decision tools, read_skill_file (`read`), the kinds' tools (a shared one by its first kind), nativeTools,
37
+ * the browser's registrations. The names are the host's own: each adapter maps its CLI's names to them (its facts'
38
+ * hostName). The first named wins. */
39
+ export declare function nameMapOf(harness: string): NameMap;
50
40
  /** The settings key a call named `name` on `harness` is held to: a lookup in the session's names (`names`), then the open
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). */
54
- export declare function settingsKeyOf(harness: string, name: string, mcpServers?: readonly string[], names?: NameMap): string | undefined;
41
+ * open family no list holds (a catalog name, `mcp:<server>/<tool>` or `monid:<provider>/<endpoint>`). Undefined: nothing
42
+ * maps it, and the gate asks (an MCP tool's or monid endpoint's wire name is read back by the loop, ClaimMcp.catalogOf,
43
+ * before the gate is asked). */
44
+ export declare function settingsKeyOf(harness: string, name: string, names?: NameMap): string | undefined;
55
45
  /** A pinned argument's scalar: `null` holds for a call that leaves the argument out (or gives null). */
56
46
  export type PinScalar = string | number | boolean | null;
57
47
  /** A pinned object argument's keys: the argument, when given (not left out, nor null), is an object whose keys are among
@@ -137,8 +127,10 @@ export declare const SETTINGS_UNREAD: unique symbol;
137
127
  * workflow's call nodes'. */
138
128
  export declare const permissionOf: (name: string, server: PermissionSettings, agent?: PermissionSettings, approvals?: Approvals, effect?: ToolEffect) => Permission;
139
129
  /** An approval's price for the person who answers it: USD where the tool declares one (booked through the spend cap's
140
- * paidCall), else "not metered" (an unpriced MCP call, the owner's ruling of 11-04). */
141
- export type ApprovalPrice = number | "not metered";
130
+ * paidCall), else "not metered" (an unpriced MCP call, the owner's ruling of 11-04), or "priced by usage" for a monid
131
+ * endpoint priced by usage: monid estimates its cost only when the call runs, after the person's allow, and its charge
132
+ * can pass that estimate (runner/monid-run.ts). */
133
+ export type ApprovalPrice = number | "not metered" | "priced by usage";
142
134
  /** One pending approval, as the run's view shows it (`pending`) and the console's approval card reads it. */
143
135
  export type PendingApproval = {
144
136
  kind: "approval";
@@ -148,14 +140,19 @@ export type PendingApproval = {
148
140
  call_id: string;
149
141
  /** The call's arguments as text, at most ARGS_PREVIEW_BYTES. */
150
142
  args_preview: string;
143
+ /** What the call does in words, where its tool says (email_send: "Send email to <to>, cc <cc>: <subject>" and the
144
+ * text's first 300 characters), then why it asks when its setting allows it (ToolEntry.asks), redacted as its
145
+ * arguments are. */
146
+ summary?: string;
151
147
  requested_at: string;
152
148
  price?: ApprovalPrice;
153
149
  /** Present, true, when the run's pin marks the tool destructive (toolEffect): an allow of it needs confirm_destructive. */
154
150
  destructive?: true;
155
151
  };
156
152
  export { type DenyFrom, deniedText, denyPlace, NOT_RUN, RAN_UNKNOWN, refusedText, type SettingFrom } from "./refusal-words.js";
157
- /** The refusal of an ask where no one can approve it: a server with accounts off, whose answer route takes no token. */
158
- export declare const noApproverText: (tool: string, ran?: "no" | "unknown") => string;
153
+ /** The refusal of an ask where no one can approve it: a server with accounts off, whose answer route takes no token.
154
+ * `because`: the tool's own reason (ToolEntry.asks) for a call its setting allows, which no setting lifts. */
155
+ export declare const noApproverText: (tool: string, ran?: "no" | "unknown", because?: string) => string;
159
156
  /** The Timeline row of a call that waits for an approval. */
160
157
  export declare const APPROVAL_ROW: "tool_approval_requested";
161
158
  /** A call's arguments shown on its approval, at most this many bytes. */
@@ -185,14 +182,11 @@ export declare function previewOf(text: string): string;
185
182
  /** The gate of the run `runId` whose folder is `where`, on its pinned revision. `serverSettings`: the server's tool
186
183
  * settings as the runner read them from the one store at the claim (tool-plane.ts loadToolSettings), read at each call as
187
184
  * the gate reads them. `approvers`: whether anyone can answer an ask here, the store's (server-approvers.ts, read at each
188
- * claim). The gate reads nothing of the run's own files: they are the agent's to write. `mcpServers`: the run's MCP
189
- * servers (mcpServersOf its grants), so a harness's own name for an MCP tool is held to that tool's settings. */
185
+ * claim). The gate reads nothing of the run's own files: they are the agent's to write. */
190
186
  export declare function runGate(where: {
191
187
  root: string;
192
188
  work: string;
193
189
  computer?: boolean;
194
- mcpServers?: readonly string[];
195
- computerCodemode?: boolean;
196
190
  effectOf?: (name: string) => ToolEffect | undefined;
197
191
  argumentsOf?: ArgumentsOf;
198
192
  }, runId: string, revision: {
@@ -201,6 +195,8 @@ export declare function runGate(where: {
201
195
  toolSettings?: unknown;
202
196
  harness?: string;
203
197
  approvals?: Approvals;
198
+ computer?: unknown;
199
+ place?: unknown;
204
200
  };
205
201
  }, serverSettings: () => ToolSettingsRead, approvers: boolean): RunGate;
206
202
  /** The top-level arguments the listing of the MCP tool `name` (`mcp:<server>/<tool>`) in the run's pin declares under
@@ -227,9 +223,8 @@ export declare class RunGate {
227
223
  work: string;
228
224
  runId: string;
229
225
  harness?: string;
230
- mcpServers?: readonly string[];
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;
226
+ computer?: boolean; /** The run's computer kind (its revision's setting): the key a computer tool's refusal and ask name on a tie (kindSetting). */
227
+ kind?: string;
233
228
  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
229
  argumentsOf?: ArgumentsOf;
235
230
  }, readServerSettings: () => ToolSettingsRead, overrides?: PermissionSettings, approvers?: boolean, approvals?: Approvals);
@@ -250,16 +245,23 @@ export declare class RunGate {
250
245
  }): Promise<"allow" | "ask" | {
251
246
  deny: string;
252
247
  }>;
248
+ /** The settings key a call of `name` is held to, the one its refusal and its ask name: a computer tool's is the kind
249
+ * whose setting decides it (kindSetting), any other's its session's name map. */
253
250
  private keyOf;
251
+ /** A computer tool's settings keys (KIND_TOOLS), the run's own kind first (where.kind); undefined for any other tool. */
252
+ private kindKeysOf;
253
+ /** A computer tool's permission: the stricter of its kinds' settings (a desktop's and a phone's keys both hold it), and
254
+ * the key that decided it, the run's own kind on a tie, so a phone run's refusal and ask say phone. */
255
+ private kindSetting;
254
256
  /** The name a call is asked about by, as main's request names it (enter's `tool`): its settings key, a shell tool its
255
- * own name; a name nothing maps, as it came. */
256
- askedAs(name: string): string;
257
+ * own name; a script's computer op with `args` by the tool it is held to (heldAs); a name nothing maps, as it came. */
258
+ askedAs(name: string, args?: unknown): string;
259
+ private computerGate?;
260
+ /** This gate as on a computer: where a script's computer op runs (heldAs), whatever the run's own shell is. */
261
+ private onComputer;
257
262
  /** Where the permission `policy` gives `tool` was set: the agent's own tool settings, the server's, or the default; or
258
263
  * "unattended", an ask the agent's approvals allowed. */
259
264
  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;
263
265
  private setting;
264
266
  /** `tool`'s permission under its settings key `key`, and where it was set. */
265
267
  private settingOf;
package/dist/tool-gate.js CHANGED
@@ -24,59 +24,37 @@
24
24
  // wins; the same answer again is 204, a conflicting one 409. Only the owner's password session answers (server.ts), never
25
25
  // a token. A cancel marks pending approvals canceled. Where no one can approve (accounts off), an ask is refused at once
26
26
  // in words, never parked.
27
- import { CODEMODE_TOOL_NAME } from "@earendil-works/pi-durable/codemode";
28
- import { computerToolDefs, defaultPermissionOf } from "@parcha/agentrun-kernel/kernel";
27
+ import { COMPUTER_OP_TOOL, computerToolDefs, defaultPermissionOf, SHELL_FAMILY, SHELL_WATCHERS, shellPermission, shellToolOf } from "@parcha/agentrun-kernel/kernel";
29
28
  import { READ_SKILL_FILE } from "@parcha/agentrun-kernel";
30
29
  import { LEARNED_DIR } from "./learning.js";
31
30
  import { COMPUTER_ROOT, portPath } from "./workspace/paths.js";
32
31
  import { builtinHarness } from "./harness-table.js";
33
32
  import { META_TOOLS } from "./meta-tool-names.js";
34
33
  import { DEFAULT_HARNESS } from "./harness.js";
35
- import { SHELL_TOOLS } from "./background.js";
36
34
  import { DECISION_PROVIDER_KEYS, KIND_KEYS, SERVE_OWN_TOOLS } from "./tool-plane.js";
37
- import { isToolRow, tableTools } from "./tool-list.js";
38
- import { deniedText, NOT_RUN, RAN_UNKNOWN } from "./refusal-words.js";
35
+ import { asksByDefault, isToolRow, tableTools } from "./tool-list.js";
36
+ import { CANT_BE_CALLED, DENIED_OPENING, deniedText, NOT_RUN, RAN_UNKNOWN } from "./refusal-words.js";
39
37
  import { approvalsOf } from "./approvals.js";
38
+ import { settingOfDefinition } from "./computer-setting.js";
40
39
  import { BASH_POLICIES, readOnlyReason, readOnlyText } from "./bash-read-only.js";
41
- import { formatToolName, isCatalogName, mcpNameOf, mcpServerOf, mcpToolName, monidNameOf } from "./tool-names.js";
40
+ import { formatToolName, isCatalogName, mcpNameOf, mcpToolName, monidNameOf } from "./tool-names.js";
42
41
  /** What the gate does with a tool's calls. */
43
42
  export const PERMISSIONS = ["allow", "ask", "deny"];
44
43
  // An MCP tool's gate name is its catalog name, `mcp:<server>/<tool>` (tool-names.ts).
45
44
  export { mcpToolName };
46
- /** The MCP servers a revision grants tools of, by their catalog names (`mcp:<server>/<tool>`, a server's wildcard too), each
47
- * once: what a harness that names a session's MCP tool its own way (its facts' toolAlias: OpenCode's `<server>_<tool>`) is
48
- * matched against, so its call is held to that tool's settings and never to a table tool's of the same shape. */
49
- export const mcpServersOf = (granted) => [...new Set(granted.flatMap((name) => mcpServerOf(name) ?? []))];
50
- /** A third-party catalog tool, by its name: any in MCP's namespace (`mcp:<server>/<tool>`) or monid's
51
- * (`monid:<provider>/<endpoint>`), a group's wildcard too; one that does not parse too, so the default for it is a
52
- * catalog tool's ask. */
53
- export const isCatalogTool = isCatalogName;
54
45
  const isBuiltin = (name) => isToolRow(name) || SERVE_OWN_TOOLS.includes(name) || KIND_KEYS.includes(name) || DECISION_PROVIDER_KEYS.includes(name);
55
46
  /** 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
56
47
  * decision provider's) allows; anything else asks, so a new source never defaults to allow. On a run with no computer,
57
48
  * the kernel's ruled rule (defaultPermissionOf): bash asks first, and the background tools, which need a computer, are
58
49
  * refused. */
59
50
  export const defaultPermission = (name, where = {}) => {
60
- if (isCatalogTool(name) || !isBuiltin(name))
51
+ if (isCatalogName(name) || !isBuiltin(name) || asksByDefault(name))
61
52
  return "ask";
62
53
  return where.computer === false ? defaultPermissionOf(name, { computer: false }) : "allow";
63
54
  };
64
- /** The tools that run a command in the run's box (background.ts SHELL_TOOLS), each held to bash's setting: bash: deny
65
- * refuses bash_background as it refuses bash, and none of them is a settings key of its own. Under bash: ask the
66
- * watchers (SHELL_WATCHERS) run unasked. */
67
- export const SHELL_FAMILY = Object.freeze(Object.fromEntries(SHELL_TOOLS.map((name) => [name, "bash"])));
68
- /** The shell tool a call named `name` is, under claude-agent's host-tool name too (`mcp__hands__bash_background`), when
69
- * it is one held to another's setting: its own name, which its request, its refusal and its approved call keep. */
70
- export const shellToolOf = (name) => {
71
- const own = name.replace(/^mcp__hands__/, "");
72
- return Object.hasOwn(SHELL_FAMILY, own) && SHELL_FAMILY[own] !== own ? own : undefined;
73
- };
74
- /** The shell tools that only watch or end a process the run already started, by its own id (background.ts: an id is
75
- * digits under the run's own work/background/, and another's is "no background process"): under bash: ask they run
76
- * unasked, so watching an approved process costs no approval per page. bash: deny still refuses them. */
77
- export const SHELL_WATCHERS = new Set(["bash_output", "bash_list", "bash_signal"]);
78
- /** Shell tool `name`'s permission, given bash's: a watcher's ask is allow; any other keeps bash's. */
79
- const shellPermission = (name, bash) => (bash === "ask" && SHELL_WATCHERS.has(name) ? "allow" : bash);
55
+ // The shell family (bash and the background tools, each held to bash's setting; its watchers run unasked under bash: ask)
56
+ // is the kernel registry's, read here.
57
+ export { SHELL_FAMILY, SHELL_WATCHERS, shellToolOf };
80
58
  /** The settings keys that may set `name`'s permission, most specific first: the tool's own name, then, for an MCP
81
59
  * tool, its server's wildcard `mcp:<server>/*`, and for a monid endpoint, its provider's `monid:<provider>/*`. */
82
60
  export function permissionKeys(name) {
@@ -95,29 +73,42 @@ const KIND_TOOLS = (() => {
95
73
  const keys = new Map();
96
74
  for (const def of [...computerToolDefs("desktop", []), ...computerToolDefs("phone", [])])
97
75
  keys.set(def.name, [...new Set([...(keys.get(def.name) ?? []), def.settingsKey])]);
98
- // pi's code mode, offered only beside a desktop's or a phone's tools (runner/adapters/pi-computer.ts): its scripts
99
- // reach the computer as computer_script's do, so it is held to the same keys. Its nested tool calls pass the gate each.
100
- keys.set(CODEMODE_TOOL_NAME, keys.get("computer_script") ?? []);
101
76
  return keys;
102
77
  })();
78
+ /** A script's computer op (computer_op's `op`) that runs on the computer what one of the run's own tools runs, held to
79
+ * that tool's setting: the shell is bash's, a program started to run on (processes.start) bash_background's (bash's
80
+ * setting, and a read-only bash policy refuses it), a file's write is write's, a file's read, listing or stat is
81
+ * read's. The other ops (apps, raw input) are the computer kind's, computer_op's own key (KIND_TOOLS). */
82
+ const OP_HELD_AS = Object.freeze({ "shell.run": "bash", "processes.start": "bash_background", "files.write": "write", "files.read": "read", "files.list": "read", "files.stat": "read" });
83
+ /** The ops whose command runs in the computer's shell. */
84
+ const SHELL_OPS = new Set(["shell.run", "processes.start"]);
85
+ /** The tool a call of `name` with `args` is held to, with the arguments that tool's gate reads, where it is not its own:
86
+ * a computer_op whose op runs what one of the run's own tools runs (OP_HELD_AS), with its command and cwd, or its path.
87
+ * Undefined for any other call. */
88
+ export function heldAs(name, args) {
89
+ if (name !== COMPUTER_OP_TOOL)
90
+ return undefined;
91
+ const { op, args: given } = (args ?? {});
92
+ const tool = typeof op === "string" && Object.hasOwn(OP_HELD_AS, op) ? OP_HELD_AS[op] : undefined;
93
+ if (tool === undefined)
94
+ return undefined;
95
+ const fields = (given !== null && typeof given === "object" ? given : {});
96
+ return { tool, args: SHELL_OPS.has(op) ? { command: fields.command, ...(fields.cwd !== undefined ? { cwd: fields.cwd } : {}) } : { path: fields.path } };
97
+ }
103
98
  const STRICTNESS = { allow: 0, ask: 1, deny: 2 };
104
- /** The MCP server through which claude-agent calls the kernel's host tools (`mcp__hands__<wire name>`). */
105
- const HOST_TOOLS_SERVER = "hands";
106
- /** Every name a session on `harness` (with MCP servers `mcpServers`) gives its tools, to the settings key each is held to:
107
- * the shell family (bash's), table, own and decision tools, read_skill_file (`read`, unless the harness's alias makes it a
108
- * configured server's tool), the kinds' tools (a shared one by its first kind), nativeTools, the browser's registrations;
109
- * each also as claude-agent's `mcp__hands__<name>`. The first named wins. */
110
- export function nameMapOf(harness, mcpServers = []) {
99
+ /** Every name a session on `harness` gives its tools, to the settings key each is held to: the shell family (bash's),
100
+ * table, own and decision tools, read_skill_file (`read`), the kinds' tools (a shared one by its first kind), nativeTools,
101
+ * the browser's registrations. The names are the host's own: each adapter maps its CLI's names to them (its facts'
102
+ * hostName). The first named wins. */
103
+ export function nameMapOf(harness) {
111
104
  const facts = builtinHarness(harness)?.facts;
112
105
  const names = new Map();
113
106
  const name = (own, key) => void (names.has(own) || names.set(own, key));
114
107
  for (const [own, key] of Object.entries(SHELL_FAMILY))
115
108
  name(own, key);
116
- // pi's code mode (`codemode`) is the computer kind's (KIND_TOOLS); the host's own is read by its own key (RunGate.hostMeta).
117
- for (const own of [...tableTools(), ...SERVE_OWN_TOOLS.filter((one) => one !== CODEMODE_TOOL_NAME), ...DECISION_PROVIDER_KEYS])
109
+ for (const own of [...tableTools(), ...SERVE_OWN_TOOLS, ...DECISION_PROVIDER_KEYS])
118
110
  name(own, own);
119
- const alias = facts?.toolAlias?.exec(READ_SKILL_FILE) ?? null;
120
- name(READ_SKILL_FILE, alias && mcpServers.includes(alias[1]) ? mcpToolName(alias[1], alias[2]) : "read");
111
+ name(READ_SKILL_FILE, "read");
121
112
  for (const [own, keys] of KIND_TOOLS)
122
113
  name(own, keys[0]);
123
114
  for (const [own, key] of Object.entries(facts?.nativeTools ?? {}))
@@ -125,25 +116,17 @@ export function nameMapOf(harness, mcpServers = []) {
125
116
  name(own, key);
126
117
  for (const own of BROWSER_REGISTRATIONS)
127
118
  name(own, "browser");
128
- for (const [own, key] of [...names])
129
- name(`mcp__${HOST_TOOLS_SERVER}__${own}`, key);
130
119
  return names;
131
120
  }
132
121
  /** The settings key a call named `name` on `harness` is held to: a lookup in the session's names (`names`), then the open
133
- * families no list holds (a catalog name, `mcp:<server>/<tool>` or `monid:<provider>/<endpoint>`, `mcp__<server>__<tool>`,
134
- * and a harness's own `<server>_<tool>` for a server of `mcpServers` only). Undefined: nothing maps it, and the gate asks
135
- * (a monid endpoint's wire name is read back by the loop, ClaimMcp.catalogOf, before the gate is asked). */
136
- export function settingsKeyOf(harness, name, mcpServers = [], names = nameMapOf(harness, mcpServers)) {
122
+ * open family no list holds (a catalog name, `mcp:<server>/<tool>` or `monid:<provider>/<endpoint>`). Undefined: nothing
123
+ * maps it, and the gate asks (an MCP tool's or monid endpoint's wire name is read back by the loop, ClaimMcp.catalogOf,
124
+ * before the gate is asked). */
125
+ export function settingsKeyOf(harness, name, names = nameMapOf(harness)) {
137
126
  const own = names.get(name);
138
127
  if (own !== undefined)
139
128
  return own;
140
- if (isCatalogTool(name))
141
- return name;
142
- const mcp = /^mcp__([a-z][a-z0-9-]*)__(.+)$/.exec(name);
143
- if (mcp)
144
- return mcp[1] === HOST_TOOLS_SERVER ? settingsKeyOf(harness, mcp[2], mcpServers, names) : mcpToolName(mcp[1], mcp[2]);
145
- const alias = builtinHarness(harness)?.facts?.toolAlias?.exec(name) ?? null;
146
- return alias && mcpServers.includes(alias[1]) ? mcpToolName(alias[1], alias[2]) : undefined;
129
+ return isCatalogName(name) ? name : undefined;
147
130
  }
148
131
  /** Whether a pin's value is a keys pin: the one form that is an object. */
149
132
  export const isPinKeys = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
@@ -217,13 +200,13 @@ export function pinRefusal(name, args, server, agent = {}, ran = "no", declared)
217
200
  return undefined;
218
201
  const what = ran === "no" ? NOT_RUN : RAN_UNKNOWN;
219
202
  if (server[name]?.brokenPin)
220
- return { text: `${name} can't be called: its pin in this server's tool settings does not read, so no call is let through until the owner sets it again (Settings → Tools). ${what}`, mismatched: [] };
203
+ return { text: `${name}${CANT_BE_CALLED}its pin in this server's tool settings does not read, so no call is let through until the owner sets it again (Settings → Tools). ${what}`, mismatched: [] };
221
204
  const own = agent[name]?.pin ?? {};
222
205
  const theirs = server[name]?.pin ?? {};
223
206
  // Both layers hold: an argument both pin takes what holds both (bothOf), and one where nothing does refuses every call.
224
207
  const clash = Object.keys(own).filter((arg) => Object.hasOwn(theirs, arg) && bothOf(own[arg], theirs[arg]) === undefined);
225
208
  if (clash.length)
226
- return { text: `${name} can't be called: this agent's settings fix ${pinWords(Object.fromEntries(clash.map((arg) => [arg, own[arg]])))} and this server's fix ${pinWords(Object.fromEntries(clash.map((arg) => [arg, theirs[arg]])))}, so no call can satisfy both. ${what} Don't retry it: the owner makes the two agree.`, mismatched: clash };
209
+ return { text: `${name}${CANT_BE_CALLED}this agent's settings fix ${pinWords(Object.fromEntries(clash.map((arg) => [arg, own[arg]])))} and this server's fix ${pinWords(Object.fromEntries(clash.map((arg) => [arg, theirs[arg]])))}, so no call can satisfy both. ${what} Don't retry it: the owner makes the two agree.`, mismatched: clash };
227
210
  const pin = { ...theirs, ...Object.fromEntries(Object.entries(own).map(([arg, value]) => [arg, Object.hasOwn(theirs, arg) ? bothOf(value, theirs[arg]) : value])) };
228
211
  const given = typeof args === "object" && args !== null && !Array.isArray(args) ? args : {};
229
212
  const undeclared = declared && Object.keys(pin).length ? Object.keys(given).filter((arg) => !declared.has(arg) && !Object.hasOwn(pin, arg)) : [];
@@ -262,9 +245,9 @@ export function toolEffect(annotations) {
262
245
  * run's gate (ClaimMcp.effectOf) and a settings save's wake (settings-wake.ts) read, never a live listing. Undefined for a
263
246
  * tool the pin does not hold. */
264
247
  export function pinnedEffect(pin, name) {
265
- const parsed = /^mcp:([^/]+)\/(.+)$/.exec(name);
266
- const pinned = parsed && Object.hasOwn(pin, parsed[1]) ? pin[parsed[1]] : undefined;
267
- const tool = pinned?.tools.find((one) => one.name === parsed[2]);
248
+ const parsed = mcpNameOf(name);
249
+ const pinned = parsed && Object.hasOwn(pin, parsed.server) ? pin[parsed.server] : undefined;
250
+ const tool = pinned?.tools.find((one) => one.name === parsed.tool);
268
251
  return tool ? toolEffect(tool.annotations) : undefined;
269
252
  }
270
253
  /** Whether "allow reads" lifts the ask of MCP tool `name`, one its run's pin marks read-only (permissionFrom's `effect`):
@@ -346,8 +329,11 @@ export const permissionOf = (name, server, agent = {}, approvals = "ask", effect
346
329
  // The refusal words (SettingFrom, DenyFrom, NOT_RUN, RAN_UNKNOWN, denyPlace, deniedText, refusedText) live in
347
330
  // refusal-words.ts, shared with the runner's loops.
348
331
  export { deniedText, denyPlace, NOT_RUN, RAN_UNKNOWN, refusedText } from "./refusal-words.js";
349
- /** The refusal of an ask where no one can approve it: a server with accounts off, whose answer route takes no token. */
350
- export const noApproverText = (tool, ran = "no") => `Permission denied: ${tool} needs the owner's approval, and this server has accounts off (AGENTRUN_ACCOUNTS=0), so no one can give it: set the tool to allow or deny in the agent's Tools. ${ran === "no" ? NOT_RUN : RAN_UNKNOWN}`;
332
+ /** The refusal of an ask where no one can approve it: a server with accounts off, whose answer route takes no token.
333
+ * `because`: the tool's own reason (ToolEntry.asks) for a call its setting allows, which no setting lifts. */
334
+ export const noApproverText = (tool, ran = "no", because) => because === undefined
335
+ ? `${DENIED_OPENING}${tool} needs the owner's approval, and this server has accounts off (AGENTRUN_ACCOUNTS=0), so no one can give it: set the tool to allow or deny in the agent's Tools. ${ran === "no" ? NOT_RUN : RAN_UNKNOWN}`
336
+ : `${DENIED_OPENING}${tool} needs the owner's approval for this call (${because}), and this server has accounts off (AGENTRUN_ACCOUNTS=0), so no one can give it. ${ran === "no" ? NOT_RUN : RAN_UNKNOWN}`;
351
337
  /** The Timeline row of a call that waits for an approval. */
352
338
  export const APPROVAL_ROW = "tool_approval_requested";
353
339
  /** A call's arguments shown on its approval, at most this many bytes. */
@@ -374,10 +360,11 @@ export function previewOf(text) {
374
360
  /** The gate of the run `runId` whose folder is `where`, on its pinned revision. `serverSettings`: the server's tool
375
361
  * settings as the runner read them from the one store at the claim (tool-plane.ts loadToolSettings), read at each call as
376
362
  * the gate reads them. `approvers`: whether anyone can answer an ask here, the store's (server-approvers.ts, read at each
377
- * claim). The gate reads nothing of the run's own files: they are the agent's to write. `mcpServers`: the run's MCP
378
- * servers (mcpServersOf its grants), so a harness's own name for an MCP tool is held to that tool's settings. */
363
+ * claim). The gate reads nothing of the run's own files: they are the agent's to write. */
379
364
  export function runGate(where, runId, revision, serverSettings, approvers) {
380
- return new RunGate({ root: where.root, work: where.work, runId, harness: revision.body.harness ?? DEFAULT_HARNESS, ...(where.computer === undefined ? {} : { computer: where.computer }), ...(where.mcpServers ? { mcpServers: where.mcpServers } : {}), ...(where.computerCodemode ? { computerCodemode: true } : {}), ...(where.effectOf ? { effectOf: where.effectOf } : {}), ...(where.argumentsOf ? { argumentsOf: where.argumentsOf } : {}) }, serverSettings, (revision.body.toolSettings ?? {}), approvers, approvalsOf(revision.body.approvals));
365
+ // The run's computer kind, from its revision's setting (as the claim starts it): a computer tool's words name it.
366
+ const kind = settingOfDefinition(revision.body)?.computer.kind;
367
+ return new RunGate({ root: where.root, work: where.work, runId, harness: revision.body.harness ?? DEFAULT_HARNESS, ...(where.computer === undefined ? {} : { computer: where.computer }), ...(kind !== undefined ? { kind } : {}), ...(where.effectOf ? { effectOf: where.effectOf } : {}), ...(where.argumentsOf ? { argumentsOf: where.argumentsOf } : {}) }, serverSettings, (revision.body.toolSettings ?? {}), approvers, approvalsOf(revision.body.approvals));
381
368
  }
382
369
  /** A run's tool gate on the runner: its policy, asked before each call's intent (decide). */
383
370
  export class RunGate {
@@ -412,15 +399,20 @@ export class RunGate {
412
399
  * refusal says whether it took effect is not known, never that nothing was sent. */
413
400
  async decide(name, args, options = {}) {
414
401
  // tools_search, tools_call and the host's codemode (runner/meta-tools.ts) run: each call they make is asked about here
415
- // as its own tool, by its own name. pi's code mode on a run with a desktop or a phone is not the host's: its scripts
416
- // reach the computer themselves, so it is held to the kind's setting (KIND_TOOLS).
417
- const own = name.replace(/^mcp__hands__/, "");
402
+ // as its own tool, by its own name (a computer's tool by its kind's setting, KIND_TOOLS).
418
403
  // Each has a settings key of its own (allow unless an owner sets deny: a denied one is not offered, and a call to it is
419
404
  // refused here).
420
- if (this.hostMeta(own)) {
405
+ if (META_TOOLS.has(name)) {
421
406
  const setting = this.setting(name);
422
- return setting.permission === "deny" ? { deny: deniedText(own, own, setting.from, options.replayed ? "unknown" : "no") } : "allow";
407
+ return setting.permission === "deny" ? { deny: deniedText(name, name, setting.from, options.replayed ? "unknown" : "no") } : "allow";
423
408
  }
409
+ // A script's computer op that runs what one of the run's own tools runs (heldAs: its shell, its files) is that tool's
410
+ // call, decided as on a computer, where it runs: a desktop that mounts no folder has a computer to run a command on,
411
+ // so shell.run and processes.start follow bash's one setting alike, as the run's own tools on a computer do. It is a
412
+ // computer tool too: the kind's deny (desktop or phone set to deny) refuses it first, in the kind's words, below.
413
+ const held = heldAs(name, args);
414
+ if (held && this.policy(name) !== "deny")
415
+ return this.onComputer().decide(held.tool, held.args, options);
424
416
  const key = this.keyOf(name) ?? name;
425
417
  const tool = this.askedAs(name);
426
418
  const ran = options.replayed ? "unknown" : "no";
@@ -437,33 +429,50 @@ export class RunGate {
437
429
  return "allow";
438
430
  return this.approvers ? "ask" : { deny: noApproverText(tool, ran) };
439
431
  }
432
+ /** The settings key a call of `name` is held to, the one its refusal and its ask name: a computer tool's is the kind
433
+ * whose setting decides it (kindSetting), any other's its session's name map. */
440
434
  keyOf(name) {
435
+ const kinds = this.kindKeysOf(name);
436
+ if (kinds)
437
+ return this.kindSetting(name, kinds).key;
441
438
  const harness = this.where.harness ?? DEFAULT_HARNESS;
442
- return settingsKeyOf(harness, name, this.where.mcpServers, (this.names ??= nameMapOf(harness, this.where.mcpServers)));
439
+ return settingsKeyOf(harness, name, (this.names ??= nameMapOf(harness)));
440
+ }
441
+ /** A computer tool's settings keys (KIND_TOOLS), the run's own kind first (where.kind); undefined for any other tool. */
442
+ kindKeysOf(tool) {
443
+ const keys = KIND_TOOLS.get(tool);
444
+ const kind = this.where.kind;
445
+ return keys && kind !== undefined && keys.includes(kind) ? [kind, ...keys.filter((key) => key !== kind)] : keys;
446
+ }
447
+ /** A computer tool's permission: the stricter of its kinds' settings (a desktop's and a phone's keys both hold it), and
448
+ * the key that decided it, the run's own kind on a tie, so a phone run's refusal and ask say phone. */
449
+ kindSetting(tool, kinds) {
450
+ return kinds.map((key) => ({ ...this.settingOf(tool, key), key })).reduce((strictest, one) => (STRICTNESS[one.permission] > STRICTNESS[strictest.permission] ? one : strictest));
443
451
  }
444
452
  /** The name a call is asked about by, as main's request names it (enter's `tool`): its settings key, a shell tool its
445
- * own name; a name nothing maps, as it came. */
446
- askedAs(name) {
453
+ * own name; a script's computer op with `args` by the tool it is held to (heldAs); a name nothing maps, as it came. */
454
+ askedAs(name, args) {
455
+ const held = heldAs(name, args);
456
+ if (held)
457
+ return this.askedAs(held.tool);
447
458
  return shellToolOf(name) ?? this.keyOf(name) ?? name;
448
459
  }
460
+ computerGate;
461
+ /** This gate as on a computer: where a script's computer op runs (heldAs), whatever the run's own shell is. */
462
+ onComputer() {
463
+ return (this.computerGate ??= new RunGate({ ...this.where, computer: true }, this.readServerSettings, this.overrides, this.approvers, this.approvals));
464
+ }
449
465
  /** Where the permission `policy` gives `tool` was set: the agent's own tool settings, the server's, or the default; or
450
466
  * "unattended", an ask the agent's approvals allowed. */
451
467
  denyFrom = (tool) => this.setting(tool).from;
452
- /** 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
453
- * desktop or a phone (which is held to the kind's keys). */
454
- hostMeta(bare) {
455
- return META_TOOLS.has(bare) && !(bare === CODEMODE_TOOL_NAME && this.where.computerCodemode);
456
- }
457
468
  setting(tool) {
458
- const bare = tool.replace(/^mcp__hands__/, "");
459
- if (this.hostMeta(bare))
460
- return this.settingOf(tool, bare);
461
- // A tool the desktop and the phone both have (every computer tool): the gate knows not the run's kind, so it is held to the
462
- // stricter of both keys' settings, never more permissive than the run's own kind's.
463
- const shared = KIND_TOOLS.get(tool.replace(/^mcp__hands__/, ""));
464
- if (shared && shared.length > 1) {
465
- return shared.map((key) => this.settingOf(tool, key)).reduce((strictest, one) => (STRICTNESS[one.permission] > STRICTNESS[strictest.permission] ? one : strictest));
466
- }
469
+ if (META_TOOLS.has(tool))
470
+ return this.settingOf(tool, tool);
471
+ // A tool the desktop and the phone both have (every computer tool) is held to the stricter of both keys' settings,
472
+ // never more permissive than the run's own kind's.
473
+ const kinds = this.kindKeysOf(tool);
474
+ if (kinds)
475
+ return this.kindSetting(tool, kinds);
467
476
  return this.settingOf(tool, this.keyOf(tool));
468
477
  }
469
478
  /** `tool`'s permission under its settings key `key`, and where it was set. */
@@ -500,11 +509,11 @@ export class RunGate {
500
509
  const policy = this.overrides.bash?.policy;
501
510
  if (policy === undefined)
502
511
  return undefined;
503
- // Its own name for a background tool (bash_background, under claude-agent's mcp__hands__ name too); bash for bash and
512
+ // Its own name for a background tool (bash_background);bash for bash and
504
513
  // a CLI's own shell (codex's shell, claude-agent's Bash).
505
514
  const tool = shellToolOf(name) ?? "bash";
506
515
  if (!BASH_POLICIES.includes(policy))
507
- return `${tool} can't be called: this agent's bash policy ${JSON.stringify(policy).slice(0, 60)} is not one this server knows (${BASH_POLICIES.join(", ")}), so no command is let through until its tool_settings name one. ${NOT_RUN}`;
516
+ return `${tool}${CANT_BE_CALLED}this agent's bash policy ${JSON.stringify(policy).slice(0, 60)} is not one this server knows (${BASH_POLICIES.join(", ")}), so no command is let through until its tool_settings name one. ${NOT_RUN}`;
508
517
  const reason = readOnlyReason(tool, args, [this.where.work, COMPUTER_ROOT]);
509
518
  return reason === undefined ? undefined : readOnlyText(tool, reason, NOT_RUN);
510
519
  }
@@ -4,6 +4,7 @@ export type ToolRow = {
4
4
  readonly replay?: "safe" | "never";
5
5
  readonly blurb?: string;
6
6
  readonly host?: true;
7
+ readonly asks?: true;
7
8
  };
8
9
  export declare const TOOL_LIST: Readonly<Record<string, ToolRow>>;
9
10
  /** Every tool of serve's table (tools.ts), by name: a test holds this and the table as one. */
@@ -20,7 +21,9 @@ export declare const isHostTool: (name: string) => boolean;
20
21
  export declare const replayOf: (name: string) => "safe" | "never" | undefined;
21
22
  /** The tools a host runs on a harness other than pi, by name. */
22
23
  export declare const hostToolNames: () => string[];
23
- /** Whether `name` is a web tool every harness binds as a host tool (web_fetch, web_search). */
24
+ /** Whether `name` is a tool every harness binds as a host tool (web_fetch, web_search, the email tools). */
24
25
  export declare const isWebHostTool: (name: string) => boolean;
26
+ /** Whether `name`'s default permission is ask (email_send). */
27
+ export declare const asksByDefault: (name: string) => boolean;
25
28
  /** `name`'s blurb, or none (an MCP server's tool, a name this server does not register). */
26
29
  export declare const blurbOf: (name: string) => string | undefined;
package/dist/tool-list.js CHANGED
@@ -6,6 +6,11 @@ export const TOOL_LIST = Object.freeze({
6
6
  ask_person: { table: true, replay: "safe", blurb: "Ask you a question mid-run" },
7
7
  web_fetch: { table: true, askable: true, replay: "safe", host: true, blurb: "Read a public web page" },
8
8
  web_search: { table: true, askable: true, replay: "safe", host: true, blurb: "Search the web" },
9
+ email_search: { table: true, askable: true, replay: "safe", host: true, blurb: "Search the email account's mail" },
10
+ email_read: { table: true, askable: true, replay: "safe", host: true, blurb: "Read an email or its thread" },
11
+ email_draft: { table: true, askable: true, replay: "never", host: true, blurb: "Save an email draft" },
12
+ email_send: { table: true, askable: true, replay: "never", host: true, asks: true, blurb: "Send an email" },
13
+ email_file: { table: true, askable: true, replay: "never", host: true, blurb: "File an email under a folder or label" },
9
14
  browser: { table: true, blurb: "Browse websites in a hosted browser" },
10
15
  subagent: { table: true, blurb: "Run a task in a fresh helper conversation" },
11
16
  pdf_pages: { table: true, blurb: "Turn a PDF's pages into images" },
@@ -37,7 +42,9 @@ export const isHostTool = (name) => rowOf(name)?.replay !== undefined;
37
42
  export const replayOf = (name) => rowOf(name)?.replay;
38
43
  /** The tools a host runs on a harness other than pi, by name. */
39
44
  export const hostToolNames = () => namesWith("replay");
40
- /** Whether `name` is a web tool every harness binds as a host tool (web_fetch, web_search). */
45
+ /** Whether `name` is a tool every harness binds as a host tool (web_fetch, web_search, the email tools). */
41
46
  export const isWebHostTool = (name) => rowOf(name)?.host === true;
47
+ /** Whether `name`'s default permission is ask (email_send). */
48
+ export const asksByDefault = (name) => rowOf(name)?.asks === true;
42
49
  /** `name`'s blurb, or none (an MCP server's tool, a name this server does not register). */
43
50
  export const blurbOf = (name) => rowOf(name)?.blurb;
@@ -1,3 +1,9 @@
1
+ /** A wire name: at most 52 characters, not the adapter's 64. One CLI gives the model the name with a 12-character
2
+ * `mcp__hands__` prefix, and the model API's 64-character limit is on the name the model sees, so 52 is the budget that
3
+ * holds on every harness. The identity branch reads it: a plain 53-64 character name of valid characters must not skip
4
+ * the mapping and come out over budget. An MCP tool whose `mcp__<server>__<tool>` is past it (Composio's 58-character
5
+ * `mcp__slack__SLACK_FETCH_MESSAGE_THREAD_FROM_A_CONVERSATION`) is granted and called by its hashed name. */
6
+ export declare const WIRE_NAME: RegExp;
1
7
  /** An MCP server's name. */
2
8
  export declare const MCP_SERVER_NAME: RegExp;
3
9
  /** An MCP tool's own name, as its server lists it. */
@@ -5,6 +11,8 @@ export declare const MCP_TOOL_NAME: RegExp;
5
11
  /** A catalog tool's name, as a JSON Schema pattern (openapi.ts): `mcp:<server>/<tool>`, `monid:<provider>/<endpoint>`,
6
12
  * or either's wildcard. */
7
13
  export declare const CATALOG_KEY_PATTERN = "^(?:mcp:[a-z][a-z0-9-]{0,31}/(?:\\*|[A-Za-z0-9_-]{1,64})|monid:[a-z0-9][a-z0-9.-]{0,63}/(?:\\*|[A-Za-z0-9_.:{}-][A-Za-z0-9_.:{}/-]{0,199}))$";
14
+ /** One MCP tool's catalog key, without a server wildcard: the same server/tool grammar as mcpNameOf. */
15
+ export declare const MCP_TOOL_KEY_PATTERN = "^mcp:[a-z][a-z0-9-]{0,31}/[A-Za-z0-9_-]{1,64}$";
8
16
  /** A catalog name, read: a plain tool's, one MCP tool's or one monid endpoint's, or a group's wildcard (an MCP server's
9
17
  * tools, a monid provider's endpoints). */
10
18
  export type ToolName = {
@@ -52,20 +60,17 @@ export declare function mcpNameOf(name: string): {
52
60
  } | undefined;
53
61
  /** The MCP server `name` names, one of its tools or its wildcard; undefined for any other name. */
54
62
  export declare function mcpServerOf(name: string): string | undefined;
55
- /** Whether `name` is an MCP server's wildcard, `mcp:<server>/*`. */
56
- export declare const isMcpWildcard: (name: string) => boolean;
57
63
  /** Why a grant of an MCP server's tool is refused by its name alone, said after the grant (`mcp:<server>/<tool> ...`): the
58
64
  * one place the console's picker and the save's blockers (runnable.ts) both read it. `hands` is the harnesses' own tools'
59
65
  * server. */
60
66
  export declare const MCP_HANDS_WORDS = "names the MCP server hands, a name the harnesses keep for their own tools: save the server under another name.";
61
- /** Why `mcp__<server>__<tool>`, the name every harness calls the tool by, is not within the budget their names share
62
- * (52 characters of letters, digits, `_` and `-`), or undefined when it is. */
63
- export declare function mcpWireProblem(server: string, tool: string): string | undefined;
64
- /** MCP_HANDS_WORDS or mcpWireProblem's, whichever refuses the name; undefined when neither does. */
65
- export declare const mcpGrantNameProblem: (server: string, tool: string) => string | undefined;
66
- /** Why a harness's own MCP client drops or retypes `tool` of `server` (its facts' schemaProblems, `dropped` the first):
67
- * the words a save's blocker and a saved server's read both say. */
68
- export declare const mcpDroppedWords: (server: string, tool: string, harness: string, dropped: string) => string;
69
- /** Why the harness drops or retypes the pinned monid endpoint `tool`'s input (its facts' schemaProblems, `dropped` the
70
- * first, under the endpoint's wire name): the words a save refuses its grant with. */
71
- export declare const monidDroppedWords: (tool: string, harness: string, dropped: string) => string;
67
+ /** MCP_HANDS_WORDS when the grant names the server `hands`; undefined otherwise. A name's length refuses nothing: one whose
68
+ * `mcp__<server>__<tool>` is past the budget every harness's names share is called by its hashed wire name (catalog.ts
69
+ * wireName), and read back by lookup. */
70
+ export declare const mcpGrantNameProblem: (server: string, _tool: string) => string | undefined;
71
+ /** Why two granted catalog tools can't both be granted: the harnesses call both by one wire name (`wire`, catalog.ts
72
+ * wireName), so neither could be told apart. Said after the later grant. */
73
+ export declare const sameWireWords: (tool: string, other: string, wire: string) => string;
74
+ /** Why `harness` drops or retypes the input of the catalog tool `tool` (its facts' schemaProblems, `dropped` the first,
75
+ * said under the tool's wire name): the words a save's blocker and a saved MCP server's read both say. */
76
+ export declare const droppedWords: (tool: string, harness: string, dropped: string) => string;