@localix-ai/agent-plugins 0.2.0 → 0.3.0

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 (1327) hide show
  1. package/CHANGELOG.md +386 -0
  2. package/dist/agents/catalog/builtin.d.ts +9 -3
  3. package/dist/agents/catalog/builtin.d.ts.map +1 -1
  4. package/dist/agents/catalog/builtin.js +16 -2
  5. package/dist/agents/catalog/builtin.js.map +1 -1
  6. package/dist/agents/catalog/scan.d.ts +4 -1
  7. package/dist/agents/catalog/scan.d.ts.map +1 -1
  8. package/dist/agents/catalog/scan.js +1 -0
  9. package/dist/agents/catalog/scan.js.map +1 -1
  10. package/dist/agents/index.d.ts +3 -2
  11. package/dist/agents/index.d.ts.map +1 -1
  12. package/dist/agents/index.js +3 -2
  13. package/dist/agents/index.js.map +1 -1
  14. package/dist/agents/launch-model.d.ts +31 -6
  15. package/dist/agents/launch-model.d.ts.map +1 -1
  16. package/dist/agents/launch-model.js +43 -22
  17. package/dist/agents/launch-model.js.map +1 -1
  18. package/dist/agents/launch.d.ts +18 -4
  19. package/dist/agents/launch.d.ts.map +1 -1
  20. package/dist/agents/launch.js +29 -15
  21. package/dist/agents/launch.js.map +1 -1
  22. package/dist/agents/model-choice.d.ts +10 -2
  23. package/dist/agents/model-choice.d.ts.map +1 -1
  24. package/dist/agents/model-choice.js +10 -4
  25. package/dist/agents/model-choice.js.map +1 -1
  26. package/dist/agents/task-list.d.ts +24 -0
  27. package/dist/agents/task-list.d.ts.map +1 -0
  28. package/dist/agents/task-list.js +12 -0
  29. package/dist/agents/task-list.js.map +1 -0
  30. package/dist/agents/tool-filters.d.ts +11 -2
  31. package/dist/agents/tool-filters.d.ts.map +1 -1
  32. package/dist/agents/tool-filters.js +9 -1
  33. package/dist/agents/tool-filters.js.map +1 -1
  34. package/dist/agents/tool-resolution.d.ts.map +1 -1
  35. package/dist/agents/tool-resolution.js +19 -3
  36. package/dist/agents/tool-resolution.js.map +1 -1
  37. package/dist/agents/workflow/replay.d.ts +3 -2
  38. package/dist/agents/workflow/replay.d.ts.map +1 -1
  39. package/dist/agents/workflow/replay.js +11 -2
  40. package/dist/agents/workflow/replay.js.map +1 -1
  41. package/dist/agents/workflow/usage-limit.d.ts +19 -5
  42. package/dist/agents/workflow/usage-limit.d.ts.map +1 -1
  43. package/dist/agents/workflow/usage-limit.js +32 -4
  44. package/dist/agents/workflow/usage-limit.js.map +1 -1
  45. package/dist/cli/command-table.d.ts +1 -1
  46. package/dist/cli/command-table.d.ts.map +1 -1
  47. package/dist/cli/command-table.js +2 -0
  48. package/dist/cli/command-table.js.map +1 -1
  49. package/dist/cli/flags/session.d.ts.map +1 -1
  50. package/dist/cli/flags/session.js +2 -1
  51. package/dist/cli/flags/session.js.map +1 -1
  52. package/dist/cli/index.d.ts +3 -0
  53. package/dist/cli/index.d.ts.map +1 -1
  54. package/dist/cli/index.js +3 -0
  55. package/dist/cli/index.js.map +1 -1
  56. package/dist/cli/install-command-outcome.d.ts +31 -0
  57. package/dist/cli/install-command-outcome.d.ts.map +1 -0
  58. package/dist/cli/install-command-outcome.js +34 -0
  59. package/dist/cli/install-command-outcome.js.map +1 -0
  60. package/dist/cli/install-command-step.d.ts +13 -0
  61. package/dist/cli/install-command-step.d.ts.map +1 -0
  62. package/dist/cli/install-command-step.js +52 -0
  63. package/dist/cli/install-command-step.js.map +1 -0
  64. package/dist/cli/install-engines.d.ts +27 -0
  65. package/dist/cli/install-engines.d.ts.map +1 -0
  66. package/dist/cli/install-engines.js +29 -0
  67. package/dist/cli/install-engines.js.map +1 -0
  68. package/dist/cli/install-plan.d.ts +6 -0
  69. package/dist/cli/install-plan.d.ts.map +1 -1
  70. package/dist/cli/install-plan.js +31 -61
  71. package/dist/cli/install-plan.js.map +1 -1
  72. package/dist/cli/install-refusals.d.ts +5 -0
  73. package/dist/cli/install-refusals.d.ts.map +1 -1
  74. package/dist/cli/install-refusals.js +5 -0
  75. package/dist/cli/install-refusals.js.map +1 -1
  76. package/dist/cli/install-success.d.ts +17 -0
  77. package/dist/cli/install-success.d.ts.map +1 -0
  78. package/dist/cli/install-success.js +13 -0
  79. package/dist/cli/install-success.js.map +1 -0
  80. package/dist/cli/marketplace-list.js +1 -1
  81. package/dist/cli/marketplace-list.js.map +1 -1
  82. package/dist/cli/marketplace-update.d.ts +3 -1
  83. package/dist/cli/marketplace-update.d.ts.map +1 -1
  84. package/dist/cli/marketplace-update.js +5 -0
  85. package/dist/cli/marketplace-update.js.map +1 -1
  86. package/dist/cli/restore-set-aside.d.ts +38 -0
  87. package/dist/cli/restore-set-aside.d.ts.map +1 -0
  88. package/dist/cli/restore-set-aside.js +25 -0
  89. package/dist/cli/restore-set-aside.js.map +1 -0
  90. package/dist/cli/result.d.ts +6 -0
  91. package/dist/cli/result.d.ts.map +1 -1
  92. package/dist/cli/result.js +6 -2
  93. package/dist/cli/result.js.map +1 -1
  94. package/dist/cli/uninstall-data.d.ts +13 -1
  95. package/dist/cli/uninstall-data.d.ts.map +1 -1
  96. package/dist/cli/uninstall-data.js +4 -0
  97. package/dist/cli/uninstall-data.js.map +1 -1
  98. package/dist/cli/update-dependencies.d.ts +31 -0
  99. package/dist/cli/update-dependencies.d.ts.map +1 -0
  100. package/dist/cli/update-dependencies.js +35 -0
  101. package/dist/cli/update-dependencies.js.map +1 -0
  102. package/dist/cli/update-facts.d.ts +12 -0
  103. package/dist/cli/update-facts.d.ts.map +1 -1
  104. package/dist/cli/update-plan.d.ts +10 -0
  105. package/dist/cli/update-plan.d.ts.map +1 -1
  106. package/dist/cli/update-plan.js +34 -6
  107. package/dist/cli/update-plan.js.map +1 -1
  108. package/dist/cli/validate-lists.d.ts +66 -0
  109. package/dist/cli/validate-lists.d.ts.map +1 -0
  110. package/dist/cli/validate-lists.js +107 -0
  111. package/dist/cli/validate-lists.js.map +1 -0
  112. package/dist/cli/validate-run.d.ts +13 -8
  113. package/dist/cli/validate-run.d.ts.map +1 -1
  114. package/dist/cli/validate-run.js +3 -0
  115. package/dist/cli/validate-run.js.map +1 -1
  116. package/dist/entry/mods.d.ts +1 -1
  117. package/dist/entry/mods.d.ts.map +1 -1
  118. package/dist/entry/mods.js +1 -1
  119. package/dist/entry/mods.js.map +1 -1
  120. package/dist/format/add-dir-gate.d.ts +27 -0
  121. package/dist/format/add-dir-gate.d.ts.map +1 -0
  122. package/dist/format/add-dir-gate.js +16 -0
  123. package/dist/format/add-dir-gate.js.map +1 -0
  124. package/dist/format/agent-scalars.d.ts +5 -8
  125. package/dist/format/agent-scalars.d.ts.map +1 -1
  126. package/dist/format/agent-scalars.js +7 -8
  127. package/dist/format/agent-scalars.js.map +1 -1
  128. package/dist/format/engines.d.ts +63 -0
  129. package/dist/format/engines.d.ts.map +1 -0
  130. package/dist/format/engines.js +78 -0
  131. package/dist/format/engines.js.map +1 -0
  132. package/dist/format/hooks-handlers.d.ts.map +1 -1
  133. package/dist/format/hooks-handlers.js +2 -0
  134. package/dist/format/hooks-handlers.js.map +1 -1
  135. package/dist/format/host-errors.d.ts.map +1 -1
  136. package/dist/format/host-errors.js +1 -1
  137. package/dist/format/host-errors.js.map +1 -1
  138. package/dist/format/index.d.ts +4 -1
  139. package/dist/format/index.d.ts.map +1 -1
  140. package/dist/format/index.js +4 -1
  141. package/dist/format/index.js.map +1 -1
  142. package/dist/format/locate.d.ts +1 -1
  143. package/dist/format/locate.js +1 -1
  144. package/dist/format/manifest-schema.d.ts +4 -0
  145. package/dist/format/manifest-schema.d.ts.map +1 -1
  146. package/dist/format/manifest-schema.js +3 -0
  147. package/dist/format/manifest-schema.js.map +1 -1
  148. package/dist/format/manifest.d.ts +3 -0
  149. package/dist/format/manifest.d.ts.map +1 -1
  150. package/dist/format/manifest.js +84 -12
  151. package/dist/format/manifest.js.map +1 -1
  152. package/dist/format/marketplace/entries.d.ts.map +1 -1
  153. package/dist/format/marketplace/entries.js +13 -5
  154. package/dist/format/marketplace/entries.js.map +1 -1
  155. package/dist/format/marketplace/entry-display.d.ts +22 -0
  156. package/dist/format/marketplace/entry-display.d.ts.map +1 -0
  157. package/dist/format/marketplace/entry-display.js +60 -0
  158. package/dist/format/marketplace/entry-display.js.map +1 -0
  159. package/dist/format/marketplace/entry-schema.d.ts +1 -1
  160. package/dist/format/marketplace/entry-schema.d.ts.map +1 -1
  161. package/dist/format/marketplace/entry-schema.js +4 -1
  162. package/dist/format/marketplace/entry-schema.js.map +1 -1
  163. package/dist/format/marketplace/index.d.ts +2 -1
  164. package/dist/format/marketplace/index.d.ts.map +1 -1
  165. package/dist/format/marketplace/index.js +2 -1
  166. package/dist/format/marketplace/index.js.map +1 -1
  167. package/dist/format/marketplace/marketplace-name-lists.d.ts +0 -2
  168. package/dist/format/marketplace/marketplace-name-lists.d.ts.map +1 -1
  169. package/dist/format/marketplace/marketplace-name-lists.js +0 -9
  170. package/dist/format/marketplace/marketplace-name-lists.js.map +1 -1
  171. package/dist/format/marketplace/marketplace-names.d.ts +2 -0
  172. package/dist/format/marketplace/marketplace-names.d.ts.map +1 -1
  173. package/dist/format/marketplace/marketplace-names.js +14 -16
  174. package/dist/format/marketplace/marketplace-names.js.map +1 -1
  175. package/dist/format/marketplace/plugin-source.d.ts.map +1 -1
  176. package/dist/format/marketplace/plugin-source.js +9 -4
  177. package/dist/format/marketplace/plugin-source.js.map +1 -1
  178. package/dist/format/marketplace/settings-source-plugins.d.ts.map +1 -1
  179. package/dist/format/marketplace/settings-source-plugins.js +3 -2
  180. package/dist/format/marketplace/settings-source-plugins.js.map +1 -1
  181. package/dist/format/marketplace/types.d.ts +11 -0
  182. package/dist/format/marketplace/types.d.ts.map +1 -1
  183. package/dist/format/marketplace/types.js.map +1 -1
  184. package/dist/format/mcp-bundles.js +5 -5
  185. package/dist/format/mcp-bundles.js.map +1 -1
  186. package/dist/format/mcp-contract.d.ts +2 -1
  187. package/dist/format/mcp-contract.d.ts.map +1 -1
  188. package/dist/format/mcp-contract.js +2 -1
  189. package/dist/format/mcp-contract.js.map +1 -1
  190. package/dist/format/mcp-task-timing.d.ts +29 -0
  191. package/dist/format/mcp-task-timing.d.ts.map +1 -0
  192. package/dist/format/mcp-task-timing.js +22 -0
  193. package/dist/format/mcp-task-timing.js.map +1 -0
  194. package/dist/format/mcp-tool-schema.d.ts +11 -3
  195. package/dist/format/mcp-tool-schema.d.ts.map +1 -1
  196. package/dist/format/mcp-tool-schema.js +11 -0
  197. package/dist/format/mcp-tool-schema.js.map +1 -1
  198. package/dist/format/network.d.ts +6 -0
  199. package/dist/format/network.d.ts.map +1 -0
  200. package/dist/format/network.js +37 -0
  201. package/dist/format/network.js.map +1 -0
  202. package/dist/format/plugin-notes.d.ts +15 -0
  203. package/dist/format/plugin-notes.d.ts.map +1 -0
  204. package/dist/format/plugin-notes.js +13 -0
  205. package/dist/format/plugin-notes.js.map +1 -0
  206. package/dist/format/plugin-settings.d.ts +15 -9
  207. package/dist/format/plugin-settings.d.ts.map +1 -1
  208. package/dist/format/plugin-settings.js +11 -8
  209. package/dist/format/plugin-settings.js.map +1 -1
  210. package/dist/format/server-paths.d.ts +7 -0
  211. package/dist/format/server-paths.d.ts.map +1 -0
  212. package/dist/format/server-paths.js +43 -0
  213. package/dist/format/server-paths.js.map +1 -0
  214. package/dist/format/validate/plugin-fields.d.ts +5 -0
  215. package/dist/format/validate/plugin-fields.d.ts.map +1 -1
  216. package/dist/format/validate/plugin-fields.js +15 -0
  217. package/dist/format/validate/plugin-fields.js.map +1 -1
  218. package/dist/format/validate/plugin-manifest.d.ts.map +1 -1
  219. package/dist/format/validate/plugin-manifest.js +4 -1
  220. package/dist/format/validate/plugin-manifest.js.map +1 -1
  221. package/dist/format/validate/settings-deprecation.d.ts +4 -0
  222. package/dist/format/validate/settings-deprecation.d.ts.map +1 -0
  223. package/dist/format/validate/settings-deprecation.js +25 -0
  224. package/dist/format/validate/settings-deprecation.js.map +1 -0
  225. package/dist/format/validate/unknown-fields.d.ts.map +1 -1
  226. package/dist/format/validate/unknown-fields.js +1 -9
  227. package/dist/format/validate/unknown-fields.js.map +1 -1
  228. package/dist/foundation/scope-folders.d.ts +3 -1
  229. package/dist/foundation/scope-folders.d.ts.map +1 -1
  230. package/dist/foundation/scope-folders.js +3 -1
  231. package/dist/foundation/scope-folders.js.map +1 -1
  232. package/dist/hooks/assemble.d.ts.map +1 -1
  233. package/dist/hooks/assemble.js +8 -1
  234. package/dist/hooks/assemble.js.map +1 -1
  235. package/dist/hooks/core/profiles.d.ts +1 -1
  236. package/dist/hooks/dispatch.d.ts.map +1 -1
  237. package/dist/hooks/dispatch.js +29 -4
  238. package/dist/hooks/dispatch.js.map +1 -1
  239. package/dist/hooks/handlers/context.d.ts +4 -1
  240. package/dist/hooks/handlers/context.d.ts.map +1 -1
  241. package/dist/hooks/handlers/remote/http-policy.d.ts +15 -6
  242. package/dist/hooks/handlers/remote/http-policy.d.ts.map +1 -1
  243. package/dist/hooks/handlers/remote/http-policy.js +2 -0
  244. package/dist/hooks/handlers/remote/http-policy.js.map +1 -1
  245. package/dist/hooks/handlers/remote/http.js +2 -2
  246. package/dist/hooks/handlers/remote/http.js.map +1 -1
  247. package/dist/hooks/handlers/remote/mcp-tool.d.ts.map +1 -1
  248. package/dist/hooks/handlers/remote/mcp-tool.js +20 -1
  249. package/dist/hooks/handlers/remote/mcp-tool.js.map +1 -1
  250. package/dist/hooks/handlers/remote/types.d.ts +8 -0
  251. package/dist/hooks/handlers/remote/types.d.ts.map +1 -1
  252. package/dist/hooks/input/facts-agents.d.ts +2 -2
  253. package/dist/hooks/input/facts-agents.d.ts.map +1 -1
  254. package/dist/hooks/input/facts-agents.js +11 -3
  255. package/dist/hooks/input/facts-agents.js.map +1 -1
  256. package/dist/hooks/input/facts.d.ts +2 -2
  257. package/dist/hooks/outcome.d.ts +31 -0
  258. package/dist/hooks/outcome.d.ts.map +1 -1
  259. package/dist/hooks/output/caps.d.ts.map +1 -1
  260. package/dist/hooks/output/caps.js +4 -3
  261. package/dist/hooks/output/caps.js.map +1 -1
  262. package/dist/hooks/output/cowork-answers.d.ts +15 -0
  263. package/dist/hooks/output/cowork-answers.d.ts.map +1 -0
  264. package/dist/hooks/output/cowork-answers.js +19 -0
  265. package/dist/hooks/output/cowork-answers.js.map +1 -0
  266. package/dist/hooks/output/merge-simple.d.ts.map +1 -1
  267. package/dist/hooks/output/merge-simple.js +5 -2
  268. package/dist/hooks/output/merge-simple.js.map +1 -1
  269. package/dist/hooks/output/merge.d.ts.map +1 -1
  270. package/dist/hooks/output/merge.js +1 -1
  271. package/dist/hooks/output/merge.js.map +1 -1
  272. package/dist/hooks/output/tool-output.d.ts +2 -9
  273. package/dist/hooks/output/tool-output.d.ts.map +1 -1
  274. package/dist/hooks/output/tool-output.js +42 -1
  275. package/dist/hooks/output/tool-output.js.map +1 -1
  276. package/dist/hooks/output/tool-shapes/shapes-1.d.ts.map +1 -1
  277. package/dist/hooks/output/tool-shapes/shapes-1.js +3 -0
  278. package/dist/hooks/output/tool-shapes/shapes-1.js.map +1 -1
  279. package/dist/hooks/output/tool-shapes/shapes-3.d.ts.map +1 -1
  280. package/dist/hooks/output/tool-shapes/shapes-3.js +1 -0
  281. package/dist/hooks/output/tool-shapes/shapes-3.js.map +1 -1
  282. package/dist/hooks/output/tool-shapes/shapes-4.d.ts.map +1 -1
  283. package/dist/hooks/output/tool-shapes/shapes-4.js +12 -1
  284. package/dist/hooks/output/tool-shapes/shapes-4.js.map +1 -1
  285. package/dist/hooks/output/tool-shapes/shapes-5.d.ts.map +1 -1
  286. package/dist/hooks/output/tool-shapes/shapes-5.js +9 -1
  287. package/dist/hooks/output/tool-shapes/shapes-5.js.map +1 -1
  288. package/dist/hooks/run-all.d.ts.map +1 -1
  289. package/dist/hooks/run-all.js +1 -0
  290. package/dist/hooks/run-all.js.map +1 -1
  291. package/dist/hooks/select/event-catalog.d.ts.map +1 -1
  292. package/dist/hooks/select/event-catalog.js +4 -1
  293. package/dist/hooks/select/event-catalog.js.map +1 -1
  294. package/dist/hooks/select/matcher-values.d.ts +2 -2
  295. package/dist/hooks/select/matcher-values.d.ts.map +1 -1
  296. package/dist/hooks/select/matcher-values.js +0 -1
  297. package/dist/hooks/select/matcher-values.js.map +1 -1
  298. package/dist/hooks/verdict/exit2.d.ts +5 -0
  299. package/dist/hooks/verdict/exit2.d.ts.map +1 -1
  300. package/dist/hooks/verdict/exit2.js +1 -1
  301. package/dist/hooks/verdict/exit2.js.map +1 -1
  302. package/dist/hooks/verdict/interpret.d.ts +2 -0
  303. package/dist/hooks/verdict/interpret.d.ts.map +1 -1
  304. package/dist/hooks/verdict/interpret.js +5 -5
  305. package/dist/hooks/verdict/interpret.js.map +1 -1
  306. package/dist/hooks/verdict/mcp-answer.d.ts +5 -0
  307. package/dist/hooks/verdict/mcp-answer.d.ts.map +1 -0
  308. package/dist/hooks/verdict/mcp-answer.js +57 -0
  309. package/dist/hooks/verdict/mcp-answer.js.map +1 -0
  310. package/dist/hooks/verdict/model-verdict.d.ts.map +1 -1
  311. package/dist/hooks/verdict/model-verdict.js +1 -1
  312. package/dist/hooks/verdict/model-verdict.js.map +1 -1
  313. package/dist/hooks/verdict/on-failure.d.ts +12 -2
  314. package/dist/hooks/verdict/on-failure.d.ts.map +1 -1
  315. package/dist/hooks/verdict/on-failure.js +43 -7
  316. package/dist/hooks/verdict/on-failure.js.map +1 -1
  317. package/dist/hooks/verdict/subject.d.ts +2 -0
  318. package/dist/hooks/verdict/subject.d.ts.map +1 -1
  319. package/dist/hooks/verdict/suspect-capture.d.ts.map +1 -1
  320. package/dist/hooks/verdict/suspect-capture.js +6 -1
  321. package/dist/hooks/verdict/suspect-capture.js.map +1 -1
  322. package/dist/host/session-agents.d.ts +5 -11
  323. package/dist/host/session-agents.d.ts.map +1 -1
  324. package/dist/host/session-agents.js +9 -13
  325. package/dist/host/session-agents.js.map +1 -1
  326. package/dist/host/session-bare-repository.d.ts +13 -0
  327. package/dist/host/session-bare-repository.d.ts.map +1 -0
  328. package/dist/host/session-bare-repository.js +32 -0
  329. package/dist/host/session-bare-repository.js.map +1 -0
  330. package/dist/host/session-engine.d.ts.map +1 -1
  331. package/dist/host/session-engine.js +2 -1
  332. package/dist/host/session-engine.js.map +1 -1
  333. package/dist/host/session-hooks.d.ts.map +1 -1
  334. package/dist/host/session-hooks.js +15 -1
  335. package/dist/host/session-hooks.js.map +1 -1
  336. package/dist/host/session-registry.d.ts +7 -0
  337. package/dist/host/session-registry.d.ts.map +1 -1
  338. package/dist/host/session-registry.js +12 -0
  339. package/dist/host/session-registry.js.map +1 -1
  340. package/dist/host/session-skill-expand.d.ts +5 -0
  341. package/dist/host/session-skill-expand.d.ts.map +1 -1
  342. package/dist/host/session-skill-expand.js +5 -20
  343. package/dist/host/session-skill-expand.js.map +1 -1
  344. package/dist/host/session-skill-permission.d.ts +9 -0
  345. package/dist/host/session-skill-permission.d.ts.map +1 -0
  346. package/dist/host/session-skill-permission.js +21 -0
  347. package/dist/host/session-skill-permission.js.map +1 -0
  348. package/dist/host/session-skills.d.ts.map +1 -1
  349. package/dist/host/session-skills.js +20 -13
  350. package/dist/host/session-skills.js.map +1 -1
  351. package/dist/host/session-types.d.ts +7 -0
  352. package/dist/host/session-types.d.ts.map +1 -1
  353. package/dist/host/session.d.ts.map +1 -1
  354. package/dist/host/session.js +0 -1
  355. package/dist/host/session.js.map +1 -1
  356. package/dist/index.d.ts +2 -2
  357. package/dist/index.d.ts.map +1 -1
  358. package/dist/index.js +1 -1
  359. package/dist/index.js.map +1 -1
  360. package/dist/loading/load-notes.d.ts +21 -0
  361. package/dist/loading/load-notes.d.ts.map +1 -0
  362. package/dist/loading/load-notes.js +34 -0
  363. package/dist/loading/load-notes.js.map +1 -0
  364. package/dist/loading/load-plugin.d.ts +12 -0
  365. package/dist/loading/load-plugin.d.ts.map +1 -1
  366. package/dist/loading/load-plugin.js +20 -3
  367. package/dist/loading/load-plugin.js.map +1 -1
  368. package/dist/loading/manifest-gate.d.ts +1 -1
  369. package/dist/loading/plugin-folder.d.ts +2 -1
  370. package/dist/loading/plugin-folder.d.ts.map +1 -1
  371. package/dist/loading/plugin-folder.js +4 -1
  372. package/dist/loading/plugin-folder.js.map +1 -1
  373. package/dist/loading/plugin-model.d.ts +8 -0
  374. package/dist/loading/plugin-model.d.ts.map +1 -1
  375. package/dist/loading/validate/marketplace-target.d.ts.map +1 -1
  376. package/dist/loading/validate/marketplace-target.js +22 -4
  377. package/dist/loading/validate/marketplace-target.js.map +1 -1
  378. package/dist/loading/validate/plugin-contents.d.ts.map +1 -1
  379. package/dist/loading/validate/plugin-contents.js +8 -0
  380. package/dist/loading/validate/plugin-contents.js.map +1 -1
  381. package/dist/loading/walk.js +3 -3
  382. package/dist/loading/walk.js.map +1 -1
  383. package/dist/marketplace/dependency-graph.d.ts +5 -0
  384. package/dist/marketplace/dependency-graph.d.ts.map +1 -1
  385. package/dist/marketplace/dependency-graph.js.map +1 -1
  386. package/dist/marketplace/dependency-install-plan.d.ts +6 -5
  387. package/dist/marketplace/dependency-install-plan.d.ts.map +1 -1
  388. package/dist/marketplace/dependency-install-plan.js +6 -4
  389. package/dist/marketplace/dependency-install-plan.js.map +1 -1
  390. package/dist/marketplace/enablement-notes.d.ts +22 -7
  391. package/dist/marketplace/enablement-notes.d.ts.map +1 -1
  392. package/dist/marketplace/enablement-notes.js +36 -13
  393. package/dist/marketplace/enablement-notes.js.map +1 -1
  394. package/dist/marketplace/headless-report.d.ts +12 -0
  395. package/dist/marketplace/headless-report.d.ts.map +1 -1
  396. package/dist/marketplace/headless-report.js +11 -1
  397. package/dist/marketplace/headless-report.js.map +1 -1
  398. package/dist/marketplace/index.d.ts +1 -1
  399. package/dist/marketplace/index.d.ts.map +1 -1
  400. package/dist/marketplace/index.js +1 -1
  401. package/dist/marketplace/index.js.map +1 -1
  402. package/dist/marketplace/install-commands.d.ts +5 -0
  403. package/dist/marketplace/install-commands.d.ts.map +1 -1
  404. package/dist/marketplace/install-commands.js +6 -3
  405. package/dist/marketplace/install-commands.js.map +1 -1
  406. package/dist/marketplace/install-errors.d.ts +5 -4
  407. package/dist/marketplace/install-errors.d.ts.map +1 -1
  408. package/dist/marketplace/install-errors.js +8 -7
  409. package/dist/marketplace/install-errors.js.map +1 -1
  410. package/dist/marketplace/install-lifecycle-index.d.ts +4 -2
  411. package/dist/marketplace/install-lifecycle-index.d.ts.map +1 -1
  412. package/dist/marketplace/install-lifecycle-index.js +2 -0
  413. package/dist/marketplace/install-lifecycle-index.js.map +1 -1
  414. package/dist/marketplace/install-plan.d.ts +2 -0
  415. package/dist/marketplace/install-plan.d.ts.map +1 -1
  416. package/dist/marketplace/install-plan.js +5 -0
  417. package/dist/marketplace/install-plan.js.map +1 -1
  418. package/dist/marketplace/install-plans.d.ts +3 -3
  419. package/dist/marketplace/install-plans.d.ts.map +1 -1
  420. package/dist/marketplace/install-plans.js +3 -4
  421. package/dist/marketplace/install-plans.js.map +1 -1
  422. package/dist/marketplace/managed-take-back.d.ts +25 -0
  423. package/dist/marketplace/managed-take-back.d.ts.map +1 -0
  424. package/dist/marketplace/managed-take-back.js +24 -0
  425. package/dist/marketplace/managed-take-back.js.map +1 -0
  426. package/dist/marketplace/marketplace-fetch-plan.d.ts.map +1 -1
  427. package/dist/marketplace/marketplace-fetch-plan.js +2 -0
  428. package/dist/marketplace/marketplace-fetch-plan.js.map +1 -1
  429. package/dist/marketplace/reload-summary.d.ts +5 -0
  430. package/dist/marketplace/reload-summary.d.ts.map +1 -1
  431. package/dist/marketplace/reload-summary.js +8 -3
  432. package/dist/marketplace/reload-summary.js.map +1 -1
  433. package/dist/marketplace/removal.d.ts +4 -4
  434. package/dist/marketplace/removal.d.ts.map +1 -1
  435. package/dist/marketplace/removal.js +3 -3
  436. package/dist/marketplace/removal.js.map +1 -1
  437. package/dist/marketplace/seed-registry.d.ts +7 -5
  438. package/dist/marketplace/seed-registry.d.ts.map +1 -1
  439. package/dist/marketplace/seed-registry.js +7 -5
  440. package/dist/marketplace/seed-registry.js.map +1 -1
  441. package/dist/marketplace/store-layout.d.ts +9 -3
  442. package/dist/marketplace/store-layout.d.ts.map +1 -1
  443. package/dist/marketplace/store-layout.js +9 -4
  444. package/dist/marketplace/store-layout.js.map +1 -1
  445. package/dist/marketplace/types.d.ts +5 -0
  446. package/dist/marketplace/types.d.ts.map +1 -1
  447. package/dist/mods/api/agent.d.ts.map +1 -1
  448. package/dist/mods/api/agent.js +28 -0
  449. package/dist/mods/api/agent.js.map +1 -1
  450. package/dist/mods/api/audio.d.ts.map +1 -1
  451. package/dist/mods/api/audio.js +19 -5
  452. package/dist/mods/api/audio.js.map +1 -1
  453. package/dist/mods/api/build.d.ts +1 -1
  454. package/dist/mods/api/build.d.ts.map +1 -1
  455. package/dist/mods/api/build.js +6 -2
  456. package/dist/mods/api/build.js.map +1 -1
  457. package/dist/mods/api/call.d.ts.map +1 -1
  458. package/dist/mods/api/call.js +7 -0
  459. package/dist/mods/api/call.js.map +1 -1
  460. package/dist/mods/api/command.d.ts +11 -0
  461. package/dist/mods/api/command.d.ts.map +1 -1
  462. package/dist/mods/api/command.js +19 -1
  463. package/dist/mods/api/command.js.map +1 -1
  464. package/dist/mods/api/declared-port-types.d.ts +116 -0
  465. package/dist/mods/api/declared-port-types.d.ts.map +1 -0
  466. package/dist/mods/api/declared-port-types.js +31 -0
  467. package/dist/mods/api/declared-port-types.js.map +1 -0
  468. package/dist/mods/api/engine-create.d.ts +2 -0
  469. package/dist/mods/api/engine-create.d.ts.map +1 -1
  470. package/dist/mods/api/engine-create.js +6 -0
  471. package/dist/mods/api/engine-create.js.map +1 -1
  472. package/dist/mods/api/exec.d.ts.map +1 -1
  473. package/dist/mods/api/exec.js +3 -0
  474. package/dist/mods/api/exec.js.map +1 -1
  475. package/dist/mods/api/fs-ports.d.ts +8 -2
  476. package/dist/mods/api/fs-ports.d.ts.map +1 -1
  477. package/dist/mods/api/fs.d.ts.map +1 -1
  478. package/dist/mods/api/fs.js +26 -7
  479. package/dist/mods/api/fs.js.map +1 -1
  480. package/dist/mods/api/gate.d.ts +3 -3
  481. package/dist/mods/api/gate.d.ts.map +1 -1
  482. package/dist/mods/api/gate.js +3 -3
  483. package/dist/mods/api/gate.js.map +1 -1
  484. package/dist/mods/api/host-ports.d.ts +2 -1
  485. package/dist/mods/api/host-ports.d.ts.map +1 -1
  486. package/dist/mods/api/host-ports.js +15 -0
  487. package/dist/mods/api/host-ports.js.map +1 -1
  488. package/dist/mods/api/index.d.ts +4 -3
  489. package/dist/mods/api/index.d.ts.map +1 -1
  490. package/dist/mods/api/index.js +3 -2
  491. package/dist/mods/api/index.js.map +1 -1
  492. package/dist/mods/api/mcp.d.ts.map +1 -1
  493. package/dist/mods/api/mcp.js +6 -1
  494. package/dist/mods/api/mcp.js.map +1 -1
  495. package/dist/mods/api/optional-port-types.d.ts +52 -18
  496. package/dist/mods/api/optional-port-types.d.ts.map +1 -1
  497. package/dist/mods/api/ports.d.ts +5 -42
  498. package/dist/mods/api/ports.d.ts.map +1 -1
  499. package/dist/mods/api/ports.js.map +1 -1
  500. package/dist/mods/api/registries.d.ts +9 -10
  501. package/dist/mods/api/registries.d.ts.map +1 -1
  502. package/dist/mods/api/registries.js +8 -8
  503. package/dist/mods/api/registries.js.map +1 -1
  504. package/dist/mods/api/session-ports.d.ts +54 -0
  505. package/dist/mods/api/session-ports.d.ts.map +1 -0
  506. package/dist/mods/api/session-ports.js +2 -0
  507. package/dist/mods/api/session-ports.js.map +1 -0
  508. package/dist/mods/api/session.d.ts.map +1 -1
  509. package/dist/mods/api/session.js +28 -2
  510. package/dist/mods/api/session.js.map +1 -1
  511. package/dist/mods/api/theme.d.ts +11 -4
  512. package/dist/mods/api/theme.d.ts.map +1 -1
  513. package/dist/mods/api/theme.js +116 -30
  514. package/dist/mods/api/theme.js.map +1 -1
  515. package/dist/mods/api/vcs.d.ts +4 -0
  516. package/dist/mods/api/vcs.d.ts.map +1 -0
  517. package/dist/mods/api/vcs.js +60 -0
  518. package/dist/mods/api/vcs.js.map +1 -0
  519. package/dist/mods/api/wasm.d.ts +4 -0
  520. package/dist/mods/api/wasm.d.ts.map +1 -0
  521. package/dist/mods/api/wasm.js +69 -0
  522. package/dist/mods/api/wasm.js.map +1 -0
  523. package/dist/mods/chain/api-guard.d.ts +10 -1
  524. package/dist/mods/chain/api-guard.d.ts.map +1 -1
  525. package/dist/mods/chain/api-guard.js +23 -7
  526. package/dist/mods/chain/api-guard.js.map +1 -1
  527. package/dist/mods/chain/context.d.ts +6 -0
  528. package/dist/mods/chain/context.d.ts.map +1 -1
  529. package/dist/mods/chain/context.js +6 -0
  530. package/dist/mods/chain/context.js.map +1 -1
  531. package/dist/mods/chain/default-matcher.d.ts +11 -0
  532. package/dist/mods/chain/default-matcher.d.ts.map +1 -0
  533. package/dist/mods/chain/default-matcher.js +61 -0
  534. package/dist/mods/chain/default-matcher.js.map +1 -0
  535. package/dist/mods/chain/dispatch.d.ts.map +1 -1
  536. package/dist/mods/chain/dispatch.js +19 -1
  537. package/dist/mods/chain/dispatch.js.map +1 -1
  538. package/dist/mods/chain/failure.d.ts +2 -0
  539. package/dist/mods/chain/failure.d.ts.map +1 -1
  540. package/dist/mods/chain/failure.js +6 -0
  541. package/dist/mods/chain/failure.js.map +1 -1
  542. package/dist/mods/chain/guarded.d.ts +2 -0
  543. package/dist/mods/chain/guarded.d.ts.map +1 -1
  544. package/dist/mods/chain/guarded.js +6 -2
  545. package/dist/mods/chain/guarded.js.map +1 -1
  546. package/dist/mods/chain/invoke.d.ts.map +1 -1
  547. package/dist/mods/chain/invoke.js +25 -5
  548. package/dist/mods/chain/invoke.js.map +1 -1
  549. package/dist/mods/chain/validate.d.ts.map +1 -1
  550. package/dist/mods/chain/validate.js +2 -1
  551. package/dist/mods/chain/validate.js.map +1 -1
  552. package/dist/mods/events/agent.d.ts.map +1 -1
  553. package/dist/mods/events/agent.js +7 -3
  554. package/dist/mods/events/agent.js.map +1 -1
  555. package/dist/mods/events/declared.d.ts +12 -0
  556. package/dist/mods/events/declared.d.ts.map +1 -0
  557. package/dist/mods/events/declared.js +43 -0
  558. package/dist/mods/events/declared.js.map +1 -0
  559. package/dist/mods/events/index.d.ts +6 -0
  560. package/dist/mods/events/index.d.ts.map +1 -1
  561. package/dist/mods/events/index.js +4 -1
  562. package/dist/mods/events/index.js.map +1 -1
  563. package/dist/mods/events/pinned.d.ts +7 -0
  564. package/dist/mods/events/pinned.d.ts.map +1 -0
  565. package/dist/mods/events/pinned.js +21 -0
  566. package/dist/mods/events/pinned.js.map +1 -0
  567. package/dist/mods/events/session.d.ts.map +1 -1
  568. package/dist/mods/events/session.js +17 -4
  569. package/dist/mods/events/session.js.map +1 -1
  570. package/dist/mods/events/spec.d.ts +2 -0
  571. package/dist/mods/events/spec.d.ts.map +1 -1
  572. package/dist/mods/events/spec.js.map +1 -1
  573. package/dist/mods/events/tool.d.ts +2 -2
  574. package/dist/mods/events/tool.d.ts.map +1 -1
  575. package/dist/mods/events/tool.js +50 -10
  576. package/dist/mods/events/tool.js.map +1 -1
  577. package/dist/mods/events/turn.d.ts.map +1 -1
  578. package/dist/mods/events/turn.js +12 -1
  579. package/dist/mods/events/turn.js.map +1 -1
  580. package/dist/mods/load/auto-mode-approval.d.ts +6 -9
  581. package/dist/mods/load/auto-mode-approval.d.ts.map +1 -1
  582. package/dist/mods/load/auto-mode-approval.js +1 -1
  583. package/dist/mods/load/auto-mode-approval.js.map +1 -1
  584. package/dist/mods/load/commands/module-facts.d.ts +22 -0
  585. package/dist/mods/load/commands/module-facts.d.ts.map +1 -0
  586. package/dist/mods/load/commands/module-facts.js +18 -0
  587. package/dist/mods/load/commands/module-facts.js.map +1 -0
  588. package/dist/mods/load/commands/scan-lead.d.ts +2 -0
  589. package/dist/mods/load/commands/scan-lead.d.ts.map +1 -1
  590. package/dist/mods/load/commands/scan-lead.js +5 -2
  591. package/dist/mods/load/commands/scan-lead.js.map +1 -1
  592. package/dist/mods/load/commands/scan-lines.d.ts.map +1 -1
  593. package/dist/mods/load/commands/scan-lines.js +32 -1
  594. package/dist/mods/load/commands/scan-lines.js.map +1 -1
  595. package/dist/mods/load/commands/sha256.d.ts +7 -0
  596. package/dist/mods/load/commands/sha256.d.ts.map +1 -0
  597. package/dist/mods/load/commands/sha256.js +75 -0
  598. package/dist/mods/load/commands/sha256.js.map +1 -0
  599. package/dist/mods/load/commands/validate-report.d.ts +9 -0
  600. package/dist/mods/load/commands/validate-report.d.ts.map +1 -1
  601. package/dist/mods/load/commands/validate.d.ts.map +1 -1
  602. package/dist/mods/load/commands/validate.js +23 -16
  603. package/dist/mods/load/commands/validate.js.map +1 -1
  604. package/dist/mods/load/commands/wasm-read.d.ts +21 -0
  605. package/dist/mods/load/commands/wasm-read.d.ts.map +1 -0
  606. package/dist/mods/load/commands/wasm-read.js +169 -0
  607. package/dist/mods/load/commands/wasm-read.js.map +1 -0
  608. package/dist/mods/load/guard-protection.d.ts +7 -0
  609. package/dist/mods/load/guard-protection.d.ts.map +1 -1
  610. package/dist/mods/load/guard-protection.js +8 -3
  611. package/dist/mods/load/guard-protection.js.map +1 -1
  612. package/dist/mods/load/guard-surfaces.d.ts.map +1 -1
  613. package/dist/mods/load/guard-surfaces.js +2 -0
  614. package/dist/mods/load/guard-surfaces.js.map +1 -1
  615. package/dist/mods/load/guard-tools.d.ts +25 -0
  616. package/dist/mods/load/guard-tools.d.ts.map +1 -0
  617. package/dist/mods/load/guard-tools.js +29 -0
  618. package/dist/mods/load/guard-tools.js.map +1 -0
  619. package/dist/mods/load/guard.d.ts +3 -0
  620. package/dist/mods/load/guard.d.ts.map +1 -1
  621. package/dist/mods/load/guard.js +19 -8
  622. package/dist/mods/load/guard.js.map +1 -1
  623. package/dist/mods/load/host-support.d.ts +16 -3
  624. package/dist/mods/load/host-support.d.ts.map +1 -1
  625. package/dist/mods/load/host-support.js +28 -7
  626. package/dist/mods/load/host-support.js.map +1 -1
  627. package/dist/mods/load/host.d.ts +15 -2
  628. package/dist/mods/load/host.d.ts.map +1 -1
  629. package/dist/mods/load/host.js +4 -3
  630. package/dist/mods/load/host.js.map +1 -1
  631. package/dist/mods/load/in-turn.d.ts +6 -0
  632. package/dist/mods/load/in-turn.d.ts.map +1 -0
  633. package/dist/mods/load/in-turn.js +13 -0
  634. package/dist/mods/load/in-turn.js.map +1 -0
  635. package/dist/mods/load/index.d.ts +6 -3
  636. package/dist/mods/load/index.d.ts.map +1 -1
  637. package/dist/mods/load/index.js +4 -3
  638. package/dist/mods/load/index.js.map +1 -1
  639. package/dist/mods/load/loader.d.ts +13 -2
  640. package/dist/mods/load/loader.d.ts.map +1 -1
  641. package/dist/mods/load/loader.js +14 -10
  642. package/dist/mods/load/loader.js.map +1 -1
  643. package/dist/mods/load/mod-set.d.ts +3 -0
  644. package/dist/mods/load/mod-set.d.ts.map +1 -1
  645. package/dist/mods/load/mod-set.js +6 -15
  646. package/dist/mods/load/mod-set.js.map +1 -1
  647. package/dist/mods/load/order.js +2 -2
  648. package/dist/mods/load/order.js.map +1 -1
  649. package/dist/mods/load/plugin-dirs.d.ts +14 -4
  650. package/dist/mods/load/plugin-dirs.d.ts.map +1 -1
  651. package/dist/mods/load/plugin-dirs.js +14 -9
  652. package/dist/mods/load/plugin-dirs.js.map +1 -1
  653. package/dist/mods/load/policy.d.ts +12 -8
  654. package/dist/mods/load/policy.d.ts.map +1 -1
  655. package/dist/mods/load/policy.js +47 -19
  656. package/dist/mods/load/policy.js.map +1 -1
  657. package/dist/mods/load/prepare.d.ts +4 -0
  658. package/dist/mods/load/prepare.d.ts.map +1 -1
  659. package/dist/mods/load/prepare.js +21 -3
  660. package/dist/mods/load/prepare.js.map +1 -1
  661. package/dist/mods/load/provides.d.ts +25 -0
  662. package/dist/mods/load/provides.d.ts.map +1 -0
  663. package/dist/mods/load/provides.js +128 -0
  664. package/dist/mods/load/provides.js.map +1 -0
  665. package/dist/mods/load/register-ask.d.ts +32 -0
  666. package/dist/mods/load/register-ask.d.ts.map +1 -0
  667. package/dist/mods/load/register-ask.js +45 -0
  668. package/dist/mods/load/register-ask.js.map +1 -0
  669. package/dist/mods/load/register-call.d.ts +23 -13
  670. package/dist/mods/load/register-call.d.ts.map +1 -1
  671. package/dist/mods/load/register-call.js +69 -23
  672. package/dist/mods/load/register-call.js.map +1 -1
  673. package/dist/mods/load/register-event.d.ts +70 -0
  674. package/dist/mods/load/register-event.d.ts.map +1 -0
  675. package/dist/mods/load/register-event.js +35 -0
  676. package/dist/mods/load/register-event.js.map +1 -0
  677. package/dist/mods/load/scan/client-modules.d.ts +2 -0
  678. package/dist/mods/load/scan/client-modules.d.ts.map +1 -1
  679. package/dist/mods/load/scan/client-modules.js +1 -1
  680. package/dist/mods/load/scan/client-modules.js.map +1 -1
  681. package/dist/mods/load/scan/event-names.d.ts.map +1 -1
  682. package/dist/mods/load/scan/event-names.js +2 -0
  683. package/dist/mods/load/scan/event-names.js.map +1 -1
  684. package/dist/mods/load/scan/found.d.ts +5 -0
  685. package/dist/mods/load/scan/found.d.ts.map +1 -1
  686. package/dist/mods/load/scan/found.js +3 -0
  687. package/dist/mods/load/scan/found.js.map +1 -1
  688. package/dist/mods/load/scan/hosts.d.ts +5 -0
  689. package/dist/mods/load/scan/hosts.d.ts.map +1 -0
  690. package/dist/mods/load/scan/hosts.js +44 -0
  691. package/dist/mods/load/scan/hosts.js.map +1 -0
  692. package/dist/mods/load/scan/index.d.ts +1 -0
  693. package/dist/mods/load/scan/index.d.ts.map +1 -1
  694. package/dist/mods/load/scan/index.js +7 -0
  695. package/dist/mods/load/scan/index.js.map +1 -1
  696. package/dist/mods/load/scan/rules.d.ts.map +1 -1
  697. package/dist/mods/load/scan/rules.js +4 -0
  698. package/dist/mods/load/scan/rules.js.map +1 -1
  699. package/dist/mods/load/scan/uses.d.ts +8 -0
  700. package/dist/mods/load/scan/uses.d.ts.map +1 -1
  701. package/dist/mods/load/scan/uses.js +2 -0
  702. package/dist/mods/load/scan/uses.js.map +1 -1
  703. package/dist/mods/load/scan/wasm-paths.d.ts +17 -0
  704. package/dist/mods/load/scan/wasm-paths.d.ts.map +1 -0
  705. package/dist/mods/load/scan/wasm-paths.js +16 -0
  706. package/dist/mods/load/scan/wasm-paths.js.map +1 -0
  707. package/dist/mods/load/tool-flow.d.ts +1 -1
  708. package/dist/mods/load/tool-flow.d.ts.map +1 -1
  709. package/dist/mods/load/tool-flow.js +15 -2
  710. package/dist/mods/load/tool-flow.js.map +1 -1
  711. package/dist/mods/load/wasm-files.d.ts +35 -0
  712. package/dist/mods/load/wasm-files.d.ts.map +1 -0
  713. package/dist/mods/load/wasm-files.js +40 -0
  714. package/dist/mods/load/wasm-files.js.map +1 -0
  715. package/dist/mods/load/wiring.d.ts.map +1 -1
  716. package/dist/mods/load/wiring.js +20 -8
  717. package/dist/mods/load/wiring.js.map +1 -1
  718. package/dist/mods/load/written-mods.d.ts +16 -3
  719. package/dist/mods/load/written-mods.d.ts.map +1 -1
  720. package/dist/mods/load/written-mods.js +26 -25
  721. package/dist/mods/load/written-mods.js.map +1 -1
  722. package/dist/mods/types.d.ts +10 -9
  723. package/dist/mods/types.d.ts.map +1 -1
  724. package/dist/mods/ui/controls/hotkeys.d.ts +8 -0
  725. package/dist/mods/ui/controls/hotkeys.d.ts.map +1 -1
  726. package/dist/mods/ui/controls/hotkeys.js +30 -3
  727. package/dist/mods/ui/controls/hotkeys.js.map +1 -1
  728. package/dist/mods/ui/elements/box.d.ts.map +1 -1
  729. package/dist/mods/ui/elements/box.js +5 -2
  730. package/dist/mods/ui/elements/box.js.map +1 -1
  731. package/dist/mods/ui/elements/limits.d.ts.map +1 -1
  732. package/dist/mods/ui/elements/limits.js +5 -3
  733. package/dist/mods/ui/elements/limits.js.map +1 -1
  734. package/dist/mods/ui/elements/progress.d.ts +8 -0
  735. package/dist/mods/ui/elements/progress.d.ts.map +1 -0
  736. package/dist/mods/ui/elements/progress.js +17 -0
  737. package/dist/mods/ui/elements/progress.js.map +1 -0
  738. package/dist/mods/ui/elements/prop-size.d.ts +10 -0
  739. package/dist/mods/ui/elements/prop-size.d.ts.map +1 -0
  740. package/dist/mods/ui/elements/prop-size.js +34 -0
  741. package/dist/mods/ui/elements/prop-size.js.map +1 -0
  742. package/dist/mods/ui/elements/registry.d.ts.map +1 -1
  743. package/dist/mods/ui/elements/registry.js +4 -0
  744. package/dist/mods/ui/elements/registry.js.map +1 -1
  745. package/dist/mods/ui/elements/shader-place.d.ts +8 -0
  746. package/dist/mods/ui/elements/shader-place.d.ts.map +1 -0
  747. package/dist/mods/ui/elements/shader-place.js +36 -0
  748. package/dist/mods/ui/elements/shader-place.js.map +1 -0
  749. package/dist/mods/ui/elements/shader.d.ts +11 -0
  750. package/dist/mods/ui/elements/shader.d.ts.map +1 -0
  751. package/dist/mods/ui/elements/shader.js +28 -0
  752. package/dist/mods/ui/elements/shader.js.map +1 -0
  753. package/dist/mods/ui/elements/svg.d.ts +3 -0
  754. package/dist/mods/ui/elements/svg.d.ts.map +1 -1
  755. package/dist/mods/ui/elements/svg.js +2 -0
  756. package/dist/mods/ui/elements/svg.js.map +1 -1
  757. package/dist/mods/ui/elements/table.d.ts.map +1 -1
  758. package/dist/mods/ui/elements/table.js +2 -0
  759. package/dist/mods/ui/elements/table.js.map +1 -1
  760. package/dist/mods/ui/elements/text.d.ts.map +1 -1
  761. package/dist/mods/ui/elements/text.js +7 -1
  762. package/dist/mods/ui/elements/text.js.map +1 -1
  763. package/dist/mods/ui/elements/validate.d.ts.map +1 -1
  764. package/dist/mods/ui/elements/validate.js +3 -1
  765. package/dist/mods/ui/elements/validate.js.map +1 -1
  766. package/dist/mods/ui/index.d.ts +1 -0
  767. package/dist/mods/ui/index.d.ts.map +1 -1
  768. package/dist/mods/ui/index.js.map +1 -1
  769. package/dist/mods/ui/keyboard/keys.d.ts +3 -0
  770. package/dist/mods/ui/keyboard/keys.d.ts.map +1 -1
  771. package/dist/mods/ui/keyboard/keys.js.map +1 -1
  772. package/dist/mods/ui/panes/open.d.ts +2 -0
  773. package/dist/mods/ui/panes/open.d.ts.map +1 -1
  774. package/dist/mods/ui/panes/open.js +3 -1
  775. package/dist/mods/ui/panes/open.js.map +1 -1
  776. package/dist/mods/ui/panes/pane-request.d.ts +9 -0
  777. package/dist/mods/ui/panes/pane-request.d.ts.map +1 -0
  778. package/dist/mods/ui/panes/pane-request.js +19 -0
  779. package/dist/mods/ui/panes/pane-request.js.map +1 -0
  780. package/dist/mods/ui/panes/registry.d.ts +1 -1
  781. package/dist/mods/ui/panes/registry.d.ts.map +1 -1
  782. package/dist/mods/ui/panes/registry.js +4 -0
  783. package/dist/mods/ui/panes/registry.js.map +1 -1
  784. package/dist/mods/ui/rules.d.ts.map +1 -1
  785. package/dist/mods/ui/rules.js +3 -0
  786. package/dist/mods/ui/rules.js.map +1 -1
  787. package/dist/mods/ui/runtime.d.ts +6 -0
  788. package/dist/mods/ui/runtime.d.ts.map +1 -1
  789. package/dist/mods/ui/runtime.js +25 -9
  790. package/dist/mods/ui/runtime.js.map +1 -1
  791. package/dist/mods/ui/sites/agent-row.d.ts +7 -0
  792. package/dist/mods/ui/sites/agent-row.d.ts.map +1 -0
  793. package/dist/mods/ui/sites/agent-row.js +22 -0
  794. package/dist/mods/ui/sites/agent-row.js.map +1 -0
  795. package/dist/mods/ui/sites/backdrop.d.ts +2 -2
  796. package/dist/mods/ui/sites/backdrop.js +2 -2
  797. package/dist/mods/ui/sites/band-list.d.ts +10 -0
  798. package/dist/mods/ui/sites/band-list.d.ts.map +1 -0
  799. package/dist/mods/ui/sites/band-list.js +41 -0
  800. package/dist/mods/ui/sites/band-list.js.map +1 -0
  801. package/dist/mods/ui/sites/band-rows.d.ts +33 -0
  802. package/dist/mods/ui/sites/band-rows.d.ts.map +1 -0
  803. package/dist/mods/ui/sites/band-rows.js +61 -0
  804. package/dist/mods/ui/sites/band-rows.js.map +1 -0
  805. package/dist/mods/ui/sites/fold.d.ts +2 -0
  806. package/dist/mods/ui/sites/fold.d.ts.map +1 -1
  807. package/dist/mods/ui/sites/fold.js +2 -2
  808. package/dist/mods/ui/sites/fold.js.map +1 -1
  809. package/dist/mods/ui/sites/registry.d.ts +8 -1
  810. package/dist/mods/ui/sites/registry.d.ts.map +1 -1
  811. package/dist/mods/ui/sites/registry.js +21 -14
  812. package/dist/mods/ui/sites/registry.js.map +1 -1
  813. package/dist/ports/files.d.ts +1 -1
  814. package/dist/ports/mcp-bundle.d.ts +3 -2
  815. package/dist/ports/mcp-bundle.d.ts.map +1 -1
  816. package/dist/ports/mcp-caller.d.ts +7 -0
  817. package/dist/ports/mcp-caller.d.ts.map +1 -1
  818. package/dist/protocol/mods-api-names.d.ts +20 -8
  819. package/dist/protocol/mods-api-names.d.ts.map +1 -1
  820. package/dist/protocol/mods-api-names.js +16 -4
  821. package/dist/protocol/mods-api-names.js.map +1 -1
  822. package/dist/protocol/mods-events.d.ts +11 -8
  823. package/dist/protocol/mods-events.d.ts.map +1 -1
  824. package/dist/protocol/mods-events.js +14 -5
  825. package/dist/protocol/mods-events.js.map +1 -1
  826. package/dist/protocol/mods-limits.d.ts +9 -1
  827. package/dist/protocol/mods-limits.d.ts.map +1 -1
  828. package/dist/protocol/mods-limits.js +9 -1
  829. package/dist/protocol/mods-limits.js.map +1 -1
  830. package/dist/protocol/mods-ui-names.d.ts +42 -11
  831. package/dist/protocol/mods-ui-names.d.ts.map +1 -1
  832. package/dist/protocol/mods-ui-names.js +62 -8
  833. package/dist/protocol/mods-ui-names.js.map +1 -1
  834. package/dist/protocol/official.d.ts +1 -1
  835. package/dist/protocol/official.d.ts.map +1 -1
  836. package/dist/protocol/tool-names.d.ts +12 -5
  837. package/dist/protocol/tool-names.d.ts.map +1 -1
  838. package/dist/protocol/tool-names.js +21 -2
  839. package/dist/protocol/tool-names.js.map +1 -1
  840. package/dist/rules/bash/wrappers.d.ts +2 -0
  841. package/dist/rules/bash/wrappers.d.ts.map +1 -1
  842. package/dist/rules/bash/wrappers.js +2 -0
  843. package/dist/rules/bash/wrappers.js.map +1 -1
  844. package/dist/rules/decide/auto-dropped.d.ts.map +1 -1
  845. package/dist/rules/decide/auto-dropped.js +23 -4
  846. package/dist/rules/decide/auto-dropped.js.map +1 -1
  847. package/dist/rules/decide/context.d.ts +5 -2
  848. package/dist/rules/decide/context.d.ts.map +1 -1
  849. package/dist/rules/decide/decide.d.ts.map +1 -1
  850. package/dist/rules/decide/decide.js +11 -0
  851. package/dist/rules/decide/decide.js.map +1 -1
  852. package/dist/rules/decide/facts.js +3 -3
  853. package/dist/rules/decide/facts.js.map +1 -1
  854. package/dist/rules/decide/modes.d.ts +7 -0
  855. package/dist/rules/decide/modes.d.ts.map +1 -1
  856. package/dist/rules/decide/modes.js +5 -0
  857. package/dist/rules/decide/modes.js.map +1 -1
  858. package/dist/rules/tools/catalog.d.ts.map +1 -1
  859. package/dist/rules/tools/catalog.js +13 -3
  860. package/dist/rules/tools/catalog.js.map +1 -1
  861. package/dist/rules/types.d.ts +6 -0
  862. package/dist/rules/types.d.ts.map +1 -1
  863. package/dist/settings/add-dir-layer.d.ts +17 -0
  864. package/dist/settings/add-dir-layer.d.ts.map +1 -0
  865. package/dist/settings/add-dir-layer.js +20 -0
  866. package/dist/settings/add-dir-layer.js.map +1 -0
  867. package/dist/settings/env/code-mode.d.ts +21 -0
  868. package/dist/settings/env/code-mode.d.ts.map +1 -0
  869. package/dist/settings/env/code-mode.js +8 -0
  870. package/dist/settings/env/code-mode.js.map +1 -0
  871. package/dist/settings/env/ignored-variables.d.ts +1 -1
  872. package/dist/settings/env/ignored-variables.d.ts.map +1 -1
  873. package/dist/settings/env/ignored-variables.js +7 -0
  874. package/dist/settings/env/ignored-variables.js.map +1 -1
  875. package/dist/settings/env/index.d.ts +1 -0
  876. package/dist/settings/env/index.d.ts.map +1 -1
  877. package/dist/settings/env/index.js +1 -0
  878. package/dist/settings/env/index.js.map +1 -1
  879. package/dist/settings/general/checks.d.ts.map +1 -1
  880. package/dist/settings/general/checks.js +0 -1
  881. package/dist/settings/general/checks.js.map +1 -1
  882. package/dist/settings/general/command-lines.d.ts +1 -20
  883. package/dist/settings/general/command-lines.d.ts.map +1 -1
  884. package/dist/settings/general/command-lines.js +1 -15
  885. package/dist/settings/general/command-lines.js.map +1 -1
  886. package/dist/settings/general/edit-effect.d.ts +10 -1
  887. package/dist/settings/general/edit-effect.d.ts.map +1 -1
  888. package/dist/settings/general/edit-effect.js +8 -1
  889. package/dist/settings/general/edit-effect.js.map +1 -1
  890. package/dist/settings/general/index.d.ts +2 -3
  891. package/dist/settings/general/index.d.ts.map +1 -1
  892. package/dist/settings/general/index.js +1 -2
  893. package/dist/settings/general/index.js.map +1 -1
  894. package/dist/settings/general/keys.d.ts +1 -2
  895. package/dist/settings/general/keys.d.ts.map +1 -1
  896. package/dist/settings/general/keys.js +0 -1
  897. package/dist/settings/general/keys.js.map +1 -1
  898. package/dist/settings/general/plugin-defaults.d.ts +15 -4
  899. package/dist/settings/general/plugin-defaults.d.ts.map +1 -1
  900. package/dist/settings/general/plugin-defaults.js +11 -10
  901. package/dist/settings/general/plugin-defaults.js.map +1 -1
  902. package/dist/settings/general/rows.d.ts.map +1 -1
  903. package/dist/settings/general/rows.js +0 -1
  904. package/dist/settings/general/rows.js.map +1 -1
  905. package/dist/settings/hooks/custom-commands.d.ts +1 -2
  906. package/dist/settings/hooks/custom-commands.d.ts.map +1 -1
  907. package/dist/settings/hooks/custom-commands.js +1 -1
  908. package/dist/settings/hooks/custom-commands.js.map +1 -1
  909. package/dist/settings/hooks/http-policy.d.ts +17 -4
  910. package/dist/settings/hooks/http-policy.d.ts.map +1 -1
  911. package/dist/settings/hooks/http-policy.js +25 -6
  912. package/dist/settings/hooks/http-policy.js.map +1 -1
  913. package/dist/settings/hooks/index.d.ts +1 -1
  914. package/dist/settings/hooks/index.d.ts.map +1 -1
  915. package/dist/settings/hooks/index.js.map +1 -1
  916. package/dist/settings/hooks/policy.d.ts +1 -1
  917. package/dist/settings/hooks/policy.js +1 -1
  918. package/dist/settings/hooks/policy.js.map +1 -1
  919. package/dist/settings/hooks/session-gates.d.ts +11 -6
  920. package/dist/settings/hooks/session-gates.d.ts.map +1 -1
  921. package/dist/settings/hooks/session-gates.js +3 -7
  922. package/dist/settings/hooks/session-gates.js.map +1 -1
  923. package/dist/settings/index.d.ts +1 -0
  924. package/dist/settings/index.d.ts.map +1 -1
  925. package/dist/settings/index.js +1 -0
  926. package/dist/settings/index.js.map +1 -1
  927. package/dist/settings/managed/compose.d.ts +0 -6
  928. package/dist/settings/managed/compose.d.ts.map +1 -1
  929. package/dist/settings/managed/compose.js +4 -25
  930. package/dist/settings/managed/compose.js.map +1 -1
  931. package/dist/settings/managed/helper-run.js +1 -1
  932. package/dist/settings/managed/helper-run.js.map +1 -1
  933. package/dist/settings/managed/helper-settings.d.ts +9 -0
  934. package/dist/settings/managed/helper-settings.d.ts.map +1 -0
  935. package/dist/settings/managed/helper-settings.js +26 -0
  936. package/dist/settings/managed/helper-settings.js.map +1 -0
  937. package/dist/settings/managed/index.d.ts +4 -1
  938. package/dist/settings/managed/index.d.ts.map +1 -1
  939. package/dist/settings/managed/index.js +4 -1
  940. package/dist/settings/managed/index.js.map +1 -1
  941. package/dist/settings/managed/login-keys.d.ts +4 -0
  942. package/dist/settings/managed/login-keys.d.ts.map +1 -1
  943. package/dist/settings/managed/login-keys.js +17 -0
  944. package/dist/settings/managed/login-keys.js.map +1 -1
  945. package/dist/settings/managed/ports.d.ts +8 -1
  946. package/dist/settings/managed/ports.d.ts.map +1 -1
  947. package/dist/settings/managed/server-cache.d.ts +56 -0
  948. package/dist/settings/managed/server-cache.d.ts.map +1 -0
  949. package/dist/settings/managed/server-cache.js +27 -0
  950. package/dist/settings/managed/server-cache.js.map +1 -0
  951. package/dist/settings/managed/server-groups.d.ts +34 -0
  952. package/dist/settings/managed/server-groups.d.ts.map +1 -0
  953. package/dist/settings/managed/server-groups.js +28 -0
  954. package/dist/settings/managed/server-groups.js.map +1 -0
  955. package/dist/settings/mcp/exclusive.d.ts +5 -1
  956. package/dist/settings/mcp/exclusive.d.ts.map +1 -1
  957. package/dist/settings/mcp/exclusive.js +4 -2
  958. package/dist/settings/mcp/exclusive.js.map +1 -1
  959. package/dist/settings/mcp/scope.d.ts +5 -0
  960. package/dist/settings/mcp/scope.d.ts.map +1 -1
  961. package/dist/settings/mcp/scope.js +5 -0
  962. package/dist/settings/mcp/scope.js.map +1 -1
  963. package/dist/settings/permissions/default-mode.d.ts +0 -1
  964. package/dist/settings/permissions/default-mode.d.ts.map +1 -1
  965. package/dist/settings/permissions/default-mode.js +2 -2
  966. package/dist/settings/permissions/default-mode.js.map +1 -1
  967. package/dist/skills/bare-repository.d.ts +9 -0
  968. package/dist/skills/bare-repository.d.ts.map +1 -0
  969. package/dist/skills/bare-repository.js +11 -0
  970. package/dist/skills/bare-repository.js.map +1 -0
  971. package/dist/skills/execution.d.ts +1 -1
  972. package/dist/skills/execution.d.ts.map +1 -1
  973. package/dist/skills/expand-shell.d.ts.map +1 -1
  974. package/dist/skills/expand-shell.js +1 -0
  975. package/dist/skills/expand-shell.js.map +1 -1
  976. package/dist/skills/expand-types.d.ts +5 -0
  977. package/dist/skills/expand-types.d.ts.map +1 -1
  978. package/dist/skills/index.d.ts +1 -0
  979. package/dist/skills/index.d.ts.map +1 -1
  980. package/dist/skills/index.js +1 -0
  981. package/dist/skills/index.js.map +1 -1
  982. package/dist/skills/invocation.d.ts.map +1 -1
  983. package/dist/skills/invocation.js +4 -3
  984. package/dist/skills/invocation.js.map +1 -1
  985. package/dist/skills/path-gate.d.ts +11 -2
  986. package/dist/skills/path-gate.d.ts.map +1 -1
  987. package/dist/skills/path-gate.js +17 -2
  988. package/dist/skills/path-gate.js.map +1 -1
  989. package/dist/skills/shell-run.d.ts +5 -0
  990. package/dist/skills/shell-run.d.ts.map +1 -1
  991. package/dist/skills/shell-run.js +18 -1
  992. package/dist/skills/shell-run.js.map +1 -1
  993. package/dist/testing/mods/expect-equal.d.ts +24 -0
  994. package/dist/testing/mods/expect-equal.d.ts.map +1 -0
  995. package/dist/testing/mods/expect-equal.js +55 -0
  996. package/dist/testing/mods/expect-equal.js.map +1 -0
  997. package/dist/testing/mods/expect-matchers.d.ts +111 -0
  998. package/dist/testing/mods/expect-matchers.d.ts.map +1 -0
  999. package/dist/testing/mods/expect-matchers.js +111 -0
  1000. package/dist/testing/mods/expect-matchers.js.map +1 -0
  1001. package/dist/testing/mods/expect.d.ts +27 -44
  1002. package/dist/testing/mods/expect.d.ts.map +1 -1
  1003. package/dist/testing/mods/expect.js +70 -97
  1004. package/dist/testing/mods/expect.js.map +1 -1
  1005. package/dist/testing/mods/fake-ports.d.ts.map +1 -1
  1006. package/dist/testing/mods/fake-ports.js +12 -0
  1007. package/dist/testing/mods/fake-ports.js.map +1 -1
  1008. package/dist/testing/mods/kit.d.ts.map +1 -1
  1009. package/dist/testing/mods/kit.js +7 -2
  1010. package/dist/testing/mods/kit.js.map +1 -1
  1011. package/dist/testing/mods/mock.d.ts +3 -2
  1012. package/dist/testing/mods/mock.d.ts.map +1 -1
  1013. package/dist/testing/mods/mock.js.map +1 -1
  1014. package/dist/testing/mods/mount.d.ts +2 -0
  1015. package/dist/testing/mods/mount.d.ts.map +1 -1
  1016. package/dist/testing/mods/mount.js +30 -3
  1017. package/dist/testing/mods/mount.js.map +1 -1
  1018. package/dist/testing/mods/stub-matcher.d.ts +9 -0
  1019. package/dist/testing/mods/stub-matcher.d.ts.map +1 -0
  1020. package/dist/testing/mods/stub-matcher.js +24 -0
  1021. package/dist/testing/mods/stub-matcher.js.map +1 -0
  1022. package/dist/testing/mods/stubs.d.ts +4 -1
  1023. package/dist/testing/mods/stubs.d.ts.map +1 -1
  1024. package/dist/testing/mods/stubs.js +10 -5
  1025. package/dist/testing/mods/stubs.js.map +1 -1
  1026. package/dist/testing/mods/world.d.ts +2 -1
  1027. package/dist/testing/mods/world.d.ts.map +1 -1
  1028. package/dist/testing/mods/world.js +2 -2
  1029. package/dist/testing/mods/world.js.map +1 -1
  1030. package/package.json +3 -3
  1031. package/src/agents/catalog/builtin.ts +25 -2
  1032. package/src/agents/catalog/scan.ts +5 -1
  1033. package/src/agents/index.ts +3 -0
  1034. package/src/agents/launch-model.ts +67 -26
  1035. package/src/agents/launch.ts +37 -14
  1036. package/src/agents/model-choice.ts +18 -5
  1037. package/src/agents/task-list.ts +31 -0
  1038. package/src/agents/tool-filters.ts +15 -1
  1039. package/src/agents/tool-resolution.ts +20 -3
  1040. package/src/agents/workflow/replay.ts +21 -3
  1041. package/src/agents/workflow/usage-limit.ts +43 -4
  1042. package/src/cli/command-table.ts +2 -0
  1043. package/src/cli/flags/session.ts +2 -1
  1044. package/src/cli/index.ts +25 -0
  1045. package/src/cli/install-command-outcome.ts +69 -0
  1046. package/src/cli/install-command-step.ts +91 -0
  1047. package/src/cli/install-engines.ts +58 -0
  1048. package/src/cli/install-plan.ts +40 -116
  1049. package/src/cli/install-refusals.ts +7 -0
  1050. package/src/cli/install-success.ts +32 -0
  1051. package/src/cli/marketplace-list.ts +1 -1
  1052. package/src/cli/marketplace-update.ts +9 -1
  1053. package/src/cli/restore-set-aside.ts +70 -0
  1054. package/src/cli/result.ts +17 -2
  1055. package/src/cli/uninstall-data.ts +16 -1
  1056. package/src/cli/update-dependencies.ts +62 -0
  1057. package/src/cli/update-facts.ts +12 -0
  1058. package/src/cli/update-plan.ts +50 -6
  1059. package/src/cli/validate-lists.ts +172 -0
  1060. package/src/cli/validate-run.ts +17 -0
  1061. package/src/entry/mods.ts +1 -0
  1062. package/src/format/add-dir-gate.ts +44 -0
  1063. package/src/format/agent-scalars.ts +7 -8
  1064. package/src/format/engines.ts +139 -0
  1065. package/src/format/hooks-handlers.ts +2 -0
  1066. package/src/format/host-errors.ts +1 -1
  1067. package/src/format/index.ts +13 -1
  1068. package/src/format/locate.ts +1 -1
  1069. package/src/format/manifest-schema.ts +3 -0
  1070. package/src/format/manifest.ts +102 -11
  1071. package/src/format/marketplace/entries.ts +15 -5
  1072. package/src/format/marketplace/entry-display.ts +78 -0
  1073. package/src/format/marketplace/entry-schema.ts +5 -2
  1074. package/src/format/marketplace/index.ts +1 -1
  1075. package/src/format/marketplace/marketplace-name-lists.ts +0 -10
  1076. package/src/format/marketplace/marketplace-names.ts +17 -18
  1077. package/src/format/marketplace/plugin-source.ts +11 -3
  1078. package/src/format/marketplace/settings-source-plugins.ts +3 -2
  1079. package/src/format/marketplace/types.ts +11 -0
  1080. package/src/format/mcp-bundles.ts +5 -5
  1081. package/src/format/mcp-contract.ts +8 -0
  1082. package/src/format/mcp-task-timing.ts +42 -0
  1083. package/src/format/mcp-tool-schema.ts +19 -3
  1084. package/src/format/network.ts +48 -0
  1085. package/src/format/plugin-notes.ts +21 -0
  1086. package/src/format/plugin-settings.ts +17 -13
  1087. package/src/format/server-paths.ts +50 -0
  1088. package/src/format/validate/plugin-fields.ts +16 -0
  1089. package/src/format/validate/plugin-manifest.ts +4 -0
  1090. package/src/format/validate/settings-deprecation.ts +26 -0
  1091. package/src/format/validate/unknown-fields.ts +1 -9
  1092. package/src/foundation/scope-folders.ts +8 -2
  1093. package/src/hooks/assemble.ts +11 -1
  1094. package/src/hooks/core/profiles.ts +1 -1
  1095. package/src/hooks/dispatch.ts +36 -5
  1096. package/src/hooks/handlers/context.ts +4 -1
  1097. package/src/hooks/handlers/remote/http-policy.ts +20 -6
  1098. package/src/hooks/handlers/remote/http.ts +2 -2
  1099. package/src/hooks/handlers/remote/mcp-tool.ts +27 -1
  1100. package/src/hooks/handlers/remote/types.ts +9 -0
  1101. package/src/hooks/input/facts-agents.ts +14 -3
  1102. package/src/hooks/outcome.ts +31 -0
  1103. package/src/hooks/output/caps.ts +4 -3
  1104. package/src/hooks/output/cowork-answers.ts +19 -0
  1105. package/src/hooks/output/merge-simple.ts +5 -2
  1106. package/src/hooks/output/merge.ts +2 -0
  1107. package/src/hooks/output/tool-output.ts +48 -2
  1108. package/src/hooks/output/tool-shapes/shapes-1.ts +3 -0
  1109. package/src/hooks/output/tool-shapes/shapes-3.ts +1 -0
  1110. package/src/hooks/output/tool-shapes/shapes-4.ts +12 -1
  1111. package/src/hooks/output/tool-shapes/shapes-5.ts +9 -1
  1112. package/src/hooks/run-all.ts +1 -0
  1113. package/src/hooks/select/event-catalog.ts +4 -1
  1114. package/src/hooks/select/matcher-values.ts +0 -1
  1115. package/src/hooks/verdict/exit2.ts +6 -1
  1116. package/src/hooks/verdict/interpret.ts +7 -7
  1117. package/src/hooks/verdict/mcp-answer.ts +64 -0
  1118. package/src/hooks/verdict/model-verdict.ts +1 -1
  1119. package/src/hooks/verdict/on-failure.ts +51 -7
  1120. package/src/hooks/verdict/subject.ts +2 -0
  1121. package/src/hooks/verdict/suspect-capture.ts +7 -1
  1122. package/src/host/session-agents.ts +15 -26
  1123. package/src/host/session-bare-repository.ts +38 -0
  1124. package/src/host/session-engine.ts +2 -1
  1125. package/src/host/session-hooks.ts +16 -1
  1126. package/src/host/session-registry.ts +12 -0
  1127. package/src/host/session-skill-expand.ts +11 -29
  1128. package/src/host/session-skill-permission.ts +29 -0
  1129. package/src/host/session-skills.ts +31 -18
  1130. package/src/host/session-types.ts +7 -0
  1131. package/src/host/session.ts +0 -1
  1132. package/src/index.ts +3 -0
  1133. package/src/loading/load-notes.ts +62 -0
  1134. package/src/loading/load-plugin.ts +36 -3
  1135. package/src/loading/manifest-gate.ts +1 -1
  1136. package/src/loading/plugin-folder.ts +4 -1
  1137. package/src/loading/plugin-model.ts +8 -0
  1138. package/src/loading/validate/marketplace-target.ts +34 -6
  1139. package/src/loading/validate/plugin-contents.ts +12 -0
  1140. package/src/loading/walk.ts +3 -3
  1141. package/src/marketplace/dependency-graph.ts +5 -0
  1142. package/src/marketplace/dependency-install-plan.ts +6 -4
  1143. package/src/marketplace/enablement-notes.ts +49 -12
  1144. package/src/marketplace/headless-report.ts +26 -1
  1145. package/src/marketplace/index.ts +1 -1
  1146. package/src/marketplace/install-commands.ts +12 -3
  1147. package/src/marketplace/install-errors.ts +8 -7
  1148. package/src/marketplace/install-lifecycle-index.ts +10 -0
  1149. package/src/marketplace/install-plan.ts +7 -0
  1150. package/src/marketplace/install-plans.ts +4 -5
  1151. package/src/marketplace/managed-take-back.ts +38 -0
  1152. package/src/marketplace/marketplace-fetch-plan.ts +2 -0
  1153. package/src/marketplace/reload-summary.ts +14 -3
  1154. package/src/marketplace/removal.ts +5 -5
  1155. package/src/marketplace/seed-registry.ts +7 -5
  1156. package/src/marketplace/store-layout.ts +17 -4
  1157. package/src/marketplace/types.ts +5 -0
  1158. package/src/mods/api/agent.ts +28 -0
  1159. package/src/mods/api/audio.ts +18 -5
  1160. package/src/mods/api/build.ts +7 -3
  1161. package/src/mods/api/call.ts +7 -0
  1162. package/src/mods/api/command.ts +22 -2
  1163. package/src/mods/api/declared-port-types.ts +155 -0
  1164. package/src/mods/api/engine-create.ts +8 -1
  1165. package/src/mods/api/exec.ts +4 -0
  1166. package/src/mods/api/fs-ports.ts +9 -1
  1167. package/src/mods/api/fs.ts +29 -10
  1168. package/src/mods/api/gate.ts +3 -4
  1169. package/src/mods/api/host-ports.ts +18 -1
  1170. package/src/mods/api/index.ts +9 -3
  1171. package/src/mods/api/mcp.ts +10 -2
  1172. package/src/mods/api/optional-port-types.ts +48 -16
  1173. package/src/mods/api/ports.ts +26 -42
  1174. package/src/mods/api/registries.ts +17 -18
  1175. package/src/mods/api/session-ports.ts +57 -0
  1176. package/src/mods/api/session.ts +30 -5
  1177. package/src/mods/api/theme.ts +132 -33
  1178. package/src/mods/api/vcs.ts +71 -0
  1179. package/src/mods/api/wasm.ts +74 -0
  1180. package/src/mods/chain/api-guard.ts +35 -7
  1181. package/src/mods/chain/context.ts +15 -0
  1182. package/src/mods/chain/default-matcher.ts +69 -0
  1183. package/src/mods/chain/dispatch.ts +19 -1
  1184. package/src/mods/chain/failure.ts +7 -0
  1185. package/src/mods/chain/guarded.ts +8 -2
  1186. package/src/mods/chain/invoke.ts +25 -5
  1187. package/src/mods/chain/validate.ts +2 -1
  1188. package/src/mods/events/agent.ts +7 -3
  1189. package/src/mods/events/declared.ts +51 -0
  1190. package/src/mods/events/index.ts +4 -1
  1191. package/src/mods/events/pinned.ts +23 -0
  1192. package/src/mods/events/session.ts +26 -4
  1193. package/src/mods/events/spec.ts +2 -0
  1194. package/src/mods/events/tool.ts +57 -12
  1195. package/src/mods/events/turn.ts +17 -1
  1196. package/src/mods/load/auto-mode-approval.ts +7 -11
  1197. package/src/mods/load/commands/module-facts.ts +32 -0
  1198. package/src/mods/load/commands/scan-lead.ts +6 -2
  1199. package/src/mods/load/commands/scan-lines.ts +33 -1
  1200. package/src/mods/load/commands/sha256.ts +80 -0
  1201. package/src/mods/load/commands/validate-report.ts +9 -0
  1202. package/src/mods/load/commands/validate.ts +24 -16
  1203. package/src/mods/load/commands/wasm-read.ts +183 -0
  1204. package/src/mods/load/guard-protection.ts +15 -5
  1205. package/src/mods/load/guard-surfaces.ts +2 -0
  1206. package/src/mods/load/guard-tools.ts +45 -0
  1207. package/src/mods/load/guard.ts +21 -8
  1208. package/src/mods/load/host-support.ts +51 -11
  1209. package/src/mods/load/host.ts +24 -4
  1210. package/src/mods/load/in-turn.ts +12 -0
  1211. package/src/mods/load/index.ts +22 -2
  1212. package/src/mods/load/loader.ts +23 -10
  1213. package/src/mods/load/mod-set.ts +9 -18
  1214. package/src/mods/load/order.ts +2 -2
  1215. package/src/mods/load/plugin-dirs.ts +29 -8
  1216. package/src/mods/load/policy.ts +61 -25
  1217. package/src/mods/load/prepare.ts +34 -4
  1218. package/src/mods/load/provides.ts +134 -0
  1219. package/src/mods/load/register-ask.ts +82 -0
  1220. package/src/mods/load/register-call.ts +98 -38
  1221. package/src/mods/load/register-event.ts +104 -0
  1222. package/src/mods/load/scan/client-modules.ts +1 -1
  1223. package/src/mods/load/scan/event-names.ts +2 -0
  1224. package/src/mods/load/scan/found.ts +8 -0
  1225. package/src/mods/load/scan/hosts.ts +40 -0
  1226. package/src/mods/load/scan/index.ts +8 -0
  1227. package/src/mods/load/scan/rules.ts +4 -0
  1228. package/src/mods/load/scan/uses.ts +10 -0
  1229. package/src/mods/load/scan/wasm-paths.ts +35 -0
  1230. package/src/mods/load/tool-flow.ts +16 -2
  1231. package/src/mods/load/wasm-files.ts +77 -0
  1232. package/src/mods/load/wiring.ts +30 -7
  1233. package/src/mods/load/written-mods.ts +42 -27
  1234. package/src/mods/types.ts +10 -9
  1235. package/src/mods/ui/controls/hotkeys.ts +36 -2
  1236. package/src/mods/ui/elements/box.ts +6 -1
  1237. package/src/mods/ui/elements/limits.ts +5 -3
  1238. package/src/mods/ui/elements/progress.ts +19 -0
  1239. package/src/mods/ui/elements/prop-size.ts +41 -0
  1240. package/src/mods/ui/elements/registry.ts +4 -0
  1241. package/src/mods/ui/elements/shader-place.ts +38 -0
  1242. package/src/mods/ui/elements/shader.ts +36 -0
  1243. package/src/mods/ui/elements/svg.ts +4 -0
  1244. package/src/mods/ui/elements/table.ts +2 -0
  1245. package/src/mods/ui/elements/text.ts +9 -0
  1246. package/src/mods/ui/elements/validate.ts +3 -1
  1247. package/src/mods/ui/index.ts +1 -0
  1248. package/src/mods/ui/keyboard/keys.ts +2 -0
  1249. package/src/mods/ui/panes/open.ts +5 -1
  1250. package/src/mods/ui/panes/pane-request.ts +19 -0
  1251. package/src/mods/ui/panes/registry.ts +5 -1
  1252. package/src/mods/ui/rules.ts +4 -0
  1253. package/src/mods/ui/runtime.ts +43 -12
  1254. package/src/mods/ui/sites/agent-row.ts +24 -0
  1255. package/src/mods/ui/sites/backdrop.ts +2 -2
  1256. package/src/mods/ui/sites/band-list.ts +40 -0
  1257. package/src/mods/ui/sites/band-rows.ts +100 -0
  1258. package/src/mods/ui/sites/fold.ts +2 -2
  1259. package/src/mods/ui/sites/registry.ts +33 -17
  1260. package/src/ports/files.ts +1 -1
  1261. package/src/ports/mcp-bundle.ts +3 -2
  1262. package/src/ports/mcp-caller.ts +7 -0
  1263. package/src/protocol/mods-api-names.ts +17 -4
  1264. package/src/protocol/mods-events.ts +14 -5
  1265. package/src/protocol/mods-limits.ts +9 -1
  1266. package/src/protocol/mods-ui-names.ts +63 -8
  1267. package/src/protocol/official.ts +1 -0
  1268. package/src/protocol/tool-names.ts +27 -5
  1269. package/src/rules/bash/wrappers.ts +3 -0
  1270. package/src/rules/decide/auto-dropped.ts +29 -6
  1271. package/src/rules/decide/context.ts +5 -2
  1272. package/src/rules/decide/decide.ts +14 -0
  1273. package/src/rules/decide/facts.ts +3 -3
  1274. package/src/rules/decide/modes.ts +12 -0
  1275. package/src/rules/tools/catalog.ts +13 -3
  1276. package/src/rules/types.ts +6 -0
  1277. package/src/settings/add-dir-layer.ts +34 -0
  1278. package/src/settings/env/code-mode.ts +26 -0
  1279. package/src/settings/env/ignored-variables.ts +7 -0
  1280. package/src/settings/env/index.ts +1 -0
  1281. package/src/settings/general/checks.ts +0 -1
  1282. package/src/settings/general/command-lines.ts +1 -29
  1283. package/src/settings/general/edit-effect.ts +14 -1
  1284. package/src/settings/general/index.ts +5 -14
  1285. package/src/settings/general/keys.ts +0 -2
  1286. package/src/settings/general/plugin-defaults.ts +23 -12
  1287. package/src/settings/general/rows.ts +0 -1
  1288. package/src/settings/hooks/custom-commands.ts +2 -3
  1289. package/src/settings/hooks/http-policy.ts +47 -10
  1290. package/src/settings/hooks/index.ts +6 -1
  1291. package/src/settings/hooks/policy.ts +2 -2
  1292. package/src/settings/hooks/session-gates.ts +18 -12
  1293. package/src/settings/index.ts +1 -0
  1294. package/src/settings/managed/compose.ts +10 -34
  1295. package/src/settings/managed/helper-run.ts +1 -1
  1296. package/src/settings/managed/helper-settings.ts +36 -0
  1297. package/src/settings/managed/index.ts +16 -1
  1298. package/src/settings/managed/login-keys.ts +23 -0
  1299. package/src/settings/managed/ports.ts +8 -1
  1300. package/src/settings/managed/server-cache.ts +69 -0
  1301. package/src/settings/managed/server-groups.ts +63 -0
  1302. package/src/settings/mcp/exclusive.ts +6 -1
  1303. package/src/settings/mcp/scope.ts +10 -0
  1304. package/src/settings/permissions/default-mode.ts +2 -2
  1305. package/src/skills/bare-repository.ts +12 -0
  1306. package/src/skills/execution.ts +1 -1
  1307. package/src/skills/expand-shell.ts +1 -0
  1308. package/src/skills/expand-types.ts +5 -0
  1309. package/src/skills/index.ts +1 -0
  1310. package/src/skills/invocation.ts +4 -3
  1311. package/src/skills/path-gate.ts +25 -3
  1312. package/src/skills/shell-run.ts +24 -1
  1313. package/src/testing/mods/expect-equal.ts +66 -0
  1314. package/src/testing/mods/expect-matchers.ts +127 -0
  1315. package/src/testing/mods/expect.ts +136 -98
  1316. package/src/testing/mods/fake-ports.ts +12 -0
  1317. package/src/testing/mods/kit.ts +6 -2
  1318. package/src/testing/mods/mock.ts +3 -2
  1319. package/src/testing/mods/mount.ts +34 -3
  1320. package/src/testing/mods/stub-matcher.ts +28 -0
  1321. package/src/testing/mods/stubs.ts +22 -7
  1322. package/src/testing/mods/world.ts +4 -2
  1323. package/dist/settings/general/subagent-status-line.d.ts +0 -66
  1324. package/dist/settings/general/subagent-status-line.d.ts.map +0 -1
  1325. package/dist/settings/general/subagent-status-line.js +0 -58
  1326. package/dist/settings/general/subagent-status-line.js.map +0 -1
  1327. package/src/settings/general/subagent-status-line.ts +0 -121
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Agent Plugins Extended §7.5.13 `PostToolUse`, `updatedToolOutput`: "In a Cowork cloud session the
3
+ * client ignores it for `AskUserQuestion` and `ExitPlanMode`, and Claude reads the original answer
4
+ * or plan". Whether the session is one is the host's (`DispatchRequest.coworkCloud`).
5
+ */
6
+
7
+ /** The tools whose answer or plan a Cowork cloud session keeps as the user gave it. */
8
+ const KEPT_IN_COWORK: ReadonlySet<unknown> = new Set<unknown>(['AskUserQuestion', 'ExitPlanMode']);
9
+
10
+ /** The merged effects without a hook's `updatedToolOutput` where the session keeps the original. */
11
+ export function withCoworkAnswers<
12
+ M extends { readonly effects: { readonly updatedToolOutput?: unknown } },
13
+ >(merged: M, where: { readonly coworkCloud?: boolean; readonly facts: unknown }): M {
14
+ if (where.coworkCloud !== true) return merged;
15
+ if (!KEPT_IN_COWORK.has(Reflect.get(Object(where.facts), 'tool_name'))) return merged;
16
+ if (merged.effects.updatedToolOutput === undefined) return merged;
17
+ const { updatedToolOutput: _replaced, ...effects } = merged.effects;
18
+ return { ...merged, effects };
19
+ }
@@ -1,7 +1,7 @@
1
1
  import { warning, type PluginIssue } from '../../format/issues.ts';
