@zhin.js/agent 1.1.7 → 1.1.9

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 (590) hide show
  1. package/README.md +15 -23
  2. package/lib/activity-feedback/adapter-integration.d.ts +1 -2
  3. package/lib/activity-feedback/adapter-integration.d.ts.map +1 -1
  4. package/lib/activity-feedback/adapter-integration.js +43 -13
  5. package/lib/activity-feedback/adapter-integration.js.map +1 -1
  6. package/lib/assistant/index.d.ts +1 -1
  7. package/lib/assistant/index.d.ts.map +1 -1
  8. package/lib/assistant/index.js +1 -1
  9. package/lib/assistant/index.js.map +1 -1
  10. package/lib/assistant/job-creator.d.ts +0 -7
  11. package/lib/assistant/job-creator.d.ts.map +1 -1
  12. package/lib/assistant/job-creator.js +1 -12
  13. package/lib/assistant/job-creator.js.map +1 -1
  14. package/lib/builtin/five-agent/index.d.ts +6 -3
  15. package/lib/builtin/five-agent/index.d.ts.map +1 -1
  16. package/lib/builtin/five-agent/index.js +6 -4
  17. package/lib/builtin/five-agent/index.js.map +1 -1
  18. package/lib/builtin/five-agent/prompts.d.ts +3 -3
  19. package/lib/builtin/five-agent/prompts.d.ts.map +1 -1
  20. package/lib/builtin/five-agent/prompts.js +3 -3
  21. package/lib/builtin/five-agent/prompts.js.map +1 -1
  22. package/lib/builtin/five-agent/role-capability-policy.d.ts +9 -0
  23. package/lib/builtin/five-agent/role-capability-policy.d.ts.map +1 -0
  24. package/lib/builtin/five-agent/role-capability-policy.js +22 -0
  25. package/lib/builtin/five-agent/role-capability-policy.js.map +1 -0
  26. package/lib/builtin/five-agent/roles.d.ts +5 -0
  27. package/lib/builtin/five-agent/roles.d.ts.map +1 -0
  28. package/lib/builtin/five-agent/roles.js +12 -0
  29. package/lib/builtin/five-agent/roles.js.map +1 -0
  30. package/lib/builtin/orchestration-tools.d.ts.map +1 -1
  31. package/lib/builtin/orchestration-tools.js +12 -38
  32. package/lib/builtin/orchestration-tools.js.map +1 -1
  33. package/lib/builtin/spawn-task-tool.js +2 -2
  34. package/lib/builtin/spawn-task-tool.js.map +1 -1
  35. package/lib/config/agent-interfaces.d.ts +2 -2
  36. package/lib/config/agent-interfaces.d.ts.map +1 -1
  37. package/lib/config/fix-ai-config.d.ts.map +1 -1
  38. package/lib/config/fix-ai-config.js +1 -38
  39. package/lib/config/fix-ai-config.js.map +1 -1
  40. package/lib/config/index.d.ts +1 -1
  41. package/lib/config/index.d.ts.map +1 -1
  42. package/lib/config/index.js +1 -1
  43. package/lib/config/index.js.map +1 -1
  44. package/lib/config/resolve-five-agent-binding.d.ts +10 -0
  45. package/lib/config/resolve-five-agent-binding.d.ts.map +1 -0
  46. package/lib/config/resolve-five-agent-binding.js +31 -0
  47. package/lib/config/resolve-five-agent-binding.js.map +1 -0
  48. package/lib/context/context-system.d.ts +2 -2
  49. package/lib/context/context-system.d.ts.map +1 -1
  50. package/lib/context/context-system.js +2 -3
  51. package/lib/context/context-system.js.map +1 -1
  52. package/lib/context/context-tail-limit.d.ts +0 -2
  53. package/lib/context/context-tail-limit.d.ts.map +1 -1
  54. package/lib/context/context-tail-limit.js +1 -3
  55. package/lib/context/context-tail-limit.js.map +1 -1
  56. package/lib/context/default-builders.d.ts +0 -4
  57. package/lib/context/default-builders.d.ts.map +1 -1
  58. package/lib/context/default-builders.js +0 -14
  59. package/lib/context/default-builders.js.map +1 -1
  60. package/lib/context/envelope-parts.d.ts +0 -1
  61. package/lib/context/envelope-parts.d.ts.map +1 -1
  62. package/lib/context/index.d.ts +2 -2
  63. package/lib/context/index.d.ts.map +1 -1
  64. package/lib/context/index.js +2 -2
  65. package/lib/context/index.js.map +1 -1
  66. package/lib/context/turn-envelope.d.ts +0 -1
  67. package/lib/context/turn-envelope.d.ts.map +1 -1
  68. package/lib/context/turn-envelope.js +0 -2
  69. package/lib/context/turn-envelope.js.map +1 -1
  70. package/lib/core/agent-loop-standalone.d.ts +2 -1
  71. package/lib/core/agent-loop-standalone.d.ts.map +1 -1
  72. package/lib/core/agent-loop-standalone.js.map +1 -1
  73. package/lib/event/agent-stream-bus.d.ts +0 -1
  74. package/lib/event/agent-stream-bus.d.ts.map +1 -1
  75. package/lib/event/agent-stream-bus.js.map +1 -1
  76. package/lib/event/publish-agent-stream.js +2 -2
  77. package/lib/event/publish-agent-stream.js.map +1 -1
  78. package/lib/event/turn-event.d.ts +11 -1
  79. package/lib/event/turn-event.d.ts.map +1 -1
  80. package/lib/event/turn-event.js.map +1 -1
  81. package/lib/index.d.ts +13 -21
  82. package/lib/index.d.ts.map +1 -1
  83. package/lib/index.js +6 -15
  84. package/lib/index.js.map +1 -1
  85. package/lib/init/activate-ai-database-storage.d.ts +2 -2
  86. package/lib/init/activate-ai-database-storage.d.ts.map +1 -1
  87. package/lib/init/activate-ai-database-storage.js +1 -3
  88. package/lib/init/activate-ai-database-storage.js.map +1 -1
  89. package/lib/init/define-ai-database-models.d.ts +1 -1
  90. package/lib/init/define-ai-database-models.d.ts.map +1 -1
  91. package/lib/init/define-ai-database-models.js +1 -9
  92. package/lib/init/define-ai-database-models.js.map +1 -1
  93. package/lib/init/runtime-management-commands.d.ts +2 -3
  94. package/lib/init/runtime-management-commands.d.ts.map +1 -1
  95. package/lib/init/runtime-management-commands.js +6 -6
  96. package/lib/init/runtime-management-commands.js.map +1 -1
  97. package/lib/internal/agent-host.d.ts +2 -3
  98. package/lib/internal/agent-host.d.ts.map +1 -1
  99. package/lib/internal/host-types.d.ts +0 -28
  100. package/lib/internal/host-types.d.ts.map +1 -1
  101. package/lib/memory/context-repository-store.js +1 -1
  102. package/lib/memory/context-repository-store.js.map +1 -1
  103. package/lib/memory/memory-system.d.ts +1 -2
  104. package/lib/memory/memory-system.d.ts.map +1 -1
  105. package/lib/memory/memory-system.js +1 -3
  106. package/lib/memory/memory-system.js.map +1 -1
  107. package/lib/orchestrator/bootstrap-executors.d.ts +0 -4
  108. package/lib/orchestrator/bootstrap-executors.d.ts.map +1 -1
  109. package/lib/orchestrator/bootstrap-executors.js +11 -137
  110. package/lib/orchestrator/bootstrap-executors.js.map +1 -1
  111. package/lib/orchestrator/orchestration-mappers.d.ts +1 -1
  112. package/lib/orchestrator/orchestration-mappers.d.ts.map +1 -1
  113. package/lib/orchestrator/orchestration-mappers.js +4 -49
  114. package/lib/orchestrator/orchestration-mappers.js.map +1 -1
  115. package/lib/orchestrator/orchestration-service.d.ts.map +1 -1
  116. package/lib/orchestrator/orchestration-service.js +2 -5
  117. package/lib/orchestrator/orchestration-service.js.map +1 -1
  118. package/lib/orchestrator/orchestration-source.d.ts +5 -0
  119. package/lib/orchestrator/orchestration-source.d.ts.map +1 -0
  120. package/lib/orchestrator/orchestration-source.js +22 -0
  121. package/lib/orchestrator/orchestration-source.js.map +1 -0
  122. package/lib/outbound/send-proactive.d.ts +3 -13
  123. package/lib/outbound/send-proactive.d.ts.map +1 -1
  124. package/lib/outbound/send-proactive.js +1 -53
  125. package/lib/outbound/send-proactive.js.map +1 -1
  126. package/lib/plugin-runtime/agent-host-port.d.ts +12 -3
  127. package/lib/plugin-runtime/agent-host-port.d.ts.map +1 -1
  128. package/lib/plugin-runtime/agent-host-port.js +1 -1
  129. package/lib/plugin-runtime/agent-host-port.js.map +1 -1
  130. package/lib/plugin-runtime/agent-runtime.d.ts +7 -4
  131. package/lib/plugin-runtime/agent-runtime.d.ts.map +1 -1
  132. package/lib/plugin-runtime/agent-runtime.js +3 -2
  133. package/lib/plugin-runtime/agent-runtime.js.map +1 -1
  134. package/lib/plugin-runtime/capability-tools.d.ts.map +1 -1
  135. package/lib/plugin-runtime/capability-tools.js +3 -0
  136. package/lib/plugin-runtime/capability-tools.js.map +1 -1
  137. package/lib/plugin-runtime/deferred-capability-plan.d.ts +1 -0
  138. package/lib/plugin-runtime/deferred-capability-plan.d.ts.map +1 -1
  139. package/lib/plugin-runtime/deferred-capability-plan.js +1 -1
  140. package/lib/plugin-runtime/deferred-capability-plan.js.map +1 -1
  141. package/lib/plugin-runtime/full-agent-turn-engine.d.ts.map +1 -1
  142. package/lib/plugin-runtime/full-agent-turn-engine.js +102 -0
  143. package/lib/plugin-runtime/full-agent-turn-engine.js.map +1 -1
  144. package/lib/plugin-runtime/host-mcp-projection.d.ts.map +1 -1
  145. package/lib/plugin-runtime/host-mcp-projection.js +17 -2
  146. package/lib/plugin-runtime/host-mcp-projection.js.map +1 -1
  147. package/lib/plugin-runtime/schedule-capability-plan.d.ts +20 -0
  148. package/lib/plugin-runtime/schedule-capability-plan.d.ts.map +1 -0
  149. package/lib/plugin-runtime/schedule-capability-plan.js +88 -0
  150. package/lib/plugin-runtime/schedule-capability-plan.js.map +1 -0
  151. package/lib/prompt/assembly.d.ts.map +1 -1
  152. package/lib/prompt/assembly.js +2 -0
  153. package/lib/prompt/assembly.js.map +1 -1
  154. package/lib/prompt/index.d.ts +5 -1
  155. package/lib/prompt/index.d.ts.map +1 -1
  156. package/lib/prompt/index.js +3 -1
  157. package/lib/prompt/index.js.map +1 -1
  158. package/lib/prompt/prompt-assembly-registry.d.ts +25 -0
  159. package/lib/prompt/prompt-assembly-registry.d.ts.map +1 -0
  160. package/lib/prompt/prompt-assembly-registry.js +43 -0
  161. package/lib/prompt/prompt-assembly-registry.js.map +1 -0
  162. package/lib/prompt/prompt-budget.d.ts +9 -0
  163. package/lib/prompt/prompt-budget.d.ts.map +1 -0
  164. package/lib/prompt/prompt-budget.js +28 -0
  165. package/lib/prompt/prompt-budget.js.map +1 -0
  166. package/lib/prompt/prompt-builder.js +1 -1
  167. package/lib/prompt/prompt-builder.js.map +1 -1
  168. package/lib/prompt/system-prompt.d.ts +5 -8
  169. package/lib/prompt/system-prompt.d.ts.map +1 -1
  170. package/lib/prompt/system-prompt.js +159 -78
  171. package/lib/prompt/system-prompt.js.map +1 -1
  172. package/lib/prompt/tokens.d.ts +8 -0
  173. package/lib/prompt/tokens.d.ts.map +1 -0
  174. package/lib/prompt/tokens.js +2 -0
  175. package/lib/prompt/tokens.js.map +1 -0
  176. package/lib/prompt/turn-prompt-profile.d.ts +1 -2
  177. package/lib/prompt/turn-prompt-profile.d.ts.map +1 -1
  178. package/lib/schedule-domain/audit-logger.d.ts +2 -2
  179. package/lib/schedule-domain/audit-logger.d.ts.map +1 -1
  180. package/lib/schedule-domain/execution-domain.d.ts +21 -17
  181. package/lib/schedule-domain/execution-domain.d.ts.map +1 -1
  182. package/lib/schedule-domain/execution-domain.js +41 -23
  183. package/lib/schedule-domain/execution-domain.js.map +1 -1
  184. package/lib/schedule-domain/index.d.ts +0 -1
  185. package/lib/schedule-domain/index.d.ts.map +1 -1
  186. package/lib/schedule-domain/index.js +0 -1
  187. package/lib/schedule-domain/index.js.map +1 -1
  188. package/lib/schedule-domain/prompt-assembler.d.ts +3 -4
  189. package/lib/schedule-domain/prompt-assembler.d.ts.map +1 -1
  190. package/lib/schedule-domain/prompt-assembler.js +0 -16
  191. package/lib/schedule-domain/prompt-assembler.js.map +1 -1
  192. package/lib/schedule-domain/security-harness.d.ts +10 -15
  193. package/lib/schedule-domain/security-harness.d.ts.map +1 -1
  194. package/lib/schedule-domain/security-harness.js +5 -78
  195. package/lib/schedule-domain/security-harness.js.map +1 -1
  196. package/lib/security/exec-policy.d.ts +2 -0
  197. package/lib/security/exec-policy.d.ts.map +1 -1
  198. package/lib/security/exec-policy.js +21 -0
  199. package/lib/security/exec-policy.js.map +1 -1
  200. package/lib/security/owner-approve-always-store.d.ts +8 -3
  201. package/lib/security/owner-approve-always-store.d.ts.map +1 -1
  202. package/lib/security/owner-approve-always-store.js +160 -173
  203. package/lib/security/owner-approve-always-store.js.map +1 -1
  204. package/lib/security/policy-facade.d.ts.map +1 -1
  205. package/lib/security/policy-facade.js +11 -1
  206. package/lib/security/policy-facade.js.map +1 -1
  207. package/lib/service.d.ts.map +1 -1
  208. package/lib/service.js +0 -7
  209. package/lib/service.js.map +1 -1
  210. package/lib/session/index.d.ts +3 -3
  211. package/lib/session/index.d.ts.map +1 -1
  212. package/lib/session/index.js +3 -3
  213. package/lib/session/index.js.map +1 -1
  214. package/lib/session/passive-group-session.js +1 -1
  215. package/lib/session/session-key.d.ts +4 -0
  216. package/lib/session/session-key.d.ts.map +1 -0
  217. package/lib/session/session-key.js +6 -0
  218. package/lib/session/session-key.js.map +1 -0
  219. package/lib/session/session-system.d.ts.map +1 -1
  220. package/lib/session/session-system.js +4 -4
  221. package/lib/session/session-system.js.map +1 -1
  222. package/lib/session/session-tree-commands.d.ts +2 -3
  223. package/lib/session/session-tree-commands.d.ts.map +1 -1
  224. package/lib/session/session-tree-commands.js +2 -5
  225. package/lib/session/session-tree-commands.js.map +1 -1
  226. package/lib/session/strategies.d.ts +1 -1
  227. package/lib/session/strategies.d.ts.map +1 -1
  228. package/lib/session/strategies.js +2 -2
  229. package/lib/session/strategies.js.map +1 -1
  230. package/lib/subagent/im-result-sink.d.ts.map +1 -1
  231. package/lib/subagent/im-result-sink.js +0 -1
  232. package/lib/subagent/im-result-sink.js.map +1 -1
  233. package/lib/subagent-goal-notify.d.ts +0 -9
  234. package/lib/subagent-goal-notify.d.ts.map +1 -1
  235. package/lib/subagent-goal-notify.js +0 -13
  236. package/lib/subagent-goal-notify.js.map +1 -1
  237. package/lib/task-executor.d.ts +14 -3
  238. package/lib/task-executor.d.ts.map +1 -1
  239. package/lib/task-executor.js +48 -61
  240. package/lib/task-executor.js.map +1 -1
  241. package/lib/tool/classic-tool-execution-authority.d.ts.map +1 -1
  242. package/lib/tool/classic-tool-execution-authority.js +4 -3
  243. package/lib/tool/classic-tool-execution-authority.js.map +1 -1
  244. package/lib/tool/prepare-turn-tools.d.ts +0 -2
  245. package/lib/tool/prepare-turn-tools.d.ts.map +1 -1
  246. package/lib/tool/prepare-turn-tools.js +1 -55
  247. package/lib/tool/prepare-turn-tools.js.map +1 -1
  248. package/lib/tool/tool-runtime.d.ts +1 -1
  249. package/lib/tool/tool-runtime.d.ts.map +1 -1
  250. package/lib/turn/auto-continue.js +1 -1
  251. package/lib/turn/auto-continue.js.map +1 -1
  252. package/lib/turn/persist-deferred-context.js +1 -1
  253. package/lib/turn/persist-deferred-context.js.map +1 -1
  254. package/lib/turn/persist-subagent-context.js +1 -1
  255. package/lib/turn/persist-subagent-context.js.map +1 -1
  256. package/lib/turn/process-stream.d.ts.map +1 -1
  257. package/lib/turn/process-stream.js +0 -2
  258. package/lib/turn/process-stream.js.map +1 -1
  259. package/lib/turn/turn-ingress.d.ts +21 -1
  260. package/lib/turn/turn-ingress.d.ts.map +1 -1
  261. package/lib/turn/turn-ingress.js +29 -0
  262. package/lib/turn/turn-ingress.js.map +1 -1
  263. package/lib/turn/turn-pipeline.d.ts +0 -5
  264. package/lib/turn/turn-pipeline.d.ts.map +1 -1
  265. package/lib/turn/turn-pipeline.js +12 -32
  266. package/lib/turn/turn-pipeline.js.map +1 -1
  267. package/lib/typing-indicator/adapter-integration.d.ts +1 -2
  268. package/lib/typing-indicator/adapter-integration.d.ts.map +1 -1
  269. package/lib/typing-indicator/adapter-integration.js.map +1 -1
  270. package/lib/typing-indicator/integration.d.ts +2 -3
  271. package/lib/typing-indicator/integration.d.ts.map +1 -1
  272. package/lib/typing-indicator/integration.js +48 -11
  273. package/lib/typing-indicator/integration.js.map +1 -1
  274. package/lib/zhin-agent/index.d.ts +5 -8
  275. package/lib/zhin-agent/index.d.ts.map +1 -1
  276. package/lib/zhin-agent/index.js +13 -15
  277. package/lib/zhin-agent/index.js.map +1 -1
  278. package/package.json +9 -9
  279. package/lib/aop/index.d.ts +0 -11
  280. package/lib/aop/index.d.ts.map +0 -1
  281. package/lib/aop/index.js +0 -11
  282. package/lib/aop/index.js.map +0 -1
  283. package/lib/aop/pipeline/index.d.ts +0 -12
  284. package/lib/aop/pipeline/index.d.ts.map +0 -1
  285. package/lib/aop/pipeline/index.js +0 -12
  286. package/lib/aop/pipeline/index.js.map +0 -1
  287. package/lib/aop/pipeline/pipeline-flow.d.ts +0 -25
  288. package/lib/aop/pipeline/pipeline-flow.d.ts.map +0 -1
  289. package/lib/aop/pipeline/pipeline-flow.js +0 -115
  290. package/lib/aop/pipeline/pipeline-flow.js.map +0 -1
  291. package/lib/aop/pipeline/pipeline-mode.d.ts +0 -10
  292. package/lib/aop/pipeline/pipeline-mode.d.ts.map +0 -1
  293. package/lib/aop/pipeline/pipeline-mode.js +0 -16
  294. package/lib/aop/pipeline/pipeline-mode.js.map +0 -1
  295. package/lib/aop/pipeline/pipeline-service.d.ts +0 -123
  296. package/lib/aop/pipeline/pipeline-service.d.ts.map +0 -1
  297. package/lib/aop/pipeline/pipeline-service.js +0 -238
  298. package/lib/aop/pipeline/pipeline-service.js.map +0 -1
  299. package/lib/aop/pipeline/pipeline-transitions.d.ts +0 -14
  300. package/lib/aop/pipeline/pipeline-transitions.d.ts.map +0 -1
  301. package/lib/aop/pipeline/pipeline-transitions.js +0 -31
  302. package/lib/aop/pipeline/pipeline-transitions.js.map +0 -1
  303. package/lib/aop/pipeline/ports.d.ts +0 -16
  304. package/lib/aop/pipeline/ports.d.ts.map +0 -1
  305. package/lib/aop/pipeline/ports.js +0 -2
  306. package/lib/aop/pipeline/ports.js.map +0 -1
  307. package/lib/aop/pipeline/role-capability-policy.d.ts +0 -16
  308. package/lib/aop/pipeline/role-capability-policy.d.ts.map +0 -1
  309. package/lib/aop/pipeline/role-capability-policy.js +0 -29
  310. package/lib/aop/pipeline/role-capability-policy.js.map +0 -1
  311. package/lib/aop/runtime/index.d.ts +0 -9
  312. package/lib/aop/runtime/index.d.ts.map +0 -1
  313. package/lib/aop/runtime/index.js +0 -9
  314. package/lib/aop/runtime/index.js.map +0 -1
  315. package/lib/collaboration/collab-admin-gate.d.ts +0 -21
  316. package/lib/collaboration/collab-admin-gate.d.ts.map +0 -1
  317. package/lib/collaboration/collab-admin-gate.js +0 -74
  318. package/lib/collaboration/collab-admin-gate.js.map +0 -1
  319. package/lib/collaboration/collab-utils.d.ts +0 -15
  320. package/lib/collaboration/collab-utils.d.ts.map +0 -1
  321. package/lib/collaboration/collab-utils.js +0 -37
  322. package/lib/collaboration/collab-utils.js.map +0 -1
  323. package/lib/collaboration/collaboration-artifact-repository.d.ts +0 -48
  324. package/lib/collaboration/collaboration-artifact-repository.d.ts.map +0 -1
  325. package/lib/collaboration/collaboration-artifact-repository.js +0 -114
  326. package/lib/collaboration/collaboration-artifact-repository.js.map +0 -1
  327. package/lib/collaboration/collaboration-commands.d.ts +0 -38
  328. package/lib/collaboration/collaboration-commands.d.ts.map +0 -1
  329. package/lib/collaboration/collaboration-commands.js +0 -373
  330. package/lib/collaboration/collaboration-commands.js.map +0 -1
  331. package/lib/collaboration/collaboration-config.d.ts +0 -30
  332. package/lib/collaboration/collaboration-config.d.ts.map +0 -1
  333. package/lib/collaboration/collaboration-config.js +0 -170
  334. package/lib/collaboration/collaboration-config.js.map +0 -1
  335. package/lib/collaboration/collaboration-context.d.ts +0 -15
  336. package/lib/collaboration/collaboration-context.d.ts.map +0 -1
  337. package/lib/collaboration/collaboration-context.js +0 -101
  338. package/lib/collaboration/collaboration-context.js.map +0 -1
  339. package/lib/collaboration/collaboration-db-model.d.ts +0 -350
  340. package/lib/collaboration/collaboration-db-model.d.ts.map +0 -1
  341. package/lib/collaboration/collaboration-db-model.js +0 -112
  342. package/lib/collaboration/collaboration-db-model.js.map +0 -1
  343. package/lib/collaboration/collaboration-delegation.d.ts +0 -21
  344. package/lib/collaboration/collaboration-delegation.d.ts.map +0 -1
  345. package/lib/collaboration/collaboration-delegation.js +0 -221
  346. package/lib/collaboration/collaboration-delegation.js.map +0 -1
  347. package/lib/collaboration/collaboration-dispatch.d.ts +0 -32
  348. package/lib/collaboration/collaboration-dispatch.d.ts.map +0 -1
  349. package/lib/collaboration/collaboration-dispatch.js +0 -93
  350. package/lib/collaboration/collaboration-dispatch.js.map +0 -1
  351. package/lib/collaboration/collaboration-kernel-bridge.d.ts +0 -23
  352. package/lib/collaboration/collaboration-kernel-bridge.d.ts.map +0 -1
  353. package/lib/collaboration/collaboration-kernel-bridge.js +0 -105
  354. package/lib/collaboration/collaboration-kernel-bridge.js.map +0 -1
  355. package/lib/collaboration/collaboration-outbound.d.ts +0 -64
  356. package/lib/collaboration/collaboration-outbound.d.ts.map +0 -1
  357. package/lib/collaboration/collaboration-outbound.js +0 -312
  358. package/lib/collaboration/collaboration-outbound.js.map +0 -1
  359. package/lib/collaboration/collaboration-scene-repository.d.ts +0 -154
  360. package/lib/collaboration/collaboration-scene-repository.d.ts.map +0 -1
  361. package/lib/collaboration/collaboration-scene-repository.js +0 -451
  362. package/lib/collaboration/collaboration-scene-repository.js.map +0 -1
  363. package/lib/collaboration/collaboration-turn-snapshot.d.ts +0 -18
  364. package/lib/collaboration/collaboration-turn-snapshot.d.ts.map +0 -1
  365. package/lib/collaboration/collaboration-turn-snapshot.js +0 -35
  366. package/lib/collaboration/collaboration-turn-snapshot.js.map +0 -1
  367. package/lib/collaboration/delegation-state.d.ts +0 -30
  368. package/lib/collaboration/delegation-state.d.ts.map +0 -1
  369. package/lib/collaboration/delegation-state.js +0 -86
  370. package/lib/collaboration/delegation-state.js.map +0 -1
  371. package/lib/collaboration/endpoint-identity.d.ts +0 -28
  372. package/lib/collaboration/endpoint-identity.d.ts.map +0 -1
  373. package/lib/collaboration/endpoint-identity.js +0 -80
  374. package/lib/collaboration/endpoint-identity.js.map +0 -1
  375. package/lib/collaboration/group-feed.d.ts +0 -30
  376. package/lib/collaboration/group-feed.d.ts.map +0 -1
  377. package/lib/collaboration/group-feed.js +0 -150
  378. package/lib/collaboration/group-feed.js.map +0 -1
  379. package/lib/collaboration/group-message.d.ts +0 -53
  380. package/lib/collaboration/group-message.d.ts.map +0 -1
  381. package/lib/collaboration/group-message.js +0 -101
  382. package/lib/collaboration/group-message.js.map +0 -1
  383. package/lib/collaboration/im-mention-delegate.d.ts +0 -22
  384. package/lib/collaboration/im-mention-delegate.d.ts.map +0 -1
  385. package/lib/collaboration/im-mention-delegate.js +0 -15
  386. package/lib/collaboration/im-mention-delegate.js.map +0 -1
  387. package/lib/collaboration/inbound-peer-handback.d.ts +0 -18
  388. package/lib/collaboration/inbound-peer-handback.d.ts.map +0 -1
  389. package/lib/collaboration/inbound-peer-handback.js +0 -65
  390. package/lib/collaboration/inbound-peer-handback.js.map +0 -1
  391. package/lib/collaboration/inbound-spawn-task.d.ts +0 -29
  392. package/lib/collaboration/inbound-spawn-task.d.ts.map +0 -1
  393. package/lib/collaboration/inbound-spawn-task.js +0 -96
  394. package/lib/collaboration/inbound-spawn-task.js.map +0 -1
  395. package/lib/collaboration/inbound-turn-endpoint.d.ts +0 -16
  396. package/lib/collaboration/inbound-turn-endpoint.d.ts.map +0 -1
  397. package/lib/collaboration/inbound-turn-endpoint.js +0 -26
  398. package/lib/collaboration/inbound-turn-endpoint.js.map +0 -1
  399. package/lib/collaboration/inbound-turn-tools.d.ts +0 -13
  400. package/lib/collaboration/inbound-turn-tools.d.ts.map +0 -1
  401. package/lib/collaboration/inbound-turn-tools.js +0 -24
  402. package/lib/collaboration/inbound-turn-tools.js.map +0 -1
  403. package/lib/collaboration/index.d.ts +0 -21
  404. package/lib/collaboration/index.d.ts.map +0 -1
  405. package/lib/collaboration/index.js +0 -19
  406. package/lib/collaboration/index.js.map +0 -1
  407. package/lib/collaboration/init-observe-hook.d.ts +0 -56
  408. package/lib/collaboration/init-observe-hook.d.ts.map +0 -1
  409. package/lib/collaboration/init-observe-hook.js +0 -168
  410. package/lib/collaboration/init-observe-hook.js.map +0 -1
  411. package/lib/collaboration/init-wizard-service.d.ts +0 -57
  412. package/lib/collaboration/init-wizard-service.d.ts.map +0 -1
  413. package/lib/collaboration/init-wizard-service.js +0 -187
  414. package/lib/collaboration/init-wizard-service.js.map +0 -1
  415. package/lib/collaboration/outbound-resolver.d.ts +0 -37
  416. package/lib/collaboration/outbound-resolver.d.ts.map +0 -1
  417. package/lib/collaboration/outbound-resolver.js +0 -189
  418. package/lib/collaboration/outbound-resolver.js.map +0 -1
  419. package/lib/collaboration/peer-policy.d.ts +0 -29
  420. package/lib/collaboration/peer-policy.d.ts.map +0 -1
  421. package/lib/collaboration/peer-policy.js +0 -118
  422. package/lib/collaboration/peer-policy.js.map +0 -1
  423. package/lib/collaboration/resolve-agent-session-key.d.ts +0 -21
  424. package/lib/collaboration/resolve-agent-session-key.d.ts.map +0 -1
  425. package/lib/collaboration/resolve-agent-session-key.js +0 -61
  426. package/lib/collaboration/resolve-agent-session-key.js.map +0 -1
  427. package/lib/collaboration/runtime-inbound-gate.d.ts +0 -35
  428. package/lib/collaboration/runtime-inbound-gate.d.ts.map +0 -1
  429. package/lib/collaboration/runtime-inbound-gate.js +0 -105
  430. package/lib/collaboration/runtime-inbound-gate.js.map +0 -1
  431. package/lib/collaboration/scene-context.d.ts +0 -17
  432. package/lib/collaboration/scene-context.d.ts.map +0 -1
  433. package/lib/collaboration/scene-context.js +0 -22
  434. package/lib/collaboration/scene-context.js.map +0 -1
  435. package/lib/collaboration/scene-identity-service.d.ts +0 -169
  436. package/lib/collaboration/scene-identity-service.d.ts.map +0 -1
  437. package/lib/collaboration/scene-identity-service.js +0 -479
  438. package/lib/collaboration/scene-identity-service.js.map +0 -1
  439. package/lib/collaboration/scene-service.d.ts +0 -67
  440. package/lib/collaboration/scene-service.d.ts.map +0 -1
  441. package/lib/collaboration/scene-service.js +0 -157
  442. package/lib/collaboration/scene-service.js.map +0 -1
  443. package/lib/collaboration/structured-ai-outbound.d.ts +0 -25
  444. package/lib/collaboration/structured-ai-outbound.d.ts.map +0 -1
  445. package/lib/collaboration/structured-ai-outbound.js +0 -179
  446. package/lib/collaboration/structured-ai-outbound.js.map +0 -1
  447. package/lib/collaboration/turn-plan-resolver.d.ts +0 -17
  448. package/lib/collaboration/turn-plan-resolver.d.ts.map +0 -1
  449. package/lib/collaboration/turn-plan-resolver.js +0 -63
  450. package/lib/collaboration/turn-plan-resolver.js.map +0 -1
  451. package/lib/collaboration/types.d.ts +0 -147
  452. package/lib/collaboration/types.d.ts.map +0 -1
  453. package/lib/collaboration/types.js +0 -16
  454. package/lib/collaboration/types.js.map +0 -1
  455. package/lib/collaboration/wire-collaboration-storage.d.ts +0 -4
  456. package/lib/collaboration/wire-collaboration-storage.d.ts.map +0 -1
  457. package/lib/collaboration/wire-collaboration-storage.js +0 -26
  458. package/lib/collaboration/wire-collaboration-storage.js.map +0 -1
  459. package/lib/config/resolve-pipeline-binding.d.ts +0 -16
  460. package/lib/config/resolve-pipeline-binding.d.ts.map +0 -1
  461. package/lib/config/resolve-pipeline-binding.js +0 -35
  462. package/lib/config/resolve-pipeline-binding.js.map +0 -1
  463. package/lib/discovery/register-agent-surface.d.ts +0 -33
  464. package/lib/discovery/register-agent-surface.d.ts.map +0 -1
  465. package/lib/discovery/register-agent-surface.js +0 -170
  466. package/lib/discovery/register-agent-surface.js.map +0 -1
  467. package/lib/init/create-zhin-agent.d.ts +0 -3
  468. package/lib/init/create-zhin-agent.d.ts.map +0 -1
  469. package/lib/init/create-zhin-agent.js +0 -401
  470. package/lib/init/create-zhin-agent.js.map +0 -1
  471. package/lib/init/register-ai-service.d.ts +0 -7
  472. package/lib/init/register-ai-service.d.ts.map +0 -1
  473. package/lib/init/register-ai-service.js +0 -45
  474. package/lib/init/register-ai-service.js.map +0 -1
  475. package/lib/init/register-builtin-tools.d.ts +0 -3
  476. package/lib/init/register-builtin-tools.d.ts.map +0 -1
  477. package/lib/init/register-builtin-tools.js +0 -411
  478. package/lib/init/register-builtin-tools.js.map +0 -1
  479. package/lib/init/register-capability-features.d.ts +0 -2
  480. package/lib/init/register-capability-features.d.ts.map +0 -1
  481. package/lib/init/register-capability-features.js +0 -28
  482. package/lib/init/register-capability-features.js.map +0 -1
  483. package/lib/init/register-collaboration-commands.d.ts +0 -2
  484. package/lib/init/register-collaboration-commands.d.ts.map +0 -1
  485. package/lib/init/register-collaboration-commands.js +0 -110
  486. package/lib/init/register-collaboration-commands.js.map +0 -1
  487. package/lib/init/register-db-models.d.ts +0 -2
  488. package/lib/init/register-db-models.d.ts.map +0 -1
  489. package/lib/init/register-db-models.js +0 -18
  490. package/lib/init/register-db-models.js.map +0 -1
  491. package/lib/init/register-db-upgrade.d.ts +0 -7
  492. package/lib/init/register-db-upgrade.d.ts.map +0 -1
  493. package/lib/init/register-db-upgrade.js +0 -79
  494. package/lib/init/register-db-upgrade.js.map +0 -1
  495. package/lib/init/register-group-session-passive.d.ts +0 -3
  496. package/lib/init/register-group-session-passive.d.ts.map +0 -1
  497. package/lib/init/register-group-session-passive.js +0 -61
  498. package/lib/init/register-group-session-passive.js.map +0 -1
  499. package/lib/init/register-im-segment-filter.d.ts +0 -2
  500. package/lib/init/register-im-segment-filter.d.ts.map +0 -1
  501. package/lib/init/register-im-segment-filter.js +0 -23
  502. package/lib/init/register-im-segment-filter.js.map +0 -1
  503. package/lib/init/register-init-wizard-guardrail.d.ts +0 -2
  504. package/lib/init/register-init-wizard-guardrail.d.ts.map +0 -1
  505. package/lib/init/register-init-wizard-guardrail.js +0 -41
  506. package/lib/init/register-init-wizard-guardrail.js.map +0 -1
  507. package/lib/init/register-introspection-commands.d.ts +0 -3
  508. package/lib/init/register-introspection-commands.d.ts.map +0 -1
  509. package/lib/init/register-introspection-commands.js +0 -107
  510. package/lib/init/register-introspection-commands.js.map +0 -1
  511. package/lib/init/register-management-tools.d.ts +0 -10
  512. package/lib/init/register-management-tools.d.ts.map +0 -1
  513. package/lib/init/register-management-tools.js +0 -42
  514. package/lib/init/register-management-tools.js.map +0 -1
  515. package/lib/init/register-mcp-from-config.d.ts +0 -2
  516. package/lib/init/register-mcp-from-config.d.ts.map +0 -1
  517. package/lib/init/register-mcp-from-config.js +0 -87
  518. package/lib/init/register-mcp-from-config.js.map +0 -1
  519. package/lib/init/register-orchestrator.d.ts +0 -2
  520. package/lib/init/register-orchestrator.d.ts.map +0 -1
  521. package/lib/init/register-orchestrator.js +0 -15
  522. package/lib/init/register-orchestrator.js.map +0 -1
  523. package/lib/init/register-tool-service.d.ts +0 -2
  524. package/lib/init/register-tool-service.d.ts.map +0 -1
  525. package/lib/init/register-tool-service.js +0 -9
  526. package/lib/init/register-tool-service.js.map +0 -1
  527. package/lib/init/shared-refs.d.ts +0 -14
  528. package/lib/init/shared-refs.d.ts.map +0 -1
  529. package/lib/init/shared-refs.js +0 -7
  530. package/lib/init/shared-refs.js.map +0 -1
  531. package/lib/init/types.d.ts +0 -26
  532. package/lib/init/types.d.ts.map +0 -1
  533. package/lib/init/types.js +0 -7
  534. package/lib/init/types.js.map +0 -1
  535. package/lib/init.d.ts +0 -7
  536. package/lib/init.d.ts.map +0 -1
  537. package/lib/init.js +0 -11
  538. package/lib/init.js.map +0 -1
  539. package/lib/schedule-domain/tool-resolver.d.ts +0 -20
  540. package/lib/schedule-domain/tool-resolver.d.ts.map +0 -1
  541. package/lib/schedule-domain/tool-resolver.js +0 -80
  542. package/lib/schedule-domain/tool-resolver.js.map +0 -1
  543. package/lib/schedule-domain/turn-context.d.ts +0 -9
  544. package/lib/schedule-domain/turn-context.d.ts.map +0 -1
  545. package/lib/schedule-domain/turn-context.js +0 -36
  546. package/lib/schedule-domain/turn-context.js.map +0 -1
  547. package/lib/session/agent-session-host-port.d.ts +0 -23
  548. package/lib/session/agent-session-host-port.d.ts.map +0 -1
  549. package/lib/session/agent-session-host-port.js +0 -61
  550. package/lib/session/agent-session-host-port.js.map +0 -1
  551. package/lib/session/http-agent-session-store.d.ts +0 -76
  552. package/lib/session/http-agent-session-store.d.ts.map +0 -1
  553. package/lib/session/http-agent-session-store.js +0 -211
  554. package/lib/session/http-agent-session-store.js.map +0 -1
  555. package/lib/session/http-approval-adapter.d.ts +0 -11
  556. package/lib/session/http-approval-adapter.d.ts.map +0 -1
  557. package/lib/session/http-approval-adapter.js +0 -19
  558. package/lib/session/http-approval-adapter.js.map +0 -1
  559. package/lib/session/http-approval-waiter.d.ts +0 -11
  560. package/lib/session/http-approval-waiter.d.ts.map +0 -1
  561. package/lib/session/http-approval-waiter.js +0 -61
  562. package/lib/session/http-approval-waiter.js.map +0 -1
  563. package/lib/session/http-session-persistence.d.ts +0 -28
  564. package/lib/session/http-session-persistence.d.ts.map +0 -1
  565. package/lib/session/http-session-persistence.js +0 -60
  566. package/lib/session/http-session-persistence.js.map +0 -1
  567. package/lib/session/http-session-sink.d.ts +0 -11
  568. package/lib/session/http-session-sink.d.ts.map +0 -1
  569. package/lib/session/http-session-sink.js +0 -32
  570. package/lib/session/http-session-sink.js.map +0 -1
  571. package/lib/session/http-step-projector.d.ts +0 -16
  572. package/lib/session/http-step-projector.d.ts.map +0 -1
  573. package/lib/session/http-step-projector.js +0 -118
  574. package/lib/session/http-step-projector.js.map +0 -1
  575. package/lib/session/http-turn-runner.d.ts +0 -16
  576. package/lib/session/http-turn-runner.d.ts.map +0 -1
  577. package/lib/session/http-turn-runner.js +0 -57
  578. package/lib/session/http-turn-runner.js.map +0 -1
  579. package/lib/session/park-controller.d.ts +0 -24
  580. package/lib/session/park-controller.d.ts.map +0 -1
  581. package/lib/session/park-controller.js +0 -58
  582. package/lib/session/park-controller.js.map +0 -1
  583. package/lib/session/resolve-approval-port.d.ts +0 -7
  584. package/lib/session/resolve-approval-port.d.ts.map +0 -1
  585. package/lib/session/resolve-approval-port.js +0 -13
  586. package/lib/session/resolve-approval-port.js.map +0 -1
  587. package/lib/session/session-event-log.d.ts +0 -17
  588. package/lib/session/session-event-log.d.ts.map +0 -1
  589. package/lib/session/session-event-log.js +0 -56
  590. package/lib/session/session-event-log.js.map +0 -1
