@zhin.js/agent 1.1.22 → 1.1.26

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 (1246) hide show
  1. package/README.md +54 -25
  2. package/lib/activity-feedback/adapter-integration.d.ts +1 -1
  3. package/lib/activity-feedback/adapter-integration.d.ts.map +1 -1
  4. package/lib/activity-feedback/index.d.ts +0 -1
  5. package/lib/activity-feedback/index.d.ts.map +1 -1
  6. package/lib/activity-feedback/index.js +0 -1
  7. package/lib/activity-feedback/index.js.map +1 -1
  8. package/lib/activity-feedback/subagent-prefix.d.ts +1 -1
  9. package/lib/activity-feedback/subagent-prefix.js +1 -1
  10. package/lib/ai-event-bus.d.ts +6 -10
  11. package/lib/ai-event-bus.d.ts.map +1 -1
  12. package/lib/ai-event-bus.js +0 -13
  13. package/lib/ai-event-bus.js.map +1 -1
  14. package/lib/ai-event-contract.d.ts +43 -0
  15. package/lib/ai-event-contract.d.ts.map +1 -0
  16. package/lib/ai-event-contract.js +2 -0
  17. package/lib/ai-event-contract.js.map +1 -0
  18. package/lib/ai-event-subscriber.d.ts +3 -5
  19. package/lib/ai-event-subscriber.d.ts.map +1 -1
  20. package/lib/ai-event-subscriber.js +0 -19
  21. package/lib/ai-event-subscriber.js.map +1 -1
  22. package/lib/ai-hook-runtime-bus.d.ts +3 -4
  23. package/lib/ai-hook-runtime-bus.d.ts.map +1 -1
  24. package/lib/ai-hook-runtime-bus.js +2 -3
  25. package/lib/ai-hook-runtime-bus.js.map +1 -1
  26. package/lib/assistant/deliver-schedule-to-adapter.d.ts +2 -4
  27. package/lib/assistant/deliver-schedule-to-adapter.d.ts.map +1 -1
  28. package/lib/assistant/deliver-schedule-to-adapter.js +1 -8
  29. package/lib/assistant/deliver-schedule-to-adapter.js.map +1 -1
  30. package/lib/assistant/domains/ha-home-backend.d.ts.map +1 -1
  31. package/lib/assistant/domains/ha-home-backend.js +1 -2
  32. package/lib/assistant/domains/ha-home-backend.js.map +1 -1
  33. package/lib/assistant/domains/ha-ws-transport.d.ts.map +1 -1
  34. package/lib/assistant/domains/ha-ws-transport.js +1 -2
  35. package/lib/assistant/domains/ha-ws-transport.js.map +1 -1
  36. package/lib/assistant/domains/home-state-watch.d.ts.map +1 -1
  37. package/lib/assistant/domains/home-state-watch.js +1 -2
  38. package/lib/assistant/domains/home-state-watch.js.map +1 -1
  39. package/lib/assistant/event-ingress.d.ts.map +1 -1
  40. package/lib/assistant/event-ingress.js +1 -2
  41. package/lib/assistant/event-ingress.js.map +1 -1
  42. package/lib/assistant/home-policy.d.ts +1 -1
  43. package/lib/assistant/home-policy.d.ts.map +1 -1
  44. package/lib/assistant/home-tools.d.ts.map +1 -1
  45. package/lib/assistant/home-tools.js.map +1 -1
  46. package/lib/assistant/index.d.ts +2 -2
  47. package/lib/assistant/index.d.ts.map +1 -1
  48. package/lib/assistant/index.js +2 -2
  49. package/lib/assistant/index.js.map +1 -1
  50. package/lib/assistant/job-engine.d.ts +3 -2
  51. package/lib/assistant/job-engine.d.ts.map +1 -1
  52. package/lib/assistant/job-engine.js +6 -4
  53. package/lib/assistant/job-engine.js.map +1 -1
  54. package/lib/assistant/job-scheduler.d.ts +2 -2
  55. package/lib/assistant/job-scheduler.d.ts.map +1 -1
  56. package/lib/assistant/job-scheduler.js +2 -11
  57. package/lib/assistant/job-scheduler.js.map +1 -1
  58. package/lib/assistant/job-worker.js +1 -1
  59. package/lib/assistant/job-worker.js.map +1 -1
  60. package/lib/assistant/notification-router.d.ts.map +1 -1
  61. package/lib/assistant/notification-router.js +2 -2
  62. package/lib/assistant/notification-router.js.map +1 -1
  63. package/lib/assistant/profile-loader.d.ts +0 -4
  64. package/lib/assistant/profile-loader.d.ts.map +1 -1
  65. package/lib/assistant/profile-loader.js +0 -4
  66. package/lib/assistant/profile-loader.js.map +1 -1
  67. package/lib/assistant/schedule-skills.d.ts.map +1 -1
  68. package/lib/assistant/schedule-skills.js +5 -7
  69. package/lib/assistant/schedule-skills.js.map +1 -1
  70. package/lib/authoring/bridge.d.ts +2 -16
  71. package/lib/authoring/bridge.d.ts.map +1 -1
  72. package/lib/authoring/bridge.js +1 -74
  73. package/lib/authoring/bridge.js.map +1 -1
  74. package/lib/authoring/disable-tool.d.ts +2 -2
  75. package/lib/authoring/disable-tool.d.ts.map +1 -1
  76. package/lib/authoring/disable-tool.js +2 -2
  77. package/lib/authoring/disable-tool.js.map +1 -1
  78. package/lib/authoring/index.d.ts +1 -11
  79. package/lib/authoring/index.d.ts.map +1 -1
  80. package/lib/authoring/index.js +1 -6
  81. package/lib/authoring/index.js.map +1 -1
  82. package/lib/authoring/types.d.ts +3 -116
  83. package/lib/authoring/types.d.ts.map +1 -1
  84. package/lib/authoring/types.js.map +1 -1
  85. package/lib/bootstrap.d.ts +3 -8
  86. package/lib/bootstrap.d.ts.map +1 -1
  87. package/lib/bootstrap.js +9 -29
  88. package/lib/bootstrap.js.map +1 -1
  89. package/lib/builtins/builtin-tool-service.d.ts +2 -1
  90. package/lib/builtins/builtin-tool-service.d.ts.map +1 -1
  91. package/lib/builtins/builtin-tool-service.js +16 -5
  92. package/lib/builtins/builtin-tool-service.js.map +1 -1
  93. package/lib/config/fix-ai-config.d.ts.map +1 -1
  94. package/lib/config/fix-ai-config.js +0 -57
  95. package/lib/config/fix-ai-config.js.map +1 -1
  96. package/lib/config/index.d.ts +2 -1
  97. package/lib/config/index.d.ts.map +1 -1
  98. package/lib/config/index.js +2 -1
  99. package/lib/config/index.js.map +1 -1
  100. package/lib/config/provider-instance.d.ts +3 -3
  101. package/lib/config/provider-instance.d.ts.map +1 -1
  102. package/lib/config/provider-instance.js.map +1 -1
  103. package/lib/config/resolve-five-agent-binding.d.ts +1 -1
  104. package/lib/config/resolve-five-agent-binding.d.ts.map +1 -1
  105. package/lib/config/validate-ai-config.d.ts +0 -1
  106. package/lib/config/validate-ai-config.d.ts.map +1 -1
  107. package/lib/config/validate-ai-config.js +0 -229
  108. package/lib/config/validate-ai-config.js.map +1 -1
  109. package/lib/config/zhin-agent-config.d.ts +1 -1
  110. package/lib/config/zhin-agent-config.d.ts.map +1 -1
  111. package/lib/config/zhin-agent-defaults.js +4 -4
  112. package/lib/config/zhin-agent-dependencies.d.ts +5 -5
  113. package/lib/config/zhin-agent-dependencies.d.ts.map +1 -1
  114. package/lib/context/agents-instruction.d.ts +0 -1
  115. package/lib/context/agents-instruction.d.ts.map +1 -1
  116. package/lib/context/agents-instruction.js +1 -14
  117. package/lib/context/agents-instruction.js.map +1 -1
  118. package/lib/context/context-system.d.ts.map +1 -1
  119. package/lib/context/context-system.js +2 -2
  120. package/lib/context/context-system.js.map +1 -1
  121. package/lib/context/index.d.ts +1 -1
  122. package/lib/context/index.d.ts.map +1 -1
  123. package/lib/context/index.js +1 -1
  124. package/lib/context/index.js.map +1 -1
  125. package/lib/context/turn-user-message.d.ts.map +1 -1
  126. package/lib/context/turn-user-message.js +1 -2
  127. package/lib/context/turn-user-message.js.map +1 -1
  128. package/lib/core/agent-core-run.d.ts.map +1 -1
  129. package/lib/core/agent-core-run.js +17 -16
  130. package/lib/core/agent-core-run.js.map +1 -1
  131. package/lib/core/agent-loop-standalone.d.ts +2 -1
  132. package/lib/core/agent-loop-standalone.d.ts.map +1 -1
  133. package/lib/core/agent-loop-standalone.js +19 -18
  134. package/lib/core/agent-loop-standalone.js.map +1 -1
  135. package/lib/core/tool-calls-user-format.d.ts.map +1 -1
  136. package/lib/core/tool-calls-user-format.js +2 -76
  137. package/lib/core/tool-calls-user-format.js.map +1 -1
  138. package/lib/create-agent-session.d.ts +1 -1
  139. package/lib/create-agent-session.d.ts.map +1 -1
  140. package/lib/create-agent-session.js +2 -2
  141. package/lib/create-agent-session.js.map +1 -1
  142. package/lib/data-governance/disclosure-authority.d.ts +38 -0
  143. package/lib/data-governance/disclosure-authority.d.ts.map +1 -0
  144. package/lib/data-governance/disclosure-authority.js +2 -0
  145. package/lib/data-governance/disclosure-authority.js.map +1 -0
  146. package/lib/data-governance/governance-authority-repository.d.ts +3 -0
  147. package/lib/data-governance/governance-authority-repository.d.ts.map +1 -1
  148. package/lib/data-governance/governance-authority-repository.js +10 -1
  149. package/lib/data-governance/governance-authority-repository.js.map +1 -1
  150. package/lib/deferred-worker-runner.d.ts +2 -1
  151. package/lib/deferred-worker-runner.d.ts.map +1 -1
  152. package/lib/deferred-worker-runner.js +6 -4
  153. package/lib/deferred-worker-runner.js.map +1 -1
  154. package/lib/discovery/agent-surface-info.d.ts +5 -9
  155. package/lib/discovery/agent-surface-info.d.ts.map +1 -1
  156. package/lib/discovery/agent-surface-info.js +81 -45
  157. package/lib/discovery/agent-surface-info.js.map +1 -1
  158. package/lib/discovery/agent-surface.d.ts +2 -22
  159. package/lib/discovery/agent-surface.d.ts.map +1 -1
  160. package/lib/discovery/agent-surface.js +72 -287
  161. package/lib/discovery/agent-surface.js.map +1 -1
  162. package/lib/discovery/agents.d.ts +10 -12
  163. package/lib/discovery/agents.d.ts.map +1 -1
  164. package/lib/discovery/agents.js +91 -90
  165. package/lib/discovery/agents.js.map +1 -1
  166. package/lib/discovery/utils.d.ts +2 -15
  167. package/lib/discovery/utils.d.ts.map +1 -1
  168. package/lib/discovery/utils.js +2 -76
  169. package/lib/discovery/utils.js.map +1 -1
  170. package/lib/event/agent-stream-hooks.d.ts +0 -2
  171. package/lib/event/agent-stream-hooks.d.ts.map +1 -1
  172. package/lib/event/agent-stream-hooks.js +0 -8
  173. package/lib/event/agent-stream-hooks.js.map +1 -1
  174. package/lib/event/ai-event-bus.d.ts +13 -0
  175. package/lib/event/ai-event-bus.d.ts.map +1 -0
  176. package/lib/event/ai-event-bus.js +45 -0
  177. package/lib/event/ai-event-bus.js.map +1 -0
  178. package/lib/event/event-emitter.d.ts +8 -14
  179. package/lib/event/event-emitter.d.ts.map +1 -1
  180. package/lib/event/event-emitter.js +7 -37
  181. package/lib/event/event-emitter.js.map +1 -1
  182. package/lib/index.d.ts +42 -74
  183. package/lib/index.d.ts.map +1 -1
  184. package/lib/index.js +29 -58
  185. package/lib/index.js.map +1 -1
  186. package/lib/init/activate-ai-database-storage.d.ts +1 -1
  187. package/lib/init/activate-ai-database-storage.d.ts.map +1 -1
  188. package/lib/init/activate-ai-database-storage.js +28 -32
  189. package/lib/init/activate-ai-database-storage.js.map +1 -1
  190. package/lib/init/compose-zhin-agent-runtime.d.ts +2 -0
  191. package/lib/init/compose-zhin-agent-runtime.d.ts.map +1 -1
  192. package/lib/init/compose-zhin-agent-runtime.js +1 -0
  193. package/lib/init/compose-zhin-agent-runtime.js.map +1 -1
  194. package/lib/init/configure-zhin-agent.d.ts +3 -4
  195. package/lib/init/configure-zhin-agent.d.ts.map +1 -1
  196. package/lib/init/configure-zhin-agent.js +9 -7
  197. package/lib/init/configure-zhin-agent.js.map +1 -1
  198. package/lib/init/define-ai-database-models.js +1 -1
  199. package/lib/init/dispose-zhin-agent.d.ts +1 -1
  200. package/lib/init/dispose-zhin-agent.d.ts.map +1 -1
  201. package/lib/init/dispose-zhin-agent.js +0 -1
  202. package/lib/init/dispose-zhin-agent.js.map +1 -1
  203. package/lib/init/runtime-management-commands.d.ts +1 -2
  204. package/lib/init/runtime-management-commands.d.ts.map +1 -1
  205. package/lib/init/runtime-management-commands.js.map +1 -1
  206. package/lib/internal/agent-host.d.ts +10 -5
  207. package/lib/internal/agent-host.d.ts.map +1 -1
  208. package/lib/internal/host-types.d.ts +5 -7
  209. package/lib/internal/host-types.d.ts.map +1 -1
  210. package/lib/mcp-client/bridge.d.ts +1 -2
  211. package/lib/mcp-client/bridge.d.ts.map +1 -1
  212. package/lib/mcp-client/bridge.js +1 -2
  213. package/lib/mcp-client/bridge.js.map +1 -1
  214. package/lib/media/media-publisher.d.ts +1 -1
  215. package/lib/media/media-publisher.d.ts.map +1 -1
  216. package/lib/media/media-router.d.ts +4 -7
  217. package/lib/media/media-router.d.ts.map +1 -1
  218. package/lib/media/media-router.js +10 -26
  219. package/lib/media/media-router.js.map +1 -1
  220. package/lib/media/media-types.d.ts +4 -0
  221. package/lib/media/media-types.d.ts.map +1 -1
  222. package/lib/media/media-types.js.map +1 -1
  223. package/lib/media/resolve-config.d.ts +0 -1
  224. package/lib/media/resolve-config.d.ts.map +1 -1
  225. package/lib/media/resolve-config.js +0 -3
  226. package/lib/media/resolve-config.js.map +1 -1
  227. package/lib/media/subagent-inbound.d.ts +3 -2
  228. package/lib/media/subagent-inbound.d.ts.map +1 -1
  229. package/lib/media/subagent-inbound.js +5 -8
  230. package/lib/media/subagent-inbound.js.map +1 -1
  231. package/lib/memory/ai-compaction-strategy.d.ts +3 -2
  232. package/lib/memory/ai-compaction-strategy.d.ts.map +1 -1
  233. package/lib/memory/ai-compaction-strategy.js +4 -1
  234. package/lib/memory/ai-compaction-strategy.js.map +1 -1
  235. package/lib/memory/compaction-runtime.d.ts +23 -14
  236. package/lib/memory/compaction-runtime.d.ts.map +1 -1
  237. package/lib/memory/compaction-runtime.js +92 -76
  238. package/lib/memory/compaction-runtime.js.map +1 -1
  239. package/lib/memory/context-repository-store.js +1 -1
  240. package/lib/memory/context-repository-store.js.map +1 -1
  241. package/lib/memory/index.d.ts +2 -2
  242. package/lib/memory/index.d.ts.map +1 -1
  243. package/lib/memory/index.js +1 -1
  244. package/lib/memory/index.js.map +1 -1
  245. package/lib/memory/memory-system.d.ts.map +1 -1
  246. package/lib/memory/memory-system.js +5 -6
  247. package/lib/memory/memory-system.js.map +1 -1
  248. package/lib/memory-layers.d.ts +2 -6
  249. package/lib/memory-layers.d.ts.map +1 -1
  250. package/lib/memory-layers.js +23 -75
  251. package/lib/memory-layers.js.map +1 -1
  252. package/lib/orchestration/five-agent/index.d.ts.map +1 -0
  253. package/lib/orchestration/five-agent/index.js.map +1 -0
  254. package/lib/orchestration/five-agent/prompts.d.ts.map +1 -0
  255. package/lib/orchestration/five-agent/prompts.js.map +1 -0
  256. package/lib/orchestration/five-agent/role-capability-policy.d.ts.map +1 -0
  257. package/lib/orchestration/five-agent/role-capability-policy.js.map +1 -0
  258. package/lib/orchestration/five-agent/roles.d.ts.map +1 -0
  259. package/lib/orchestration/five-agent/roles.js.map +1 -0
  260. package/lib/plugin-ai-hook-bus.d.ts +3 -7
  261. package/lib/plugin-ai-hook-bus.d.ts.map +1 -1
  262. package/lib/plugin-ai-hook-bus.js +1 -7
  263. package/lib/plugin-ai-hook-bus.js.map +1 -1
  264. package/lib/plugin-runtime/agent-event-bus.d.ts +4 -0
  265. package/lib/plugin-runtime/agent-event-bus.d.ts.map +1 -0
  266. package/lib/plugin-runtime/agent-event-bus.js +4 -0
  267. package/lib/plugin-runtime/agent-event-bus.js.map +1 -0
  268. package/lib/plugin-runtime/agent-host-port.d.ts +0 -6
  269. package/lib/plugin-runtime/agent-host-port.d.ts.map +1 -1
  270. package/lib/plugin-runtime/agent-host-port.js.map +1 -1
  271. package/lib/plugin-runtime/agent-runtime.d.ts +1 -1
  272. package/lib/plugin-runtime/agent-runtime.d.ts.map +1 -1
  273. package/lib/plugin-runtime/agent-runtime.js +9 -4
  274. package/lib/plugin-runtime/agent-runtime.js.map +1 -1
  275. package/lib/plugin-runtime/capability-ingress.d.ts +1 -1
  276. package/lib/plugin-runtime/capability-ingress.d.ts.map +1 -1
  277. package/lib/plugin-runtime/capability-ingress.js +118 -12
  278. package/lib/plugin-runtime/capability-ingress.js.map +1 -1
  279. package/lib/plugin-runtime/capability-tools.d.ts.map +1 -1
  280. package/lib/plugin-runtime/capability-tools.js +5 -3
  281. package/lib/plugin-runtime/capability-tools.js.map +1 -1
  282. package/lib/plugin-runtime/deferred-capability-plan.d.ts.map +1 -1
  283. package/lib/plugin-runtime/deferred-capability-plan.js +50 -21
  284. package/lib/plugin-runtime/deferred-capability-plan.js.map +1 -1
  285. package/lib/plugin-runtime/file-edit-quote-utils.d.ts.map +1 -0
  286. package/lib/plugin-runtime/file-edit-quote-utils.js.map +1 -0
  287. package/lib/plugin-runtime/full-agent-turn-engine.d.ts.map +1 -1
  288. package/lib/plugin-runtime/full-agent-turn-engine.js +10 -10
  289. package/lib/plugin-runtime/full-agent-turn-engine.js.map +1 -1
  290. package/lib/plugin-runtime/github-actions-delivery-provider.d.ts +44 -0
  291. package/lib/plugin-runtime/github-actions-delivery-provider.d.ts.map +1 -0
  292. package/lib/plugin-runtime/github-actions-delivery-provider.js +246 -0
  293. package/lib/plugin-runtime/github-actions-delivery-provider.js.map +1 -0
  294. package/lib/plugin-runtime/github-exact-merge-gateway.d.ts +62 -0
  295. package/lib/plugin-runtime/github-exact-merge-gateway.d.ts.map +1 -0
  296. package/lib/plugin-runtime/github-exact-merge-gateway.js +79 -0
  297. package/lib/plugin-runtime/github-exact-merge-gateway.js.map +1 -0
  298. package/lib/plugin-runtime/github-workroom-capability.d.ts +15 -0
  299. package/lib/plugin-runtime/github-workroom-capability.d.ts.map +1 -0
  300. package/lib/plugin-runtime/github-workroom-capability.js +79 -0
  301. package/lib/plugin-runtime/github-workroom-capability.js.map +1 -0
  302. package/lib/plugin-runtime/host-tool-projection.d.ts +1 -1
  303. package/lib/plugin-runtime/host-tool-projection.d.ts.map +1 -1
  304. package/lib/plugin-runtime/host-tool-projection.js +5 -3
  305. package/lib/plugin-runtime/host-tool-projection.js.map +1 -1
  306. package/lib/plugin-runtime/index.d.ts +29 -1
  307. package/lib/plugin-runtime/index.d.ts.map +1 -1
  308. package/lib/plugin-runtime/index.js +26 -1
  309. package/lib/plugin-runtime/index.js.map +1 -1
  310. package/lib/plugin-runtime/native-bash-tool.d.ts +35 -0
  311. package/lib/plugin-runtime/native-bash-tool.d.ts.map +1 -0
  312. package/lib/plugin-runtime/native-bash-tool.js +110 -0
  313. package/lib/plugin-runtime/native-bash-tool.js.map +1 -0
  314. package/lib/plugin-runtime/native-file-tools.d.ts.map +1 -1
  315. package/lib/plugin-runtime/native-file-tools.js +10 -9
  316. package/lib/plugin-runtime/native-file-tools.js.map +1 -1
  317. package/lib/plugin-runtime/native-image-tool.d.ts +12 -0
  318. package/lib/plugin-runtime/native-image-tool.d.ts.map +1 -0
  319. package/lib/plugin-runtime/native-image-tool.js +73 -0
  320. package/lib/plugin-runtime/native-image-tool.js.map +1 -0
  321. package/lib/plugin-runtime/native-interaction-tools.js +1 -1
  322. package/lib/plugin-runtime/native-interaction-tools.js.map +1 -1
  323. package/lib/plugin-runtime/native-knowledge-tool.d.ts +34 -0
  324. package/lib/plugin-runtime/native-knowledge-tool.d.ts.map +1 -0
  325. package/lib/plugin-runtime/native-knowledge-tool.js +170 -0
  326. package/lib/plugin-runtime/native-knowledge-tool.js.map +1 -0
  327. package/lib/plugin-runtime/native-semantic-memory-tools.js +2 -2
  328. package/lib/plugin-runtime/native-semantic-memory-tools.js.map +1 -1
  329. package/lib/plugin-runtime/native-todo-tools.js +2 -2
  330. package/lib/plugin-runtime/native-todo-tools.js.map +1 -1
  331. package/lib/plugin-runtime/native-tool-suite.d.ts +15 -0
  332. package/lib/plugin-runtime/native-tool-suite.d.ts.map +1 -0
  333. package/lib/plugin-runtime/native-tool-suite.js +18 -0
  334. package/lib/plugin-runtime/native-tool-suite.js.map +1 -0
  335. package/lib/plugin-runtime/native-web-tools.d.ts.map +1 -1
  336. package/lib/plugin-runtime/native-web-tools.js +6 -19
  337. package/lib/plugin-runtime/native-web-tools.js.map +1 -1
  338. package/lib/plugin-runtime/schedule-capability-plan.js +6 -1
  339. package/lib/plugin-runtime/schedule-capability-plan.js.map +1 -1
  340. package/lib/plugin-runtime/self-delivery-project-composition.d.ts +25 -0
  341. package/lib/plugin-runtime/self-delivery-project-composition.d.ts.map +1 -0
  342. package/lib/plugin-runtime/self-delivery-project-composition.js +85 -0
  343. package/lib/plugin-runtime/self-delivery-project-composition.js.map +1 -0
  344. package/lib/plugin-runtime/self-delivery-project.d.ts +65 -0
  345. package/lib/plugin-runtime/self-delivery-project.d.ts.map +1 -0
  346. package/lib/plugin-runtime/self-delivery-project.js +140 -0
  347. package/lib/plugin-runtime/self-delivery-project.js.map +1 -0
  348. package/lib/plugin-runtime/workroom-acceptance-internal-providers.d.ts.map +1 -1
  349. package/lib/plugin-runtime/workroom-acceptance-internal-providers.js +7 -2
  350. package/lib/plugin-runtime/workroom-acceptance-internal-providers.js.map +1 -1
  351. package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts +2 -0
  352. package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts.map +1 -1
  353. package/lib/plugin-runtime/workroom-acceptance-production-composition.js +1 -0
  354. package/lib/plugin-runtime/workroom-acceptance-production-composition.js.map +1 -1
  355. package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts +3 -0
  356. package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts.map +1 -1
  357. package/lib/plugin-runtime/workroom-acceptance-provider-composition.js +43 -6
  358. package/lib/plugin-runtime/workroom-acceptance-provider-composition.js.map +1 -1
  359. package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts +1 -1
  360. package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts.map +1 -1
  361. package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts +3 -77
  362. package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts.map +1 -1
  363. package/lib/plugin-runtime/workroom-assignment-authority-provider.js +12 -112
  364. package/lib/plugin-runtime/workroom-assignment-authority-provider.js.map +1 -1
  365. package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts +1 -1
  366. package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts.map +1 -1
  367. package/lib/plugin-runtime/workroom-data-governance-authority-writer.d.ts +2 -0
  368. package/lib/plugin-runtime/workroom-data-governance-authority-writer.d.ts.map +1 -1
  369. package/lib/plugin-runtime/workroom-data-governance-authority-writer.js +24 -0
  370. package/lib/plugin-runtime/workroom-data-governance-authority-writer.js.map +1 -1
  371. package/lib/plugin-runtime/workroom-data-governance-bootstrap.d.ts.map +1 -1
  372. package/lib/plugin-runtime/workroom-data-governance-bootstrap.js +19 -0
  373. package/lib/plugin-runtime/workroom-data-governance-bootstrap.js.map +1 -1
  374. package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts +4 -38
  375. package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts.map +1 -1
  376. package/lib/plugin-runtime/workroom-data-governance-runtime.js +145 -42
  377. package/lib/plugin-runtime/workroom-data-governance-runtime.js.map +1 -1
  378. package/lib/plugin-runtime/workroom-data-governance-storage.d.ts.map +1 -1
  379. package/lib/plugin-runtime/workroom-data-governance-storage.js +1 -2
  380. package/lib/plugin-runtime/workroom-data-governance-storage.js.map +1 -1
  381. package/lib/plugin-runtime/workroom-delivery-gateway.d.ts +96 -0
  382. package/lib/plugin-runtime/workroom-delivery-gateway.d.ts.map +1 -0
  383. package/lib/plugin-runtime/workroom-delivery-gateway.js +129 -0
  384. package/lib/plugin-runtime/workroom-delivery-gateway.js.map +1 -0
  385. package/lib/plugin-runtime/workroom-dynamic-planning-provider.d.ts.map +1 -1
  386. package/lib/plugin-runtime/workroom-dynamic-planning-provider.js +2 -1
  387. package/lib/plugin-runtime/workroom-dynamic-planning-provider.js.map +1 -1
  388. package/lib/plugin-runtime/workroom-effect-composition.d.ts.map +1 -1
  389. package/lib/plugin-runtime/workroom-effect-composition.js +12 -1
  390. package/lib/plugin-runtime/workroom-effect-composition.js.map +1 -1
  391. package/lib/plugin-runtime/workroom-effect-production.d.ts +5 -0
  392. package/lib/plugin-runtime/workroom-effect-production.d.ts.map +1 -1
  393. package/lib/plugin-runtime/workroom-effect-production.js +22 -3
  394. package/lib/plugin-runtime/workroom-effect-production.js.map +1 -1
  395. package/lib/plugin-runtime/workroom-effect-runtime.d.ts +1 -17
  396. package/lib/plugin-runtime/workroom-effect-runtime.d.ts.map +1 -1
  397. package/lib/plugin-runtime/workroom-effect-runtime.js +77 -17
  398. package/lib/plugin-runtime/workroom-effect-runtime.js.map +1 -1
  399. package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts +8 -3
  400. package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts.map +1 -1
  401. package/lib/plugin-runtime/workroom-governed-dispatch-composition.js +21 -18
  402. package/lib/plugin-runtime/workroom-governed-dispatch-composition.js.map +1 -1
  403. package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts +1 -1
  404. package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts.map +1 -1
  405. package/lib/plugin-runtime/workroom-journal-payload-composition.js +1 -1
  406. package/lib/plugin-runtime/workroom-journal-payload-composition.js.map +1 -1
  407. package/lib/plugin-runtime/workroom-local-agent-core-adapter.js +3 -3
  408. package/lib/plugin-runtime/workroom-local-agent-core-adapter.js.map +1 -1
  409. package/lib/plugin-runtime/workroom-local-agent-loop.d.ts +2 -1
  410. package/lib/plugin-runtime/workroom-local-agent-loop.d.ts.map +1 -1
  411. package/lib/plugin-runtime/workroom-local-agent-loop.js +11 -1
  412. package/lib/plugin-runtime/workroom-local-agent-loop.js.map +1 -1
  413. package/lib/{workroom/local-assignment-executor.d.ts → plugin-runtime/workroom-local-assignment-executor.d.ts} +4 -4
  414. package/lib/plugin-runtime/workroom-local-assignment-executor.d.ts.map +1 -0
  415. package/lib/{workroom/local-assignment-executor.js → plugin-runtime/workroom-local-assignment-executor.js} +3 -3
  416. package/lib/plugin-runtime/workroom-local-assignment-executor.js.map +1 -0
  417. package/lib/plugin-runtime/workroom-local-assignment-runtime.d.ts +1 -0
  418. package/lib/plugin-runtime/workroom-local-assignment-runtime.d.ts.map +1 -1
  419. package/lib/plugin-runtime/workroom-local-assignment-runtime.js +72 -26
  420. package/lib/plugin-runtime/workroom-local-assignment-runtime.js.map +1 -1
  421. package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts +1 -1
  422. package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts.map +1 -1
  423. package/lib/plugin-runtime/workroom-portfolio-control-composition.d.ts.map +1 -1
  424. package/lib/plugin-runtime/workroom-portfolio-control-composition.js +1 -0
  425. package/lib/plugin-runtime/workroom-portfolio-control-composition.js.map +1 -1
  426. package/lib/plugin-runtime/workroom-portfolio-control-runtime.d.ts +1 -0
  427. package/lib/plugin-runtime/workroom-portfolio-control-runtime.d.ts.map +1 -1
  428. package/lib/plugin-runtime/workroom-portfolio-control-runtime.js +1 -0
  429. package/lib/plugin-runtime/workroom-portfolio-control-runtime.js.map +1 -1
  430. package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts +1 -1
  431. package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts.map +1 -1
  432. package/lib/plugin-runtime/workroom-portfolio-grant-assignment.js +6 -3
  433. package/lib/plugin-runtime/workroom-portfolio-grant-assignment.js.map +1 -1
  434. package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts +1 -1
  435. package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts.map +1 -1
  436. package/lib/plugin-runtime/workroom-portfolio-kernel-authority.js +11 -5
  437. package/lib/plugin-runtime/workroom-portfolio-kernel-authority.js.map +1 -1
  438. package/lib/plugin-runtime/workroom-preemption-runtime.d.ts +1 -1
  439. package/lib/plugin-runtime/workroom-preemption-runtime.d.ts.map +1 -1
  440. package/lib/plugin-runtime/workroom-priority-authority.d.ts +11 -3
  441. package/lib/plugin-runtime/workroom-priority-authority.d.ts.map +1 -1
  442. package/lib/plugin-runtime/workroom-priority-authority.js +51 -47
  443. package/lib/plugin-runtime/workroom-priority-authority.js.map +1 -1
  444. package/lib/plugin-runtime/workroom-profile-authority-composition.d.ts.map +1 -1
  445. package/lib/plugin-runtime/workroom-profile-authority-composition.js +2 -1
  446. package/lib/plugin-runtime/workroom-profile-authority-composition.js.map +1 -1
  447. package/lib/plugin-runtime/workroom-profile-authority-runtime.d.ts +1 -0
  448. package/lib/plugin-runtime/workroom-profile-authority-runtime.d.ts.map +1 -1
  449. package/lib/plugin-runtime/workroom-profile-authority-runtime.js +1 -0
  450. package/lib/plugin-runtime/workroom-profile-authority-runtime.js.map +1 -1
  451. package/lib/plugin-runtime/workroom-projection-outbound.d.ts +1 -1
  452. package/lib/plugin-runtime/workroom-projection-outbound.d.ts.map +1 -1
  453. package/lib/plugin-runtime/workroom-projection-runtime.d.ts +6 -4
  454. package/lib/plugin-runtime/workroom-projection-runtime.d.ts.map +1 -1
  455. package/lib/plugin-runtime/workroom-projection-runtime.js +11 -1
  456. package/lib/plugin-runtime/workroom-projection-runtime.js.map +1 -1
  457. package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts +2 -2
  458. package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts.map +1 -1
  459. package/lib/plugin-runtime/workroom-remote-executor.d.ts +1 -12
  460. package/lib/plugin-runtime/workroom-remote-executor.d.ts.map +1 -1
  461. package/lib/plugin-runtime/workroom-remote-executor.js +1 -20
  462. package/lib/plugin-runtime/workroom-remote-executor.js.map +1 -1
  463. package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts +1 -1
  464. package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts.map +1 -1
  465. package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts +8 -1
  466. package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts.map +1 -1
  467. package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.js +4 -0
  468. package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.js.map +1 -1
  469. package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts +4 -1
  470. package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts.map +1 -1
  471. package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.js +23 -6
  472. package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.js.map +1 -1
  473. package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.d.ts +5 -0
  474. package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.d.ts.map +1 -1
  475. package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.js +20 -1
  476. package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.js.map +1 -1
  477. package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts +1 -1
  478. package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts.map +1 -1
  479. package/lib/plugin-runtime/workroom-scheduler-runtime.js +6 -1
  480. package/lib/plugin-runtime/workroom-scheduler-runtime.js.map +1 -1
  481. package/lib/prompt/assembly.d.ts.map +1 -1
  482. package/lib/prompt/assembly.js +1 -2
  483. package/lib/prompt/assembly.js.map +1 -1
  484. package/lib/prompt/git-context.d.ts +0 -2
  485. package/lib/prompt/git-context.d.ts.map +1 -1
  486. package/lib/prompt/git-context.js +1 -12
  487. package/lib/prompt/git-context.js.map +1 -1
  488. package/lib/prompt/index.d.ts +1 -1
  489. package/lib/prompt/index.d.ts.map +1 -1
  490. package/lib/prompt/index.js +1 -1
  491. package/lib/prompt/index.js.map +1 -1
  492. package/lib/prompt/prompt-assembly-registry.d.ts +1 -1
  493. package/lib/prompt/prompt-assembly-registry.d.ts.map +1 -1
  494. package/lib/prompt/prompt-assembly-registry.js.map +1 -1
  495. package/lib/prompt/system-prompt.d.ts +1 -1
  496. package/lib/prompt/system-prompt.d.ts.map +1 -1
  497. package/lib/prompt/system-prompt.js +1 -2
  498. package/lib/prompt/system-prompt.js.map +1 -1
  499. package/lib/prompt/templates.d.ts +2 -5
  500. package/lib/prompt/templates.d.ts.map +1 -1
  501. package/lib/prompt/templates.js +2 -16
  502. package/lib/prompt/templates.js.map +1 -1
  503. package/lib/prompt/workspace-prompt.d.ts +0 -1
  504. package/lib/prompt/workspace-prompt.d.ts.map +1 -1
  505. package/lib/prompt/workspace-prompt.js +1 -14
  506. package/lib/prompt/workspace-prompt.js.map +1 -1
  507. package/lib/reserved-tools.d.ts.map +1 -1
  508. package/lib/reserved-tools.js +0 -3
  509. package/lib/reserved-tools.js.map +1 -1
  510. package/lib/resource-hub/hook-registry.d.ts +1 -1
  511. package/lib/resource-hub/hook-registry.d.ts.map +1 -1
  512. package/lib/resource-hub/hook-registry.js +3 -15
  513. package/lib/resource-hub/hook-registry.js.map +1 -1
  514. package/lib/resource-hub/index.d.ts +4 -16
  515. package/lib/resource-hub/index.d.ts.map +1 -1
  516. package/lib/resource-hub/index.js +3 -20
  517. package/lib/resource-hub/index.js.map +1 -1
  518. package/lib/resource-hub/mcp-registry.js +1 -1
  519. package/lib/resource-hub/mcp-registry.js.map +1 -1
  520. package/lib/resource-hub/public-api.d.ts +0 -1
  521. package/lib/resource-hub/public-api.d.ts.map +1 -1
  522. package/lib/resource-hub/resolve-subagent-tools.d.ts.map +1 -1
  523. package/lib/resource-hub/resolve-subagent-tools.js +6 -4
  524. package/lib/resource-hub/resolve-subagent-tools.js.map +1 -1
  525. package/lib/resource-hub/role-configs.js +4 -4
  526. package/lib/resource-hub/role-configs.js.map +1 -1
  527. package/lib/resource-hub/skill-registry.d.ts +1 -1
  528. package/lib/resource-hub/skill-registry.js +1 -1
  529. package/lib/resource-hub/subagent-registry.d.ts +0 -2
  530. package/lib/resource-hub/subagent-registry.d.ts.map +1 -1
  531. package/lib/resource-hub/subagent-registry.js +0 -2
  532. package/lib/resource-hub/subagent-registry.js.map +1 -1
  533. package/lib/resource-hub/tool-selection.d.ts +4 -30
  534. package/lib/resource-hub/tool-selection.d.ts.map +1 -1
  535. package/lib/resource-hub/tool-selection.js +4 -289
  536. package/lib/resource-hub/tool-selection.js.map +1 -1
  537. package/lib/resource-hub/types.d.ts +6 -1
  538. package/lib/resource-hub/types.d.ts.map +1 -1
  539. package/lib/routing/route-matcher.d.ts +1 -1
  540. package/lib/routing/route-matcher.js +1 -1
  541. package/lib/schedule-manager.d.ts.map +1 -1
  542. package/lib/schedule-manager.js.map +1 -1
  543. package/lib/seam/index.d.ts +4 -3
  544. package/lib/seam/index.d.ts.map +1 -1
  545. package/lib/seam/index.js +1 -1
  546. package/lib/seam/index.js.map +1 -1
  547. package/lib/seam/seam-integration.d.ts +26 -37
  548. package/lib/seam/seam-integration.d.ts.map +1 -1
  549. package/lib/seam/seam-integration.js +82 -52
  550. package/lib/seam/seam-integration.js.map +1 -1
  551. package/lib/seam/seam-provider.d.ts +2 -1
  552. package/lib/seam/seam-provider.d.ts.map +1 -1
  553. package/lib/seam/seam-provider.js +25 -11
  554. package/lib/seam/seam-provider.js.map +1 -1
  555. package/lib/seam/skill-service.d.ts +0 -21
  556. package/lib/seam/skill-service.d.ts.map +1 -1
  557. package/lib/seam/tokens.d.ts +3 -2
  558. package/lib/seam/tokens.d.ts.map +1 -1
  559. package/lib/seam/tokens.js +3 -1
  560. package/lib/seam/tokens.js.map +1 -1
  561. package/lib/seam/tool-service.d.ts +12 -6
  562. package/lib/seam/tool-service.d.ts.map +1 -1
  563. package/lib/security/anomaly-detection.d.ts +2 -7
  564. package/lib/security/anomaly-detection.d.ts.map +1 -1
  565. package/lib/security/anomaly-detection.js +2 -20
  566. package/lib/security/anomaly-detection.js.map +1 -1
  567. package/lib/security/audit-logger.d.ts +0 -13
  568. package/lib/security/audit-logger.d.ts.map +1 -1
  569. package/lib/security/audit-logger.js +0 -30
  570. package/lib/security/audit-logger.js.map +1 -1
  571. package/lib/security/comm-message-context.d.ts +4 -0
  572. package/lib/security/comm-message-context.d.ts.map +1 -1
  573. package/lib/security/comm-message-context.js +9 -1
  574. package/lib/security/comm-message-context.js.map +1 -1
  575. package/lib/security/dangerous-tool-policy.d.ts +3 -3
  576. package/lib/security/dangerous-tool-policy.d.ts.map +1 -1
  577. package/lib/security/dangerous-tool-policy.js +8 -28
  578. package/lib/security/dangerous-tool-policy.js.map +1 -1
  579. package/lib/security/exec-policy.d.ts +4 -4
  580. package/lib/security/exec-policy.d.ts.map +1 -1
  581. package/lib/security/exec-policy.js +21 -62
  582. package/lib/security/exec-policy.js.map +1 -1
  583. package/lib/security/file-policy.d.ts.map +1 -1
  584. package/lib/security/file-policy.js +9 -57
  585. package/lib/security/file-policy.js.map +1 -1
  586. package/lib/security/file-role-policy.d.ts +1 -5
  587. package/lib/security/file-role-policy.d.ts.map +1 -1
  588. package/lib/security/file-role-policy.js +1 -25
  589. package/lib/security/file-role-policy.js.map +1 -1
  590. package/lib/security/index.d.ts +1 -1
  591. package/lib/security/index.d.ts.map +1 -1
  592. package/lib/security/index.js +1 -1
  593. package/lib/security/index.js.map +1 -1
  594. package/lib/security/owner-approval-contracts.d.ts +6 -0
  595. package/lib/security/owner-approval-contracts.d.ts.map +1 -0
  596. package/lib/security/owner-approval-contracts.js +2 -0
  597. package/lib/security/owner-approval-contracts.js.map +1 -0
  598. package/lib/security/owner-approval-runtime.d.ts +39 -0
  599. package/lib/security/owner-approval-runtime.d.ts.map +1 -0
  600. package/lib/security/owner-approval-runtime.js +159 -0
  601. package/lib/security/owner-approval-runtime.js.map +1 -0
  602. package/lib/security/owner-approval-store.d.ts +34 -0
  603. package/lib/security/owner-approval-store.d.ts.map +1 -0
  604. package/lib/security/owner-approval-store.js +154 -0
  605. package/lib/security/owner-approval-store.js.map +1 -0
  606. package/lib/security/policy-facade.d.ts +8 -15
  607. package/lib/security/policy-facade.d.ts.map +1 -1
  608. package/lib/security/policy-facade.js +33 -38
  609. package/lib/security/policy-facade.js.map +1 -1
  610. package/lib/security/sandbox.d.ts +0 -13
  611. package/lib/security/sandbox.d.ts.map +1 -1
  612. package/lib/security/sandbox.js +0 -21
  613. package/lib/security/sandbox.js.map +1 -1
  614. package/lib/security/turn-file-authority.d.ts.map +1 -1
  615. package/lib/security/turn-file-authority.js +0 -1
  616. package/lib/security/turn-file-authority.js.map +1 -1
  617. package/lib/service.d.ts +15 -19
  618. package/lib/service.d.ts.map +1 -1
  619. package/lib/service.js +42 -39
  620. package/lib/service.js.map +1 -1
  621. package/lib/session/approval-port.d.ts +16 -0
  622. package/lib/session/approval-port.d.ts.map +1 -1
  623. package/lib/session/approval-port.js.map +1 -1
  624. package/lib/session/approval-review-agent.d.ts +29 -0
  625. package/lib/session/approval-review-agent.d.ts.map +1 -0
  626. package/lib/session/approval-review-agent.js +183 -0
  627. package/lib/session/approval-review-agent.js.map +1 -0
  628. package/lib/session/branch-summarization-runtime.d.ts.map +1 -1
  629. package/lib/session/branch-summarization-runtime.js +3 -2
  630. package/lib/session/branch-summarization-runtime.js.map +1 -1
  631. package/lib/session/index.d.ts +2 -2
  632. package/lib/session/index.d.ts.map +1 -1
  633. package/lib/session/index.js +2 -2
  634. package/lib/session/index.js.map +1 -1
  635. package/lib/session/session-io.d.ts +7 -14
  636. package/lib/session/session-io.d.ts.map +1 -1
  637. package/lib/session/session-io.js +14 -47
  638. package/lib/session/session-io.js.map +1 -1
  639. package/lib/session/turn-ingress-session.d.ts +2 -5
  640. package/lib/session/turn-ingress-session.d.ts.map +1 -1
  641. package/lib/session/turn-ingress-session.js +8 -51
  642. package/lib/session/turn-ingress-session.js.map +1 -1
  643. package/lib/skill/skill-instruction-reader-factory.d.ts +5 -0
  644. package/lib/skill/skill-instruction-reader-factory.d.ts.map +1 -0
  645. package/lib/skill/skill-instruction-reader-factory.js +13 -0
  646. package/lib/skill/skill-instruction-reader-factory.js.map +1 -0
  647. package/lib/skill/skill-instruction-reader.d.ts +22 -0
  648. package/lib/skill/skill-instruction-reader.d.ts.map +1 -0
  649. package/lib/skill/skill-instruction-reader.js +44 -0
  650. package/lib/skill/skill-instruction-reader.js.map +1 -0
  651. package/lib/skill/skill-instructions.d.ts +5 -0
  652. package/lib/skill/skill-instructions.d.ts.map +1 -0
  653. package/lib/skill/skill-instructions.js +78 -0
  654. package/lib/skill/skill-instructions.js.map +1 -0
  655. package/lib/skill/skill-registry-as-service.d.ts +5 -5
  656. package/lib/skill/skill-registry-as-service.d.ts.map +1 -1
  657. package/lib/skill/skill-registry-as-service.js +21 -16
  658. package/lib/skill/skill-registry-as-service.js.map +1 -1
  659. package/lib/skill/skill-system.js +3 -3
  660. package/lib/skill/skill-system.js.map +1 -1
  661. package/lib/{builtin → spawn}/spawn-task-tool.d.ts +5 -6
  662. package/lib/spawn/spawn-task-tool.d.ts.map +1 -0
  663. package/lib/{builtin → spawn}/spawn-task-tool.js +17 -15
  664. package/lib/spawn/spawn-task-tool.js.map +1 -0
  665. package/lib/stability/memory-pressure.d.ts +5 -4
  666. package/lib/stability/memory-pressure.d.ts.map +1 -1
  667. package/lib/stability/memory-pressure.js +14 -23
  668. package/lib/stability/memory-pressure.js.map +1 -1
  669. package/lib/standalone/standalone-tool-catalog.d.ts +13 -0
  670. package/lib/standalone/standalone-tool-catalog.d.ts.map +1 -0
  671. package/lib/standalone/standalone-tool-catalog.js +46 -0
  672. package/lib/standalone/standalone-tool-catalog.js.map +1 -0
  673. package/lib/subagent/subagent-runtime.d.ts +7 -5
  674. package/lib/subagent/subagent-runtime.d.ts.map +1 -1
  675. package/lib/subagent/subagent-runtime.js +13 -16
  676. package/lib/subagent/subagent-runtime.js.map +1 -1
  677. package/lib/subagent/subagent-system-init.d.ts +2 -1
  678. package/lib/subagent/subagent-system-init.d.ts.map +1 -1
  679. package/lib/subagent/subagent-system-init.js +1 -0
  680. package/lib/subagent/subagent-system-init.js.map +1 -1
  681. package/lib/subagent-ai-events.d.ts +3 -2
  682. package/lib/subagent-ai-events.d.ts.map +1 -1
  683. package/lib/subagent-ai-events.js.map +1 -1
  684. package/lib/subagent-parent-context.js +1 -1
  685. package/lib/subagent-parent-context.js.map +1 -1
  686. package/lib/subagent-prompt.d.ts +1 -1
  687. package/lib/subagent-prompt.js +2 -5
  688. package/lib/subagent-prompt.js.map +1 -1
  689. package/lib/task-executor.d.ts +2 -14
  690. package/lib/task-executor.d.ts.map +1 -1
  691. package/lib/task-executor.js +2 -11
  692. package/lib/task-executor.js.map +1 -1
  693. package/lib/tool/builtin-policy-extractors.d.ts +2 -1
  694. package/lib/tool/builtin-policy-extractors.d.ts.map +1 -1
  695. package/lib/tool/builtin-policy-extractors.js +18 -15
  696. package/lib/tool/builtin-policy-extractors.js.map +1 -1
  697. package/lib/tool/context-tools.js +1 -1
  698. package/lib/tool/context-tools.js.map +1 -1
  699. package/lib/tool/conversation-reference-tool.d.ts.map +1 -1
  700. package/lib/tool/conversation-reference-tool.js +1 -1
  701. package/lib/tool/conversation-reference-tool.js.map +1 -1
  702. package/lib/tool/deferred-resolution.js +2 -2
  703. package/lib/tool/deferred-resolution.js.map +1 -1
  704. package/lib/tool/executable-tool-registry.d.ts +11 -0
  705. package/lib/tool/executable-tool-registry.d.ts.map +1 -0
  706. package/lib/tool/executable-tool-registry.js +25 -0
  707. package/lib/tool/executable-tool-registry.js.map +1 -0
  708. package/lib/tool/index.d.ts +1 -1
  709. package/lib/tool/index.d.ts.map +1 -1
  710. package/lib/tool/index.js +1 -1
  711. package/lib/tool/index.js.map +1 -1
  712. package/lib/tool/prepare-turn-tools.d.ts.map +1 -1
  713. package/lib/tool/prepare-turn-tools.js +1 -2
  714. package/lib/tool/prepare-turn-tools.js.map +1 -1
  715. package/lib/tool/sources.d.ts.map +1 -1
  716. package/lib/tool/sources.js +5 -4
  717. package/lib/tool/sources.js.map +1 -1
  718. package/lib/tool/tool-approval-gate.d.ts +1 -2
  719. package/lib/tool/tool-approval-gate.d.ts.map +1 -1
  720. package/lib/tool/tool-approval-gate.js +24 -0
  721. package/lib/tool/tool-approval-gate.js.map +1 -1
  722. package/lib/tool/tool-execution-authority.d.ts +26 -0
  723. package/lib/tool/tool-execution-authority.d.ts.map +1 -0
  724. package/lib/tool/tool-execution-authority.js +84 -0
  725. package/lib/tool/tool-execution-authority.js.map +1 -0
  726. package/lib/tool/tool-runtime.d.ts +10 -9
  727. package/lib/tool/tool-runtime.d.ts.map +1 -1
  728. package/lib/tool/tool-runtime.js +77 -79
  729. package/lib/tool/tool-runtime.js.map +1 -1
  730. package/lib/tool/tool-system.js +1 -1
  731. package/lib/tool/tool-system.js.map +1 -1
  732. package/lib/tool/turn-tool-runtime.d.ts +6 -2
  733. package/lib/tool/turn-tool-runtime.d.ts.map +1 -1
  734. package/lib/tool/turn-tool-runtime.js +19 -5
  735. package/lib/tool/turn-tool-runtime.js.map +1 -1
  736. package/lib/tool-catalog/deferred-turn-controller.d.ts +2 -2
  737. package/lib/tool-catalog/deferred-turn-controller.d.ts.map +1 -1
  738. package/lib/tool-catalog/deferred-turn-controller.js +4 -4
  739. package/lib/tool-catalog/deferred-turn-controller.js.map +1 -1
  740. package/lib/turn/deferred-auto-continue.js +1 -1
  741. package/lib/turn/deferred-auto-continue.js.map +1 -1
  742. package/lib/turn/deferred-delivery.js +1 -1
  743. package/lib/turn/deferred-delivery.js.map +1 -1
  744. package/lib/turn/inbound-media.d.ts +8 -1
  745. package/lib/turn/inbound-media.d.ts.map +1 -1
  746. package/lib/turn/inbound-media.js +4 -6
  747. package/lib/turn/inbound-media.js.map +1 -1
  748. package/lib/turn/index.d.ts +2 -2
  749. package/lib/turn/index.d.ts.map +1 -1
  750. package/lib/turn/index.js +2 -2
  751. package/lib/turn/index.js.map +1 -1
  752. package/lib/turn/persist-deferred-context.js +1 -1
  753. package/lib/turn/prompt-api.d.ts +3 -4
  754. package/lib/turn/prompt-api.d.ts.map +1 -1
  755. package/lib/turn/prompt-api.js +7 -11
  756. package/lib/turn/prompt-api.js.map +1 -1
  757. package/lib/turn/task-continuation.d.ts +0 -5
  758. package/lib/turn/task-continuation.d.ts.map +1 -1
  759. package/lib/turn/task-continuation.js +0 -15
  760. package/lib/turn/task-continuation.js.map +1 -1
  761. package/lib/turn/turn-ingress.d.ts +1 -1
  762. package/lib/turn/turn-ingress.d.ts.map +1 -1
  763. package/lib/turn/turn-metrics.d.ts +0 -4
  764. package/lib/turn/turn-metrics.d.ts.map +1 -1
  765. package/lib/turn/turn-metrics.js +0 -8
  766. package/lib/turn/turn-metrics.js.map +1 -1
  767. package/lib/turn/turn-pipeline.js +7 -4
  768. package/lib/turn/turn-pipeline.js.map +1 -1
  769. package/lib/typing-indicator/adapter-integration.d.ts +1 -4
  770. package/lib/typing-indicator/adapter-integration.d.ts.map +1 -1
  771. package/lib/typing-indicator/adapter-integration.js.map +1 -1
  772. package/lib/typing-indicator/index.d.ts +0 -17
  773. package/lib/typing-indicator/index.d.ts.map +1 -1
  774. package/lib/typing-indicator/index.js +0 -31
  775. package/lib/typing-indicator/index.js.map +1 -1
  776. package/lib/user-profile.js +1 -1
  777. package/lib/user-profile.js.map +1 -1
  778. package/lib/utils/config-env.d.ts +1 -1
  779. package/lib/utils/config-env.js +1 -1
  780. package/lib/web/bing-search-html.d.ts.map +1 -0
  781. package/lib/{builtin → web}/bing-search-html.js +2 -6
  782. package/lib/web/bing-search-html.js.map +1 -0
  783. package/lib/web/web-search-locale.d.ts +5 -0
  784. package/lib/web/web-search-locale.d.ts.map +1 -0
  785. package/lib/web/web-search-locale.js +13 -0
  786. package/lib/web/web-search-locale.js.map +1 -0
  787. package/lib/{builtin → web}/web-tool-utils.d.ts +0 -1
  788. package/lib/web/web-tool-utils.d.ts.map +1 -0
  789. package/lib/{builtin → web}/web-tool-utils.js +0 -1
  790. package/lib/web/web-tool-utils.js.map +1 -0
  791. package/lib/workroom/acceptance-control.d.ts +2 -1
  792. package/lib/workroom/acceptance-control.d.ts.map +1 -1
  793. package/lib/workroom/acceptance-control.js +12 -2
  794. package/lib/workroom/acceptance-control.js.map +1 -1
  795. package/lib/workroom/accepted-source-memory-application.d.ts +1 -1
  796. package/lib/workroom/accepted-source-memory-application.d.ts.map +1 -1
  797. package/lib/workroom/assignment-authority-grant-application.d.ts +2 -2
  798. package/lib/workroom/assignment-authority-grant-application.d.ts.map +1 -1
  799. package/lib/workroom/assignment-authority-grant-application.js +1 -1
  800. package/lib/workroom/assignment-authority-grant-application.js.map +1 -1
  801. package/lib/workroom/assignment-authority-grant-repository.d.ts +3 -2
  802. package/lib/workroom/assignment-authority-grant-repository.d.ts.map +1 -1
  803. package/lib/workroom/assignment-authority-grant-repository.js +3 -1
  804. package/lib/workroom/assignment-authority-grant-repository.js.map +1 -1
  805. package/lib/workroom/assignment-authority.d.ts +75 -0
  806. package/lib/workroom/assignment-authority.d.ts.map +1 -0
  807. package/lib/workroom/assignment-authority.js +179 -0
  808. package/lib/workroom/assignment-authority.js.map +1 -0
  809. package/lib/workroom/catalog-definition.d.ts +0 -6
  810. package/lib/workroom/catalog-definition.d.ts.map +1 -1
  811. package/lib/workroom/catalog.js +1 -1
  812. package/lib/workroom/catalog.js.map +1 -1
  813. package/lib/workroom/coding-assignment-executor.d.ts +90 -0
  814. package/lib/workroom/coding-assignment-executor.d.ts.map +1 -0
  815. package/lib/workroom/coding-assignment-executor.js +250 -0
  816. package/lib/workroom/coding-assignment-executor.js.map +1 -0
  817. package/lib/workroom/coding-git-objects.d.ts +17 -0
  818. package/lib/workroom/coding-git-objects.d.ts.map +1 -0
  819. package/lib/workroom/coding-git-objects.js +68 -0
  820. package/lib/workroom/coding-git-objects.js.map +1 -0
  821. package/lib/workroom/durable-file-store.d.ts +2 -0
  822. package/lib/workroom/durable-file-store.d.ts.map +1 -1
  823. package/lib/workroom/durable-file-store.js +5 -0
  824. package/lib/workroom/durable-file-store.js.map +1 -1
  825. package/lib/workroom/effect-blocker-repository.d.ts +17 -1
  826. package/lib/workroom/effect-blocker-repository.d.ts.map +1 -1
  827. package/lib/workroom/effect-blocker-repository.js.map +1 -1
  828. package/lib/workroom/effect-ledger.d.ts +21 -1
  829. package/lib/workroom/effect-ledger.d.ts.map +1 -1
  830. package/lib/workroom/effect-ledger.js +44 -3
  831. package/lib/workroom/effect-ledger.js.map +1 -1
  832. package/lib/workroom/file-accepted-source-memory-repository.d.ts.map +1 -1
  833. package/lib/workroom/file-accepted-source-memory-repository.js +6 -3
  834. package/lib/workroom/file-accepted-source-memory-repository.js.map +1 -1
  835. package/lib/workroom/file-coding-execution-store.d.ts +25 -0
  836. package/lib/workroom/file-coding-execution-store.d.ts.map +1 -0
  837. package/lib/workroom/file-coding-execution-store.js +122 -0
  838. package/lib/workroom/file-coding-execution-store.js.map +1 -0
  839. package/lib/workroom/file-effect-ledger.d.ts.map +1 -1
  840. package/lib/workroom/file-effect-ledger.js +6 -3
  841. package/lib/workroom/file-effect-ledger.js.map +1 -1
  842. package/lib/workroom/git-workspace-gateway.d.ts +6 -3
  843. package/lib/workroom/git-workspace-gateway.d.ts.map +1 -1
  844. package/lib/workroom/git-workspace-gateway.js +10 -1
  845. package/lib/workroom/git-workspace-gateway.js.map +1 -1
  846. package/lib/workroom/github-workspace-transport.d.ts +30 -0
  847. package/lib/workroom/github-workspace-transport.d.ts.map +1 -0
  848. package/lib/workroom/github-workspace-transport.js +224 -0
  849. package/lib/workroom/github-workspace-transport.js.map +1 -0
  850. package/lib/{plugin-runtime/workroom-governed-dispatch-reasons.d.ts → workroom/governed-dispatch-reasons.d.ts} +2 -2
  851. package/lib/workroom/governed-dispatch-reasons.d.ts.map +1 -0
  852. package/lib/{plugin-runtime/workroom-governed-dispatch-reasons.js → workroom/governed-dispatch-reasons.js} +1 -1
  853. package/lib/workroom/governed-dispatch-reasons.js.map +1 -0
  854. package/lib/workroom/human-ingress-orchestrator.d.ts.map +1 -1
  855. package/lib/workroom/human-ingress-orchestrator.js +29 -1
  856. package/lib/workroom/human-ingress-orchestrator.js.map +1 -1
  857. package/lib/workroom/human-ingress-source-reader.d.ts +3 -3
  858. package/lib/workroom/human-ingress-source-reader.d.ts.map +1 -1
  859. package/lib/workroom/human-ingress-source-reader.js.map +1 -1
  860. package/lib/workroom/journal/activatable-journal.d.ts +15 -0
  861. package/lib/workroom/journal/activatable-journal.d.ts.map +1 -0
  862. package/lib/workroom/journal/activatable-journal.js +39 -0
  863. package/lib/workroom/journal/activatable-journal.js.map +1 -0
  864. package/lib/workroom/{journal.d.ts → journal/contracts.d.ts} +19 -95
  865. package/lib/workroom/journal/contracts.d.ts.map +1 -0
  866. package/lib/workroom/journal/contracts.js +19 -0
  867. package/lib/workroom/journal/contracts.js.map +1 -0
  868. package/lib/workroom/journal/database-journal.d.ts +31 -0
  869. package/lib/workroom/journal/database-journal.d.ts.map +1 -0
  870. package/lib/workroom/journal/database-journal.js +118 -0
  871. package/lib/workroom/journal/database-journal.js.map +1 -0
  872. package/lib/workroom/journal/event-codec.d.ts +26 -0
  873. package/lib/workroom/journal/event-codec.d.ts.map +1 -0
  874. package/lib/workroom/journal/event-codec.js +233 -0
  875. package/lib/workroom/journal/event-codec.js.map +1 -0
  876. package/lib/workroom/journal/event-validation.d.ts +10 -0
  877. package/lib/workroom/journal/event-validation.d.ts.map +1 -0
  878. package/lib/workroom/journal/event-validation.js +671 -0
  879. package/lib/workroom/journal/event-validation.js.map +1 -0
  880. package/lib/workroom/journal/file-journal.d.ts +15 -0
  881. package/lib/workroom/journal/file-journal.d.ts.map +1 -0
  882. package/lib/workroom/journal/file-journal.js +272 -0
  883. package/lib/workroom/journal/file-journal.js.map +1 -0
  884. package/lib/workroom/journal/index.d.ts +9 -0
  885. package/lib/workroom/journal/index.d.ts.map +1 -0
  886. package/lib/workroom/journal/index.js +8 -0
  887. package/lib/workroom/journal/index.js.map +1 -0
  888. package/lib/workroom/journal/memory-journal.d.ts +27 -0
  889. package/lib/workroom/journal/memory-journal.d.ts.map +1 -0
  890. package/lib/workroom/journal/memory-journal.js +103 -0
  891. package/lib/workroom/journal/memory-journal.js.map +1 -0
  892. package/lib/workroom/journal/payload-governance.d.ts +29 -0
  893. package/lib/workroom/journal/payload-governance.d.ts.map +1 -0
  894. package/lib/workroom/journal/payload-governance.js +282 -0
  895. package/lib/workroom/journal/payload-governance.js.map +1 -0
  896. package/lib/workroom/journal/payload-reference.d.ts +9 -0
  897. package/lib/workroom/journal/payload-reference.d.ts.map +1 -0
  898. package/lib/workroom/journal/payload-reference.js +60 -0
  899. package/lib/workroom/journal/payload-reference.js.map +1 -0
  900. package/lib/workroom/journal/stored-event-projection.d.ts +6 -0
  901. package/lib/workroom/journal/stored-event-projection.d.ts.map +1 -0
  902. package/lib/workroom/journal/stored-event-projection.js +280 -0
  903. package/lib/workroom/journal/stored-event-projection.js.map +1 -0
  904. package/lib/workroom/kernel-state.d.ts.map +1 -1
  905. package/lib/workroom/kernel-state.js +35 -3
  906. package/lib/workroom/kernel-state.js.map +1 -1
  907. package/lib/workroom/{projection-outbox.d.ts → projection-outbox/contracts.d.ts} +8 -72
  908. package/lib/workroom/projection-outbox/contracts.d.ts.map +1 -0
  909. package/lib/workroom/projection-outbox/contracts.js +11 -0
  910. package/lib/workroom/projection-outbox/contracts.js.map +1 -0
  911. package/lib/workroom/projection-outbox/delivery-worker.d.ts +22 -0
  912. package/lib/workroom/projection-outbox/delivery-worker.d.ts.map +1 -0
  913. package/lib/workroom/projection-outbox/delivery-worker.js +96 -0
  914. package/lib/workroom/projection-outbox/delivery-worker.js.map +1 -0
  915. package/lib/workroom/projection-outbox/file-repository.d.ts +11 -0
  916. package/lib/workroom/projection-outbox/file-repository.d.ts.map +1 -0
  917. package/lib/workroom/projection-outbox/file-repository.js +89 -0
  918. package/lib/workroom/projection-outbox/file-repository.js.map +1 -0
  919. package/lib/workroom/projection-outbox/index.d.ts +10 -0
  920. package/lib/workroom/projection-outbox/index.d.ts.map +1 -0
  921. package/lib/workroom/projection-outbox/index.js +8 -0
  922. package/lib/workroom/projection-outbox/index.js.map +1 -0
  923. package/lib/workroom/projection-outbox/memory-repository.d.ts +11 -0
  924. package/lib/workroom/projection-outbox/memory-repository.d.ts.map +1 -0
  925. package/lib/workroom/projection-outbox/memory-repository.js +40 -0
  926. package/lib/workroom/projection-outbox/memory-repository.js.map +1 -0
  927. package/lib/workroom/projection-outbox/projector.d.ts +36 -0
  928. package/lib/workroom/projection-outbox/projector.d.ts.map +1 -0
  929. package/lib/workroom/projection-outbox/projector.js +517 -0
  930. package/lib/workroom/projection-outbox/projector.js.map +1 -0
  931. package/lib/workroom/projection-outbox/repository-state.d.ts +17 -0
  932. package/lib/workroom/projection-outbox/repository-state.d.ts.map +1 -0
  933. package/lib/workroom/projection-outbox/repository-state.js +343 -0
  934. package/lib/workroom/projection-outbox/repository-state.js.map +1 -0
  935. package/lib/workroom/projection-outbox/tracer.d.ts +19 -0
  936. package/lib/workroom/projection-outbox/tracer.d.ts.map +1 -0
  937. package/lib/workroom/projection-outbox/tracer.js +201 -0
  938. package/lib/workroom/projection-outbox/tracer.js.map +1 -0
  939. package/lib/workroom/remote-dispatch-admission.d.ts +2 -2
  940. package/lib/workroom/remote-dispatch-admission.d.ts.map +1 -1
  941. package/lib/workroom/remote-dispatch-admission.js +1 -1
  942. package/lib/workroom/remote-dispatch-admission.js.map +1 -1
  943. package/lib/workroom/remote-dispatch-worker.d.ts +1 -1
  944. package/lib/workroom/remote-dispatch-worker.d.ts.map +1 -1
  945. package/lib/workroom/remote-dispatch-worker.js +1 -1
  946. package/lib/workroom/remote-dispatch-worker.js.map +1 -1
  947. package/lib/workroom/remote-executor.d.ts +15 -0
  948. package/lib/workroom/remote-executor.d.ts.map +1 -0
  949. package/lib/workroom/remote-executor.js +21 -0
  950. package/lib/workroom/remote-executor.js.map +1 -0
  951. package/lib/workroom/runtime.d.ts +1 -1
  952. package/lib/workroom/runtime.d.ts.map +1 -1
  953. package/lib/workroom/software-delivery-plan.d.ts +32 -0
  954. package/lib/workroom/software-delivery-plan.d.ts.map +1 -0
  955. package/lib/workroom/software-delivery-plan.js +60 -0
  956. package/lib/workroom/software-delivery-plan.js.map +1 -0
  957. package/lib/workroom/validate-catalog.d.ts +2 -0
  958. package/lib/workroom/validate-catalog.d.ts.map +1 -0
  959. package/lib/workroom/validate-catalog.js +230 -0
  960. package/lib/workroom/validate-catalog.js.map +1 -0
  961. package/lib/workroom/workroom-kernel.d.ts +11 -1
  962. package/lib/workroom/workroom-kernel.d.ts.map +1 -1
  963. package/lib/workroom/workroom-kernel.js +102 -30
  964. package/lib/workroom/workroom-kernel.js.map +1 -1
  965. package/lib/workroom/workroom-preemption.d.ts +1 -1
  966. package/lib/workroom/workroom-preemption.d.ts.map +1 -1
  967. package/lib/workroom/workroom-scheduler-application.d.ts +1 -1
  968. package/lib/workroom/workroom-scheduler-application.d.ts.map +1 -1
  969. package/lib/workroom/workroom-scheduler-application.js +1 -1
  970. package/lib/workroom/workroom-scheduler-application.js.map +1 -1
  971. package/lib/workroom/workroom-scheduler.js +3 -0
  972. package/lib/workroom/workroom-scheduler.js.map +1 -1
  973. package/lib/zhin-agent/index.d.ts +12 -6
  974. package/lib/zhin-agent/index.d.ts.map +1 -1
  975. package/lib/zhin-agent/index.js +18 -12
  976. package/lib/zhin-agent/index.js.map +1 -1
  977. package/package.json +14 -29
  978. package/lib/activity-feedback/ai-bus.d.ts +0 -21
  979. package/lib/activity-feedback/ai-bus.d.ts.map +0 -1
  980. package/lib/activity-feedback/ai-bus.js +0 -59
  981. package/lib/activity-feedback/ai-bus.js.map +0 -1
  982. package/lib/ai-hook-handlers.d.ts +0 -8
  983. package/lib/ai-hook-handlers.d.ts.map +0 -1
  984. package/lib/ai-hook-handlers.js +0 -46
  985. package/lib/ai-hook-handlers.js.map +0 -1
  986. package/lib/authoring/define-agent.d.ts +0 -4
  987. package/lib/authoring/define-agent.d.ts.map +0 -1
  988. package/lib/authoring/define-agent.js +0 -8
  989. package/lib/authoring/define-agent.js.map +0 -1
  990. package/lib/authoring/define-connection.d.ts +0 -5
  991. package/lib/authoring/define-connection.d.ts.map +0 -1
  992. package/lib/authoring/define-connection.js +0 -8
  993. package/lib/authoring/define-connection.js.map +0 -1
  994. package/lib/authoring/define-schedule.d.ts +0 -4
  995. package/lib/authoring/define-schedule.d.ts.map +0 -1
  996. package/lib/authoring/define-schedule.js +0 -8
  997. package/lib/authoring/define-schedule.js.map +0 -1
  998. package/lib/authoring/define-tool.d.ts +0 -20
  999. package/lib/authoring/define-tool.d.ts.map +0 -1
  1000. package/lib/authoring/define-tool.js +0 -28
  1001. package/lib/authoring/define-tool.js.map +0 -1
  1002. package/lib/authoring/entries/connections.d.ts +0 -3
  1003. package/lib/authoring/entries/connections.d.ts.map +0 -1
  1004. package/lib/authoring/entries/connections.js +0 -2
  1005. package/lib/authoring/entries/connections.js.map +0 -1
  1006. package/lib/authoring/entries/schedules.d.ts +0 -3
  1007. package/lib/authoring/entries/schedules.d.ts.map +0 -1
  1008. package/lib/authoring/entries/schedules.js +0 -2
  1009. package/lib/authoring/entries/schedules.js.map +0 -1
  1010. package/lib/authoring/entries/tools.d.ts +0 -5
  1011. package/lib/authoring/entries/tools.d.ts.map +0 -1
  1012. package/lib/authoring/entries/tools.js +0 -3
  1013. package/lib/authoring/entries/tools.js.map +0 -1
  1014. package/lib/authoring/tool-policy.d.ts +0 -3
  1015. package/lib/authoring/tool-policy.d.ts.map +0 -1
  1016. package/lib/authoring/tool-policy.js +0 -2
  1017. package/lib/authoring/tool-policy.js.map +0 -1
  1018. package/lib/authoring/zod-schema.d.ts +0 -10
  1019. package/lib/authoring/zod-schema.d.ts.map +0 -1
  1020. package/lib/authoring/zod-schema.js +0 -7
  1021. package/lib/authoring/zod-schema.js.map +0 -1
  1022. package/lib/builtin/analyze-media-tool.d.ts +0 -13
  1023. package/lib/builtin/analyze-media-tool.d.ts.map +0 -1
  1024. package/lib/builtin/analyze-media-tool.js +0 -94
  1025. package/lib/builtin/analyze-media-tool.js.map +0 -1
  1026. package/lib/builtin/bash-tool.d.ts +0 -29
  1027. package/lib/builtin/bash-tool.d.ts.map +0 -1
  1028. package/lib/builtin/bash-tool.js +0 -107
  1029. package/lib/builtin/bash-tool.js.map +0 -1
  1030. package/lib/builtin/bing-search-html.d.ts.map +0 -1
  1031. package/lib/builtin/bing-search-html.js.map +0 -1
  1032. package/lib/builtin/builtin-base-tool.d.ts +0 -27
  1033. package/lib/builtin/builtin-base-tool.d.ts.map +0 -1
  1034. package/lib/builtin/builtin-base-tool.js +0 -35
  1035. package/lib/builtin/builtin-base-tool.js.map +0 -1
  1036. package/lib/builtin/edit-file-tool.d.ts +0 -13
  1037. package/lib/builtin/edit-file-tool.d.ts.map +0 -1
  1038. package/lib/builtin/edit-file-tool.js +0 -86
  1039. package/lib/builtin/edit-file-tool.js.map +0 -1
  1040. package/lib/builtin/file-edit-quote-utils.d.ts.map +0 -1
  1041. package/lib/builtin/file-edit-quote-utils.js.map +0 -1
  1042. package/lib/builtin/five-agent/index.d.ts.map +0 -1
  1043. package/lib/builtin/five-agent/index.js.map +0 -1
  1044. package/lib/builtin/five-agent/prompts.d.ts.map +0 -1
  1045. package/lib/builtin/five-agent/prompts.js.map +0 -1
  1046. package/lib/builtin/five-agent/role-capability-policy.d.ts.map +0 -1
  1047. package/lib/builtin/five-agent/role-capability-policy.js.map +0 -1
  1048. package/lib/builtin/five-agent/roles.d.ts.map +0 -1
  1049. package/lib/builtin/five-agent/roles.js.map +0 -1
  1050. package/lib/builtin/generate-image-tool.d.ts +0 -21
  1051. package/lib/builtin/generate-image-tool.d.ts.map +0 -1
  1052. package/lib/builtin/generate-image-tool.js +0 -138
  1053. package/lib/builtin/generate-image-tool.js.map +0 -1
  1054. package/lib/builtin/glob-tool.d.ts +0 -23
  1055. package/lib/builtin/glob-tool.d.ts.map +0 -1
  1056. package/lib/builtin/glob-tool.js +0 -53
  1057. package/lib/builtin/glob-tool.js.map +0 -1
  1058. package/lib/builtin/grep-tool.d.ts +0 -23
  1059. package/lib/builtin/grep-tool.d.ts.map +0 -1
  1060. package/lib/builtin/grep-tool.js +0 -121
  1061. package/lib/builtin/grep-tool.js.map +0 -1
  1062. package/lib/builtin/install-skill-tool.d.ts +0 -24
  1063. package/lib/builtin/install-skill-tool.d.ts.map +0 -1
  1064. package/lib/builtin/install-skill-tool.js +0 -76
  1065. package/lib/builtin/install-skill-tool.js.map +0 -1
  1066. package/lib/builtin/knowledge-search-tool.d.ts +0 -6
  1067. package/lib/builtin/knowledge-search-tool.d.ts.map +0 -1
  1068. package/lib/builtin/knowledge-search-tool.js +0 -184
  1069. package/lib/builtin/knowledge-search-tool.js.map +0 -1
  1070. package/lib/builtin/list-dir-tool.d.ts +0 -13
  1071. package/lib/builtin/list-dir-tool.d.ts.map +0 -1
  1072. package/lib/builtin/list-dir-tool.js +0 -57
  1073. package/lib/builtin/list-dir-tool.js.map +0 -1
  1074. package/lib/builtin/load-skill-tool.d.ts +0 -20
  1075. package/lib/builtin/load-skill-tool.d.ts.map +0 -1
  1076. package/lib/builtin/load-skill-tool.js +0 -60
  1077. package/lib/builtin/load-skill-tool.js.map +0 -1
  1078. package/lib/builtin/read-file-tool.d.ts +0 -14
  1079. package/lib/builtin/read-file-tool.d.ts.map +0 -1
  1080. package/lib/builtin/read-file-tool.js +0 -74
  1081. package/lib/builtin/read-file-tool.js.map +0 -1
  1082. package/lib/builtin/run-deferred-task-tool.d.ts +0 -23
  1083. package/lib/builtin/run-deferred-task-tool.d.ts.map +0 -1
  1084. package/lib/builtin/run-deferred-task-tool.js +0 -41
  1085. package/lib/builtin/run-deferred-task-tool.js.map +0 -1
  1086. package/lib/builtin/spawn-task-tool.d.ts.map +0 -1
  1087. package/lib/builtin/spawn-task-tool.js.map +0 -1
  1088. package/lib/builtin/todo-read-tool.d.ts +0 -14
  1089. package/lib/builtin/todo-read-tool.d.ts.map +0 -1
  1090. package/lib/builtin/todo-read-tool.js +0 -56
  1091. package/lib/builtin/todo-read-tool.js.map +0 -1
  1092. package/lib/builtin/todo-write-tool.d.ts +0 -14
  1093. package/lib/builtin/todo-write-tool.d.ts.map +0 -1
  1094. package/lib/builtin/todo-write-tool.js +0 -54
  1095. package/lib/builtin/todo-write-tool.js.map +0 -1
  1096. package/lib/builtin/web-fetch-tool.d.ts +0 -21
  1097. package/lib/builtin/web-fetch-tool.d.ts.map +0 -1
  1098. package/lib/builtin/web-fetch-tool.js +0 -86
  1099. package/lib/builtin/web-fetch-tool.js.map +0 -1
  1100. package/lib/builtin/web-search-locale.d.ts +0 -16
  1101. package/lib/builtin/web-search-locale.d.ts.map +0 -1
  1102. package/lib/builtin/web-search-locale.js +0 -74
  1103. package/lib/builtin/web-search-locale.js.map +0 -1
  1104. package/lib/builtin/web-search-tool.d.ts +0 -20
  1105. package/lib/builtin/web-search-tool.d.ts.map +0 -1
  1106. package/lib/builtin/web-search-tool.js +0 -115
  1107. package/lib/builtin/web-search-tool.js.map +0 -1
  1108. package/lib/builtin/web-tool-utils.d.ts.map +0 -1
  1109. package/lib/builtin/web-tool-utils.js.map +0 -1
  1110. package/lib/builtin/write-file-tool.d.ts +0 -13
  1111. package/lib/builtin/write-file-tool.d.ts.map +0 -1
  1112. package/lib/builtin/write-file-tool.js +0 -55
  1113. package/lib/builtin/write-file-tool.js.map +0 -1
  1114. package/lib/builtin-tools.d.ts +0 -25
  1115. package/lib/builtin-tools.d.ts.map +0 -1
  1116. package/lib/builtin-tools.js +0 -54
  1117. package/lib/builtin-tools.js.map +0 -1
  1118. package/lib/defaults/hooks.d.ts +0 -6
  1119. package/lib/defaults/hooks.d.ts.map +0 -1
  1120. package/lib/defaults/hooks.js +0 -9
  1121. package/lib/defaults/hooks.js.map +0 -1
  1122. package/lib/defaults/subagents.d.ts +0 -6
  1123. package/lib/defaults/subagents.d.ts.map +0 -1
  1124. package/lib/defaults/subagents.js +0 -23
  1125. package/lib/defaults/subagents.js.map +0 -1
  1126. package/lib/defaults/tools.d.ts +0 -5
  1127. package/lib/defaults/tools.d.ts.map +0 -1
  1128. package/lib/defaults/tools.js +0 -6
  1129. package/lib/defaults/tools.js.map +0 -1
  1130. package/lib/discovery/index.d.ts +0 -5
  1131. package/lib/discovery/index.d.ts.map +0 -1
  1132. package/lib/discovery/index.js +0 -5
  1133. package/lib/discovery/index.js.map +0 -1
  1134. package/lib/discovery/skills.d.ts +0 -53
  1135. package/lib/discovery/skills.d.ts.map +0 -1
  1136. package/lib/discovery/skills.js +0 -306
  1137. package/lib/discovery/skills.js.map +0 -1
  1138. package/lib/discovery/tools.d.ts +0 -53
  1139. package/lib/discovery/tools.d.ts.map +0 -1
  1140. package/lib/discovery/tools.js +0 -305
  1141. package/lib/discovery/tools.js.map +0 -1
  1142. package/lib/features/agent-feature.d.ts +0 -23
  1143. package/lib/features/agent-feature.d.ts.map +0 -1
  1144. package/lib/features/agent-feature.js +0 -51
  1145. package/lib/features/agent-feature.js.map +0 -1
  1146. package/lib/features/index.d.ts +0 -3
  1147. package/lib/features/index.d.ts.map +0 -1
  1148. package/lib/features/index.js +0 -3
  1149. package/lib/features/index.js.map +0 -1
  1150. package/lib/features/mcp-feature.d.ts +0 -25
  1151. package/lib/features/mcp-feature.d.ts.map +0 -1
  1152. package/lib/features/mcp-feature.js +0 -52
  1153. package/lib/features/mcp-feature.js.map +0 -1
  1154. package/lib/hooks.d.ts +0 -144
  1155. package/lib/hooks.d.ts.map +0 -1
  1156. package/lib/hooks.js +0 -82
  1157. package/lib/hooks.js.map +0 -1
  1158. package/lib/ingress/capability-ingress.d.ts +0 -76
  1159. package/lib/ingress/capability-ingress.d.ts.map +0 -1
  1160. package/lib/ingress/capability-ingress.js +0 -274
  1161. package/lib/ingress/capability-ingress.js.map +0 -1
  1162. package/lib/ingress/index.d.ts +0 -2
  1163. package/lib/ingress/index.d.ts.map +0 -1
  1164. package/lib/ingress/index.js +0 -2
  1165. package/lib/ingress/index.js.map +0 -1
  1166. package/lib/init/introspection-args.d.ts +0 -37
  1167. package/lib/init/introspection-args.d.ts.map +0 -1
  1168. package/lib/init/introspection-args.js +0 -71
  1169. package/lib/init/introspection-args.js.map +0 -1
  1170. package/lib/init/introspection-collectors.d.ts +0 -26
  1171. package/lib/init/introspection-collectors.d.ts.map +0 -1
  1172. package/lib/init/introspection-collectors.js +0 -108
  1173. package/lib/init/introspection-collectors.js.map +0 -1
  1174. package/lib/init/introspection-commands-format.d.ts +0 -40
  1175. package/lib/init/introspection-commands-format.d.ts.map +0 -1
  1176. package/lib/init/introspection-commands-format.js +0 -93
  1177. package/lib/init/introspection-commands-format.js.map +0 -1
  1178. package/lib/init/introspection-pagination.d.ts +0 -14
  1179. package/lib/init/introspection-pagination.d.ts.map +0 -1
  1180. package/lib/init/introspection-pagination.js +0 -33
  1181. package/lib/init/introspection-pagination.js.map +0 -1
  1182. package/lib/init/introspection-rest.d.ts +0 -24
  1183. package/lib/init/introspection-rest.d.ts.map +0 -1
  1184. package/lib/init/introspection-rest.js +0 -65
  1185. package/lib/init/introspection-rest.js.map +0 -1
  1186. package/lib/init/upgrade-agent-db-schema.d.ts +0 -49
  1187. package/lib/init/upgrade-agent-db-schema.d.ts.map +0 -1
  1188. package/lib/init/upgrade-agent-db-schema.js +0 -210
  1189. package/lib/init/upgrade-agent-db-schema.js.map +0 -1
  1190. package/lib/init/upgrade-endpoint-id-schema.d.ts +0 -12
  1191. package/lib/init/upgrade-endpoint-id-schema.d.ts.map +0 -1
  1192. package/lib/init/upgrade-endpoint-id-schema.js +0 -58
  1193. package/lib/init/upgrade-endpoint-id-schema.js.map +0 -1
  1194. package/lib/plugin-runtime/workroom-governed-dispatch-reasons.d.ts.map +0 -1
  1195. package/lib/plugin-runtime/workroom-governed-dispatch-reasons.js.map +0 -1
  1196. package/lib/resource-hub/tool-registry.d.ts +0 -60
  1197. package/lib/resource-hub/tool-registry.d.ts.map +0 -1
  1198. package/lib/resource-hub/tool-registry.js +0 -228
  1199. package/lib/resource-hub/tool-registry.js.map +0 -1
  1200. package/lib/security/owner-approve-always-store.d.ts +0 -67
  1201. package/lib/security/owner-approve-always-store.d.ts.map +0 -1
  1202. package/lib/security/owner-approve-always-store.js +0 -510
  1203. package/lib/security/owner-approve-always-store.js.map +0 -1
  1204. package/lib/security/turn-sandbox-authority.d.ts +0 -13
  1205. package/lib/security/turn-sandbox-authority.d.ts.map +0 -1
  1206. package/lib/security/turn-sandbox-authority.js +0 -42
  1207. package/lib/security/turn-sandbox-authority.js.map +0 -1
  1208. package/lib/skill/skill-load-opts.d.ts +0 -5
  1209. package/lib/skill/skill-load-opts.d.ts.map +0 -1
  1210. package/lib/skill/skill-load-opts.js +0 -14
  1211. package/lib/skill/skill-load-opts.js.map +0 -1
  1212. package/lib/stability/registry-cleanup.d.ts +0 -5
  1213. package/lib/stability/registry-cleanup.d.ts.map +0 -1
  1214. package/lib/stability/registry-cleanup.js +0 -20
  1215. package/lib/stability/registry-cleanup.js.map +0 -1
  1216. package/lib/tool/classic-tool-execution-authority.d.ts +0 -22
  1217. package/lib/tool/classic-tool-execution-authority.d.ts.map +0 -1
  1218. package/lib/tool/classic-tool-execution-authority.js +0 -80
  1219. package/lib/tool/classic-tool-execution-authority.js.map +0 -1
  1220. package/lib/tool/web-search-locale-attach.d.ts +0 -4
  1221. package/lib/tool/web-search-locale-attach.d.ts.map +0 -1
  1222. package/lib/tool/web-search-locale-attach.js +0 -20
  1223. package/lib/tool/web-search-locale-attach.js.map +0 -1
  1224. package/lib/typing-indicator/integration.d.ts +0 -89
  1225. package/lib/typing-indicator/integration.d.ts.map +0 -1
  1226. package/lib/typing-indicator/integration.js +0 -261
  1227. package/lib/typing-indicator/integration.js.map +0 -1
  1228. package/lib/workroom/journal.d.ts.map +0 -1
  1229. package/lib/workroom/journal.js +0 -2022
  1230. package/lib/workroom/journal.js.map +0 -1
  1231. package/lib/workroom/local-assignment-executor.d.ts.map +0 -1
  1232. package/lib/workroom/local-assignment-executor.js.map +0 -1
  1233. package/lib/workroom/projection-outbox.d.ts.map +0 -1
  1234. package/lib/workroom/projection-outbox.js +0 -1324
  1235. package/lib/workroom/projection-outbox.js.map +0 -1
  1236. /package/lib/{builtin → orchestration}/five-agent/index.d.ts +0 -0
  1237. /package/lib/{builtin → orchestration}/five-agent/index.js +0 -0
  1238. /package/lib/{builtin → orchestration}/five-agent/prompts.d.ts +0 -0
  1239. /package/lib/{builtin → orchestration}/five-agent/prompts.js +0 -0
  1240. /package/lib/{builtin → orchestration}/five-agent/role-capability-policy.d.ts +0 -0
  1241. /package/lib/{builtin → orchestration}/five-agent/role-capability-policy.js +0 -0
  1242. /package/lib/{builtin → orchestration}/five-agent/roles.d.ts +0 -0
  1243. /package/lib/{builtin → orchestration}/five-agent/roles.js +0 -0
  1244. /package/lib/{builtin → plugin-runtime}/file-edit-quote-utils.d.ts +0 -0
  1245. /package/lib/{builtin → plugin-runtime}/file-edit-quote-utils.js +0 -0
  1246. /package/lib/{builtin → web}/bing-search-html.d.ts +0 -0
