@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":"turn-complete.js","sourceRoot":"","sources":["../../src/turn/turn-complete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAUhD,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,IAAsB,EACtB,SAAiB,EACjB,WAAoB,EACpB,IAAsB,EACtB,GAAwB;IAExB,IAAI,IAAI,KAAK,MAAM,EAAE,CAAC;QACpB,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,iBAAiB,EAAE,SAAS,EAAE,EAAE,UAAU,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC,CAAC;IAC3F,CAAC;IACD,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE;QAC3F,MAAM,EAAE,YAAY;KACrB,CAAC,CAAC,CAAC;IACJ,MAAM,IAAI,CAAC,kBAAkB,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC;IAC1E,OAAO,EAAE,CAAC;AACZ,CAAC;AAkBD,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAAC,C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AAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ScheduleTurnContext } from '../internal/turn-context.js';
|
|
2
|
+
import type { ZhinAgentConfig } from '../config/index.js';
|
|
3
|
+
export interface TurnContextBridgeState {
|
|
4
|
+
pendingScheduleTurnContext?: ScheduleTurnContext;
|
|
5
|
+
pendingActivityFeedbackEligible?: boolean;
|
|
6
|
+
alwaysSkillsBaseline: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function initScheduleTurnContext(state: TurnContextBridgeState, ctx: ScheduleTurnContext): void;
|
|
9
|
+
export declare function initInboundTurnContext(state: TurnContextBridgeState): void;
|
|
10
|
+
export declare function getTurnActiveSkills(state: TurnContextBridgeState): string;
|
|
11
|
+
export declare function runInTurnContext<T>(state: TurnContextBridgeState, config: Required<ZhinAgentConfig>, turnId: string, fn: () => Promise<T>): Promise<T>;
|
|
12
|
+
export declare function appendActiveSkills(fragment: string): void;
|
|
13
|
+
//# sourceMappingURL=turn-context-bridge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-context-bridge.d.ts","sourceRoot":"","sources":["../../src/turn/turn-context-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,mBAAmB,EAAmG,MAAM,6BAA6B,CAAC;AAExK,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC1D,MAAM,WAAW,sBAAsB;IACrC,0BAA0B,CAAC,EAAE,mBAAmB,CAAC;IACjD,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAC1C,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,sBAAsB,EAAE,GAAG,EAAE,mBAAmB,GAAG,IAAI,CAGrG;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI,CAG1E;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,sBAAsB,GAAG,MAAM,CAIzE;AAED,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,KAAK,EAAE,sBAAsB,EAC7B,MAAM,EAAE,QAAQ,CAAC,eAAe,CAAC,EACjC,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GACnB,OAAO,CAAC,CAAC,CAAC,CAUZ;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAEzD"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { appendTurnActiveSkills, getTurnActiveSkillsFromContext, runInTurnContext as runInTurnContextAls } from '../internal/turn-context.js';
|
|
2
|
+
import { TurnTracker } from './turn-tracker.js';
|
|
3
|
+
export function initScheduleTurnContext(state, ctx) {
|
|
4
|
+
state.pendingScheduleTurnContext = ctx;
|
|
5
|
+
state.pendingActivityFeedbackEligible = false;
|
|
6
|
+
}
|
|
7
|
+
export function initInboundTurnContext(state) {
|
|
8
|
+
state.pendingActivityFeedbackEligible = true;
|
|
9
|
+
state.pendingScheduleTurnContext = undefined;
|
|
10
|
+
}
|
|
11
|
+
export function getTurnActiveSkills(state) {
|
|
12
|
+
const fromTurn = getTurnActiveSkillsFromContext();
|
|
13
|
+
if (fromTurn)
|
|
14
|
+
return fromTurn;
|
|
15
|
+
return state.alwaysSkillsBaseline;
|
|
16
|
+
}
|
|
17
|
+
export function runInTurnContext(state, config, turnId, fn) {
|
|
18
|
+
const tracker = new TurnTracker(config.subagentTurnWaitMs);
|
|
19
|
+
const scheduleContext = state.pendingScheduleTurnContext;
|
|
20
|
+
const activityFeedbackEligible = state.pendingActivityFeedbackEligible;
|
|
21
|
+
state.pendingScheduleTurnContext = undefined;
|
|
22
|
+
state.pendingActivityFeedbackEligible = undefined;
|
|
23
|
+
const init = {};
|
|
24
|
+
if (scheduleContext)
|
|
25
|
+
init.scheduleContext = scheduleContext;
|
|
26
|
+
if (activityFeedbackEligible)
|
|
27
|
+
init.activityFeedbackEligible = true;
|
|
28
|
+
return runInTurnContextAls(turnId, tracker, fn, Object.keys(init).length ? init : undefined);
|
|
29
|
+
}
|
|
30
|
+
export function appendActiveSkills(fragment) {
|
|
31
|
+
appendTurnActiveSkills(fragment);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=turn-context-bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-context-bridge.js","sourceRoot":"","sources":["../../src/turn/turn-context-bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,sBAAsB,EAAE,8BAA8B,EAAE,gBAAgB,IAAI,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACxK,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAQhD,MAAM,UAAU,uBAAuB,CAAC,KAA6B,EAAE,GAAwB;IAC7F,KAAK,CAAC,0BAA0B,GAAG,GAAG,CAAC;IACvC,KAAK,CAAC,+BAA+B,GAAG,KAAK,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,sBAAsB,CAAC,KAA6B;IAClE,KAAK,CAAC,+BAA+B,GAAG,IAAI,CAAC;IAC7C,KAAK,CAAC,0BAA0B,GAAG,SAAS,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAA6B;IAC/D,MAAM,QAAQ,GAAG,8BAA8B,EAAE,CAAC;IAClD,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC;IAC9B,OAAO,KAAK,CAAC,oBAAoB,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC9B,KAA6B,EAC7B,MAAiC,EACjC,MAAc,EACd,EAAoB;IAEpB,MAAM,OAAO,GAAG,IAAI,WAAW,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;IAC3D,MAAM,eAAe,GAAG,KAAK,CAAC,0BAA0B,CAAC;IACzD,MAAM,wBAAwB,GAAG,KAAK,CAAC,+BAA+B,CAAC;IACvE,KAAK,CAAC,0BAA0B,GAAG,SAAS,CAAC;IAC7C,KAAK,CAAC,+BAA+B,GAAG,SAAS,CAAC;IAClD,MAAM,IAAI,GAA0H,EAAE,CAAC;IACvI,IAAI,eAAe;QAAE,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IAC5D,IAAI,wBAAwB;QAAE,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC;IACnE,OAAO,mBAAmB,CAAC,MAAM,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;AAC/F,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,QAAgB;IACjD,sBAAsB,CAAC,QAAQ,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DeferredToolSessionSnapshot } from '@zhin.js/ai';
|
|
2
|
+
export declare function computeDeferredDelta(after: DeferredToolSessionSnapshot, alwaysLoadedTools?: Iterable<string>, beforeOverride?: DeferredToolSessionSnapshot): {
|
|
3
|
+
tools: string[];
|
|
4
|
+
skills: string[];
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=turn-deferred-delta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-deferred-delta.d.ts","sourceRoot":"","sources":["../../src/turn/turn-deferred-delta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAI/D,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,2BAA2B,EAClC,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAM,EACxC,cAAc,CAAC,EAAE,2BAA2B,GAC3C;IAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAsBvC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DEFERRED_META_TOOL_NAMES } from '../tool-catalog/types.js';
|
|
2
|
+
import { getDeferredSnapshotBefore } from '../internal/turn-context.js';
|
|
3
|
+
export function computeDeferredDelta(after, alwaysLoadedTools = [], beforeOverride) {
|
|
4
|
+
const before = beforeOverride ?? getDeferredSnapshotBefore();
|
|
5
|
+
if (!before) {
|
|
6
|
+
return { tools: [], skills: [] };
|
|
7
|
+
}
|
|
8
|
+
const excludeTools = new Set([
|
|
9
|
+
...DEFERRED_META_TOOL_NAMES,
|
|
10
|
+
...alwaysLoadedTools,
|
|
11
|
+
]);
|
|
12
|
+
const beforeSkills = new Set(before.loadedSkills);
|
|
13
|
+
const skills = after.loadedSkills.filter((name) => !beforeSkills.has(name));
|
|
14
|
+
const beforeToolKeys = new Set(Object.keys(before.loadedTools));
|
|
15
|
+
const tools = Object.keys(after.loadedTools).filter((name) => {
|
|
16
|
+
if (beforeToolKeys.has(name))
|
|
17
|
+
return false;
|
|
18
|
+
if (excludeTools.has(name))
|
|
19
|
+
return false;
|
|
20
|
+
return true;
|
|
21
|
+
});
|
|
22
|
+
return { tools, skills };
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=turn-deferred-delta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-deferred-delta.js","sourceRoot":"","sources":["../../src/turn/turn-deferred-delta.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,UAAU,oBAAoB,CAClC,KAAkC,EAClC,oBAAsC,EAAE,EACxC,cAA4C;IAE5C,MAAM,MAAM,GAAG,cAAc,IAAI,yBAAyB,EAAE,CAAC;IAC7D,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IACnC,CAAC;IAED,MAAM,YAAY,GAAG,IAAI,GAAG,CAAS;QACnC,GAAG,wBAAwB;QAC3B,GAAG,iBAAiB;KACrB,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAE5E,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;IAChE,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QAC3D,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,OAAO,KAAK,CAAC;QAC3C,IAAI,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,OAAO,KAAK,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAC3B,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { OutputElement, Usage } from '@zhin.js/ai';
|
|
2
|
+
export type { HostTurnPath as ZhinAgentTurnPath, HostTurnMetrics as ZhinAgentTurnMetrics } from '../internal/host-types.js';
|
|
3
|
+
import type { HostTurnMetrics as ZhinAgentTurnMetrics } from '../internal/host-types.js';
|
|
4
|
+
export declare function addUsage(target: Usage, source?: Usage): void;
|
|
5
|
+
export declare const EMPTY_USAGE: Usage;
|
|
6
|
+
export interface AiHandlerTurnLogContext {
|
|
7
|
+
userInput?: string;
|
|
8
|
+
thinking?: string;
|
|
9
|
+
output?: string;
|
|
10
|
+
path?: string;
|
|
11
|
+
}
|
|
12
|
+
/** AI Handler 层统一汇总日志(框线表格) */
|
|
13
|
+
export declare function formatAiHandlerTurnTable(metrics: ZhinAgentTurnMetrics, totalMs: number, context?: AiHandlerTurnLogContext): string;
|
|
14
|
+
/** @deprecated 使用 formatAiHandlerTurnTable */
|
|
15
|
+
export declare function formatAiHandlerCompleteLog(metrics: ZhinAgentTurnMetrics, totalMs: number): string;
|
|
16
|
+
/** OutputElement[] → 日志预览文本 */
|
|
17
|
+
export declare function formatOutputElementsPreview(elements: OutputElement[]): string | undefined;
|
|
18
|
+
/** @deprecated 使用 formatCompactUsage from @zhin.js/logger */
|
|
19
|
+
export declare function formatZhinAgentTurnUsage(usage: Usage, subagentUsage?: Usage): string;
|
|
20
|
+
export declare function formatAiHandlerFallbackLog(totalMs: number, path?: string): string;
|
|
21
|
+
//# sourceMappingURL=turn-metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-metrics.d.ts","sourceRoot":"","sources":["../../src/turn/turn-metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAWxD,YAAY,EAAE,YAAY,IAAI,iBAAiB,EAAE,eAAe,IAAI,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAC5H,OAAO,KAAK,EAAE,eAAe,IAAI,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAKzF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,KAAK,GAAG,IAAI,CAK5D;AAED,eAAO,MAAM,WAAW,EAAE,KAIzB,CAAC;AAEF,MAAM,WAAW,uBAAuB;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AA0BD,+BAA+B;AAC/B,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,uBAA4B,GACpC,MAAM,CAyBR;AAED,8CAA8C;AAC9C,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjG;AAED,+BAA+B;AAC/B,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,MAAM,GAAG,SAAS,CAOzF;AAED,6DAA6D;AAC7D,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,KAAK,EAAE,aAAa,CAAC,EAAE,KAAK,GAAG,MAAM,CAEpF;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAKjF"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { formatCompactLog, formatCompactUsage, formatLogKvTable, truncatePreview, wrapDisplayText, } from '@zhin.js/logger';
|
|
2
|
+
import chalk from 'chalk';
|
|
3
|
+
const HANDLER_VALUE_WIDTH = 54;
|
|
4
|
+
const PREVIEW_MAX_CHARS = 320;
|
|
5
|
+
export function addUsage(target, source) {
|
|
6
|
+
if (!source)
|
|
7
|
+
return;
|
|
8
|
+
target.prompt_tokens += source.prompt_tokens;
|
|
9
|
+
target.completion_tokens += source.completion_tokens;
|
|
10
|
+
target.total_tokens += source.total_tokens;
|
|
11
|
+
}
|
|
12
|
+
export const EMPTY_USAGE = {
|
|
13
|
+
prompt_tokens: 0,
|
|
14
|
+
completion_tokens: 0,
|
|
15
|
+
total_tokens: 0,
|
|
16
|
+
};
|
|
17
|
+
function normalizePreviewText(text) {
|
|
18
|
+
return text.replace(/\s+/g, ' ').trim();
|
|
19
|
+
}
|
|
20
|
+
function previewToKvRows(label, raw, maxWidth) {
|
|
21
|
+
const normalized = normalizePreviewText(raw ?? '');
|
|
22
|
+
if (!normalized) {
|
|
23
|
+
return [{ label, value: chalk.dim('·') }];
|
|
24
|
+
}
|
|
25
|
+
const clipped = truncatePreview(normalized, PREVIEW_MAX_CHARS);
|
|
26
|
+
const lines = wrapDisplayText(clipped, maxWidth);
|
|
27
|
+
return lines.map((line, index) => ({
|
|
28
|
+
label: index === 0 ? label : '',
|
|
29
|
+
value: line,
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
function buildModeLine(metrics) {
|
|
33
|
+
const parts = [`mode: ${metrics.path}`];
|
|
34
|
+
if (metrics.iterations != null)
|
|
35
|
+
parts.push(`iter: ${metrics.iterations}`);
|
|
36
|
+
if (metrics.model)
|
|
37
|
+
parts.push(`model: ${metrics.model}`);
|
|
38
|
+
return parts.join(' · ');
|
|
39
|
+
}
|
|
40
|
+
/** AI Handler 层统一汇总日志(框线表格) */
|
|
41
|
+
export function formatAiHandlerTurnTable(metrics, totalMs, context = {}) {
|
|
42
|
+
const userInput = context.userInput ?? metrics.userInput;
|
|
43
|
+
const thinking = context.thinking ?? metrics.thinking;
|
|
44
|
+
const output = context.output ?? metrics.output;
|
|
45
|
+
const rows = [
|
|
46
|
+
{ label: '耗时', value: `${Math.round(totalMs)} ms` },
|
|
47
|
+
{ label: 'Token', value: formatCompactUsage(metrics.usage, metrics.subagentUsage) },
|
|
48
|
+
{ label: '模式', value: buildModeLine(metrics) },
|
|
49
|
+
];
|
|
50
|
+
const contentRows = [
|
|
51
|
+
...previewToKvRows('用户输入', userInput, HANDLER_VALUE_WIDTH),
|
|
52
|
+
...previewToKvRows('思考', thinking, HANDLER_VALUE_WIDTH),
|
|
53
|
+
...previewToKvRows('输出', output, HANDLER_VALUE_WIDTH),
|
|
54
|
+
];
|
|
55
|
+
const sectionBreaks = [rows.length - 1];
|
|
56
|
+
rows.push(...contentRows);
|
|
57
|
+
return formatLogKvTable(rows, {
|
|
58
|
+
title: chalk.bold.cyan(`AI Handler · ${Math.round(totalMs)} ms`),
|
|
59
|
+
sectionBreaks,
|
|
60
|
+
maxValueWidth: HANDLER_VALUE_WIDTH,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/** @deprecated 使用 formatAiHandlerTurnTable */
|
|
64
|
+
export function formatAiHandlerCompleteLog(metrics, totalMs) {
|
|
65
|
+
return formatAiHandlerTurnTable(metrics, totalMs);
|
|
66
|
+
}
|
|
67
|
+
/** OutputElement[] → 日志预览文本 */
|
|
68
|
+
export function formatOutputElementsPreview(elements) {
|
|
69
|
+
const text = elements.map((el) => {
|
|
70
|
+
if (el.type === 'text')
|
|
71
|
+
return el.content || '';
|
|
72
|
+
if (el.type === 'image')
|
|
73
|
+
return `<image url="${el.url}"/>`;
|
|
74
|
+
return '';
|
|
75
|
+
}).join('\n').trim();
|
|
76
|
+
return text || undefined;
|
|
77
|
+
}
|
|
78
|
+
/** @deprecated 使用 formatCompactUsage from @zhin.js/logger */
|
|
79
|
+
export function formatZhinAgentTurnUsage(usage, subagentUsage) {
|
|
80
|
+
return formatCompactUsage(usage, subagentUsage);
|
|
81
|
+
}
|
|
82
|
+
export function formatAiHandlerFallbackLog(totalMs, path) {
|
|
83
|
+
return formatCompactLog('AI Handler', {
|
|
84
|
+
total_ms: Math.round(totalMs),
|
|
85
|
+
...(path ? { path } : { usage: 'n/a' }),
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=turn-metrics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-metrics.js","sourceRoot":"","sources":["../../src/turn/turn-metrics.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,eAAe,GAEhB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAE9B,MAAM,UAAU,QAAQ,CAAC,MAAa,EAAE,MAAc;IACpD,IAAI,CAAC,MAAM;QAAE,OAAO;IACpB,MAAM,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14 @@
|
|
|
1
|
+
import { type ContentPart } from '@zhin.js/ai';
|
|
2
|
+
import type { TurnEvent } from '../event/turn-event.js';
|
|
3
|
+
import type { ZhinAgentPrivate, OnChunkCallback, OutputElement, Tool } from '../internal/agent-host.js';
|
|
4
|
+
import type { Message } from '@zhin.js/core';
|
|
5
|
+
export interface ProcessTextTurnOptions {
|
|
6
|
+
prebuiltMessages?: import('@zhin.js/ai').AgentMessage[];
|
|
7
|
+
/** Deferred worker 完成后的内部自动续聊 turn(跳过速率限制、不重置续聊深度) */
|
|
8
|
+
deferredAutoContinue?: boolean;
|
|
9
|
+
/** Tap AgentCore.runText TurnEvent stream (processMessageStream) */
|
|
10
|
+
onTurnEvent?: (event: TurnEvent) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function processTextTurn(host: ZhinAgentPrivate, content: string, commMessage: Message, externalTools?: Tool[], onChunk?: OnChunkCallback, extras?: ProcessTextTurnOptions): Promise<OutputElement[]>;
|
|
13
|
+
export declare function processMultimodalTurn(host: ZhinAgentPrivate, parts: ContentPart[], commMessage: Message, onChunk?: OnChunkCallback): Promise<OutputElement[]>;
|
|
14
|
+
//# sourceMappingURL=turn-pipeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-pipeline.d.ts","sourceRoot":"","sources":["../../src/turn/turn-pipeline.ts"],"names":[],"mappings":"AAIA,OAAO,EAAqC,KAAK,WAAW,EAAE,MAAM,aAAa,CAAC;AAalF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAMxD,OAAO,KAAK,EACV,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,IAAI,EACL,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAmB7C,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,CAAC,EAAE,OAAO,aAAa,EAAE,YAAY,EAAE,CAAC;IACxD,sDAAsD;IACtD,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,oEAAoE;IACpE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;CAC1C;AAED,wBAAsB,eAAe,CACnC,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,OAAO,EACpB,aAAa,GAAE,IAAI,EAAO,EAC1B,OAAO,CAAC,EAAE,eAAe,EACzB,MAAM,CAAC,EAAE,sBAAsB,GAC9B,OAAO,CAAC,aAAa,EAAE,CAAC,CAmJ1B;AAED,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,gBAAgB,EACtB,KAAK,EAAE,WAAW,EAAE,EACpB,WAAW,EAAE,OAAO,EACpB,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,aAAa,EAAE,CAAC,CA6G1B"}
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
import { formatCompact, Logger } from '@zhin.js/logger';
|
|
2
|
+
import { AgentStreamEventType } from '@zhin.js/ai/agent-stream';
|
|
3
|
+
import { publishAgentStream } from '../event/publish-agent-stream.js';
|
|
4
|
+
import { readHttpSessionId } from '../session/resolve-session-interaction-port.js';
|
|
5
|
+
import { userMessagePlainText, parseOutput } from '@zhin.js/ai';
|
|
6
|
+
import { providerSupportsVision } from '../media/vision-capability.js';
|
|
7
|
+
import { buildMultimodalVisionSystemPrompt } from '../prompt/assembly.js';
|
|
8
|
+
import { TurnSupersededError } from './prompt-controller.js';
|
|
9
|
+
import { buildVisionUserMessage, summarizeMultimodalParts } from './multimodal-message.js';
|
|
10
|
+
import { EMPTY_USAGE } from './turn-metrics.js';
|
|
11
|
+
import { logPhase } from '../internal/phase-trace.js';
|
|
12
|
+
import { DEFAULT_MULTIMODAL_CONFIG } from '../media/media-types.js';
|
|
13
|
+
import { prepareTurnTools } from '../tool/prepare-turn-tools.js';
|
|
14
|
+
import { defaultAgentCore } from '../core/agent-core.js';
|
|
15
|
+
import { buildTextTurnOutbound, finalizeTurnAfterAgentLoop, handleTurnSuperseded, } from './turn-complete.js';
|
|
16
|
+
function requireSessionSystem(host) {
|
|
17
|
+
if (!host.sessionSystem) {
|
|
18
|
+
throw new Error('ZhinAgent.sessionSystem is required');
|
|
19
|
+
}
|
|
20
|
+
return host.sessionSystem;
|
|
21
|
+
}
|
|
22
|
+
function requireContextSystem(host) {
|
|
23
|
+
if (!host.contextSystem) {
|
|
24
|
+
throw new Error('ZhinAgent.contextSystem is required');
|
|
25
|
+
}
|
|
26
|
+
return host.contextSystem;
|
|
27
|
+
}
|
|
28
|
+
const logger = new Logger(null, 'ZhinAgent');
|
|
29
|
+
const now = () => performance.now();
|
|
30
|
+
export async function processTextTurn(host, content, commMessage, externalTools = [], onChunk, extras) {
|
|
31
|
+
const t0 = now();
|
|
32
|
+
const sessionSystem = requireSessionSystem(host);
|
|
33
|
+
const prep = await sessionSystem.prepareTextTurn(host, commMessage, content, {
|
|
34
|
+
deferredAutoContinue: extras?.deferredAutoContinue,
|
|
35
|
+
});
|
|
36
|
+
const { sessionKey, userId, sessionId, isNewSession, turnUser } = prep;
|
|
37
|
+
const httpSessionId = readHttpSessionId(commMessage);
|
|
38
|
+
if (isNewSession && !httpSessionId) {
|
|
39
|
+
publishAgentStream(host, {
|
|
40
|
+
type: AgentStreamEventType.SESSION_STARTED,
|
|
41
|
+
data: { sessionId },
|
|
42
|
+
}, { sessionId, httpSessionId });
|
|
43
|
+
}
|
|
44
|
+
await host.emitter.dispatch('ai.processing.start', host.emitter.createPayload(sessionId, commMessage, 'text', {
|
|
45
|
+
content,
|
|
46
|
+
}));
|
|
47
|
+
logPhase(host.phaseConfig, 'turn.start', sessionId, {
|
|
48
|
+
mode: 'text',
|
|
49
|
+
provider: host.getTurnProvider().name,
|
|
50
|
+
});
|
|
51
|
+
if (!extras?.deferredAutoContinue) {
|
|
52
|
+
const rateCheck = host.rateLimiter.check(userId);
|
|
53
|
+
if (!rateCheck.allowed) {
|
|
54
|
+
logPhase(host.phaseConfig, 'turn.rate_limited', sessionId, { userId });
|
|
55
|
+
logger.debug(`[速率限制] 用户 ${userId} 被限制: ${rateCheck.message}`);
|
|
56
|
+
await host.emitter.dispatch('ai.processing.finish', host.emitter.createPayload(sessionId, commMessage, 'text', {
|
|
57
|
+
path: 'rate_limited',
|
|
58
|
+
reply: rateCheck.message || '请稍后再试',
|
|
59
|
+
reason: 'rate_limited',
|
|
60
|
+
}));
|
|
61
|
+
await host.finalizeActiveTurn({ usage: EMPTY_USAGE, path: 'rate_limited' });
|
|
62
|
+
return parseOutput(rateCheck.message || '请稍后再试');
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
host.emitter.emit('ai.typing.start', host.emitter.createPayload(sessionId, commMessage, 'text', {
|
|
66
|
+
reason: 'processing',
|
|
67
|
+
}));
|
|
68
|
+
host.beginActiveTurn();
|
|
69
|
+
const turnBinding = host.activeBinding;
|
|
70
|
+
const mcpServerNames = turnBinding?.mcpServers ?? [];
|
|
71
|
+
const tFilter = now();
|
|
72
|
+
const toolsPrep = await prepareTurnTools(host, {
|
|
73
|
+
content,
|
|
74
|
+
commMessage,
|
|
75
|
+
externalTools,
|
|
76
|
+
sessionId,
|
|
77
|
+
userId,
|
|
78
|
+
mcpServerNames,
|
|
79
|
+
});
|
|
80
|
+
const { contextForTools, allTools, resolvedTools, deferredStats, } = toolsPrep;
|
|
81
|
+
publishAgentStream(host, {
|
|
82
|
+
type: AgentStreamEventType.MESSAGE_RECEIVED,
|
|
83
|
+
data: { message: content },
|
|
84
|
+
}, { sessionId, httpSessionId: readHttpSessionId(commMessage) });
|
|
85
|
+
const filterMs = (now() - tFilter).toFixed(0);
|
|
86
|
+
logPhase(host.phaseConfig, 'tools.collected', sessionId, { count: resolvedTools.length });
|
|
87
|
+
logger.debug(formatCompact({
|
|
88
|
+
tools: resolvedTools.length,
|
|
89
|
+
tool_search: true,
|
|
90
|
+
names: resolvedTools.map(t => t.name).join(',') || '(none)',
|
|
91
|
+
}));
|
|
92
|
+
const turnCtx = await requireContextSystem(host).buildTextTurnContext({
|
|
93
|
+
host,
|
|
94
|
+
commMessage,
|
|
95
|
+
content,
|
|
96
|
+
turnUser,
|
|
97
|
+
deferredStats,
|
|
98
|
+
prebuiltMessages: extras?.prebuiltMessages,
|
|
99
|
+
});
|
|
100
|
+
const { userMessages, personaEnhanced: personaForChat, modelCandidates: chatCandidates, modelId, } = turnCtx;
|
|
101
|
+
logPhase(host.phaseConfig, 'path.agent_loop', sessionId, {
|
|
102
|
+
toolCount: resolvedTools.length,
|
|
103
|
+
});
|
|
104
|
+
let loopResult;
|
|
105
|
+
try {
|
|
106
|
+
loopResult = await host.promptController.schedule({
|
|
107
|
+
sessionKey,
|
|
108
|
+
sessionId,
|
|
109
|
+
userMessages,
|
|
110
|
+
commMessage,
|
|
111
|
+
onChunk,
|
|
112
|
+
execute: (initialMessages, hooks, signal, _turnId) => (host.agentCore ?? defaultAgentCore).runTextTurn({
|
|
113
|
+
host,
|
|
114
|
+
sessionId,
|
|
115
|
+
userMessageExtra: turnUser.userMessageExtra,
|
|
116
|
+
rawContent: turnUser.rawContent,
|
|
117
|
+
commMessage,
|
|
118
|
+
contextForTools,
|
|
119
|
+
allTools,
|
|
120
|
+
resolvedTools,
|
|
121
|
+
personaEnhanced: personaForChat,
|
|
122
|
+
modelId,
|
|
123
|
+
modelCandidates: chatCandidates,
|
|
124
|
+
onChunk,
|
|
125
|
+
initialMessages,
|
|
126
|
+
promptHooks: hooks,
|
|
127
|
+
signal,
|
|
128
|
+
deferredStats,
|
|
129
|
+
onTurnEvent: extras?.onTurnEvent,
|
|
130
|
+
}),
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
catch (err) {
|
|
134
|
+
if (err instanceof TurnSupersededError) {
|
|
135
|
+
return handleTurnSuperseded(host, sessionId, commMessage, 'text', err);
|
|
136
|
+
}
|
|
137
|
+
throw err;
|
|
138
|
+
}
|
|
139
|
+
const reply = loopResult.reply;
|
|
140
|
+
await finalizeTurnAfterAgentLoop({
|
|
141
|
+
host,
|
|
142
|
+
sessionSystem,
|
|
143
|
+
sessionId,
|
|
144
|
+
commMessage,
|
|
145
|
+
mode: 'text',
|
|
146
|
+
loopResult,
|
|
147
|
+
isNewSession,
|
|
148
|
+
rawContent: turnUser.rawContent,
|
|
149
|
+
reply,
|
|
150
|
+
filterMs,
|
|
151
|
+
startedAt: t0,
|
|
152
|
+
});
|
|
153
|
+
return buildTextTurnOutbound(reply, loopResult);
|
|
154
|
+
}
|
|
155
|
+
export async function processMultimodalTurn(host, parts, commMessage, onChunk) {
|
|
156
|
+
const sessionSystem = requireSessionSystem(host);
|
|
157
|
+
const textContent = summarizeMultimodalParts(parts, providerSupportsVision(host.getTurnProvider()));
|
|
158
|
+
const prep = await sessionSystem.prepareTextTurn(host, commMessage, textContent);
|
|
159
|
+
const { sessionKey, userId, sessionId, isNewSession, turnUser } = prep;
|
|
160
|
+
await host.emitter.dispatch('ai.processing.start', host.emitter.createPayload(sessionId, commMessage, 'multimodal'));
|
|
161
|
+
const rateCheck = host.rateLimiter.check(userId);
|
|
162
|
+
if (!rateCheck.allowed) {
|
|
163
|
+
await host.emitter.dispatch('ai.processing.finish', host.emitter.createPayload(sessionId, commMessage, 'multimodal', {
|
|
164
|
+
path: 'rate_limited',
|
|
165
|
+
reply: rateCheck.message || '请稍后再试',
|
|
166
|
+
reason: 'rate_limited',
|
|
167
|
+
}));
|
|
168
|
+
await host.finalizeActiveTurn({ usage: EMPTY_USAGE, path: 'rate_limited' });
|
|
169
|
+
return parseOutput(rateCheck.message || '请稍后再试');
|
|
170
|
+
}
|
|
171
|
+
host.emitter.emit('ai.typing.start', host.emitter.createPayload(sessionId, commMessage, 'multimodal', {
|
|
172
|
+
reason: 'processing',
|
|
173
|
+
}));
|
|
174
|
+
host.beginActiveTurn();
|
|
175
|
+
const supportsVision = providerSupportsVision(host.getTurnProvider());
|
|
176
|
+
const personaForVision = host.buildDisciplinedPrompt(host.config.persona);
|
|
177
|
+
const visionSystemPrompt = await buildMultimodalVisionSystemPrompt(host, {
|
|
178
|
+
commMessage,
|
|
179
|
+
sessionId,
|
|
180
|
+
textContent,
|
|
181
|
+
personaEnhanced: personaForVision,
|
|
182
|
+
});
|
|
183
|
+
const turnCtx = await requireContextSystem(host).buildTextTurnContext({
|
|
184
|
+
host,
|
|
185
|
+
commMessage,
|
|
186
|
+
content: textContent,
|
|
187
|
+
turnUser,
|
|
188
|
+
mode: 'vision',
|
|
189
|
+
});
|
|
190
|
+
const { modelCandidates: visionCandidates } = turnCtx;
|
|
191
|
+
logPhase(host.phaseConfig, 'path.agent_loop', sessionId, { mode: 'multimodal' });
|
|
192
|
+
const firstPrompt = turnUser.promptMessages[0];
|
|
193
|
+
const userMessage = await buildVisionUserMessage(firstPrompt ? userMessagePlainText(firstPrompt) : textContent, parts, supportsVision, DEFAULT_MULTIMODAL_CONFIG.maxFileBytes);
|
|
194
|
+
const { userMessages } = await requireContextSystem(host).buildTextTurnContext({
|
|
195
|
+
host,
|
|
196
|
+
commMessage,
|
|
197
|
+
content: textContent,
|
|
198
|
+
turnUser,
|
|
199
|
+
mode: 'vision',
|
|
200
|
+
prebuiltMessages: [userMessage],
|
|
201
|
+
});
|
|
202
|
+
let loopResult;
|
|
203
|
+
try {
|
|
204
|
+
loopResult = await host.promptController.schedule({
|
|
205
|
+
sessionKey,
|
|
206
|
+
sessionId,
|
|
207
|
+
userMessages,
|
|
208
|
+
commMessage,
|
|
209
|
+
onChunk,
|
|
210
|
+
execute: (initialMessages, hooks, signal, _turnId) => (host.agentCore ?? defaultAgentCore).runVisionTurn({
|
|
211
|
+
host,
|
|
212
|
+
sessionId,
|
|
213
|
+
commMessage,
|
|
214
|
+
visionSystemPrompt,
|
|
215
|
+
userMessages: initialMessages,
|
|
216
|
+
modelCandidates: visionCandidates,
|
|
217
|
+
onChunk,
|
|
218
|
+
promptHooks: hooks,
|
|
219
|
+
signal,
|
|
220
|
+
}),
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
catch (err) {
|
|
224
|
+
if (err instanceof TurnSupersededError) {
|
|
225
|
+
return handleTurnSuperseded(host, sessionId, commMessage, 'multimodal', err);
|
|
226
|
+
}
|
|
227
|
+
loopResult = {
|
|
228
|
+
reply: '抱歉,我无法理解这条消息。',
|
|
229
|
+
usage: EMPTY_USAGE,
|
|
230
|
+
path: 'multimodal',
|
|
231
|
+
iterations: 0,
|
|
232
|
+
model: visionCandidates[0] || '',
|
|
233
|
+
toolCalls: [],
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
const reply = loopResult.reply;
|
|
237
|
+
await finalizeTurnAfterAgentLoop({
|
|
238
|
+
host,
|
|
239
|
+
sessionSystem,
|
|
240
|
+
sessionId,
|
|
241
|
+
commMessage,
|
|
242
|
+
mode: 'multimodal',
|
|
243
|
+
loopResult,
|
|
244
|
+
isNewSession,
|
|
245
|
+
rawContent: turnUser.rawContent,
|
|
246
|
+
reply,
|
|
247
|
+
finishPath: 'multimodal',
|
|
248
|
+
});
|
|
249
|
+
return parseOutput(reply);
|
|
250
|
+
}
|
|
251
|
+
//# sourceMappingURL=turn-pipeline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"turn-pipeline.js","sourceRoot":"","sources":["../../src/turn/turn-pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAoB,MAAM,aAAa,CAAC;AAClF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,mBA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