@@ -1,14 +0,0 @@
1
- /**
2
- * Shared mutable references between init sub-modules.
3
- *
4
- * These refs allow the split modules to coordinate without passing
5
- * the instances through function parameters everywhere.
6
- */
7
- import type { AIService } from '../service.js';
8
- import type { ZhinAgent } from '../zhin-agent/index.js';
9
- export interface AIServiceRefs {
10
- aiService: AIService | null;
11
- zhinAgent: ZhinAgent | null;
12
- }
13
- export declare function createRefs(): AIServiceRefs;
14
- //# sourceMappingURL=shared-refs.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared-refs.d.ts","sourceRoot":"","sources":["../../src/init/shared-refs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;CAC7B;AAED,wBAAgB,UAAU,IAAI,aAAa,CAK1C"}
@@ -1,7 +0,0 @@
1
- export function createRefs() {
2
- return {
3
- aiService: null,
4
- zhinAgent: null,
5
- };
6
- }
7
- //# sourceMappingURL=shared-refs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared-refs.js","sourceRoot":"","sources":["../../src/init/shared-refs.ts"],"names":[],"mappings":"AAcA,MAAM,UAAU,UAAU;IACxB,OAAO;QACL,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,IAAI;KAChB,CAAC;AACJ,CAAC"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Consolidated type augmentation for the agent package.
3
- * This ensures all init sub-modules can use typed inject/useContext
4
- * without `as any` casts.
5
- */
6
- import type { AIService } from '../service.js';
7
- import type { AgentOrchestrator } from '../orchestrator/index.js';
8
- import type { AgentSessionHostPort } from '../session/agent-session-host-port.js';
9
- import type { AgentFeature } from '../features/agent-feature.js';
10
- import type { MCPFeature } from '../features/mcp-feature.js';
11
- import type { FeatureCapabilityIngress } from '../ingress/capability-ingress.js';
12
- declare module '@zhin.js/core' {
13
- namespace Plugin {
14
- interface Contexts {
15
- ai: AIService;
16
- agent: AgentOrchestrator;
17
- agentSessionHost?: AgentSessionHostPort;
18
- agentFeature: AgentFeature;
19
- mcpFeature: MCPFeature;
20
- /** Optional — provided after ZhinAgent boot when Ingress is wired */
21
- capabilityIngress?: FeatureCapabilityIngress;
22
- }
23
- }
24
- }
25
- export {};
26
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/init/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAEjF,OAAO,QAAQ,eAAe,CAAC;IAC7B,UAAU,MAAM,CAAC;QACf,UAAU,QAAQ;YAChB,EAAE,EAAE,SAAS,CAAC;YACd,KAAK,EAAE,iBAAiB,CAAC;YACzB,gBAAgB,CAAC,EAAE,oBAAoB,CAAC;YACxC,YAAY,EAAE,YAAY,CAAC;YAC3B,UAAU,EAAE,UAAU,CAAC;YACvB,qEAAqE;YACrE,iBAAiB,CAAC,EAAE,wBAAwB,CAAC;SAC9C;KACF;CACF;AAED,OAAO,EAAE,CAAC"}
package/lib/init/types.js DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * Consolidated type augmentation for the agent package.
3
- * This ensures all init sub-modules can use typed inject/useContext
4
- * without `as any` casts.
5
- */
6
- export {};
7
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/init/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
package/lib/init.d.ts DELETED
@@ -1,7 +0,0 @@
1
- /**
2
- * @deprecated **已删除**。Legacy `bootstrapNode` 路径已移除;
3
- * Plugin Runtime (`zhin runtime start`) 通过 basic/cli 自行装配 Agent。
4
- * @throws 总是抛出。
5
- */
6
- export declare function initAgentModule(): never;
7
- //# sourceMappingURL=init.d.ts.map
package/lib/init.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,KAAK,CAMvC"}
package/lib/init.js DELETED
@@ -1,11 +0,0 @@
1
- /**
2
- * @deprecated **已删除**。Legacy `bootstrapNode` 路径已移除;
3
- * Plugin Runtime (`zhin runtime start`) 通过 basic/cli 自行装配 Agent。
4
- * @throws 总是抛出。
5
- */
6
- export function initAgentModule() {
7
- throw new Error('initAgentModule() has been removed. '
8
- + 'The Plugin Runtime assembles the Agent stack via basic/cli. '
9
- + 'See docs/contributing/public-api-surface.md');
10
- }
11
- //# sourceMappingURL=init.js.map
package/lib/init.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,IAAI,KAAK,CACb,sCAAsC;UACpC,8DAA8D;UAC9D,6CAA6C,CAChD,CAAC;AACJ,CAAC"}
@@ -1,20 +0,0 @@
1
- import { type AgentTool } from '@zhin.js/ai';
2
- import type { SkillRegistry } from '../orchestrator/skill-registry.js';
3
- import type { ScheduleJobExecutionPlan } from '../assistant/types.js';
4
- declare const UNATTENDED_FORBIDDEN_TOOLS: Set<string>;
5
- export interface ScheduleToolResolverInput {
6
- prompt: string;
7
- executionPlan?: ScheduleJobExecutionPlan;
8
- tools: AgentTool[];
9
- skillRegistry: SkillRegistry | null;
10
- }
11
- export interface ScheduleToolResolverOutput {
12
- tools: AgentTool[];
13
- skills: string[];
14
- resolvedBy: 'execution-plan' | 'affinity';
15
- missingTools: string[];
16
- missingSkills: string[];
17
- }
18
- export declare function resolveScheduleTools(input: ScheduleToolResolverInput): ScheduleToolResolverOutput;
19
- export { UNATTENDED_FORBIDDEN_TOOLS };
20
- //# sourceMappingURL=tool-resolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-resolver.d.ts","sourceRoot":"","sources":["../../src/schedule-domain/tool-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAEtE,QAAA,MAAM,0BAA0B,aAM9B,CAAC;AAEH,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,wBAAwB,CAAC;IACzC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,gBAAgB,GAAG,UAAU,CAAC;IAC1C,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAMD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,GAAG,0BAA0B,CAuEjG;AAED,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
@@ -1,80 +0,0 @@
1
- import { filterTools } from '@zhin.js/ai';
2
- const UNATTENDED_FORBIDDEN_TOOLS = new Set([
3
- 'discover',
4
- 'load_tool',
5
- 'load_skill',
6
- 'ask_user',
7
- 'spawn_task',
8
- ]);
9
- function eligibleTools(tools) {
10
- return tools.filter(tool => !UNATTENDED_FORBIDDEN_TOOLS.has(tool.name));
11
- }
12
- export function resolveScheduleTools(input) {
13
- const pool = eligibleTools(input.tools);
14
- const byName = new Map(pool.map(tool => [tool.name, tool]));
15
- const plan = input.executionPlan;
16
- if (plan) {
17
- const selected = [];
18
- const selectedNames = new Set();
19
- const missingTools = [];
20
- const missingSkills = [];
21
- const skills = [];
22
- for (const name of plan.tools ?? []) {
23
- const tool = byName.get(name);
24
- if (!tool) {
25
- missingTools.push(name);
26
- }
27
- else if (!selectedNames.has(name)) {
28
- selected.push(tool);
29
- selectedNames.add(name);
30
- }
31
- }
32
- for (const name of plan.skills ?? []) {
33
- const skill = input.skillRegistry?.getByName(name);
34
- if (!skill) {
35
- missingSkills.push(name);
36
- continue;
37
- }
38
- skills.push(name);
39
- for (const skillTool of skill.tools) {
40
- const tool = byName.get(skillTool.name);
41
- if (tool && !selectedNames.has(tool.name)) {
42
- selected.push(tool);
43
- selectedNames.add(tool.name);
44
- }
45
- }
46
- }
47
- return {
48
- tools: selected,
49
- skills,
50
- resolvedBy: 'execution-plan',
51
- missingTools,
52
- missingSkills,
53
- };
54
- }
55
- const matchedSkills = input.skillRegistry?.searchScored(input.prompt, {
56
- maxResults: 20,
57
- minScore: 0.05,
58
- }).map(result => result.skill.name) ?? [];
59
- const affinityTools = filterTools(input.prompt, pool, { maxTools: 20, minScore: 0.05 });
60
- const affinityNames = new Set(affinityTools.map(tool => tool.name));
61
- for (const skillName of matchedSkills) {
62
- const skill = input.skillRegistry?.getByName(skillName);
63
- for (const skillTool of skill?.tools ?? []) {
64
- const tool = byName.get(skillTool.name);
65
- if (tool && !affinityNames.has(tool.name) && affinityTools.length < 20) {
66
- affinityTools.push(tool);
67
- affinityNames.add(tool.name);
68
- }
69
- }
70
- }
71
- return {
72
- tools: affinityTools,
73
- skills: matchedSkills,
74
- resolvedBy: 'affinity',
75
- missingTools: [],
76
- missingSkills: [],
77
- };
78
- }
79
- export { UNATTENDED_FORBIDDEN_TOOLS };
80
- //# sourceMappingURL=tool-resolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tool-resolver.js","sourceRoot":"","sources":["../../src/schedule-domain/tool-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAkB,MAAM,aAAa,CAAC;AAI1D,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAC;IACzC,UAAU;IACV,WAAW;IACX,YAAY;IACZ,UAAU;IAC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AAC;IACpE,KAAK,MAAM,SAAS,IAAI,aAAa,EAAE,CAAC;QACtC,MAAM,KAAK,GAAG,KAAK,CAAC,aAAa,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QACxD,KAAK,MAAM,SAAS,IAAI,KAAK,EAAE,KAAK,IAAI,EAAE,EAAE,CAAC;YAC3C,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACxC,IAAI,IAAI,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,aAAa,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;gBACvE,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACzB,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO;QACL,KAAK,EAAE,aAAa;QACpB,MAAM,EAAE,aAAa;QACrB,UAAU,EAAE,UAAU;QACtB,YAAY,EAAE,EAAE;QAChB,aAAa,EAAE,EAAE;KAClB,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,0BAA0B,EAAE,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { HostScheduleTurnContext } from '../internal/host-types.js';
2
- import type { TurnContextView } from '../context/turn-envelope.js';
3
- import type { AgentPromptProfile } from '../prompt/turn-prompt-profile.js';
4
- /** Native Schedule Turn identity. It never fabricates an IM platform or endpoint. */
5
- export declare function scheduleTurnContextView(context: HostScheduleTurnContext): TurnContextView;
6
- export declare function schedulePromptProfile(context: HostScheduleTurnContext, prompt: string): Extract<AgentPromptProfile, {
7
- kind: 'schedule';
8
- }>;
9
- //# sourceMappingURL=turn-context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"turn-context.d.ts","sourceRoot":"","sources":["../../src/schedule-domain/turn-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAE3E,qFAAqF;AACrF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,uBAAuB,GAAG,eAAe,CAazF;AAED,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,uBAAuB,EAChC,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,kBAAkB,EAAE;IAAE,IAAI,EAAE,UAAU,CAAA;CAAE,CAAC,CAgBnD"}
@@ -1,36 +0,0 @@
1
- import { demoteScheduleCreator } from './security-harness.js';
2
- /** Native Schedule Turn identity. It never fabricates an IM platform or endpoint. */
3
- export function scheduleTurnContextView(context) {
4
- const jobId = context.jobId?.trim();
5
- if (!jobId)
6
- throw new TypeError('Schedule Turn requires a jobId');
7
- const creator = context.createdBy ? demoteScheduleCreator(context.createdBy) : undefined;
8
- return Object.freeze({
9
- origin: Object.freeze({ kind: 'schedule', jobId }),
10
- principal: Object.freeze({
11
- subjectId: creator?.userId ?? 'schedule',
12
- ...(creator?.name ? { displayName: creator.name } : {}),
13
- roles: Object.freeze([...(creator?.roles ?? [])]),
14
- }),
15
- session: Object.freeze({ key: `schedule:${jobId}` }),
16
- });
17
- }
18
- export function schedulePromptProfile(context, prompt) {
19
- const jobId = context.jobId?.trim();
20
- if (!jobId)
21
- throw new TypeError('Schedule Turn requires a jobId');
22
- return Object.freeze({
23
- kind: 'schedule',
24
- jobId,
25
- prompt,
26
- createdBy: context.createdBy
27
- ? Object.freeze({ ...context.createdBy, roles: Object.freeze([...context.createdBy.roles]) })
28
- : undefined,
29
- security: Object.freeze({
30
- execPreset: context.security.execPreset,
31
- rejectOwnerApproval: true,
32
- allowedDomains: Object.freeze([...context.security.allowedDomains]),
33
- }),
34
- });
35
- }
36
- //# sourceMappingURL=turn-context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"turn-context.js","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,CAAC;QACnB,IAAI,EAAE,UAAU;QAChB,KAAK;QACL,MAAM;QACN,SAAS,EAAE,OAAO,CAAC,SAAS;YAC1B,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,GAAG,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;YAC7F,CAAC,CAAC,SAAS;QACb,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC;YACtB,UAAU,EAAE,OAAO,CAAC,QAAQ,CAAC,UAAU;YACvC,mBAAmB,EAAE,IAAa;YAClC,cAAc,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAC;SACpE,CAAC;KACH,CAAC,CAAC;AACL,CAAC"}
@@ -1,23 +0,0 @@
1
- /**
2
- * AgentSessionHostPort — Host `/zhin/v1/session*` bootstrap seam (ADR 0041).
3
- */
4
- import type { AgentStreamBus } from '../event/agent-stream-bus.js';
5
- import type { AgentStreamEvent } from '@zhin.js/ai/agent-stream';
6
- import { HttpApprovalAdapter } from './http-approval-adapter.js';
7
- import { HttpAgentSessionStore } from './http-agent-session-store.js';
8
- import type { ZhinAgent } from '../zhin-agent/index.js';
9
- export interface AgentSessionHostPort {
10
- store: HttpAgentSessionStore;
11
- httpApprovalAdapter: HttpApprovalAdapter;
12
- bus: AgentStreamBus;
13
- publishHttpSessionEvent(sessionId: string, event: AgentStreamEvent): Promise<void>;
14
- dispose(): void;
15
- }
16
- export interface CreateAgentSessionHostPortOptions {
17
- getAgent: () => ZhinAgent | null;
18
- bus: AgentStreamBus;
19
- dataDir?: string;
20
- maxSessions?: number;
21
- }
22
- export declare function createAgentSessionHostPort(options: CreateAgentSessionHostPortOptions): AgentSessionHostPort;
23
- //# sourceMappingURL=agent-session-host-port.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-session-host-port.d.ts","sourceRoot":"","sources":["../../src/session/agent-session-host-port.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAMtE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,qBAAqB,CAAC;IAC7B,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,GAAG,EAAE,cAAc,CAAC;IACpB,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnF,OAAO,IAAI,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,EAAE,MAAM,SAAS,GAAG,IAAI,CAAC;IACjC,GAAG,EAAE,cAAc,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,iCAAiC,GACzC,oBAAoB,CA0DtB"}
@@ -1,61 +0,0 @@
1
- import { HttpApprovalAdapter } from './http-approval-adapter.js';
2
- import { HttpAgentSessionStore } from './http-agent-session-store.js';
3
- import { SessionEventLog } from './session-event-log.js';
4
- import { ParkController } from './park-controller.js';
5
- import { HttpTurnRunner } from './http-turn-runner.js';
6
- import { createHttpSessionSink } from './http-session-sink.js';
7
- import { FileHttpSessionPersistence } from './http-session-persistence.js';
8
- export function createAgentSessionHostPort(options) {
9
- const log = new SessionEventLog();
10
- const park = new ParkController(options.bus);
11
- const httpApprovalAdapter = new HttpApprovalAdapter();
12
- const persistence = options.dataDir
13
- ? new FileHttpSessionPersistence(options.dataDir)
14
- : undefined;
15
- const storeRef = { current: null };
16
- const onPersist = persistence
17
- ? (sessionId) => { void storeRef.current?.persistSession(sessionId); }
18
- : undefined;
19
- const store = new HttpAgentSessionStore({
20
- getAgent: options.getAgent,
21
- maxSessions: options.maxSessions,
22
- log,
23
- park,
24
- httpApprovalAdapter,
25
- persistence,
26
- onPersist,
27
- });
28
- storeRef.current = store;
29
- store.setBus(options.bus);
30
- const sinkOff = options.bus.registerSink(createHttpSessionSink({
31
- sessions: store.getSessionsMap(),
32
- log,
33
- park,
34
- onPersist,
35
- }));
36
- const turnRunner = new HttpTurnRunner({
37
- getAgent: options.getAgent,
38
- bus: options.bus,
39
- park,
40
- sessions: store.getSessionsMap(),
41
- onPersist,
42
- });
43
- store.setTurnRunner(turnRunner);
44
- if (persistence) {
45
- void store.restoreFromDisk();
46
- }
47
- return {
48
- store,
49
- httpApprovalAdapter,
50
- bus: options.bus,
51
- publishHttpSessionEvent(sessionId, event) {
52
- return options.bus.publish(event, { sessionId, httpSessionId: sessionId });
53
- },
54
- dispose() {
55
- sinkOff();
56
- httpApprovalAdapter.waiter.dispose();
57
- store.dispose();
58
- },
59
- };
60
- }
61
- //# sourceMappingURL=agent-session-host-port.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-session-host-port.js","sourceRoot":"","sources":["../../src/session/agent-session-host-port.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,0BAA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AChB,IAAI;QACJ,QAAQ,EAAE,KAAK,CAAC,cAAc,EAAE;QAChC,SAAS;KACV,CAAC,CAAC;IACH,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IAEhC,IAAI,WAAW,EAAE,CAAC;QAChB,KAAK,KAAK,CAAC,eAAe,EAAE,CAAC;IAC/B,CAAC;IAED,OAAO;QACL,KAAK;QACL,mBAAmB;QACnB,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,uBAAuB,CAAC,SAAS,EAAE,KAAK;YACtC,OAAO,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,CAAC,CAAC;QAC7E,CAAC;QACD,OAAO;YACL,OAAO,EAAE,CAAC;YACV,mBAAmB,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;YACrC,KAAK,CAAC,OAAO,EAAE,CAAC;QAClB,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,76 +0,0 @@
1
- import { type AgentStreamEvent } from '@zhin.js/ai/agent-stream';
2
- import type { AgentStepCheckpoint } from '@zhin.js/ai/agent-step-checkpoint';
3
- import type { AgentStreamBus } from '../event/agent-stream-bus.js';
4
- import type { ZhinAgent } from '../zhin-agent/index.js';
5
- import type { HttpApprovalAdapter } from './http-approval-adapter.js';
6
- import type { ParkController, HttpSessionParkState } from './park-controller.js';
7
- import type { SessionEventLog } from './session-event-log.js';
8
- import type { HttpSessionPersistence } from './http-session-persistence.js';
9
- import type { HttpTurnRunner } from './http-turn-runner.js';
10
- export type HttpAgentSessionStatus = 'running' | 'waiting' | 'completed' | 'failed';
11
- export interface HttpAgentSessionRecord {
12
- sessionId: string;
13
- continuationToken: string;
14
- status: HttpAgentSessionStatus;
15
- events: AgentStreamEvent[];
16
- steps: AgentStepCheckpoint[];
17
- parked: boolean;
18
- pendingRequestIds: string[];
19
- turnRunning: boolean;
20
- }
21
- export interface HttpAgentSessionStoreOptions {
22
- getAgent: () => ZhinAgent | null;
23
- maxSessions?: number;
24
- log: SessionEventLog;
25
- park: ParkController;
26
- httpApprovalAdapter: HttpApprovalAdapter;
27
- persistence?: HttpSessionPersistence;
28
- onPersist?: (sessionId: string) => void;
29
- }
30
- export declare class HttpAgentSessionStore {
31
- private readonly sessions;
32
- private readonly getAgent;
33
- private readonly maxSessions;
34
- private readonly log;
35
- private readonly park;
36
- private readonly httpApprovalAdapter;
37
- private readonly persistence?;
38
- private readonly onPersist?;
39
- private turnRunner?;
40
- private bus?;
41
- constructor(options: HttpAgentSessionStoreOptions);
42
- setTurnRunner(runner: HttpTurnRunner): void;
43
- setBus(bus: AgentStreamBus): void;
44
- getSessionsMap(): Map<string, HttpSessionParkState>;
45
- getSession(sessionId: string): HttpAgentSessionRecord | undefined;
46
- hydrateSession(sessionId: string): Promise<HttpAgentSessionRecord | undefined>;
47
- restoreFromDisk(): Promise<number>;
48
- listEventSlice(sessionId: string, startIndex: number): AgentStreamEvent[];
49
- subscribe(sessionId: string, listener: (event: AgentStreamEvent, index: number) => void): () => void;
50
- startSession(message: string): Promise<{
51
- sessionId: string;
52
- continuationToken: string;
53
- }>;
54
- continueSession(sessionId: string, continuationToken: string, message: string): Promise<{
55
- ok: true;
56
- continuationToken: string;
57
- } | {
58
- ok: false;
59
- error: string;
60
- }>;
61
- submitInput(sessionId: string, requestId: string, approved: boolean): Promise<{
62
- ok: true;
63
- } | {
64
- ok: false;
65
- error: string;
66
- }>;
67
- persistSession(sessionId: string): Promise<void>;
68
- dispose(): void;
69
- private requireBus;
70
- private createState;
71
- private ingestSnapshot;
72
- private hydrateState;
73
- private toRecord;
74
- private evictIfNeeded;
75
- }
76
- //# sourceMappingURL=http-agent-session-store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http-agent-session-store.d.ts","sourceRoot":"","sources":["../../src/session/http-agent-session-store.ts"],"names":[],"mappings":"AAIA,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;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