@@ -1,67 +0,0 @@
1
- import { type Message, type Plugin } from '@zhin.js/core';
2
- export declare const OWNER_APPROVE_ALWAYS_TOOL: "bash";
3
- export type ToolRequesterRole = 'master' | 'trusted' | 'other' | 'unknown';
4
- /** 需 Owner 审批的 icqq 子命令(正则匹配整段子命令文本,大小写不敏感) */
5
- export declare const ICQQ_SENSITIVE_SUBCOMMAND_REGEXES: readonly RegExp[];
6
- export interface BashRuleEntry {
7
- id: string;
8
- pattern: string;
9
- createdAt: number;
10
- }
11
- export interface BashApprovalBotEntry {
12
- bashAlways?: boolean;
13
- bashRules: BashRuleEntry[];
14
- }
15
- export declare function getEndpointMaster(plugin: Plugin | null | undefined, commMessage: Message): string | undefined;
16
- export declare function resolveToolRequesterRole(plugin: Plugin | null | undefined, commMessage: Message): ToolRequesterRole;
17
- export declare function getOwnerCommMessageOrUndefined(plugin: Plugin | null | undefined, message: Message): Message | undefined;
18
- /** 是否已由 Owner `/approve always bash` 永久放行。 */
19
- export declare function hasOwnerApproveAlways(plugin: Plugin | null | undefined, commMessage: Message, toolName: string): boolean;
20
- export declare function setBashAlways(plugin: Plugin | null | undefined, commMessage: Message, value: boolean): void;
21
- export declare function addOwnerApproveAlways(plugin: Plugin | null | undefined, commMessage: Message, toolName: string): {
22
- ok: true;
23
- } | {
24
- ok: false;
25
- error: string;
26
- };
27
- export declare function removeOwnerApproveAlways(plugin: Plugin | null | undefined, commMessage: Message, toolName: string): {
28
- ok: true;
29
- } | {
30
- ok: false;
31
- error: string;
32
- };
33
- export declare function addBashApproveRule(plugin: Plugin | null | undefined, commMessage: Message, pattern: string): {
34
- ok: true;
35
- id: string;
36
- } | {
37
- ok: false;
38
- error: string;
39
- };
40
- export declare function removeBashApproveRule(plugin: Plugin | null | undefined, commMessage: Message, ruleId: string): {
41
- ok: true;
42
- } | {
43
- ok: false;
44
- error: string;
45
- };
46
- /** exec 策略:bashAlways 或任一 bashRules 匹配 commandLine */
47
- export declare function matchesBashOwnerExecBypass(plugin: Plugin | null | undefined, commMessage: Message, commandLine: string): boolean;
48
- export declare function formatBashApproveList(plugin: Plugin | null | undefined, commMessage: Message): string;
49
- export declare function isIcqqSensitiveSubcommand(fullSubCommand: string): boolean;
50
- export declare function getPendingOrchestrationCount(): number;
51
- export declare function evictPendingOrchestrationIfOverPressure(): number;
52
- export declare function setPendingOrchestrationTool(plugin: Plugin | null | undefined, commMessage: Message, toolName: string): void;
53
- export declare function clearPendingOrchestrationTool(plugin: Plugin | null | undefined, commMessage: Message): void;
54
- export declare function getPendingOrchestrationTool(plugin: Plugin | null | undefined, commMessage: Message): string | undefined;
55
- export interface OwnerApprovalCommandContext {
56
- readonly platform: string;
57
- readonly endpoint: string;
58
- readonly ownerId?: string;
59
- readonly subjectId: string;
60
- readonly scope: 'private' | 'group' | 'channel';
61
- }
62
- /**
63
- * Plugin Runtime Owner `/approve` 命令面(无 host Plugin / CommandFeature)。
64
- * @returns reply text when handled; null when not an approve command.
65
- */
66
- export declare function handleRuntimeOwnerApproveCommand(context: OwnerApprovalCommandContext, rawText: string): string | null;
67
- //# sourceMappingURL=owner-approve-always-store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"owner-approve-always-store.d.ts","sourceRoot":"","sources":["../../src/security/owner-approve-always-store.ts"],"names":[],"mappings":"AAWA,OAAO,EAAgB,KAAK,OAAO,EAAE,KAAK,MAAM,EAA8D,MAAM,eAAe,CAAC;AAEpI,eAAO,MAAM,yBAAyB,EAAG,MAAe,CAAC;AAEzD,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAK3E,+CAA+C;AAC/C,eAAO,MAAM,iCAAiC,EAAE,SAAS,MAAM,EAoB9D,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,aAAa,EAAE,CAAC;CAC5B;AAwGD,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,WAAW,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAe7G;AAqBD,wBAAgB,wBA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AAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;CACjD;AAWD;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,2BAA2B,EACpC,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,IAAI,CA8Df"}
@@ -1,510 +0,0 @@
1
- /**
2
- * Owner 对 bash / icqq CLI 的放行策略(持久化 data/owner-approve-always.json)。
3
- *
4
- * - **bashAlways**:由 Owner `/approve` 显式持久化的 shell 放行开关(仅 bash 工具链)。
5
- * - **bashRules**:正则列表;在 exec 策略中若 **整条待检子命令** 匹配任一规则,则视为已放行(不固化解参数,例如 `^icqq\\s+friend\\s+like\\b`)。
6
- *
7
- * icqq 子命令:非敏感操作默认直接放行;仅命中 {@link ICQQ_SENSITIVE_SUBCOMMAND_REGEXES} 时需审批,除非 always 或规则匹配。
8
- */
9
- import * as crypto from 'node:crypto';
10
- import * as fs from 'node:fs';
11
- import * as path from 'node:path';
12
- import { hasSenderRole, resolveSubjectRoles, senderRolesFromMessage } from '@zhin.js/core';
13
- import { getDataDir } from '../discovery/utils.js';
14
- export const OWNER_APPROVE_ALWAYS_TOOL = 'bash';
15
- const STORE_FILE = 'owner-approve-always.json';
16
- const STORE_VERSION = 2;
17
- /** 需 Owner 审批的 icqq 子命令(正则匹配整段子命令文本,大小写不敏感) */
18
- export const ICQQ_SENSITIVE_SUBCOMMAND_REGEXES = [
19
- /\bicqq\s+friend\s+delete\b/i,
20
- /\bicqq\s+friend\s+block\b/i,
21
- /\bicqq\s+friend\s+move\b/i,
22
- /\bicqq\s+group\s+kick\b/i,
23
- /\bicqq\s+group\s+mute\b/i,
24
- /\bicqq\s+group\s+set\b/i,
25
- /\bicqq\s+group\s+admin\b/i,
26
- /\bicqq\s+group\s+announce\b/i,
27
- /\bicqq\s+group\s+transfer\b/i,
28
- /\bicqq\s+group\s+quit\b/i,
29
- /\bicqq\s+group\s+dissolve\b/i,
30
- /\bicqq\s+group\s+invite\b/i,
31
- /\bicqq\s+request\b/i,
32
- /\bicqq\s+wallet\b/i,
33
- /\bicqq\s+pay\b/i,
34
- /\bicqq\s+recall\b/i,
35
- /\bicqq\s+file\s+upload\b/i,
36
- /\bicqq\s+file\s+delete\b/i,
37
- /\bicqq\s+gfs\b.*\b(rm|delete|del)\b/i,
38
- ];
39
- function storePath() {
40
- return path.join(getDataDir(), STORE_FILE);
41
- }
42
- function emptyV2() {
43
- return { version: STORE_VERSION, endpoints: {} };
44
- }
45
- function normalizeBotKey(adapter, endpointKey, ownerId) {
46
- return `${adapter}|${endpointKey}|${ownerId}`;
47
- }
48
- function approvalAddressKey(address) {
49
- return normalizeBotKey(address.platform, address.endpoint, address.ownerId);
50
- }
51
- function approvalAddressFromMessage(plugin, message) {
52
- const platform = String(message.$adapter ?? '').trim();
53
- const endpoint = String(message.$endpoint ?? '').trim();
54
- const ownerId = getEndpointMaster(plugin, message)?.trim();
55
- return platform && endpoint && ownerId
56
- ? Object.freeze({ platform, endpoint, ownerId })
57
- : undefined;
58
- }
59
- function migrateV1ToV2(data) {
60
- const out = emptyV2();
61
- for (const e of data.entries || []) {
62
- if (typeof e !== 'string')
63
- continue;
64
- const parts = e.split('|');
65
- if (parts.length !== 4)
66
- continue;
67
- const [adapter, endpointKey, ownerId, scope] = parts;
68
- if (scope === 'orchestration:bash') {
69
- const k = normalizeBotKey(adapter, endpointKey, ownerId);
70
- if (!out.endpoints[k])
71
- out.endpoints[k] = { bashRules: [] };
72
- out.endpoints[k].bashAlways = true;
73
- }
74
- }
75
- return out;
76
- }
77
- function readStore() {
78
- const p = storePath();
79
- try {
80
- const raw = fs.readFileSync(p, 'utf-8');
81
- const data = JSON.parse(raw);
82
- if (!data || typeof data !== 'object')
83
- return emptyV2();
84
- if (data.version === STORE_VERSION && data.endpoints && typeof data.endpoints === 'object') {
85
- const v2 = data;
86
- for (const k of Object.keys(v2.endpoints)) {
87
- const ent = v2.endpoints[k];
88
- if (!ent.bashRules)
89
- ent.bashRules = [];
90
- }
91
- return v2;
92
- }
93
- if (data.version === 1 && Array.isArray(data.entries)) {
94
- const v2 = migrateV1ToV2(data);
95
- writeStore(v2);
96
- return v2;
97
- }
98
- if (Array.isArray(data.entries)) {
99
- const v2 = migrateV1ToV2({ version: 1, entries: data.entries });
100
- writeStore(v2);
101
- return v2;
102
- }
103
- return emptyV2();
104
- }
105
- catch {
106
- return emptyV2();
107
- }
108
- }
109
- function writeStore(data) {
110
- const p = storePath();
111
- const tmp = `${p}.${process.pid}.tmp`;
112
- const body = `${JSON.stringify(data, null, 2)}\n`;
113
- fs.writeFileSync(tmp, body, 'utf-8');
114
- fs.renameSync(tmp, p);
115
- }
116
- export function getEndpointMaster(plugin, commMessage) {
117
- const fromExtra = commMessage.extra?.endpointMaster;
118
- if (fromExtra != null && String(fromExtra).trim() !== '') {
119
- return String(fromExtra);
120
- }
121
- if (!plugin)
122
- return undefined;
123
- const root = plugin.root ?? plugin;
124
- try {
125
- const adapter = root.inject(commMessage.$adapter);
126
- const endpoint = adapter?.endpoints?.get(commMessage.$endpoint);
127
- const master = endpoint?.$config?.master;
128
- return master != null ? String(master) : undefined;
129
- }
130
- catch {
131
- return undefined;
132
- }
133
- }
134
- function normalizeIdList(input) {
135
- if (Array.isArray(input))
136
- return input.map((v) => String(v)).filter(Boolean);
137
- if (typeof input === 'string') {
138
- return input
139
- .split(/[\s,]+/)
140
- .map((v) => v.trim())
141
- .filter(Boolean);
142
- }
143
- return [];
144
- }
145
- function getEndpointTrustedIds(plugin, commMessage) {
146
- const root = plugin.root ?? plugin;
147
- const adapter = root.inject(commMessage.$adapter);
148
- const endpoint = adapter?.endpoints?.get(commMessage.$endpoint);
149
- const endpointConfig = endpoint?.$config ?? {};
150
- return normalizeIdList(endpointConfig.trusted);
151
- }
152
- export function resolveToolRequesterRole(plugin, commMessage) {
153
- const roles = senderRolesFromMessage(commMessage);
154
- if (commMessage.$sender.isMaster !== undefined || commMessage.$sender.isTrusted !== undefined) {
155
- if (hasSenderRole(roles, 'master'))
156
- return 'master';
157
- if (hasSenderRole(roles, 'trusted'))
158
- return 'trusted';
159
- return 'other';
160
- }
161
- if (plugin) {
162
- try {
163
- const resolved = resolveSubjectRoles(plugin.root ?? plugin, commMessage);
164
- if (hasSenderRole(resolved.roles, 'master'))
165
- return 'master';
166
- if (hasSenderRole(resolved.roles, 'trusted'))
167
- return 'trusted';
168
- return 'other';
169
- }
170
- catch {
171
- /* fall through */
172
- }
173
- }
174
- if (!commMessage.$adapter || !commMessage.$endpoint || !commMessage.$sender?.id)
175
- return 'unknown';
176
- const senderId = String(commMessage.$sender.id);
177
- const masterId = getEndpointMaster(plugin, commMessage);
178
- if (masterId && senderId === String(masterId))
179
- return 'master';
180
- if (plugin) {
181
- const trusted = getEndpointTrustedIds(plugin, commMessage);
182
- if (trusted.includes(senderId))
183
- return 'trusted';
184
- }
185
- return 'other';
186
- }
187
- function getEntryAt(address) {
188
- return readStore().endpoints[approvalAddressKey(address)];
189
- }
190
- function setBashAlwaysAt(address, value) {
191
- const key = approvalAddressKey(address);
192
- const data = readStore();
193
- const previous = data.endpoints[key] ?? { bashRules: [] };
194
- data.endpoints[key] = {
195
- ...(value ? { bashAlways: true } : {}),
196
- bashRules: [...(previous.bashRules ?? [])],
197
- };
198
- writeStore(data);
199
- }
200
- function addBashApproveRuleAt(address, pattern) {
201
- const trimmed = pattern.trim();
202
- if (!trimmed)
203
- return { ok: false, error: '正则不能为空。' };
204
- try {
205
- new RegExp(trimmed);
206
- }
207
- catch (error) {
208
- return { ok: false, error: `无效正则: ${error instanceof Error ? error.message : String(error)}` };
209
- }
210
- const key = approvalAddressKey(address);
211
- const data = readStore();
212
- const previous = data.endpoints[key] ?? { bashRules: [] };
213
- const id = crypto.randomUUID();
214
- data.endpoints[key] = {
215
- ...(previous.bashAlways ? { bashAlways: true } : {}),
216
- bashRules: [...previous.bashRules, { id, pattern: trimmed, createdAt: Date.now() }],
217
- };
218
- writeStore(data);
219
- return { ok: true, id };
220
- }
221
- function removeBashApproveRuleAt(address, ruleId) {
222
- const id = ruleId.trim();
223
- if (!id)
224
- return { ok: false, error: '请提供规则 id。' };
225
- const key = approvalAddressKey(address);
226
- const data = readStore();
227
- const entry = data.endpoints[key];
228
- if (!entry?.bashRules.length)
229
- return { ok: false, error: '当前无自定义规则。' };
230
- const next = entry.bashRules.filter((rule) => rule.id !== id && !rule.id.startsWith(id));
231
- if (next.length === entry.bashRules.length) {
232
- return { ok: false, error: `未找到 id 前缀或全名为「${id}」的规则。` };
233
- }
234
- data.endpoints[key] = { ...entry, bashRules: next };
235
- writeStore(data);
236
- return { ok: true };
237
- }
238
- function formatBashApproveListAt(address) {
239
- const entry = getEntryAt(address);
240
- const rules = entry?.bashRules ?? [];
241
- if (!entry || (!entry.bashAlways && rules.length === 0)) {
242
- return 'bash 永久放行: 否\n自定义正则放行: 无';
243
- }
244
- return [
245
- `bash 永久放行: ${entry.bashAlways ? '是' : '否'}`,
246
- `自定义正则放行 (${rules.length}):`,
247
- ...rules.map((rule) => ` • [${rule.id.slice(0, 8)}] ${rule.pattern}`),
248
- ].join('\n');
249
- }
250
- export function getOwnerCommMessageOrUndefined(plugin, message) {
251
- if (message.$channel?.type !== 'private')
252
- return undefined;
253
- const ownerId = getEndpointMaster(plugin, message);
254
- if (ownerId == null || String(message.$sender.id) !== String(ownerId))
255
- return undefined;
256
- return message;
257
- }
258
- /** 是否已由 Owner `/approve always bash` 永久放行。 */
259
- export function hasOwnerApproveAlways(plugin, commMessage, toolName) {
260
- if (toolName !== OWNER_APPROVE_ALWAYS_TOOL)
261
- return false;
262
- const address = approvalAddressFromMessage(plugin, commMessage);
263
- return address ? !!getEntryAt(address)?.bashAlways : false;
264
- }
265
- export function setBashAlways(plugin, commMessage, value) {
266
- const address = approvalAddressFromMessage(plugin, commMessage);
267
- if (address)
268
- setBashAlwaysAt(address, value);
269
- }
270
- export function addOwnerApproveAlways(plugin, commMessage, toolName) {
271
- if (toolName.trim().toLowerCase() !== OWNER_APPROVE_ALWAYS_TOOL) {
272
- return { ok: false, error: '永久放行仅支持 bash(shell 安全确认)。' };
273
- }
274
- const address = approvalAddressFromMessage(plugin, commMessage);
275
- if (!address)
276
- return { ok: false, error: '缺少 platform/endpointKey 或未配置 owner。' };
277
- setBashAlwaysAt(address, true);
278
- return { ok: true };
279
- }
280
- export function removeOwnerApproveAlways(plugin, commMessage, toolName) {
281
- if (toolName.trim().toLowerCase() !== OWNER_APPROVE_ALWAYS_TOOL) {
282
- return { ok: false, error: '仅可撤销 bash 的永久放行。' };
283
- }
284
- const address = approvalAddressFromMessage(plugin, commMessage);
285
- if (!address)
286
- return { ok: false, error: '缺少 platform/endpointKey 或未配置 owner。' };
287
- if (!getEntryAt(address)?.bashAlways) {
288
- return { ok: false, error: '当前未对 bash 设置永久放行。' };
289
- }
290
- setBashAlwaysAt(address, false);
291
- return { ok: true };
292
- }
293
- export function addBashApproveRule(plugin, commMessage, pattern) {
294
- const address = approvalAddressFromMessage(plugin, commMessage);
295
- if (!address) {
296
- return { ok: false, error: '缺少 platform/endpointKey 或未配置 owner。' };
297
- }
298
- return addBashApproveRuleAt(address, pattern);
299
- }
300
- export function removeBashApproveRule(plugin, commMessage, ruleId) {
301
- const address = approvalAddressFromMessage(plugin, commMessage);
302
- if (!address) {
303
- return { ok: false, error: '缺少 platform/endpointKey 或未配置 owner。' };
304
- }
305
- return removeBashApproveRuleAt(address, ruleId);
306
- }
307
- /** exec 策略:bashAlways 或任一 bashRules 匹配 commandLine */
308
- export function matchesBashOwnerExecBypass(plugin, commMessage, commandLine) {
309
- const address = approvalAddressFromMessage(plugin, commMessage);
310
- if (!address)
311
- return false;
312
- const ent = getEntryAt(address);
313
- if (!ent)
314
- return false;
315
- if (ent.bashAlways)
316
- return true;
317
- const line = commandLine.trim();
318
- if (!line)
319
- return false;
320
- for (const r of ent.bashRules || []) {
321
- try {
322
- const re = new RegExp(r.pattern);
323
- if (re.test(line))
324
- return true;
325
- }
326
- catch {
327
- /* skip broken stored pattern */
328
- }
329
- }
330
- return false;
331
- }
332
- export function formatBashApproveList(plugin, commMessage) {
333
- const address = approvalAddressFromMessage(plugin, commMessage);
334
- return address ? formatBashApproveListAt(address) : 'bash 永久放行: 否\n自定义正则放行: 无';
335
- }
336
- export function isIcqqSensitiveSubcommand(fullSubCommand) {
337
- const line = fullSubCommand.trim();
338
- if (!/^\s*icqq(\s|$)/i.test(line))
339
- return false;
340
- return ICQQ_SENSITIVE_SUBCOMMAND_REGEXES.some((re) => re.test(line));
341
- }
342
- const pendingOrchestration = new Map();
343
- function setPendingAt(address) {
344
- pendingOrchestration.set(approvalAddressKey(address), {
345
- toolName: OWNER_APPROVE_ALWAYS_TOOL,
346
- expiresAt: Date.now() + 15 * 60 * 1000,
347
- });
348
- }
349
- function clearPendingAt(address) {
350
- pendingOrchestration.delete(approvalAddressKey(address));
351
- }
352
- function getPendingAt(address) {
353
- const key = approvalAddressKey(address);
354
- const pending = pendingOrchestration.get(key);
355
- if (!pending || pending.toolName !== OWNER_APPROVE_ALWAYS_TOOL) {
356
- if (pending)
357
- pendingOrchestration.delete(key);
358
- return undefined;
359
- }
360
- if (Date.now() > pending.expiresAt) {
361
- pendingOrchestration.delete(key);
362
- return undefined;
363
- }
364
- return pending.toolName;
365
- }
366
- export function getPendingOrchestrationCount() {
367
- return pendingOrchestration.size;
368
- }
369
- export function evictPendingOrchestrationIfOverPressure() {
370
- const now = Date.now();
371
- let removed = 0;
372
- for (const [key, value] of pendingOrchestration) {
373
- if (now > value.expiresAt) {
374
- pendingOrchestration.delete(key);
375
- removed++;
376
- }
377
- }
378
- return removed;
379
- }
380
- export function setPendingOrchestrationTool(plugin, commMessage, toolName) {
381
- if (toolName !== OWNER_APPROVE_ALWAYS_TOOL)
382
- return;
383
- const address = approvalAddressFromMessage(plugin, commMessage);
384
- if (address)
385
- setPendingAt(address);
386
- }
387
- export function clearPendingOrchestrationTool(plugin, commMessage) {
388
- const address = approvalAddressFromMessage(plugin, commMessage);
389
- if (address)
390
- clearPendingAt(address);
391
- }
392
- export function getPendingOrchestrationTool(plugin, commMessage) {
393
- const address = approvalAddressFromMessage(plugin, commMessage);
394
- return address ? getPendingAt(address) : undefined;
395
- }
396
- function usageLines() {
397
- return [
398
- '用法(bash / icqq):',
399
- ' /approve always bash — 永久跳过 bash 的 Owner 硬确认',
400
- ' /approve always — 同上;须在近期 bash 私聊待确认窗口内',
401
- ' /approve rule <正则> — 为敏感 icqq 命令增加放行规则(匹配整段子命令)',
402
- ' /approve list — 列出永久放行与规则 id',
403
- ' /approve revoke rule <id> — 删除一条规则(id 可用 list 前 8 位)',
404
- ' /approve revoke — 撤销 bash 永久放行(不删规则)',
405
- ].join('\n');
406
- }
407
- const LINE_TERMINATOR_RE = /[\n\r\u2028\u2029]/u;
408
- /**
409
- * 线性解析 `/approve rule <内容>`,返回捕获内容(未 trim),不匹配返回 null。
410
- * 语义等价于正则 `/^\/approve\s+rule\s+(.+)$/iu`(无 m 时 `$` 仅匹配全文末尾、
411
- * `.` 不含换行符;`\s+` 贪婪、必要时回退一个非换行空白给 `.+`),
412
- * 但避免 `\s+` 与 `.+` 在空白字符上的量词重叠回溯(js/polynomial-redos)。
413
- */
414
- function matchApproveRuleArgument(text) {
415
- const head = /^\/approve\s+rule/iu.exec(text);
416
- if (!head)
417
- return null;
418
- const wsStart = head[0].length;
419
- let wsEnd = wsStart;
420
- while (wsEnd < text.length && /\s/u.test(text[wsEnd]))
421
- wsEnd += 1;
422
- if (wsEnd === wsStart)
423
- return null; // `rule` 后必须跟 \s+
424
- const rest = text.slice(wsEnd);
425
- // 捕获段必须延伸到全文末尾且不含换行符,否则任何切分点都不可能匹配。
426
- if (LINE_TERMINATOR_RE.test(rest))
427
- return null;
428
- if (rest.length > 0)
429
- return rest;
430
- // 剩余全是空白:`\s+` 回退一个字符给 `.+`(该字符不能是换行符)。
431
- if (wsEnd - wsStart >= 2) {
432
- const last = text[wsEnd - 1];
433
- if (!LINE_TERMINATOR_RE.test(last))
434
- return last;
435
- }
436
- return null;
437
- }
438
- function ownerCommandAddress(context) {
439
- if (!context.platform || !context.endpoint || !context.ownerId)
440
- return undefined;
441
- return Object.freeze({
442
- platform: context.platform,
443
- endpoint: context.endpoint,
444
- ownerId: context.ownerId,
445
- });
446
- }
447
- /**
448
- * Plugin Runtime Owner `/approve` 命令面(无 host Plugin / CommandFeature)。
449
- * @returns reply text when handled; null when not an approve command.
450
- */
451
- export function handleRuntimeOwnerApproveCommand(context, rawText) {
452
- const text = rawText.trim();
453
- if (!/^\/approve(?:\s|$)/iu.test(text))
454
- return null;
455
- if (context.scope !== 'private' || !context.ownerId || context.subjectId !== context.ownerId) {
456
- return '⚠️ 仅 Endpoint Owner 可在私聊中使用此指令。需在插件配置中设置 master/owner。';
457
- }
458
- if (/^\/approve\s+always\s+bash\s*$/iu.test(text)) {
459
- const address = ownerCommandAddress(context);
460
- if (!address) {
461
- return `⚠️ 当前 Endpoint 未配置 owner\n${usageLines()}`;
462
- }
463
- setBashAlwaysAt(address, true);
464
- return '✅ 已对 bash 永久放行 Owner 硬确认(本 Bot)。后续 bash 需确认时将不再弹窗;若当前仍有一条待回复的 bash 确认,本轮仍需输入 yes。';
465
- }
466
- if (/^\/approve\s+always\s*$/iu.test(text)) {
467
- const address = ownerCommandAddress(context);
468
- const pending = address ? getPendingAt(address) : undefined;
469
- if (!pending) {
470
- return `⚠️ 无近期 bash 待确认上下文,请使用:/approve always bash。\n${usageLines()}`;
471
- }
472
- setBashAlwaysAt(address, true);
473
- clearPendingAt(address);
474
- return '✅ 已对 bash 永久放行 Owner 硬确认(本 Bot)。';
475
- }
476
- const revokeRule = text.match(/^\/approve\s+revoke\s+rule\s+(\S+)\s*$/iu);
477
- if (revokeRule) {
478
- const address = ownerCommandAddress(context);
479
- const r = address
480
- ? removeBashApproveRuleAt(address, revokeRule[1])
481
- : { ok: false, error: '缺少 platform/endpointKey 或未配置 owner。' };
482
- if (!r.ok)
483
- return `⚠️ ${r.error}`;
484
- return '✅ 已删除该放行规则。';
485
- }
486
- const ruleArgument = matchApproveRuleArgument(text);
487
- if (ruleArgument !== null) {
488
- const address = ownerCommandAddress(context);
489
- const r = address
490
- ? addBashApproveRuleAt(address, ruleArgument.trim())
491
- : { ok: false, error: '缺少 platform/endpointKey 或未配置 owner。' };
492
- if (!r.ok)
493
- return `⚠️ ${r.error}`;
494
- return `✅ 已添加规则 id=${r.id.slice(0, 8)}… ,匹配子命令时将不再要求 Owner 确认(仍受危险命令黑名单等约束)。`;
495
- }
496
- if (/^\/approve\s+list\s*$/iu.test(text)) {
497
- const address = ownerCommandAddress(context);
498
- return address ? formatBashApproveListAt(address) : 'bash 永久放行: 否\n自定义正则放行: 无';
499
- }
500
- if (/^\/approve\s+revoke\s*$/iu.test(text)) {
501
- const address = ownerCommandAddress(context);
502
- const entry = address ? getEntryAt(address) : undefined;
503
- if (!entry?.bashAlways)
504
- return '⚠️ 当前未对 bash 设置永久放行。';
505
- setBashAlwaysAt(address, false);
506
- return '✅ 已撤销 bash 永久放行(正则规则仍保留,可用 /approve list 查看)。';
507
- }
508
- return `⚠️ 无法解析指令。\n${usageLines()}`;
509
- }
510
- //# sourceMappingURL=owner-approve-always-store.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"owner-approve-always-store.js","sourceRoot":"","sources":["../../src/security/owner-approve-always-store.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAA2C,aAAa,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACpI,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAe,CAAC;AAIzD,MAAM,UAAU,GAAG,2BAA2B,C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AAC;AACvC,CAAC"}
@@ -1,13 +0,0 @@
1
- export interface TurnSandboxAuthority {
2
- readonly workingDirectory: string;
3
- readonly access: 'read-only' | 'workspace-write' | 'danger-full-access';
4
- readonly networkAccess: boolean;
5
- }
6
- /**
7
- * Adds process-local execution authority without placing it in serializable
8
- * model/tool input. The reserved legacy wire field is always discarded.
9
- */
10
- export declare function attachTurnSandboxAuthority(input: Readonly<Record<string, unknown>>, authority: TurnSandboxAuthority): Readonly<Record<string, unknown>>;
11
- /** Only an object issued by attachTurnSandboxAuthority carries this symbol. */
12
- export declare function readTurnSandboxAuthority(input: Readonly<Record<string, unknown>>): TurnSandboxAuthority | undefined;
13
- //# sourceMappingURL=turn-sandbox-authority.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"turn-sandbox-authority.d.ts","sourceRoot":"","sources":["../../src/security/turn-sandbox-authority.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;IACxE,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;CACjC;AAOD;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACxC,SAAS,EAAE,oBAAoB,GAC9B,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAWnC;AAED,+EAA+E;AAC/E,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GACvC,oBAAoB,GAAG,SAAS,CAKlC"}