@zhin.js/agent 1.0.1 → 1.0.3
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.
- package/README.md +123 -50
- package/lib/a2a/delegation-message.d.ts +14 -0
- package/lib/a2a/delegation-message.d.ts.map +1 -0
- package/lib/a2a/delegation-message.js +53 -0
- package/lib/a2a/delegation-message.js.map +1 -0
- package/lib/a2a/task-state.d.ts +9 -0
- package/lib/a2a/task-state.d.ts.map +1 -0
- package/lib/a2a/task-state.js +53 -0
- package/lib/a2a/task-state.js.map +1 -0
- package/lib/activity-feedback/adapter-integration.d.ts +52 -0
- package/lib/activity-feedback/adapter-integration.d.ts.map +1 -0
- package/lib/activity-feedback/adapter-integration.js +138 -0
- package/lib/activity-feedback/adapter-integration.js.map +1 -0
- package/lib/activity-feedback/config-resolver.d.ts +3 -0
- package/lib/activity-feedback/config-resolver.d.ts.map +1 -0
- package/lib/activity-feedback/config-resolver.js +89 -0
- package/lib/activity-feedback/config-resolver.js.map +1 -0
- package/lib/activity-feedback/event-context.d.ts +22 -0
- package/lib/activity-feedback/event-context.d.ts.map +1 -0
- package/lib/activity-feedback/event-context.js +69 -0
- package/lib/activity-feedback/event-context.js.map +1 -0
- package/lib/activity-feedback/index.d.ts +10 -0
- package/lib/activity-feedback/index.d.ts.map +1 -0
- package/lib/activity-feedback/index.js +7 -0
- package/lib/activity-feedback/index.js.map +1 -0
- package/lib/activity-feedback/manager.d.ts +15 -0
- package/lib/activity-feedback/manager.d.ts.map +1 -0
- package/lib/activity-feedback/manager.js +47 -0
- package/lib/activity-feedback/manager.js.map +1 -0
- package/lib/activity-feedback/schedule-guard.d.ts +8 -0
- package/lib/activity-feedback/schedule-guard.d.ts.map +1 -0
- package/lib/activity-feedback/schedule-guard.js +26 -0
- package/lib/activity-feedback/schedule-guard.js.map +1 -0
- package/lib/activity-feedback/types.d.ts +24 -0
- package/lib/activity-feedback/types.d.ts.map +1 -0
- package/lib/activity-feedback/types.js +11 -0
- package/lib/activity-feedback/types.js.map +1 -0
- package/lib/agent-prompt/registry.d.ts +1 -1
- package/lib/agent-prompt/registry.d.ts.map +1 -1
- package/lib/agent-prompt/registry.js.map +1 -1
- package/lib/agent-prompt/resolver.d.ts +2 -2
- package/lib/agent-prompt/resolver.d.ts.map +1 -1
- package/lib/agent-prompt/resolver.js +4 -2
- package/lib/agent-prompt/resolver.js.map +1 -1
- package/lib/ai-event-bus.d.ts +1 -1
- package/lib/ai-event-bus.d.ts.map +1 -1
- package/lib/ai-event-bus.js +2 -3
- package/lib/ai-event-bus.js.map +1 -1
- package/lib/ai-event-subscriber.d.ts +7 -2
- package/lib/ai-event-subscriber.d.ts.map +1 -1
- package/lib/ai-event-subscriber.js +5 -0
- package/lib/ai-event-subscriber.js.map +1 -1
- package/lib/aop/coordination/index.d.ts +7 -0
- package/lib/aop/coordination/index.d.ts.map +1 -0
- package/lib/aop/coordination/index.js +7 -0
- package/lib/aop/coordination/index.js.map +1 -0
- package/lib/aop/inbound/index.d.ts +7 -0
- package/lib/aop/inbound/index.d.ts.map +1 -0
- package/lib/aop/inbound/index.js +6 -0
- package/lib/aop/inbound/index.js.map +1 -0
- package/lib/aop/index.d.ts +11 -0
- package/lib/aop/index.d.ts.map +1 -0
- package/lib/aop/index.js +11 -0
- package/lib/aop/index.js.map +1 -0
- package/lib/aop/pipeline/index.d.ts +12 -0
- package/lib/aop/pipeline/index.d.ts.map +1 -0
- package/lib/aop/pipeline/index.js +12 -0
- package/lib/aop/pipeline/index.js.map +1 -0
- package/lib/aop/pipeline/pipeline-flow.d.ts +25 -0
- package/lib/aop/pipeline/pipeline-flow.d.ts.map +1 -0
- package/lib/aop/pipeline/pipeline-flow.js +115 -0
- package/lib/aop/pipeline/pipeline-flow.js.map +1 -0
- package/lib/aop/pipeline/pipeline-mode.d.ts +10 -0
- package/lib/aop/pipeline/pipeline-mode.d.ts.map +1 -0
- package/lib/aop/pipeline/pipeline-mode.js +16 -0
- package/lib/aop/pipeline/pipeline-mode.js.map +1 -0
- package/lib/aop/pipeline/pipeline-service.d.ts +121 -0
- package/lib/aop/pipeline/pipeline-service.d.ts.map +1 -0
- package/lib/aop/pipeline/pipeline-service.js +226 -0
- package/lib/aop/pipeline/pipeline-service.js.map +1 -0
- package/lib/aop/pipeline/pipeline-transitions.d.ts +14 -0
- package/lib/aop/pipeline/pipeline-transitions.d.ts.map +1 -0
- package/lib/aop/pipeline/pipeline-transitions.js +31 -0
- package/lib/aop/pipeline/pipeline-transitions.js.map +1 -0
- package/lib/aop/pipeline/ports.d.ts +16 -0
- package/lib/aop/pipeline/ports.d.ts.map +1 -0
- package/lib/aop/pipeline/ports.js +2 -0
- package/lib/aop/pipeline/ports.js.map +1 -0
- package/lib/aop/pipeline/role-capability-policy.d.ts +16 -0
- package/lib/aop/pipeline/role-capability-policy.d.ts.map +1 -0
- package/lib/aop/pipeline/role-capability-policy.js +29 -0
- package/lib/aop/pipeline/role-capability-policy.js.map +1 -0
- package/lib/aop/runtime/index.d.ts +9 -0
- package/lib/aop/runtime/index.d.ts.map +1 -0
- package/lib/aop/runtime/index.js +9 -0
- package/lib/aop/runtime/index.js.map +1 -0
- package/lib/assistant/deliver-schedule-to-adapter.d.ts +21 -0
- package/lib/assistant/deliver-schedule-to-adapter.d.ts.map +1 -0
- package/lib/assistant/deliver-schedule-to-adapter.js +19 -0
- package/lib/assistant/deliver-schedule-to-adapter.js.map +1 -0
- package/lib/assistant/domains/home-assistant.d.ts +1 -1
- package/lib/assistant/domains/home-assistant.d.ts.map +1 -1
- package/lib/assistant/domains/home-assistant.js.map +1 -1
- package/lib/assistant/event-ingress.d.ts +5 -5
- package/lib/assistant/event-ingress.d.ts.map +1 -1
- package/lib/assistant/event-ingress.js.map +1 -1
- package/lib/assistant/home-mcp-bridge.d.ts +1 -1
- package/lib/assistant/home-mcp-bridge.d.ts.map +1 -1
- package/lib/assistant/home-mcp-bridge.js.map +1 -1
- package/lib/assistant/home-policy.d.ts +4 -1
- package/lib/assistant/home-policy.d.ts.map +1 -1
- package/lib/assistant/home-policy.js +1 -1
- package/lib/assistant/home-policy.js.map +1 -1
- package/lib/assistant/home-tools.d.ts.map +1 -1
- package/lib/assistant/home-tools.js +1 -2
- package/lib/assistant/home-tools.js.map +1 -1
- package/lib/assistant/index.d.ts +18 -9
- package/lib/assistant/index.d.ts.map +1 -1
- package/lib/assistant/index.js +13 -6
- package/lib/assistant/index.js.map +1 -1
- package/lib/assistant/job-creator.d.ts +14 -0
- package/lib/assistant/job-creator.d.ts.map +1 -0
- package/lib/assistant/job-creator.js +44 -0
- package/lib/assistant/job-creator.js.map +1 -0
- package/lib/assistant/job-engine.d.ts +17 -17
- package/lib/assistant/job-engine.d.ts.map +1 -1
- package/lib/assistant/job-engine.js +29 -35
- package/lib/assistant/job-engine.js.map +1 -1
- package/lib/assistant/job-scheduler.d.ts +8 -4
- package/lib/assistant/job-scheduler.d.ts.map +1 -1
- package/lib/assistant/job-scheduler.js +59 -33
- package/lib/assistant/job-scheduler.js.map +1 -1
- package/lib/assistant/job-store.d.ts +24 -33
- package/lib/assistant/job-store.d.ts.map +1 -1
- package/lib/assistant/job-store.js +69 -184
- package/lib/assistant/job-store.js.map +1 -1
- package/lib/assistant/job-utils.d.ts +2 -0
- package/lib/assistant/job-utils.d.ts.map +1 -0
- package/lib/assistant/job-utils.js +7 -0
- package/lib/assistant/job-utils.js.map +1 -0
- package/lib/assistant/job-worker.d.ts +6 -2
- package/lib/assistant/job-worker.d.ts.map +1 -1
- package/lib/assistant/job-worker.js +8 -0
- package/lib/assistant/job-worker.js.map +1 -1
- package/lib/assistant/notification-router.d.ts +6 -3
- package/lib/assistant/notification-router.d.ts.map +1 -1
- package/lib/assistant/notification-router.js +75 -32
- package/lib/assistant/notification-router.js.map +1 -1
- package/lib/assistant/profile-loader.d.ts +15 -10
- package/lib/assistant/profile-loader.d.ts.map +1 -1
- package/lib/assistant/profile-loader.js +88 -25
- package/lib/assistant/profile-loader.js.map +1 -1
- package/lib/assistant/profile-types.d.ts +6 -1
- package/lib/assistant/profile-types.d.ts.map +1 -1
- package/lib/assistant/profile-types.js.map +1 -1
- package/lib/assistant/runtime-registry.d.ts +3 -3
- package/lib/assistant/runtime-registry.d.ts.map +1 -1
- package/lib/assistant/runtime-registry.js +3 -0
- package/lib/assistant/runtime-registry.js.map +1 -1
- package/lib/assistant/schedule-execution.d.ts +22 -0
- package/lib/assistant/schedule-execution.d.ts.map +1 -0
- package/lib/assistant/schedule-execution.js +99 -0
- package/lib/assistant/schedule-execution.js.map +1 -0
- package/lib/assistant/schedule-job-service.d.ts +25 -0
- package/lib/assistant/schedule-job-service.d.ts.map +1 -0
- package/lib/assistant/schedule-job-service.js +129 -0
- package/lib/assistant/schedule-job-service.js.map +1 -0
- package/lib/assistant/schedule-message.d.ts +9 -0
- package/lib/assistant/schedule-message.d.ts.map +1 -0
- package/lib/assistant/schedule-message.js +23 -0
- package/lib/assistant/schedule-message.js.map +1 -0
- package/lib/assistant/schedule-skills.d.ts +3 -0
- package/lib/assistant/schedule-skills.d.ts.map +1 -0
- package/lib/assistant/schedule-skills.js +24 -0
- package/lib/assistant/schedule-skills.js.map +1 -0
- package/lib/assistant/schedule-tool-runtime.d.ts +7 -0
- package/lib/assistant/schedule-tool-runtime.d.ts.map +1 -0
- package/lib/assistant/schedule-tool-runtime.js +50 -0
- package/lib/assistant/schedule-tool-runtime.js.map +1 -0
- package/lib/assistant/types.d.ts +70 -18
- package/lib/assistant/types.d.ts.map +1 -1
- package/lib/assistant/types.js +6 -5
- package/lib/assistant/types.js.map +1 -1
- package/lib/authoring/bridge.d.ts +40 -0
- package/lib/authoring/bridge.d.ts.map +1 -0
- package/lib/authoring/bridge.js +113 -0
- package/lib/authoring/bridge.js.map +1 -0
- package/lib/authoring/define-agent.d.ts +4 -0
- package/lib/authoring/define-agent.d.ts.map +1 -0
- package/lib/authoring/define-agent.js +8 -0
- package/lib/authoring/define-agent.js.map +1 -0
- package/lib/authoring/define-connection.d.ts +5 -0
- package/lib/authoring/define-connection.d.ts.map +1 -0
- package/lib/authoring/define-connection.js +8 -0
- package/lib/authoring/define-connection.js.map +1 -0
- package/lib/authoring/define-dynamic.d.ts +4 -0
- package/lib/authoring/define-dynamic.d.ts.map +1 -0
- package/lib/authoring/define-dynamic.js +8 -0
- package/lib/authoring/define-dynamic.js.map +1 -0
- package/lib/authoring/define-eval.d.ts +5 -0
- package/lib/authoring/define-eval.d.ts.map +1 -0
- package/lib/authoring/define-eval.js +8 -0
- package/lib/authoring/define-eval.js.map +1 -0
- package/lib/authoring/define-hook.d.ts +4 -0
- package/lib/authoring/define-hook.d.ts.map +1 -0
- package/lib/authoring/define-hook.js +8 -0
- package/lib/authoring/define-hook.js.map +1 -0
- package/lib/authoring/define-schedule.d.ts +4 -0
- package/lib/authoring/define-schedule.d.ts.map +1 -0
- package/lib/authoring/define-schedule.js +8 -0
- package/lib/authoring/define-schedule.js.map +1 -0
- package/lib/authoring/define-skill.d.ts +6 -0
- package/lib/authoring/define-skill.d.ts.map +1 -0
- package/lib/authoring/define-skill.js +9 -0
- package/lib/authoring/define-skill.js.map +1 -0
- package/lib/authoring/define-state.d.ts +4 -0
- package/lib/authoring/define-state.d.ts.map +1 -0
- package/lib/authoring/define-state.js +8 -0
- package/lib/authoring/define-state.js.map +1 -0
- package/lib/authoring/define-tool.d.ts +5 -0
- package/lib/authoring/define-tool.d.ts.map +1 -0
- package/lib/authoring/define-tool.js +8 -0
- package/lib/authoring/define-tool.js.map +1 -0
- package/lib/authoring/disable-tool.d.ts +13 -0
- package/lib/authoring/disable-tool.d.ts.map +1 -0
- package/lib/authoring/disable-tool.js +36 -0
- package/lib/authoring/disable-tool.js.map +1 -0
- package/lib/authoring/entries/connections.d.ts +3 -0
- package/lib/authoring/entries/connections.d.ts.map +1 -0
- package/lib/authoring/entries/connections.js +2 -0
- package/lib/authoring/entries/connections.js.map +1 -0
- package/lib/authoring/entries/evals.d.ts +3 -0
- package/lib/authoring/entries/evals.d.ts.map +1 -0
- package/lib/authoring/entries/evals.js +2 -0
- package/lib/authoring/entries/evals.js.map +1 -0
- package/lib/authoring/entries/hooks.d.ts +3 -0
- package/lib/authoring/entries/hooks.d.ts.map +1 -0
- package/lib/authoring/entries/hooks.js +2 -0
- package/lib/authoring/entries/hooks.js.map +1 -0
- package/lib/authoring/entries/schedules.d.ts +3 -0
- package/lib/authoring/entries/schedules.d.ts.map +1 -0
- package/lib/authoring/entries/schedules.js +2 -0
- package/lib/authoring/entries/schedules.js.map +1 -0
- package/lib/authoring/entries/skills.d.ts +3 -0
- package/lib/authoring/entries/skills.d.ts.map +1 -0
- package/lib/authoring/entries/skills.js +2 -0
- package/lib/authoring/entries/skills.js.map +1 -0
- package/lib/authoring/entries/tools.d.ts +5 -0
- package/lib/authoring/entries/tools.d.ts.map +1 -0
- package/lib/authoring/entries/tools.js +3 -0
- package/lib/authoring/entries/tools.js.map +1 -0
- package/lib/authoring/index.d.ts +25 -0
- package/lib/authoring/index.d.ts.map +1 -0
- package/lib/authoring/index.js +14 -0
- package/lib/authoring/index.js.map +1 -0
- package/lib/authoring/tool-policy.d.ts +3 -0
- package/lib/authoring/tool-policy.d.ts.map +1 -0
- package/lib/authoring/tool-policy.js +2 -0
- package/lib/authoring/tool-policy.js.map +1 -0
- package/lib/authoring/types.d.ts +209 -0
- package/lib/authoring/types.d.ts.map +1 -0
- package/lib/authoring/types.js +10 -0
- package/lib/authoring/types.js.map +1 -0
- package/lib/authoring/zod-schema.d.ts +20 -0
- package/lib/authoring/zod-schema.d.ts.map +1 -0
- package/lib/authoring/zod-schema.js +79 -0
- package/lib/authoring/zod-schema.js.map +1 -0
- package/lib/builtin/analyze-media-tool.d.ts +1 -1
- package/lib/builtin/analyze-media-tool.d.ts.map +1 -1
- package/lib/builtin/analyze-media-tool.js +2 -2
- package/lib/builtin/analyze-media-tool.js.map +1 -1
- package/lib/builtin/ask-user-session-service.d.ts +40 -0
- package/lib/builtin/ask-user-session-service.d.ts.map +1 -0
- package/lib/builtin/ask-user-session-service.js +258 -0
- package/lib/builtin/ask-user-session-service.js.map +1 -0
- package/lib/builtin/ask-user-session.d.ts +18 -0
- package/lib/builtin/ask-user-session.d.ts.map +1 -0
- package/lib/builtin/ask-user-session.js +21 -0
- package/lib/builtin/ask-user-session.js.map +1 -0
- package/lib/builtin/ask-user-tool.d.ts +7 -15
- package/lib/builtin/ask-user-tool.d.ts.map +1 -1
- package/lib/builtin/ask-user-tool.js +73 -113
- package/lib/builtin/ask-user-tool.js.map +1 -1
- package/lib/builtin/bash-tool.d.ts +1 -1
- package/lib/builtin/bash-tool.d.ts.map +1 -1
- package/lib/builtin/bash-tool.js +4 -4
- package/lib/builtin/bash-tool.js.map +1 -1
- package/lib/builtin/deferred-tool-meta.d.ts +46 -0
- package/lib/builtin/deferred-tool-meta.d.ts.map +1 -0
- package/lib/builtin/deferred-tool-meta.js +130 -0
- package/lib/builtin/deferred-tool-meta.js.map +1 -0
- package/lib/builtin/edit-file-tool.d.ts +1 -1
- package/lib/builtin/edit-file-tool.d.ts.map +1 -1
- package/lib/builtin/edit-file-tool.js +4 -4
- package/lib/builtin/edit-file-tool.js.map +1 -1
- package/lib/builtin/five-agent/index.d.ts +20 -0
- package/lib/builtin/five-agent/index.d.ts.map +1 -0
- package/lib/builtin/five-agent/index.js +23 -0
- package/lib/builtin/five-agent/index.js.map +1 -0
- package/lib/builtin/five-agent/prompts.d.ts +11 -0
- package/lib/builtin/five-agent/prompts.d.ts.map +1 -0
- package/lib/builtin/five-agent/prompts.js +35 -0
- package/lib/builtin/five-agent/prompts.js.map +1 -0
- package/lib/builtin/five-agent/strategy.d.ts +4 -0
- package/lib/builtin/five-agent/strategy.d.ts.map +1 -0
- package/lib/builtin/five-agent/strategy.js +42 -0
- package/lib/builtin/five-agent/strategy.js.map +1 -0
- package/lib/builtin/generate-image-tool.d.ts +1 -1
- package/lib/builtin/generate-image-tool.d.ts.map +1 -1
- package/lib/builtin/generate-image-tool.js +9 -9
- package/lib/builtin/generate-image-tool.js.map +1 -1
- package/lib/builtin/glob-tool.d.ts +1 -1
- package/lib/builtin/glob-tool.d.ts.map +1 -1
- package/lib/builtin/glob-tool.js +3 -3
- package/lib/builtin/glob-tool.js.map +1 -1
- package/lib/builtin/grep-tool.d.ts +1 -1
- package/lib/builtin/grep-tool.d.ts.map +1 -1
- package/lib/builtin/grep-tool.js +10 -10
- package/lib/builtin/grep-tool.js.map +1 -1
- package/lib/builtin/install-skill-tool.d.ts +1 -1
- package/lib/builtin/install-skill-tool.d.ts.map +1 -1
- package/lib/builtin/install-skill-tool.js +3 -3
- package/lib/builtin/install-skill-tool.js.map +1 -1
- package/lib/builtin/knowledge-search-tool.js +3 -3
- package/lib/builtin/knowledge-search-tool.js.map +1 -1
- package/lib/builtin/list-dir-tool.d.ts +1 -1
- package/lib/builtin/list-dir-tool.d.ts.map +1 -1
- package/lib/builtin/list-dir-tool.js +2 -2
- package/lib/builtin/list-dir-tool.js.map +1 -1
- package/lib/builtin/load-skill-tool.d.ts +20 -0
- package/lib/builtin/load-skill-tool.d.ts.map +1 -0
- package/lib/builtin/load-skill-tool.js +60 -0
- package/lib/builtin/load-skill-tool.js.map +1 -0
- package/lib/builtin/memory-search-tool.d.ts.map +1 -1
- package/lib/builtin/memory-search-tool.js +8 -5
- package/lib/builtin/memory-search-tool.js.map +1 -1
- package/lib/builtin/memory-upsert-tool.d.ts.map +1 -1
- package/lib/builtin/memory-upsert-tool.js +11 -8
- package/lib/builtin/memory-upsert-tool.js.map +1 -1
- package/lib/builtin/orchestration-tools.d.ts +3 -4
- package/lib/builtin/orchestration-tools.d.ts.map +1 -1
- package/lib/builtin/orchestration-tools.js +101 -93
- package/lib/builtin/orchestration-tools.js.map +1 -1
- package/lib/builtin/read-file-tool.d.ts +1 -1
- package/lib/builtin/read-file-tool.d.ts.map +1 -1
- package/lib/builtin/read-file-tool.js +4 -4
- package/lib/builtin/read-file-tool.js.map +1 -1
- package/lib/builtin/run-deferred-task-tool.d.ts +1 -1
- package/lib/builtin/run-deferred-task-tool.d.ts.map +1 -1
- package/lib/builtin/run-deferred-task-tool.js +3 -3
- package/lib/builtin/run-deferred-task-tool.js.map +1 -1
- package/lib/builtin/spawn-task-tool.d.ts +13 -6
- package/lib/builtin/spawn-task-tool.d.ts.map +1 -1
- package/lib/builtin/spawn-task-tool.js +135 -30
- package/lib/builtin/spawn-task-tool.js.map +1 -1
- package/lib/builtin/todo-read-tool.d.ts +1 -1
- package/lib/builtin/todo-read-tool.d.ts.map +1 -1
- package/lib/builtin/todo-read-tool.js +2 -2
- package/lib/builtin/todo-read-tool.js.map +1 -1
- package/lib/builtin/todo-write-tool.d.ts +1 -1
- package/lib/builtin/todo-write-tool.d.ts.map +1 -1
- package/lib/builtin/todo-write-tool.js +3 -3
- package/lib/builtin/todo-write-tool.js.map +1 -1
- package/lib/builtin/web-fetch-tool.d.ts +2 -2
- package/lib/builtin/web-fetch-tool.d.ts.map +1 -1
- package/lib/builtin/web-fetch-tool.js +6 -3
- package/lib/builtin/web-fetch-tool.js.map +1 -1
- package/lib/builtin/web-search-tool.d.ts +1 -1
- package/lib/builtin/web-search-tool.d.ts.map +1 -1
- package/lib/builtin/web-search-tool.js +5 -5
- package/lib/builtin/web-search-tool.js.map +1 -1
- package/lib/builtin/write-file-tool.d.ts +1 -1
- package/lib/builtin/write-file-tool.d.ts.map +1 -1
- package/lib/builtin/write-file-tool.js +3 -3
- package/lib/builtin/write-file-tool.js.map +1 -1
- package/lib/builtin-tools.d.ts +1 -1
- package/lib/builtin-tools.js +3 -3
- package/lib/builtin-tools.js.map +1 -1
- package/lib/collaboration/ask-user-bridge.d.ts +9 -0
- package/lib/collaboration/ask-user-bridge.d.ts.map +1 -0
- package/lib/collaboration/ask-user-bridge.js +73 -0
- package/lib/collaboration/ask-user-bridge.js.map +1 -0
- package/lib/collaboration/bootstrap-agent-runtimes.d.ts +22 -0
- package/lib/collaboration/bootstrap-agent-runtimes.d.ts.map +1 -0
- package/lib/collaboration/bootstrap-agent-runtimes.js +106 -0
- package/lib/collaboration/bootstrap-agent-runtimes.js.map +1 -0
- package/lib/collaboration/collab-admin-gate.d.ts +21 -0
- package/lib/collaboration/collab-admin-gate.d.ts.map +1 -0
- package/lib/collaboration/collab-admin-gate.js +74 -0
- package/lib/collaboration/collab-admin-gate.js.map +1 -0
- package/lib/collaboration/collaboration-artifact-repository.d.ts +46 -0
- package/lib/collaboration/collaboration-artifact-repository.d.ts.map +1 -0
- package/lib/collaboration/collaboration-artifact-repository.js +102 -0
- package/lib/collaboration/collaboration-artifact-repository.js.map +1 -0
- package/lib/collaboration/collaboration-commands.d.ts +38 -0
- package/lib/collaboration/collaboration-commands.d.ts.map +1 -0
- package/lib/collaboration/collaboration-commands.js +504 -0
- package/lib/collaboration/collaboration-commands.js.map +1 -0
- package/lib/collaboration/collaboration-config.d.ts +30 -0
- package/lib/collaboration/collaboration-config.d.ts.map +1 -0
- package/lib/collaboration/collaboration-config.js +170 -0
- package/lib/collaboration/collaboration-config.js.map +1 -0
- package/lib/collaboration/collaboration-context.d.ts +12 -0
- package/lib/collaboration/collaboration-context.d.ts.map +1 -0
- package/lib/collaboration/collaboration-context.js +89 -0
- package/lib/collaboration/collaboration-context.js.map +1 -0
- package/lib/collaboration/collaboration-db-model.d.ts +350 -0
- package/lib/collaboration/collaboration-db-model.d.ts.map +1 -0
- package/lib/collaboration/collaboration-db-model.js +112 -0
- package/lib/collaboration/collaboration-db-model.js.map +1 -0
- package/lib/collaboration/collaboration-delegation.d.ts +21 -0
- package/lib/collaboration/collaboration-delegation.d.ts.map +1 -0
- package/lib/collaboration/collaboration-delegation.js +194 -0
- package/lib/collaboration/collaboration-delegation.js.map +1 -0
- package/lib/collaboration/collaboration-dispatch.d.ts +32 -0
- package/lib/collaboration/collaboration-dispatch.d.ts.map +1 -0
- package/lib/collaboration/collaboration-dispatch.js +93 -0
- package/lib/collaboration/collaboration-dispatch.js.map +1 -0
- package/lib/collaboration/collaboration-kernel-bridge.d.ts +23 -0
- package/lib/collaboration/collaboration-kernel-bridge.d.ts.map +1 -0
- package/lib/collaboration/collaboration-kernel-bridge.js +106 -0
- package/lib/collaboration/collaboration-kernel-bridge.js.map +1 -0
- package/lib/collaboration/collaboration-outbound.d.ts +64 -0
- package/lib/collaboration/collaboration-outbound.d.ts.map +1 -0
- package/lib/collaboration/collaboration-outbound.js +315 -0
- package/lib/collaboration/collaboration-outbound.js.map +1 -0
- package/lib/collaboration/collaboration-scene-repository.d.ts +152 -0
- package/lib/collaboration/collaboration-scene-repository.d.ts.map +1 -0
- package/lib/collaboration/collaboration-scene-repository.js +440 -0
- package/lib/collaboration/collaboration-scene-repository.js.map +1 -0
- package/lib/collaboration/collaboration-turn-snapshot.d.ts +18 -0
- package/lib/collaboration/collaboration-turn-snapshot.d.ts.map +1 -0
- package/lib/collaboration/collaboration-turn-snapshot.js +35 -0
- package/lib/collaboration/collaboration-turn-snapshot.js.map +1 -0
- package/lib/collaboration/delegation-state.d.ts +30 -0
- package/lib/collaboration/delegation-state.d.ts.map +1 -0
- package/lib/collaboration/delegation-state.js +86 -0
- package/lib/collaboration/delegation-state.js.map +1 -0
- package/lib/collaboration/endpoint-identity.d.ts +28 -0
- package/lib/collaboration/endpoint-identity.d.ts.map +1 -0
- package/lib/collaboration/endpoint-identity.js +88 -0
- package/lib/collaboration/endpoint-identity.js.map +1 -0
- package/lib/collaboration/group-feed.d.ts +30 -0
- package/lib/collaboration/group-feed.d.ts.map +1 -0
- package/lib/collaboration/group-feed.js +150 -0
- package/lib/collaboration/group-feed.js.map +1 -0
- package/lib/collaboration/group-message.d.ts +53 -0
- package/lib/collaboration/group-message.d.ts.map +1 -0
- package/lib/collaboration/group-message.js +162 -0
- package/lib/collaboration/group-message.js.map +1 -0
- package/lib/collaboration/im-mention-delegate.d.ts +22 -0
- package/lib/collaboration/im-mention-delegate.d.ts.map +1 -0
- package/lib/collaboration/im-mention-delegate.js +15 -0
- package/lib/collaboration/im-mention-delegate.js.map +1 -0
- package/lib/collaboration/inbound-peer-handback.d.ts +18 -0
- package/lib/collaboration/inbound-peer-handback.d.ts.map +1 -0
- package/lib/collaboration/inbound-peer-handback.js +69 -0
- package/lib/collaboration/inbound-peer-handback.js.map +1 -0
- package/lib/collaboration/inbound-spawn-task.d.ts +29 -0
- package/lib/collaboration/inbound-spawn-task.d.ts.map +1 -0
- package/lib/collaboration/inbound-spawn-task.js +97 -0
- package/lib/collaboration/inbound-spawn-task.js.map +1 -0
- package/lib/collaboration/inbound-turn-endpoint.d.ts +16 -0
- package/lib/collaboration/inbound-turn-endpoint.d.ts.map +1 -0
- package/lib/collaboration/inbound-turn-endpoint.js +26 -0
- package/lib/collaboration/inbound-turn-endpoint.js.map +1 -0
- package/lib/collaboration/inbound-turn-enrich.d.ts +25 -0
- package/lib/collaboration/inbound-turn-enrich.d.ts.map +1 -0
- package/lib/collaboration/inbound-turn-enrich.js +51 -0
- package/lib/collaboration/inbound-turn-enrich.js.map +1 -0
- package/lib/collaboration/inbound-turn-execute.d.ts +33 -0
- package/lib/collaboration/inbound-turn-execute.d.ts.map +1 -0
- package/lib/collaboration/inbound-turn-execute.js +73 -0
- package/lib/collaboration/inbound-turn-execute.js.map +1 -0
- package/lib/collaboration/inbound-turn-outbound-stage.d.ts +25 -0
- package/lib/collaboration/inbound-turn-outbound-stage.d.ts.map +1 -0
- package/lib/collaboration/inbound-turn-outbound-stage.js +73 -0
- package/lib/collaboration/inbound-turn-outbound-stage.js.map +1 -0
- package/lib/collaboration/inbound-turn-pipeline.d.ts +28 -0
- package/lib/collaboration/inbound-turn-pipeline.d.ts.map +1 -0
- package/lib/collaboration/inbound-turn-pipeline.js +201 -0
- package/lib/collaboration/inbound-turn-pipeline.js.map +1 -0
- package/lib/collaboration/inbound-turn-route.d.ts +42 -0
- package/lib/collaboration/inbound-turn-route.d.ts.map +1 -0
- package/lib/collaboration/inbound-turn-route.js +90 -0
- package/lib/collaboration/inbound-turn-route.js.map +1 -0
- package/lib/collaboration/inbound-turn-tools.d.ts +13 -0
- package/lib/collaboration/inbound-turn-tools.d.ts.map +1 -0
- package/lib/collaboration/inbound-turn-tools.js +19 -0
- package/lib/collaboration/inbound-turn-tools.js.map +1 -0
- package/lib/collaboration/index.d.ts +26 -0
- package/lib/collaboration/index.d.ts.map +1 -0
- package/lib/collaboration/index.js +24 -0
- package/lib/collaboration/index.js.map +1 -0
- package/lib/collaboration/init-observe-hook.d.ts +59 -0
- package/lib/collaboration/init-observe-hook.d.ts.map +1 -0
- package/lib/collaboration/init-observe-hook.js +190 -0
- package/lib/collaboration/init-observe-hook.js.map +1 -0
- package/lib/collaboration/init-wizard-service.d.ts +57 -0
- package/lib/collaboration/init-wizard-service.d.ts.map +1 -0
- package/lib/collaboration/init-wizard-service.js +189 -0
- package/lib/collaboration/init-wizard-service.js.map +1 -0
- package/lib/collaboration/outbound-resolver.d.ts +35 -0
- package/lib/collaboration/outbound-resolver.d.ts.map +1 -0
- package/lib/collaboration/outbound-resolver.js +188 -0
- package/lib/collaboration/outbound-resolver.js.map +1 -0
- package/lib/collaboration/peer-policy.d.ts +29 -0
- package/lib/collaboration/peer-policy.d.ts.map +1 -0
- package/lib/collaboration/peer-policy.js +118 -0
- package/lib/collaboration/peer-policy.js.map +1 -0
- package/lib/collaboration/resolve-agent-session-key.d.ts +21 -0
- package/lib/collaboration/resolve-agent-session-key.d.ts.map +1 -0
- package/lib/collaboration/resolve-agent-session-key.js +61 -0
- package/lib/collaboration/resolve-agent-session-key.js.map +1 -0
- package/lib/collaboration/runtime-registry.d.ts +18 -0
- package/lib/collaboration/runtime-registry.d.ts.map +1 -0
- package/lib/collaboration/runtime-registry.js +40 -0
- package/lib/collaboration/runtime-registry.js.map +1 -0
- package/lib/collaboration/scene-context.d.ts +17 -0
- package/lib/collaboration/scene-context.d.ts.map +1 -0
- package/lib/collaboration/scene-context.js +22 -0
- package/lib/collaboration/scene-context.js.map +1 -0
- package/lib/collaboration/scene-identity-service.d.ts +167 -0
- package/lib/collaboration/scene-identity-service.d.ts.map +1 -0
- package/lib/collaboration/scene-identity-service.js +468 -0
- package/lib/collaboration/scene-identity-service.js.map +1 -0
- package/lib/collaboration/scene-service.d.ts +65 -0
- package/lib/collaboration/scene-service.d.ts.map +1 -0
- package/lib/collaboration/scene-service.js +152 -0
- package/lib/collaboration/scene-service.js.map +1 -0
- package/lib/collaboration/structured-ai-outbound.d.ts +23 -0
- package/lib/collaboration/structured-ai-outbound.d.ts.map +1 -0
- package/lib/collaboration/structured-ai-outbound.js +179 -0
- package/lib/collaboration/structured-ai-outbound.js.map +1 -0
- package/lib/collaboration/turn-plan-resolver.d.ts +17 -0
- package/lib/collaboration/turn-plan-resolver.d.ts.map +1 -0
- package/lib/collaboration/turn-plan-resolver.js +63 -0
- package/lib/collaboration/turn-plan-resolver.js.map +1 -0
- package/lib/collaboration/types.d.ts +147 -0
- package/lib/collaboration/types.d.ts.map +1 -0
- package/lib/collaboration/types.js +16 -0
- package/lib/collaboration/types.js.map +1 -0
- package/lib/collaboration/wire-collaboration-storage.d.ts +4 -0
- package/lib/collaboration/wire-collaboration-storage.d.ts.map +1 -0
- package/lib/collaboration/wire-collaboration-storage.js +28 -0
- package/lib/collaboration/wire-collaboration-storage.js.map +1 -0
- package/lib/common-adapter-tools.d.ts +6 -7
- package/lib/common-adapter-tools.d.ts.map +1 -1
- package/lib/common-adapter-tools.js +9 -9
- package/lib/common-adapter-tools.js.map +1 -1
- package/lib/config/agent-binding-registry.d.ts +1 -1
- package/lib/config/agent-binding-registry.d.ts.map +1 -1
- package/lib/config/agent-binding-registry.js.map +1 -1
- package/lib/config/agent-bindings.d.ts +1 -1
- package/lib/config/agent-bindings.d.ts.map +1 -1
- package/lib/config/agent-bindings.js +2 -0
- package/lib/config/agent-bindings.js.map +1 -1
- package/lib/config/agent-interfaces.d.ts +58 -0
- package/lib/config/agent-interfaces.d.ts.map +1 -0
- package/lib/config/agent-interfaces.js +8 -0
- package/lib/config/agent-interfaces.js.map +1 -0
- package/lib/config/fix-ai-config.d.ts +1 -0
- package/lib/config/fix-ai-config.d.ts.map +1 -1
- package/lib/config/fix-ai-config.js +152 -15
- package/lib/config/fix-ai-config.js.map +1 -1
- package/lib/config/index.d.ts +13 -0
- package/lib/config/index.d.ts.map +1 -1
- package/lib/config/index.js +8 -0
- package/lib/config/index.js.map +1 -1
- package/lib/config/keyword-triggers.d.ts +6 -0
- package/lib/config/keyword-triggers.d.ts.map +1 -0
- package/lib/config/keyword-triggers.js +6 -0
- package/lib/config/keyword-triggers.js.map +1 -0
- package/lib/config/model-harness-runtime.d.ts +5 -0
- package/lib/config/model-harness-runtime.d.ts.map +1 -0
- package/lib/config/model-harness-runtime.js +65 -0
- package/lib/config/model-harness-runtime.js.map +1 -0
- package/lib/config/model-harness.d.ts +16 -0
- package/lib/config/model-harness.d.ts.map +1 -0
- package/lib/config/model-harness.js +2 -0
- package/lib/config/model-harness.js.map +1 -0
- package/lib/config/normalize-ai-config.d.ts +2 -2
- package/lib/config/normalize-ai-config.d.ts.map +1 -1
- package/lib/config/normalize-ai-config.js +49 -29
- package/lib/config/normalize-ai-config.js.map +1 -1
- package/lib/config/provider-instance.d.ts +1 -1
- package/lib/config/provider-instance.d.ts.map +1 -1
- package/lib/config/provider-instance.js.map +1 -1
- package/lib/config/resolve-pipeline-binding.d.ts +16 -0
- package/lib/config/resolve-pipeline-binding.d.ts.map +1 -0
- package/lib/config/resolve-pipeline-binding.js +35 -0
- package/lib/config/resolve-pipeline-binding.js.map +1 -0
- package/lib/config/types.d.ts +17 -9
- package/lib/config/types.d.ts.map +1 -1
- package/lib/config/types.js.map +1 -1
- package/lib/config/validate-ai-config.d.ts.map +1 -1
- package/lib/config/validate-ai-config.js +6 -1
- package/lib/config/validate-ai-config.js.map +1 -1
- package/lib/config/zhin-agent-config.d.ts +83 -0
- package/lib/config/zhin-agent-config.d.ts.map +1 -0
- package/lib/config/zhin-agent-config.js +2 -0
- package/lib/config/zhin-agent-config.js.map +1 -0
- package/lib/config/zhin-agent-constants.d.ts +11 -0
- package/lib/config/zhin-agent-constants.d.ts.map +1 -0
- package/lib/config/zhin-agent-constants.js +26 -0
- package/lib/config/zhin-agent-constants.js.map +1 -0
- package/lib/config/zhin-agent-defaults.d.ts +3 -0
- package/lib/config/zhin-agent-defaults.d.ts.map +1 -0
- package/lib/config/zhin-agent-defaults.js +63 -0
- package/lib/config/zhin-agent-defaults.js.map +1 -0
- package/lib/config/zhin-agent-dependencies.d.ts +37 -0
- package/lib/config/zhin-agent-dependencies.d.ts.map +1 -0
- package/lib/config/zhin-agent-dependencies.js +2 -0
- package/lib/config/zhin-agent-dependencies.js.map +1 -0
- package/lib/config/zhin-agent-runtime.d.ts +21 -0
- package/lib/config/zhin-agent-runtime.d.ts.map +1 -0
- package/lib/config/zhin-agent-runtime.js +91 -0
- package/lib/config/zhin-agent-runtime.js.map +1 -0
- package/lib/connection/authorization-flow.d.ts +26 -0
- package/lib/connection/authorization-flow.d.ts.map +1 -0
- package/lib/connection/authorization-flow.js +76 -0
- package/lib/connection/authorization-flow.js.map +1 -0
- package/lib/connection/index.d.ts +3 -0
- package/lib/connection/index.d.ts.map +1 -0
- package/lib/connection/index.js +2 -0
- package/lib/connection/index.js.map +1 -0
- package/lib/context/agents-instruction.d.ts +11 -0
- package/lib/context/agents-instruction.d.ts.map +1 -0
- package/lib/context/agents-instruction.js +94 -0
- package/lib/context/agents-instruction.js.map +1 -0
- package/lib/context/context-system.d.ts +47 -0
- package/lib/context/context-system.d.ts.map +1 -0
- package/lib/context/context-system.js +115 -0
- package/lib/context/context-system.js.map +1 -0
- package/lib/context/context-tail-limit.d.ts +7 -0
- package/lib/context/context-tail-limit.d.ts.map +1 -0
- package/lib/context/context-tail-limit.js +12 -0
- package/lib/context/context-tail-limit.js.map +1 -0
- package/lib/context/contracts.d.ts +34 -0
- package/lib/context/contracts.d.ts.map +1 -0
- package/lib/context/contracts.js +8 -0
- package/lib/context/contracts.js.map +1 -0
- package/lib/context/default-builders.d.ts +24 -0
- package/lib/context/default-builders.d.ts.map +1 -0
- package/lib/context/default-builders.js +56 -0
- package/lib/context/default-builders.js.map +1 -0
- package/lib/context/envelope-parts.d.ts +13 -0
- package/lib/context/envelope-parts.d.ts.map +1 -0
- package/lib/context/envelope-parts.js +2 -0
- package/lib/context/envelope-parts.js.map +1 -0
- package/lib/context/index.d.ts +16 -0
- package/lib/context/index.d.ts.map +1 -0
- package/lib/context/index.js +10 -0
- package/lib/context/index.js.map +1 -0
- package/lib/context/model-resolver.d.ts.map +1 -0
- package/lib/context/model-resolver.js +28 -0
- package/lib/context/model-resolver.js.map +1 -0
- package/lib/context/turn-envelope.d.ts +20 -0
- package/lib/context/turn-envelope.d.ts.map +1 -0
- package/lib/context/turn-envelope.js +80 -0
- package/lib/context/turn-envelope.js.map +1 -0
- package/lib/context/turn-user-message.d.ts +10 -0
- package/lib/context/turn-user-message.d.ts.map +1 -0
- package/lib/context/turn-user-message.js +48 -0
- package/lib/context/turn-user-message.js.map +1 -0
- package/lib/core/agent-core-run.d.ts +62 -0
- package/lib/core/agent-core-run.d.ts.map +1 -0
- package/lib/core/agent-core-run.js +612 -0
- package/lib/core/agent-core-run.js.map +1 -0
- package/lib/core/agent-core.d.ts +18 -0
- package/lib/core/agent-core.d.ts.map +1 -0
- package/lib/core/agent-core.js +73 -0
- package/lib/core/agent-core.js.map +1 -0
- package/lib/core/agent-loop-standalone.d.ts +42 -0
- package/lib/core/agent-loop-standalone.d.ts.map +1 -0
- package/lib/core/agent-loop-standalone.js +163 -0
- package/lib/core/agent-loop-standalone.js.map +1 -0
- package/lib/core/agent-loop-turn.d.ts +8 -0
- package/lib/core/agent-loop-turn.d.ts.map +1 -0
- package/lib/core/agent-loop-turn.js +17 -0
- package/lib/core/agent-loop-turn.js.map +1 -0
- package/lib/core/compose-deps.d.ts +13 -0
- package/lib/core/compose-deps.d.ts.map +1 -0
- package/lib/core/compose-deps.js +35 -0
- package/lib/core/compose-deps.js.map +1 -0
- package/lib/core/contracts.d.ts +50 -0
- package/lib/core/contracts.d.ts.map +1 -0
- package/lib/core/contracts.js +11 -0
- package/lib/core/contracts.js.map +1 -0
- package/lib/core/index.d.ts +13 -0
- package/lib/core/index.d.ts.map +1 -0
- package/lib/core/index.js +9 -0
- package/lib/core/index.js.map +1 -0
- package/lib/core/text-sanitize.d.ts.map +1 -0
- package/lib/core/text-sanitize.js +52 -0
- package/lib/core/text-sanitize.js.map +1 -0
- package/lib/core/tool-calls-user-format.d.ts.map +1 -0
- package/lib/core/tool-calls-user-format.js +152 -0
- package/lib/core/tool-calls-user-format.js.map +1 -0
- package/lib/core/turn-event-mapper.d.ts +13 -0
- package/lib/core/turn-event-mapper.d.ts.map +1 -0
- package/lib/core/turn-event-mapper.js +55 -0
- package/lib/core/turn-event-mapper.js.map +1 -0
- package/lib/deferred-worker-runner.d.ts +7 -5
- package/lib/deferred-worker-runner.d.ts.map +1 -1
- package/lib/deferred-worker-runner.js +11 -12
- package/lib/deferred-worker-runner.js.map +1 -1
- package/lib/deferred-worker-tool-load.d.ts +1 -1
- package/lib/deferred-worker-tool-load.d.ts.map +1 -1
- package/lib/deferred-worker-tool-load.js +3 -0
- package/lib/deferred-worker-tool-load.js.map +1 -1
- package/lib/discovery/agent-surface-info.d.ts +42 -0
- package/lib/discovery/agent-surface-info.d.ts.map +1 -0
- package/lib/discovery/agent-surface-info.js +201 -0
- package/lib/discovery/agent-surface-info.js.map +1 -0
- package/lib/discovery/agent-surface.d.ts +32 -0
- package/lib/discovery/agent-surface.d.ts.map +1 -0
- package/lib/discovery/agent-surface.js +422 -0
- package/lib/discovery/agent-surface.js.map +1 -0
- package/lib/discovery/agents.d.ts +11 -12
- package/lib/discovery/agents.d.ts.map +1 -1
- package/lib/discovery/agents.js +87 -85
- package/lib/discovery/agents.js.map +1 -1
- package/lib/discovery/register-agent-surface.d.ts +27 -0
- package/lib/discovery/register-agent-surface.d.ts.map +1 -0
- package/lib/discovery/register-agent-surface.js +155 -0
- package/lib/discovery/register-agent-surface.js.map +1 -0
- package/lib/dynamic/dynamic-registry.d.ts +34 -0
- package/lib/dynamic/dynamic-registry.d.ts.map +1 -0
- package/lib/dynamic/dynamic-registry.js +52 -0
- package/lib/dynamic/dynamic-registry.js.map +1 -0
- package/lib/event/agent-stream-bus.d.ts +25 -0
- package/lib/event/agent-stream-bus.d.ts.map +1 -0
- package/lib/event/agent-stream-bus.js +22 -0
- package/lib/event/agent-stream-bus.js.map +1 -0
- package/lib/event/agent-stream-hooks.d.ts +10 -0
- package/lib/event/agent-stream-hooks.d.ts.map +1 -0
- package/lib/event/agent-stream-hooks.js +28 -0
- package/lib/event/agent-stream-hooks.js.map +1 -0
- package/lib/event/contracts.d.ts +26 -0
- package/lib/event/contracts.d.ts.map +1 -0
- package/lib/event/contracts.js +9 -0
- package/lib/event/contracts.js.map +1 -0
- package/lib/event/event-emitter.d.ts +17 -0
- package/lib/event/event-emitter.d.ts.map +1 -0
- package/lib/event/event-emitter.js +73 -0
- package/lib/event/event-emitter.js.map +1 -0
- package/lib/event/event-system.d.ts +13 -0
- package/lib/event/event-system.d.ts.map +1 -0
- package/lib/event/event-system.js +56 -0
- package/lib/event/event-system.js.map +1 -0
- package/lib/event/filtering-middleware.d.ts +13 -0
- package/lib/event/filtering-middleware.d.ts.map +1 -0
- package/lib/event/filtering-middleware.js +19 -0
- package/lib/event/filtering-middleware.js.map +1 -0
- package/lib/event/hook-stream-sink.d.ts +7 -0
- package/lib/event/hook-stream-sink.d.ts.map +1 -0
- package/lib/event/hook-stream-sink.js +9 -0
- package/lib/event/hook-stream-sink.js.map +1 -0
- package/lib/event/index.d.ts +17 -0
- package/lib/event/index.d.ts.map +1 -0
- package/lib/event/index.js +12 -0
- package/lib/event/index.js.map +1 -0
- package/lib/event/logging-middleware.d.ts +6 -0
- package/lib/event/logging-middleware.d.ts.map +1 -0
- package/lib/event/logging-middleware.js +16 -0
- package/lib/event/logging-middleware.js.map +1 -0
- package/lib/event/publish-agent-stream.d.ts +11 -0
- package/lib/event/publish-agent-stream.d.ts.map +1 -0
- package/lib/event/publish-agent-stream.js +14 -0
- package/lib/event/publish-agent-stream.js.map +1 -0
- package/lib/event/session-events.d.ts +10 -0
- package/lib/event/session-events.d.ts.map +1 -0
- package/lib/event/session-events.js +18 -0
- package/lib/event/session-events.js.map +1 -0
- package/lib/event/turn-event.d.ts +77 -0
- package/lib/event/turn-event.d.ts.map +1 -0
- package/lib/event/turn-event.js +2 -0
- package/lib/event/turn-event.js.map +1 -0
- package/lib/event/turn-to-agent-stream.d.ts +12 -0
- package/lib/event/turn-to-agent-stream.d.ts.map +1 -0
- package/lib/event/turn-to-agent-stream.js +124 -0
- package/lib/event/turn-to-agent-stream.js.map +1 -0
- package/lib/index.d.ts +70 -26
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +47 -16
- package/lib/index.js.map +1 -1
- package/lib/init/activate-ai-database-storage.d.ts +2 -2
- package/lib/init/activate-ai-database-storage.d.ts.map +1 -1
- package/lib/init/activate-ai-database-storage.js +17 -8
- package/lib/init/activate-ai-database-storage.js.map +1 -1
- package/lib/init/bootstrap-gate.d.ts +6 -0
- package/lib/init/bootstrap-gate.d.ts.map +1 -0
- package/lib/init/bootstrap-gate.js +28 -0
- package/lib/init/bootstrap-gate.js.map +1 -0
- package/lib/init/compose-zhin-agent-runtime.d.ts +29 -0
- package/lib/init/compose-zhin-agent-runtime.d.ts.map +1 -0
- package/lib/init/compose-zhin-agent-runtime.js +40 -0
- package/lib/init/compose-zhin-agent-runtime.js.map +1 -0
- package/lib/init/configure-zhin-agent.d.ts +46 -0
- package/lib/init/configure-zhin-agent.d.ts.map +1 -0
- package/lib/init/configure-zhin-agent.js +75 -0
- package/lib/init/configure-zhin-agent.js.map +1 -0
- package/lib/init/create-zhin-agent.d.ts.map +1 -1
- package/lib/init/create-zhin-agent.js +178 -135
- package/lib/init/create-zhin-agent.js.map +1 -1
- package/lib/init/dispose-zhin-agent.d.ts +28 -0
- package/lib/init/dispose-zhin-agent.d.ts.map +1 -0
- package/lib/init/dispose-zhin-agent.js +25 -0
- package/lib/init/dispose-zhin-agent.js.map +1 -0
- package/lib/init/introspection-args.d.ts +4 -1
- package/lib/init/introspection-args.d.ts.map +1 -1
- package/lib/init/introspection-args.js.map +1 -1
- package/lib/init/introspection-collectors.d.ts +5 -0
- package/lib/init/introspection-collectors.d.ts.map +1 -1
- package/lib/init/introspection-collectors.js +35 -0
- package/lib/init/introspection-collectors.js.map +1 -1
- package/lib/init/management-command-guard.d.ts +1 -1
- package/lib/init/management-command-guard.d.ts.map +1 -1
- package/lib/init/management-command-guard.js +1 -1
- package/lib/init/management-command-guard.js.map +1 -1
- package/lib/init/message-media.d.ts +1 -1
- package/lib/init/message-media.d.ts.map +1 -1
- package/lib/init/message-media.js.map +1 -1
- package/lib/init/register-ai-trigger.d.ts.map +1 -1
- package/lib/init/register-ai-trigger.js +29 -304
- package/lib/init/register-ai-trigger.js.map +1 -1
- package/lib/init/register-builtin-tools.d.ts.map +1 -1
- package/lib/init/register-builtin-tools.js +47 -17
- package/lib/init/register-builtin-tools.js.map +1 -1
- package/lib/init/register-collaboration-commands.d.ts +2 -0
- package/lib/init/register-collaboration-commands.d.ts.map +1 -0
- package/lib/init/register-collaboration-commands.js +110 -0
- package/lib/init/register-collaboration-commands.js.map +1 -0
- package/lib/init/register-db-models.d.ts.map +1 -1
- package/lib/init/register-db-models.js +11 -2
- package/lib/init/register-db-models.js.map +1 -1
- package/lib/init/register-db-upgrade.d.ts.map +1 -1
- package/lib/init/register-db-upgrade.js +34 -20
- package/lib/init/register-db-upgrade.js.map +1 -1
- package/lib/init/register-group-session-passive.d.ts.map +1 -1
- package/lib/init/register-group-session-passive.js +19 -13
- package/lib/init/register-group-session-passive.js.map +1 -1
- package/lib/init/register-im-segment-filter.d.ts +2 -0
- package/lib/init/register-im-segment-filter.d.ts.map +1 -0
- package/lib/init/register-im-segment-filter.js +23 -0
- package/lib/init/register-im-segment-filter.js.map +1 -0
- package/lib/init/register-init-wizard-guardrail.d.ts +2 -0
- package/lib/init/register-init-wizard-guardrail.d.ts.map +1 -0
- package/lib/init/register-init-wizard-guardrail.js +46 -0
- package/lib/init/register-init-wizard-guardrail.js.map +1 -0
- package/lib/init/register-introspection-commands.d.ts.map +1 -1
- package/lib/init/register-introspection-commands.js +18 -16
- package/lib/init/register-introspection-commands.js.map +1 -1
- package/lib/init/register-management-tools.d.ts.map +1 -1
- package/lib/init/register-management-tools.js +38 -32
- package/lib/init/register-management-tools.js.map +1 -1
- package/lib/init/register-owner-approve-commands.d.ts.map +1 -1
- package/lib/init/register-owner-approve-commands.js +7 -1
- package/lib/init/register-owner-approve-commands.js.map +1 -1
- package/lib/init/types.d.ts +2 -0
- package/lib/init/types.d.ts.map +1 -1
- package/lib/init.js +6 -6
- package/lib/init.js.map +1 -1
- package/lib/internal/agent-host.d.ts +91 -0
- package/lib/internal/agent-host.d.ts.map +1 -0
- package/lib/internal/agent-host.js +2 -0
- package/lib/internal/agent-host.js.map +1 -0
- package/lib/internal/as-private.d.ts +11 -0
- package/lib/internal/as-private.d.ts.map +1 -0
- package/lib/internal/as-private.js +4 -0
- package/lib/internal/as-private.js.map +1 -0
- package/lib/internal/host-types.d.ts +88 -0
- package/lib/internal/host-types.d.ts.map +1 -0
- package/lib/internal/host-types.js +2 -0
- package/lib/internal/host-types.js.map +1 -0
- package/lib/internal/phase-trace.d.ts +17 -0
- package/lib/internal/phase-trace.d.ts.map +1 -0
- package/lib/internal/phase-trace.js.map +1 -0
- package/lib/internal/prompt-trace.d.ts +17 -0
- package/lib/internal/prompt-trace.d.ts.map +1 -0
- package/lib/internal/prompt-trace.js.map +1 -0
- package/lib/internal/turn-context.d.ts +26 -0
- package/lib/internal/turn-context.d.ts.map +1 -0
- package/lib/internal/turn-context.js +64 -0
- package/lib/internal/turn-context.js.map +1 -0
- package/lib/mcp-client/bridge.d.ts.map +1 -1
- package/lib/mcp-client/bridge.js +3 -1
- package/lib/mcp-client/bridge.js.map +1 -1
- package/lib/media/deliver-subagent-result.d.ts +2 -2
- package/lib/media/deliver-subagent-result.d.ts.map +1 -1
- package/lib/media/media-publisher.d.ts +1 -1
- package/lib/media/media-publisher.d.ts.map +1 -1
- package/lib/media/media-publisher.js.map +1 -1
- package/lib/media/media-router.d.ts +1 -1
- package/lib/media/media-router.d.ts.map +1 -1
- package/lib/media/media-router.js.map +1 -1
- package/lib/media/media-tool-bridge.d.ts +1 -1
- package/lib/media/media-tool-bridge.d.ts.map +1 -1
- package/lib/media/subagent-user-delivery.d.ts +1 -1
- package/lib/media/subagent-user-delivery.d.ts.map +1 -1
- package/lib/media/subagent-user-delivery.js +57 -12
- package/lib/media/subagent-user-delivery.js.map +1 -1
- package/lib/memory/ai-compaction-strategy.d.ts +14 -0
- package/lib/memory/ai-compaction-strategy.d.ts.map +1 -0
- package/lib/memory/ai-compaction-strategy.js +31 -0
- package/lib/memory/ai-compaction-strategy.js.map +1 -0
- package/lib/memory/compaction-runtime.d.ts +28 -0
- package/lib/memory/compaction-runtime.d.ts.map +1 -0
- package/lib/memory/compaction-runtime.js +108 -0
- package/lib/memory/compaction-runtime.js.map +1 -0
- package/lib/memory/context-repository-store.d.ts +14 -0
- package/lib/memory/context-repository-store.d.ts.map +1 -0
- package/lib/memory/context-repository-store.js +22 -0
- package/lib/memory/context-repository-store.js.map +1 -0
- package/lib/memory/contracts.d.ts +24 -0
- package/lib/memory/contracts.d.ts.map +1 -0
- package/lib/memory/contracts.js +8 -0
- package/lib/memory/contracts.js.map +1 -0
- package/lib/memory/index.d.ts +11 -0
- package/lib/memory/index.d.ts.map +1 -0
- package/lib/memory/index.js +8 -0
- package/lib/memory/index.js.map +1 -0
- package/lib/memory/memory-system.d.ts +22 -0
- package/lib/memory/memory-system.d.ts.map +1 -0
- package/lib/memory/memory-system.js +71 -0
- package/lib/memory/memory-system.js.map +1 -0
- package/lib/memory-layers.d.ts +1 -1
- package/lib/memory-layers.d.ts.map +1 -1
- package/lib/memory-layers.js +1 -2
- package/lib/memory-layers.js.map +1 -1
- package/lib/orchestrator/agent-dispatcher.d.ts +7 -18
- package/lib/orchestrator/agent-dispatcher.d.ts.map +1 -1
- package/lib/orchestrator/agent-dispatcher.js +54 -116
- package/lib/orchestrator/agent-dispatcher.js.map +1 -1
- package/lib/orchestrator/bootstrap-executors.d.ts +7 -0
- package/lib/orchestrator/bootstrap-executors.d.ts.map +1 -0
- package/lib/orchestrator/bootstrap-executors.js +170 -0
- package/lib/orchestrator/bootstrap-executors.js.map +1 -0
- package/lib/orchestrator/hook-registry.d.ts +27 -4
- package/lib/orchestrator/hook-registry.d.ts.map +1 -1
- package/lib/orchestrator/hook-registry.js +102 -4
- package/lib/orchestrator/hook-registry.js.map +1 -1
- package/lib/orchestrator/index.d.ts +12 -1
- package/lib/orchestrator/index.d.ts.map +1 -1
- package/lib/orchestrator/index.js +14 -1
- package/lib/orchestrator/index.js.map +1 -1
- package/lib/orchestrator/mcp-registry.d.ts +8 -0
- package/lib/orchestrator/mcp-registry.d.ts.map +1 -1
- package/lib/orchestrator/mcp-registry.js +19 -0
- package/lib/orchestrator/mcp-registry.js.map +1 -1
- package/lib/orchestrator/orchestration-mappers.d.ts +9 -0
- package/lib/orchestrator/orchestration-mappers.d.ts.map +1 -0
- package/lib/orchestrator/orchestration-mappers.js +162 -0
- package/lib/orchestrator/orchestration-mappers.js.map +1 -0
- package/lib/orchestrator/orchestration-repository.d.ts +14 -14
- package/lib/orchestrator/orchestration-repository.d.ts.map +1 -1
- package/lib/orchestrator/orchestration-repository.js +87 -53
- package/lib/orchestrator/orchestration-repository.js.map +1 -1
- package/lib/orchestrator/orchestration-service.d.ts +82 -18
- package/lib/orchestrator/orchestration-service.d.ts.map +1 -1
- package/lib/orchestrator/orchestration-service.js +445 -103
- package/lib/orchestrator/orchestration-service.js.map +1 -1
- package/lib/orchestrator/orchestration-types.d.ts +88 -0
- package/lib/orchestrator/orchestration-types.d.ts.map +1 -0
- package/lib/orchestrator/orchestration-types.js +2 -0
- package/lib/orchestrator/orchestration-types.js.map +1 -0
- package/lib/orchestrator/owner-confirm-orchestration.d.ts +7 -1
- package/lib/orchestrator/owner-confirm-orchestration.d.ts.map +1 -1
- package/lib/orchestrator/owner-confirm-orchestration.js +1 -1
- package/lib/orchestrator/owner-confirm-orchestration.js.map +1 -1
- package/lib/orchestrator/remote-agent-registry.d.ts +10 -7
- package/lib/orchestrator/remote-agent-registry.d.ts.map +1 -1
- package/lib/orchestrator/remote-agent-registry.js +83 -51
- package/lib/orchestrator/remote-agent-registry.js.map +1 -1
- package/lib/orchestrator/remote-task-executor.d.ts.map +1 -1
- package/lib/orchestrator/remote-task-executor.js +179 -98
- package/lib/orchestrator/remote-task-executor.js.map +1 -1
- package/lib/orchestrator/remote-task-poller.js +1 -1
- package/lib/orchestrator/resolve-subagent-tools.d.ts +7 -3
- package/lib/orchestrator/resolve-subagent-tools.d.ts.map +1 -1
- package/lib/orchestrator/resolve-subagent-tools.js +36 -31
- package/lib/orchestrator/resolve-subagent-tools.js.map +1 -1
- package/lib/orchestrator/skill-registry.d.ts +10 -1
- package/lib/orchestrator/skill-registry.d.ts.map +1 -1
- package/lib/orchestrator/skill-registry.js +26 -37
- package/lib/orchestrator/skill-registry.js.map +1 -1
- package/lib/orchestrator/tool-registry.d.ts +1 -1
- package/lib/orchestrator/tool-registry.d.ts.map +1 -1
- package/lib/orchestrator/tool-registry.js.map +1 -1
- package/lib/orchestrator/tool-selection.d.ts +3 -3
- package/lib/orchestrator/tool-selection.d.ts.map +1 -1
- package/lib/orchestrator/tool-selection.js +5 -2
- package/lib/orchestrator/tool-selection.js.map +1 -1
- package/lib/orchestrator/types.d.ts +58 -1
- package/lib/orchestrator/types.d.ts.map +1 -1
- package/lib/outbound/send-proactive.d.ts +24 -0
- package/lib/outbound/send-proactive.d.ts.map +1 -0
- package/lib/outbound/send-proactive.js +54 -0
- package/lib/outbound/send-proactive.js.map +1 -0
- package/lib/prompt/assembly.d.ts +31 -0
- package/lib/prompt/assembly.d.ts.map +1 -0
- package/lib/prompt/assembly.js +92 -0
- package/lib/prompt/assembly.js.map +1 -0
- package/lib/prompt/index.d.ts +11 -0
- package/lib/prompt/index.d.ts.map +1 -0
- package/lib/prompt/index.js +9 -0
- package/lib/prompt/index.js.map +1 -0
- package/lib/prompt/prompt-builder.d.ts.map +1 -0
- package/lib/prompt/prompt-builder.js +574 -0
- package/lib/prompt/prompt-builder.js.map +1 -0
- package/lib/prompt/system-prompt.d.ts +63 -0
- package/lib/prompt/system-prompt.d.ts.map +1 -0
- package/lib/prompt/system-prompt.js +532 -0
- package/lib/prompt/system-prompt.js.map +1 -0
- package/lib/prompt/templates.d.ts +162 -0
- package/lib/prompt/templates.d.ts.map +1 -0
- package/lib/prompt/templates.js +447 -0
- package/lib/prompt/templates.js.map +1 -0
- package/lib/prompt/workspace-prompt.d.ts.map +1 -0
- package/lib/prompt/workspace-prompt.js.map +1 -0
- package/lib/reserved-tools.d.ts.map +1 -1
- package/lib/reserved-tools.js +9 -6
- package/lib/reserved-tools.js.map +1 -1
- package/lib/routing/route-matcher.d.ts +6 -1
- package/lib/routing/route-matcher.d.ts.map +1 -1
- package/lib/routing/route-matcher.js +53 -8
- package/lib/routing/route-matcher.js.map +1 -1
- package/lib/routing/runtime-binding.d.ts +1 -1
- package/lib/routing/runtime-binding.d.ts.map +1 -1
- package/lib/schedule-cron.d.ts +18 -0
- package/lib/schedule-cron.d.ts.map +1 -0
- package/lib/schedule-cron.js +62 -0
- package/lib/schedule-cron.js.map +1 -0
- package/lib/schedule-manager.d.ts +28 -0
- package/lib/schedule-manager.d.ts.map +1 -0
- package/lib/schedule-manager.js +150 -0
- package/lib/schedule-manager.js.map +1 -0
- package/lib/security/audit-logger.d.ts.map +1 -1
- package/lib/security/audit-logger.js +118 -13
- package/lib/security/audit-logger.js.map +1 -1
- package/lib/security/dangerous-tool-policy-hook.d.ts +6 -0
- package/lib/security/dangerous-tool-policy-hook.d.ts.map +1 -0
- package/lib/security/dangerous-tool-policy-hook.js +41 -0
- package/lib/security/dangerous-tool-policy-hook.js.map +1 -0
- package/lib/security/dangerous-tool-policy.d.ts +2 -2
- package/lib/security/dangerous-tool-policy.d.ts.map +1 -1
- package/lib/security/dangerous-tool-policy.js.map +1 -1
- package/lib/security/exec-policy-hook.d.ts +7 -0
- package/lib/security/exec-policy-hook.d.ts.map +1 -0
- package/lib/security/exec-policy-hook.js +29 -0
- package/lib/security/exec-policy-hook.js.map +1 -0
- package/lib/security/exec-policy.d.ts +1 -1
- package/lib/security/exec-policy.d.ts.map +1 -1
- package/lib/security/file-policy-hook.d.ts +6 -0
- package/lib/security/file-policy-hook.d.ts.map +1 -0
- package/lib/security/file-policy-hook.js +30 -0
- package/lib/security/file-policy-hook.js.map +1 -0
- package/lib/security/owner-approve-always-store.d.ts +1 -1
- package/lib/security/owner-approve-always-store.d.ts.map +1 -1
- package/lib/security/owner-approve-always-store.js.map +1 -1
- package/lib/security/sandbox-enhanced.d.ts.map +1 -1
- package/lib/security/sandbox-enhanced.js +27 -19
- package/lib/security/sandbox-enhanced.js.map +1 -1
- package/lib/security/sandbox.d.ts.map +1 -1
- package/lib/security/sandbox.js +6 -6
- package/lib/security/sandbox.js.map +1 -1
- package/lib/segment/filter-im-delivery.d.ts +7 -0
- package/lib/segment/filter-im-delivery.d.ts.map +1 -0
- package/lib/segment/filter-im-delivery.js +32 -0
- package/lib/segment/filter-im-delivery.js.map +1 -0
- package/lib/service.d.ts +5 -14
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +7 -12
- package/lib/service.js.map +1 -1
- package/lib/session/agent-session-host-port.d.ts +23 -0
- package/lib/session/agent-session-host-port.d.ts.map +1 -0
- package/lib/session/agent-session-host-port.js +61 -0
- package/lib/session/agent-session-host-port.js.map +1 -0
- package/lib/session/branch-summarization-runtime.d.ts +16 -0
- package/lib/session/branch-summarization-runtime.d.ts.map +1 -0
- package/lib/session/branch-summarization-runtime.js +58 -0
- package/lib/session/branch-summarization-runtime.js.map +1 -0
- package/lib/session/contracts.d.ts +27 -0
- package/lib/session/contracts.d.ts.map +1 -0
- package/lib/session/contracts.js +9 -0
- package/lib/session/contracts.js.map +1 -0
- package/lib/session/http-agent-session-store.d.ts +76 -0
- package/lib/session/http-agent-session-store.d.ts.map +1 -0
- package/lib/session/http-agent-session-store.js +211 -0
- package/lib/session/http-agent-session-store.js.map +1 -0
- package/lib/session/http-approval-adapter.d.ts +11 -0
- package/lib/session/http-approval-adapter.d.ts.map +1 -0
- package/lib/session/http-approval-adapter.js +19 -0
- package/lib/session/http-approval-adapter.js.map +1 -0
- package/lib/session/http-approval-waiter.d.ts +11 -0
- package/lib/session/http-approval-waiter.d.ts.map +1 -0
- package/lib/session/http-approval-waiter.js +38 -0
- package/lib/session/http-approval-waiter.js.map +1 -0
- package/lib/session/http-session-persistence.d.ts +28 -0
- package/lib/session/http-session-persistence.d.ts.map +1 -0
- package/lib/session/http-session-persistence.js +60 -0
- package/lib/session/http-session-persistence.js.map +1 -0
- package/lib/session/http-session-sink.d.ts +11 -0
- package/lib/session/http-session-sink.d.ts.map +1 -0
- package/lib/session/http-session-sink.js +32 -0
- package/lib/session/http-session-sink.js.map +1 -0
- package/lib/session/http-step-projector.d.ts +16 -0
- package/lib/session/http-step-projector.d.ts.map +1 -0
- package/lib/session/http-step-projector.js +118 -0
- package/lib/session/http-step-projector.js.map +1 -0
- package/lib/session/http-turn-runner.d.ts +16 -0
- package/lib/session/http-turn-runner.d.ts.map +1 -0
- package/lib/session/http-turn-runner.js +57 -0
- package/lib/session/http-turn-runner.js.map +1 -0
- package/lib/session/im-approval-adapter.d.ts +12 -0
- package/lib/session/im-approval-adapter.d.ts.map +1 -0
- package/lib/session/im-approval-adapter.js +24 -0
- package/lib/session/im-approval-adapter.js.map +1 -0
- package/lib/session/index.d.ts +17 -0
- package/lib/session/index.d.ts.map +1 -0
- package/lib/session/index.js +12 -0
- package/lib/session/index.js.map +1 -0
- package/lib/session/park-controller.d.ts +24 -0
- package/lib/session/park-controller.d.ts.map +1 -0
- package/lib/session/park-controller.js +58 -0
- package/lib/session/park-controller.js.map +1 -0
- package/lib/session/passive-group-buffer.d.ts +15 -0
- package/lib/session/passive-group-buffer.d.ts.map +1 -0
- package/lib/session/passive-group-buffer.js +45 -0
- package/lib/session/passive-group-buffer.js.map +1 -0
- package/lib/session/passive-group-session.d.ts +12 -0
- package/lib/session/passive-group-session.d.ts.map +1 -0
- package/lib/session/passive-group-session.js +36 -0
- package/lib/session/passive-group-session.js.map +1 -0
- package/lib/session/resolve-session-interaction-port.d.ts +9 -0
- package/lib/session/resolve-session-interaction-port.d.ts.map +1 -0
- package/lib/session/resolve-session-interaction-port.js +13 -0
- package/lib/session/resolve-session-interaction-port.js.map +1 -0
- package/lib/session/session-event-log.d.ts +17 -0
- package/lib/session/session-event-log.d.ts.map +1 -0
- package/lib/session/session-event-log.js +56 -0
- package/lib/session/session-event-log.js.map +1 -0
- package/lib/session/session-interaction-port.d.ts +15 -0
- package/lib/session/session-interaction-port.d.ts.map +1 -0
- package/lib/session/session-interaction-port.js +2 -0
- package/lib/session/session-interaction-port.js.map +1 -0
- package/lib/session/session-io.d.ts +43 -0
- package/lib/session/session-io.d.ts.map +1 -0
- package/lib/session/session-io.js +135 -0
- package/lib/session/session-io.js.map +1 -0
- package/lib/session/session-system.d.ts +31 -0
- package/lib/session/session-system.d.ts.map +1 -0
- package/lib/session/session-system.js +70 -0
- package/lib/session/session-system.js.map +1 -0
- package/lib/session/session-tree-commands.d.ts +5 -0
- package/lib/session/session-tree-commands.d.ts.map +1 -0
- package/lib/session/session-tree-commands.js +32 -0
- package/lib/session/session-tree-commands.js.map +1 -0
- package/lib/session/strategies.d.ts +11 -0
- package/lib/session/strategies.d.ts.map +1 -0
- package/lib/session/strategies.js +19 -0
- package/lib/session/strategies.js.map +1 -0
- package/lib/session-tree-runtime-registry.d.ts +1 -1
- package/lib/session-tree-runtime-registry.d.ts.map +1 -1
- package/lib/session-tree-runtime-registry.js +1 -1
- package/lib/session-tree-runtime-registry.js.map +1 -1
- package/lib/skill/contracts.d.ts +29 -0
- package/lib/skill/contracts.d.ts.map +1 -0
- package/lib/skill/contracts.js +7 -0
- package/lib/skill/contracts.js.map +1 -0
- package/lib/skill/index.d.ts +8 -0
- package/lib/skill/index.d.ts.map +1 -0
- package/lib/skill/index.js +6 -0
- package/lib/skill/index.js.map +1 -0
- package/lib/skill/progressive-disclosure.d.ts +9 -0
- package/lib/skill/progressive-disclosure.d.ts.map +1 -0
- package/lib/skill/progressive-disclosure.js +14 -0
- package/lib/skill/progressive-disclosure.js.map +1 -0
- package/lib/skill/skill-load-opts.d.ts +5 -0
- package/lib/skill/skill-load-opts.d.ts.map +1 -0
- package/lib/skill/skill-load-opts.js +14 -0
- package/lib/skill/skill-load-opts.js.map +1 -0
- package/lib/skill/skill-system.d.ts +17 -0
- package/lib/skill/skill-system.d.ts.map +1 -0
- package/lib/skill/skill-system.js +51 -0
- package/lib/skill/skill-system.js.map +1 -0
- package/lib/spawn/permission-task.d.ts +9 -0
- package/lib/spawn/permission-task.d.ts.map +1 -0
- package/lib/spawn/permission-task.js +37 -0
- package/lib/spawn/permission-task.js.map +1 -0
- package/lib/stability/memory-pressure.js +1 -1
- package/lib/stability/memory-pressure.js.map +1 -1
- package/lib/state/agent-state-store.d.ts +18 -0
- package/lib/state/agent-state-store.d.ts.map +1 -0
- package/lib/state/agent-state-store.js +50 -0
- package/lib/state/agent-state-store.js.map +1 -0
- package/lib/subagent/contracts.d.ts +37 -0
- package/lib/subagent/contracts.d.ts.map +1 -0
- package/lib/subagent/contracts.js +8 -0
- package/lib/subagent/contracts.js.map +1 -0
- package/lib/subagent/im-result-sink.d.ts +15 -0
- package/lib/subagent/im-result-sink.d.ts.map +1 -0
- package/lib/subagent/im-result-sink.js +47 -0
- package/lib/subagent/im-result-sink.js.map +1 -0
- package/lib/subagent/index.d.ts +12 -0
- package/lib/subagent/index.d.ts.map +1 -0
- package/lib/subagent/index.js +8 -0
- package/lib/subagent/index.js.map +1 -0
- package/lib/subagent/subagent-runtime.d.ts +173 -0
- package/lib/subagent/subagent-runtime.d.ts.map +1 -0
- package/lib/subagent/subagent-runtime.js +553 -0
- package/lib/subagent/subagent-runtime.js.map +1 -0
- package/lib/subagent/subagent-system-init.d.ts +15 -0
- package/lib/subagent/subagent-system-init.d.ts.map +1 -0
- package/lib/subagent/subagent-system-init.js +53 -0
- package/lib/subagent/subagent-system-init.js.map +1 -0
- package/lib/subagent/subagent-system.d.ts +31 -0
- package/lib/subagent/subagent-system.d.ts.map +1 -0
- package/lib/subagent/subagent-system.js +98 -0
- package/lib/subagent/subagent-system.js.map +1 -0
- package/lib/subagent-ai-events.d.ts +4 -4
- package/lib/subagent-ai-events.d.ts.map +1 -1
- package/lib/subagent-ai-events.js.map +1 -1
- package/lib/subagent-goal-notify.d.ts +11 -9
- package/lib/subagent-goal-notify.d.ts.map +1 -1
- package/lib/subagent-goal-notify.js +14 -8
- package/lib/subagent-goal-notify.js.map +1 -1
- package/lib/subagent-preset.js +3 -3
- package/lib/subagent-preset.js.map +1 -1
- package/lib/subagent-prompt.d.ts.map +1 -1
- package/lib/subagent-prompt.js +32 -8
- package/lib/subagent-prompt.js.map +1 -1
- package/lib/task-executor.d.ts +15 -10
- package/lib/task-executor.d.ts.map +1 -1
- package/lib/task-executor.js +100 -39
- package/lib/task-executor.js.map +1 -1
- package/lib/tool/context-tools.d.ts +10 -0
- package/lib/tool/context-tools.d.ts.map +1 -0
- package/lib/tool/context-tools.js +107 -0
- package/lib/tool/context-tools.js.map +1 -0
- package/lib/tool/contracts.d.ts +26 -0
- package/lib/tool/contracts.d.ts.map +1 -0
- package/lib/tool/contracts.js +8 -0
- package/lib/tool/contracts.js.map +1 -0
- package/lib/tool/deferred-resolution.d.ts +14 -0
- package/lib/tool/deferred-resolution.d.ts.map +1 -0
- package/lib/tool/deferred-resolution.js +66 -0
- package/lib/tool/deferred-resolution.js.map +1 -0
- package/lib/tool/index.d.ts +14 -0
- package/lib/tool/index.d.ts.map +1 -0
- package/lib/tool/index.js +9 -0
- package/lib/tool/index.js.map +1 -0
- package/lib/tool/pre-exec.d.ts.map +1 -0
- package/lib/tool/pre-exec.js.map +1 -0
- package/lib/tool/prepare-turn-tools.d.ts +22 -0
- package/lib/tool/prepare-turn-tools.d.ts.map +1 -0
- package/lib/tool/prepare-turn-tools.js +87 -0
- package/lib/tool/prepare-turn-tools.js.map +1 -0
- package/lib/tool/runtime.d.ts +24 -0
- package/lib/tool/runtime.d.ts.map +1 -0
- package/lib/tool/runtime.js +20 -0
- package/lib/tool/runtime.js.map +1 -0
- package/lib/tool/sources.d.ts +59 -0
- package/lib/tool/sources.d.ts.map +1 -0
- package/lib/tool/sources.js +110 -0
- package/lib/tool/sources.js.map +1 -0
- package/lib/tool/tool-approval-gate.d.ts +30 -0
- package/lib/tool/tool-approval-gate.d.ts.map +1 -0
- package/lib/tool/tool-approval-gate.js +74 -0
- package/lib/tool/tool-approval-gate.js.map +1 -0
- package/lib/tool/tool-approval-once-store.d.ts +10 -0
- package/lib/tool/tool-approval-once-store.d.ts.map +1 -0
- package/lib/tool/tool-approval-once-store.js +16 -0
- package/lib/tool/tool-approval-once-store.js.map +1 -0
- package/lib/tool/tool-model-output.d.ts +3 -0
- package/lib/tool/tool-model-output.d.ts.map +1 -0
- package/lib/tool/tool-model-output.js +7 -0
- package/lib/tool/tool-model-output.js.map +1 -0
- package/lib/tool/tool-system.d.ts +36 -0
- package/lib/tool/tool-system.d.ts.map +1 -0
- package/lib/tool/tool-system.js +84 -0
- package/lib/tool/tool-system.js.map +1 -0
- package/lib/tool/web-search-locale-attach.d.ts.map +1 -0
- package/lib/tool/web-search-locale-attach.js.map +1 -0
- package/lib/tool-bridge.d.ts +11 -0
- package/lib/tool-bridge.d.ts.map +1 -0
- package/lib/tool-bridge.js +10 -0
- package/lib/tool-bridge.js.map +1 -0
- package/lib/tool-catalog/index.d.ts +4 -0
- package/lib/tool-catalog/index.d.ts.map +1 -0
- package/lib/tool-catalog/index.js +4 -0
- package/lib/tool-catalog/index.js.map +1 -0
- package/lib/tool-catalog/resolve-config.d.ts +8 -0
- package/lib/tool-catalog/resolve-config.d.ts.map +1 -0
- package/lib/tool-catalog/resolve-config.js +22 -0
- package/lib/tool-catalog/resolve-config.js.map +1 -0
- package/lib/tool-catalog/session-deferred-store.d.ts +22 -0
- package/lib/tool-catalog/session-deferred-store.d.ts.map +1 -0
- package/lib/tool-catalog/session-deferred-store.js +50 -0
- package/lib/tool-catalog/session-deferred-store.js.map +1 -0
- package/lib/tool-catalog/tool-catalog.d.ts +24 -0
- package/lib/tool-catalog/tool-catalog.d.ts.map +1 -0
- package/lib/tool-catalog/tool-catalog.js +119 -0
- package/lib/tool-catalog/tool-catalog.js.map +1 -0
- package/lib/tool-catalog/types.d.ts +29 -0
- package/lib/tool-catalog/types.d.ts.map +1 -0
- package/lib/tool-catalog/types.js +18 -0
- package/lib/tool-catalog/types.js.map +1 -0
- package/lib/turn/auto-continue.d.ts +18 -0
- package/lib/turn/auto-continue.d.ts.map +1 -0
- package/lib/turn/auto-continue.js +76 -0
- package/lib/turn/auto-continue.js.map +1 -0
- package/lib/turn/deferred-auto-continue.d.ts +11 -0
- package/lib/turn/deferred-auto-continue.d.ts.map +1 -0
- package/lib/turn/deferred-auto-continue.js.map +1 -0
- package/lib/turn/deferred-delivery.d.ts +9 -0
- package/lib/turn/deferred-delivery.d.ts.map +1 -0
- package/lib/turn/deferred-delivery.js.map +1 -0
- package/lib/turn/inbound-queue-config.d.ts +14 -0
- package/lib/turn/inbound-queue-config.d.ts.map +1 -0
- package/lib/turn/inbound-queue-config.js +39 -0
- package/lib/turn/inbound-queue-config.js.map +1 -0
- package/lib/turn/inbound-queue-runtime.d.ts +15 -0
- package/lib/turn/inbound-queue-runtime.d.ts.map +1 -0
- package/lib/turn/inbound-queue-runtime.js +29 -0
- package/lib/turn/inbound-queue-runtime.js.map +1 -0
- package/lib/turn/inbound-turn-queue.d.ts +29 -0
- package/lib/turn/inbound-turn-queue.d.ts.map +1 -0
- package/lib/turn/inbound-turn-queue.js +132 -0
- package/lib/turn/inbound-turn-queue.js.map +1 -0
- package/lib/turn/index.d.ts +34 -0
- package/lib/turn/index.d.ts.map +1 -0
- package/lib/turn/index.js +26 -0
- package/lib/turn/index.js.map +1 -0
- package/lib/turn/multimodal-message.d.ts +9 -0
- package/lib/turn/multimodal-message.d.ts.map +1 -0
- package/lib/turn/multimodal-message.js +72 -0
- package/lib/turn/multimodal-message.js.map +1 -0
- package/lib/turn/persist-deferred-context.d.ts +5 -0
- package/lib/turn/persist-deferred-context.d.ts.map +1 -0
- package/lib/turn/persist-deferred-context.js +35 -0
- package/lib/turn/persist-deferred-context.js.map +1 -0
- package/lib/turn/persist-subagent-context.d.ts +5 -0
- package/lib/turn/persist-subagent-context.d.ts.map +1 -0
- package/lib/turn/persist-subagent-context.js +36 -0
- package/lib/turn/persist-subagent-context.js.map +1 -0
- package/lib/turn/process-stream.d.ts +14 -0
- package/lib/turn/process-stream.d.ts.map +1 -0
- package/lib/turn/process-stream.js +70 -0
- package/lib/turn/process-stream.js.map +1 -0
- package/lib/turn/prompt-access.d.ts.map +1 -0
- package/lib/turn/prompt-access.js.map +1 -0
- package/lib/turn/prompt-api.d.ts +14 -0
- package/lib/turn/prompt-api.d.ts.map +1 -0
- package/lib/turn/prompt-api.js +51 -0
- package/lib/turn/prompt-api.js.map +1 -0
- package/lib/turn/prompt-controller.d.ts +59 -0
- package/lib/turn/prompt-controller.d.ts.map +1 -0
- package/lib/turn/prompt-controller.js +190 -0
- package/lib/turn/prompt-controller.js.map +1 -0
- package/lib/turn/prompt-input.d.ts +3 -0
- package/lib/turn/prompt-input.d.ts.map +1 -0
- package/lib/turn/prompt-input.js.map +1 -0
- package/lib/turn/session-message-queue.d.ts +19 -0
- package/lib/turn/session-message-queue.d.ts.map +1 -0
- package/lib/turn/session-message-queue.js.map +1 -0
- package/lib/turn/subagent-auto-continue.d.ts +7 -0
- package/lib/turn/subagent-auto-continue.d.ts.map +1 -0
- package/lib/turn/subagent-auto-continue.js +16 -0
- package/lib/turn/subagent-auto-continue.js.map +1 -0
- package/lib/turn/task-continuation.d.ts.map +1 -0
- package/lib/turn/task-continuation.js.map +1 -0
- package/lib/turn/turn-complete.d.ts +25 -0
- package/lib/turn/turn-complete.d.ts.map +1 -0
- package/lib/turn/turn-complete.js +59 -0
- package/lib/turn/turn-complete.js.map +1 -0
- package/lib/turn/turn-context-bridge.d.ts +13 -0
- package/lib/turn/turn-context-bridge.d.ts.map +1 -0
- package/lib/turn/turn-context-bridge.js +33 -0
- package/lib/turn/turn-context-bridge.js.map +1 -0
- package/lib/turn/turn-deferred-delta.d.ts +6 -0
- package/lib/turn/turn-deferred-delta.d.ts.map +1 -0
- package/lib/turn/turn-deferred-delta.js +24 -0
- package/lib/turn/turn-deferred-delta.js.map +1 -0
- package/lib/turn/turn-metrics.d.ts +21 -0
- package/lib/turn/turn-metrics.d.ts.map +1 -0
- package/lib/turn/turn-metrics.js +88 -0
- package/lib/turn/turn-metrics.js.map +1 -0
- package/lib/turn/turn-pipeline.d.ts +14 -0
- package/lib/turn/turn-pipeline.d.ts.map +1 -0
- package/lib/turn/turn-pipeline.js +251 -0
- package/lib/turn/turn-pipeline.js.map +1 -0
- package/lib/turn/turn-tracker.d.ts.map +1 -0
- package/lib/turn/turn-tracker.js.map +1 -0
- package/lib/typing-indicator/adapter-integration.d.ts +3 -142
- package/lib/typing-indicator/adapter-integration.d.ts.map +1 -1
- package/lib/typing-indicator/adapter-integration.js +4 -332
- package/lib/typing-indicator/adapter-integration.js.map +1 -1
- package/lib/utils/config-env.js +30 -7
- package/lib/utils/config-env.js.map +1 -1
- package/lib/zhin-agent/index.d.ts +73 -83
- package/lib/zhin-agent/index.d.ts.map +1 -1
- package/lib/zhin-agent/index.js +168 -333
- package/lib/zhin-agent/index.js.map +1 -1
- package/lib/zhin-agent/runtime-modules.d.ts +27 -0
- package/lib/zhin-agent/runtime-modules.d.ts.map +1 -0
- package/lib/zhin-agent/runtime-modules.js +28 -0
- package/lib/zhin-agent/runtime-modules.js.map +1 -0
- package/package.json +100 -7
- package/lib/assistant/legacy-convert.d.ts +0 -43
- package/lib/assistant/legacy-convert.d.ts.map +0 -1
- package/lib/assistant/legacy-convert.js +0 -108
- package/lib/assistant/legacy-convert.js.map +0 -1
- package/lib/builtin/activate-skill-tool.d.ts +0 -21
- package/lib/builtin/activate-skill-tool.d.ts.map +0 -1
- package/lib/builtin/activate-skill-tool.js +0 -57
- package/lib/builtin/activate-skill-tool.js.map +0 -1
- package/lib/builtin/run-spec-dry-run-tool.d.ts +0 -3
- package/lib/builtin/run-spec-dry-run-tool.d.ts.map +0 -1
- package/lib/builtin/run-spec-dry-run-tool.js +0 -51
- package/lib/builtin/run-spec-dry-run-tool.js.map +0 -1
- package/lib/builtin/run-validation-spec-tool.d.ts +0 -5
- package/lib/builtin/run-validation-spec-tool.d.ts.map +0 -1
- package/lib/builtin/run-validation-spec-tool.js +0 -44
- package/lib/builtin/run-validation-spec-tool.js.map +0 -1
- package/lib/builtin/tool-search-tool.d.ts +0 -19
- package/lib/builtin/tool-search-tool.d.ts.map +0 -1
- package/lib/builtin/tool-search-tool.js +0 -54
- package/lib/builtin/tool-search-tool.js.map +0 -1
- package/lib/cron-engine.d.ts +0 -121
- package/lib/cron-engine.d.ts.map +0 -1
- package/lib/cron-engine.js +0 -360
- package/lib/cron-engine.js.map +0 -1
- package/lib/init/register-agent-mesh-mcp.d.ts +0 -2
- package/lib/init/register-agent-mesh-mcp.d.ts.map +0 -1
- package/lib/init/register-agent-mesh-mcp.js +0 -29
- package/lib/init/register-agent-mesh-mcp.js.map +0 -1
- package/lib/init/register-mcp-memory-default.d.ts +0 -2
- package/lib/init/register-mcp-memory-default.d.ts.map +0 -1
- package/lib/init/register-mcp-memory-default.js +0 -35
- package/lib/init/register-mcp-memory-default.js.map +0 -1
- package/lib/init/register-typing-indicator.d.ts +0 -10
- package/lib/init/register-typing-indicator.d.ts.map +0 -1
- package/lib/init/register-typing-indicator.js +0 -286
- package/lib/init/register-typing-indicator.js.map +0 -1
- package/lib/mcp-server/agent-mesh-tools.d.ts +0 -8
- package/lib/mcp-server/agent-mesh-tools.d.ts.map +0 -1
- package/lib/mcp-server/agent-mesh-tools.js +0 -138
- package/lib/mcp-server/agent-mesh-tools.js.map +0 -1
- package/lib/orchestrator/delegation-processor.d.ts +0 -34
- package/lib/orchestrator/delegation-processor.d.ts.map +0 -1
- package/lib/orchestrator/delegation-processor.js +0 -146
- package/lib/orchestrator/delegation-processor.js.map +0 -1
- package/lib/orchestrator/mission-milestone-notify.d.ts +0 -17
- package/lib/orchestrator/mission-milestone-notify.d.ts.map +0 -1
- package/lib/orchestrator/mission-milestone-notify.js +0 -54
- package/lib/orchestrator/mission-milestone-notify.js.map +0 -1
- package/lib/orchestrator/mission-negotiation.d.ts +0 -17
- package/lib/orchestrator/mission-negotiation.d.ts.map +0 -1
- package/lib/orchestrator/mission-negotiation.js +0 -89
- package/lib/orchestrator/mission-negotiation.js.map +0 -1
- package/lib/orchestrator/mission-patch-acl.d.ts +0 -9
- package/lib/orchestrator/mission-patch-acl.d.ts.map +0 -1
- package/lib/orchestrator/mission-patch-acl.js +0 -29
- package/lib/orchestrator/mission-patch-acl.js.map +0 -1
- package/lib/orchestrator/mission-runner.d.ts +0 -23
- package/lib/orchestrator/mission-runner.d.ts.map +0 -1
- package/lib/orchestrator/mission-runner.js +0 -181
- package/lib/orchestrator/mission-runner.js.map +0 -1
- package/lib/orchestrator/mission-spec.d.ts +0 -44
- package/lib/orchestrator/mission-spec.d.ts.map +0 -1
- package/lib/orchestrator/mission-spec.js +0 -121
- package/lib/orchestrator/mission-spec.js.map +0 -1
- package/lib/orchestrator/mission-state.d.ts +0 -48
- package/lib/orchestrator/mission-state.d.ts.map +0 -1
- package/lib/orchestrator/mission-state.js +0 -66
- package/lib/orchestrator/mission-state.js.map +0 -1
- package/lib/subagent.d.ts +0 -141
- package/lib/subagent.d.ts.map +0 -1
- package/lib/subagent.js +0 -483
- package/lib/subagent.js.map +0 -1
- package/lib/zhin-agent/agent-loop-standalone.d.ts +0 -43
- package/lib/zhin-agent/agent-loop-standalone.d.ts.map +0 -1
- package/lib/zhin-agent/agent-loop-standalone.js +0 -163
- package/lib/zhin-agent/agent-loop-standalone.js.map +0 -1
- package/lib/zhin-agent/agent-loop-turn.d.ts +0 -52
- package/lib/zhin-agent/agent-loop-turn.d.ts.map +0 -1
- package/lib/zhin-agent/agent-loop-turn.js +0 -395
- package/lib/zhin-agent/agent-loop-turn.js.map +0 -1
- package/lib/zhin-agent/agents-instruction.d.ts +0 -15
- package/lib/zhin-agent/agents-instruction.d.ts.map +0 -1
- package/lib/zhin-agent/agents-instruction.js +0 -98
- package/lib/zhin-agent/agents-instruction.js.map +0 -1
- package/lib/zhin-agent/branch-summarization-runtime.d.ts +0 -16
- package/lib/zhin-agent/branch-summarization-runtime.d.ts.map +0 -1
- package/lib/zhin-agent/branch-summarization-runtime.js +0 -58
- package/lib/zhin-agent/branch-summarization-runtime.js.map +0 -1
- package/lib/zhin-agent/builtin-tools.d.ts +0 -14
- package/lib/zhin-agent/builtin-tools.d.ts.map +0 -1
- package/lib/zhin-agent/builtin-tools.js +0 -114
- package/lib/zhin-agent/builtin-tools.js.map +0 -1
- package/lib/zhin-agent/compaction-runtime.d.ts +0 -29
- package/lib/zhin-agent/compaction-runtime.d.ts.map +0 -1
- package/lib/zhin-agent/compaction-runtime.js +0 -108
- package/lib/zhin-agent/compaction-runtime.js.map +0 -1
- package/lib/zhin-agent/config.d.ts +0 -190
- package/lib/zhin-agent/config.d.ts.map +0 -1
- package/lib/zhin-agent/config.js +0 -207
- package/lib/zhin-agent/config.js.map +0 -1
- package/lib/zhin-agent/context-budget.d.ts +0 -27
- package/lib/zhin-agent/context-budget.d.ts.map +0 -1
- package/lib/zhin-agent/context-budget.js +0 -50
- package/lib/zhin-agent/context-budget.js.map +0 -1
- package/lib/zhin-agent/deferred-auto-continue.d.ts +0 -11
- package/lib/zhin-agent/deferred-auto-continue.d.ts.map +0 -1
- package/lib/zhin-agent/deferred-auto-continue.js.map +0 -1
- package/lib/zhin-agent/deferred-delivery.d.ts +0 -9
- package/lib/zhin-agent/deferred-delivery.d.ts.map +0 -1
- package/lib/zhin-agent/deferred-delivery.js.map +0 -1
- package/lib/zhin-agent/event-emitter.d.ts +0 -11
- package/lib/zhin-agent/event-emitter.d.ts.map +0 -1
- package/lib/zhin-agent/event-emitter.js +0 -44
- package/lib/zhin-agent/event-emitter.js.map +0 -1
- package/lib/zhin-agent/interfaces.d.ts +0 -63
- package/lib/zhin-agent/interfaces.d.ts.map +0 -1
- package/lib/zhin-agent/interfaces.js +0 -8
- package/lib/zhin-agent/interfaces.js.map +0 -1
- package/lib/zhin-agent/model-harness.d.ts +0 -29
- package/lib/zhin-agent/model-harness.d.ts.map +0 -1
- package/lib/zhin-agent/model-harness.js +0 -67
- package/lib/zhin-agent/model-harness.js.map +0 -1
- package/lib/zhin-agent/model-resolver.d.ts.map +0 -1
- package/lib/zhin-agent/model-resolver.js +0 -27
- package/lib/zhin-agent/model-resolver.js.map +0 -1
- package/lib/zhin-agent/multimodal-message.d.ts +0 -9
- package/lib/zhin-agent/multimodal-message.d.ts.map +0 -1
- package/lib/zhin-agent/multimodal-message.js +0 -69
- package/lib/zhin-agent/multimodal-message.js.map +0 -1
- package/lib/zhin-agent/persist-deferred-context.d.ts +0 -5
- package/lib/zhin-agent/persist-deferred-context.d.ts.map +0 -1
- package/lib/zhin-agent/persist-deferred-context.js +0 -34
- package/lib/zhin-agent/persist-deferred-context.js.map +0 -1
- package/lib/zhin-agent/phase-trace.d.ts +0 -23
- package/lib/zhin-agent/phase-trace.d.ts.map +0 -1
- package/lib/zhin-agent/phase-trace.js.map +0 -1
- package/lib/zhin-agent/pre-exec.d.ts.map +0 -1
- package/lib/zhin-agent/pre-exec.js.map +0 -1
- package/lib/zhin-agent/prompt-access.d.ts.map +0 -1
- package/lib/zhin-agent/prompt-access.js.map +0 -1
- package/lib/zhin-agent/prompt-assembly.d.ts +0 -31
- package/lib/zhin-agent/prompt-assembly.d.ts.map +0 -1
- package/lib/zhin-agent/prompt-assembly.js +0 -87
- package/lib/zhin-agent/prompt-assembly.js.map +0 -1
- package/lib/zhin-agent/prompt-builder.d.ts.map +0 -1
- package/lib/zhin-agent/prompt-builder.js +0 -579
- package/lib/zhin-agent/prompt-builder.js.map +0 -1
- package/lib/zhin-agent/prompt-controller.d.ts +0 -54
- package/lib/zhin-agent/prompt-controller.d.ts.map +0 -1
- package/lib/zhin-agent/prompt-controller.js +0 -177
- package/lib/zhin-agent/prompt-controller.js.map +0 -1
- package/lib/zhin-agent/prompt-input.d.ts +0 -3
- package/lib/zhin-agent/prompt-input.d.ts.map +0 -1
- package/lib/zhin-agent/prompt-input.js.map +0 -1
- package/lib/zhin-agent/prompt-templates.d.ts +0 -162
- package/lib/zhin-agent/prompt-templates.d.ts.map +0 -1
- package/lib/zhin-agent/prompt-templates.js +0 -447
- package/lib/zhin-agent/prompt-templates.js.map +0 -1
- package/lib/zhin-agent/prompt-trace.d.ts +0 -20
- package/lib/zhin-agent/prompt-trace.d.ts.map +0 -1
- package/lib/zhin-agent/prompt-trace.js.map +0 -1
- package/lib/zhin-agent/prompt.d.ts +0 -83
- package/lib/zhin-agent/prompt.d.ts.map +0 -1
- package/lib/zhin-agent/prompt.js +0 -548
- package/lib/zhin-agent/prompt.js.map +0 -1
- package/lib/zhin-agent/session-io.d.ts +0 -37
- package/lib/zhin-agent/session-io.d.ts.map +0 -1
- package/lib/zhin-agent/session-io.js +0 -115
- package/lib/zhin-agent/session-io.js.map +0 -1
- package/lib/zhin-agent/session-message-queue.d.ts +0 -20
- package/lib/zhin-agent/session-message-queue.d.ts.map +0 -1
- package/lib/zhin-agent/session-message-queue.js.map +0 -1
- package/lib/zhin-agent/session-tree-commands.d.ts +0 -5
- package/lib/zhin-agent/session-tree-commands.d.ts.map +0 -1
- package/lib/zhin-agent/session-tree-commands.js +0 -32
- package/lib/zhin-agent/session-tree-commands.js.map +0 -1
- package/lib/zhin-agent/task-continuation.d.ts.map +0 -1
- package/lib/zhin-agent/task-continuation.js.map +0 -1
- package/lib/zhin-agent/text-sanitize.d.ts.map +0 -1
- package/lib/zhin-agent/text-sanitize.js +0 -37
- package/lib/zhin-agent/text-sanitize.js.map +0 -1
- package/lib/zhin-agent/tool-calls-user-format.d.ts.map +0 -1
- package/lib/zhin-agent/tool-calls-user-format.js +0 -138
- package/lib/zhin-agent/tool-calls-user-format.js.map +0 -1
- package/lib/zhin-agent/tool-catalog.d.ts +0 -15
- package/lib/zhin-agent/tool-catalog.d.ts.map +0 -1
- package/lib/zhin-agent/tool-catalog.js +0 -60
- package/lib/zhin-agent/tool-catalog.js.map +0 -1
- package/lib/zhin-agent/tool-orchestration.d.ts +0 -9
- package/lib/zhin-agent/tool-orchestration.d.ts.map +0 -1
- package/lib/zhin-agent/tool-orchestration.js +0 -90
- package/lib/zhin-agent/tool-orchestration.js.map +0 -1
- package/lib/zhin-agent/tool-runtime.d.ts +0 -31
- package/lib/zhin-agent/tool-runtime.d.ts.map +0 -1
- package/lib/zhin-agent/tool-runtime.js +0 -61
- package/lib/zhin-agent/tool-runtime.js.map +0 -1
- package/lib/zhin-agent/tool-search-orchestrator.d.ts +0 -26
- package/lib/zhin-agent/tool-search-orchestrator.d.ts.map +0 -1
- package/lib/zhin-agent/tool-search-orchestrator.js +0 -107
- package/lib/zhin-agent/tool-search-orchestrator.js.map +0 -1
- package/lib/zhin-agent/turn-context.d.ts +0 -9
- package/lib/zhin-agent/turn-context.d.ts.map +0 -1
- package/lib/zhin-agent/turn-context.js +0 -12
- package/lib/zhin-agent/turn-context.js.map +0 -1
- package/lib/zhin-agent/turn-metrics.d.ts +0 -20
- package/lib/zhin-agent/turn-metrics.d.ts.map +0 -1
- package/lib/zhin-agent/turn-metrics.js +0 -28
- package/lib/zhin-agent/turn-metrics.js.map +0 -1
- package/lib/zhin-agent/turn-pipeline.d.ts +0 -12
- package/lib/zhin-agent/turn-pipeline.d.ts.map +0 -1
- package/lib/zhin-agent/turn-pipeline.js +0 -326
- package/lib/zhin-agent/turn-pipeline.js.map +0 -1
- package/lib/zhin-agent/turn-tracker.d.ts.map +0 -1
- package/lib/zhin-agent/turn-tracker.js.map +0 -1
- package/lib/zhin-agent/turn-user-message.d.ts +0 -11
- package/lib/zhin-agent/turn-user-message.d.ts.map +0 -1
- package/lib/zhin-agent/turn-user-message.js +0 -49
- package/lib/zhin-agent/turn-user-message.js.map +0 -1
- package/lib/zhin-agent/web-search-locale-attach.d.ts.map +0 -1
- package/lib/zhin-agent/web-search-locale-attach.js.map +0 -1
- package/lib/zhin-agent/workspace-prompt.d.ts.map +0 -1
- package/lib/zhin-agent/workspace-prompt.js.map +0 -1
- package/lib/zhin-agent/zhin-agent-private.d.ts +0 -90
- package/lib/zhin-agent/zhin-agent-private.d.ts.map +0 -1
- package/lib/zhin-agent/zhin-agent-private.js +0 -4
- package/lib/zhin-agent/zhin-agent-private.js.map +0 -1
- /package/lib/{zhin-agent → context}/model-resolver.d.ts +0 -0
- /package/lib/{zhin-agent → core}/text-sanitize.d.ts +0 -0
- /package/lib/{zhin-agent → core}/tool-calls-user-format.d.ts +0 -0
- /package/lib/{zhin-agent → internal}/phase-trace.js +0 -0
- /package/lib/{zhin-agent → internal}/prompt-trace.js +0 -0
- /package/lib/{zhin-agent → prompt}/prompt-builder.d.ts +0 -0
- /package/lib/{zhin-agent → prompt}/workspace-prompt.d.ts +0 -0
- /package/lib/{zhin-agent → prompt}/workspace-prompt.js +0 -0
- /package/lib/{zhin-agent → tool}/pre-exec.d.ts +0 -0
- /package/lib/{zhin-agent → tool}/pre-exec.js +0 -0
- /package/lib/{zhin-agent → tool}/web-search-locale-attach.d.ts +0 -0
- /package/lib/{zhin-agent → tool}/web-search-locale-attach.js +0 -0
- /package/lib/{zhin-agent → turn}/deferred-auto-continue.js +0 -0
- /package/lib/{zhin-agent → turn}/deferred-delivery.js +0 -0
- /package/lib/{zhin-agent → turn}/prompt-access.d.ts +0 -0
- /package/lib/{zhin-agent → turn}/prompt-access.js +0 -0
- /package/lib/{zhin-agent → turn}/prompt-input.js +0 -0
- /package/lib/{zhin-agent → turn}/session-message-queue.js +0 -0
- /package/lib/{zhin-agent → turn}/task-continuation.d.ts +0 -0
- /package/lib/{zhin-agent → turn}/task-continuation.js +0 -0
- /package/lib/{zhin-agent → turn}/turn-tracker.d.ts +0 -0
- /package/lib/{zhin-agent → turn}/turn-tracker.js +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AgentStreamEventType } from '@zhin.js/ai/agent-stream';
|
|
2
|
+
/** Legacy `type:action` hook keys → Eve-aligned stream event names. */
|
|
3
|
+
export const LEGACY_HOOK_STREAM_ALIASES = {
|
|
4
|
+
'message:received': AgentStreamEventType.MESSAGE_RECEIVED,
|
|
5
|
+
'message:sent': AgentStreamEventType.MESSAGE_COMPLETED,
|
|
6
|
+
'session:new': AgentStreamEventType.SESSION_STARTED,
|
|
7
|
+
'tool:call': AgentStreamEventType.ACTIONS_REQUESTED,
|
|
8
|
+
'tool:result': AgentStreamEventType.ACTION_RESULT,
|
|
9
|
+
};
|
|
10
|
+
export function isAgentStreamHookEventName(event) {
|
|
11
|
+
return Object.values(AgentStreamEventType).includes(event);
|
|
12
|
+
}
|
|
13
|
+
export function agentStreamEventToAIHookEvent(streamEvent, sessionId) {
|
|
14
|
+
const [type, action] = streamEvent.type.split('.', 2);
|
|
15
|
+
const resolvedSessionId = typeof streamEvent.data?.sessionId === 'string' ? streamEvent.data.sessionId : sessionId;
|
|
16
|
+
return {
|
|
17
|
+
type: type,
|
|
18
|
+
action: action ?? streamEvent.type,
|
|
19
|
+
sessionId: resolvedSessionId,
|
|
20
|
+
context: {
|
|
21
|
+
...(streamEvent.data ?? {}),
|
|
22
|
+
streamType: streamEvent.type,
|
|
23
|
+
},
|
|
24
|
+
timestamp: new Date(streamEvent.timestamp ?? Date.now()),
|
|
25
|
+
messages: [],
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=agent-stream-hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-stream-hooks.js","sourceRoot":"","sources":["../../src/event/agent-stream-hooks.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAwD,MAAM,0BAA0B,CAAC;AAEtH,uEAAuE;AACvE,MAAM,CAAC,MAAM,0BAA0B,GAAuD;IAC5F,kBAAkB,EAAE,oBAAoB,CAAC,gBAAgB;IACzD,cAAc,EAAE,oBAAoB,CAAC,iBAAiB;IACtD,aAAa,EAAE,oBAAoB,CAAC,eAAe;IACnD,WAAW,EAAE,oBAAoB,CAAC,iBAAiB;IACnD,aAAa,EAAE,oBAAoB,CAAC,aAAa;CAClD,CAAC;AAEF,MAAM,UAAU,0BAA0B,CAAC,KAAa;IACtD,OAAQ,MAAM,CAAC,MAAM,CAAC,oBAAoB,CAAc,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,WAA6B,EAC7B,SAAkB;IAElB,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IACtD,MAAM,iBAAiB,GACrB,OAAO,WAAW,CAAC,IAAI,EAAE,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3F,OAAO;QACL,IAAI,EAAE,IAAuB;QAC7B,MAAM,EAAE,MAAM,IAAI,WAAW,CAAC,IAAI;QAClC,SAAS,EAAE,iBAAiB;QAC5B,OAAO,EAAE;YACP,GAAG,CAAC,WAAW,CAAC,IAAI,IAAI,EAAE,CAAC;YAC3B,UAAU,EAAE,WAAW,CAAC,IAAI;SAC7B;QACD,SAAS,EAAE,IAAI,IAAI,CAAC,WAAW,CAAC,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACxD,QAAQ,EAAE,EAAE;KACb,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event System — 模块契约(与实现同步)。
|
|
3
|
+
*
|
|
4
|
+
* 实现:`EventSystem.on` / `emit` + `LoggingMiddleware` + `FilteringMiddleware`。
|
|
5
|
+
*
|
|
6
|
+
* 分工:与 `ZhinAgentEventEmitter`、Kernel RunEvent、plugin `before.*` 分离,见 CONTEXT.md。
|
|
7
|
+
*/
|
|
8
|
+
export interface EventSystemAgentEvent {
|
|
9
|
+
type: string;
|
|
10
|
+
payload: unknown;
|
|
11
|
+
timestamp: number;
|
|
12
|
+
source?: string;
|
|
13
|
+
}
|
|
14
|
+
export type EventHandler = (event: EventSystemAgentEvent) => void | Promise<void>;
|
|
15
|
+
export interface EventMiddleware {
|
|
16
|
+
name: string;
|
|
17
|
+
process(event: EventSystemAgentEvent): Promise<EventSystemAgentEvent | null>;
|
|
18
|
+
}
|
|
19
|
+
export interface EventSystemConfig {
|
|
20
|
+
source?: string;
|
|
21
|
+
/** 非空时仅放行列出的 event.type */
|
|
22
|
+
allowedEventTypes?: string[];
|
|
23
|
+
/** 丢弃列出的 event.type(优先于 allow) */
|
|
24
|
+
deniedEventTypes?: string[];
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=contracts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/event/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAElF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC,CAAC;CAC9E;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2BAA2B;IAC3B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,kCAAkC;IAClC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event System — 模块契约(与实现同步)。
|
|
3
|
+
*
|
|
4
|
+
* 实现:`EventSystem.on` / `emit` + `LoggingMiddleware` + `FilteringMiddleware`。
|
|
5
|
+
*
|
|
6
|
+
* 分工:与 `ZhinAgentEventEmitter`、Kernel RunEvent、plugin `before.*` 分离,见 CONTEXT.md。
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=contracts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/event/contracts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Message, Plugin } from '@zhin.js/core';
|
|
2
|
+
import { EventSystem } from './event-system.js';
|
|
3
|
+
import type { EventHandler } from './contracts.js';
|
|
4
|
+
export declare class ZhinAgentEventEmitter {
|
|
5
|
+
private hostPlugin;
|
|
6
|
+
private readonly eventSystem;
|
|
7
|
+
constructor(hostPlugin?: Plugin | null);
|
|
8
|
+
/** Agent turn 域事件订阅(EventSystem);plugin lifecycle 仍走 dispatch/emit。 */
|
|
9
|
+
on(eventType: string, handler: EventHandler): () => void;
|
|
10
|
+
getEventSystem(): EventSystem;
|
|
11
|
+
setHostPlugin(plugin: Plugin): void;
|
|
12
|
+
getHostPlugin(): Plugin | null;
|
|
13
|
+
createPayload(sessionId: string, commMessage: Message, mode: Plugin.AIEventPayload['mode'], extra?: Partial<Plugin.AIEventPayload>): Plugin.AIEventPayload;
|
|
14
|
+
dispatch(name: keyof Plugin.Lifecycle, payload: Plugin.AIEventPayload): Promise<void>;
|
|
15
|
+
emit(name: keyof Plugin.Lifecycle, payload: Plugin.AIEventPayload): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=event-emitter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-emitter.d.ts","sourceRoot":"","sources":["../../src/event/event-emitter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKnD,qBAAa,qBAAqB;IAGpB,OAAO,CAAC,UAAU;IAF9B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;gBAEtB,UAAU,GAAE,MAAM,GAAG,IAAW;IAIpD,uEAAuE;IACvE,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,MAAM,IAAI;IAIxD,cAAc,IAAI,WAAW;IAI7B,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAInC,aAAa,IAAI,MAAM,GAAG,IAAI;IAI9B,aAAa,CACX,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,EACpB,IAAI,EAAE,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,EACnC,KAAK,GAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAM,GACzC,MAAM,CAAC,cAAc;IA2BlB,QAAQ,CACZ,IAAI,EAAE,MAAM,MAAM,CAAC,SAAS,EAC5B,OAAO,EAAE,MAAM,CAAC,cAAc,GAC7B,OAAO,CAAC,IAAI,CAAC;IAMhB,IAAI,CAAC,IAAI,EAAE,MAAM,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,cAAc,GAAG,IAAI;CASzE"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Logger, formatCompact } from '@zhin.js/logger';
|
|
2
|
+
import { EventSystem } from './event-system.js';
|
|
3
|
+
import { getScheduleTurnContext, getActivityFeedbackEligible } from '../internal/turn-context.js';
|
|
4
|
+
const logger = new Logger(null, 'ZhinAgent');
|
|
5
|
+
export class ZhinAgentEventEmitter {
|
|
6
|
+
hostPlugin;
|
|
7
|
+
eventSystem;
|
|
8
|
+
constructor(hostPlugin = null) {
|
|
9
|
+
this.hostPlugin = hostPlugin;
|
|
10
|
+
this.eventSystem = new EventSystem({ source: 'zhin-agent' });
|
|
11
|
+
}
|
|
12
|
+
/** Agent turn 域事件订阅(EventSystem);plugin lifecycle 仍走 dispatch/emit。 */
|
|
13
|
+
on(eventType, handler) {
|
|
14
|
+
return this.eventSystem.on(eventType, handler);
|
|
15
|
+
}
|
|
16
|
+
getEventSystem() {
|
|
17
|
+
return this.eventSystem;
|
|
18
|
+
}
|
|
19
|
+
setHostPlugin(plugin) {
|
|
20
|
+
this.hostPlugin = plugin.root ?? plugin;
|
|
21
|
+
}
|
|
22
|
+
getHostPlugin() {
|
|
23
|
+
return this.hostPlugin;
|
|
24
|
+
}
|
|
25
|
+
createPayload(sessionId, commMessage, mode, extra = {}) {
|
|
26
|
+
const { source = 'zhin-agent', hookContext: extraHookContext, ...rest } = extra;
|
|
27
|
+
const scheduleCtx = getScheduleTurnContext();
|
|
28
|
+
const hookContext = {
|
|
29
|
+
...(extraHookContext && typeof extraHookContext === 'object' ? extraHookContext : {}),
|
|
30
|
+
};
|
|
31
|
+
if (scheduleCtx?.createdBy)
|
|
32
|
+
hookContext.scheduleCreatedBy = scheduleCtx.createdBy;
|
|
33
|
+
if (scheduleCtx?.jobId)
|
|
34
|
+
hookContext.scheduleJobId = scheduleCtx.jobId;
|
|
35
|
+
if (scheduleCtx?.preview === true)
|
|
36
|
+
hookContext.schedulePreview = true;
|
|
37
|
+
if (scheduleCtx?.activityFeedback === true)
|
|
38
|
+
hookContext.scheduleActivityFeedback = true;
|
|
39
|
+
if (scheduleCtx?.executionPlan)
|
|
40
|
+
hookContext.scheduleExecutionPlan = scheduleCtx.executionPlan;
|
|
41
|
+
if (getActivityFeedbackEligible())
|
|
42
|
+
hookContext.activityFeedbackEligible = true;
|
|
43
|
+
return {
|
|
44
|
+
sessionId,
|
|
45
|
+
source,
|
|
46
|
+
mode,
|
|
47
|
+
userId: commMessage.$sender.id,
|
|
48
|
+
platform: String(commMessage.$adapter),
|
|
49
|
+
endpointId: commMessage.$endpoint,
|
|
50
|
+
sceneId: commMessage.$channel?.id ?? commMessage.$sender.id,
|
|
51
|
+
messageId: commMessage.$id,
|
|
52
|
+
scope: commMessage.$channel?.type ?? 'private',
|
|
53
|
+
...(Object.keys(hookContext).length > 0 ? { hookContext } : {}),
|
|
54
|
+
...rest,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
async dispatch(name, payload) {
|
|
58
|
+
const root = this.hostPlugin?.root ?? this.hostPlugin;
|
|
59
|
+
if (!root)
|
|
60
|
+
return;
|
|
61
|
+
await root.dispatch(name, payload);
|
|
62
|
+
}
|
|
63
|
+
emit(name, payload) {
|
|
64
|
+
this.eventSystem.emitFireAndForget(String(name), payload);
|
|
65
|
+
this.dispatch(name, payload).catch((error) => {
|
|
66
|
+
logger.warn(formatCompact({
|
|
67
|
+
ai_event: String(name),
|
|
68
|
+
error: error instanceof Error ? error.message : String(error),
|
|
69
|
+
}));
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=event-emitter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-emitter.js","sourceRoot":"","sources":["../../src/event/event-emitter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAElG,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;AAE7C,MAAM,OAAO,qBAAqB;IAGZ;IAFH,WAAW,CAAc;IAE1C,YAAoB,aAA4B,IAAI;QAAhC,eAAU,GAAV,UAAU,CAAsB;QAClD,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,CAAC;IAC/D,CAAC;IAED,uEAAuE;IACvE,EAAE,CAAC,SAAiB,EAAE,OAAqB;QACzC,OAAO,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,aAAa,CAAC,MAAc;QAC1B,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC;IAC1C,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,aAAa,CACX,SAAiB,EACjB,WAAoB,EACpB,IAAmC,EACnC,QAAwC,EAAE;QAE1C,MAAM,EAAE,MAAM,GAAG,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;QAChF,MAAM,WAAW,GAAG,sBAAsB,EAAE,CAAC;QAC7C,MAAM,WAAW,GAA4B;YAC3C,GAAG,CAAC,gBAAgB,IAAI,OAAO,gBAAgB,KAAK,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;SACtF,CAAC;QACF,IAAI,WAAW,EAAE,SAAS;YAAE,WAAW,CAAC,iBAAiB,GAAG,WAAW,CAAC,SAAS,CAAC;QAClF,IAAI,WAAW,EAAE,KAAK;YAAE,WAAW,CAAC,aAAa,GAAG,WAAW,CAAC,KAAK,CAAC;QACtE,IAAI,WAAW,EAAE,OAAO,KAAK,IAAI;YAAE,WAAW,CAAC,eAAe,GAAG,IAAI,CAAC;QACtE,IAAI,WAAW,EAAE,gBAAgB,KAAK,IAAI;YAAE,WAAW,CAAC,wBAAwB,GAAG,IAAI,CAAC;QACxF,IAAI,WAAW,EAAE,aAAa;YAAE,WAAW,CAAC,qBAAqB,GAAG,WAAW,CAAC,aAAa,CAAC;QAC9F,IAAI,2BAA2B,EAAE;YAAE,WAAW,CAAC,wBAAwB,GAAG,IAAI,CAAC;QAC/E,OAAO;YACL,SAAS;YACT,MAAM;YACN,IAAI;YACJ,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE;YAC9B,QAAQ,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC;YACtC,UAAU,EAAE,WAAW,CAAC,SAAS;YACjC,OAAO,EAAE,WAAW,CAAC,QAAQ,EAAE,EAAE,IAAI,WAAW,CAAC,OAAO,CAAC,EAAE;YAC3D,SAAS,EAAE,WAAW,CAAC,GAAG;YAC1B,KAAK,EAAE,WAAW,CAAC,QAAQ,EAAE,IAAI,IAAI,SAAS;YAC9C,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC/D,GAAG,IAAI;SACR,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ,CACZ,IAA4B,EAC5B,OAA8B;QAE9B,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC;QACtD,IAAI,CAAC,IAAI;YAAE,OAAO;QAClB,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAW,EAAE,OAAO,CAAC,CAAC;IAC5C,CAAC;IAED,IAAI,CAAC,IAA4B,EAAE,OAA8B;QAC/D,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,CAAC;QAC1D,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;YAC3C,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;gBACxB,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;gBACtB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;aAC9D,CAAC,CAAC,CAAC;QACN,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EventHandler, EventMiddleware, EventSystemConfig } from './contracts.js';
|
|
2
|
+
export declare class EventSystem {
|
|
3
|
+
private readonly config;
|
|
4
|
+
private readonly listeners;
|
|
5
|
+
private readonly middleware;
|
|
6
|
+
constructor(config?: EventSystemConfig);
|
|
7
|
+
on(eventType: string, handler: EventHandler): () => void;
|
|
8
|
+
addMiddleware(middleware: EventMiddleware): void;
|
|
9
|
+
emit(eventType: string, payload: unknown): Promise<void>;
|
|
10
|
+
emitFireAndForget(eventType: string, payload: unknown): void;
|
|
11
|
+
}
|
|
12
|
+
export declare function createEventSystem(config?: EventSystemConfig): EventSystem;
|
|
13
|
+
//# sourceMappingURL=event-system.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-system.d.ts","sourceRoot":"","sources":["../../src/event/event-system.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EAEf,iBAAiB,EAClB,MAAM,gBAAgB,CAAC;AAMxB,qBAAa,WAAW;IAIV,OAAO,CAAC,QAAQ,CAAC,MAAM;IAHnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwC;IAClE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAyB;gBAEvB,MAAM,GAAE,iBAAsB;IAE3D,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,MAAM,IAAI;IAQxD,aAAa,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI;IAI1C,IAAI,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAkB9D,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI;CAQ7D;AAED,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,iBAA4C,GAAG,WAAW,CAQnG"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { formatCompact, Logger } from '@zhin.js/logger';
|
|
2
|
+
import { LoggingMiddleware } from './logging-middleware.js';
|
|
3
|
+
import { FilteringMiddleware } from './filtering-middleware.js';
|
|
4
|
+
const logger = new Logger(null, 'EventSystem');
|
|
5
|
+
export class EventSystem {
|
|
6
|
+
config;
|
|
7
|
+
listeners = new Map();
|
|
8
|
+
middleware = [];
|
|
9
|
+
constructor(config = {}) {
|
|
10
|
+
this.config = config;
|
|
11
|
+
}
|
|
12
|
+
on(eventType, handler) {
|
|
13
|
+
if (!this.listeners.has(eventType)) {
|
|
14
|
+
this.listeners.set(eventType, new Set());
|
|
15
|
+
}
|
|
16
|
+
this.listeners.get(eventType).add(handler);
|
|
17
|
+
return () => this.listeners.get(eventType)?.delete(handler);
|
|
18
|
+
}
|
|
19
|
+
addMiddleware(middleware) {
|
|
20
|
+
this.middleware.push(middleware);
|
|
21
|
+
}
|
|
22
|
+
async emit(eventType, payload) {
|
|
23
|
+
const event = {
|
|
24
|
+
type: eventType,
|
|
25
|
+
payload,
|
|
26
|
+
timestamp: Date.now(),
|
|
27
|
+
source: this.config.source,
|
|
28
|
+
};
|
|
29
|
+
let processedEvent = event;
|
|
30
|
+
for (const mw of this.middleware) {
|
|
31
|
+
processedEvent = await mw.process(processedEvent);
|
|
32
|
+
if (!processedEvent)
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const listeners = this.listeners.get(eventType) ?? new Set();
|
|
36
|
+
await Promise.all(Array.from(listeners).map((h) => h(processedEvent)));
|
|
37
|
+
}
|
|
38
|
+
emitFireAndForget(eventType, payload) {
|
|
39
|
+
this.emit(eventType, payload).catch((error) => {
|
|
40
|
+
logger.warn(formatCompact({
|
|
41
|
+
event: eventType,
|
|
42
|
+
error: error instanceof Error ? error.message : String(error),
|
|
43
|
+
}));
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export function createEventSystem(config = { source: 'zhin-agent' }) {
|
|
48
|
+
const system = new EventSystem(config);
|
|
49
|
+
system.addMiddleware(new LoggingMiddleware());
|
|
50
|
+
system.addMiddleware(new FilteringMiddleware({
|
|
51
|
+
allowedEventTypes: config.allowedEventTypes,
|
|
52
|
+
deniedEventTypes: config.deniedEventTypes,
|
|
53
|
+
}));
|
|
54
|
+
return system;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=event-system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"event-system.js","sourceRoot":"","sources":["../../src/event/event-system.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAOxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;AAE/C,MAAM,OAAO,WAAW;IAIO;IAHZ,SAAS,GAAG,IAAI,GAAG,EAA6B,CAAC;IACjD,UAAU,GAAsB,EAAE,CAAC;IAEpD,YAA6B,SAA4B,EAAE;QAA9B,WAAM,GAAN,MAAM,CAAwB;IAAG,CAAC;IAE/D,EAAE,CAAC,SAAiB,EAAE,OAAqB;QACzC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YACnC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;QAC3C,CAAC;QACD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC5C,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9D,CAAC;IAED,aAAa,CAAC,UAA2B;QACvC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACnC,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,SAAiB,EAAE,OAAgB;QAC5C,MAAM,KAAK,GAA0B;YACnC,IAAI,EAAE,SAAS;YACf,OAAO;YACP,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;SAC3B,CAAC;QAEF,IAAI,cAAc,GAAiC,KAAK,CAAC;QACzD,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACjC,cAAc,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;YAClD,IAAI,CAAC,cAAc;gBAAE,OAAO;QAC9B,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,IAAI,GAAG,EAAE,CAAC;QAC7D,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAe,CAAC,CAAC,CAAC,CAAC;IAC1E,CAAC;IAED,iBAAiB,CAAC,SAAiB,EAAE,OAAgB;QACnD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;YAC5C,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;gBACxB,KAAK,EAAE,SAAS;gBAChB,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;aAC9D,CAAC,CAAC,CAAC;QACN,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,UAAU,iBAAiB,CAAC,SAA4B,EAAE,MAAM,EAAE,YAAY,EAAE;IACpF,MAAM,MAAM,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,CAAC,aAAa,CAAC,IAAI,iBAAiB,EAAE,CAAC,CAAC;IAC9C,MAAM,CAAC,aAAa,CAAC,IAAI,mBAAmB,CAAC;QAC3C,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;QAC3C,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;KAC1C,CAAC,CAAC,CAAC;IACJ,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EventMiddleware, EventSystemAgentEvent } from './contracts.js';
|
|
2
|
+
export interface FilteringMiddlewareOptions {
|
|
3
|
+
allowedEventTypes?: string[];
|
|
4
|
+
deniedEventTypes?: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare class FilteringMiddleware implements EventMiddleware {
|
|
7
|
+
name: string;
|
|
8
|
+
private readonly allowed;
|
|
9
|
+
private readonly denied;
|
|
10
|
+
constructor(options?: FilteringMiddlewareOptions);
|
|
11
|
+
process(event: EventSystemAgentEvent): Promise<EventSystemAgentEvent | null>;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=filtering-middleware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filtering-middleware.d.ts","sourceRoot":"","sources":["../../src/event/filtering-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE7E,MAAM,WAAW,0BAA0B;IACzC,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,qBAAa,mBAAoB,YAAW,eAAe;IACzD,IAAI,SAAe;IAEnB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;gBAEzB,OAAO,GAAE,0BAA+B;IAO9C,OAAO,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC;CAKnF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export class FilteringMiddleware {
|
|
2
|
+
name = 'filtering';
|
|
3
|
+
allowed;
|
|
4
|
+
denied;
|
|
5
|
+
constructor(options = {}) {
|
|
6
|
+
this.allowed = options.allowedEventTypes?.length
|
|
7
|
+
? new Set(options.allowedEventTypes)
|
|
8
|
+
: null;
|
|
9
|
+
this.denied = new Set(options.deniedEventTypes ?? []);
|
|
10
|
+
}
|
|
11
|
+
async process(event) {
|
|
12
|
+
if (this.denied.has(event.type))
|
|
13
|
+
return null;
|
|
14
|
+
if (this.allowed && !this.allowed.has(event.type))
|
|
15
|
+
return null;
|
|
16
|
+
return event;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=filtering-middleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filtering-middleware.js","sourceRoot":"","sources":["../../src/event/filtering-middleware.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,mBAAmB;IAC9B,IAAI,GAAG,WAAW,CAAC;IAEF,OAAO,CAAqB;IAC5B,MAAM,CAAc;IAErC,YAAY,UAAsC,EAAE;QAClD,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,iBAAiB,EAAE,MAAM;YAC9C,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,iBAAiB,CAAC;YACpC,CAAC,CAAC,IAAI,CAAC;QACT,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,gBAAgB,IAAI,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,KAA4B;QACxC,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QAC7C,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC;YAAE,OAAO,IAAI,CAAC;QAC/D,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HookRegistry adapter — AgentStreamBus sink (ADR 0041).
|
|
3
|
+
*/
|
|
4
|
+
import type { AgentStreamSink } from './agent-stream-bus.js';
|
|
5
|
+
import type { HookRegistry } from '../orchestrator/hook-registry.js';
|
|
6
|
+
export declare function createHookStreamSink(hooks: HookRegistry): AgentStreamSink;
|
|
7
|
+
//# sourceMappingURL=hook-stream-sink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook-stream-sink.d.ts","sourceRoot":"","sources":["../../src/event/hook-stream-sink.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAErE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,YAAY,GAAG,eAAe,CAOzE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hook-stream-sink.js","sourceRoot":"","sources":["../../src/event/hook-stream-sink.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,oBAAoB,CAAC,KAAmB;IACtD,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG;YACrB,MAAM,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QACjG,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event System — Agent turn 域事件 + ZhinAgentEventEmitter 适配。
|
|
3
|
+
*/
|
|
4
|
+
export type { EventSystemAgentEvent, EventHandler, EventMiddleware, EventSystemConfig, } from './contracts.js';
|
|
5
|
+
export { EventSystem, createEventSystem } from './event-system.js';
|
|
6
|
+
export { FilteringMiddleware } from './filtering-middleware.js';
|
|
7
|
+
export type { FilteringMiddlewareOptions } from './filtering-middleware.js';
|
|
8
|
+
export { ZhinAgentEventEmitter } from './event-emitter.js';
|
|
9
|
+
export { emitSessionNewEvent, emitSessionCompactEvent } from './session-events.js';
|
|
10
|
+
export type { TurnEvent, TurnUsage, TurnStartEvent, ChunkEvent, ToolCallEvent, ToolResultEvent, ThinkingEvent, TurnEndEvent, TurnErrorEvent, SubagentStartEvent, SubagentProgressEvent, SubagentEndEvent, McpConnectEvent, McpToolCallEvent, } from './turn-event.js';
|
|
11
|
+
export { mapTurnEventToAgentStreamEvents, } from './turn-to-agent-stream.js';
|
|
12
|
+
export type { TurnToStreamContext } from './turn-to-agent-stream.js';
|
|
13
|
+
export { createAgentStreamBus, DefaultAgentStreamBus, } from './agent-stream-bus.js';
|
|
14
|
+
export type { AgentStreamBus, AgentStreamSink, AgentStreamPublishContext, } from './agent-stream-bus.js';
|
|
15
|
+
export { createHookStreamSink } from './hook-stream-sink.js';
|
|
16
|
+
export { publishAgentStream, publishTurnStreamEvents } from './publish-agent-stream.js';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/event/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,YAAY,EACV,qBAAqB,EACrB,YAAY,EACZ,eAAe,EACf,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,YAAY,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnF,YAAY,EACV,SAAS,EACT,SAAS,EACT,cAAc,EACd,UAAU,EACV,aAAa,EACb,eAAe,EACf,aAAa,EACb,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,+BAA+B,GAChC,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE,OAAO,EACL,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,cAAc,EACd,eAAe,EACf,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event System — Agent turn 域事件 + ZhinAgentEventEmitter 适配。
|
|
3
|
+
*/
|
|
4
|
+
export { EventSystem, createEventSystem } from './event-system.js';
|
|
5
|
+
export { FilteringMiddleware } from './filtering-middleware.js';
|
|
6
|
+
export { ZhinAgentEventEmitter } from './event-emitter.js';
|
|
7
|
+
export { emitSessionNewEvent, emitSessionCompactEvent } from './session-events.js';
|
|
8
|
+
export { mapTurnEventToAgentStreamEvents, } from './turn-to-agent-stream.js';
|
|
9
|
+
export { createAgentStreamBus, DefaultAgentStreamBus, } from './agent-stream-bus.js';
|
|
10
|
+
export { createHookStreamSink } from './hook-stream-sink.js';
|
|
11
|
+
export { publishAgentStream, publishTurnStreamEvents } from './publish-agent-stream.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/event/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAmBnF,OAAO,EACL,+BAA+B,GAChC,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,uBAAuB,CAAC;AAM/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { EventMiddleware, EventSystemAgentEvent } from './contracts.js';
|
|
2
|
+
export declare class LoggingMiddleware implements EventMiddleware {
|
|
3
|
+
name: string;
|
|
4
|
+
process(event: EventSystemAgentEvent): Promise<EventSystemAgentEvent>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=logging-middleware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logging-middleware.d.ts","sourceRoot":"","sources":["../../src/event/logging-middleware.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAI7E,qBAAa,iBAAkB,YAAW,eAAe;IACvD,IAAI,SAAa;IAEX,OAAO,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,qBAAqB,CAAC;CAS5E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { formatCompact, Logger } from '@zhin.js/logger';
|
|
2
|
+
const logger = new Logger(null, 'EventSystem:Logging');
|
|
3
|
+
export class LoggingMiddleware {
|
|
4
|
+
name = 'logging';
|
|
5
|
+
async process(event) {
|
|
6
|
+
if (process.env.NODE_ENV === 'test')
|
|
7
|
+
return event;
|
|
8
|
+
logger.debug(formatCompact({
|
|
9
|
+
event: event.type,
|
|
10
|
+
source: event.source,
|
|
11
|
+
ts: event.timestamp,
|
|
12
|
+
}));
|
|
13
|
+
return event;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=logging-middleware.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logging-middleware.js","sourceRoot":"","sources":["../../src/event/logging-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAGxD,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;AAEvD,MAAM,OAAO,iBAAiB;IAC5B,IAAI,GAAG,SAAS,CAAC;IAEjB,KAAK,CAAC,OAAO,CAAC,KAA4B;QACxC,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,MAAM;YAAE,OAAO,KAAK,CAAC;QAClD,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC;YACzB,KAAK,EAAE,KAAK,CAAC,IAAI;YACjB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,EAAE,EAAE,KAAK,CAAC,SAAS;SACpB,CAAC,CAAC,CAAC;QACJ,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Publish AgentStreamEvent via per-orchestrator bus.
|
|
3
|
+
*/
|
|
4
|
+
import type { AgentStreamEvent } from '@zhin.js/ai/agent-stream';
|
|
5
|
+
import type { ZhinAgentPrivate } from '../internal/agent-host.js';
|
|
6
|
+
import type { AgentStreamPublishContext } from './agent-stream-bus.js';
|
|
7
|
+
import { type TurnToStreamContext } from './turn-to-agent-stream.js';
|
|
8
|
+
import type { TurnEvent } from './turn-event.js';
|
|
9
|
+
export declare function publishAgentStream(host: Pick<ZhinAgentPrivate, 'orchestrator'>, event: AgentStreamEvent, ctx?: AgentStreamPublishContext): void;
|
|
10
|
+
export declare function publishTurnStreamEvents(host: Pick<ZhinAgentPrivate, 'orchestrator'>, turnEvent: TurnEvent, ctx: TurnToStreamContext & AgentStreamPublishContext): void;
|
|
11
|
+
//# sourceMappingURL=publish-agent-stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-agent-stream.d.ts","sourceRoot":"","sources":["../../src/event/publish-agent-stream.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAmC,KAAK,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACtG,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC,EAC5C,KAAK,EAAE,gBAAgB,EACvB,GAAG,GAAE,yBAA8B,GAClC,IAAI,CAIN;AAED,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,IAAI,CAAC,gBAAgB,EAAE,cAAc,CAAC,EAC5C,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,mBAAmB,GAAG,yBAAyB,GACnD,IAAI,CAKN"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { mapTurnEventToAgentStreamEvents } from './turn-to-agent-stream.js';
|
|
2
|
+
export function publishAgentStream(host, event, ctx = {}) {
|
|
3
|
+
const bus = host.orchestrator?.agentStreamBus;
|
|
4
|
+
if (!bus)
|
|
5
|
+
return;
|
|
6
|
+
void bus.publish(event, ctx);
|
|
7
|
+
}
|
|
8
|
+
export function publishTurnStreamEvents(host, turnEvent, ctx) {
|
|
9
|
+
const { sessionId, turnId, httpSessionId, agentId } = ctx;
|
|
10
|
+
for (const streamEvent of mapTurnEventToAgentStreamEvents(turnEvent, { sessionId, turnId })) {
|
|
11
|
+
publishAgentStream(host, streamEvent, { sessionId, turnId, httpSessionId, agentId });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=publish-agent-stream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-agent-stream.js","sourceRoot":"","sources":["../../src/event/publish-agent-stream.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,+BAA+B,EAA4B,MAAM,2BAA2B,CAAC;AAGtG,MAAM,UAAU,kBAAkB,CAChC,IAA4C,EAC5C,KAAuB,EACvB,MAAiC,EAAE;IAEnC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,EAAE,cAAc,CAAC;IAC9C,IAAI,CAAC,GAAG;QAAE,OAAO;IACjB,KAAK,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,IAA4C,EAC5C,SAAoB,EACpB,GAAoD;IAEpD,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,GAAG,GAAG,CAAC;IAC1D,KAAK,MAAM,WAAW,IAAI,+BAA+B,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;QAC5F,kBAAkB,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Message } from '../orchestrator/types.js';
|
|
2
|
+
import type { ZhinAgentEventEmitter } from '../event/event-emitter.js';
|
|
3
|
+
export declare function emitSessionNewEvent(emitter: ZhinAgentEventEmitter, sessionId: string, commMessage: Message, mode: 'text' | 'multimodal', content: string, reply: string): void;
|
|
4
|
+
export declare function emitSessionCompactEvent(emitter: ZhinAgentEventEmitter, sessionId: string, commMessage: Message, mode: 'text' | 'multimodal', info: {
|
|
5
|
+
microSavedTokens: number;
|
|
6
|
+
autoSavedTokens: number;
|
|
7
|
+
totalTokensBefore: number;
|
|
8
|
+
totalTokensAfter: number;
|
|
9
|
+
}): void;
|
|
10
|
+
//# sourceMappingURL=session-events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-events.d.ts","sourceRoot":"","sources":["../../src/event/session-events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAEvE,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,qBAAqB,EAC9B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,EACpB,IAAI,EAAE,MAAM,GAAG,YAAY,EAC3B,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,GACZ,IAAI,CAMN;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,qBAAqB,EAC9B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,OAAO,EACpB,IAAI,EAAE,MAAM,GAAG,YAAY,EAC3B,IAAI,EAAE;IACJ,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;CAC1B,GACA,IAAI,CASN"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function emitSessionNewEvent(emitter, sessionId, commMessage, mode, content, reply) {
|
|
2
|
+
emitter.emit('ai.session.new', emitter.createPayload(sessionId, commMessage, mode, {
|
|
3
|
+
reason: 'first_message',
|
|
4
|
+
content,
|
|
5
|
+
reply,
|
|
6
|
+
}));
|
|
7
|
+
}
|
|
8
|
+
export function emitSessionCompactEvent(emitter, sessionId, commMessage, mode, info) {
|
|
9
|
+
emitter.emit('ai.session.compact', emitter.createPayload(sessionId, commMessage, mode, {
|
|
10
|
+
path: 'agent',
|
|
11
|
+
compactedCount: 1,
|
|
12
|
+
savedTokens: info.microSavedTokens + info.autoSavedTokens,
|
|
13
|
+
totalTokensBefore: info.totalTokensBefore,
|
|
14
|
+
totalTokensAfter: info.totalTokensAfter,
|
|
15
|
+
result: info,
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=session-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-events.js","sourceRoot":"","sources":["../../src/event/session-events.ts"],"names":[],"mappings":"AAGA,MAAM,UAAU,mBAAmB,CACjC,OAA8B,EAC9B,SAAiB,EACjB,WAAoB,EACpB,IAA2B,EAC3B,OAAe,EACf,KAAa;IAEb,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,OAAO,CAAC,aAAa,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE;QACjF,MAAM,EAAE,eAAe;QACvB,OAAO;QACP,KAAK;KACN,CAAC,CAAC,CAAC;AACN,CAAC;AAED,MAAM,UAAU,uBAAuB,CACrC,OAA8B,EAC9B,SAAiB,EACjB,WAAoB,EACpB,IAA2B,EAC3B,IAKC;IAED,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,OAAO,CAAC,aAAa,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE;QACrF,IAAI,EAAE,OAAO;QACb,cAAc,EAAE,CAAC;QACjB,WAAW,EAAE,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,eAAe;QACzD,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;QACzC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;QACvC,MAAM,EAAE,IAAI;KACb,CAAC,CAAC,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TurnEvent — structured event union for the AsyncGenerator streaming API.
|
|
3
|
+
*
|
|
4
|
+
* Consumed by processMessageStream() callers; produced by the turn pipeline.
|
|
5
|
+
*/
|
|
6
|
+
import type { OutputElement } from '@zhin.js/ai';
|
|
7
|
+
export interface TurnUsage {
|
|
8
|
+
promptTokens: number;
|
|
9
|
+
completionTokens: number;
|
|
10
|
+
totalTokens: number;
|
|
11
|
+
}
|
|
12
|
+
export type TurnEvent = TurnStartEvent | ChunkEvent | ToolCallEvent | ToolResultEvent | ThinkingEvent | TurnEndEvent | TurnErrorEvent | SubagentStartEvent | SubagentProgressEvent | SubagentEndEvent | McpConnectEvent | McpToolCallEvent;
|
|
13
|
+
export interface TurnStartEvent {
|
|
14
|
+
type: 'turn_start';
|
|
15
|
+
sessionId: string;
|
|
16
|
+
turnId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ChunkEvent {
|
|
19
|
+
type: 'chunk';
|
|
20
|
+
text: string;
|
|
21
|
+
accumulated: string;
|
|
22
|
+
}
|
|
23
|
+
export interface ToolCallEvent {
|
|
24
|
+
type: 'tool_call';
|
|
25
|
+
toolName: string;
|
|
26
|
+
args: Record<string, unknown>;
|
|
27
|
+
toolUseId: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ToolResultEvent {
|
|
30
|
+
type: 'tool_result';
|
|
31
|
+
toolName: string;
|
|
32
|
+
output: unknown;
|
|
33
|
+
durationMs: number;
|
|
34
|
+
toolUseId: string;
|
|
35
|
+
}
|
|
36
|
+
export interface ThinkingEvent {
|
|
37
|
+
type: 'thinking';
|
|
38
|
+
text: string;
|
|
39
|
+
}
|
|
40
|
+
export interface TurnEndEvent {
|
|
41
|
+
type: 'turn_end';
|
|
42
|
+
output: OutputElement[];
|
|
43
|
+
usage: TurnUsage;
|
|
44
|
+
}
|
|
45
|
+
export interface TurnErrorEvent {
|
|
46
|
+
type: 'error';
|
|
47
|
+
error: Error;
|
|
48
|
+
recoverable: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface SubagentStartEvent {
|
|
51
|
+
type: 'subagent_start';
|
|
52
|
+
taskId: string;
|
|
53
|
+
agentName?: string;
|
|
54
|
+
description: string;
|
|
55
|
+
}
|
|
56
|
+
export interface SubagentProgressEvent {
|
|
57
|
+
type: 'subagent_progress';
|
|
58
|
+
taskId: string;
|
|
59
|
+
summary: string;
|
|
60
|
+
}
|
|
61
|
+
export interface SubagentEndEvent {
|
|
62
|
+
type: 'subagent_end';
|
|
63
|
+
taskId: string;
|
|
64
|
+
status: 'ok' | 'error';
|
|
65
|
+
result?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface McpConnectEvent {
|
|
68
|
+
type: 'mcp_connect';
|
|
69
|
+
serverName: string;
|
|
70
|
+
status: 'connecting' | 'connected' | 'error';
|
|
71
|
+
}
|
|
72
|
+
export interface McpToolCallEvent {
|
|
73
|
+
type: 'mcp_tool_call';
|
|
74
|
+
serverName: string;
|
|
75
|
+
toolName: string;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=turn-event.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-event.d.ts","sourceRoot":"","sources":["../../src/event/turn-event.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,aAAa,EAAS,MAAM,aAAa,CAAC;AAExD,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,SAAS,GACjB,cAAc,GACd,UAAU,GACV,aAAa,GACb,eAAe,GACf,aAAa,GACb,YAAY,GACZ,cAAc,GACd,kBAAkB,GAClB,qBAAqB,GACrB,gBAAgB,GAChB,eAAe,GACf,gBAAgB,CAAC;AAErB,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAAa,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,KAAK,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,gBAAgB,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,mBAAmB,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,cAAc,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,YAAY,GAAG,WAAW,GAAG,OAAO,CAAC;CAC9C;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,eAAe,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-event.js","sourceRoot":"","sources":["../../src/event/turn-event.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps internal TurnEvent to Eve-aligned AgentStreamEvent (ADR 0039 P0).
|
|
3
|
+
*/
|
|
4
|
+
import { type AgentStreamEvent } from '@zhin.js/ai/agent-stream';
|
|
5
|
+
import type { TurnEvent } from './turn-event.js';
|
|
6
|
+
export interface TurnToStreamContext {
|
|
7
|
+
sessionId: string;
|
|
8
|
+
turnId: string;
|
|
9
|
+
}
|
|
10
|
+
/** Map one TurnEvent to zero or more wire events. */
|
|
11
|
+
export declare function mapTurnEventToAgentStreamEvents(event: TurnEvent, ctx: TurnToStreamContext): AgentStreamEvent[];
|
|
12
|
+
//# sourceMappingURL=turn-to-agent-stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-to-agent-stream.d.ts","sourceRoot":"","sources":["../../src/event/turn-to-agent-stream.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAwB,KAAK,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAeD,qDAAqD;AACrD,wBAAgB,+BAA+B,CAC7C,KAAK,EAAE,SAAS,EAChB,GAAG,EAAE,mBAAmB,GACvB,gBAAgB,EAAE,CAyGpB"}
|