2
2
  import { classifierNote } from './classifier-note.ts';
3
3
  import { boolIn, specificOf, stringIn, stringsIn, textIn } from './fields.ts';
4
- import { checkToolOutput, isMcpToolName } from './tool-output.ts';
4
+ import { checkToolOutput, isMcpToolName, withKeptFields } from './tool-output.ts';
5
5
  import { lastPathLine } from './worktree-path.ts';
6
6
  import { factOf } from '../input/fact-read.ts';
7
7
  import { NOTHING, lastOf, type Merged, type Merger, type Read } from './merge-rules.ts';
@@ -193,6 +193,7 @@ export const mergePostToolUse: Merger = (reads, facts) => {
193
193
  const rewrites = found.flatMap(({ rewrite }) => (rewrite === undefined ? [] : [rewrite]));
194
194
  const issues = found.flatMap(({ issue }) => (issue === undefined ? [] : [issue]));
195
195
  const winner = rewrites.filter((rewrite) => rewrite.accepted).at(-1);
196
+ const original = factOf(facts, 'tool_response');
196
197
  // A note is dropped with its own rewrite when that is rejected or replaced, and kept otherwise.
197
198
  const kept = reads.filter((read) => {
198
199
  const own = rewrites.find((rewrite) => rewrite.read === read);
@@ -201,7 +202,9 @@ export const mergePostToolUse: Merger = (reads, facts) => {
201
202
  const note = classifierNote(name, kept);
202
203
  return {
203
204
  effects: {
204
- ...(winner === undefined ? {} : { updatedToolOutput: winner.value }),
205
+ ...(winner === undefined
206
+ ? {}
207
+ : { updatedToolOutput: withKeptFields(name, winner.value, original) }),
205
208
  ...(note === undefined ? {} : { classifierContext: note.text, classifierTrust: note.trust }),
206
209
  },
207
210
  issues,
@@ -82,6 +82,8 @@ const DECISION_BLOCKS = eventSet(
82
82
  'ConfigChange',
83
83
  'PreCompact',
84
84
  'TaskCreated',
85
+ 'TaskCompleted',
86
+ 'TeammateIdle',
85
87
  );
86
88
 
87
89
  /** "Returning `decision: \"block\"` or `continue: false` stops the agentic loop": the same block. */
@@ -1,4 +1,5 @@
1
- import { shapeProblem } from './tool-shape.ts';
1
+ import { isRecord } from '../../protocol/is-record.ts';
2
+ import { shapeProblem, type Shape } from './tool-shape.ts';
2
3
  import { TOOL_SHAPES } from './tool-shapes/index.ts';
3
4
 
4
5
  /**
@@ -11,9 +12,54 @@ import { TOOL_SHAPES } from './tool-shapes/index.ts';
11
12
  * included; a field the type does not declare is allowed, as the types are open.
12
13
  */
13
14
 
15
+ /**
16
+ * Code Mode's `REPL` tool, which the SDK types no output for (Agent Plugins Extended J7.214). The
17
+ * client "accepts the copy only in this shape" (§7.6.11.3 item 2, code-mode.md "Redact code
18
+ * output"): `code`, `stdout` and `stderr` strings, `error` a string or absent, `result` any value or
19
+ * missing, `images` and `documents` lists (`[]` removes them).
20
+ */
21
+ const REPL_SHAPE: Shape = {
22
+ object: {
23
+ code: 'string',
24
+ stdout: 'string',
25
+ stderr: 'string',
26
+ 'error?': 'string',
27
+ 'result?': 'unknown',
28
+ 'images?': { array: 'unknown' },
29
+ 'documents?': { array: 'unknown' },
30
+ },
31
+ };
32
+
33
+ /** The shapes the spec states for tools the SDK gives no output type. */
34
+ const SPEC_SHAPES: Readonly<Record<string, Shape>> = { REPL: REPL_SHAPE };
35
+
36
+ const shapeOf = (toolName: string): Shape | undefined =>
37
+ Object.hasOwn(TOOL_SHAPES, toolName)
38
+ ? TOOL_SHAPES[toolName]
39
+ : Object.hasOwn(SPEC_SHAPES, toolName)
40
+ ? SPEC_SHAPES[toolName]
41
+ : undefined;
42
+
14
43
  /** The tools whose output shape the kit checks: every built-in tool the SDK gives an output type. */
15
44
  export const CHECKED_TOOL_OUTPUTS: readonly string[] = Object.keys(TOOL_SHAPES);
16
45
 
46
+ /**
47
+ * Fields of a tool's output a hook cannot change: `REPL`'s `refusedCalls`, which "Claude reads
48
+ * unchanged" (code-mode.md, "Redact code output"), so an accepted copy carries the original's.
49
+ */
50
+ const KEPT_FIELDS: Readonly<Record<string, readonly string[]>> = { REPL: ['refusedCalls'] };
51
+
52
+ /** `value` with the fields of `original` a hook cannot change put back. */
53
+ export function withKeptFields(toolName: string, value: unknown, original: unknown): unknown {
54
+ const kept = Object.hasOwn(KEPT_FIELDS, toolName) ? KEPT_FIELDS[toolName] : undefined;
55
+ if (kept === undefined || !isRecord(value)) return value;
56
+ const rest = Object.entries(value).filter(([key]) => !kept.includes(key));
57
+ const back = isRecord(original)
58
+ ? kept.filter((key) => Object.hasOwn(original, key)).map((key) => [key, original[key]])
59
+ : [];
60
+ return Object.fromEntries([...rest, ...back]);
61
+ }
62
+
17
63
  /** `mcp__<server>__<tool>`: "MCP tool output is passed through without schema validation". */
18
64
  export const isMcpToolName = (name: string): boolean => name.startsWith('mcp__');
19
65
 
@@ -23,7 +69,7 @@ export type ToolOutputCheck =
23
69
 
24
70
  /** Whether `value` may replace the output of the built-in tool `toolName`. */
25
71
  export function checkToolOutput(toolName: string, value: unknown): ToolOutputCheck {
26
- const shape = Object.hasOwn(TOOL_SHAPES, toolName) ? TOOL_SHAPES[toolName] : undefined;
72
+ const shape = shapeOf(toolName);
27
73
  if (shape === undefined) return { accepted: true };
28
74
  const problem = shapeProblem(shape, value);
29
75
  return problem === undefined ? { accepted: true } : { accepted: false, message: problem };
@@ -235,6 +235,9 @@ export const SHAPES_1: ShapeTable = {
235
235
  'short_summary?': 'string',
236
236
  failure_scenario: 'string',
237
237
  'category?': 'string',
238
+ 'severity?': {
239
+ oneOf: [{ literal: 'important' }, { literal: 'pre_existing' }, { literal: 'nit' }],
240
+ },
238
241
  'verdict?': { oneOf: [{ literal: 'CONFIRMED' }, { literal: 'PLAUSIBLE' }] },
239
242
  'outcome?': {
240
243
  oneOf: [
@@ -31,6 +31,7 @@ export const SHAPES_3: ShapeTable = {
31
31
  'faviconSent?': { literal: true },
32
32
  'iconDropped?': { literal: true },
33
33
  'audience?': 'string',
34
+ 'folder_audience?': { oneOf: [{ literal: 'others' }, { literal: 'unknown' }] },
34
35
  'seq?': 'number',
35
36
  'unchanged?': { literal: true },
36
37
  'liveSubscription?': 'string',
@@ -163,7 +163,14 @@ export const SHAPES_4: ShapeTable = {
163
163
  'cancelledWakeups?': 'number',
164
164
  },
165
165
  },
166
- Monitor: { object: { taskId: 'string', timeoutMs: 'number', 'persistent?': 'boolean' } },
166
+ Monitor: {
167
+ object: {
168
+ taskId: 'string',
169
+ timeoutMs: 'number',
170
+ 'persistent?': 'boolean',
171
+ 'keptInSandboxByCheck?': 'boolean',
172
+ },
173
+ },
167
174
  ProposeSkills: { object: { proposalCount: 'number' } },
168
175
  ProposeGoal: { object: { condition: 'string', askUser: 'boolean' } },
169
176
  EnterPlanMode: { object: { message: 'string' } },
@@ -189,6 +196,10 @@ export const SHAPES_4: ShapeTable = {
189
196
  recurring: 'boolean',
190
197
  'durable?': 'boolean',
191
198
  'nextFireAt?': 'number',
199
+ 'maxAgeMs?': 'number',
200
+ 'otherOneShots?': {
201
+ array: { object: { id: 'string', humanSchedule: 'string', prompt: 'string' } },
202
+ },
192
203
  },
193
204
  },
194
205
  CronDelete: { object: { id: 'string', 'endedLoopWakeup?': { literal: true } } },
@@ -47,7 +47,15 @@ export const SHAPES_5: ShapeTable = {
47
47
  'notice?': 'string',
48
48
  rag: 'boolean',
49
49
  'hits?': {
50
- array: { object: { 'name?': 'string', 'doc_uuid?': 'string', 'text?': 'string' } },
50
+ array: {
51
+ object: {
52
+ 'name?': 'string',
53
+ 'doc_uuid?': 'string',
54
+ 'text?': 'string',
55
+ 'image_attached?': 'boolean',
56
+ 'page?': 'number',
57
+ },
58
+ },
51
59
  },
52
60
  'docs?': { array: 'string' },
53
61
  },
@@ -166,6 +166,7 @@ export async function runAll<E extends HookEvent>(
166
166
  effectsIgnored: selection.monitor.get(entry)?.effectsApply === false,
167
167
  gitBashMissing: config.windows && config.defaultShell === 'powershell',
168
168
  teammateStopped: request.taskCompletedBy === 'teammate-turn',
169
+ fromCode: request.fromCode === true,
169
170
  });
170
171
  return settled(request, config, {
171
172
  ...verdict,
@@ -30,7 +30,10 @@ const ALL: readonly HookHandlerType[] = HOOK_HANDLER_TYPES;
30
30
  const NO_AGENT: readonly HookHandlerType[] = ['command', 'http', 'mcp_tool', 'prompt'];
31
31
  /** The events that "support command, http, and mcp_tool hooks but not prompt or agent". */
32
32
  const NO_MODEL: readonly HookHandlerType[] = ['command', 'http', 'mcp_tool'];
33
- /** `SessionStart` and `Setup`: command and mcp_tool only. */
33
+ /**
34
+ * `SessionStart` and `Setup`: command and mcp_tool only. On `Setup` (2.1.330: "command" only) the
35
+ * mcp_tool hook is listed so that its skip is reported in §7.3.5 item 5's words; it never runs.
36
+ */
34
37
  const LAUNCH: readonly HookHandlerType[] = ['command', 'mcp_tool'];
35
38
 
36
39
  const NONE: readonly string[] = [];
@@ -51,7 +51,6 @@ const NOTIFICATION_TYPES = [
51
51
  */
52
52
  const STOP_FAILURE_ERRORS = [
53
53
  'rate_limit',
54
- 'overloaded',
55
54
  'authentication_failed',
56
55
  'oauth_org_not_allowed',
57
56
  'account_on_hold',
@@ -65,6 +65,11 @@ export interface Exit2Rule {
65
65
  readonly stopsTeammate?: boolean;
66
66
  /** The event's own exception to blocking (`ConfigChange`: "`policy_settings` changes can't be blocked"). */
67
67
  readonly cannotBlockWhen?: (facts: object) => boolean;
68
+ /**
69
+ * A failing hook shows no `hook error` notice (2.1.330, Agent Plugins Extended §7.4.1.3 item 2:
70
+ * "on events such as `Notification`"); the run is still recorded for the debug log.
71
+ */
72
+ readonly noFailureNotice?: boolean;
68
73
  }
69
74
 
70
75
  const row = (
@@ -110,7 +115,7 @@ export const EXIT2_RULES: { readonly [E in HookEvent]: Exit2Rule } = {
110
115
  PostToolUseFailure: ignored('claude'),
111
116
  PostToolBatch: blocks('stops-agentic-loop', 'user-and-claude'),
112
117
  PermissionDenied: ignored('discarded'),
113
- Notification: ignored('discarded'),
118
+ Notification: row(false, 'none', 'discarded', { noFailureNotice: true }),
114
119
  SubagentStart: ignored('user'),
115
120
  SessionStart: ignored('user'),
116
121
  Setup: ignored('discarded'),
@@ -6,6 +6,7 @@ import { textFactOf } from '../input/fact-read.ts';
6
6
  import { deliveryOf } from './background.ts';
7
7
  import { interpretExited } from './exited.ts';
8
8
  import { interpretHttp, interpretHttpFailed } from './http-response.ts';
9
+ import { interpretMcp } from './mcp-answer.ts';
9
10
  import { interpretModel, interpretModelFailed } from './model-verdict.ts';
10
11
  import { TIMED_OUT, timedOutDiscarded } from './notices.ts';
11
12
  import { failureVerdict } from './on-failure.ts';
@@ -90,13 +91,9 @@ const READERS: { readonly [K in RawRun['kind']]: Reader } = {
90
91
  })),
91
92
  http: readerOf('http', interpretHttp),
92
93
  'http-failed': readerOf('http-failed', interpretHttpFailed),
93
- // "Claude Code reads the tool's text content the same way it reads command-hook stdout ... If the
94
- // tool returns `isError: true`, the hook produces a non-blocking error and execution continues."
95
- mcp: readerOf('mcp', (subject, run) =>
96
- run.isError
97
- ? failureVerdict(subject, { cause: 'tool-error', text: run.text, detail: run.text })
98
- : interpretExited(subject, { exitCode: 0, stdout: run.text, stderr: '' }),
99
- ),
94
+ // "Claude Code reads the tool's text content the same way it reads command-hook stdout"; the
95
+ // failures and `onFailure` are `mcp-answer.ts`.
96
+ mcp: readerOf('mcp', interpretMcp),
100
97
  model: readerOf('model', interpretModel),
101
98
  'model-failed': readerOf('model-failed', interpretModelFailed),
102
99
  };
@@ -115,6 +112,8 @@ export interface InterpretContext {
115
112
  readonly gitBashMissing?: boolean;
116
113
  /** `TaskCompleted` fired because a teammate finished its turn. */
117
114
  readonly teammateStopped?: boolean;
115
+ /** `PreToolUse` of a call Code Mode's code made (`DispatchRequest.fromCode`). */
116
+ readonly fromCode?: boolean;
118
117
  }
119
118
 
120
119
  export function interpretRun(
@@ -132,6 +131,7 @@ export function interpretRun(
132
131
  effectsIgnored: context.effectsIgnored === true,
133
132
  gitBashMissing: context.gitBashMissing === true,
134
133
  teammateStopped: context.teammateStopped === true,
134
+ fromCode: context.fromCode === true,
135
135
  };
136
136
  const verdict = READERS[run.kind](subject, run);
137
137
  return isRunOf('exited', run) ? { ...verdict, exitCode: run.exitCode } : verdict;
@@ -0,0 +1,64 @@
1
+ import type { HookEvent } from '../../protocol/official.ts';
2
+ import type { McpRun } from '../handlers/remote/types.ts';
3
+ import { EXIT2_RULES } from './exit2.ts';
4
+ import { interpretExited } from './exited.ts';
5
+ import { failureVerdict, onFailureBlocks, refusedVerdict, type Failure } from './on-failure.ts';
6
+ import { readBody } from './stdout-kind.ts';
7
+ import type { Subject } from './subject.ts';
8
+ import type { HandlerVerdict } from './types.ts';
9
+
10
+ /**
11
+ * An `mcp_tool` hook's answer (hooks.md, "How the tool's result is read"; Agent Plugins Extended
12
+ * §7.3.5 items 2–4, §7.4.3): the text is read as command-hook stdout; `isError: true`, a server that
13
+ * was not connected and an answer the client could not read are failures, which `onFailure:
14
+ * "block"` (2.1.328) turns into a block.
15
+ */
16
+
17
+ /** The events where an unreadable answer refuses what the hook was checking, whatever `onFailure` says. */
18
+ const REFUSES_UNREADABLE: ReadonlySet<HookEvent> = new Set<HookEvent>(['PreToolUse']);
19
+
20
+ /** The fields of a hook's JSON output (hooks.md, "JSON output"), `reason` excepted (J7.212). */
21
+ const OUTPUT_FIELDS: ReadonlySet<string> = new Set([
22
+ 'continue',
23
+ 'stopReason',
24
+ 'suppressOutput',
25
+ 'systemMessage',
26
+ 'terminalSequence',
27
+ 'decision',
28
+ 'hookSpecificOutput',
29
+ ]);
30
+
31
+ /**
32
+ * J7.212: with `"block"` on an event that can block, "a non-empty answer also counts as a failure
33
+ * unless it is `{}` or JSON that sets a hook output field other than `reason`".
34
+ */
35
+ function answerFails(subject: Subject, text: string): boolean {
36
+ if (!onFailureBlocks(subject) || !EXIT2_RULES[subject.event].canBlock) return false;
37
+ const body = readBody(text);
38
+ if (body.empty) return false;
39
+ if (body.json === undefined) return true;
40
+ const keys = Object.keys(body.json);
41
+ return keys.length > 0 && !keys.some((key) => OUTPUT_FIELDS.has(key));
42
+ }
43
+
44
+ const toolError = (text: string): Failure => ({ cause: 'tool-error', text, detail: text });
45
+
46
+ const NO_OUTPUT_FIELD =
47
+ 'the answer is not empty, not {} and sets no hook output field, which counts as a failure under onFailure "block"';
48
+
49
+ export function interpretMcp(subject: Subject, run: McpRun): HandlerVerdict {
50
+ if (run.unreadable !== undefined) {
51
+ return REFUSES_UNREADABLE.has(subject.event)
52
+ ? refusedVerdict(subject, toolError(run.text))
53
+ : failureVerdict(subject, toolError(run.text));
54
+ }
55
+ if (run.isError) return failureVerdict(subject, toolError(run.text));
56
+ if (answerFails(subject, run.text)) {
57
+ return failureVerdict(subject, {
58
+ cause: 'invalid-output',
59
+ text: NO_OUTPUT_FIELD,
60
+ detail: run.text,
61
+ });
62
+ }
63
+ return interpretExited(subject, { exitCode: 0, stdout: run.text, stderr: '' });
64
+ }
@@ -75,4 +75,4 @@ export function interpretModel(subject: Subject, run: ModelRun): HandlerVerdict
75
75
 
76
76
  /** The model did not answer, or answered something that is not the response schema. */
77
77
  export const interpretModelFailed = (subject: Subject, run: ModelFailedRun): HandlerVerdict =>
78
- failureVerdict(subject, { cause: 'tool-error', text: run.message, detail: run.message });
78
+ failureVerdict(subject, { cause: 'no-decision', text: run.message, detail: run.message });
@@ -1,3 +1,4 @@
1
+ import type { HookHandlerType } from '../../protocol/hook-config.ts';
1
2
  import { routedBlock, shownWith } from './route.ts';
2
3
  import type { HandlerVerdict, BlockInfo, BlockVia } from './types.ts';
3
4
  import { EXIT2_RULES } from './exit2.ts';
@@ -26,8 +27,13 @@ export const FAILURE_CAUSES = [
26
27
  'http-error',
27
28
  'timeout',
28
29
  'invalid-output',
29
- /** An `mcp_tool` hook's tool answered `isError: true` (no `onFailure` on that type). */
30
+ /**
31
+ * An `mcp_tool` hook's tool answered `isError: true`, its server was not connected, or its answer
32
+ * could not be read; with `onFailure: "block"` (2.1.328) a failure (§7.4.3, "MCP failure").
33
+ */
30
34
  'tool-error',
35
+ /** A prompt or agent hook's model gave no verdict (an agent hook "ended without a decision"). */
36
+ 'no-decision',
31
37
  ] as const;
32
38
  export type FailureCause = (typeof FAILURE_CAUSES)[number];
33
39
 
@@ -39,7 +45,7 @@ export interface Failure {
39
45
  readonly detail: string;
40
46
  }
41
47
 
42
- /** The `onFailure` of a `command` or `http` hook; the other types have no such field. */
48
+ /** The `onFailure` of a `command`, `http` or `mcp_tool` hook; the other types have no such field. */
43
49
  const onFailureOf = (subject: Subject): 'continue' | 'block' | undefined => {
44
50
  const { handler } = subject.entry;
45
51
  return 'onFailure' in handler ? handler.onFailure : undefined;
@@ -176,8 +182,39 @@ function failureAsExit2Feedback(subject: Subject, failure: Failure): HandlerVerd
176
182
  return { ...base(subject), status: 'non-blocking-error' };
177
183
  }
178
184
 
185
+ /**
186
+ * Code Mode (code-mode.md, "Tool call refused by a hook"; §7.6.11.4, J7.213): a `PreToolUse` hook
187
+ * that gives no decision on a call from code, because it timed out or an agent hook ended without
188
+ * one, refuses the call when `onFailure` is unset. Other failures let it run (2.1.329).
189
+ */
190
+ const DID_NOT_FINISH = 'the hook did not finish';
191
+
192
+ const REFUSES_UNFINISHED: ReadonlySet<string> = new Set(['PreToolUse']);
193
+
194
+ /** "an agent hook ended without a decision": the type whose missing verdict counts as unfinished. */
195
+ const ENDS_WITHOUT_DECISION: { readonly [T in HookHandlerType]: boolean } = {
196
+ command: false,
197
+ http: false,
198
+ mcp_tool: false,
199
+ prompt: false,
200
+ agent: true,
201
+ };
202
+
203
+ const unfinished = (subject: Subject, failure: Failure): boolean =>
204
+ failure.cause === 'timeout' ||
205
+ (failure.cause === 'no-decision' && ENDS_WITHOUT_DECISION[subject.entry.handler.type]);
206
+
207
+ const refusesFromCode = (subject: Subject, failure: Failure): boolean =>
208
+ subject.fromCode === true &&
209
+ REFUSES_UNFINISHED.has(subject.event) &&
210
+ onFailureOf(subject) === undefined &&
211
+ unfinished(subject, failure);
212
+
179
213
  /** What a failed run comes to. */
180
214
  export function failureVerdict(subject: Subject, failure: Failure): HandlerVerdict {
215
+ if (refusesFromCode(subject, failure)) {
216
+ return refusedVerdict(subject, { ...failure, text: DID_NOT_FINISH });
217
+ }
181
218
  const block = blockFor(subject, failure);
182
219
  if (block !== undefined) {
183
220
  return { ...base(subject), status: 'blocked', block, ...shownWith(subject.entry.id, block) };
@@ -185,9 +222,16 @@ export function failureVerdict(subject: Subject, failure: Failure): HandlerVerdi
185
222
  const feedback = failureAsExit2Feedback(subject, failure);
186
223
  if (feedback !== undefined) return feedback;
187
224
  const { message } = lineOf(subject, failure.text);
188
- return {
189
- ...base(subject),
190
- status: failure.cause === 'timeout' ? 'timed-out' : 'non-blocking-error',
191
- notice: { handlerId: subject.entry.id, message },
192
- };
225
+ const status = failure.cause === 'timeout' ? 'timed-out' : 'non-blocking-error';
226
+ if (EXIT2_RULES[subject.event].noFailureNotice === true) return { ...base(subject), status };
227
+ return { ...base(subject), status, notice: { handlerId: subject.entry.id, message } };
228
+ }
229
+
230
+ /**
231
+ * A verdict that refuses the action whatever `onFailure` says: an `mcp_tool` answer the client could
232
+ * not read refuses the `PreToolUse` call it was checking (hooks.md, "How the tool's result is read").
233
+ */
234
+ export function refusedVerdict(subject: Subject, failure: Failure): HandlerVerdict {
235
+ const block = blockInfo(subject, failure, failure.text, false);
236
+ return { ...base(subject), status: 'blocked', block, ...shownWith(subject.entry.id, block) };
193
237
  }
@@ -20,4 +20,6 @@ export interface Subject {
20
20
  readonly gitBashMissing: boolean;
21
21
  /** `TaskCompleted` fired because a teammate finished its turn, not because the `TaskUpdate` tool completed a task. */
22
22
  readonly teammateStopped?: boolean;
23
+ /** The `PreToolUse` call the hook checks was made by Code Mode's code (§7.6.11.4). */
24
+ readonly fromCode?: boolean;
23
25
  }
@@ -17,7 +17,13 @@ import type { HandlerVerdict } from './types.ts';
17
17
  * (`Stop`, `SubagentStop`, `TaskCompleted`, `TeammateIdle`), where blocking would loop.
18
18
  */
19
19
 
20
- const SUSPECT_CAPTURE = 'refusing to honor the suspect capture';
20
+ /**
21
+ * 2.1.330: "a hook error that includes `stdio went quiet` and `refusing to honor the suspect
22
+ * capture`" (Agent Plugins Extended §7.4.2 item 5). Judgment (spec/judgments.md): the two joined
23
+ * by "; " after the hook's own process exited.
24
+ */
25
+ const SUSPECT_CAPTURE =
26
+ "stdio went quiet after the hook's process exited, but a background process still holds it open; refusing to honor the suspect capture";
21
27
 
22
28
  function blocksHere(subject: Subject): boolean {
23
29
  const rule = EXIT2_RULES[subject.event];
@@ -16,12 +16,7 @@ import {
16
16
  type SessionAgentChoice,
17
17
  } from '../agents/catalog/index.ts';
18
18
  import type { PermissionRule } from '../rules/index.ts';
19
- import {
20
- readSubagentStatusLine,
21
- type PluginDefaults,
22
- type SubagentLineRead,
23
- } from '../settings/general/index.ts';
24
- import { createHookPolicy, type CommandSessionFacts } from '../settings/hooks/index.ts';
19
+ import type { PluginDefaults } from '../settings/general/index.ts';
25
20
  import { extraFoldersOf, scopeRequestOf } from './scope.ts';
26
21
  import { portsOf } from './session-environment.ts';
27
22
  import { createFirstRead } from './session-first-read.ts';
@@ -56,6 +51,8 @@ export interface AgentOverrides {
56
51
  readonly flag?: unknown;
57
52
  /** Whether the run is interactive (`SessionOptions.interactive`): it decides which built-ins exist. */
58
53
  readonly interactive?: boolean;
54
+ /** Whether the run reads web pages through the built-in `web-fetch` agent (`SessionOptions.webFetchAgent`). */
55
+ readonly webFetchAgent?: boolean;
59
56
  }
60
57
 
61
58
  export interface AgentPart {
@@ -84,17 +81,10 @@ export interface AgentPart {
84
81
  overrides?: AgentOverrides,
85
82
  ): SessionAgentChoice;
86
83
  /**
87
- * The enabled plugins' default settings (plugins/components.md, "Default settings"): `agent` and
88
- * `subagentStatusLine`, which plugin each came from, and the `overrides setting` debug lines.
84
+ * The enabled plugins' default settings (spec §12.6, deprecated): `agent`, the plugin it came
85
+ * from, the `overrides setting` debug lines and the startup deprecation warnings.
89
86
  */
90
87
  pluginDefaults(): SessionPluginDefaults;
91
- /**
92
- * The `subagentStatusLine` that runs: the settings' value, else the plugin default, under the gates
93
- * of `statusLine` (`disableAllHooks`, trust, `allowManagedHooksOnly`; a plugin's value never runs
94
- * narrowed). `folderTrusted` defaults to `SessionOptions.trusted`. Running the command, its input and
95
- * the rows it rewrites are the host's.
96
- */
97
- subagentStatusLine(facts?: CommandSessionFacts): SubagentLineRead<DefaultsPlugin>;
98
88
  /** The plugin an agent of the `plugin` source belongs to. */
99
89
  pluginOf(agent: CatalogAgent): ActivePlugin | undefined;
100
90
  }
@@ -137,21 +127,27 @@ const NO_FLAG: ReturnType<typeof readFlagAgents> = { agents: [], issues: [] };
137
127
  const readFlag = (flag: unknown): ReturnType<typeof readFlagAgents> =>
138
128
  flag === undefined ? NO_FLAG : readFlagAgents(flag);
139
129
 
140
- /** The environment switches of "Built-in subagents". */
130
+ /** The environment switches of "Built-in subagents", and whether `web-fetch` reads web pages (§5.12.4). */
141
131
  function builtinPolicyOf(
142
132
  state: HostState,
143
133
  options: SessionOptions,
144
- interactive: boolean,
134
+ run: { readonly interactive: boolean; readonly webFetch: boolean },
145
135
  ): BuiltinPolicy {
146
136
  const { environment } = portsOf(state, options);
147
137
  return {
148
- interactive,
138
+ ...run,
149
139
  // On/off variables: any on spelling (env-vars.md, "Variables"; spec J3.16).
150
140
  disableExplorePlan: isTruthyEnv(environment.get('CLAUDE_CODE_DISABLE_EXPLORE_PLAN_AGENTS')),
151
141
  disableAll: isTruthyEnv(environment.get('CLAUDE_AGENT_SDK_DISABLE_BUILTIN_AGENTS')),
152
142
  };
153
143
  }
154
144
 
145
+ /** Which built-ins this run has: interactive or not, and whether `web-fetch` reads web pages. */
146
+ const runOf = (options: SessionOptions, overrides: AgentOverrides | undefined) => ({
147
+ interactive: overrides?.interactive ?? options.interactive ?? true,
148
+ webFetch: overrides?.webFetchAgent ?? options.webFetchAgent ?? false,
149
+ });
150
+
155
151
  function pluginAgents(state: HostState) {
156
152
  const owners = new Map<CatalogAgent, ActivePlugin>();
157
153
  const agents = state.active.flatMap((plugin) =>
@@ -203,11 +199,10 @@ export function createAgentPart(
203
199
  };
204
200
 
205
201
  const catalog = (overrides?: AgentOverrides): AgentCatalog => {
206
- const interactive = overrides?.interactive ?? options.interactive ?? true;
207
202
  const denied = overrides?.permissionRules ?? options.permissionRules;
208
203
  const resolved = resolveAgents({
209
204
  builtin: policyOf().loads('agents', 'builtIn')
210
- ? builtinAgents(builtinPolicyOf(stateOf(), options, interactive))
205
+ ? builtinAgents(builtinPolicyOf(stateOf(), options, runOf(options, overrides)))
211
206
  : [],
212
207
  flag: flagOf(overrides).agents.map((record) => catalogAgentOf(record)),
213
208
  scanned: scanned.filter((entry) => policyOf().loads('agents', entry.origin)),
@@ -230,12 +225,6 @@ export function createAgentPart(
230
225
  setting: agentSettingOf(stateOf()),
231
226
  }),
232
227
  pluginDefaults: () => sessionPluginDefaults(stateOf()),
233
- subagentStatusLine: (facts) => {
234
- const state = stateOf();
235
- const context = { ...state.parent, folderTrusted: options.trusted ?? true, ...facts };
236
- const policy = createHookPolicy(state.view, context);
237
- return readSubagentStatusLine(state.view, policy, sessionPluginDefaults(state));
238
- },
239
228
  pluginOf: (agent) => pluginsOf().owners.get(agent),
240
229
  };
241
230
  }
@@ -0,0 +1,38 @@
1
+ import type { FolderScan } from '../ports/folder-scan.ts';
2
+ import { looksLikeBareRepository } from '../skills/index.ts';
3
+ import type { ExpandOptions } from './session-skill-expand.ts';
4
+
5
+ /**
6
+ * Whether the closest repository at or above `cwd` looks bare (Agent Plugins Extended §4.8.5 item
7
+ * 3, "Bare repository folders"): the folders of the host's repository chain, nearest first, until
8
+ * one holds `.git` (a working tree: the closest repository, not bare) or looks bare itself (`HEAD`
9
+ * beside `refs` or `commondir`). Read one after another, as the first answer ends the walk.
10
+ */
11
+ async function looksBareAt(
12
+ folders: FolderScan,
13
+ cwd: string,
14
+ signal: AbortSignal,
15
+ ): Promise<boolean> {
16
+ const { directories } = await folders.repository(cwd, signal);
17
+ for (const directory of directories) {
18
+ // Sequential on purpose: the nearest folder that answers decides, the rest are not read.
19
+ const entries = (await (await folders.open(directory, signal))?.files.list('.', signal)) ?? [];
20
+ if (entries.some((entry) => entry.name === '.git')) return false;
21
+ if (looksLikeBareRepository(entries)) return true;
22
+ }
23
+ return false;
24
+ }
25
+
26
+ /**
27
+ * `bareRepository` for an expansion: the host's answer when it gave one, else read through the
28
+ * folder-scan port. Only a body with a `!` can hold an injected command, so no other body reads a
29
+ * folder; without the port nothing is read and the rule does not apply.
30
+ */
31
+ export async function bareRepositoryFor(
32
+ request: Pick<ExpandOptions, 'bareRepository' | 'signal'>,
33
+ where: { readonly folders: FolderScan | undefined; readonly cwd: string; readonly body: string },
34
+ ): Promise<boolean | undefined> {
35
+ if (request.bareRepository !== undefined) return request.bareRepository;
36
+ if (where.folders === undefined || !where.body.includes('!')) return undefined;
37
+ return looksBareAt(where.folders, where.cwd, request.signal);
38
+ }
@@ -59,7 +59,8 @@ function built(core: SessionCore, options: SessionOptions, stopCap = core.stopCa
59
59
  }),
60
60
  userConfigOf: (id) =>
61
61
  state.active.find((plugin) => plugin.id === id)?.userConfig ?? { declared: {}, values: {} },
62
- httpPolicy: gates.httpPolicy,
62
+ // §7.3.4 item 3 (J12.18): the lists of managed settings cover the hooks of managed settings.
63
+ httpPolicy: { ...gates.httpPolicy, managed: gates.managedHttpPolicy },
63
64
  });
64
65
  }
65
66