@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 @@
|
|
|
1
|
+
{"version":3,"file":"tool-system.js","sourceRoot":"","sources":["../../src/tool/tool-system.ts"],"names":[],"mappings":"AACA,OAAO,EAAyB,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAG7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AAE9E,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,eAAe,GAEhB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,wBAAwB,GAEzB,MAAM,0BAA0B,CAAC;AASlC,qDAAqD;AACrD,MAAM,UAAU,wBAAwB,CAAC,OAA4B;IACnE,OAAO;QACL,IAAI,kBAAkB,CAAC,OAAO,CAAC,aAAa,CAAC;QAC7C,IAAI,eAAe,CAAC,OAAO,CAAC,aAAa,CAAC;QAC1C,IAAI,oBAAoB,CAAC,OAAO,CAAC,kBAAkB,CAAC;QACpD,IAAI,iBAAiB,EAAE;QACvB,IAAI,aAAa,EAAE;KACpB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,SAA2B,EAAE;IAC5D,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,OAAO,UAAU;IACJ,aAAa,GAAiB,EAAE,CAAC;IACjC,OAAO,GAAiB,EAAE,CAAC;IAE5C,YAAY,UAA4B,EAAE;QACxC,IAAI,CAAC,S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search-locale-attach.d.ts","sourceRoot":"","sources":["../../src/tool/web-search-locale-attach.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,OAAO,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAMtD,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,OAAO,EACpB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,gBAAgB,GAC7B,OAAO,CAAC,OAAO,CAAC,CAiBlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-search-locale-attach.js","sourceRoot":"","sources":["../../src/tool/web-search-locale-attach.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,iCAAiC,CAAC;AAEzC,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,WAAoB,EACpB,MAAc,EACd,YAA8B;IAE9B,MAAM,IAAI,GAAG,WAA+B,CAAC;IAC7C,MAAM,KAAK,GAA4B,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,EAAE,CAAC;IACjE,MAAM,QAAQ,GAAG,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACpD,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;QACpD,KAAK,CAAC,2BAA2B,CAAC,GAAG,4BAA4B,CAAC,QAAQ,CAAC,CAAC;QAC5E,OAAO,EAAE,GAAG,WAAW,EAAE,KAAK,EAAa,CAAC;IAC9C,CAAC;IACD,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC9C,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,oBAAoB,CAAC;QAC9C,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC;KACrC,CAAC,CAAC;IACH,MAAM,IAAI,GAAG,CAAC,SAAS,IAAI,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC;IAC7C,IAAI,IAAI,EAAE,CAAC;QACT,KAAK,CAAC,2BAA2B,CAAC,GAAG,4BAA4B,CAAC,IAAI,CAAC,CAAC;IAC1E,CAAC;IACD,OAAO,EAAE,GAAG,WAAW,EAAE,KAAK,EAAa,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool schema bridge — canonical conversion paths (ADR 0009 / 0019).
|
|
3
|
+
*
|
|
4
|
+
* Authoring SSOT: `@zhin.js/core` Tool (+ Zod/JSON schema)
|
|
5
|
+
* → pluginToolToAgentTool (agent runtime)
|
|
6
|
+
* → agentToolToLlmTool (@zhin.js/ai transport)
|
|
7
|
+
*/
|
|
8
|
+
export { agentToolToLlmTool, agentToolsToLlmTools, } from '@zhin.js/ai';
|
|
9
|
+
export { normalizeTool as pluginToolToAgentTool, } from './orchestrator/tool-selection.js';
|
|
10
|
+
export type { NormalizableTool } from './orchestrator/tool-selection.js';
|
|
11
|
+
//# sourceMappingURL=tool-bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-bridge.d.ts","sourceRoot":"","sources":["../src/tool-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,aAAa,IAAI,qBAAqB,GACvC,MAAM,kCAAkC,CAAC;AAE1C,YAAY,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool schema bridge — canonical conversion paths (ADR 0009 / 0019).
|
|
3
|
+
*
|
|
4
|
+
* Authoring SSOT: `@zhin.js/core` Tool (+ Zod/JSON schema)
|
|
5
|
+
* → pluginToolToAgentTool (agent runtime)
|
|
6
|
+
* → agentToolToLlmTool (@zhin.js/ai transport)
|
|
7
|
+
*/
|
|
8
|
+
export { agentToolToLlmTool, agentToolsToLlmTools, } from '@zhin.js/ai';
|
|
9
|
+
export { normalizeTool as pluginToolToAgentTool, } from './orchestrator/tool-selection.js';
|
|
10
|
+
//# sourceMappingURL=tool-bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-bridge.js","sourceRoot":"","sources":["../src/tool-bridge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EACL,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,aAAa,IAAI,qBAAqB,GACvC,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tool-catalog/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tool-catalog/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ZhinAgentConfig } from '../config/index.js';
|
|
2
|
+
import { type DeferredToolsConfig } from './types.js';
|
|
3
|
+
export declare function resolveDeferredToolsConfig(config: Pick<ZhinAgentConfig, 'deferredTools'>): Required<Pick<DeferredToolsConfig, 'maxLoadedPerSession' | 'discoverTopK' | 'alwaysLoadedTools'>> & {
|
|
4
|
+
mcpServers: NonNullable<DeferredToolsConfig['mcpServers']>;
|
|
5
|
+
};
|
|
6
|
+
export declare function resolveAlwaysLoadedSet(config: Pick<ZhinAgentConfig, 'deferredTools'>): Set<string>;
|
|
7
|
+
export declare function isMcpToolDeferred(toolName: string, mcpServer: string | undefined, deferredConfig: ReturnType<typeof resolveDeferredToolsConfig>): boolean;
|
|
8
|
+
//# sourceMappingURL=resolve-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-config.d.ts","sourceRoot":"","sources":["../../src/tool-catalog/resolve-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,YAAY,CAAC;AAEpB,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,eAAe,CAAC,GAC7C,QAAQ,CAAC,IAAI,CAAC,mBAAmB,EAAE,qBAAqB,GAAG,cAAc,GAAG,mBAAmB,CAAC,CAAC,GAAG;IACrG,UAAU,EAAE,WAAW,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC,CAAC;CAC5D,CASA;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,eAAe,CAAC,GAC7C,GAAG,CAAC,MAAM,CAAC,CAEb;AAED,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,cAAc,EAAE,UAAU,CAAC,OAAO,0BAA0B,CAAC,GAC5D,OAAO,CAKT"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { DEFAULT_DEFERRED_TOOLS_CONFIG, } from './types.js';
|
|
2
|
+
export function resolveDeferredToolsConfig(config) {
|
|
3
|
+
const dt = config.deferredTools ?? {};
|
|
4
|
+
const alwaysLoaded = dt.alwaysLoadedTools ?? DEFAULT_DEFERRED_TOOLS_CONFIG.alwaysLoadedTools;
|
|
5
|
+
return {
|
|
6
|
+
maxLoadedPerSession: dt.maxLoadedPerSession ?? DEFAULT_DEFERRED_TOOLS_CONFIG.maxLoadedPerSession,
|
|
7
|
+
discoverTopK: dt.discoverTopK ?? DEFAULT_DEFERRED_TOOLS_CONFIG.discoverTopK,
|
|
8
|
+
alwaysLoadedTools: [...alwaysLoaded],
|
|
9
|
+
mcpServers: dt.mcpServers ?? {},
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export function resolveAlwaysLoadedSet(config) {
|
|
13
|
+
return new Set(resolveDeferredToolsConfig(config).alwaysLoadedTools);
|
|
14
|
+
}
|
|
15
|
+
export function isMcpToolDeferred(toolName, mcpServer, deferredConfig) {
|
|
16
|
+
if (!mcpServer)
|
|
17
|
+
return true;
|
|
18
|
+
const serverCfg = deferredConfig.mcpServers[mcpServer];
|
|
19
|
+
const always = new Set(serverCfg?.alwaysLoaded ?? []);
|
|
20
|
+
return !always.has(toolName);
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=resolve-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve-config.js","sourceRoot":"","sources":["../../src/tool-catalog/resolve-config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,6BAA6B,GAE9B,MAAM,YAAY,CAAC;AAEpB,MAAM,UAAU,0BAA0B,CACxC,MAA8C;IAI9C,MAAM,EAAE,GAAG,MAAM,CAAC,aAAa,IAAI,EAAE,CAAC;IACtC,MAAM,YAAY,GAAG,EAAE,CAAC,iBAAiB,IAAI,6BAA6B,CAAC,iBAAiB,CAAC;IAC7F,OAAO;QACL,mBAAmB,EAAE,EAAE,CAAC,mBAAmB,IAAI,6BAA6B,CAAC,mBAAmB;QAChG,YAAY,EAAE,EAAE,CAAC,YAAY,IAAI,6BAA6B,CAAC,YAAY;QAC3E,iBAAiB,EAAE,CAAC,GAAG,YAAY,CAAC;QACpC,UAAU,EAAE,EAAE,CAAC,UAAU,IAAI,EAAE;KAChC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,MAA8C;IAE9C,OAAO,IAAI,GAAG,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,QAAgB,EAChB,SAA6B,EAC7B,cAA6D;IAE7D,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC;IAC5B,MAAM,SAAS,GAAG,cAAc,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACvD,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,SAAS,EAAE,YAAY,IAAI,EAAE,CAAC,CAAC;IACtD,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session-level loaded tool state with LRU eviction.
|
|
3
|
+
* Persisted via ContextRepository session metadata bridge.
|
|
4
|
+
*/
|
|
5
|
+
export interface DeferredSessionSnapshot {
|
|
6
|
+
loadedTools: Record<string, number>;
|
|
7
|
+
loadedSkills: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare class SessionDeferredToolStore {
|
|
10
|
+
private readonly bySession;
|
|
11
|
+
get(sessionId: string): DeferredSessionSnapshot;
|
|
12
|
+
set(sessionId: string, snapshot: DeferredSessionSnapshot): void;
|
|
13
|
+
clear(sessionId: string): void;
|
|
14
|
+
touchTool(sessionId: string, name: string, maxLoaded: number): void;
|
|
15
|
+
touchTools(sessionId: string, names: Iterable<string>, maxLoaded: number): void;
|
|
16
|
+
addSkill(sessionId: string, name: string): void;
|
|
17
|
+
getLoadedToolNames(sessionId: string): string[];
|
|
18
|
+
private evictLru;
|
|
19
|
+
}
|
|
20
|
+
/** Process-wide store; ContextRepository adapters may mirror per session. */
|
|
21
|
+
export declare const sharedDeferredToolStore: SessionDeferredToolStore;
|
|
22
|
+
//# sourceMappingURL=session-deferred-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-deferred-store.d.ts","sourceRoot":"","sources":["../../src/tool-catalog/session-deferred-store.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,qBAAa,wBAAwB;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA8C;IAExE,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,uBAAuB;IAI/C,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,uBAAuB,GAAG,IAAI;IAI/D,KAAK,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAI9B,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAQnE,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAM/E,QAAQ,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAQ/C,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE;IAO/C,OAAO,CAAC,QAAQ;CASjB;AAED,6EAA6E;AAC7E,eAAO,MAAM,uBAAuB,0BAAiC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export class SessionDeferredToolStore {
|
|
2
|
+
bySession = new Map();
|
|
3
|
+
get(sessionId) {
|
|
4
|
+
return this.bySession.get(sessionId) ?? { loadedTools: {}, loadedSkills: [] };
|
|
5
|
+
}
|
|
6
|
+
set(sessionId, snapshot) {
|
|
7
|
+
this.bySession.set(sessionId, snapshot);
|
|
8
|
+
}
|
|
9
|
+
clear(sessionId) {
|
|
10
|
+
this.bySession.delete(sessionId);
|
|
11
|
+
}
|
|
12
|
+
touchTool(sessionId, name, maxLoaded) {
|
|
13
|
+
const snap = this.get(sessionId);
|
|
14
|
+
const now = Date.now();
|
|
15
|
+
snap.loadedTools[name] = now;
|
|
16
|
+
this.evictLru(snap, maxLoaded);
|
|
17
|
+
this.bySession.set(sessionId, snap);
|
|
18
|
+
}
|
|
19
|
+
touchTools(sessionId, names, maxLoaded) {
|
|
20
|
+
for (const name of names) {
|
|
21
|
+
this.touchTool(sessionId, name, maxLoaded);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
addSkill(sessionId, name) {
|
|
25
|
+
const snap = this.get(sessionId);
|
|
26
|
+
if (!snap.loadedSkills.includes(name)) {
|
|
27
|
+
snap.loadedSkills.push(name);
|
|
28
|
+
}
|
|
29
|
+
this.bySession.set(sessionId, snap);
|
|
30
|
+
}
|
|
31
|
+
getLoadedToolNames(sessionId) {
|
|
32
|
+
const snap = this.get(sessionId);
|
|
33
|
+
return Object.entries(snap.loadedTools)
|
|
34
|
+
.sort((a, b) => b[1] - a[1])
|
|
35
|
+
.map(([name]) => name);
|
|
36
|
+
}
|
|
37
|
+
evictLru(snap, maxLoaded) {
|
|
38
|
+
const entries = Object.entries(snap.loadedTools);
|
|
39
|
+
if (entries.length <= maxLoaded)
|
|
40
|
+
return;
|
|
41
|
+
entries.sort((a, b) => a[1] - b[1]);
|
|
42
|
+
const toRemove = entries.length - maxLoaded;
|
|
43
|
+
for (let i = 0; i < toRemove; i++) {
|
|
44
|
+
delete snap.loadedTools[entries[i][0]];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/** Process-wide store; ContextRepository adapters may mirror per session. */
|
|
49
|
+
export const sharedDeferredToolStore = new SessionDeferredToolStore();
|
|
50
|
+
//# sourceMappingURL=session-deferred-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-deferred-store.js","sourceRoot":"","sources":["../../src/tool-catalog/session-deferred-store.ts"],"names":[],"mappings":"AASA,MAAM,OAAO,wBAAwB;IAClB,SAAS,GAAG,IAAI,GAAG,EAAmC,CAAC;IAExE,GAAG,CAAC,S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AC,SAAS,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,kBAAkB,CAAC,SAAiB;QAClC,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACjC,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC;aACpC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;aAC3B,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAEO,QAAQ,CAAC,IAA6B,EAAE,SAAiB;QAC/D,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACjD,IAAI,OAAO,CAAC,MAAM,IAAI,SAAS;YAAE,OAAO;QACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpC,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;QAC5C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC;YAClC,OAAO,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;CACF;AAED,6EAA6E;AAC7E,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,wBAAwB,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type AgentTool } from '@zhin.js/ai';
|
|
2
|
+
import type { SkillRegistry } from '../orchestrator/skill-registry.js';
|
|
3
|
+
import { type DiscoverKind, type DiscoverResultItem, type ToolCatalogItem } from './types.js';
|
|
4
|
+
export interface BuildToolCatalogOptions {
|
|
5
|
+
tools: AgentTool[];
|
|
6
|
+
mcpServerByTool?: Map<string, string>;
|
|
7
|
+
alwaysLoaded: Set<string>;
|
|
8
|
+
}
|
|
9
|
+
export declare function buildToolCatalog(options: BuildToolCatalogOptions): ToolCatalogItem[];
|
|
10
|
+
export declare function catalogToolByName(catalog: ToolCatalogItem[]): Map<string, ToolCatalogItem>;
|
|
11
|
+
export interface DiscoverInCatalogOptions {
|
|
12
|
+
query: string;
|
|
13
|
+
kind: DiscoverKind;
|
|
14
|
+
topK: number;
|
|
15
|
+
platform?: string;
|
|
16
|
+
mcpServer?: string;
|
|
17
|
+
skillRegistry: SkillRegistry | null;
|
|
18
|
+
catalog: ToolCatalogItem[];
|
|
19
|
+
}
|
|
20
|
+
export declare function discoverInCatalog(options: DiscoverInCatalogOptions): DiscoverResultItem[];
|
|
21
|
+
export declare function resolveDeferredApiTools(catalog: ToolCatalogItem[], alwaysLoaded: Set<string>, sessionLoadedNames: string[]): AgentTool[];
|
|
22
|
+
export declare function buildDeferredStats(catalog: ToolCatalogItem[], apiTools: AgentTool[]): string;
|
|
23
|
+
export type { DiscoverKind, DiscoverResultItem, ToolCatalogItem, ToolCatalogSource } from './types.js';
|
|
24
|
+
//# sourceMappingURL=tool-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-catalog.d.ts","sourceRoot":"","sources":["../../src/tool-catalog/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAoD,MAAM,YAAY,CAAC;AAChJ,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,eAAe,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;CAC3B;AAgBD,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,eAAe,EAAE,CAoBpF;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAE1F;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,OAAO,EAAE,eAAe,EAAE,CAAC;CAC5B;AAED,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,wBAAwB,GAAG,kBAAkB,EAAE,CA8CzF;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,eAAe,EAAE,EAC1B,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,EACzB,kBAAkB,EAAE,MAAM,EAAE,GAC3B,SAAS,EAAE,CAwBb;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,MAAM,CAS5F;AAED,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { filterTools } from '@zhin.js/ai';
|
|
2
|
+
import { DEFERRED_META_TOOL_NAMES } from './types.js';
|
|
3
|
+
function briefFromTool(tool) {
|
|
4
|
+
const desc = tool.description?.trim() ?? '';
|
|
5
|
+
return desc.length > 120 ? `${desc.slice(0, 117)}...` : desc;
|
|
6
|
+
}
|
|
7
|
+
function inferSource(tool, mcpServer) {
|
|
8
|
+
if (DEFERRED_META_TOOL_NAMES.has(tool.name))
|
|
9
|
+
return 'meta';
|
|
10
|
+
if (mcpServer)
|
|
11
|
+
return 'mcp';
|
|
12
|
+
const src = tool.source ?? '';
|
|
13
|
+
if (src.startsWith('builtin'))
|
|
14
|
+
return 'builtin';
|
|
15
|
+
if (src.includes('skill'))
|
|
16
|
+
return 'skill';
|
|
17
|
+
return 'plugin';
|
|
18
|
+
}
|
|
19
|
+
export function buildToolCatalog(options) {
|
|
20
|
+
const { tools, mcpServerByTool, alwaysLoaded } = options;
|
|
21
|
+
const items = [];
|
|
22
|
+
const seen = new Set();
|
|
23
|
+
for (const tool of tools) {
|
|
24
|
+
if (seen.has(tool.name))
|
|
25
|
+
continue;
|
|
26
|
+
seen.add(tool.name);
|
|
27
|
+
const mcpServer = mcpServerByTool?.get(tool.name);
|
|
28
|
+
const isAlways = alwaysLoaded.has(tool.name);
|
|
29
|
+
items.push({
|
|
30
|
+
name: tool.name,
|
|
31
|
+
brief: briefFromTool(tool),
|
|
32
|
+
fullTool: tool,
|
|
33
|
+
source: inferSource(tool, mcpServer),
|
|
34
|
+
mcpServer,
|
|
35
|
+
deferDefault: !isAlways && !DEFERRED_META_TOOL_NAMES.has(tool.name),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return items;
|
|
39
|
+
}
|
|
40
|
+
export function catalogToolByName(catalog) {
|
|
41
|
+
return new Map(catalog.map(item => [item.name, item]));
|
|
42
|
+
}
|
|
43
|
+
export function discoverInCatalog(options) {
|
|
44
|
+
const { query, kind, topK, platform, mcpServer, skillRegistry, catalog } = options;
|
|
45
|
+
const q = query.trim();
|
|
46
|
+
const results = [];
|
|
47
|
+
const wantTools = kind === 'tool' || kind === 'all';
|
|
48
|
+
const wantSkills = kind === 'skill' || kind === 'all';
|
|
49
|
+
if (wantTools && q) {
|
|
50
|
+
const pool = catalog
|
|
51
|
+
.filter(item => item.source !== 'meta' && !DEFERRED_META_TOOL_NAMES.has(item.name))
|
|
52
|
+
.filter(item => !mcpServer || item.mcpServer === mcpServer)
|
|
53
|
+
.map(item => item.fullTool);
|
|
54
|
+
const ranked = filterTools(q, pool, { maxTools: topK, minScore: 0.08 });
|
|
55
|
+
for (const tool of ranked) {
|
|
56
|
+
const item = catalog.find(c => c.name === tool.name);
|
|
57
|
+
results.push({
|
|
58
|
+
kind: 'tool',
|
|
59
|
+
name: tool.name,
|
|
60
|
+
brief: item?.brief ?? briefFromTool(tool),
|
|
61
|
+
score: 1,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (wantSkills) {
|
|
66
|
+
if (skillRegistry && skillRegistry.size > 0) {
|
|
67
|
+
const skills = skillRegistry.search(q, { maxResults: topK, platform });
|
|
68
|
+
for (const skill of skills) {
|
|
69
|
+
results.push({
|
|
70
|
+
kind: 'skill',
|
|
71
|
+
name: skill.name,
|
|
72
|
+
brief: skill.description?.slice(0, 120) ?? '',
|
|
73
|
+
score: 1,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (kind === 'all' && q) {
|
|
79
|
+
const toolResults = results.filter(r => r.kind === 'tool').slice(0, topK);
|
|
80
|
+
const skillResults = results.filter(r => r.kind === 'skill').slice(0, topK);
|
|
81
|
+
return [...toolResults, ...skillResults];
|
|
82
|
+
}
|
|
83
|
+
return results.slice(0, topK * (kind === 'all' ? 2 : 1));
|
|
84
|
+
}
|
|
85
|
+
export function resolveDeferredApiTools(catalog, alwaysLoaded, sessionLoadedNames) {
|
|
86
|
+
const byName = catalogToolByName(catalog);
|
|
87
|
+
const out = [];
|
|
88
|
+
const seen = new Set();
|
|
89
|
+
for (const name of alwaysLoaded) {
|
|
90
|
+
if (seen.has(name))
|
|
91
|
+
continue;
|
|
92
|
+
const item = byName.get(name);
|
|
93
|
+
if (item) {
|
|
94
|
+
out.push(item.fullTool);
|
|
95
|
+
seen.add(name);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
for (const name of sessionLoadedNames) {
|
|
99
|
+
if (seen.has(name))
|
|
100
|
+
continue;
|
|
101
|
+
const item = byName.get(name);
|
|
102
|
+
if (item) {
|
|
103
|
+
out.push(item.fullTool);
|
|
104
|
+
seen.add(name);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
return out;
|
|
108
|
+
}
|
|
109
|
+
export function buildDeferredStats(catalog, apiTools) {
|
|
110
|
+
const apiNames = new Set(apiTools.map(t => t.name));
|
|
111
|
+
const deferred = catalog.filter(c => !apiNames.has(c.name));
|
|
112
|
+
const bySource = new Map();
|
|
113
|
+
for (const item of deferred) {
|
|
114
|
+
bySource.set(item.source, (bySource.get(item.source) ?? 0) + 1);
|
|
115
|
+
}
|
|
116
|
+
const parts = [...bySource.entries()].map(([k, v]) => `${k}:${v}`);
|
|
117
|
+
return `deferred ${deferred.length} tools (${parts.join(', ') || 'none'}); loaded ${apiTools.length}`;
|
|
118
|
+
}
|
|
119
|
+
//# sourceMappingURL=tool-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../../src/tool-catalog/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1D,OAAO,EAA4F,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAOhJ,SAAS,aAAa,CAAC,IAAe;IACpC,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5C,OAAO,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/D,CAAC;AAED,SAAS,WAAW,CAAC,IAAe,EAAE,SAAkB;IACtD,IAAI,wBAAwB,CAAC,GAAG,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CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IACpD,MAAM,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC5D,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC3C,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;QAC5B,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAClE,CAAC;IACD,MAAM,KAAK,GAAG,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACnE,OAAO,YAAY,QAAQ,CAAC,MAAM,WAAW,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,aAAa,QAAQ,CAAC,MAAM,EAAE,CAAC;AACxG,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AgentTool } from '@zhin.js/ai';
|
|
2
|
+
export type ToolCatalogSource = 'builtin' | 'plugin' | 'mcp' | 'skill' | 'meta';
|
|
3
|
+
export interface ToolCatalogItem {
|
|
4
|
+
name: string;
|
|
5
|
+
brief: string;
|
|
6
|
+
fullTool: AgentTool;
|
|
7
|
+
source: ToolCatalogSource;
|
|
8
|
+
mcpServer?: string;
|
|
9
|
+
deferDefault: boolean;
|
|
10
|
+
}
|
|
11
|
+
export type DiscoverKind = 'tool' | 'skill' | 'all';
|
|
12
|
+
export interface DiscoverResultItem {
|
|
13
|
+
kind: 'tool' | 'skill';
|
|
14
|
+
name: string;
|
|
15
|
+
brief: string;
|
|
16
|
+
score: number;
|
|
17
|
+
}
|
|
18
|
+
export interface DeferredToolsConfig {
|
|
19
|
+
maxLoadedPerSession?: number;
|
|
20
|
+
discoverTopK?: number;
|
|
21
|
+
alwaysLoadedTools?: string[];
|
|
22
|
+
mcpServers?: Record<string, {
|
|
23
|
+
alwaysLoaded?: string[];
|
|
24
|
+
}>;
|
|
25
|
+
}
|
|
26
|
+
export declare const DEFAULT_ALWAYS_LOADED_TOOLS: readonly ["ask_user", "spawn_task", "discover", "load_tool", "load_skill"];
|
|
27
|
+
export declare const DEFAULT_DEFERRED_TOOLS_CONFIG: Required<Pick<DeferredToolsConfig, 'maxLoadedPerSession' | 'discoverTopK' | 'alwaysLoadedTools'>>;
|
|
28
|
+
export declare const DEFERRED_META_TOOL_NAMES: Set<string>;
|
|
29
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tool-catalog/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC;AAEhF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;CAC1D;AAED,eAAO,MAAM,2BAA2B,4EAM9B,CAAC;AAEX,eAAO,MAAM,6BAA6B,EAAE,QAAQ,CAAC,IAAI,CAAC,mBAAmB,EAAE,qBAAqB,GAAG,cAAc,GAAG,mBAAmB,CAAC,CAI3I,CAAC;AAEF,eAAO,MAAM,wBAAwB,aAInC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export const DEFAULT_ALWAYS_LOADED_TOOLS = [
|
|
2
|
+
'ask_user',
|
|
3
|
+
'spawn_task',
|
|
4
|
+
'discover',
|
|
5
|
+
'load_tool',
|
|
6
|
+
'load_skill',
|
|
7
|
+
];
|
|
8
|
+
export const DEFAULT_DEFERRED_TOOLS_CONFIG = {
|
|
9
|
+
maxLoadedPerSession: 12,
|
|
10
|
+
discoverTopK: 5,
|
|
11
|
+
alwaysLoadedTools: [...DEFAULT_ALWAYS_LOADED_TOOLS],
|
|
12
|
+
};
|
|
13
|
+
export const DEFERRED_META_TOOL_NAMES = new Set([
|
|
14
|
+
'discover',
|
|
15
|
+
'load_tool',
|
|
16
|
+
'load_skill',
|
|
17
|
+
]);
|
|
18
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/tool-catalog/types.ts"],"names":[],"mappings":"AA6BA,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,UAAU;IACV,YAAY;IACZ,UAAU;IACV,WAAW;IACX,YAAY;CACJ,CAAC;AAEX,MAAM,CAAC,MAAM,6BAA6B,GAAsG;IAC9I,mBAAmB,EAAE,EAAE;IACvB,YAAY,EAAE,CAAC;IACf,iBAAiB,EAAE,CAAC,GAAG,2BAA2B,CAAC;CACpD,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,GAAG,CAAC;IAC9C,UAAU;IACV,WAAW;IACX,YAAY;CACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Message } from '../orchestrator/types.js';
|
|
2
|
+
import type { SubagentCompletePayload, SubagentResultSender } from '../subagent/index.js';
|
|
3
|
+
import type { DeferredWorkerResult } from '../deferred-worker-runner.js';
|
|
4
|
+
import type { ZhinAgentPrivate } from '../internal/agent-host.js';
|
|
5
|
+
import type { PromptController } from './prompt-controller.js';
|
|
6
|
+
import type { ZhinAgentConfig } from '../config/index.js';
|
|
7
|
+
export interface AutoContinueHost {
|
|
8
|
+
config: Required<ZhinAgentConfig>;
|
|
9
|
+
promptController: PromptController;
|
|
10
|
+
getDeferredAutoContinueDepth(sessionKey: string): number;
|
|
11
|
+
setDeferredAutoContinueDepth(sessionKey: string, depth: number): void;
|
|
12
|
+
resetDeferredAutoContinueDepth(sessionKey: string): void;
|
|
13
|
+
getDeferredResultSender(): SubagentResultSender | null;
|
|
14
|
+
runInTurnContext<T>(turnId: string, fn: () => Promise<T>): Promise<T>;
|
|
15
|
+
}
|
|
16
|
+
export declare function continueAfterDeferredWorker(host: AutoContinueHost, agent: ZhinAgentPrivate, commMessage: Message, taskId: string, goal: string, result: DeferredWorkerResult): Promise<void>;
|
|
17
|
+
export declare function continueAfterSubagent(host: AutoContinueHost, agent: ZhinAgentPrivate, payload: SubagentCompletePayload): Promise<void>;
|
|
18
|
+
//# sourceMappingURL=auto-continue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-continue.d.ts","sourceRoot":"","sources":["../../src/turn/auto-continue.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM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crypto';
|
|
2
|
+
import { formatCompact, Logger } from '@zhin.js/logger';
|
|
3
|
+
import { resolveAgentTurnSessionKey } from '../collaboration/resolve-agent-session-key.js';
|
|
4
|
+
import { deliverDeferredAutoContinueReply } from './deferred-delivery.js';
|
|
5
|
+
import { buildDeferredAutoContinueUserMessage, shouldDeferredAutoContinue } from './deferred-auto-continue.js';
|
|
6
|
+
import { buildSubagentAutoContinueUserMessage } from './subagent-auto-continue.js';
|
|
7
|
+
import { persistSubagentResultToContext } from './persist-subagent-context.js';
|
|
8
|
+
import { persistDeferredWorkerResultToContext } from './persist-deferred-context.js';
|
|
9
|
+
import { processTextTurn } from './turn-pipeline.js';
|
|
10
|
+
const logger = new Logger(null, 'ZhinAgent');
|
|
11
|
+
async function executeAutoContinueTurn(host, agent, commMessage, sessionKey, taskId, depth, kind, buildMessage) {
|
|
12
|
+
await host.promptController.waitForIdle();
|
|
13
|
+
host.setDeferredAutoContinueDepth(sessionKey, depth + 1);
|
|
14
|
+
logger.info(formatCompact({
|
|
15
|
+
[kind]: 'auto_continue',
|
|
16
|
+
task_id: taskId,
|
|
17
|
+
depth: depth + 1,
|
|
18
|
+
}));
|
|
19
|
+
const elements = await host.runInTurnContext(randomUUID(), () => processTextTurn(agent, '', commMessage, [], undefined, {
|
|
20
|
+
prebuiltMessages: [buildMessage()],
|
|
21
|
+
deferredAutoContinue: true,
|
|
22
|
+
}));
|
|
23
|
+
const sender = host.getDeferredResultSender();
|
|
24
|
+
if (sender && elements.length > 0) {
|
|
25
|
+
await deliverDeferredAutoContinueReply(sender, commMessage, elements);
|
|
26
|
+
}
|
|
27
|
+
logger.info(formatCompact({
|
|
28
|
+
[kind]: 'auto_continue_done',
|
|
29
|
+
task_id: taskId,
|
|
30
|
+
depth: depth + 1,
|
|
31
|
+
outbound: elements.length,
|
|
32
|
+
}));
|
|
33
|
+
}
|
|
34
|
+
export async function continueAfterDeferredWorker(host, agent, commMessage, taskId, goal, result) {
|
|
35
|
+
const sessionKey = resolveAgentTurnSessionKey(commMessage);
|
|
36
|
+
const depth = host.getDeferredAutoContinueDepth(sessionKey);
|
|
37
|
+
const persisted = await persistDeferredWorkerResultToContext(agent, commMessage, taskId, goal, result);
|
|
38
|
+
if (!shouldDeferredAutoContinue(host.config, result, depth, persisted)) {
|
|
39
|
+
logger.warn(formatCompact({
|
|
40
|
+
deferred: 'auto_continue_skipped',
|
|
41
|
+
task_id: taskId,
|
|
42
|
+
depth,
|
|
43
|
+
persisted,
|
|
44
|
+
status: result.status,
|
|
45
|
+
}));
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
await executeAutoContinueTurn(host, agent, commMessage, sessionKey, taskId, depth, 'deferred', () => buildDeferredAutoContinueUserMessage(taskId, goal, result.status));
|
|
49
|
+
}
|
|
50
|
+
export async function continueAfterSubagent(host, agent, payload) {
|
|
51
|
+
if (host.config.subagentAutoContinue === false)
|
|
52
|
+
return;
|
|
53
|
+
const commMessage = payload.origin.message;
|
|
54
|
+
const sessionKey = resolveAgentTurnSessionKey(commMessage);
|
|
55
|
+
const depth = host.getDeferredAutoContinueDepth(sessionKey);
|
|
56
|
+
if (depth >= host.config.deferredAutoContinueMaxDepth) {
|
|
57
|
+
logger.warn(formatCompact({
|
|
58
|
+
subagent: 'auto_continue_skipped',
|
|
59
|
+
task_id: payload.taskId,
|
|
60
|
+
reason: 'max_depth',
|
|
61
|
+
depth,
|
|
62
|
+
}));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const persisted = await persistSubagentResultToContext(agent, commMessage, payload);
|
|
66
|
+
if (!persisted) {
|
|
67
|
+
logger.warn(formatCompact({
|
|
68
|
+
subagent: 'auto_continue_skipped',
|
|
69
|
+
task_id: payload.taskId,
|
|
70
|
+
reason: 'persist_failed',
|
|
71
|
+
}));
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
await executeAutoContinueTurn(host, agent, commMessage, sessionKey, payload.taskId, depth, 'subagent', () => buildSubagentAutoContinueUserMessage(payload.taskId, payload.label, payload.status));
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=auto-continue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-continue.js","sourceRoot":"","sources":["../../src/turn/auto-continue.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAKxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAC3F,OAAO,EAAE,gCAAgC,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,oCAAoC,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAC/G,OAAO,EAAE,oCAAoC,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,oCAAoC,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAKrD,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;AAc7C,KAAK,UAAU,uBAAuB,CACpC,IAAsB,EACtB,KAAuB,EACvB,WAAoB,EACpB,UAAkB,EAClB,MAAc,EACd,KAAa,EACb,IAAsB,EACtB,YAA+B;IAE/B,MAAM,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,CAAC;IAC1C,IAAI,CAAC,4BAA4B,CAAC,UAAU,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;IAEzD,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;QACxB,CAAC,IAAI,CAAC,EAAE,eAAe;QACvB,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,KAAK,GAAG,CAAC;KACjB,CAAC,CAAC,CAAC;IAEJ,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,gBAAgB,CA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AAC,MAAM,EACd,KAAK,EACL,UAAU,EACV,GAAG,EAAE,CAAC,oCAAoC,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,CAC1F,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deferred worker 完成后自动唤醒主 Agent 续聊(方案 B)。
|
|
3
|
+
*/
|
|
4
|
+
import { type UserMessage } from '@zhin.js/ai';
|
|
5
|
+
import type { DeferredWorkerResult } from '../deferred-worker-runner.js';
|
|
6
|
+
import type { ZhinAgentConfig } from '../config/index.js';
|
|
7
|
+
export declare const DEFERRED_AUTO_CONTINUE_MARKER = "[Deferred worker \u5B8C\u6210 \u2014 \u81EA\u52A8\u7EED\u804A]";
|
|
8
|
+
export declare function isDeferredAutoContinueEnabled(config: Required<ZhinAgentConfig>, env?: NodeJS.ProcessEnv): boolean;
|
|
9
|
+
export declare function shouldDeferredAutoContinue(config: Required<ZhinAgentConfig>, result: DeferredWorkerResult, depth: number, persisted: boolean, env?: NodeJS.ProcessEnv): boolean;
|
|
10
|
+
export declare function buildDeferredAutoContinueUserMessage(taskId: string, goal: string, status: DeferredWorkerResult['status']): UserMessage;
|
|
11
|
+
//# sourceMappingURL=deferred-auto-continue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deferred-auto-continue.d.ts","sourceRoot":"","sources":["../../src/turn/deferred-auto-continue.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAGzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,eAAO,MAAM,6BAA6B,mEAAgC,CAAC;AAK3E,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,QAAQ,CAAC,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,CAAC,GAAG,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAC1C,OAAO,MAAM,CAAC,oBAAoB,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,0BAA0B,CACxC,MAAiC,EACjC,MAA4B,EAC5B,KAAa,EACb,SAAkB,EAClB,MAAyB,OAAO,CAAC,GAAG;IAEpC,IAAI,CAAC,6BAA6B,CAAC,MAAM,EAAE,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9D,IAAI,CAAC,SAAS;QAAE,OAAO,KAAK,CAAC;IAC7B,IAAI,MAAM,CAAC,MAAM,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,KAAK,IAAI,MAAM,CAAC,4BAA4B;QAAE,OAAO,KAAK,CAAC;IAC/D,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,oCAAoC,CAClD,MAAc,EACd,IAAY,EACZ,MAAsC;IAEtC,MAAM,KAAK,GAAG,2BAA2B,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IAC3D,MAAM,IAAI,GAAG;QACX,6BAA6B;QAC7B,MAAM,MAAM,MAAM,KAAK,EAAE;QACzB,aAAa,MAAM,GAAG;QACtB,8EAA8E;QAC9E,wDAAwD;QACxD,2BAA2B;KAC5B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACb,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { OutputElement } from '@zhin.js/ai';
|
|
2
|
+
import type { DeferredWorkerResult } from '../deferred-worker-runner.js';
|
|
3
|
+
import type { Message } from '../orchestrator/types.js';
|
|
4
|
+
import type { SubagentResultSender } from '../subagent/index.js';
|
|
5
|
+
export declare function extractDeferredBody(result: DeferredWorkerResult): string;
|
|
6
|
+
export declare function deliverDeferredWorkerResult(sender: SubagentResultSender, commMessage: Message, goal: string, taskId: string, result: DeferredWorkerResult): Promise<void>;
|
|
7
|
+
/** deferred auto-continue 完成后将主 Agent 续聊回复推送到 IM */
|
|
8
|
+
export declare function deliverDeferredAutoContinueReply(sender: SubagentResultSender, commMessage: Message, elements: OutputElement[]): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=deferred-delivery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deferred-delivery.d.ts","sourceRoot":"","sources":["../../src/turn/deferred-delivery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAGjE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,oBAAoB,GAAG,MAAM,CAaxE;AAED,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,oBAAoB,EAC5B,WAAW,EAAE,OAAO,EACpB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAUf;AAED,oDAAoD;AACpD,wBAAsB,gCAAgC,CACpD,MAAM,EAAE,oBAAoB,EAC5B,WAAW,EAAE,OAAO,EACpB,QAAQ,EAAE,aAAa,EAAE,GACxB,OAAO,CAAC,IAAI,CAAC,CAGf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deferred-delivery.js","sourceRoot":"","sources":["../../src/turn/deferred-delivery.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,OAAO,EAAE,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gC,CACpD,MAA4B,EAC5B,WAAoB,EACpB,QAAyB;IAEzB,IAAI,CAAC,QAAQ,CAAC,MAAM;QAAE,OAAO;IAC7B,MAAM,MAAM,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Message } from '../orchestrator/types.js';
|
|
2
|
+
import type { InboundQueueConfig, InboundGroupQueueMode } from '../config/zhin-agent-config.js';
|
|
3
|
+
export type { InboundQueueConfig, InboundGroupQueueMode } from '../config/zhin-agent-config.js';
|
|
4
|
+
export interface ResolvedInboundQueueConfig {
|
|
5
|
+
groupMode: InboundGroupQueueMode;
|
|
6
|
+
ttlMs: number;
|
|
7
|
+
coalesceWindowMs: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const DEFAULT_INBOUND_QUEUE_CONFIG: ResolvedInboundQueueConfig;
|
|
10
|
+
export declare function normalizeInboundQueueConfig(raw?: InboundQueueConfig | null): ResolvedInboundQueueConfig;
|
|
11
|
+
export declare function validateInboundQueueConfig(raw?: InboundQueueConfig | null): string[];
|
|
12
|
+
export declare function isGroupOrChannelMessage(message: Message): boolean;
|
|
13
|
+
export declare function shouldUseGroupFifoQueue(message: Message, config: ResolvedInboundQueueConfig): boolean;
|
|
14
|
+
//# sourceMappingURL=inbound-queue-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbound-queue-config.d.ts","sourceRoot":"","sources":["../../src/turn/inbound-queue-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,KAAK,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEhG,YAAY,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAEhG,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,qBAAqB,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,4BAA4B,EAAE,0BAI1C,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,GAAG,CAAC,EAAE,kBAAkB,GAAG,IAAI,GAC9B,0BAA0B,CAS5B;AAED,wBAAgB,0BAA0B,CAAC,GAAG,CAAC,EAAE,kBAAkB,GAAG,IAAI,GAAG,MAAM,EAAE,CAgBpF;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAGjE;AAED,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAET"}
|