@zhin.js/agent 1.1.23 → 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 (1179) hide show
  1. package/README.md +46 -24
  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.js +1 -1
  90. package/lib/builtins/builtin-tool-service.js.map +1 -1
  91. package/lib/config/fix-ai-config.d.ts.map +1 -1
  92. package/lib/config/fix-ai-config.js +0 -57
  93. package/lib/config/fix-ai-config.js.map +1 -1
  94. package/lib/config/index.d.ts +2 -1
  95. package/lib/config/index.d.ts.map +1 -1
  96. package/lib/config/index.js +2 -1
  97. package/lib/config/index.js.map +1 -1
  98. package/lib/config/provider-instance.d.ts +3 -3
  99. package/lib/config/provider-instance.d.ts.map +1 -1
  100. package/lib/config/provider-instance.js.map +1 -1
  101. package/lib/config/resolve-five-agent-binding.d.ts +1 -1
  102. package/lib/config/resolve-five-agent-binding.d.ts.map +1 -1
  103. package/lib/config/validate-ai-config.d.ts +0 -1
  104. package/lib/config/validate-ai-config.d.ts.map +1 -1
  105. package/lib/config/validate-ai-config.js +0 -229
  106. package/lib/config/validate-ai-config.js.map +1 -1
  107. package/lib/config/zhin-agent-config.d.ts +1 -1
  108. package/lib/config/zhin-agent-config.d.ts.map +1 -1
  109. package/lib/config/zhin-agent-defaults.js +4 -4
  110. package/lib/config/zhin-agent-dependencies.d.ts +5 -5
  111. package/lib/config/zhin-agent-dependencies.d.ts.map +1 -1
  112. package/lib/context/agents-instruction.d.ts +0 -1
  113. package/lib/context/agents-instruction.d.ts.map +1 -1
  114. package/lib/context/agents-instruction.js +1 -14
  115. package/lib/context/agents-instruction.js.map +1 -1
  116. package/lib/context/context-system.d.ts.map +1 -1
  117. package/lib/context/context-system.js +2 -2
  118. package/lib/context/context-system.js.map +1 -1
  119. package/lib/context/index.d.ts +1 -1
  120. package/lib/context/index.d.ts.map +1 -1
  121. package/lib/context/index.js +1 -1
  122. package/lib/context/index.js.map +1 -1
  123. package/lib/context/turn-user-message.d.ts.map +1 -1
  124. package/lib/context/turn-user-message.js +1 -2
  125. package/lib/context/turn-user-message.js.map +1 -1
  126. package/lib/core/agent-core-run.d.ts.map +1 -1
  127. package/lib/core/agent-core-run.js +17 -16
  128. package/lib/core/agent-core-run.js.map +1 -1
  129. package/lib/core/agent-loop-standalone.d.ts +2 -1
  130. package/lib/core/agent-loop-standalone.d.ts.map +1 -1
  131. package/lib/core/agent-loop-standalone.js +19 -18
  132. package/lib/core/agent-loop-standalone.js.map +1 -1
  133. package/lib/core/tool-calls-user-format.d.ts.map +1 -1
  134. package/lib/core/tool-calls-user-format.js +2 -76
  135. package/lib/core/tool-calls-user-format.js.map +1 -1
  136. package/lib/create-agent-session.d.ts +1 -1
  137. package/lib/create-agent-session.d.ts.map +1 -1
  138. package/lib/create-agent-session.js +2 -2
  139. package/lib/create-agent-session.js.map +1 -1
  140. package/lib/data-governance/disclosure-authority.d.ts +38 -0
  141. package/lib/data-governance/disclosure-authority.d.ts.map +1 -0
  142. package/lib/data-governance/disclosure-authority.js +2 -0
  143. package/lib/data-governance/disclosure-authority.js.map +1 -0
  144. package/lib/deferred-worker-runner.d.ts +2 -1
  145. package/lib/deferred-worker-runner.d.ts.map +1 -1
  146. package/lib/deferred-worker-runner.js +6 -4
  147. package/lib/deferred-worker-runner.js.map +1 -1
  148. package/lib/discovery/agent-surface-info.d.ts +5 -9
  149. package/lib/discovery/agent-surface-info.d.ts.map +1 -1
  150. package/lib/discovery/agent-surface-info.js +81 -45
  151. package/lib/discovery/agent-surface-info.js.map +1 -1
  152. package/lib/discovery/agent-surface.d.ts +2 -22
  153. package/lib/discovery/agent-surface.d.ts.map +1 -1
  154. package/lib/discovery/agent-surface.js +72 -287
  155. package/lib/discovery/agent-surface.js.map +1 -1
  156. package/lib/discovery/agents.d.ts +10 -12
  157. package/lib/discovery/agents.d.ts.map +1 -1
  158. package/lib/discovery/agents.js +91 -90
  159. package/lib/discovery/agents.js.map +1 -1
  160. package/lib/discovery/utils.d.ts +2 -15
  161. package/lib/discovery/utils.d.ts.map +1 -1
  162. package/lib/discovery/utils.js +2 -76
  163. package/lib/discovery/utils.js.map +1 -1
  164. package/lib/event/agent-stream-hooks.d.ts +0 -2
  165. package/lib/event/agent-stream-hooks.d.ts.map +1 -1
  166. package/lib/event/agent-stream-hooks.js +0 -8
  167. package/lib/event/agent-stream-hooks.js.map +1 -1
  168. package/lib/event/ai-event-bus.d.ts +13 -0
  169. package/lib/event/ai-event-bus.d.ts.map +1 -0
  170. package/lib/event/ai-event-bus.js +45 -0
  171. package/lib/event/ai-event-bus.js.map +1 -0
  172. package/lib/event/event-emitter.d.ts +8 -14
  173. package/lib/event/event-emitter.d.ts.map +1 -1
  174. package/lib/event/event-emitter.js +7 -37
  175. package/lib/event/event-emitter.js.map +1 -1
  176. package/lib/index.d.ts +42 -75
  177. package/lib/index.d.ts.map +1 -1
  178. package/lib/index.js +29 -59
  179. package/lib/index.js.map +1 -1
  180. package/lib/init/activate-ai-database-storage.d.ts +1 -1
  181. package/lib/init/activate-ai-database-storage.d.ts.map +1 -1
  182. package/lib/init/activate-ai-database-storage.js +28 -32
  183. package/lib/init/activate-ai-database-storage.js.map +1 -1
  184. package/lib/init/compose-zhin-agent-runtime.d.ts +2 -0
  185. package/lib/init/compose-zhin-agent-runtime.d.ts.map +1 -1
  186. package/lib/init/compose-zhin-agent-runtime.js +1 -0
  187. package/lib/init/compose-zhin-agent-runtime.js.map +1 -1
  188. package/lib/init/configure-zhin-agent.d.ts +3 -4
  189. package/lib/init/configure-zhin-agent.d.ts.map +1 -1
  190. package/lib/init/configure-zhin-agent.js +9 -7
  191. package/lib/init/configure-zhin-agent.js.map +1 -1
  192. package/lib/init/define-ai-database-models.js +1 -1
  193. package/lib/init/dispose-zhin-agent.d.ts +1 -1
  194. package/lib/init/dispose-zhin-agent.d.ts.map +1 -1
  195. package/lib/init/dispose-zhin-agent.js +0 -1
  196. package/lib/init/dispose-zhin-agent.js.map +1 -1
  197. package/lib/init/runtime-management-commands.d.ts +1 -2
  198. package/lib/init/runtime-management-commands.d.ts.map +1 -1
  199. package/lib/init/runtime-management-commands.js.map +1 -1
  200. package/lib/internal/agent-host.d.ts +10 -5
  201. package/lib/internal/agent-host.d.ts.map +1 -1
  202. package/lib/internal/host-types.d.ts +5 -7
  203. package/lib/internal/host-types.d.ts.map +1 -1
  204. package/lib/mcp-client/bridge.d.ts +1 -2
  205. package/lib/mcp-client/bridge.d.ts.map +1 -1
  206. package/lib/mcp-client/bridge.js +1 -2
  207. package/lib/mcp-client/bridge.js.map +1 -1
  208. package/lib/media/media-publisher.d.ts +1 -1
  209. package/lib/media/media-publisher.d.ts.map +1 -1
  210. package/lib/media/media-router.d.ts +4 -7
  211. package/lib/media/media-router.d.ts.map +1 -1
  212. package/lib/media/media-router.js +10 -26
  213. package/lib/media/media-router.js.map +1 -1
  214. package/lib/media/media-types.d.ts +4 -0
  215. package/lib/media/media-types.d.ts.map +1 -1
  216. package/lib/media/media-types.js.map +1 -1
  217. package/lib/media/resolve-config.d.ts +0 -1
  218. package/lib/media/resolve-config.d.ts.map +1 -1
  219. package/lib/media/resolve-config.js +0 -3
  220. package/lib/media/resolve-config.js.map +1 -1
  221. package/lib/media/subagent-inbound.d.ts +3 -2
  222. package/lib/media/subagent-inbound.d.ts.map +1 -1
  223. package/lib/media/subagent-inbound.js +5 -8
  224. package/lib/media/subagent-inbound.js.map +1 -1
  225. package/lib/memory/ai-compaction-strategy.d.ts +3 -2
  226. package/lib/memory/ai-compaction-strategy.d.ts.map +1 -1
  227. package/lib/memory/ai-compaction-strategy.js +4 -1
  228. package/lib/memory/ai-compaction-strategy.js.map +1 -1
  229. package/lib/memory/compaction-runtime.d.ts +23 -14
  230. package/lib/memory/compaction-runtime.d.ts.map +1 -1
  231. package/lib/memory/compaction-runtime.js +92 -76
  232. package/lib/memory/compaction-runtime.js.map +1 -1
  233. package/lib/memory/context-repository-store.js +1 -1
  234. package/lib/memory/context-repository-store.js.map +1 -1
  235. package/lib/memory/index.d.ts +2 -2
  236. package/lib/memory/index.d.ts.map +1 -1
  237. package/lib/memory/index.js +1 -1
  238. package/lib/memory/index.js.map +1 -1
  239. package/lib/memory/memory-system.d.ts.map +1 -1
  240. package/lib/memory/memory-system.js +5 -6
  241. package/lib/memory/memory-system.js.map +1 -1
  242. package/lib/memory-layers.d.ts +2 -6
  243. package/lib/memory-layers.d.ts.map +1 -1
  244. package/lib/memory-layers.js +23 -75
  245. package/lib/memory-layers.js.map +1 -1
  246. package/lib/orchestration/five-agent/index.d.ts.map +1 -0
  247. package/lib/orchestration/five-agent/index.js.map +1 -0
  248. package/lib/orchestration/five-agent/prompts.d.ts.map +1 -0
  249. package/lib/orchestration/five-agent/prompts.js.map +1 -0
  250. package/lib/orchestration/five-agent/role-capability-policy.d.ts.map +1 -0
  251. package/lib/orchestration/five-agent/role-capability-policy.js.map +1 -0
  252. package/lib/orchestration/five-agent/roles.d.ts.map +1 -0
  253. package/lib/orchestration/five-agent/roles.js.map +1 -0
  254. package/lib/plugin-ai-hook-bus.d.ts +3 -7
  255. package/lib/plugin-ai-hook-bus.d.ts.map +1 -1
  256. package/lib/plugin-ai-hook-bus.js +1 -7
  257. package/lib/plugin-ai-hook-bus.js.map +1 -1
  258. package/lib/plugin-runtime/agent-event-bus.d.ts +4 -0
  259. package/lib/plugin-runtime/agent-event-bus.d.ts.map +1 -0
  260. package/lib/plugin-runtime/agent-event-bus.js +4 -0
  261. package/lib/plugin-runtime/agent-event-bus.js.map +1 -0
  262. package/lib/plugin-runtime/agent-host-port.d.ts +0 -6
  263. package/lib/plugin-runtime/agent-host-port.d.ts.map +1 -1
  264. package/lib/plugin-runtime/agent-host-port.js.map +1 -1
  265. package/lib/plugin-runtime/agent-runtime.d.ts +1 -1
  266. package/lib/plugin-runtime/agent-runtime.d.ts.map +1 -1
  267. package/lib/plugin-runtime/agent-runtime.js +9 -4
  268. package/lib/plugin-runtime/agent-runtime.js.map +1 -1
  269. package/lib/plugin-runtime/capability-ingress.d.ts +1 -1
  270. package/lib/plugin-runtime/capability-ingress.d.ts.map +1 -1
  271. package/lib/plugin-runtime/capability-ingress.js +60 -16
  272. package/lib/plugin-runtime/capability-ingress.js.map +1 -1
  273. package/lib/plugin-runtime/capability-tools.d.ts.map +1 -1
  274. package/lib/plugin-runtime/capability-tools.js +5 -3
  275. package/lib/plugin-runtime/capability-tools.js.map +1 -1
  276. package/lib/plugin-runtime/deferred-capability-plan.d.ts.map +1 -1
  277. package/lib/plugin-runtime/deferred-capability-plan.js +50 -21
  278. package/lib/plugin-runtime/deferred-capability-plan.js.map +1 -1
  279. package/lib/plugin-runtime/file-edit-quote-utils.d.ts.map +1 -0
  280. package/lib/plugin-runtime/file-edit-quote-utils.js.map +1 -0
  281. package/lib/plugin-runtime/full-agent-turn-engine.d.ts.map +1 -1
  282. package/lib/plugin-runtime/full-agent-turn-engine.js +10 -10
  283. package/lib/plugin-runtime/full-agent-turn-engine.js.map +1 -1
  284. package/lib/plugin-runtime/github-actions-delivery-provider.d.ts +44 -0
  285. package/lib/plugin-runtime/github-actions-delivery-provider.d.ts.map +1 -0
  286. package/lib/plugin-runtime/github-actions-delivery-provider.js +246 -0
  287. package/lib/plugin-runtime/github-actions-delivery-provider.js.map +1 -0
  288. package/lib/plugin-runtime/github-exact-merge-gateway.d.ts +62 -0
  289. package/lib/plugin-runtime/github-exact-merge-gateway.d.ts.map +1 -0
  290. package/lib/plugin-runtime/github-exact-merge-gateway.js +79 -0
  291. package/lib/plugin-runtime/github-exact-merge-gateway.js.map +1 -0
  292. package/lib/plugin-runtime/github-workroom-capability.d.ts +15 -0
  293. package/lib/plugin-runtime/github-workroom-capability.d.ts.map +1 -0
  294. package/lib/plugin-runtime/github-workroom-capability.js +79 -0
  295. package/lib/plugin-runtime/github-workroom-capability.js.map +1 -0
  296. package/lib/plugin-runtime/host-tool-projection.d.ts +1 -1
  297. package/lib/plugin-runtime/host-tool-projection.d.ts.map +1 -1
  298. package/lib/plugin-runtime/host-tool-projection.js +5 -3
  299. package/lib/plugin-runtime/host-tool-projection.js.map +1 -1
  300. package/lib/plugin-runtime/index.d.ts +28 -1
  301. package/lib/plugin-runtime/index.d.ts.map +1 -1
  302. package/lib/plugin-runtime/index.js +25 -1
  303. package/lib/plugin-runtime/index.js.map +1 -1
  304. package/lib/plugin-runtime/native-bash-tool.d.ts +35 -0
  305. package/lib/plugin-runtime/native-bash-tool.d.ts.map +1 -0
  306. package/lib/plugin-runtime/native-bash-tool.js +110 -0
  307. package/lib/plugin-runtime/native-bash-tool.js.map +1 -0
  308. package/lib/plugin-runtime/native-file-tools.d.ts.map +1 -1
  309. package/lib/plugin-runtime/native-file-tools.js +10 -9
  310. package/lib/plugin-runtime/native-file-tools.js.map +1 -1
  311. package/lib/plugin-runtime/native-image-tool.d.ts +12 -0
  312. package/lib/plugin-runtime/native-image-tool.d.ts.map +1 -0
  313. package/lib/plugin-runtime/native-image-tool.js +73 -0
  314. package/lib/plugin-runtime/native-image-tool.js.map +1 -0
  315. package/lib/plugin-runtime/native-interaction-tools.js +1 -1
  316. package/lib/plugin-runtime/native-interaction-tools.js.map +1 -1
  317. package/lib/plugin-runtime/native-knowledge-tool.d.ts +34 -0
  318. package/lib/plugin-runtime/native-knowledge-tool.d.ts.map +1 -0
  319. package/lib/plugin-runtime/native-knowledge-tool.js +170 -0
  320. package/lib/plugin-runtime/native-knowledge-tool.js.map +1 -0
  321. package/lib/plugin-runtime/native-semantic-memory-tools.js +2 -2
  322. package/lib/plugin-runtime/native-semantic-memory-tools.js.map +1 -1
  323. package/lib/plugin-runtime/native-todo-tools.js +2 -2
  324. package/lib/plugin-runtime/native-todo-tools.js.map +1 -1
  325. package/lib/plugin-runtime/native-tool-suite.d.ts +15 -0
  326. package/lib/plugin-runtime/native-tool-suite.d.ts.map +1 -0
  327. package/lib/plugin-runtime/native-tool-suite.js +18 -0
  328. package/lib/plugin-runtime/native-tool-suite.js.map +1 -0
  329. package/lib/plugin-runtime/native-web-tools.d.ts.map +1 -1
  330. package/lib/plugin-runtime/native-web-tools.js +6 -19
  331. package/lib/plugin-runtime/native-web-tools.js.map +1 -1
  332. package/lib/plugin-runtime/schedule-capability-plan.js +6 -1
  333. package/lib/plugin-runtime/schedule-capability-plan.js.map +1 -1
  334. package/lib/plugin-runtime/self-delivery-project-composition.d.ts +25 -0
  335. package/lib/plugin-runtime/self-delivery-project-composition.d.ts.map +1 -0
  336. package/lib/plugin-runtime/self-delivery-project-composition.js +85 -0
  337. package/lib/plugin-runtime/self-delivery-project-composition.js.map +1 -0
  338. package/lib/plugin-runtime/self-delivery-project.d.ts +65 -0
  339. package/lib/plugin-runtime/self-delivery-project.d.ts.map +1 -0
  340. package/lib/plugin-runtime/self-delivery-project.js +140 -0
  341. package/lib/plugin-runtime/self-delivery-project.js.map +1 -0
  342. package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts +1 -1
  343. package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts.map +1 -1
  344. package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts +1 -1
  345. package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts.map +1 -1
  346. package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts +1 -1
  347. package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts.map +1 -1
  348. package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts +3 -77
  349. package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts.map +1 -1
  350. package/lib/plugin-runtime/workroom-assignment-authority-provider.js +10 -110
  351. package/lib/plugin-runtime/workroom-assignment-authority-provider.js.map +1 -1
  352. package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts +1 -1
  353. package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts.map +1 -1
  354. package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts +4 -38
  355. package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts.map +1 -1
  356. package/lib/plugin-runtime/workroom-data-governance-runtime.js +1 -1
  357. package/lib/plugin-runtime/workroom-data-governance-runtime.js.map +1 -1
  358. package/lib/plugin-runtime/workroom-delivery-gateway.d.ts +96 -0
  359. package/lib/plugin-runtime/workroom-delivery-gateway.d.ts.map +1 -0
  360. package/lib/plugin-runtime/workroom-delivery-gateway.js +129 -0
  361. package/lib/plugin-runtime/workroom-delivery-gateway.js.map +1 -0
  362. package/lib/plugin-runtime/workroom-effect-composition.d.ts.map +1 -1
  363. package/lib/plugin-runtime/workroom-effect-composition.js +12 -1
  364. package/lib/plugin-runtime/workroom-effect-composition.js.map +1 -1
  365. package/lib/plugin-runtime/workroom-effect-production.d.ts +5 -0
  366. package/lib/plugin-runtime/workroom-effect-production.d.ts.map +1 -1
  367. package/lib/plugin-runtime/workroom-effect-production.js +22 -3
  368. package/lib/plugin-runtime/workroom-effect-production.js.map +1 -1
  369. package/lib/plugin-runtime/workroom-effect-runtime.d.ts +1 -17
  370. package/lib/plugin-runtime/workroom-effect-runtime.d.ts.map +1 -1
  371. package/lib/plugin-runtime/workroom-effect-runtime.js +77 -17
  372. package/lib/plugin-runtime/workroom-effect-runtime.js.map +1 -1
  373. package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts +8 -3
  374. package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts.map +1 -1
  375. package/lib/plugin-runtime/workroom-governed-dispatch-composition.js +21 -18
  376. package/lib/plugin-runtime/workroom-governed-dispatch-composition.js.map +1 -1
  377. package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts +1 -1
  378. package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts.map +1 -1
  379. package/lib/plugin-runtime/workroom-journal-payload-composition.js +1 -1
  380. package/lib/plugin-runtime/workroom-journal-payload-composition.js.map +1 -1
  381. package/lib/plugin-runtime/workroom-local-agent-core-adapter.js +3 -3
  382. package/lib/plugin-runtime/workroom-local-agent-core-adapter.js.map +1 -1
  383. package/lib/plugin-runtime/workroom-local-agent-loop.d.ts +1 -1
  384. package/lib/plugin-runtime/workroom-local-agent-loop.d.ts.map +1 -1
  385. package/lib/{workroom/local-assignment-executor.d.ts → plugin-runtime/workroom-local-assignment-executor.d.ts} +4 -4
  386. package/lib/plugin-runtime/workroom-local-assignment-executor.d.ts.map +1 -0
  387. package/lib/{workroom/local-assignment-executor.js → plugin-runtime/workroom-local-assignment-executor.js} +3 -3
  388. package/lib/plugin-runtime/workroom-local-assignment-executor.js.map +1 -0
  389. package/lib/plugin-runtime/workroom-local-assignment-runtime.js +1 -1
  390. package/lib/plugin-runtime/workroom-local-assignment-runtime.js.map +1 -1
  391. package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts +1 -1
  392. package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts.map +1 -1
  393. package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts +1 -1
  394. package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts.map +1 -1
  395. package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts +1 -1
  396. package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts.map +1 -1
  397. package/lib/plugin-runtime/workroom-preemption-runtime.d.ts +1 -1
  398. package/lib/plugin-runtime/workroom-preemption-runtime.d.ts.map +1 -1
  399. package/lib/plugin-runtime/workroom-priority-authority.d.ts +11 -3
  400. package/lib/plugin-runtime/workroom-priority-authority.d.ts.map +1 -1
  401. package/lib/plugin-runtime/workroom-priority-authority.js +51 -47
  402. package/lib/plugin-runtime/workroom-priority-authority.js.map +1 -1
  403. package/lib/plugin-runtime/workroom-projection-outbound.d.ts +1 -1
  404. package/lib/plugin-runtime/workroom-projection-outbound.d.ts.map +1 -1
  405. package/lib/plugin-runtime/workroom-projection-runtime.d.ts +3 -3
  406. package/lib/plugin-runtime/workroom-projection-runtime.d.ts.map +1 -1
  407. package/lib/plugin-runtime/workroom-projection-runtime.js +1 -1
  408. package/lib/plugin-runtime/workroom-projection-runtime.js.map +1 -1
  409. package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts +2 -2
  410. package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts.map +1 -1
  411. package/lib/plugin-runtime/workroom-remote-executor.d.ts +1 -12
  412. package/lib/plugin-runtime/workroom-remote-executor.d.ts.map +1 -1
  413. package/lib/plugin-runtime/workroom-remote-executor.js +1 -20
  414. package/lib/plugin-runtime/workroom-remote-executor.js.map +1 -1
  415. package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts +1 -1
  416. package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts.map +1 -1
  417. package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts +1 -1
  418. package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts.map +1 -1
  419. package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts +1 -1
  420. package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts.map +1 -1
  421. package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts +1 -1
  422. package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts.map +1 -1
  423. package/lib/prompt/assembly.d.ts.map +1 -1
  424. package/lib/prompt/assembly.js +1 -2
  425. package/lib/prompt/assembly.js.map +1 -1
  426. package/lib/prompt/git-context.d.ts +0 -2
  427. package/lib/prompt/git-context.d.ts.map +1 -1
  428. package/lib/prompt/git-context.js +1 -12
  429. package/lib/prompt/git-context.js.map +1 -1
  430. package/lib/prompt/index.d.ts +1 -1
  431. package/lib/prompt/index.d.ts.map +1 -1
  432. package/lib/prompt/index.js +1 -1
  433. package/lib/prompt/index.js.map +1 -1
  434. package/lib/prompt/prompt-assembly-registry.d.ts +1 -1
  435. package/lib/prompt/prompt-assembly-registry.d.ts.map +1 -1
  436. package/lib/prompt/prompt-assembly-registry.js.map +1 -1
  437. package/lib/prompt/system-prompt.d.ts +1 -1
  438. package/lib/prompt/system-prompt.d.ts.map +1 -1
  439. package/lib/prompt/system-prompt.js +1 -2
  440. package/lib/prompt/system-prompt.js.map +1 -1
  441. package/lib/prompt/templates.d.ts +2 -5
  442. package/lib/prompt/templates.d.ts.map +1 -1
  443. package/lib/prompt/templates.js +2 -16
  444. package/lib/prompt/templates.js.map +1 -1
  445. package/lib/prompt/workspace-prompt.d.ts +0 -1
  446. package/lib/prompt/workspace-prompt.d.ts.map +1 -1
  447. package/lib/prompt/workspace-prompt.js +1 -14
  448. package/lib/prompt/workspace-prompt.js.map +1 -1
  449. package/lib/reserved-tools.d.ts.map +1 -1
  450. package/lib/reserved-tools.js +0 -3
  451. package/lib/reserved-tools.js.map +1 -1
  452. package/lib/resource-hub/hook-registry.d.ts +1 -1
  453. package/lib/resource-hub/hook-registry.d.ts.map +1 -1
  454. package/lib/resource-hub/hook-registry.js +3 -15
  455. package/lib/resource-hub/hook-registry.js.map +1 -1
  456. package/lib/resource-hub/index.d.ts +4 -16
  457. package/lib/resource-hub/index.d.ts.map +1 -1
  458. package/lib/resource-hub/index.js +3 -20
  459. package/lib/resource-hub/index.js.map +1 -1
  460. package/lib/resource-hub/mcp-registry.js +1 -1
  461. package/lib/resource-hub/mcp-registry.js.map +1 -1
  462. package/lib/resource-hub/public-api.d.ts +0 -1
  463. package/lib/resource-hub/public-api.d.ts.map +1 -1
  464. package/lib/resource-hub/resolve-subagent-tools.d.ts.map +1 -1
  465. package/lib/resource-hub/resolve-subagent-tools.js +6 -4
  466. package/lib/resource-hub/resolve-subagent-tools.js.map +1 -1
  467. package/lib/resource-hub/role-configs.js +4 -4
  468. package/lib/resource-hub/role-configs.js.map +1 -1
  469. package/lib/resource-hub/skill-registry.d.ts +1 -1
  470. package/lib/resource-hub/skill-registry.js +1 -1
  471. package/lib/resource-hub/subagent-registry.d.ts +0 -2
  472. package/lib/resource-hub/subagent-registry.d.ts.map +1 -1
  473. package/lib/resource-hub/subagent-registry.js +0 -2
  474. package/lib/resource-hub/subagent-registry.js.map +1 -1
  475. package/lib/resource-hub/tool-selection.d.ts +4 -30
  476. package/lib/resource-hub/tool-selection.d.ts.map +1 -1
  477. package/lib/resource-hub/tool-selection.js +4 -289
  478. package/lib/resource-hub/tool-selection.js.map +1 -1
  479. package/lib/resource-hub/types.d.ts +6 -1
  480. package/lib/resource-hub/types.d.ts.map +1 -1
  481. package/lib/routing/route-matcher.d.ts +1 -1
  482. package/lib/routing/route-matcher.js +1 -1
  483. package/lib/schedule-manager.d.ts.map +1 -1
  484. package/lib/schedule-manager.js.map +1 -1
  485. package/lib/seam/index.d.ts +3 -3
  486. package/lib/seam/index.d.ts.map +1 -1
  487. package/lib/seam/index.js +1 -1
  488. package/lib/seam/index.js.map +1 -1
  489. package/lib/seam/seam-integration.d.ts +1 -9
  490. package/lib/seam/seam-integration.d.ts.map +1 -1
  491. package/lib/seam/seam-integration.js +0 -18
  492. package/lib/seam/seam-integration.js.map +1 -1
  493. package/lib/seam/skill-service.d.ts +0 -15
  494. package/lib/seam/skill-service.d.ts.map +1 -1
  495. package/lib/seam/tokens.d.ts +0 -3
  496. package/lib/seam/tokens.d.ts.map +1 -1
  497. package/lib/seam/tokens.js +0 -2
  498. package/lib/seam/tokens.js.map +1 -1
  499. package/lib/seam/tool-service.d.ts +3 -3
  500. package/lib/seam/tool-service.d.ts.map +1 -1
  501. package/lib/security/anomaly-detection.d.ts +2 -7
  502. package/lib/security/anomaly-detection.d.ts.map +1 -1
  503. package/lib/security/anomaly-detection.js +2 -20
  504. package/lib/security/anomaly-detection.js.map +1 -1
  505. package/lib/security/audit-logger.d.ts +0 -13
  506. package/lib/security/audit-logger.d.ts.map +1 -1
  507. package/lib/security/audit-logger.js +0 -30
  508. package/lib/security/audit-logger.js.map +1 -1
  509. package/lib/security/comm-message-context.d.ts +4 -0
  510. package/lib/security/comm-message-context.d.ts.map +1 -1
  511. package/lib/security/comm-message-context.js +9 -1
  512. package/lib/security/comm-message-context.js.map +1 -1
  513. package/lib/security/dangerous-tool-policy.d.ts +3 -3
  514. package/lib/security/dangerous-tool-policy.d.ts.map +1 -1
  515. package/lib/security/dangerous-tool-policy.js +8 -28
  516. package/lib/security/dangerous-tool-policy.js.map +1 -1
  517. package/lib/security/exec-policy.d.ts +4 -4
  518. package/lib/security/exec-policy.d.ts.map +1 -1
  519. package/lib/security/exec-policy.js +21 -62
  520. package/lib/security/exec-policy.js.map +1 -1
  521. package/lib/security/file-policy.d.ts.map +1 -1
  522. package/lib/security/file-policy.js +9 -57
  523. package/lib/security/file-policy.js.map +1 -1
  524. package/lib/security/file-role-policy.d.ts +1 -5
  525. package/lib/security/file-role-policy.d.ts.map +1 -1
  526. package/lib/security/file-role-policy.js +1 -25
  527. package/lib/security/file-role-policy.js.map +1 -1
  528. package/lib/security/index.d.ts +1 -1
  529. package/lib/security/index.d.ts.map +1 -1
  530. package/lib/security/index.js +1 -1
  531. package/lib/security/index.js.map +1 -1
  532. package/lib/security/owner-approval-contracts.d.ts +6 -0
  533. package/lib/security/owner-approval-contracts.d.ts.map +1 -0
  534. package/lib/security/owner-approval-contracts.js +2 -0
  535. package/lib/security/owner-approval-contracts.js.map +1 -0
  536. package/lib/security/owner-approval-runtime.d.ts +39 -0
  537. package/lib/security/owner-approval-runtime.d.ts.map +1 -0
  538. package/lib/security/owner-approval-runtime.js +159 -0
  539. package/lib/security/owner-approval-runtime.js.map +1 -0
  540. package/lib/security/owner-approval-store.d.ts +34 -0
  541. package/lib/security/owner-approval-store.d.ts.map +1 -0
  542. package/lib/security/owner-approval-store.js +154 -0
  543. package/lib/security/owner-approval-store.js.map +1 -0
  544. package/lib/security/policy-facade.d.ts +8 -15
  545. package/lib/security/policy-facade.d.ts.map +1 -1
  546. package/lib/security/policy-facade.js +33 -38
  547. package/lib/security/policy-facade.js.map +1 -1
  548. package/lib/security/sandbox.d.ts +0 -13
  549. package/lib/security/sandbox.d.ts.map +1 -1
  550. package/lib/security/sandbox.js +0 -21
  551. package/lib/security/sandbox.js.map +1 -1
  552. package/lib/security/turn-file-authority.d.ts.map +1 -1
  553. package/lib/security/turn-file-authority.js +0 -1
  554. package/lib/security/turn-file-authority.js.map +1 -1
  555. package/lib/service.d.ts +15 -19
  556. package/lib/service.d.ts.map +1 -1
  557. package/lib/service.js +42 -39
  558. package/lib/service.js.map +1 -1
  559. package/lib/session/approval-port.d.ts +16 -0
  560. package/lib/session/approval-port.d.ts.map +1 -1
  561. package/lib/session/approval-port.js.map +1 -1
  562. package/lib/session/approval-review-agent.d.ts +29 -0
  563. package/lib/session/approval-review-agent.d.ts.map +1 -0
  564. package/lib/session/approval-review-agent.js +183 -0
  565. package/lib/session/approval-review-agent.js.map +1 -0
  566. package/lib/session/branch-summarization-runtime.d.ts.map +1 -1
  567. package/lib/session/branch-summarization-runtime.js +3 -2
  568. package/lib/session/branch-summarization-runtime.js.map +1 -1
  569. package/lib/session/index.d.ts +2 -2
  570. package/lib/session/index.d.ts.map +1 -1
  571. package/lib/session/index.js +2 -2
  572. package/lib/session/index.js.map +1 -1
  573. package/lib/session/session-io.d.ts +7 -14
  574. package/lib/session/session-io.d.ts.map +1 -1
  575. package/lib/session/session-io.js +14 -47
  576. package/lib/session/session-io.js.map +1 -1
  577. package/lib/session/turn-ingress-session.d.ts +2 -5
  578. package/lib/session/turn-ingress-session.d.ts.map +1 -1
  579. package/lib/session/turn-ingress-session.js +8 -51
  580. package/lib/session/turn-ingress-session.js.map +1 -1
  581. package/lib/skill/skill-instruction-reader-factory.d.ts +5 -0
  582. package/lib/skill/skill-instruction-reader-factory.d.ts.map +1 -0
  583. package/lib/skill/skill-instruction-reader-factory.js +13 -0
  584. package/lib/skill/skill-instruction-reader-factory.js.map +1 -0
  585. package/lib/skill/skill-instruction-reader.d.ts +22 -0
  586. package/lib/skill/skill-instruction-reader.d.ts.map +1 -0
  587. package/lib/skill/skill-instruction-reader.js +44 -0
  588. package/lib/skill/skill-instruction-reader.js.map +1 -0
  589. package/lib/skill/skill-instructions.d.ts +5 -0
  590. package/lib/skill/skill-instructions.d.ts.map +1 -0
  591. package/lib/skill/skill-instructions.js +78 -0
  592. package/lib/skill/skill-instructions.js.map +1 -0
  593. package/lib/skill/skill-system.js +3 -3
  594. package/lib/skill/skill-system.js.map +1 -1
  595. package/lib/{builtin → spawn}/spawn-task-tool.d.ts +5 -6
  596. package/lib/spawn/spawn-task-tool.d.ts.map +1 -0
  597. package/lib/{builtin → spawn}/spawn-task-tool.js +17 -15
  598. package/lib/spawn/spawn-task-tool.js.map +1 -0
  599. package/lib/stability/memory-pressure.d.ts +5 -4
  600. package/lib/stability/memory-pressure.d.ts.map +1 -1
  601. package/lib/stability/memory-pressure.js +14 -23
  602. package/lib/stability/memory-pressure.js.map +1 -1
  603. package/lib/standalone/standalone-tool-catalog.d.ts +13 -0
  604. package/lib/standalone/standalone-tool-catalog.d.ts.map +1 -0
  605. package/lib/standalone/standalone-tool-catalog.js +46 -0
  606. package/lib/standalone/standalone-tool-catalog.js.map +1 -0
  607. package/lib/subagent/subagent-runtime.d.ts +7 -5
  608. package/lib/subagent/subagent-runtime.d.ts.map +1 -1
  609. package/lib/subagent/subagent-runtime.js +13 -16
  610. package/lib/subagent/subagent-runtime.js.map +1 -1
  611. package/lib/subagent/subagent-system-init.d.ts +2 -1
  612. package/lib/subagent/subagent-system-init.d.ts.map +1 -1
  613. package/lib/subagent/subagent-system-init.js +1 -0
  614. package/lib/subagent/subagent-system-init.js.map +1 -1
  615. package/lib/subagent-ai-events.d.ts +3 -2
  616. package/lib/subagent-ai-events.d.ts.map +1 -1
  617. package/lib/subagent-ai-events.js.map +1 -1
  618. package/lib/subagent-parent-context.js +1 -1
  619. package/lib/subagent-parent-context.js.map +1 -1
  620. package/lib/subagent-prompt.d.ts +1 -1
  621. package/lib/subagent-prompt.js +2 -5
  622. package/lib/subagent-prompt.js.map +1 -1
  623. package/lib/task-executor.d.ts +2 -14
  624. package/lib/task-executor.d.ts.map +1 -1
  625. package/lib/task-executor.js +2 -11
  626. package/lib/task-executor.js.map +1 -1
  627. package/lib/tool/builtin-policy-extractors.d.ts +2 -1
  628. package/lib/tool/builtin-policy-extractors.d.ts.map +1 -1
  629. package/lib/tool/builtin-policy-extractors.js +18 -15
  630. package/lib/tool/builtin-policy-extractors.js.map +1 -1
  631. package/lib/tool/context-tools.js +1 -1
  632. package/lib/tool/context-tools.js.map +1 -1
  633. package/lib/tool/conversation-reference-tool.d.ts.map +1 -1
  634. package/lib/tool/conversation-reference-tool.js +1 -1
  635. package/lib/tool/conversation-reference-tool.js.map +1 -1
  636. package/lib/tool/deferred-resolution.js +2 -2
  637. package/lib/tool/deferred-resolution.js.map +1 -1
  638. package/lib/tool/executable-tool-registry.d.ts +11 -0
  639. package/lib/tool/executable-tool-registry.d.ts.map +1 -0
  640. package/lib/tool/executable-tool-registry.js +25 -0
  641. package/lib/tool/executable-tool-registry.js.map +1 -0
  642. package/lib/tool/index.d.ts +1 -1
  643. package/lib/tool/index.d.ts.map +1 -1
  644. package/lib/tool/index.js +1 -1
  645. package/lib/tool/index.js.map +1 -1
  646. package/lib/tool/prepare-turn-tools.d.ts.map +1 -1
  647. package/lib/tool/prepare-turn-tools.js +1 -2
  648. package/lib/tool/prepare-turn-tools.js.map +1 -1
  649. package/lib/tool/sources.d.ts.map +1 -1
  650. package/lib/tool/sources.js +5 -4
  651. package/lib/tool/sources.js.map +1 -1
  652. package/lib/tool/tool-approval-gate.d.ts +1 -2
  653. package/lib/tool/tool-approval-gate.d.ts.map +1 -1
  654. package/lib/tool/tool-approval-gate.js +24 -0
  655. package/lib/tool/tool-approval-gate.js.map +1 -1
  656. package/lib/tool/tool-execution-authority.d.ts +26 -0
  657. package/lib/tool/tool-execution-authority.d.ts.map +1 -0
  658. package/lib/tool/tool-execution-authority.js +84 -0
  659. package/lib/tool/tool-execution-authority.js.map +1 -0
  660. package/lib/tool/tool-runtime.d.ts +10 -9
  661. package/lib/tool/tool-runtime.d.ts.map +1 -1
  662. package/lib/tool/tool-runtime.js +77 -79
  663. package/lib/tool/tool-runtime.js.map +1 -1
  664. package/lib/tool/tool-system.js +1 -1
  665. package/lib/tool/tool-system.js.map +1 -1
  666. package/lib/tool/turn-tool-runtime.d.ts +6 -2
  667. package/lib/tool/turn-tool-runtime.d.ts.map +1 -1
  668. package/lib/tool/turn-tool-runtime.js +19 -5
  669. package/lib/tool/turn-tool-runtime.js.map +1 -1
  670. package/lib/tool-catalog/deferred-turn-controller.d.ts +2 -2
  671. package/lib/tool-catalog/deferred-turn-controller.d.ts.map +1 -1
  672. package/lib/tool-catalog/deferred-turn-controller.js +4 -4
  673. package/lib/tool-catalog/deferred-turn-controller.js.map +1 -1
  674. package/lib/turn/deferred-auto-continue.js +1 -1
  675. package/lib/turn/deferred-auto-continue.js.map +1 -1
  676. package/lib/turn/deferred-delivery.js +1 -1
  677. package/lib/turn/deferred-delivery.js.map +1 -1
  678. package/lib/turn/inbound-media.d.ts +8 -1
  679. package/lib/turn/inbound-media.d.ts.map +1 -1
  680. package/lib/turn/inbound-media.js +4 -6
  681. package/lib/turn/inbound-media.js.map +1 -1
  682. package/lib/turn/index.d.ts +2 -2
  683. package/lib/turn/index.d.ts.map +1 -1
  684. package/lib/turn/index.js +2 -2
  685. package/lib/turn/index.js.map +1 -1
  686. package/lib/turn/persist-deferred-context.js +1 -1
  687. package/lib/turn/prompt-api.d.ts +3 -4
  688. package/lib/turn/prompt-api.d.ts.map +1 -1
  689. package/lib/turn/prompt-api.js +7 -11
  690. package/lib/turn/prompt-api.js.map +1 -1
  691. package/lib/turn/task-continuation.d.ts +0 -5
  692. package/lib/turn/task-continuation.d.ts.map +1 -1
  693. package/lib/turn/task-continuation.js +0 -15
  694. package/lib/turn/task-continuation.js.map +1 -1
  695. package/lib/turn/turn-ingress.d.ts +1 -1
  696. package/lib/turn/turn-ingress.d.ts.map +1 -1
  697. package/lib/turn/turn-metrics.d.ts +0 -4
  698. package/lib/turn/turn-metrics.d.ts.map +1 -1
  699. package/lib/turn/turn-metrics.js +0 -8
  700. package/lib/turn/turn-metrics.js.map +1 -1
  701. package/lib/turn/turn-pipeline.js +7 -4
  702. package/lib/turn/turn-pipeline.js.map +1 -1
  703. package/lib/typing-indicator/adapter-integration.d.ts +1 -4
  704. package/lib/typing-indicator/adapter-integration.d.ts.map +1 -1
  705. package/lib/typing-indicator/adapter-integration.js.map +1 -1
  706. package/lib/typing-indicator/index.d.ts +0 -17
  707. package/lib/typing-indicator/index.d.ts.map +1 -1
  708. package/lib/typing-indicator/index.js +0 -31
  709. package/lib/typing-indicator/index.js.map +1 -1
  710. package/lib/user-profile.js +1 -1
  711. package/lib/user-profile.js.map +1 -1
  712. package/lib/utils/config-env.d.ts +1 -1
  713. package/lib/utils/config-env.js +1 -1
  714. package/lib/web/bing-search-html.d.ts.map +1 -0
  715. package/lib/{builtin → web}/bing-search-html.js +2 -6
  716. package/lib/web/bing-search-html.js.map +1 -0
  717. package/lib/web/web-search-locale.d.ts +5 -0
  718. package/lib/web/web-search-locale.d.ts.map +1 -0
  719. package/lib/web/web-search-locale.js +13 -0
  720. package/lib/web/web-search-locale.js.map +1 -0
  721. package/lib/{builtin → web}/web-tool-utils.d.ts +0 -1
  722. package/lib/web/web-tool-utils.d.ts.map +1 -0
  723. package/lib/{builtin → web}/web-tool-utils.js +0 -1
  724. package/lib/web/web-tool-utils.js.map +1 -0
  725. package/lib/workroom/acceptance-control.d.ts +2 -1
  726. package/lib/workroom/acceptance-control.d.ts.map +1 -1
  727. package/lib/workroom/acceptance-control.js +12 -2
  728. package/lib/workroom/acceptance-control.js.map +1 -1
  729. package/lib/workroom/accepted-source-memory-application.d.ts +1 -1
  730. package/lib/workroom/accepted-source-memory-application.d.ts.map +1 -1
  731. package/lib/workroom/assignment-authority-grant-application.d.ts +2 -2
  732. package/lib/workroom/assignment-authority-grant-application.d.ts.map +1 -1
  733. package/lib/workroom/assignment-authority-grant-application.js +1 -1
  734. package/lib/workroom/assignment-authority-grant-application.js.map +1 -1
  735. package/lib/workroom/assignment-authority-grant-repository.d.ts +1 -1
  736. package/lib/workroom/assignment-authority-grant-repository.d.ts.map +1 -1
  737. package/lib/workroom/assignment-authority.d.ts +75 -0
  738. package/lib/workroom/assignment-authority.d.ts.map +1 -0
  739. package/lib/workroom/assignment-authority.js +179 -0
  740. package/lib/workroom/assignment-authority.js.map +1 -0
  741. package/lib/workroom/catalog-definition.d.ts +0 -6
  742. package/lib/workroom/catalog-definition.d.ts.map +1 -1
  743. package/lib/workroom/catalog.js +1 -1
  744. package/lib/workroom/catalog.js.map +1 -1
  745. package/lib/workroom/coding-assignment-executor.d.ts +90 -0
  746. package/lib/workroom/coding-assignment-executor.d.ts.map +1 -0
  747. package/lib/workroom/coding-assignment-executor.js +250 -0
  748. package/lib/workroom/coding-assignment-executor.js.map +1 -0
  749. package/lib/workroom/coding-git-objects.d.ts +17 -0
  750. package/lib/workroom/coding-git-objects.d.ts.map +1 -0
  751. package/lib/workroom/coding-git-objects.js +68 -0
  752. package/lib/workroom/coding-git-objects.js.map +1 -0
  753. package/lib/workroom/durable-file-store.d.ts +2 -0
  754. package/lib/workroom/durable-file-store.d.ts.map +1 -1
  755. package/lib/workroom/durable-file-store.js +5 -0
  756. package/lib/workroom/durable-file-store.js.map +1 -1
  757. package/lib/workroom/effect-blocker-repository.d.ts +17 -1
  758. package/lib/workroom/effect-blocker-repository.d.ts.map +1 -1
  759. package/lib/workroom/effect-blocker-repository.js.map +1 -1
  760. package/lib/workroom/effect-ledger.d.ts +21 -1
  761. package/lib/workroom/effect-ledger.d.ts.map +1 -1
  762. package/lib/workroom/effect-ledger.js +44 -3
  763. package/lib/workroom/effect-ledger.js.map +1 -1
  764. package/lib/workroom/file-accepted-source-memory-repository.d.ts.map +1 -1
  765. package/lib/workroom/file-accepted-source-memory-repository.js +6 -3
  766. package/lib/workroom/file-accepted-source-memory-repository.js.map +1 -1
  767. package/lib/workroom/file-coding-execution-store.d.ts +25 -0
  768. package/lib/workroom/file-coding-execution-store.d.ts.map +1 -0
  769. package/lib/workroom/file-coding-execution-store.js +122 -0
  770. package/lib/workroom/file-coding-execution-store.js.map +1 -0
  771. package/lib/workroom/file-effect-ledger.d.ts.map +1 -1
  772. package/lib/workroom/file-effect-ledger.js +6 -3
  773. package/lib/workroom/file-effect-ledger.js.map +1 -1
  774. package/lib/workroom/git-workspace-gateway.d.ts +6 -3
  775. package/lib/workroom/git-workspace-gateway.d.ts.map +1 -1
  776. package/lib/workroom/git-workspace-gateway.js +10 -1
  777. package/lib/workroom/git-workspace-gateway.js.map +1 -1
  778. package/lib/workroom/github-workspace-transport.d.ts +30 -0
  779. package/lib/workroom/github-workspace-transport.d.ts.map +1 -0
  780. package/lib/workroom/github-workspace-transport.js +224 -0
  781. package/lib/workroom/github-workspace-transport.js.map +1 -0
  782. package/lib/{plugin-runtime/workroom-governed-dispatch-reasons.d.ts → workroom/governed-dispatch-reasons.d.ts} +2 -2
  783. package/lib/workroom/governed-dispatch-reasons.d.ts.map +1 -0
  784. package/lib/{plugin-runtime/workroom-governed-dispatch-reasons.js → workroom/governed-dispatch-reasons.js} +1 -1
  785. package/lib/workroom/governed-dispatch-reasons.js.map +1 -0
  786. package/lib/workroom/human-ingress-source-reader.d.ts +3 -3
  787. package/lib/workroom/human-ingress-source-reader.d.ts.map +1 -1
  788. package/lib/workroom/human-ingress-source-reader.js.map +1 -1
  789. package/lib/workroom/journal/activatable-journal.d.ts +15 -0
  790. package/lib/workroom/journal/activatable-journal.d.ts.map +1 -0
  791. package/lib/workroom/journal/activatable-journal.js +39 -0
  792. package/lib/workroom/journal/activatable-journal.js.map +1 -0
  793. package/lib/workroom/{journal.d.ts → journal/contracts.d.ts} +18 -96
  794. package/lib/workroom/journal/contracts.d.ts.map +1 -0
  795. package/lib/workroom/journal/contracts.js +19 -0
  796. package/lib/workroom/journal/contracts.js.map +1 -0
  797. package/lib/workroom/journal/database-journal.d.ts +31 -0
  798. package/lib/workroom/journal/database-journal.d.ts.map +1 -0
  799. package/lib/workroom/journal/database-journal.js +118 -0
  800. package/lib/workroom/journal/database-journal.js.map +1 -0
  801. package/lib/workroom/journal/event-codec.d.ts +26 -0
  802. package/lib/workroom/journal/event-codec.d.ts.map +1 -0
  803. package/lib/workroom/journal/event-codec.js +233 -0
  804. package/lib/workroom/journal/event-codec.js.map +1 -0
  805. package/lib/workroom/journal/event-validation.d.ts +10 -0
  806. package/lib/workroom/journal/event-validation.d.ts.map +1 -0
  807. package/lib/workroom/journal/event-validation.js +671 -0
  808. package/lib/workroom/journal/event-validation.js.map +1 -0
  809. package/lib/workroom/journal/file-journal.d.ts +15 -0
  810. package/lib/workroom/journal/file-journal.d.ts.map +1 -0
  811. package/lib/workroom/journal/file-journal.js +272 -0
  812. package/lib/workroom/journal/file-journal.js.map +1 -0
  813. package/lib/workroom/journal/index.d.ts +9 -0
  814. package/lib/workroom/journal/index.d.ts.map +1 -0
  815. package/lib/workroom/journal/index.js +8 -0
  816. package/lib/workroom/journal/index.js.map +1 -0
  817. package/lib/workroom/journal/memory-journal.d.ts +27 -0
  818. package/lib/workroom/journal/memory-journal.d.ts.map +1 -0
  819. package/lib/workroom/journal/memory-journal.js +103 -0
  820. package/lib/workroom/journal/memory-journal.js.map +1 -0
  821. package/lib/workroom/journal/payload-governance.d.ts +29 -0
  822. package/lib/workroom/journal/payload-governance.d.ts.map +1 -0
  823. package/lib/workroom/journal/payload-governance.js +282 -0
  824. package/lib/workroom/journal/payload-governance.js.map +1 -0
  825. package/lib/workroom/journal/payload-reference.d.ts +9 -0
  826. package/lib/workroom/journal/payload-reference.d.ts.map +1 -0
  827. package/lib/workroom/journal/payload-reference.js +60 -0
  828. package/lib/workroom/journal/payload-reference.js.map +1 -0
  829. package/lib/workroom/journal/stored-event-projection.d.ts +6 -0
  830. package/lib/workroom/journal/stored-event-projection.d.ts.map +1 -0
  831. package/lib/workroom/journal/stored-event-projection.js +280 -0
  832. package/lib/workroom/journal/stored-event-projection.js.map +1 -0
  833. package/lib/workroom/kernel-state.d.ts.map +1 -1
  834. package/lib/workroom/kernel-state.js +35 -3
  835. package/lib/workroom/kernel-state.js.map +1 -1
  836. package/lib/workroom/{projection-outbox.d.ts → projection-outbox/contracts.d.ts} +8 -72
  837. package/lib/workroom/projection-outbox/contracts.d.ts.map +1 -0
  838. package/lib/workroom/projection-outbox/contracts.js +11 -0
  839. package/lib/workroom/projection-outbox/contracts.js.map +1 -0
  840. package/lib/workroom/projection-outbox/delivery-worker.d.ts +22 -0
  841. package/lib/workroom/projection-outbox/delivery-worker.d.ts.map +1 -0
  842. package/lib/workroom/projection-outbox/delivery-worker.js +96 -0
  843. package/lib/workroom/projection-outbox/delivery-worker.js.map +1 -0
  844. package/lib/workroom/projection-outbox/file-repository.d.ts +11 -0
  845. package/lib/workroom/projection-outbox/file-repository.d.ts.map +1 -0
  846. package/lib/workroom/projection-outbox/file-repository.js +89 -0
  847. package/lib/workroom/projection-outbox/file-repository.js.map +1 -0
  848. package/lib/workroom/projection-outbox/index.d.ts +10 -0
  849. package/lib/workroom/projection-outbox/index.d.ts.map +1 -0
  850. package/lib/workroom/projection-outbox/index.js +8 -0
  851. package/lib/workroom/projection-outbox/index.js.map +1 -0
  852. package/lib/workroom/projection-outbox/memory-repository.d.ts +11 -0
  853. package/lib/workroom/projection-outbox/memory-repository.d.ts.map +1 -0
  854. package/lib/workroom/projection-outbox/memory-repository.js +40 -0
  855. package/lib/workroom/projection-outbox/memory-repository.js.map +1 -0
  856. package/lib/workroom/projection-outbox/projector.d.ts +36 -0
  857. package/lib/workroom/projection-outbox/projector.d.ts.map +1 -0
  858. package/lib/workroom/projection-outbox/projector.js +517 -0
  859. package/lib/workroom/projection-outbox/projector.js.map +1 -0
  860. package/lib/workroom/projection-outbox/repository-state.d.ts +17 -0
  861. package/lib/workroom/projection-outbox/repository-state.d.ts.map +1 -0
  862. package/lib/workroom/projection-outbox/repository-state.js +343 -0
  863. package/lib/workroom/projection-outbox/repository-state.js.map +1 -0
  864. package/lib/workroom/projection-outbox/tracer.d.ts +19 -0
  865. package/lib/workroom/projection-outbox/tracer.d.ts.map +1 -0
  866. package/lib/workroom/projection-outbox/tracer.js +201 -0
  867. package/lib/workroom/projection-outbox/tracer.js.map +1 -0
  868. package/lib/workroom/remote-dispatch-admission.d.ts +2 -2
  869. package/lib/workroom/remote-dispatch-admission.d.ts.map +1 -1
  870. package/lib/workroom/remote-dispatch-admission.js +1 -1
  871. package/lib/workroom/remote-dispatch-admission.js.map +1 -1
  872. package/lib/workroom/remote-dispatch-worker.d.ts +1 -1
  873. package/lib/workroom/remote-dispatch-worker.d.ts.map +1 -1
  874. package/lib/workroom/remote-dispatch-worker.js +1 -1
  875. package/lib/workroom/remote-dispatch-worker.js.map +1 -1
  876. package/lib/workroom/remote-executor.d.ts +15 -0
  877. package/lib/workroom/remote-executor.d.ts.map +1 -0
  878. package/lib/workroom/remote-executor.js +21 -0
  879. package/lib/workroom/remote-executor.js.map +1 -0
  880. package/lib/workroom/runtime.d.ts +1 -1
  881. package/lib/workroom/runtime.d.ts.map +1 -1
  882. package/lib/workroom/software-delivery-plan.d.ts +32 -0
  883. package/lib/workroom/software-delivery-plan.d.ts.map +1 -0
  884. package/lib/workroom/software-delivery-plan.js +60 -0
  885. package/lib/workroom/software-delivery-plan.js.map +1 -0
  886. package/lib/workroom/validate-catalog.d.ts +2 -0
  887. package/lib/workroom/validate-catalog.d.ts.map +1 -0
  888. package/lib/workroom/validate-catalog.js +230 -0
  889. package/lib/workroom/validate-catalog.js.map +1 -0
  890. package/lib/workroom/workroom-kernel.d.ts +1 -1
  891. package/lib/workroom/workroom-kernel.d.ts.map +1 -1
  892. package/lib/workroom/workroom-kernel.js +31 -13
  893. package/lib/workroom/workroom-kernel.js.map +1 -1
  894. package/lib/workroom/workroom-preemption.d.ts +1 -1
  895. package/lib/workroom/workroom-preemption.d.ts.map +1 -1
  896. package/lib/workroom/workroom-scheduler-application.d.ts +1 -1
  897. package/lib/workroom/workroom-scheduler-application.d.ts.map +1 -1
  898. package/lib/workroom/workroom-scheduler-application.js +1 -1
  899. package/lib/workroom/workroom-scheduler-application.js.map +1 -1
  900. package/lib/workroom/workroom-scheduler.js +3 -0
  901. package/lib/workroom/workroom-scheduler.js.map +1 -1
  902. package/lib/zhin-agent/index.d.ts +12 -6
  903. package/lib/zhin-agent/index.d.ts.map +1 -1
  904. package/lib/zhin-agent/index.js +18 -12
  905. package/lib/zhin-agent/index.js.map +1 -1
  906. package/package.json +14 -29
  907. package/lib/activity-feedback/ai-bus.d.ts +0 -21
  908. package/lib/activity-feedback/ai-bus.d.ts.map +0 -1
  909. package/lib/activity-feedback/ai-bus.js +0 -59
  910. package/lib/activity-feedback/ai-bus.js.map +0 -1
  911. package/lib/ai-hook-handlers.d.ts +0 -8
  912. package/lib/ai-hook-handlers.d.ts.map +0 -1
  913. package/lib/ai-hook-handlers.js +0 -46
  914. package/lib/ai-hook-handlers.js.map +0 -1
  915. package/lib/authoring/define-agent.d.ts +0 -4
  916. package/lib/authoring/define-agent.d.ts.map +0 -1
  917. package/lib/authoring/define-agent.js +0 -8
  918. package/lib/authoring/define-agent.js.map +0 -1
  919. package/lib/authoring/define-connection.d.ts +0 -5
  920. package/lib/authoring/define-connection.d.ts.map +0 -1
  921. package/lib/authoring/define-connection.js +0 -8
  922. package/lib/authoring/define-connection.js.map +0 -1
  923. package/lib/authoring/define-schedule.d.ts +0 -4
  924. package/lib/authoring/define-schedule.d.ts.map +0 -1
  925. package/lib/authoring/define-schedule.js +0 -8
  926. package/lib/authoring/define-schedule.js.map +0 -1
  927. package/lib/authoring/define-tool.d.ts +0 -20
  928. package/lib/authoring/define-tool.d.ts.map +0 -1
  929. package/lib/authoring/define-tool.js +0 -28
  930. package/lib/authoring/define-tool.js.map +0 -1
  931. package/lib/authoring/entries/connections.d.ts +0 -3
  932. package/lib/authoring/entries/connections.d.ts.map +0 -1
  933. package/lib/authoring/entries/connections.js +0 -2
  934. package/lib/authoring/entries/connections.js.map +0 -1
  935. package/lib/authoring/entries/schedules.d.ts +0 -3
  936. package/lib/authoring/entries/schedules.d.ts.map +0 -1
  937. package/lib/authoring/entries/schedules.js +0 -2
  938. package/lib/authoring/entries/schedules.js.map +0 -1
  939. package/lib/authoring/entries/tools.d.ts +0 -5
  940. package/lib/authoring/entries/tools.d.ts.map +0 -1
  941. package/lib/authoring/entries/tools.js +0 -3
  942. package/lib/authoring/entries/tools.js.map +0 -1
  943. package/lib/authoring/tool-policy.d.ts +0 -3
  944. package/lib/authoring/tool-policy.d.ts.map +0 -1
  945. package/lib/authoring/tool-policy.js +0 -2
  946. package/lib/authoring/tool-policy.js.map +0 -1
  947. package/lib/authoring/zod-schema.d.ts +0 -10
  948. package/lib/authoring/zod-schema.d.ts.map +0 -1
  949. package/lib/authoring/zod-schema.js +0 -7
  950. package/lib/authoring/zod-schema.js.map +0 -1
  951. package/lib/builtin/analyze-media-tool.d.ts +0 -13
  952. package/lib/builtin/analyze-media-tool.d.ts.map +0 -1
  953. package/lib/builtin/analyze-media-tool.js +0 -94
  954. package/lib/builtin/analyze-media-tool.js.map +0 -1
  955. package/lib/builtin/bash-tool.d.ts +0 -29
  956. package/lib/builtin/bash-tool.d.ts.map +0 -1
  957. package/lib/builtin/bash-tool.js +0 -107
  958. package/lib/builtin/bash-tool.js.map +0 -1
  959. package/lib/builtin/bing-search-html.d.ts.map +0 -1
  960. package/lib/builtin/bing-search-html.js.map +0 -1
  961. package/lib/builtin/builtin-base-tool.d.ts +0 -27
  962. package/lib/builtin/builtin-base-tool.d.ts.map +0 -1
  963. package/lib/builtin/builtin-base-tool.js +0 -35
  964. package/lib/builtin/builtin-base-tool.js.map +0 -1
  965. package/lib/builtin/edit-file-tool.d.ts +0 -13
  966. package/lib/builtin/edit-file-tool.d.ts.map +0 -1
  967. package/lib/builtin/edit-file-tool.js +0 -86
  968. package/lib/builtin/edit-file-tool.js.map +0 -1
  969. package/lib/builtin/file-edit-quote-utils.d.ts.map +0 -1
  970. package/lib/builtin/file-edit-quote-utils.js.map +0 -1
  971. package/lib/builtin/five-agent/index.d.ts.map +0 -1
  972. package/lib/builtin/five-agent/index.js.map +0 -1
  973. package/lib/builtin/five-agent/prompts.d.ts.map +0 -1
  974. package/lib/builtin/five-agent/prompts.js.map +0 -1
  975. package/lib/builtin/five-agent/role-capability-policy.d.ts.map +0 -1
  976. package/lib/builtin/five-agent/role-capability-policy.js.map +0 -1
  977. package/lib/builtin/five-agent/roles.d.ts.map +0 -1
  978. package/lib/builtin/five-agent/roles.js.map +0 -1
  979. package/lib/builtin/generate-image-tool.d.ts +0 -21
  980. package/lib/builtin/generate-image-tool.d.ts.map +0 -1
  981. package/lib/builtin/generate-image-tool.js +0 -138
  982. package/lib/builtin/generate-image-tool.js.map +0 -1
  983. package/lib/builtin/glob-tool.d.ts +0 -23
  984. package/lib/builtin/glob-tool.d.ts.map +0 -1
  985. package/lib/builtin/glob-tool.js +0 -53
  986. package/lib/builtin/glob-tool.js.map +0 -1
  987. package/lib/builtin/grep-tool.d.ts +0 -23
  988. package/lib/builtin/grep-tool.d.ts.map +0 -1
  989. package/lib/builtin/grep-tool.js +0 -121
  990. package/lib/builtin/grep-tool.js.map +0 -1
  991. package/lib/builtin/install-skill-tool.d.ts +0 -24
  992. package/lib/builtin/install-skill-tool.d.ts.map +0 -1
  993. package/lib/builtin/install-skill-tool.js +0 -76
  994. package/lib/builtin/install-skill-tool.js.map +0 -1
  995. package/lib/builtin/knowledge-search-tool.d.ts +0 -6
  996. package/lib/builtin/knowledge-search-tool.d.ts.map +0 -1
  997. package/lib/builtin/knowledge-search-tool.js +0 -184
  998. package/lib/builtin/knowledge-search-tool.js.map +0 -1
  999. package/lib/builtin/list-dir-tool.d.ts +0 -13
  1000. package/lib/builtin/list-dir-tool.d.ts.map +0 -1
  1001. package/lib/builtin/list-dir-tool.js +0 -57
  1002. package/lib/builtin/list-dir-tool.js.map +0 -1
  1003. package/lib/builtin/load-skill-tool.d.ts +0 -20
  1004. package/lib/builtin/load-skill-tool.d.ts.map +0 -1
  1005. package/lib/builtin/load-skill-tool.js +0 -60
  1006. package/lib/builtin/load-skill-tool.js.map +0 -1
  1007. package/lib/builtin/read-file-tool.d.ts +0 -14
  1008. package/lib/builtin/read-file-tool.d.ts.map +0 -1
  1009. package/lib/builtin/read-file-tool.js +0 -74
  1010. package/lib/builtin/read-file-tool.js.map +0 -1
  1011. package/lib/builtin/run-deferred-task-tool.d.ts +0 -23
  1012. package/lib/builtin/run-deferred-task-tool.d.ts.map +0 -1
  1013. package/lib/builtin/run-deferred-task-tool.js +0 -41
  1014. package/lib/builtin/run-deferred-task-tool.js.map +0 -1
  1015. package/lib/builtin/spawn-task-tool.d.ts.map +0 -1
  1016. package/lib/builtin/spawn-task-tool.js.map +0 -1
  1017. package/lib/builtin/todo-read-tool.d.ts +0 -14
  1018. package/lib/builtin/todo-read-tool.d.ts.map +0 -1
  1019. package/lib/builtin/todo-read-tool.js +0 -56
  1020. package/lib/builtin/todo-read-tool.js.map +0 -1
  1021. package/lib/builtin/todo-write-tool.d.ts +0 -14
  1022. package/lib/builtin/todo-write-tool.d.ts.map +0 -1
  1023. package/lib/builtin/todo-write-tool.js +0 -54
  1024. package/lib/builtin/todo-write-tool.js.map +0 -1
  1025. package/lib/builtin/web-fetch-tool.d.ts +0 -21
  1026. package/lib/builtin/web-fetch-tool.d.ts.map +0 -1
  1027. package/lib/builtin/web-fetch-tool.js +0 -86
  1028. package/lib/builtin/web-fetch-tool.js.map +0 -1
  1029. package/lib/builtin/web-search-locale.d.ts +0 -16
  1030. package/lib/builtin/web-search-locale.d.ts.map +0 -1
  1031. package/lib/builtin/web-search-locale.js +0 -74
  1032. package/lib/builtin/web-search-locale.js.map +0 -1
  1033. package/lib/builtin/web-search-tool.d.ts +0 -20
  1034. package/lib/builtin/web-search-tool.d.ts.map +0 -1
  1035. package/lib/builtin/web-search-tool.js +0 -115
  1036. package/lib/builtin/web-search-tool.js.map +0 -1
  1037. package/lib/builtin/web-tool-utils.d.ts.map +0 -1
  1038. package/lib/builtin/web-tool-utils.js.map +0 -1
  1039. package/lib/builtin/write-file-tool.d.ts +0 -13
  1040. package/lib/builtin/write-file-tool.d.ts.map +0 -1
  1041. package/lib/builtin/write-file-tool.js +0 -55
  1042. package/lib/builtin/write-file-tool.js.map +0 -1
  1043. package/lib/builtin-tools.d.ts +0 -25
  1044. package/lib/builtin-tools.d.ts.map +0 -1
  1045. package/lib/builtin-tools.js +0 -54
  1046. package/lib/builtin-tools.js.map +0 -1
  1047. package/lib/defaults/hooks.d.ts +0 -6
  1048. package/lib/defaults/hooks.d.ts.map +0 -1
  1049. package/lib/defaults/hooks.js +0 -9
  1050. package/lib/defaults/hooks.js.map +0 -1
  1051. package/lib/defaults/subagents.d.ts +0 -6
  1052. package/lib/defaults/subagents.d.ts.map +0 -1
  1053. package/lib/defaults/subagents.js +0 -23
  1054. package/lib/defaults/subagents.js.map +0 -1
  1055. package/lib/defaults/tools.d.ts +0 -5
  1056. package/lib/defaults/tools.d.ts.map +0 -1
  1057. package/lib/defaults/tools.js +0 -6
  1058. package/lib/defaults/tools.js.map +0 -1
  1059. package/lib/discovery/index.d.ts +0 -5
  1060. package/lib/discovery/index.d.ts.map +0 -1
  1061. package/lib/discovery/index.js +0 -5
  1062. package/lib/discovery/index.js.map +0 -1
  1063. package/lib/discovery/skills.d.ts +0 -53
  1064. package/lib/discovery/skills.d.ts.map +0 -1
  1065. package/lib/discovery/skills.js +0 -306
  1066. package/lib/discovery/skills.js.map +0 -1
  1067. package/lib/discovery/tools.d.ts +0 -53
  1068. package/lib/discovery/tools.d.ts.map +0 -1
  1069. package/lib/discovery/tools.js +0 -305
  1070. package/lib/discovery/tools.js.map +0 -1
  1071. package/lib/features/agent-feature.d.ts +0 -23
  1072. package/lib/features/agent-feature.d.ts.map +0 -1
  1073. package/lib/features/agent-feature.js +0 -51
  1074. package/lib/features/agent-feature.js.map +0 -1
  1075. package/lib/features/index.d.ts +0 -3
  1076. package/lib/features/index.d.ts.map +0 -1
  1077. package/lib/features/index.js +0 -3
  1078. package/lib/features/index.js.map +0 -1
  1079. package/lib/features/mcp-feature.d.ts +0 -25
  1080. package/lib/features/mcp-feature.d.ts.map +0 -1
  1081. package/lib/features/mcp-feature.js +0 -52
  1082. package/lib/features/mcp-feature.js.map +0 -1
  1083. package/lib/hooks.d.ts +0 -144
  1084. package/lib/hooks.d.ts.map +0 -1
  1085. package/lib/hooks.js +0 -82
  1086. package/lib/hooks.js.map +0 -1
  1087. package/lib/ingress/capability-ingress.d.ts +0 -76
  1088. package/lib/ingress/capability-ingress.d.ts.map +0 -1
  1089. package/lib/ingress/capability-ingress.js +0 -274
  1090. package/lib/ingress/capability-ingress.js.map +0 -1
  1091. package/lib/ingress/index.d.ts +0 -2
  1092. package/lib/ingress/index.d.ts.map +0 -1
  1093. package/lib/ingress/index.js +0 -2
  1094. package/lib/ingress/index.js.map +0 -1
  1095. package/lib/init/introspection-args.d.ts +0 -37
  1096. package/lib/init/introspection-args.d.ts.map +0 -1
  1097. package/lib/init/introspection-args.js +0 -71
  1098. package/lib/init/introspection-args.js.map +0 -1
  1099. package/lib/init/introspection-collectors.d.ts +0 -26
  1100. package/lib/init/introspection-collectors.d.ts.map +0 -1
  1101. package/lib/init/introspection-collectors.js +0 -108
  1102. package/lib/init/introspection-collectors.js.map +0 -1
  1103. package/lib/init/introspection-commands-format.d.ts +0 -40
  1104. package/lib/init/introspection-commands-format.d.ts.map +0 -1
  1105. package/lib/init/introspection-commands-format.js +0 -93
  1106. package/lib/init/introspection-commands-format.js.map +0 -1
  1107. package/lib/init/introspection-pagination.d.ts +0 -14
  1108. package/lib/init/introspection-pagination.d.ts.map +0 -1
  1109. package/lib/init/introspection-pagination.js +0 -33
  1110. package/lib/init/introspection-pagination.js.map +0 -1
  1111. package/lib/init/introspection-rest.d.ts +0 -24
  1112. package/lib/init/introspection-rest.d.ts.map +0 -1
  1113. package/lib/init/introspection-rest.js +0 -65
  1114. package/lib/init/introspection-rest.js.map +0 -1
  1115. package/lib/init/upgrade-agent-db-schema.d.ts +0 -49
  1116. package/lib/init/upgrade-agent-db-schema.d.ts.map +0 -1
  1117. package/lib/init/upgrade-agent-db-schema.js +0 -210
  1118. package/lib/init/upgrade-agent-db-schema.js.map +0 -1
  1119. package/lib/init/upgrade-endpoint-id-schema.d.ts +0 -12
  1120. package/lib/init/upgrade-endpoint-id-schema.d.ts.map +0 -1
  1121. package/lib/init/upgrade-endpoint-id-schema.js +0 -58
  1122. package/lib/init/upgrade-endpoint-id-schema.js.map +0 -1
  1123. package/lib/plugin-runtime/workroom-governed-dispatch-reasons.d.ts.map +0 -1
  1124. package/lib/plugin-runtime/workroom-governed-dispatch-reasons.js.map +0 -1
  1125. package/lib/resource-hub/tool-registry.d.ts +0 -60
  1126. package/lib/resource-hub/tool-registry.d.ts.map +0 -1
  1127. package/lib/resource-hub/tool-registry.js +0 -228
  1128. package/lib/resource-hub/tool-registry.js.map +0 -1
  1129. package/lib/security/owner-approve-always-store.d.ts +0 -67
  1130. package/lib/security/owner-approve-always-store.d.ts.map +0 -1
  1131. package/lib/security/owner-approve-always-store.js +0 -510
  1132. package/lib/security/owner-approve-always-store.js.map +0 -1
  1133. package/lib/security/turn-sandbox-authority.d.ts +0 -13
  1134. package/lib/security/turn-sandbox-authority.d.ts.map +0 -1
  1135. package/lib/security/turn-sandbox-authority.js +0 -42
  1136. package/lib/security/turn-sandbox-authority.js.map +0 -1
  1137. package/lib/skill/skill-load-opts.d.ts +0 -5
  1138. package/lib/skill/skill-load-opts.d.ts.map +0 -1
  1139. package/lib/skill/skill-load-opts.js +0 -14
  1140. package/lib/skill/skill-load-opts.js.map +0 -1
  1141. package/lib/stability/registry-cleanup.d.ts +0 -5
  1142. package/lib/stability/registry-cleanup.d.ts.map +0 -1
  1143. package/lib/stability/registry-cleanup.js +0 -20
  1144. package/lib/stability/registry-cleanup.js.map +0 -1
  1145. package/lib/tool/classic-tool-execution-authority.d.ts +0 -22
  1146. package/lib/tool/classic-tool-execution-authority.d.ts.map +0 -1
  1147. package/lib/tool/classic-tool-execution-authority.js +0 -80
  1148. package/lib/tool/classic-tool-execution-authority.js.map +0 -1
  1149. package/lib/tool/tool-registry-as-service.d.ts +0 -17
  1150. package/lib/tool/tool-registry-as-service.d.ts.map +0 -1
  1151. package/lib/tool/tool-registry-as-service.js +0 -54
  1152. package/lib/tool/tool-registry-as-service.js.map +0 -1
  1153. package/lib/tool/web-search-locale-attach.d.ts +0 -4
  1154. package/lib/tool/web-search-locale-attach.d.ts.map +0 -1
  1155. package/lib/tool/web-search-locale-attach.js +0 -20
  1156. package/lib/tool/web-search-locale-attach.js.map +0 -1
  1157. package/lib/typing-indicator/integration.d.ts +0 -89
  1158. package/lib/typing-indicator/integration.d.ts.map +0 -1
  1159. package/lib/typing-indicator/integration.js +0 -261
  1160. package/lib/typing-indicator/integration.js.map +0 -1
  1161. package/lib/workroom/journal.d.ts.map +0 -1
  1162. package/lib/workroom/journal.js +0 -2038
  1163. package/lib/workroom/journal.js.map +0 -1
  1164. package/lib/workroom/local-assignment-executor.d.ts.map +0 -1
  1165. package/lib/workroom/local-assignment-executor.js.map +0 -1
  1166. package/lib/workroom/projection-outbox.d.ts.map +0 -1
  1167. package/lib/workroom/projection-outbox.js +0 -1326
  1168. package/lib/workroom/projection-outbox.js.map +0 -1
  1169. /package/lib/{builtin → orchestration}/five-agent/index.d.ts +0 -0
  1170. /package/lib/{builtin → orchestration}/five-agent/index.js +0 -0
  1171. /package/lib/{builtin → orchestration}/five-agent/prompts.d.ts +0 -0
  1172. /package/lib/{builtin → orchestration}/five-agent/prompts.js +0 -0
  1173. /package/lib/{builtin → orchestration}/five-agent/role-capability-policy.d.ts +0 -0
  1174. /package/lib/{builtin → orchestration}/five-agent/role-capability-policy.js +0 -0
  1175. /package/lib/{builtin → orchestration}/five-agent/roles.d.ts +0 -0
  1176. /package/lib/{builtin → orchestration}/five-agent/roles.js +0 -0
  1177. /package/lib/{builtin → plugin-runtime}/file-edit-quote-utils.d.ts +0 -0
  1178. /package/lib/{builtin → plugin-runtime}/file-edit-quote-utils.js +0 -0
  1179. /package/lib/{builtin → web}/bing-search-html.d.ts +0 -0
