@zhin.js/agent 0.3.1 → 1.0.2
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 +51 -0
- package/lib/activity-feedback/adapter-integration.d.ts.map +1 -0
- package/lib/activity-feedback/adapter-integration.js +130 -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 +65 -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/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/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 +59 -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 +193 -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 +188 -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/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 +61 -0
- package/lib/core/agent-core-run.d.ts.map +1 -0
- package/lib/core/agent-core-run.js +588 -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.map +1 -0
- package/lib/core/tool-calls-user-format.d.ts.map +1 -0
- package/lib/core/tool-calls-user-format.js +138 -0
- package/lib/core/tool-calls-user-format.js.map +1 -0
- package/lib/core/turn-event-mapper.d.ts +12 -0
- package/lib/core/turn-event-mapper.d.ts.map +1 -0
- package/lib/core/turn-event-mapper.js +54 -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 +9 -11
- 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/agents.d.ts +10 -1
- package/lib/discovery/agents.d.ts.map +1 -1
- package/lib/discovery/agents.js +11 -1
- package/lib/discovery/agents.js.map +1 -1
- 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/index.d.ts +11 -0
- package/lib/event/index.d.ts.map +1 -0
- package/lib/event/index.js +8 -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/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/index.d.ts +46 -26
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +30 -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/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 +161 -134
- 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/management-command-guard.d.ts +2 -5
- package/lib/init/management-command-guard.d.ts.map +1 -1
- package/lib/init/management-command-guard.js +2 -16
- 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 +28 -295
- 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 +9 -8
- 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 +14 -9
- 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 -33
- 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.js +6 -6
- package/lib/init.js.map +1 -1
- package/lib/internal/agent-host.d.ts +86 -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 +81 -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/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 +11 -2
- package/lib/media/media-router.d.ts.map +1 -1
- package/lib/media/media-router.js +62 -4
- 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/media-types.d.ts +1 -1
- package/lib/media/media-types.d.ts.map +1 -1
- package/lib/media/media-types.js +1 -1
- package/lib/media/media-types.js.map +1 -1
- package/lib/media/resolve-config.d.ts +1 -0
- package/lib/media/resolve-config.d.ts.map +1 -1
- package/lib/media/resolve-config.js +5 -0
- package/lib/media/resolve-config.js.map +1 -1
- package/lib/media/subagent-inbound.d.ts.map +1 -1
- package/lib/media/subagent-inbound.js +33 -4
- package/lib/media/subagent-inbound.js.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/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 +18 -3
- package/lib/orchestrator/hook-registry.d.ts.map +1 -1
- package/lib/orchestrator/hook-registry.js +66 -2
- package/lib/orchestrator/hook-registry.js.map +1 -1
- package/lib/orchestrator/index.d.ts +7 -1
- package/lib/orchestrator/index.d.ts.map +1 -1
- package/lib/orchestrator/index.js +4 -1
- package/lib/orchestrator/index.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 +1 -2
- package/lib/orchestrator/tool-selection.js.map +1 -1
- package/lib/orchestrator/types.d.ts +52 -0
- 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 +90 -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 +496 -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/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 +10 -8
- package/lib/security/sandbox-enhanced.js.map +1 -1
- package/lib/security/sandbox.d.ts.map +1 -1
- package/lib/security/sandbox.js +5 -4
- 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/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/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/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/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/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/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/task-executor.d.ts +14 -10
- package/lib/task-executor.d.ts.map +1 -1
- package/lib/task-executor.js +94 -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 +72 -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 +73 -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-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 +56 -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 +63 -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 +10 -0
- package/lib/turn/turn-metrics.d.ts.map +1 -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 +242 -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 +1 -329
- package/lib/typing-indicator/adapter-integration.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 -332
- 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 +59 -6
- 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.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.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}/text-sanitize.js +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-metrics.js +0 -0
- /package/lib/{zhin-agent → turn}/turn-tracker.d.ts +0 -0
- /package/lib/{zhin-agent → turn}/turn-tracker.js +0 -0
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DelegationProcessor — 处理入站 MCP agent.delegate_task 创建的待执行委托。
|
|
3
|
-
*/
|
|
4
|
-
import { randomUUID } from 'node:crypto';
|
|
5
|
-
import { Logger } from '@zhin.js/logger';
|
|
6
|
-
import { createSyntheticMessage } from '@zhin.js/core';
|
|
7
|
-
import { getOrchestrationService } from './orchestration-service.js';
|
|
8
|
-
import { getAgentDispatcher } from './agent-dispatcher.js';
|
|
9
|
-
const logger = new Logger(null, 'DelegationProcessor');
|
|
10
|
-
const DELEGATION_SESSION_PREFIX = 'mesh:delegation:';
|
|
11
|
-
export class DelegationProcessor {
|
|
12
|
-
options;
|
|
13
|
-
timer = null;
|
|
14
|
-
processing = new Set();
|
|
15
|
-
constructor(options) {
|
|
16
|
-
this.options = options;
|
|
17
|
-
}
|
|
18
|
-
start() {
|
|
19
|
-
if (this.timer)
|
|
20
|
-
return;
|
|
21
|
-
const ms = this.options.pollIntervalMs ?? 5_000;
|
|
22
|
-
this.timer = setInterval(() => void this.tick(), ms);
|
|
23
|
-
if (this.timer && typeof this.timer === 'object' && 'unref' in this.timer) {
|
|
24
|
-
this.timer.unref();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
stop() {
|
|
28
|
-
if (this.timer) {
|
|
29
|
-
clearInterval(this.timer);
|
|
30
|
-
this.timer = null;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
async createDelegation(payload) {
|
|
34
|
-
const orch = getOrchestrationService();
|
|
35
|
-
if (!orch)
|
|
36
|
-
throw new Error('OrchestrationService not ready');
|
|
37
|
-
const taskId = randomUUID().slice(0, 8);
|
|
38
|
-
const sessionKey = `${DELEGATION_SESSION_PREFIX}${taskId}`;
|
|
39
|
-
const snapshot = await orch.startRun({
|
|
40
|
-
sessionKey,
|
|
41
|
-
title: payload.title,
|
|
42
|
-
});
|
|
43
|
-
const task = await orch.addTask({
|
|
44
|
-
runId: snapshot.run.id,
|
|
45
|
-
name: payload.title,
|
|
46
|
-
description: payload.description,
|
|
47
|
-
goal: payload.description,
|
|
48
|
-
role: 'main',
|
|
49
|
-
context: {
|
|
50
|
-
acceptance_criteria: payload.acceptance_criteria ?? '',
|
|
51
|
-
artifacts: payload.artifacts ?? [],
|
|
52
|
-
delegation: true,
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
void this.processTask(task.id, this.buildDelegationPrompt(payload), sessionKey);
|
|
56
|
-
return { remote_task_id: task.id, run_id: snapshot.run.id };
|
|
57
|
-
}
|
|
58
|
-
buildDelegationPrompt(payload) {
|
|
59
|
-
const lines = [
|
|
60
|
-
`# Delegated Task: ${payload.title}`,
|
|
61
|
-
payload.description,
|
|
62
|
-
];
|
|
63
|
-
if (payload.acceptance_criteria) {
|
|
64
|
-
lines.push('', '## Acceptance Criteria', payload.acceptance_criteria);
|
|
65
|
-
}
|
|
66
|
-
if (payload.artifacts?.length) {
|
|
67
|
-
lines.push('', '## Artifacts');
|
|
68
|
-
for (const a of payload.artifacts) {
|
|
69
|
-
lines.push(`### ${a.name ?? 'artifact'}`, a.content ?? '');
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return lines.join('\n');
|
|
73
|
-
}
|
|
74
|
-
async tick() {
|
|
75
|
-
const orch = getOrchestrationService();
|
|
76
|
-
if (!orch)
|
|
77
|
-
return;
|
|
78
|
-
const runs = await orch.repositoryHandle.listRunsBySessionKeyPrefix(DELEGATION_SESSION_PREFIX);
|
|
79
|
-
for (const run of runs) {
|
|
80
|
-
if (run.status !== 'active')
|
|
81
|
-
continue;
|
|
82
|
-
const tasks = await orch.repositoryHandle.listTasksByRun(run.id);
|
|
83
|
-
for (const task of tasks) {
|
|
84
|
-
if (task.status !== 'pending' || this.processing.has(task.id))
|
|
85
|
-
continue;
|
|
86
|
-
void this.processTask(task.id, task.goal || task.description, run.session_key);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
async processTask(taskId, prompt, sessionKey) {
|
|
91
|
-
if (this.processing.has(taskId))
|
|
92
|
-
return;
|
|
93
|
-
this.processing.add(taskId);
|
|
94
|
-
const orch = getOrchestrationService();
|
|
95
|
-
const dispatcher = getAgentDispatcher();
|
|
96
|
-
try {
|
|
97
|
-
await orch?.repositoryHandle.updateTaskStatus(taskId, 'running', { started_at: Date.now() });
|
|
98
|
-
dispatcher.syncTaskFromRecord((await orch.repositoryHandle.getTask(taskId)));
|
|
99
|
-
const commMessage = createSyntheticMessage({
|
|
100
|
-
adapter: 'mesh',
|
|
101
|
-
endpoint: 'delegation',
|
|
102
|
-
sender: { id: 'remote-delegate', isMaster: true },
|
|
103
|
-
channel: { type: 'private', id: sessionKey },
|
|
104
|
-
});
|
|
105
|
-
await this.options.zhinAgent.prompt(prompt, commMessage);
|
|
106
|
-
const resultText = 'Delegation completed via main agent turn';
|
|
107
|
-
dispatcher.recordResult({
|
|
108
|
-
taskId,
|
|
109
|
-
role: 'main',
|
|
110
|
-
success: true,
|
|
111
|
-
summary: resultText,
|
|
112
|
-
duration: 0,
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
catch (err) {
|
|
116
|
-
dispatcher.recordResult({
|
|
117
|
-
taskId,
|
|
118
|
-
role: 'main',
|
|
119
|
-
success: false,
|
|
120
|
-
summary: 'delegation failed',
|
|
121
|
-
error: err instanceof Error ? err.message : String(err),
|
|
122
|
-
duration: 0,
|
|
123
|
-
});
|
|
124
|
-
logger.error(`Delegation task ${taskId} failed:`, err);
|
|
125
|
-
}
|
|
126
|
-
finally {
|
|
127
|
-
this.processing.delete(taskId);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
let globalProcessor = null;
|
|
132
|
-
export function initDelegationProcessor(options) {
|
|
133
|
-
globalProcessor = new DelegationProcessor(options);
|
|
134
|
-
globalProcessor.start();
|
|
135
|
-
return globalProcessor;
|
|
136
|
-
}
|
|
137
|
-
export function getDelegationProcessor() {
|
|
138
|
-
return globalProcessor;
|
|
139
|
-
}
|
|
140
|
-
export function stopDelegationProcessor() {
|
|
141
|
-
if (globalProcessor) {
|
|
142
|
-
globalProcessor.stop();
|
|
143
|
-
globalProcessor = null;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
//# sourceMappingURL=delegation-processor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"delegation-processor.js","sourceRoot":"","sources":["../../src/orchestrator/delegation-processor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE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vD,QAAQ,EAAE,CAAC;aACZ,CAAC,CAAC;YACH,MAAM,CAAC,KAAK,CAAC,mBAAmB,MAAM,UAAU,EAAE,GAAG,CAAC,CAAC;QACzD,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;CACF;AAED,IAAI,eAAe,GAA+B,IAAI,CAAC;AAEvD,MAAM,UAAU,uBAAuB,CAAC,OAAmC;IACzE,eAAe,GAAG,IAAI,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACnD,eAAe,CAAC,KAAK,EAAE,CAAC;IACxB,OAAO,eAAe,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,sBAAsB;IACpC,OAAO,eAAe,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,uBAAuB;IACrC,IAAI,eAAe,EAAE,CAAC;QACpB,eAAe,CAAC,IAAI,EAAE,CAAC;QACvB,eAAe,GAAG,IAAI,CAAC;IACzB,CAAC;AACH,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mission milestone IM delivery (ADR 0011 D7).
|
|
3
|
-
*/
|
|
4
|
-
import { type SendOptions } from '@zhin.js/core';
|
|
5
|
-
import type { SubagentOrigin } from '../subagent.js';
|
|
6
|
-
export interface ParsedSessionKey {
|
|
7
|
-
platform: string;
|
|
8
|
-
endpointId: string;
|
|
9
|
-
scope: 'private' | 'group' | 'channel';
|
|
10
|
-
sceneId: string;
|
|
11
|
-
}
|
|
12
|
-
/** Parse `platform:endpointId:scope:sceneId` session keys. */
|
|
13
|
-
export declare function parseOrchestrationSessionKey(sessionKey: string): ParsedSessionKey | null;
|
|
14
|
-
export declare function formatMissionMilestoneMessage(kind: string, runId: string, message: string): string;
|
|
15
|
-
export declare function sessionKeyToSubagentOrigin(sessionKey: string): SubagentOrigin | null;
|
|
16
|
-
export declare function deliverMissionMilestoneIm(sessionKey: string, kind: string, runId: string, message: string, send: (options: SendOptions) => Promise<string>): Promise<boolean>;
|
|
17
|
-
//# sourceMappingURL=mission-milestone-notify.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mission-milestone-notify.d.ts","sourceRoot":"","sources":["../../src/orchestrator/mission-milestone-notify.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAA0B,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,8DAA8D;AAC9D,wBAAgB,4BAA4B,CAAC,UAAU,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAQxF;AAED,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,GACd,MAAM,CASR;AAED,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAWpF;AAED,wBAAsB,yBAAyB,CAC7C,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,GAC9C,OAAO,CAAC,OAAO,CAAC,CAYlB"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mission milestone IM delivery (ADR 0011 D7).
|
|
3
|
-
*/
|
|
4
|
-
import { createSyntheticMessage } from '@zhin.js/core';
|
|
5
|
-
/** Parse `platform:endpointId:scope:sceneId` session keys. */
|
|
6
|
-
export function parseOrchestrationSessionKey(sessionKey) {
|
|
7
|
-
const parts = sessionKey.split(':');
|
|
8
|
-
if (parts.length < 4)
|
|
9
|
-
return null;
|
|
10
|
-
const [platform, endpointId, scopeRaw, ...rest] = parts;
|
|
11
|
-
const scope = scopeRaw === 'group' || scopeRaw === 'channel' ? scopeRaw : 'private';
|
|
12
|
-
const sceneId = rest.join(':');
|
|
13
|
-
if (!platform || !endpointId || !sceneId)
|
|
14
|
-
return null;
|
|
15
|
-
return { platform, endpointId, scope, sceneId };
|
|
16
|
-
}
|
|
17
|
-
export function formatMissionMilestoneMessage(kind, runId, message) {
|
|
18
|
-
const labels = {
|
|
19
|
-
mission_complete: 'Mission 完成',
|
|
20
|
-
mission_failed: 'Mission 失败',
|
|
21
|
-
mission_started: 'Mission 已启动',
|
|
22
|
-
mission_spec_gate_failed: 'Spec 门禁失败',
|
|
23
|
-
};
|
|
24
|
-
const title = labels[kind] ?? 'Mission 里程碑';
|
|
25
|
-
return `[${title}] run=${runId}\n${message}`;
|
|
26
|
-
}
|
|
27
|
-
export function sessionKeyToSubagentOrigin(sessionKey) {
|
|
28
|
-
const parsed = parseOrchestrationSessionKey(sessionKey);
|
|
29
|
-
if (!parsed)
|
|
30
|
-
return null;
|
|
31
|
-
return {
|
|
32
|
-
message: createSyntheticMessage({
|
|
33
|
-
adapter: parsed.platform,
|
|
34
|
-
endpoint: parsed.endpointId,
|
|
35
|
-
sender: { id: 'mission-milestone' },
|
|
36
|
-
channel: { type: parsed.scope, id: parsed.sceneId },
|
|
37
|
-
}),
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
export async function deliverMissionMilestoneIm(sessionKey, kind, runId, message, send) {
|
|
41
|
-
const parsed = parseOrchestrationSessionKey(sessionKey);
|
|
42
|
-
if (!parsed)
|
|
43
|
-
return false;
|
|
44
|
-
const text = formatMissionMilestoneMessage(kind, runId, message);
|
|
45
|
-
await send({
|
|
46
|
-
context: parsed.platform,
|
|
47
|
-
endpoint: parsed.endpointId,
|
|
48
|
-
id: parsed.sceneId,
|
|
49
|
-
type: parsed.scope,
|
|
50
|
-
content: text,
|
|
51
|
-
});
|
|
52
|
-
return true;
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=mission-milestone-notify.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mission-milestone-notify.js","sourceRoot":"","sources":["../../src/orchestrator/mission-milestone-notify.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,sBAAsB,EAAoB,MAAM,eAAe,CAAC;AAUzE,8DAA8D;AAC9D,MAAM,UAAU,4BAA4B,CAAC,UAAkB;IAC7D,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACpC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAClC,MAAM,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC,GAAG,KAAK,CAAC;IACxD,MAAM,KAAK,GAAG,QAAQ,KAAK,OAAO,IAAI,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IACpF,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/B,IAAI,CAAC,QAAQ,IAAI,CAAC,UAAU,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAC;IACtD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC3C,IAAY,EACZ,KAAa,EACb,OAAe;IAEf,MAAM,MAAM,GAA2B;QACrC,gBAAgB,EAAE,YAAY;QAC9B,cAAc,EAAE,YAAY;QAC5B,eAAe,EAAE,aAAa;QAC9B,wBAAwB,EAAE,WAAW;KACtC,CAAC;IACF,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,IAA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chestrationTaskRecord } from '@zhin.js/ai';
|
|
6
|
-
import { type MissionState } from './mission-state.js';
|
|
7
|
-
import type { OrchestrationService } from './orchestration-service.js';
|
|
8
|
-
export interface NegotiationOutcome {
|
|
9
|
-
action: 'continue' | 'retry_dev' | 'replan_spec' | 'skip_negotiate' | 'fail_run';
|
|
10
|
-
reason: string;
|
|
11
|
-
statePatch?: Partial<MissionState>;
|
|
12
|
-
skipTaskIds?: string[];
|
|
13
|
-
retryTaskIds?: string[];
|
|
14
|
-
}
|
|
15
|
-
export declare function evaluateMissionNegotiation(service: OrchestrationService, runId: string, completedTask: OrchestrationTaskRecord, result: AgentResult, tasks: OrchestrationTaskRecord[]): Promise<NegotiationOutcome>;
|
|
16
|
-
export declare function applyNegotiationOutcome(service: OrchestrationService, runId: string, outcome: NegotiationOutcome): Promise<void>;
|
|
17
|
-
//# sourceMappingURL=mission-negotiation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mission-negotiation.d.ts","sourceRoot":"","sources":["../../src/orchestrator/mission-negotiation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,UAAU,GAAG,WAAW,GAAG,aAAa,GAAG,gBAAgB,GAAG,UAAU,CAAC;IACjF,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,oBAAoB,EAC7B,KAAK,EAAE,MAAM,EACb,aAAa,EAAE,uBAAuB,EACtC,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,uBAAuB,EAAE,GAC/B,OAAO,CAAC,kBAAkB,CAAC,CA+E7B;AAED,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,oBAAoB,EAC7B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAgBf"}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { appendDecisionLog, } from './mission-state.js';
|
|
2
|
-
export async function evaluateMissionNegotiation(service, runId, completedTask, result, tasks) {
|
|
3
|
-
const state = await service.getMissionState(runId);
|
|
4
|
-
if (!state) {
|
|
5
|
-
return { action: 'continue', reason: 'no mission state' };
|
|
6
|
-
}
|
|
7
|
-
if (completedTask.phase === 'validate') {
|
|
8
|
-
if (result.success) {
|
|
9
|
-
const negotiate = tasks.find((t) => t.phase === 'negotiate');
|
|
10
|
-
return {
|
|
11
|
-
action: 'skip_negotiate',
|
|
12
|
-
reason: 'validation passed',
|
|
13
|
-
skipTaskIds: negotiate ? [negotiate.id] : [],
|
|
14
|
-
statePatch: { phase: 'done' },
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
const remaining = state.retry_budget.validate;
|
|
18
|
-
if (remaining > 0) {
|
|
19
|
-
const dev = tasks.find((t) => t.phase === 'develop');
|
|
20
|
-
return {
|
|
21
|
-
action: 'retry_dev',
|
|
22
|
-
reason: `validation failed, ${remaining - 1} retries left`,
|
|
23
|
-
retryTaskIds: dev ? [dev.id] : [],
|
|
24
|
-
statePatch: appendDecisionLog({
|
|
25
|
-
...state,
|
|
26
|
-
retry_budget: { ...state.retry_budget, validate: remaining - 1 },
|
|
27
|
-
phase: 'develop',
|
|
28
|
-
}, { actor: 'negotiation', action: 'retry_dev', reason: result.summary.slice(0, 200) }),
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
return {
|
|
32
|
-
action: 'replan_spec',
|
|
33
|
-
reason: 'validation retry budget exhausted',
|
|
34
|
-
retryTaskIds: tasks.filter((t) => t.phase === 'spec' || t.phase === 'develop').map((t) => t.id),
|
|
35
|
-
statePatch: appendDecisionLog(state, {
|
|
36
|
-
actor: 'negotiation',
|
|
37
|
-
action: 'replan_spec',
|
|
38
|
-
reason: 'validate retries exhausted',
|
|
39
|
-
}),
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
if (completedTask.phase === 'negotiate') {
|
|
43
|
-
if (result.success) {
|
|
44
|
-
return { action: 'continue', reason: 'negotiation completed' };
|
|
45
|
-
}
|
|
46
|
-
return {
|
|
47
|
-
action: 'fail_run',
|
|
48
|
-
reason: result.error ?? result.summary,
|
|
49
|
-
statePatch: appendDecisionLog(state, {
|
|
50
|
-
actor: 'negotiation',
|
|
51
|
-
action: 'fail_run',
|
|
52
|
-
reason: result.error ?? result.summary,
|
|
53
|
-
}),
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
if (completedTask.phase === 'spec' && result.success) {
|
|
57
|
-
return {
|
|
58
|
-
action: 'continue',
|
|
59
|
-
reason: 'spec phase done',
|
|
60
|
-
statePatch: { phase: 'develop' },
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
if (completedTask.phase === 'plan' && result.success) {
|
|
64
|
-
return {
|
|
65
|
-
action: 'continue',
|
|
66
|
-
reason: 'plan phase done',
|
|
67
|
-
statePatch: { phase: 'spec' },
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
return { action: 'continue', reason: 'default' };
|
|
71
|
-
}
|
|
72
|
-
export async function applyNegotiationOutcome(service, runId, outcome) {
|
|
73
|
-
if (outcome.statePatch) {
|
|
74
|
-
await service.patchMissionState(runId, outcome.statePatch, { skipAcl: true });
|
|
75
|
-
}
|
|
76
|
-
for (const taskId of outcome.skipTaskIds ?? []) {
|
|
77
|
-
await service.skipTask(taskId, outcome.reason);
|
|
78
|
-
}
|
|
79
|
-
for (const taskId of outcome.retryTaskIds ?? []) {
|
|
80
|
-
const task = await service.repositoryHandle.getTask(taskId);
|
|
81
|
-
if (task && (task.status === 'completed' || task.status === 'failed')) {
|
|
82
|
-
await service.retryTask(taskId);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
if (outcome.action === 'fail_run') {
|
|
86
|
-
await service.completeRun(runId, true);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
//# sourceMappingURL=mission-negotiation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mission-negotiation.js","sourceRoot":"","sources":["../../src/orchestrator/mission-negotiation.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,iBAAiB,GAElB,MAAM,oBAAoB,CAAC;AAW5B,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,OAA6B,EAC7B,KAAa,EACb,aAAsC,EACtC,MAAmB,EACnB,KAAgC;IAEhC,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IACnD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC5D,CAAC;IAED,IAAI,aAAa,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;QACvC,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,WAAW,CAAC,CAAC;YAC7D,OAAO;gBACL,MAAM,EAAE,gBAAgB;gBACxB,MAAM,EAAE,mBAAmB;gBAC3B,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE;gBAC5C,UAAU,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;aAC9B,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CAAC,WAAW,IAAI,EAAE,EAAE,CAAC;QAC/C,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC;IACD,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,YAAY,IAAI,EAAE,EAAE,CAAC;QAChD,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,gBAAgB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAC5D,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,WAAW,IAAI,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,EAAE,CAAC;YACtE,MAAM,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;QAClC,MAAM,OAAO,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;AACH,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Mission State patch ACL — phase-scoped writes (missions-v2).
|
|
3
|
-
*/
|
|
4
|
-
import type { MissionPhase, MissionState } from './mission-state.js';
|
|
5
|
-
export declare function validateMissionStatePatch(currentPhase: MissionPhase, patch: Partial<MissionState>): {
|
|
6
|
-
ok: boolean;
|
|
7
|
-
reason?: string;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=mission-patch-acl.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mission-patch-acl.d.ts","sourceRoot":"","sources":["../../src/orchestrator/mission-patch-acl.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAcrE,wBAAgB,yBAAyB,CACvC,YAAY,EAAE,YAAY,EAC1B,KAAK,EAAE,OAAO,CAAC,YAAY,CAAC,GAC3B;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAgBlC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
const PHASE_ALLOWED_KEYS = {
|
|
2
|
-
plan: new Set(['phase', 'plan_summary', 'decision_log', 'remote_validator_id']),
|
|
3
|
-
spec: new Set([
|
|
4
|
-
'phase', 'plan_summary', 'validation_spec_paths', 'assertion_count',
|
|
5
|
-
'spec_dry_run_passed', 'decision_log',
|
|
6
|
-
]),
|
|
7
|
-
develop: new Set(['phase', 'writer_task_id', 'decision_log']),
|
|
8
|
-
validate: new Set(['phase', 'last_validation', 'decision_log']),
|
|
9
|
-
negotiate: new Set(['phase', 'decision_log', 'retry_budget']),
|
|
10
|
-
done: new Set(['phase', 'decision_log']),
|
|
11
|
-
};
|
|
12
|
-
export function validateMissionStatePatch(currentPhase, patch) {
|
|
13
|
-
const allowed = PHASE_ALLOWED_KEYS[currentPhase] ?? PHASE_ALLOWED_KEYS.plan;
|
|
14
|
-
for (const key of Object.keys(patch)) {
|
|
15
|
-
if (!allowed.has(key)) {
|
|
16
|
-
return { ok: false, reason: `phase=${currentPhase} 不允许写入字段 ${key}` };
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
if (patch.phase && patch.phase !== currentPhase) {
|
|
20
|
-
const order = ['plan', 'spec', 'develop', 'validate', 'negotiate', 'done'];
|
|
21
|
-
const cur = order.indexOf(currentPhase);
|
|
22
|
-
const next = order.indexOf(patch.phase);
|
|
23
|
-
if (next > cur + 1) {
|
|
24
|
-
return { ok: false, reason: `不允许从 phase=${currentPhase} 跳到 ${patch.phase}` };
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return { ok: true };
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=mission-patch-acl.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mission-patch-acl.js","sourceRoot":"","sources":["../../src/orchestrator/mission-patch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G,GAAG,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QACxC,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACxC,IAAI,IAAI,GAAG,GAAG,GAAG,CAAC,EAAE,CAAC;YACnB,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,YAAY,OAAO,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;QAC/E,CAAC;IACH,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AACtB,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { type Message, type SendOptions } from '@zhin.js/core';
|
|
2
|
-
import type { SubagentManager } from '../subagent.js';
|
|
3
|
-
export interface MissionRunnerDeps {
|
|
4
|
-
subagentManager: SubagentManager;
|
|
5
|
-
resolveSessionContext: (sessionKey: string) => Message | null;
|
|
6
|
-
sendImMessage?: (options: SendOptions) => Promise<string>;
|
|
7
|
-
}
|
|
8
|
-
export declare class MissionRunner {
|
|
9
|
-
private readonly deps;
|
|
10
|
-
private unsub?;
|
|
11
|
-
constructor(deps: MissionRunnerDeps);
|
|
12
|
-
start(): void;
|
|
13
|
-
stop(): void;
|
|
14
|
-
advanceRun(runId: string): Promise<void>;
|
|
15
|
-
private handleResult;
|
|
16
|
-
notifyRunStarted(runId: string, sessionKey: string): Promise<void>;
|
|
17
|
-
private tryAutoSpecGate;
|
|
18
|
-
private spawnOrchestrationTask;
|
|
19
|
-
private notifyMilestone;
|
|
20
|
-
}
|
|
21
|
-
export declare function initMissionRunner(deps: MissionRunnerDeps): MissionRunner;
|
|
22
|
-
export declare function getMissionRunner(): MissionRunner | null;
|
|
23
|
-
//# sourceMappingURL=mission-runner.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mission-runner.d.ts","sourceRoot":"","sources":["../../src/orchestrator/mission-runner.ts"],"names":[],"mappings":"AAIA,OAAO,EAA0B,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAiBtD,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,eAAe,CAAC;IACjC,qBAAqB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,GAAG,IAAI,CAAC;IAC9D,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3D;AAID,qBAAa,aAAa;IAGZ,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,OAAO,CAAC,KAAK,CAAC,CAAa;gBAEE,IAAI,EAAE,iBAAiB;IAEpD,KAAK,IAAI,IAAI;IAOb,IAAI,IAAI,IAAI;IAKN,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAkBhC,YAAY;IAuDpB,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;YAS1D,eAAe;YAyCf,sBAAsB;YAgDtB,eAAe;CAsB9B;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,GAAG,aAAa,CAKxE;AAED,wBAAgB,gBAAgB,IAAI,aAAa,GAAG,IAAI,CAEvD"}
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MissionRunner — 始终自动推进 missions run(ADR 0011 D6)。
|
|
3
|
-
*/
|
|
4
|
-
import { Logger } from '@zhin.js/logger';
|
|
5
|
-
import { createSyntheticMessage } from '@zhin.js/core';
|
|
6
|
-
import { originFromMessage } from '../builtin/spawn-task-tool.js';
|
|
7
|
-
import { getAgentDispatcher, } from './agent-dispatcher.js';
|
|
8
|
-
import { getOrchestrationService } from './orchestration-service.js';
|
|
9
|
-
import { appendDecisionLog, isMissionsTemplate } from './mission-state.js';
|
|
10
|
-
import { applyNegotiationOutcome, evaluateMissionNegotiation, } from './mission-negotiation.js';
|
|
11
|
-
import { deliverMissionMilestoneIm, sessionKeyToSubagentOrigin } from './mission-milestone-notify.js';
|
|
12
|
-
import { defaultMissionSpecPaths, validateMissionSpecBundle } from './mission-spec.js';
|
|
13
|
-
const logger = new Logger(null, 'MissionRunner');
|
|
14
|
-
let runnerInstance = null;
|
|
15
|
-
export class MissionRunner {
|
|
16
|
-
deps;
|
|
17
|
-
unsub;
|
|
18
|
-
constructor(deps) {
|
|
19
|
-
this.deps = deps;
|
|
20
|
-
}
|
|
21
|
-
start() {
|
|
22
|
-
if (this.unsub)
|
|
23
|
-
return;
|
|
24
|
-
this.unsub = getAgentDispatcher().onResult((result) => {
|
|
25
|
-
void this.handleResult(result);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
stop() {
|
|
29
|
-
this.unsub?.();
|
|
30
|
-
this.unsub = undefined;
|
|
31
|
-
}
|
|
32
|
-
async advanceRun(runId) {
|
|
33
|
-
const orch = getOrchestrationService();
|
|
34
|
-
if (!orch)
|
|
35
|
-
return;
|
|
36
|
-
const snapshot = await orch.getStatus(runId);
|
|
37
|
-
if (!snapshot || !isMissionsTemplate(snapshot.run))
|
|
38
|
-
return;
|
|
39
|
-
const dispatcher = getAgentDispatcher();
|
|
40
|
-
await dispatcher.hydrateRun(runId);
|
|
41
|
-
for (const task of snapshot.tasks) {
|
|
42
|
-
if (task.status !== 'pending')
|
|
43
|
-
continue;
|
|
44
|
-
const gate = await dispatcher.canExecuteMissions(task.id);
|
|
45
|
-
if (!gate.canExecute)
|
|
46
|
-
continue;
|
|
47
|
-
await this.spawnOrchestrationTask(runId, task.id, snapshot.run.session_key);
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
async handleResult(result) {
|
|
52
|
-
const task = getAgentDispatcher().getTask(result.taskId);
|
|
53
|
-
if (!task?.runId)
|
|
54
|
-
return;
|
|
55
|
-
const orch = getOrchestrationService();
|
|
56
|
-
if (!orch)
|
|
57
|
-
return;
|
|
58
|
-
const snapshot = await orch.getStatus(task.runId);
|
|
59
|
-
if (!snapshot || !isMissionsTemplate(snapshot.run))
|
|
60
|
-
return;
|
|
61
|
-
const completed = snapshot.tasks.find((t) => t.id === result.taskId);
|
|
62
|
-
if (!completed)
|
|
63
|
-
return;
|
|
64
|
-
const negotiation = await evaluateMissionNegotiation(orch, task.runId, completed, result, snapshot.tasks);
|
|
65
|
-
await applyNegotiationOutcome(orch, task.runId, negotiation);
|
|
66
|
-
if (completed.phase === 'spec' && result.success) {
|
|
67
|
-
const gateOk = await this.tryAutoSpecGate(task.runId);
|
|
68
|
-
if (!gateOk) {
|
|
69
|
-
await this.notifyMilestone(task.runId, 'mission_spec_gate_failed', 'Validation Spec dry-run / manifest 未通过,WriteSpec 需重试', snapshot.run.session_key);
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
if (negotiation.action === 'skip_negotiate' && result.success) {
|
|
74
|
-
await this.notifyMilestone(task.runId, 'mission_complete', 'Mission 验证通过,可合并', snapshot.run.session_key);
|
|
75
|
-
}
|
|
76
|
-
if (negotiation.action === 'fail_run') {
|
|
77
|
-
await this.notifyMilestone(task.runId, 'mission_failed', negotiation.reason, snapshot.run.session_key);
|
|
78
|
-
}
|
|
79
|
-
await this.advanceRun(task.runId);
|
|
80
|
-
}
|
|
81
|
-
async notifyRunStarted(runId, sessionKey) {
|
|
82
|
-
await this.notifyMilestone(runId, 'mission_started', 'Mission 编排已启动,MissionRunner 自动推进中', sessionKey);
|
|
83
|
-
}
|
|
84
|
-
async tryAutoSpecGate(runId) {
|
|
85
|
-
const orch = getOrchestrationService();
|
|
86
|
-
if (!orch)
|
|
87
|
-
return false;
|
|
88
|
-
const state = await orch.getMissionState(runId);
|
|
89
|
-
if (!state || state.spec_dry_run_passed)
|
|
90
|
-
return true;
|
|
91
|
-
const defaults = defaultMissionSpecPaths(runId);
|
|
92
|
-
const specPaths = state.validation_spec_paths.length
|
|
93
|
-
? [...state.validation_spec_paths, defaults.manifestPath]
|
|
94
|
-
: [defaults.specTestPath, defaults.manifestPath];
|
|
95
|
-
const result = await validateMissionSpecBundle(runId, specPaths, true);
|
|
96
|
-
if (!result.ok) {
|
|
97
|
-
const current = await orch.getMissionState(runId);
|
|
98
|
-
if (current) {
|
|
99
|
-
await orch.patchMissionState(runId, appendDecisionLog({ ...current, spec_dry_run_passed: false }, {
|
|
100
|
-
actor: 'mission-runner',
|
|
101
|
-
action: 'spec_gate_fail',
|
|
102
|
-
reason: result.reason ?? 'spec dry-run failed',
|
|
103
|
-
}), { skipAcl: true });
|
|
104
|
-
}
|
|
105
|
-
const specTask = (await orch.getStatus(runId))?.tasks.find((t) => t.phase === 'spec');
|
|
106
|
-
if (specTask && specTask.status === 'completed') {
|
|
107
|
-
await orch.retryTask(specTask.id);
|
|
108
|
-
}
|
|
109
|
-
return false;
|
|
110
|
-
}
|
|
111
|
-
await orch.patchMissionState(runId, {
|
|
112
|
-
validation_spec_paths: specPaths.filter((p) => p.endsWith('.test.ts') || p.includes('spec')),
|
|
113
|
-
assertion_count: result.assertionCount,
|
|
114
|
-
spec_dry_run_passed: true,
|
|
115
|
-
phase: 'develop',
|
|
116
|
-
}, { skipAcl: true });
|
|
117
|
-
return true;
|
|
118
|
-
}
|
|
119
|
-
async spawnOrchestrationTask(runId, taskId, sessionKey) {
|
|
120
|
-
const dispatcher = getAgentDispatcher();
|
|
121
|
-
const agentTask = dispatcher.getTask(taskId);
|
|
122
|
-
if (!agentTask)
|
|
123
|
-
return;
|
|
124
|
-
const ctx = this.deps.resolveSessionContext(sessionKey)
|
|
125
|
-
?? sessionKeyToSubagentOrigin(sessionKey)?.message
|
|
126
|
-
?? createSyntheticMessage({
|
|
127
|
-
adapter: 'orchestration',
|
|
128
|
-
endpoint: 'mission-runner',
|
|
129
|
-
sender: { id: 'mission-runner' },
|
|
130
|
-
channel: { type: 'private', id: sessionKey },
|
|
131
|
-
});
|
|
132
|
-
const origin = originFromMessage(ctx);
|
|
133
|
-
dispatcher.markRunning(taskId, Promise.resolve({
|
|
134
|
-
taskId,
|
|
135
|
-
role: agentTask.role,
|
|
136
|
-
success: true,
|
|
137
|
-
summary: 'running',
|
|
138
|
-
duration: 0,
|
|
139
|
-
}));
|
|
140
|
-
void this.deps.subagentManager.spawn({
|
|
141
|
-
task: agentTask.goal || agentTask.description || agentTask.name,
|
|
142
|
-
label: agentTask.name,
|
|
143
|
-
origin,
|
|
144
|
-
role: agentTask.role,
|
|
145
|
-
orchestrationTaskId: taskId,
|
|
146
|
-
notifyContext: ctx,
|
|
147
|
-
contextMode: 'fresh',
|
|
148
|
-
}).catch((err) => {
|
|
149
|
-
logger.error('MissionRunner spawn failed:', err);
|
|
150
|
-
dispatcher.recordResult({
|
|
151
|
-
taskId,
|
|
152
|
-
role: agentTask.role,
|
|
153
|
-
success: false,
|
|
154
|
-
summary: 'spawn failed',
|
|
155
|
-
error: err instanceof Error ? err.message : String(err),
|
|
156
|
-
duration: 0,
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
async notifyMilestone(runId, kind, message, sessionKey) {
|
|
161
|
-
logger.info({ runId, kind, message }, 'Mission milestone');
|
|
162
|
-
if (sessionKey && this.deps.sendImMessage) {
|
|
163
|
-
try {
|
|
164
|
-
await deliverMissionMilestoneIm(sessionKey, kind, runId, message, this.deps.sendImMessage);
|
|
165
|
-
}
|
|
166
|
-
catch (err) {
|
|
167
|
-
logger.warn({ runId, kind, err }, 'Mission milestone IM notify failed');
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
export function initMissionRunner(deps) {
|
|
173
|
-
runnerInstance?.stop();
|
|
174
|
-
runnerInstance = new MissionRunner(deps);
|
|
175
|
-
runnerInstance.start();
|
|
176
|
-
return runnerInstance;
|
|
177
|
-
}
|
|
178
|
-
export function getMissionRunner() {
|
|
179
|
-
return runnerInstance;
|
|
180
|
-
}
|
|
181
|
-
//# sourceMappingURL=mission-runner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mission-runner.js","sourceRoot":"","sources":["../../src/orchestrator/mission-runner.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,sBAAsB,EAAkC,MAAM,eAAe,CAAC;AAEvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EACL,kBAAkB,GAEnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EACL,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AACtG,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAEvF,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;AAQjD,IAAI,cAAc,GAAyB,IAAI,CAAC;AAEhD,MAAM,OAAO,aAAa;IAGK;IAFrB,KAAK,CAAc;IAE3B,YAA6B,IAAuB;QAAvB,SAAI,GAAJ,IAAI,CAAmB;IAAG,CAAC;IAExD,KAAK;QACH,IAAI,IAAI,CAAC,KAAK;YAAE,OAAO;QACvB,IAAI,CAAC,KAAK,GAAG,kBAAkB,EAAE,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,EAAE;YACpD,KAAK,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,IAAI;QACF,IAAI,CAAC,KAAK,EAAE,EA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