@@ -0,0 +1,39 @@
1
+ import { type Message } from '@zhin.js/core';
2
+ import type { OwnerApprovalAddress } from './owner-approval-contracts.js';
3
+ export type { OwnerApprovalAddress } from './owner-approval-contracts.js';
4
+ export declare const OWNER_APPROVE_ALWAYS_TOOL: "bash";
5
+ export type ToolRequesterRole = 'master' | 'trusted' | 'other' | 'unknown';
6
+ export interface OwnerApprovalCommandContext {
7
+ readonly platform: string;
8
+ readonly endpoint: string;
9
+ readonly ownerId?: string;
10
+ readonly subjectId: string;
11
+ readonly scope: 'private' | 'group' | 'channel';
12
+ }
13
+ export declare class OwnerApprovalRuntime {
14
+ #private;
15
+ constructor(workspaceDir?: string);
16
+ has(address: OwnerApprovalAddress, toolName: string): boolean;
17
+ setBashAlways(address: OwnerApprovalAddress, value: boolean): void;
18
+ addBashRule(address: OwnerApprovalAddress, pattern: string): {
19
+ ok: true;
20
+ id: string;
21
+ } | {
22
+ ok: false;
23
+ error: string;
24
+ };
25
+ removeBashRule(address: OwnerApprovalAddress, ruleId: string): {
26
+ ok: true;
27
+ } | {
28
+ ok: false;
29
+ error: string;
30
+ };
31
+ matchesBashBypass(address: OwnerApprovalAddress, commandLine: string): boolean;
32
+ format(address: OwnerApprovalAddress): string;
33
+ handleCommand(context: OwnerApprovalCommandContext, rawText: string): string | null;
34
+ }
35
+ export declare function ownerApprovalAddressFromMessage(message: Message): OwnerApprovalAddress | undefined;
36
+ export declare function resolveToolRequesterRole(message: Message): ToolRequesterRole;
37
+ export declare const ICQQ_SENSITIVE_SUBCOMMAND_REGEXES: readonly RegExp[];
38
+ export declare function isIcqqSensitiveSubcommand(fullSubCommand: string): boolean;
39
+ //# sourceMappingURL=owner-approval-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"owner-approval-runtime.d.ts","sourceRoot":"","sources":["../../src/security/owner-approval-runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAAyC,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AAEpF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAG1E,YAAY,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,eAAO,MAAM,yBAAyB,EAAG,MAAe,CAAC;AAGzD,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE3E,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;CACjD;AAED,qBAAa,oBAAoB;;gBAGnB,YAAY,CAAC,EAAE,MAAM;IAKjC,GAAG,CAAC,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO;IAI7D,aAAa,CAAC,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAIlE,WAAW,CAAC,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM;;;;;;;IAI1D,cAAc,CAAC,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,MAAM;;;;;;IAI5D,iBAAiB,CAAC,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO;IAS9E,MAAM,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM;IAa7C,aAAa,CAAC,OAAO,EAAE,2BAA2B,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAqCpF;AAED,wBAAgB,+BAA+B,CAAC,OAAO,EAAE,OAAO,GAAG,oBAAoB,GAAG,SAAS,CASlG;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB,CAU5E;AAED,eAAO,MAAM,iCAAiC,EAAE,SAAS,MAAM,EAM9D,CAAC;AAEF,wBAAgB,yBAAyB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAIzE"}
@@ -0,0 +1,159 @@
1
+ import * as path from 'node:path';
2
+ import { hasSenderRole, senderRolesFromMessage } from '@zhin.js/core';
3
+ import { workspaceRoot } from '../discovery/utils.js';
4
+ import { OwnerApprovalStore } from './owner-approval-store.js';
5
+ export const OWNER_APPROVE_ALWAYS_TOOL = 'bash';
6
+ const STORE_FILE = 'owner-approve-always.json';
7
+ export class OwnerApprovalRuntime {
8
+ #store;
9
+ constructor(workspaceDir) {
10
+ const root = workspaceDir ? path.resolve(workspaceDir) : workspaceRoot();
11
+ this.#store = new OwnerApprovalStore(path.join(root, 'data', STORE_FILE));
12
+ }
13
+ has(address, toolName) {
14
+ return toolName === OWNER_APPROVE_ALWAYS_TOOL && this.#store.entry(address)?.bashAlways === true;
15
+ }
16
+ setBashAlways(address, value) {
17
+ this.#store.setBashAlways(address, value);
18
+ }
19
+ addBashRule(address, pattern) {
20
+ return this.#store.addBashRule(address, pattern);
21
+ }
22
+ removeBashRule(address, ruleId) {
23
+ return this.#store.removeBashRule(address, ruleId);
24
+ }
25
+ matchesBashBypass(address, commandLine) {
26
+ const entry = this.#store.entry(address);
27
+ if (!entry)
28
+ return false;
29
+ if (entry.bashAlways)
30
+ return true;
31
+ const line = commandLine.trim();
32
+ if (!line)
33
+ return false;
34
+ return entry.bashRules.some((rule) => new RegExp(rule.pattern).test(line));
35
+ }
36
+ format(address) {
37
+ const entry = this.#store.entry(address);
38
+ const rules = entry?.bashRules ?? [];
39
+ if (!entry || (!entry.bashAlways && rules.length === 0)) {
40
+ return 'bash 永久放行: 否\n自定义正则放行: 无';
41
+ }
42
+ return [
43
+ `bash 永久放行: ${entry.bashAlways ? '是' : '否'}`,
44
+ `自定义正则放行 (${rules.length}):`,
45
+ ...rules.map((rule) => ` • [${rule.id.slice(0, 8)}] ${rule.pattern}`),
46
+ ].join('\n');
47
+ }
48
+ handleCommand(context, rawText) {
49
+ const text = rawText.trim();
50
+ if (!/^\/approve(?:\s|$)/iu.test(text))
51
+ return null;
52
+ const address = ownerCommandAddress(context);
53
+ if (context.scope !== 'private' || !address || context.subjectId !== address.ownerId) {
54
+ return '⚠️ 仅 Endpoint Owner 可在私聊中使用此指令。需在插件配置中设置 master/owner。';
55
+ }
56
+ if (/^\/approve\s+always\s+bash\s*$/iu.test(text)) {
57
+ this.setBashAlways(address, true);
58
+ return '✅ 已对 bash 永久放行 Owner 硬确认(本 Bot)。后续 bash 需确认时将不再弹窗。';
59
+ }
60
+ const revokeRule = text.match(/^\/approve\s+revoke\s+rule\s+(\S+)\s*$/iu);
61
+ if (revokeRule) {
62
+ const result = this.removeBashRule(address, revokeRule[1]);
63
+ return result.ok ? '✅ 已删除该放行规则。' : `⚠️ ${result.error}`;
64
+ }
65
+ const ruleArgument = matchApproveRuleArgument(text);
66
+ if (ruleArgument !== null) {
67
+ const result = this.addBashRule(address, ruleArgument.trim());
68
+ return result.ok
69
+ ? `✅ 已添加规则 id=${result.id.slice(0, 8)}… ,匹配子命令时将不再要求 Owner 确认(仍受危险命令黑名单等约束)。`
70
+ : `⚠️ ${result.error}`;
71
+ }
72
+ if (/^\/approve\s+list\s*$/iu.test(text))
73
+ return this.format(address);
74
+ if (/^\/approve\s+revoke\s*$/iu.test(text)) {
75
+ if (!this.has(address, OWNER_APPROVE_ALWAYS_TOOL))
76
+ return '⚠️ 当前未对 bash 设置永久放行。';
77
+ this.setBashAlways(address, false);
78
+ return '✅ 已撤销 bash 永久放行(正则规则仍保留,可用 /approve list 查看)。';
79
+ }
80
+ return `⚠️ 无法解析指令。\n${usageLines()}`;
81
+ }
82
+ }
83
+ export function ownerApprovalAddressFromMessage(message) {
84
+ const platform = String(message.$adapter ?? '').trim();
85
+ const endpoint = String(message.$endpoint ?? '').trim();
86
+ const ownerId = String(message.extra?.endpointMaster ?? '').trim();
87
+ return platform && endpoint && ownerId
88
+ ? Object.freeze({ platform, endpoint, ownerId })
89
+ : undefined;
90
+ }
91
+ export function resolveToolRequesterRole(message) {
92
+ const roles = senderRolesFromMessage(message);
93
+ if (message.$sender.isMaster !== undefined || message.$sender.isTrusted !== undefined) {
94
+ if (hasSenderRole(roles, 'master'))
95
+ return 'master';
96
+ if (hasSenderRole(roles, 'trusted'))
97
+ return 'trusted';
98
+ return 'other';
99
+ }
100
+ if (!message.$adapter || !message.$endpoint || !message.$sender?.id)
101
+ return 'unknown';
102
+ const address = ownerApprovalAddressFromMessage(message);
103
+ return address && String(message.$sender.id) === address.ownerId ? 'master' : 'other';
104
+ }
105
+ export const ICQQ_SENSITIVE_SUBCOMMAND_REGEXES = [
106
+ /\bicqq\s+friend\s+(?:delete|block|move)\b/i,
107
+ /\bicqq\s+group\s+(?:kick|mute|set|admin|announce|transfer|quit|dissolve|invite)\b/i,
108
+ /\bicqq\s+(?:request|wallet|pay|recall)\b/i,
109
+ /\bicqq\s+file\s+(?:upload|delete)\b/i,
110
+ /\bicqq\s+gfs\b.*\b(?:rm|delete|del)\b/i,
111
+ ];
112
+ export function isIcqqSensitiveSubcommand(fullSubCommand) {
113
+ const line = fullSubCommand.trim();
114
+ return /^\s*icqq(?:\s|$)/i.test(line)
115
+ && ICQQ_SENSITIVE_SUBCOMMAND_REGEXES.some((pattern) => pattern.test(line));
116
+ }
117
+ function ownerCommandAddress(context) {
118
+ if (!context.platform || !context.endpoint || !context.ownerId)
119
+ return undefined;
120
+ return Object.freeze({
121
+ platform: context.platform,
122
+ endpoint: context.endpoint,
123
+ ownerId: context.ownerId,
124
+ });
125
+ }
126
+ function usageLines() {
127
+ return [
128
+ '用法(bash / icqq):',
129
+ ' /approve always bash — 永久跳过 bash 的 Owner 硬确认',
130
+ ' /approve rule <正则> — 为敏感 icqq 命令增加放行规则(匹配整段子命令)',
131
+ ' /approve list — 列出永久放行与规则 id',
132
+ ' /approve revoke rule <id> — 删除一条规则(id 可用 list 前 8 位)',
133
+ ' /approve revoke — 撤销 bash 永久放行(不删规则)',
134
+ ].join('\n');
135
+ }
136
+ const LINE_TERMINATOR_RE = /[\n\r\u2028\u2029]/u;
137
+ function matchApproveRuleArgument(text) {
138
+ const head = /^\/approve\s+rule/iu.exec(text);
139
+ if (!head)
140
+ return null;
141
+ const whitespaceStart = head[0].length;
142
+ let whitespaceEnd = whitespaceStart;
143
+ while (whitespaceEnd < text.length && /\s/u.test(text[whitespaceEnd]))
144
+ whitespaceEnd += 1;
145
+ if (whitespaceEnd === whitespaceStart)
146
+ return null;
147
+ const rest = text.slice(whitespaceEnd);
148
+ if (LINE_TERMINATOR_RE.test(rest))
149
+ return null;
150
+ if (rest.length > 0)
151
+ return rest;
152
+ if (whitespaceEnd - whitespaceStart >= 2) {
153
+ const last = text[whitespaceEnd - 1];
154
+ if (!LINE_TERMINATOR_RE.test(last))
155
+ return last;
156
+ }
157
+ return null;
158
+ }
159
+ //# sourceMappingURL=owner-approval-runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"owner-approval-runtime.js","sourceRoot":"","sources":["../../src/security/owner-approval-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAgB,MAAM,eAAe,CAAC;AACpF,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,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C;IAC9C,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,MAAM,eAAe,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,aAAa,GAAG,eAAe,CAAC;IACpC,OAAO,aAAa,GAAG,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAE,CAAC;QAAE,aAAa,IAAI,CAAC,CAAC;IAC3F,IAAI,aAAa,KAAK,eAAe;QAAE,OAAO,IAAI,CAAC;IACnD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IACvC,IAAI,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/C,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IACjC,IAAI,aAAa,GAAG,eAAe,IAAI,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,GAAG,IAAI,CAAC,aAAa,GAAG,CAAC,CAAE,CAAC;QACtC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;IAClD,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { OwnerApprovalAddress } from './owner-approval-contracts.js';
2
+ export interface BashRuleEntry {
3
+ readonly id: string;
4
+ readonly pattern: string;
5
+ readonly createdAt: number;
6
+ }
7
+ export interface BashApprovalEntry {
8
+ readonly bashAlways?: boolean;
9
+ readonly bashRules: readonly BashRuleEntry[];
10
+ }
11
+ export declare class OwnerApprovalStore {
12
+ #private;
13
+ private readonly filePath;
14
+ constructor(filePath: string);
15
+ entry(address: OwnerApprovalAddress): BashApprovalEntry | undefined;
16
+ setBashAlways(address: OwnerApprovalAddress, value: boolean): void;
17
+ addBashRule(address: OwnerApprovalAddress, pattern: string): {
18
+ ok: true;
19
+ id: string;
20
+ } | {
21
+ ok: false;
22
+ error: string;
23
+ };
24
+ removeBashRule(address: OwnerApprovalAddress, ruleId: string): {
25
+ ok: true;
26
+ } | {
27
+ ok: false;
28
+ error: string;
29
+ };
30
+ }
31
+ export declare class OwnerApprovalStoreFormatError extends Error {
32
+ constructor(filePath: string, options?: unknown);
33
+ }
34
+ //# sourceMappingURL=owner-approval-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"owner-approval-store.d.ts","sourceRoot":"","sources":["../../src/security/owner-approval-store.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAI1E,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,SAAS,aAAa,EAAE,CAAC;CAC9C;AAOD,qBAAa,kBAAkB;;IACjB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,MAAM;IAE7C,KAAK,CAAC,OAAO,EAAE,oBAAoB,GAAG,iBAAiB,GAAG,SAAS;IAInE,aAAa,CAAC,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAgBlE,WAAW,CACT,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,MAAM,GACd;QAAE,EAAE,EAAE,IAAI,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,EAAE,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;IAyB1D,cAAc,CACZ,OAAO,EAAE,oBAAoB,EAC7B,MAAM,EAAE,MAAM,GACb;QAAE,EAAE,EAAE,IAAI,CAAA;KAAE,GAAG;QAAE,EAAE,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;CAqC/C;AAED,qBAAa,6BAA8B,SAAQ,KAAK;gBAC1C,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO;CAIhD"}
@@ -0,0 +1,154 @@
1
+ import * as crypto from 'node:crypto';
2
+ import * as fs from 'node:fs';
3
+ import * as path from 'node:path';
4
+ const STORE_VERSION = 2;
5
+ export class OwnerApprovalStore {
6
+ filePath;
7
+ constructor(filePath) {
8
+ this.filePath = filePath;
9
+ }
10
+ entry(address) {
11
+ return this.#read().endpoints[addressKey(address)];
12
+ }
13
+ setBashAlways(address, value) {
14
+ const document = this.#read();
15
+ const key = addressKey(address);
16
+ const previous = document.endpoints[key] ?? { bashRules: [] };
17
+ this.#write({
18
+ version: STORE_VERSION,
19
+ endpoints: {
20
+ ...document.endpoints,
21
+ [key]: {
22
+ ...(value ? { bashAlways: true } : {}),
23
+ bashRules: [...previous.bashRules],
24
+ },
25
+ },
26
+ });
27
+ }
28
+ addBashRule(address, pattern) {
29
+ const trimmed = pattern.trim();
30
+ if (!trimmed)
31
+ return { ok: false, error: '正则不能为空。' };
32
+ try {
33
+ new RegExp(trimmed);
34
+ }
35
+ catch (error) {
36
+ return { ok: false, error: `无效正则: ${error instanceof Error ? error.message : String(error)}` };
37
+ }
38
+ const document = this.#read();
39
+ const key = addressKey(address);
40
+ const previous = document.endpoints[key] ?? { bashRules: [] };
41
+ const id = crypto.randomUUID();
42
+ this.#write({
43
+ version: STORE_VERSION,
44
+ endpoints: {
45
+ ...document.endpoints,
46
+ [key]: {
47
+ ...(previous.bashAlways ? { bashAlways: true } : {}),
48
+ bashRules: [...previous.bashRules, { id, pattern: trimmed, createdAt: Date.now() }],
49
+ },
50
+ },
51
+ });
52
+ return { ok: true, id };
53
+ }
54
+ removeBashRule(address, ruleId) {
55
+ const id = ruleId.trim();
56
+ if (!id)
57
+ return { ok: false, error: '请提供规则 id。' };
58
+ const document = this.#read();
59
+ const key = addressKey(address);
60
+ const entry = document.endpoints[key];
61
+ if (!entry?.bashRules.length)
62
+ return { ok: false, error: '当前无自定义规则。' };
63
+ const next = entry.bashRules.filter((rule) => rule.id !== id && !rule.id.startsWith(id));
64
+ if (next.length === entry.bashRules.length) {
65
+ return { ok: false, error: `未找到 id 前缀或全名为「${id}」的规则。` };
66
+ }
67
+ this.#write({
68
+ version: STORE_VERSION,
69
+ endpoints: {
70
+ ...document.endpoints,
71
+ [key]: { ...entry, bashRules: next },
72
+ },
73
+ });
74
+ return { ok: true };
75
+ }
76
+ #read() {
77
+ try {
78
+ const source = fs.readFileSync(this.filePath, 'utf-8');
79
+ return parseDocument(JSON.parse(source));
80
+ }
81
+ catch (error) {
82
+ if (isMissingFileError(error))
83
+ return emptyDocument();
84
+ throw new OwnerApprovalStoreFormatError(this.filePath, error);
85
+ }
86
+ }
87
+ #write(document) {
88
+ fs.mkdirSync(path.dirname(this.filePath), { recursive: true });
89
+ const temporary = `${this.filePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
90
+ fs.writeFileSync(temporary, `${JSON.stringify(document, null, 2)}\n`, 'utf-8');
91
+ fs.renameSync(temporary, this.filePath);
92
+ }
93
+ }
94
+ export class OwnerApprovalStoreFormatError extends Error {
95
+ constructor(filePath, options) {
96
+ super(`Owner approval store is invalid: ${filePath}`, { cause: options });
97
+ this.name = 'OwnerApprovalStoreFormatError';
98
+ }
99
+ }
100
+ function addressKey(address) {
101
+ return `${address.platform}|${address.endpoint}|${address.ownerId}`;
102
+ }
103
+ function emptyDocument() {
104
+ return { version: STORE_VERSION, endpoints: {} };
105
+ }
106
+ function parseDocument(input) {
107
+ if (!isRecord(input) || !hasExactKeys(input, ['version', 'endpoints'])) {
108
+ throw new TypeError('Invalid Owner approval document');
109
+ }
110
+ if (input.version !== STORE_VERSION || !isRecord(input.endpoints)) {
111
+ throw new TypeError('Unsupported Owner approval document version');
112
+ }
113
+ const endpoints = {};
114
+ for (const [key, rawEntry] of Object.entries(input.endpoints)) {
115
+ if (!isRecord(rawEntry) || !hasExactKeys(rawEntry, ['bashRules'], ['bashAlways'])) {
116
+ throw new TypeError(`Invalid Owner approval entry: ${key}`);
117
+ }
118
+ if (rawEntry.bashAlways !== undefined && rawEntry.bashAlways !== true) {
119
+ throw new TypeError(`Invalid bashAlways value: ${key}`);
120
+ }
121
+ if (!Array.isArray(rawEntry.bashRules)) {
122
+ throw new TypeError(`Invalid bashRules value: ${key}`);
123
+ }
124
+ const bashRules = rawEntry.bashRules.map((rule) => parseRule(key, rule));
125
+ endpoints[key] = Object.freeze({
126
+ ...(rawEntry.bashAlways ? { bashAlways: true } : {}),
127
+ bashRules: Object.freeze(bashRules),
128
+ });
129
+ }
130
+ return Object.freeze({ version: STORE_VERSION, endpoints: Object.freeze(endpoints) });
131
+ }
132
+ function parseRule(endpoint, input) {
133
+ if (!isRecord(input) || !hasExactKeys(input, ['id', 'pattern', 'createdAt'])) {
134
+ throw new TypeError(`Invalid Owner approval rule: ${endpoint}`);
135
+ }
136
+ if (typeof input.id !== 'string' || typeof input.pattern !== 'string'
137
+ || typeof input.createdAt !== 'number' || !Number.isFinite(input.createdAt)) {
138
+ throw new TypeError(`Invalid Owner approval rule fields: ${endpoint}`);
139
+ }
140
+ new RegExp(input.pattern);
141
+ return Object.freeze({ id: input.id, pattern: input.pattern, createdAt: input.createdAt });
142
+ }
143
+ function isRecord(value) {
144
+ return value !== null && typeof value === 'object' && !Array.isArray(value);
145
+ }
146
+ function hasExactKeys(value, required, optional = []) {
147
+ const keys = Object.keys(value);
148
+ return required.every((key) => Object.hasOwn(value, key))
149
+ && keys.every((key) => required.includes(key) || optional.includes(key));
150
+ }
151
+ function isMissingFileError(error) {
152
+ return error instanceof Error && 'code' in error && error.code === 'ENOENT';
153
+ }
154
+ //# sourceMappingURL=owner-approval-store.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"owner-approval-store.js","sourceRoot":"","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AAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;WACpD,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AAC7E,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAc;IACxC,OAAO,KAAK,YAAY,KAAK,IAAI,MAAM,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC;AAC9E,CAAC"}
@@ -1,13 +1,10 @@
1
1
  /**
2
2
  * 统一工具安全策略门面(policy facade)
3
3
  *
4
- * 背景:builtin 工具曾各自手写策略链且不一致(edit_file 七层、glob/list_dir 两层、
5
- * analyze_media 三层……),新工具容易漏层,新策略要改所有工具。
6
- *
7
4
  * 本模块把各策略层声明为一张按 priority 排序的策略表,`runToolPolicies` 依序执行,
8
5
  * 第一个终结决策(deny 或需 Owner 确认)即短路返回,`decisions` 记录已执行层。
9
6
  *
10
- * 层顺序(以 edit-file-tool 既有链路为基准):
7
+ * 层顺序:
11
8
  * role-gate → bash-command-safety → dangerous-tool-approval → bash-sensitive-read
12
9
  * → file-permission-matrix(文件写类 + 显式 read)→ bash-file-permission
13
10
  * → memory-write-path(写类且有 filePath)→ sensitive-path(有 filePath)
@@ -15,14 +12,13 @@
15
12
  * → workspace-access(写类且有 filePath)
16
13
  * → exec-policy(有 command 且给 config)
17
14
  *
18
- * 注意:memory-write-path / blocked-device-path / workspace-access 仅对写操作生效,
19
- * 这是为了严格保持 read 类工具(glob/list_dir/grep/analyze_media)迁移前的对外行为。
20
- * bash-tool 旧链不含 exec-policy,因此 bash 调用方不传 config,exec-policy 层不会激活。
15
+ * memory-write-path / blocked-device-path / workspace-access 仅对写操作生效;
16
+ * read 类工具由文件权限矩阵和显式 devicePathGuard 约束。
21
17
  */
22
- import type { Message, Plugin } from '@zhin.js/core';
18
+ import type { Message } from '@zhin.js/core';
23
19
  import type { ZhinAgentConfig } from '../config/index.js';
24
20
  import { type FileOperation } from './file-role-policy.js';
25
- import { type ToolRequesterRole } from './owner-approve-always-store.js';
21
+ import { type ToolRequesterRole } from './owner-approval-runtime.js';
26
22
  import type { ToolNetworkPolicy } from './network-policy-context.js';
27
23
  import type { ToolDescriptor } from '@zhin.js/tool';
28
24
  import type { TurnIngress } from '../turn/turn-ingress.js';
@@ -36,16 +32,13 @@ export interface ToolPolicyInput {
36
32
  * (旧实现中权限矩阵在 expandHome 之前执行,为保持等价单独透传)。
37
33
  */
38
34
  rawFilePath?: string;
35
+ /** Workspace root used to resolve and authorize relative file paths. */
36
+ workspaceDir?: string;
39
37
  /** 覆盖从 toolName 推导的文件操作类型(edit_file→update,write_file→create) */
40
38
  fileOperation?: FileOperation;
41
39
  /** bash 命令(exec-policy 与 bash 三层用) */
42
40
  command?: string;
43
- /** bash-file-permission 层解析角色用的宿主插件(与 bash-tool 构造注入一致) */
44
- hostPlugin?: Plugin;
45
- /**
46
- * 读类工具显式启用 blocked-device-path 层(仅 read_file;
47
- * analyze_media 不启用以保持旧行为;拒绝文案也用读类措辞)。
48
- */
41
+ /** 读类工具显式启用 blocked-device-path 层。 */
49
42
  devicePathGuard?: boolean;
50
43
  commMessage?: Message;
51
44
  /** exec policy 用配置 */
@@ -1 +1 @@
1
- {"version":3,"file":"policy-facade.d.ts","sourceRoot":"","sources":["../../src/security/policy-facade.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAQ1D,OAAO,EAKL,KAAK,aAAa,EAEnB,MAAM,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