@zhin.js/agent 1.1.22 → 1.1.26
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 +54 -25
- package/lib/activity-feedback/adapter-integration.d.ts +1 -1
- package/lib/activity-feedback/adapter-integration.d.ts.map +1 -1
- package/lib/activity-feedback/index.d.ts +0 -1
- package/lib/activity-feedback/index.d.ts.map +1 -1
- package/lib/activity-feedback/index.js +0 -1
- package/lib/activity-feedback/index.js.map +1 -1
- package/lib/activity-feedback/subagent-prefix.d.ts +1 -1
- package/lib/activity-feedback/subagent-prefix.js +1 -1
- package/lib/ai-event-bus.d.ts +6 -10
- package/lib/ai-event-bus.d.ts.map +1 -1
- package/lib/ai-event-bus.js +0 -13
- package/lib/ai-event-bus.js.map +1 -1
- package/lib/ai-event-contract.d.ts +43 -0
- package/lib/ai-event-contract.d.ts.map +1 -0
- package/lib/ai-event-contract.js +2 -0
- package/lib/ai-event-contract.js.map +1 -0
- package/lib/ai-event-subscriber.d.ts +3 -5
- package/lib/ai-event-subscriber.d.ts.map +1 -1
- package/lib/ai-event-subscriber.js +0 -19
- package/lib/ai-event-subscriber.js.map +1 -1
- package/lib/ai-hook-runtime-bus.d.ts +3 -4
- package/lib/ai-hook-runtime-bus.d.ts.map +1 -1
- package/lib/ai-hook-runtime-bus.js +2 -3
- package/lib/ai-hook-runtime-bus.js.map +1 -1
- package/lib/assistant/deliver-schedule-to-adapter.d.ts +2 -4
- package/lib/assistant/deliver-schedule-to-adapter.d.ts.map +1 -1
- package/lib/assistant/deliver-schedule-to-adapter.js +1 -8
- package/lib/assistant/deliver-schedule-to-adapter.js.map +1 -1
- package/lib/assistant/domains/ha-home-backend.d.ts.map +1 -1
- package/lib/assistant/domains/ha-home-backend.js +1 -2
- package/lib/assistant/domains/ha-home-backend.js.map +1 -1
- package/lib/assistant/domains/ha-ws-transport.d.ts.map +1 -1
- package/lib/assistant/domains/ha-ws-transport.js +1 -2
- package/lib/assistant/domains/ha-ws-transport.js.map +1 -1
- package/lib/assistant/domains/home-state-watch.d.ts.map +1 -1
- package/lib/assistant/domains/home-state-watch.js +1 -2
- package/lib/assistant/domains/home-state-watch.js.map +1 -1
- package/lib/assistant/event-ingress.d.ts.map +1 -1
- package/lib/assistant/event-ingress.js +1 -2
- package/lib/assistant/event-ingress.js.map +1 -1
- package/lib/assistant/home-policy.d.ts +1 -1
- package/lib/assistant/home-policy.d.ts.map +1 -1
- package/lib/assistant/home-tools.d.ts.map +1 -1
- package/lib/assistant/home-tools.js.map +1 -1
- package/lib/assistant/index.d.ts +2 -2
- package/lib/assistant/index.d.ts.map +1 -1
- package/lib/assistant/index.js +2 -2
- package/lib/assistant/index.js.map +1 -1
- package/lib/assistant/job-engine.d.ts +3 -2
- package/lib/assistant/job-engine.d.ts.map +1 -1
- package/lib/assistant/job-engine.js +6 -4
- package/lib/assistant/job-engine.js.map +1 -1
- package/lib/assistant/job-scheduler.d.ts +2 -2
- package/lib/assistant/job-scheduler.d.ts.map +1 -1
- package/lib/assistant/job-scheduler.js +2 -11
- package/lib/assistant/job-scheduler.js.map +1 -1
- package/lib/assistant/job-worker.js +1 -1
- package/lib/assistant/job-worker.js.map +1 -1
- package/lib/assistant/notification-router.d.ts.map +1 -1
- package/lib/assistant/notification-router.js +2 -2
- package/lib/assistant/notification-router.js.map +1 -1
- package/lib/assistant/profile-loader.d.ts +0 -4
- package/lib/assistant/profile-loader.d.ts.map +1 -1
- package/lib/assistant/profile-loader.js +0 -4
- package/lib/assistant/profile-loader.js.map +1 -1
- package/lib/assistant/schedule-skills.d.ts.map +1 -1
- package/lib/assistant/schedule-skills.js +5 -7
- package/lib/assistant/schedule-skills.js.map +1 -1
- package/lib/authoring/bridge.d.ts +2 -16
- package/lib/authoring/bridge.d.ts.map +1 -1
- package/lib/authoring/bridge.js +1 -74
- package/lib/authoring/bridge.js.map +1 -1
- package/lib/authoring/disable-tool.d.ts +2 -2
- package/lib/authoring/disable-tool.d.ts.map +1 -1
- package/lib/authoring/disable-tool.js +2 -2
- package/lib/authoring/disable-tool.js.map +1 -1
- package/lib/authoring/index.d.ts +1 -11
- package/lib/authoring/index.d.ts.map +1 -1
- package/lib/authoring/index.js +1 -6
- package/lib/authoring/index.js.map +1 -1
- package/lib/authoring/types.d.ts +3 -116
- package/lib/authoring/types.d.ts.map +1 -1
- package/lib/authoring/types.js.map +1 -1
- package/lib/bootstrap.d.ts +3 -8
- package/lib/bootstrap.d.ts.map +1 -1
- package/lib/bootstrap.js +9 -29
- package/lib/bootstrap.js.map +1 -1
- package/lib/builtins/builtin-tool-service.d.ts +2 -1
- package/lib/builtins/builtin-tool-service.d.ts.map +1 -1
- package/lib/builtins/builtin-tool-service.js +16 -5
- package/lib/builtins/builtin-tool-service.js.map +1 -1
- package/lib/config/fix-ai-config.d.ts.map +1 -1
- package/lib/config/fix-ai-config.js +0 -57
- package/lib/config/fix-ai-config.js.map +1 -1
- package/lib/config/index.d.ts +2 -1
- package/lib/config/index.d.ts.map +1 -1
- package/lib/config/index.js +2 -1
- package/lib/config/index.js.map +1 -1
- package/lib/config/provider-instance.d.ts +3 -3
- package/lib/config/provider-instance.d.ts.map +1 -1
- package/lib/config/provider-instance.js.map +1 -1
- package/lib/config/resolve-five-agent-binding.d.ts +1 -1
- package/lib/config/resolve-five-agent-binding.d.ts.map +1 -1
- package/lib/config/validate-ai-config.d.ts +0 -1
- package/lib/config/validate-ai-config.d.ts.map +1 -1
- package/lib/config/validate-ai-config.js +0 -229
- package/lib/config/validate-ai-config.js.map +1 -1
- package/lib/config/zhin-agent-config.d.ts +1 -1
- package/lib/config/zhin-agent-config.d.ts.map +1 -1
- package/lib/config/zhin-agent-defaults.js +4 -4
- package/lib/config/zhin-agent-dependencies.d.ts +5 -5
- package/lib/config/zhin-agent-dependencies.d.ts.map +1 -1
- package/lib/context/agents-instruction.d.ts +0 -1
- package/lib/context/agents-instruction.d.ts.map +1 -1
- package/lib/context/agents-instruction.js +1 -14
- package/lib/context/agents-instruction.js.map +1 -1
- package/lib/context/context-system.d.ts.map +1 -1
- package/lib/context/context-system.js +2 -2
- package/lib/context/context-system.js.map +1 -1
- package/lib/context/index.d.ts +1 -1
- package/lib/context/index.d.ts.map +1 -1
- package/lib/context/index.js +1 -1
- package/lib/context/index.js.map +1 -1
- package/lib/context/turn-user-message.d.ts.map +1 -1
- package/lib/context/turn-user-message.js +1 -2
- package/lib/context/turn-user-message.js.map +1 -1
- package/lib/core/agent-core-run.d.ts.map +1 -1
- package/lib/core/agent-core-run.js +17 -16
- package/lib/core/agent-core-run.js.map +1 -1
- package/lib/core/agent-loop-standalone.d.ts +2 -1
- package/lib/core/agent-loop-standalone.d.ts.map +1 -1
- package/lib/core/agent-loop-standalone.js +19 -18
- package/lib/core/agent-loop-standalone.js.map +1 -1
- package/lib/core/tool-calls-user-format.d.ts.map +1 -1
- package/lib/core/tool-calls-user-format.js +2 -76
- package/lib/core/tool-calls-user-format.js.map +1 -1
- package/lib/create-agent-session.d.ts +1 -1
- package/lib/create-agent-session.d.ts.map +1 -1
- package/lib/create-agent-session.js +2 -2
- package/lib/create-agent-session.js.map +1 -1
- package/lib/data-governance/disclosure-authority.d.ts +38 -0
- package/lib/data-governance/disclosure-authority.d.ts.map +1 -0
- package/lib/data-governance/disclosure-authority.js +2 -0
- package/lib/data-governance/disclosure-authority.js.map +1 -0
- package/lib/data-governance/governance-authority-repository.d.ts +3 -0
- package/lib/data-governance/governance-authority-repository.d.ts.map +1 -1
- package/lib/data-governance/governance-authority-repository.js +10 -1
- package/lib/data-governance/governance-authority-repository.js.map +1 -1
- package/lib/deferred-worker-runner.d.ts +2 -1
- package/lib/deferred-worker-runner.d.ts.map +1 -1
- package/lib/deferred-worker-runner.js +6 -4
- package/lib/deferred-worker-runner.js.map +1 -1
- package/lib/discovery/agent-surface-info.d.ts +5 -9
- package/lib/discovery/agent-surface-info.d.ts.map +1 -1
- package/lib/discovery/agent-surface-info.js +81 -45
- package/lib/discovery/agent-surface-info.js.map +1 -1
- package/lib/discovery/agent-surface.d.ts +2 -22
- package/lib/discovery/agent-surface.d.ts.map +1 -1
- package/lib/discovery/agent-surface.js +72 -287
- package/lib/discovery/agent-surface.js.map +1 -1
- package/lib/discovery/agents.d.ts +10 -12
- package/lib/discovery/agents.d.ts.map +1 -1
- package/lib/discovery/agents.js +91 -90
- package/lib/discovery/agents.js.map +1 -1
- package/lib/discovery/utils.d.ts +2 -15
- package/lib/discovery/utils.d.ts.map +1 -1
- package/lib/discovery/utils.js +2 -76
- package/lib/discovery/utils.js.map +1 -1
- package/lib/event/agent-stream-hooks.d.ts +0 -2
- package/lib/event/agent-stream-hooks.d.ts.map +1 -1
- package/lib/event/agent-stream-hooks.js +0 -8
- package/lib/event/agent-stream-hooks.js.map +1 -1
- package/lib/event/ai-event-bus.d.ts +13 -0
- package/lib/event/ai-event-bus.d.ts.map +1 -0
- package/lib/event/ai-event-bus.js +45 -0
- package/lib/event/ai-event-bus.js.map +1 -0
- package/lib/event/event-emitter.d.ts +8 -14
- package/lib/event/event-emitter.d.ts.map +1 -1
- package/lib/event/event-emitter.js +7 -37
- package/lib/event/event-emitter.js.map +1 -1
- package/lib/index.d.ts +42 -74
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +29 -58
- package/lib/index.js.map +1 -1
- package/lib/init/activate-ai-database-storage.d.ts +1 -1
- package/lib/init/activate-ai-database-storage.d.ts.map +1 -1
- package/lib/init/activate-ai-database-storage.js +28 -32
- package/lib/init/activate-ai-database-storage.js.map +1 -1
- package/lib/init/compose-zhin-agent-runtime.d.ts +2 -0
- package/lib/init/compose-zhin-agent-runtime.d.ts.map +1 -1
- package/lib/init/compose-zhin-agent-runtime.js +1 -0
- package/lib/init/compose-zhin-agent-runtime.js.map +1 -1
- package/lib/init/configure-zhin-agent.d.ts +3 -4
- package/lib/init/configure-zhin-agent.d.ts.map +1 -1
- package/lib/init/configure-zhin-agent.js +9 -7
- package/lib/init/configure-zhin-agent.js.map +1 -1
- package/lib/init/define-ai-database-models.js +1 -1
- package/lib/init/dispose-zhin-agent.d.ts +1 -1
- package/lib/init/dispose-zhin-agent.d.ts.map +1 -1
- package/lib/init/dispose-zhin-agent.js +0 -1
- package/lib/init/dispose-zhin-agent.js.map +1 -1
- package/lib/init/runtime-management-commands.d.ts +1 -2
- package/lib/init/runtime-management-commands.d.ts.map +1 -1
- package/lib/init/runtime-management-commands.js.map +1 -1
- package/lib/internal/agent-host.d.ts +10 -5
- package/lib/internal/agent-host.d.ts.map +1 -1
- package/lib/internal/host-types.d.ts +5 -7
- package/lib/internal/host-types.d.ts.map +1 -1
- package/lib/mcp-client/bridge.d.ts +1 -2
- package/lib/mcp-client/bridge.d.ts.map +1 -1
- package/lib/mcp-client/bridge.js +1 -2
- package/lib/mcp-client/bridge.js.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-router.d.ts +4 -7
- package/lib/media/media-router.d.ts.map +1 -1
- package/lib/media/media-router.js +10 -26
- package/lib/media/media-router.js.map +1 -1
- package/lib/media/media-types.d.ts +4 -0
- package/lib/media/media-types.d.ts.map +1 -1
- package/lib/media/media-types.js.map +1 -1
- package/lib/media/resolve-config.d.ts +0 -1
- package/lib/media/resolve-config.d.ts.map +1 -1
- package/lib/media/resolve-config.js +0 -3
- package/lib/media/resolve-config.js.map +1 -1
- package/lib/media/subagent-inbound.d.ts +3 -2
- package/lib/media/subagent-inbound.d.ts.map +1 -1
- package/lib/media/subagent-inbound.js +5 -8
- package/lib/media/subagent-inbound.js.map +1 -1
- package/lib/memory/ai-compaction-strategy.d.ts +3 -2
- package/lib/memory/ai-compaction-strategy.d.ts.map +1 -1
- package/lib/memory/ai-compaction-strategy.js +4 -1
- package/lib/memory/ai-compaction-strategy.js.map +1 -1
- package/lib/memory/compaction-runtime.d.ts +23 -14
- package/lib/memory/compaction-runtime.d.ts.map +1 -1
- package/lib/memory/compaction-runtime.js +92 -76
- package/lib/memory/compaction-runtime.js.map +1 -1
- package/lib/memory/context-repository-store.js +1 -1
- package/lib/memory/context-repository-store.js.map +1 -1
- package/lib/memory/index.d.ts +2 -2
- package/lib/memory/index.d.ts.map +1 -1
- package/lib/memory/index.js +1 -1
- package/lib/memory/index.js.map +1 -1
- package/lib/memory/memory-system.d.ts.map +1 -1
- package/lib/memory/memory-system.js +5 -6
- package/lib/memory/memory-system.js.map +1 -1
- package/lib/memory-layers.d.ts +2 -6
- package/lib/memory-layers.d.ts.map +1 -1
- package/lib/memory-layers.js +23 -75
- package/lib/memory-layers.js.map +1 -1
- package/lib/orchestration/five-agent/index.d.ts.map +1 -0
- package/lib/orchestration/five-agent/index.js.map +1 -0
- package/lib/orchestration/five-agent/prompts.d.ts.map +1 -0
- package/lib/orchestration/five-agent/prompts.js.map +1 -0
- package/lib/orchestration/five-agent/role-capability-policy.d.ts.map +1 -0
- package/lib/orchestration/five-agent/role-capability-policy.js.map +1 -0
- package/lib/orchestration/five-agent/roles.d.ts.map +1 -0
- package/lib/orchestration/five-agent/roles.js.map +1 -0
- package/lib/plugin-ai-hook-bus.d.ts +3 -7
- package/lib/plugin-ai-hook-bus.d.ts.map +1 -1
- package/lib/plugin-ai-hook-bus.js +1 -7
- package/lib/plugin-ai-hook-bus.js.map +1 -1
- package/lib/plugin-runtime/agent-event-bus.d.ts +4 -0
- package/lib/plugin-runtime/agent-event-bus.d.ts.map +1 -0
- package/lib/plugin-runtime/agent-event-bus.js +4 -0
- package/lib/plugin-runtime/agent-event-bus.js.map +1 -0
- package/lib/plugin-runtime/agent-host-port.d.ts +0 -6
- package/lib/plugin-runtime/agent-host-port.d.ts.map +1 -1
- package/lib/plugin-runtime/agent-host-port.js.map +1 -1
- package/lib/plugin-runtime/agent-runtime.d.ts +1 -1
- package/lib/plugin-runtime/agent-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/agent-runtime.js +9 -4
- package/lib/plugin-runtime/agent-runtime.js.map +1 -1
- package/lib/plugin-runtime/capability-ingress.d.ts +1 -1
- package/lib/plugin-runtime/capability-ingress.d.ts.map +1 -1
- package/lib/plugin-runtime/capability-ingress.js +118 -12
- package/lib/plugin-runtime/capability-ingress.js.map +1 -1
- package/lib/plugin-runtime/capability-tools.d.ts.map +1 -1
- package/lib/plugin-runtime/capability-tools.js +5 -3
- package/lib/plugin-runtime/capability-tools.js.map +1 -1
- package/lib/plugin-runtime/deferred-capability-plan.d.ts.map +1 -1
- package/lib/plugin-runtime/deferred-capability-plan.js +50 -21
- package/lib/plugin-runtime/deferred-capability-plan.js.map +1 -1
- package/lib/plugin-runtime/file-edit-quote-utils.d.ts.map +1 -0
- package/lib/plugin-runtime/file-edit-quote-utils.js.map +1 -0
- package/lib/plugin-runtime/full-agent-turn-engine.d.ts.map +1 -1
- package/lib/plugin-runtime/full-agent-turn-engine.js +10 -10
- package/lib/plugin-runtime/full-agent-turn-engine.js.map +1 -1
- package/lib/plugin-runtime/github-actions-delivery-provider.d.ts +44 -0
- package/lib/plugin-runtime/github-actions-delivery-provider.d.ts.map +1 -0
- package/lib/plugin-runtime/github-actions-delivery-provider.js +246 -0
- package/lib/plugin-runtime/github-actions-delivery-provider.js.map +1 -0
- package/lib/plugin-runtime/github-exact-merge-gateway.d.ts +62 -0
- package/lib/plugin-runtime/github-exact-merge-gateway.d.ts.map +1 -0
- package/lib/plugin-runtime/github-exact-merge-gateway.js +79 -0
- package/lib/plugin-runtime/github-exact-merge-gateway.js.map +1 -0
- package/lib/plugin-runtime/github-workroom-capability.d.ts +15 -0
- package/lib/plugin-runtime/github-workroom-capability.d.ts.map +1 -0
- package/lib/plugin-runtime/github-workroom-capability.js +79 -0
- package/lib/plugin-runtime/github-workroom-capability.js.map +1 -0
- package/lib/plugin-runtime/host-tool-projection.d.ts +1 -1
- package/lib/plugin-runtime/host-tool-projection.d.ts.map +1 -1
- package/lib/plugin-runtime/host-tool-projection.js +5 -3
- package/lib/plugin-runtime/host-tool-projection.js.map +1 -1
- package/lib/plugin-runtime/index.d.ts +29 -1
- package/lib/plugin-runtime/index.d.ts.map +1 -1
- package/lib/plugin-runtime/index.js +26 -1
- package/lib/plugin-runtime/index.js.map +1 -1
- package/lib/plugin-runtime/native-bash-tool.d.ts +35 -0
- package/lib/plugin-runtime/native-bash-tool.d.ts.map +1 -0
- package/lib/plugin-runtime/native-bash-tool.js +110 -0
- package/lib/plugin-runtime/native-bash-tool.js.map +1 -0
- package/lib/plugin-runtime/native-file-tools.d.ts.map +1 -1
- package/lib/plugin-runtime/native-file-tools.js +10 -9
- package/lib/plugin-runtime/native-file-tools.js.map +1 -1
- package/lib/plugin-runtime/native-image-tool.d.ts +12 -0
- package/lib/plugin-runtime/native-image-tool.d.ts.map +1 -0
- package/lib/plugin-runtime/native-image-tool.js +73 -0
- package/lib/plugin-runtime/native-image-tool.js.map +1 -0
- package/lib/plugin-runtime/native-interaction-tools.js +1 -1
- package/lib/plugin-runtime/native-interaction-tools.js.map +1 -1
- package/lib/plugin-runtime/native-knowledge-tool.d.ts +34 -0
- package/lib/plugin-runtime/native-knowledge-tool.d.ts.map +1 -0
- package/lib/plugin-runtime/native-knowledge-tool.js +170 -0
- package/lib/plugin-runtime/native-knowledge-tool.js.map +1 -0
- package/lib/plugin-runtime/native-semantic-memory-tools.js +2 -2
- package/lib/plugin-runtime/native-semantic-memory-tools.js.map +1 -1
- package/lib/plugin-runtime/native-todo-tools.js +2 -2
- package/lib/plugin-runtime/native-todo-tools.js.map +1 -1
- package/lib/plugin-runtime/native-tool-suite.d.ts +15 -0
- package/lib/plugin-runtime/native-tool-suite.d.ts.map +1 -0
- package/lib/plugin-runtime/native-tool-suite.js +18 -0
- package/lib/plugin-runtime/native-tool-suite.js.map +1 -0
- package/lib/plugin-runtime/native-web-tools.d.ts.map +1 -1
- package/lib/plugin-runtime/native-web-tools.js +6 -19
- package/lib/plugin-runtime/native-web-tools.js.map +1 -1
- package/lib/plugin-runtime/schedule-capability-plan.js +6 -1
- package/lib/plugin-runtime/schedule-capability-plan.js.map +1 -1
- package/lib/plugin-runtime/self-delivery-project-composition.d.ts +25 -0
- package/lib/plugin-runtime/self-delivery-project-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/self-delivery-project-composition.js +85 -0
- package/lib/plugin-runtime/self-delivery-project-composition.js.map +1 -0
- package/lib/plugin-runtime/self-delivery-project.d.ts +65 -0
- package/lib/plugin-runtime/self-delivery-project.d.ts.map +1 -0
- package/lib/plugin-runtime/self-delivery-project.js +140 -0
- package/lib/plugin-runtime/self-delivery-project.js.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.js +7 -2
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.js.map +1 -1
- package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts +2 -0
- package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-acceptance-production-composition.js +1 -0
- package/lib/plugin-runtime/workroom-acceptance-production-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts +3 -0
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.js +43 -6
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts +1 -1
- package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts +3 -77
- package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-assignment-authority-provider.js +12 -112
- package/lib/plugin-runtime/workroom-assignment-authority-provider.js.map +1 -1
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts +1 -1
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.d.ts +2 -0
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.js +24 -0
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.js.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-bootstrap.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-bootstrap.js +19 -0
- package/lib/plugin-runtime/workroom-data-governance-bootstrap.js.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts +4 -38
- package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-runtime.js +145 -42
- package/lib/plugin-runtime/workroom-data-governance-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-storage.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-storage.js +1 -2
- package/lib/plugin-runtime/workroom-data-governance-storage.js.map +1 -1
- package/lib/plugin-runtime/workroom-delivery-gateway.d.ts +96 -0
- package/lib/plugin-runtime/workroom-delivery-gateway.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-delivery-gateway.js +129 -0
- package/lib/plugin-runtime/workroom-delivery-gateway.js.map +1 -0
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.js +2 -1
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.js.map +1 -1
- package/lib/plugin-runtime/workroom-effect-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-effect-composition.js +12 -1
- package/lib/plugin-runtime/workroom-effect-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-effect-production.d.ts +5 -0
- package/lib/plugin-runtime/workroom-effect-production.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-effect-production.js +22 -3
- package/lib/plugin-runtime/workroom-effect-production.js.map +1 -1
- package/lib/plugin-runtime/workroom-effect-runtime.d.ts +1 -17
- package/lib/plugin-runtime/workroom-effect-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-effect-runtime.js +77 -17
- package/lib/plugin-runtime/workroom-effect-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts +8 -3
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.js +21 -18
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts +1 -1
- package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-journal-payload-composition.js +1 -1
- package/lib/plugin-runtime/workroom-journal-payload-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.js +3 -3
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.js.map +1 -1
- package/lib/plugin-runtime/workroom-local-agent-loop.d.ts +2 -1
- package/lib/plugin-runtime/workroom-local-agent-loop.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-local-agent-loop.js +11 -1
- package/lib/plugin-runtime/workroom-local-agent-loop.js.map +1 -1
- package/lib/{workroom/local-assignment-executor.d.ts → plugin-runtime/workroom-local-assignment-executor.d.ts} +4 -4
- package/lib/plugin-runtime/workroom-local-assignment-executor.d.ts.map +1 -0
- package/lib/{workroom/local-assignment-executor.js → plugin-runtime/workroom-local-assignment-executor.js} +3 -3
- package/lib/plugin-runtime/workroom-local-assignment-executor.js.map +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-runtime.d.ts +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-local-assignment-runtime.js +72 -26
- package/lib/plugin-runtime/workroom-local-assignment-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts +1 -1
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-control-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-control-composition.js +1 -0
- package/lib/plugin-runtime/workroom-portfolio-control-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.d.ts +1 -0
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.js +1 -0
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts +1 -1
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.js +6 -3
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.js.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts +1 -1
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.js +11 -5
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.js.map +1 -1
- package/lib/plugin-runtime/workroom-preemption-runtime.d.ts +1 -1
- package/lib/plugin-runtime/workroom-preemption-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-priority-authority.d.ts +11 -3
- package/lib/plugin-runtime/workroom-priority-authority.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-priority-authority.js +51 -47
- package/lib/plugin-runtime/workroom-priority-authority.js.map +1 -1
- package/lib/plugin-runtime/workroom-profile-authority-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-profile-authority-composition.js +2 -1
- package/lib/plugin-runtime/workroom-profile-authority-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-profile-authority-runtime.d.ts +1 -0
- package/lib/plugin-runtime/workroom-profile-authority-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-profile-authority-runtime.js +1 -0
- package/lib/plugin-runtime/workroom-profile-authority-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-projection-outbound.d.ts +1 -1
- package/lib/plugin-runtime/workroom-projection-outbound.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-projection-runtime.d.ts +6 -4
- package/lib/plugin-runtime/workroom-projection-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-projection-runtime.js +11 -1
- package/lib/plugin-runtime/workroom-projection-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts +2 -2
- package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-remote-executor.d.ts +1 -12
- package/lib/plugin-runtime/workroom-remote-executor.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-remote-executor.js +1 -20
- package/lib/plugin-runtime/workroom-remote-executor.js.map +1 -1
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts +1 -1
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts +8 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.js +4 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts +4 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.js +23 -6
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.js.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.d.ts +5 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.js +20 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.js.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts +1 -1
- package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-runtime.js +6 -1
- package/lib/plugin-runtime/workroom-scheduler-runtime.js.map +1 -1
- package/lib/prompt/assembly.d.ts.map +1 -1
- package/lib/prompt/assembly.js +1 -2
- package/lib/prompt/assembly.js.map +1 -1
- package/lib/prompt/git-context.d.ts +0 -2
- package/lib/prompt/git-context.d.ts.map +1 -1
- package/lib/prompt/git-context.js +1 -12
- package/lib/prompt/git-context.js.map +1 -1
- package/lib/prompt/index.d.ts +1 -1
- package/lib/prompt/index.d.ts.map +1 -1
- package/lib/prompt/index.js +1 -1
- package/lib/prompt/index.js.map +1 -1
- package/lib/prompt/prompt-assembly-registry.d.ts +1 -1
- package/lib/prompt/prompt-assembly-registry.d.ts.map +1 -1
- package/lib/prompt/prompt-assembly-registry.js.map +1 -1
- package/lib/prompt/system-prompt.d.ts +1 -1
- package/lib/prompt/system-prompt.d.ts.map +1 -1
- package/lib/prompt/system-prompt.js +1 -2
- package/lib/prompt/system-prompt.js.map +1 -1
- package/lib/prompt/templates.d.ts +2 -5
- package/lib/prompt/templates.d.ts.map +1 -1
- package/lib/prompt/templates.js +2 -16
- package/lib/prompt/templates.js.map +1 -1
- package/lib/prompt/workspace-prompt.d.ts +0 -1
- package/lib/prompt/workspace-prompt.d.ts.map +1 -1
- package/lib/prompt/workspace-prompt.js +1 -14
- package/lib/prompt/workspace-prompt.js.map +1 -1
- package/lib/reserved-tools.d.ts.map +1 -1
- package/lib/reserved-tools.js +0 -3
- package/lib/reserved-tools.js.map +1 -1
- package/lib/resource-hub/hook-registry.d.ts +1 -1
- package/lib/resource-hub/hook-registry.d.ts.map +1 -1
- package/lib/resource-hub/hook-registry.js +3 -15
- package/lib/resource-hub/hook-registry.js.map +1 -1
- package/lib/resource-hub/index.d.ts +4 -16
- package/lib/resource-hub/index.d.ts.map +1 -1
- package/lib/resource-hub/index.js +3 -20
- package/lib/resource-hub/index.js.map +1 -1
- package/lib/resource-hub/mcp-registry.js +1 -1
- package/lib/resource-hub/mcp-registry.js.map +1 -1
- package/lib/resource-hub/public-api.d.ts +0 -1
- package/lib/resource-hub/public-api.d.ts.map +1 -1
- package/lib/resource-hub/resolve-subagent-tools.d.ts.map +1 -1
- package/lib/resource-hub/resolve-subagent-tools.js +6 -4
- package/lib/resource-hub/resolve-subagent-tools.js.map +1 -1
- package/lib/resource-hub/role-configs.js +4 -4
- package/lib/resource-hub/role-configs.js.map +1 -1
- package/lib/resource-hub/skill-registry.d.ts +1 -1
- package/lib/resource-hub/skill-registry.js +1 -1
- package/lib/resource-hub/subagent-registry.d.ts +0 -2
- package/lib/resource-hub/subagent-registry.d.ts.map +1 -1
- package/lib/resource-hub/subagent-registry.js +0 -2
- package/lib/resource-hub/subagent-registry.js.map +1 -1
- package/lib/resource-hub/tool-selection.d.ts +4 -30
- package/lib/resource-hub/tool-selection.d.ts.map +1 -1
- package/lib/resource-hub/tool-selection.js +4 -289
- package/lib/resource-hub/tool-selection.js.map +1 -1
- package/lib/resource-hub/types.d.ts +6 -1
- package/lib/resource-hub/types.d.ts.map +1 -1
- package/lib/routing/route-matcher.d.ts +1 -1
- package/lib/routing/route-matcher.js +1 -1
- package/lib/schedule-manager.d.ts.map +1 -1
- package/lib/schedule-manager.js.map +1 -1
- package/lib/seam/index.d.ts +4 -3
- package/lib/seam/index.d.ts.map +1 -1
- package/lib/seam/index.js +1 -1
- package/lib/seam/index.js.map +1 -1
- package/lib/seam/seam-integration.d.ts +26 -37
- package/lib/seam/seam-integration.d.ts.map +1 -1
- package/lib/seam/seam-integration.js +82 -52
- package/lib/seam/seam-integration.js.map +1 -1
- package/lib/seam/seam-provider.d.ts +2 -1
- package/lib/seam/seam-provider.d.ts.map +1 -1
- package/lib/seam/seam-provider.js +25 -11
- package/lib/seam/seam-provider.js.map +1 -1
- package/lib/seam/skill-service.d.ts +0 -21
- package/lib/seam/skill-service.d.ts.map +1 -1
- package/lib/seam/tokens.d.ts +3 -2
- package/lib/seam/tokens.d.ts.map +1 -1
- package/lib/seam/tokens.js +3 -1
- package/lib/seam/tokens.js.map +1 -1
- package/lib/seam/tool-service.d.ts +12 -6
- package/lib/seam/tool-service.d.ts.map +1 -1
- package/lib/security/anomaly-detection.d.ts +2 -7
- package/lib/security/anomaly-detection.d.ts.map +1 -1
- package/lib/security/anomaly-detection.js +2 -20
- package/lib/security/anomaly-detection.js.map +1 -1
- package/lib/security/audit-logger.d.ts +0 -13
- package/lib/security/audit-logger.d.ts.map +1 -1
- package/lib/security/audit-logger.js +0 -30
- package/lib/security/audit-logger.js.map +1 -1
- package/lib/security/comm-message-context.d.ts +4 -0
- package/lib/security/comm-message-context.d.ts.map +1 -1
- package/lib/security/comm-message-context.js +9 -1
- package/lib/security/comm-message-context.js.map +1 -1
- package/lib/security/dangerous-tool-policy.d.ts +3 -3
- package/lib/security/dangerous-tool-policy.d.ts.map +1 -1
- package/lib/security/dangerous-tool-policy.js +8 -28
- package/lib/security/dangerous-tool-policy.js.map +1 -1
- package/lib/security/exec-policy.d.ts +4 -4
- package/lib/security/exec-policy.d.ts.map +1 -1
- package/lib/security/exec-policy.js +21 -62
- package/lib/security/exec-policy.js.map +1 -1
- package/lib/security/file-policy.d.ts.map +1 -1
- package/lib/security/file-policy.js +9 -57
- package/lib/security/file-policy.js.map +1 -1
- package/lib/security/file-role-policy.d.ts +1 -5
- package/lib/security/file-role-policy.d.ts.map +1 -1
- package/lib/security/file-role-policy.js +1 -25
- package/lib/security/file-role-policy.js.map +1 -1
- package/lib/security/index.d.ts +1 -1
- package/lib/security/index.d.ts.map +1 -1
- package/lib/security/index.js +1 -1
- package/lib/security/index.js.map +1 -1
- package/lib/security/owner-approval-contracts.d.ts +6 -0
- package/lib/security/owner-approval-contracts.d.ts.map +1 -0
- package/lib/security/owner-approval-contracts.js +2 -0
- package/lib/security/owner-approval-contracts.js.map +1 -0
- package/lib/security/owner-approval-runtime.d.ts +39 -0
- package/lib/security/owner-approval-runtime.d.ts.map +1 -0
- package/lib/security/owner-approval-runtime.js +159 -0
- package/lib/security/owner-approval-runtime.js.map +1 -0
- package/lib/security/owner-approval-store.d.ts +34 -0
- package/lib/security/owner-approval-store.d.ts.map +1 -0
- package/lib/security/owner-approval-store.js +154 -0
- package/lib/security/owner-approval-store.js.map +1 -0
- package/lib/security/policy-facade.d.ts +8 -15
- package/lib/security/policy-facade.d.ts.map +1 -1
- package/lib/security/policy-facade.js +33 -38
- package/lib/security/policy-facade.js.map +1 -1
- package/lib/security/sandbox.d.ts +0 -13
- package/lib/security/sandbox.d.ts.map +1 -1
- package/lib/security/sandbox.js +0 -21
- package/lib/security/sandbox.js.map +1 -1
- package/lib/security/turn-file-authority.d.ts.map +1 -1
- package/lib/security/turn-file-authority.js +0 -1
- package/lib/security/turn-file-authority.js.map +1 -1
- package/lib/service.d.ts +15 -19
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +42 -39
- package/lib/service.js.map +1 -1
- package/lib/session/approval-port.d.ts +16 -0
- package/lib/session/approval-port.d.ts.map +1 -1
- package/lib/session/approval-port.js.map +1 -1
- package/lib/session/approval-review-agent.d.ts +29 -0
- package/lib/session/approval-review-agent.d.ts.map +1 -0
- package/lib/session/approval-review-agent.js +183 -0
- package/lib/session/approval-review-agent.js.map +1 -0
- package/lib/session/branch-summarization-runtime.d.ts.map +1 -1
- package/lib/session/branch-summarization-runtime.js +3 -2
- package/lib/session/branch-summarization-runtime.js.map +1 -1
- package/lib/session/index.d.ts +2 -2
- package/lib/session/index.d.ts.map +1 -1
- package/lib/session/index.js +2 -2
- package/lib/session/index.js.map +1 -1
- package/lib/session/session-io.d.ts +7 -14
- package/lib/session/session-io.d.ts.map +1 -1
- package/lib/session/session-io.js +14 -47
- package/lib/session/session-io.js.map +1 -1
- package/lib/session/turn-ingress-session.d.ts +2 -5
- package/lib/session/turn-ingress-session.d.ts.map +1 -1
- package/lib/session/turn-ingress-session.js +8 -51
- package/lib/session/turn-ingress-session.js.map +1 -1
- package/lib/skill/skill-instruction-reader-factory.d.ts +5 -0
- package/lib/skill/skill-instruction-reader-factory.d.ts.map +1 -0
- package/lib/skill/skill-instruction-reader-factory.js +13 -0
- package/lib/skill/skill-instruction-reader-factory.js.map +1 -0
- package/lib/skill/skill-instruction-reader.d.ts +22 -0
- package/lib/skill/skill-instruction-reader.d.ts.map +1 -0
- package/lib/skill/skill-instruction-reader.js +44 -0
- package/lib/skill/skill-instruction-reader.js.map +1 -0
- package/lib/skill/skill-instructions.d.ts +5 -0
- package/lib/skill/skill-instructions.d.ts.map +1 -0
- package/lib/skill/skill-instructions.js +78 -0
- package/lib/skill/skill-instructions.js.map +1 -0
- package/lib/skill/skill-registry-as-service.d.ts +5 -5
- package/lib/skill/skill-registry-as-service.d.ts.map +1 -1
- package/lib/skill/skill-registry-as-service.js +21 -16
- package/lib/skill/skill-registry-as-service.js.map +1 -1
- package/lib/skill/skill-system.js +3 -3
- package/lib/skill/skill-system.js.map +1 -1
- package/lib/{builtin → spawn}/spawn-task-tool.d.ts +5 -6
- package/lib/spawn/spawn-task-tool.d.ts.map +1 -0
- package/lib/{builtin → spawn}/spawn-task-tool.js +17 -15
- package/lib/spawn/spawn-task-tool.js.map +1 -0
- package/lib/stability/memory-pressure.d.ts +5 -4
- package/lib/stability/memory-pressure.d.ts.map +1 -1
- package/lib/stability/memory-pressure.js +14 -23
- package/lib/stability/memory-pressure.js.map +1 -1
- package/lib/standalone/standalone-tool-catalog.d.ts +13 -0
- package/lib/standalone/standalone-tool-catalog.d.ts.map +1 -0
- package/lib/standalone/standalone-tool-catalog.js +46 -0
- package/lib/standalone/standalone-tool-catalog.js.map +1 -0
- package/lib/subagent/subagent-runtime.d.ts +7 -5
- package/lib/subagent/subagent-runtime.d.ts.map +1 -1
- package/lib/subagent/subagent-runtime.js +13 -16
- package/lib/subagent/subagent-runtime.js.map +1 -1
- package/lib/subagent/subagent-system-init.d.ts +2 -1
- package/lib/subagent/subagent-system-init.d.ts.map +1 -1
- package/lib/subagent/subagent-system-init.js +1 -0
- package/lib/subagent/subagent-system-init.js.map +1 -1
- package/lib/subagent-ai-events.d.ts +3 -2
- package/lib/subagent-ai-events.d.ts.map +1 -1
- package/lib/subagent-ai-events.js.map +1 -1
- package/lib/subagent-parent-context.js +1 -1
- package/lib/subagent-parent-context.js.map +1 -1
- package/lib/subagent-prompt.d.ts +1 -1
- package/lib/subagent-prompt.js +2 -5
- package/lib/subagent-prompt.js.map +1 -1
- package/lib/task-executor.d.ts +2 -14
- package/lib/task-executor.d.ts.map +1 -1
- package/lib/task-executor.js +2 -11
- package/lib/task-executor.js.map +1 -1
- package/lib/tool/builtin-policy-extractors.d.ts +2 -1
- package/lib/tool/builtin-policy-extractors.d.ts.map +1 -1
- package/lib/tool/builtin-policy-extractors.js +18 -15
- package/lib/tool/builtin-policy-extractors.js.map +1 -1
- package/lib/tool/context-tools.js +1 -1
- package/lib/tool/context-tools.js.map +1 -1
- package/lib/tool/conversation-reference-tool.d.ts.map +1 -1
- package/lib/tool/conversation-reference-tool.js +1 -1
- package/lib/tool/conversation-reference-tool.js.map +1 -1
- package/lib/tool/deferred-resolution.js +2 -2
- package/lib/tool/deferred-resolution.js.map +1 -1
- package/lib/tool/executable-tool-registry.d.ts +11 -0
- package/lib/tool/executable-tool-registry.d.ts.map +1 -0
- package/lib/tool/executable-tool-registry.js +25 -0
- package/lib/tool/executable-tool-registry.js.map +1 -0
- package/lib/tool/index.d.ts +1 -1
- package/lib/tool/index.d.ts.map +1 -1
- package/lib/tool/index.js +1 -1
- package/lib/tool/index.js.map +1 -1
- package/lib/tool/prepare-turn-tools.d.ts.map +1 -1
- package/lib/tool/prepare-turn-tools.js +1 -2
- package/lib/tool/prepare-turn-tools.js.map +1 -1
- package/lib/tool/sources.d.ts.map +1 -1
- package/lib/tool/sources.js +5 -4
- package/lib/tool/sources.js.map +1 -1
- package/lib/tool/tool-approval-gate.d.ts +1 -2
- package/lib/tool/tool-approval-gate.d.ts.map +1 -1
- package/lib/tool/tool-approval-gate.js +24 -0
- package/lib/tool/tool-approval-gate.js.map +1 -1
- package/lib/tool/tool-execution-authority.d.ts +26 -0
- package/lib/tool/tool-execution-authority.d.ts.map +1 -0
- package/lib/tool/tool-execution-authority.js +84 -0
- package/lib/tool/tool-execution-authority.js.map +1 -0
- package/lib/tool/tool-runtime.d.ts +10 -9
- package/lib/tool/tool-runtime.d.ts.map +1 -1
- package/lib/tool/tool-runtime.js +77 -79
- package/lib/tool/tool-runtime.js.map +1 -1
- package/lib/tool/tool-system.js +1 -1
- package/lib/tool/tool-system.js.map +1 -1
- package/lib/tool/turn-tool-runtime.d.ts +6 -2
- package/lib/tool/turn-tool-runtime.d.ts.map +1 -1
- package/lib/tool/turn-tool-runtime.js +19 -5
- package/lib/tool/turn-tool-runtime.js.map +1 -1
- package/lib/tool-catalog/deferred-turn-controller.d.ts +2 -2
- package/lib/tool-catalog/deferred-turn-controller.d.ts.map +1 -1
- package/lib/tool-catalog/deferred-turn-controller.js +4 -4
- package/lib/tool-catalog/deferred-turn-controller.js.map +1 -1
- package/lib/turn/deferred-auto-continue.js +1 -1
- package/lib/turn/deferred-auto-continue.js.map +1 -1
- package/lib/turn/deferred-delivery.js +1 -1
- package/lib/turn/deferred-delivery.js.map +1 -1
- package/lib/turn/inbound-media.d.ts +8 -1
- package/lib/turn/inbound-media.d.ts.map +1 -1
- package/lib/turn/inbound-media.js +4 -6
- package/lib/turn/inbound-media.js.map +1 -1
- package/lib/turn/index.d.ts +2 -2
- package/lib/turn/index.d.ts.map +1 -1
- package/lib/turn/index.js +2 -2
- package/lib/turn/index.js.map +1 -1
- package/lib/turn/persist-deferred-context.js +1 -1
- package/lib/turn/prompt-api.d.ts +3 -4
- package/lib/turn/prompt-api.d.ts.map +1 -1
- package/lib/turn/prompt-api.js +7 -11
- package/lib/turn/prompt-api.js.map +1 -1
- package/lib/turn/task-continuation.d.ts +0 -5
- package/lib/turn/task-continuation.d.ts.map +1 -1
- package/lib/turn/task-continuation.js +0 -15
- package/lib/turn/task-continuation.js.map +1 -1
- package/lib/turn/turn-ingress.d.ts +1 -1
- package/lib/turn/turn-ingress.d.ts.map +1 -1
- package/lib/turn/turn-metrics.d.ts +0 -4
- package/lib/turn/turn-metrics.d.ts.map +1 -1
- package/lib/turn/turn-metrics.js +0 -8
- package/lib/turn/turn-metrics.js.map +1 -1
- package/lib/turn/turn-pipeline.js +7 -4
- package/lib/turn/turn-pipeline.js.map +1 -1
- package/lib/typing-indicator/adapter-integration.d.ts +1 -4
- package/lib/typing-indicator/adapter-integration.d.ts.map +1 -1
- package/lib/typing-indicator/adapter-integration.js.map +1 -1
- package/lib/typing-indicator/index.d.ts +0 -17
- package/lib/typing-indicator/index.d.ts.map +1 -1
- package/lib/typing-indicator/index.js +0 -31
- package/lib/typing-indicator/index.js.map +1 -1
- package/lib/user-profile.js +1 -1
- package/lib/user-profile.js.map +1 -1
- package/lib/utils/config-env.d.ts +1 -1
- package/lib/utils/config-env.js +1 -1
- package/lib/web/bing-search-html.d.ts.map +1 -0
- package/lib/{builtin → web}/bing-search-html.js +2 -6
- package/lib/web/bing-search-html.js.map +1 -0
- package/lib/web/web-search-locale.d.ts +5 -0
- package/lib/web/web-search-locale.d.ts.map +1 -0
- package/lib/web/web-search-locale.js +13 -0
- package/lib/web/web-search-locale.js.map +1 -0
- package/lib/{builtin → web}/web-tool-utils.d.ts +0 -1
- package/lib/web/web-tool-utils.d.ts.map +1 -0
- package/lib/{builtin → web}/web-tool-utils.js +0 -1
- package/lib/web/web-tool-utils.js.map +1 -0
- package/lib/workroom/acceptance-control.d.ts +2 -1
- package/lib/workroom/acceptance-control.d.ts.map +1 -1
- package/lib/workroom/acceptance-control.js +12 -2
- package/lib/workroom/acceptance-control.js.map +1 -1
- package/lib/workroom/accepted-source-memory-application.d.ts +1 -1
- package/lib/workroom/accepted-source-memory-application.d.ts.map +1 -1
- package/lib/workroom/assignment-authority-grant-application.d.ts +2 -2
- package/lib/workroom/assignment-authority-grant-application.d.ts.map +1 -1
- package/lib/workroom/assignment-authority-grant-application.js +1 -1
- package/lib/workroom/assignment-authority-grant-application.js.map +1 -1
- package/lib/workroom/assignment-authority-grant-repository.d.ts +3 -2
- package/lib/workroom/assignment-authority-grant-repository.d.ts.map +1 -1
- package/lib/workroom/assignment-authority-grant-repository.js +3 -1
- package/lib/workroom/assignment-authority-grant-repository.js.map +1 -1
- package/lib/workroom/assignment-authority.d.ts +75 -0
- package/lib/workroom/assignment-authority.d.ts.map +1 -0
- package/lib/workroom/assignment-authority.js +179 -0
- package/lib/workroom/assignment-authority.js.map +1 -0
- package/lib/workroom/catalog-definition.d.ts +0 -6
- package/lib/workroom/catalog-definition.d.ts.map +1 -1
- package/lib/workroom/catalog.js +1 -1
- package/lib/workroom/catalog.js.map +1 -1
- package/lib/workroom/coding-assignment-executor.d.ts +90 -0
- package/lib/workroom/coding-assignment-executor.d.ts.map +1 -0
- package/lib/workroom/coding-assignment-executor.js +250 -0
- package/lib/workroom/coding-assignment-executor.js.map +1 -0
- package/lib/workroom/coding-git-objects.d.ts +17 -0
- package/lib/workroom/coding-git-objects.d.ts.map +1 -0
- package/lib/workroom/coding-git-objects.js +68 -0
- package/lib/workroom/coding-git-objects.js.map +1 -0
- package/lib/workroom/durable-file-store.d.ts +2 -0
- package/lib/workroom/durable-file-store.d.ts.map +1 -1
- package/lib/workroom/durable-file-store.js +5 -0
- package/lib/workroom/durable-file-store.js.map +1 -1
- package/lib/workroom/effect-blocker-repository.d.ts +17 -1
- package/lib/workroom/effect-blocker-repository.d.ts.map +1 -1
- package/lib/workroom/effect-blocker-repository.js.map +1 -1
- package/lib/workroom/effect-ledger.d.ts +21 -1
- package/lib/workroom/effect-ledger.d.ts.map +1 -1
- package/lib/workroom/effect-ledger.js +44 -3
- package/lib/workroom/effect-ledger.js.map +1 -1
- package/lib/workroom/file-accepted-source-memory-repository.d.ts.map +1 -1
- package/lib/workroom/file-accepted-source-memory-repository.js +6 -3
- package/lib/workroom/file-accepted-source-memory-repository.js.map +1 -1
- package/lib/workroom/file-coding-execution-store.d.ts +25 -0
- package/lib/workroom/file-coding-execution-store.d.ts.map +1 -0
- package/lib/workroom/file-coding-execution-store.js +122 -0
- package/lib/workroom/file-coding-execution-store.js.map +1 -0
- package/lib/workroom/file-effect-ledger.d.ts.map +1 -1
- package/lib/workroom/file-effect-ledger.js +6 -3
- package/lib/workroom/file-effect-ledger.js.map +1 -1
- package/lib/workroom/git-workspace-gateway.d.ts +6 -3
- package/lib/workroom/git-workspace-gateway.d.ts.map +1 -1
- package/lib/workroom/git-workspace-gateway.js +10 -1
- package/lib/workroom/git-workspace-gateway.js.map +1 -1
- package/lib/workroom/github-workspace-transport.d.ts +30 -0
- package/lib/workroom/github-workspace-transport.d.ts.map +1 -0
- package/lib/workroom/github-workspace-transport.js +224 -0
- package/lib/workroom/github-workspace-transport.js.map +1 -0
- package/lib/{plugin-runtime/workroom-governed-dispatch-reasons.d.ts → workroom/governed-dispatch-reasons.d.ts} +2 -2
- package/lib/workroom/governed-dispatch-reasons.d.ts.map +1 -0
- package/lib/{plugin-runtime/workroom-governed-dispatch-reasons.js → workroom/governed-dispatch-reasons.js} +1 -1
- package/lib/workroom/governed-dispatch-reasons.js.map +1 -0
- package/lib/workroom/human-ingress-orchestrator.d.ts.map +1 -1
- package/lib/workroom/human-ingress-orchestrator.js +29 -1
- package/lib/workroom/human-ingress-orchestrator.js.map +1 -1
- package/lib/workroom/human-ingress-source-reader.d.ts +3 -3
- package/lib/workroom/human-ingress-source-reader.d.ts.map +1 -1
- package/lib/workroom/human-ingress-source-reader.js.map +1 -1
- package/lib/workroom/journal/activatable-journal.d.ts +15 -0
- package/lib/workroom/journal/activatable-journal.d.ts.map +1 -0
- package/lib/workroom/journal/activatable-journal.js +39 -0
- package/lib/workroom/journal/activatable-journal.js.map +1 -0
- package/lib/workroom/{journal.d.ts → journal/contracts.d.ts} +19 -95
- package/lib/workroom/journal/contracts.d.ts.map +1 -0
- package/lib/workroom/journal/contracts.js +19 -0
- package/lib/workroom/journal/contracts.js.map +1 -0
- package/lib/workroom/journal/database-journal.d.ts +31 -0
- package/lib/workroom/journal/database-journal.d.ts.map +1 -0
- package/lib/workroom/journal/database-journal.js +118 -0
- package/lib/workroom/journal/database-journal.js.map +1 -0
- package/lib/workroom/journal/event-codec.d.ts +26 -0
- package/lib/workroom/journal/event-codec.d.ts.map +1 -0
- package/lib/workroom/journal/event-codec.js +233 -0
- package/lib/workroom/journal/event-codec.js.map +1 -0
- package/lib/workroom/journal/event-validation.d.ts +10 -0
- package/lib/workroom/journal/event-validation.d.ts.map +1 -0
- package/lib/workroom/journal/event-validation.js +671 -0
- package/lib/workroom/journal/event-validation.js.map +1 -0
- package/lib/workroom/journal/file-journal.d.ts +15 -0
- package/lib/workroom/journal/file-journal.d.ts.map +1 -0
- package/lib/workroom/journal/file-journal.js +272 -0
- package/lib/workroom/journal/file-journal.js.map +1 -0
- package/lib/workroom/journal/index.d.ts +9 -0
- package/lib/workroom/journal/index.d.ts.map +1 -0
- package/lib/workroom/journal/index.js +8 -0
- package/lib/workroom/journal/index.js.map +1 -0
- package/lib/workroom/journal/memory-journal.d.ts +27 -0
- package/lib/workroom/journal/memory-journal.d.ts.map +1 -0
- package/lib/workroom/journal/memory-journal.js +103 -0
- package/lib/workroom/journal/memory-journal.js.map +1 -0
- package/lib/workroom/journal/payload-governance.d.ts +29 -0
- package/lib/workroom/journal/payload-governance.d.ts.map +1 -0
- package/lib/workroom/journal/payload-governance.js +282 -0
- package/lib/workroom/journal/payload-governance.js.map +1 -0
- package/lib/workroom/journal/payload-reference.d.ts +9 -0
- package/lib/workroom/journal/payload-reference.d.ts.map +1 -0
- package/lib/workroom/journal/payload-reference.js +60 -0
- package/lib/workroom/journal/payload-reference.js.map +1 -0
- package/lib/workroom/journal/stored-event-projection.d.ts +6 -0
- package/lib/workroom/journal/stored-event-projection.d.ts.map +1 -0
- package/lib/workroom/journal/stored-event-projection.js +280 -0
- package/lib/workroom/journal/stored-event-projection.js.map +1 -0
- package/lib/workroom/kernel-state.d.ts.map +1 -1
- package/lib/workroom/kernel-state.js +35 -3
- package/lib/workroom/kernel-state.js.map +1 -1
- package/lib/workroom/{projection-outbox.d.ts → projection-outbox/contracts.d.ts} +8 -72
- package/lib/workroom/projection-outbox/contracts.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/contracts.js +11 -0
- package/lib/workroom/projection-outbox/contracts.js.map +1 -0
- package/lib/workroom/projection-outbox/delivery-worker.d.ts +22 -0
- package/lib/workroom/projection-outbox/delivery-worker.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/delivery-worker.js +96 -0
- package/lib/workroom/projection-outbox/delivery-worker.js.map +1 -0
- package/lib/workroom/projection-outbox/file-repository.d.ts +11 -0
- package/lib/workroom/projection-outbox/file-repository.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/file-repository.js +89 -0
- package/lib/workroom/projection-outbox/file-repository.js.map +1 -0
- package/lib/workroom/projection-outbox/index.d.ts +10 -0
- package/lib/workroom/projection-outbox/index.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/index.js +8 -0
- package/lib/workroom/projection-outbox/index.js.map +1 -0
- package/lib/workroom/projection-outbox/memory-repository.d.ts +11 -0
- package/lib/workroom/projection-outbox/memory-repository.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/memory-repository.js +40 -0
- package/lib/workroom/projection-outbox/memory-repository.js.map +1 -0
- package/lib/workroom/projection-outbox/projector.d.ts +36 -0
- package/lib/workroom/projection-outbox/projector.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/projector.js +517 -0
- package/lib/workroom/projection-outbox/projector.js.map +1 -0
- package/lib/workroom/projection-outbox/repository-state.d.ts +17 -0
- package/lib/workroom/projection-outbox/repository-state.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/repository-state.js +343 -0
- package/lib/workroom/projection-outbox/repository-state.js.map +1 -0
- package/lib/workroom/projection-outbox/tracer.d.ts +19 -0
- package/lib/workroom/projection-outbox/tracer.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/tracer.js +201 -0
- package/lib/workroom/projection-outbox/tracer.js.map +1 -0
- package/lib/workroom/remote-dispatch-admission.d.ts +2 -2
- package/lib/workroom/remote-dispatch-admission.d.ts.map +1 -1
- package/lib/workroom/remote-dispatch-admission.js +1 -1
- package/lib/workroom/remote-dispatch-admission.js.map +1 -1
- package/lib/workroom/remote-dispatch-worker.d.ts +1 -1
- package/lib/workroom/remote-dispatch-worker.d.ts.map +1 -1
- package/lib/workroom/remote-dispatch-worker.js +1 -1
- package/lib/workroom/remote-dispatch-worker.js.map +1 -1
- package/lib/workroom/remote-executor.d.ts +15 -0
- package/lib/workroom/remote-executor.d.ts.map +1 -0
- package/lib/workroom/remote-executor.js +21 -0
- package/lib/workroom/remote-executor.js.map +1 -0
- package/lib/workroom/runtime.d.ts +1 -1
- package/lib/workroom/runtime.d.ts.map +1 -1
- package/lib/workroom/software-delivery-plan.d.ts +32 -0
- package/lib/workroom/software-delivery-plan.d.ts.map +1 -0
- package/lib/workroom/software-delivery-plan.js +60 -0
- package/lib/workroom/software-delivery-plan.js.map +1 -0
- package/lib/workroom/validate-catalog.d.ts +2 -0
- package/lib/workroom/validate-catalog.d.ts.map +1 -0
- package/lib/workroom/validate-catalog.js +230 -0
- package/lib/workroom/validate-catalog.js.map +1 -0
- package/lib/workroom/workroom-kernel.d.ts +11 -1
- package/lib/workroom/workroom-kernel.d.ts.map +1 -1
- package/lib/workroom/workroom-kernel.js +102 -30
- package/lib/workroom/workroom-kernel.js.map +1 -1
- package/lib/workroom/workroom-preemption.d.ts +1 -1
- package/lib/workroom/workroom-preemption.d.ts.map +1 -1
- package/lib/workroom/workroom-scheduler-application.d.ts +1 -1
- package/lib/workroom/workroom-scheduler-application.d.ts.map +1 -1
- package/lib/workroom/workroom-scheduler-application.js +1 -1
- package/lib/workroom/workroom-scheduler-application.js.map +1 -1
- package/lib/workroom/workroom-scheduler.js +3 -0
- package/lib/workroom/workroom-scheduler.js.map +1 -1
- package/lib/zhin-agent/index.d.ts +12 -6
- package/lib/zhin-agent/index.d.ts.map +1 -1
- package/lib/zhin-agent/index.js +18 -12
- package/lib/zhin-agent/index.js.map +1 -1
- package/package.json +14 -29
- package/lib/activity-feedback/ai-bus.d.ts +0 -21
- package/lib/activity-feedback/ai-bus.d.ts.map +0 -1
- package/lib/activity-feedback/ai-bus.js +0 -59
- package/lib/activity-feedback/ai-bus.js.map +0 -1
- package/lib/ai-hook-handlers.d.ts +0 -8
- package/lib/ai-hook-handlers.d.ts.map +0 -1
- package/lib/ai-hook-handlers.js +0 -46
- package/lib/ai-hook-handlers.js.map +0 -1
- package/lib/authoring/define-agent.d.ts +0 -4
- package/lib/authoring/define-agent.d.ts.map +0 -1
- package/lib/authoring/define-agent.js +0 -8
- package/lib/authoring/define-agent.js.map +0 -1
- package/lib/authoring/define-connection.d.ts +0 -5
- package/lib/authoring/define-connection.d.ts.map +0 -1
- package/lib/authoring/define-connection.js +0 -8
- package/lib/authoring/define-connection.js.map +0 -1
- package/lib/authoring/define-schedule.d.ts +0 -4
- package/lib/authoring/define-schedule.d.ts.map +0 -1
- package/lib/authoring/define-schedule.js +0 -8
- package/lib/authoring/define-schedule.js.map +0 -1
- package/lib/authoring/define-tool.d.ts +0 -20
- package/lib/authoring/define-tool.d.ts.map +0 -1
- package/lib/authoring/define-tool.js +0 -28
- package/lib/authoring/define-tool.js.map +0 -1
- package/lib/authoring/entries/connections.d.ts +0 -3
- package/lib/authoring/entries/connections.d.ts.map +0 -1
- package/lib/authoring/entries/connections.js +0 -2
- package/lib/authoring/entries/connections.js.map +0 -1
- package/lib/authoring/entries/schedules.d.ts +0 -3
- package/lib/authoring/entries/schedules.d.ts.map +0 -1
- package/lib/authoring/entries/schedules.js +0 -2
- package/lib/authoring/entries/schedules.js.map +0 -1
- package/lib/authoring/entries/tools.d.ts +0 -5
- package/lib/authoring/entries/tools.d.ts.map +0 -1
- package/lib/authoring/entries/tools.js +0 -3
- package/lib/authoring/entries/tools.js.map +0 -1
- package/lib/authoring/tool-policy.d.ts +0 -3
- package/lib/authoring/tool-policy.d.ts.map +0 -1
- package/lib/authoring/tool-policy.js +0 -2
- package/lib/authoring/tool-policy.js.map +0 -1
- package/lib/authoring/zod-schema.d.ts +0 -10
- package/lib/authoring/zod-schema.d.ts.map +0 -1
- package/lib/authoring/zod-schema.js +0 -7
- package/lib/authoring/zod-schema.js.map +0 -1
- package/lib/builtin/analyze-media-tool.d.ts +0 -13
- package/lib/builtin/analyze-media-tool.d.ts.map +0 -1
- package/lib/builtin/analyze-media-tool.js +0 -94
- package/lib/builtin/analyze-media-tool.js.map +0 -1
- package/lib/builtin/bash-tool.d.ts +0 -29
- package/lib/builtin/bash-tool.d.ts.map +0 -1
- package/lib/builtin/bash-tool.js +0 -107
- package/lib/builtin/bash-tool.js.map +0 -1
- package/lib/builtin/bing-search-html.d.ts.map +0 -1
- package/lib/builtin/bing-search-html.js.map +0 -1
- package/lib/builtin/builtin-base-tool.d.ts +0 -27
- package/lib/builtin/builtin-base-tool.d.ts.map +0 -1
- package/lib/builtin/builtin-base-tool.js +0 -35
- package/lib/builtin/builtin-base-tool.js.map +0 -1
- package/lib/builtin/edit-file-tool.d.ts +0 -13
- package/lib/builtin/edit-file-tool.d.ts.map +0 -1
- package/lib/builtin/edit-file-tool.js +0 -86
- package/lib/builtin/edit-file-tool.js.map +0 -1
- package/lib/builtin/file-edit-quote-utils.d.ts.map +0 -1
- package/lib/builtin/file-edit-quote-utils.js.map +0 -1
- package/lib/builtin/five-agent/index.d.ts.map +0 -1
- package/lib/builtin/five-agent/index.js.map +0 -1
- package/lib/builtin/five-agent/prompts.d.ts.map +0 -1
- package/lib/builtin/five-agent/prompts.js.map +0 -1
- package/lib/builtin/five-agent/role-capability-policy.d.ts.map +0 -1
- package/lib/builtin/five-agent/role-capability-policy.js.map +0 -1
- package/lib/builtin/five-agent/roles.d.ts.map +0 -1
- package/lib/builtin/five-agent/roles.js.map +0 -1
- package/lib/builtin/generate-image-tool.d.ts +0 -21
- package/lib/builtin/generate-image-tool.d.ts.map +0 -1
- package/lib/builtin/generate-image-tool.js +0 -138
- package/lib/builtin/generate-image-tool.js.map +0 -1
- package/lib/builtin/glob-tool.d.ts +0 -23
- package/lib/builtin/glob-tool.d.ts.map +0 -1
- package/lib/builtin/glob-tool.js +0 -53
- package/lib/builtin/glob-tool.js.map +0 -1
- package/lib/builtin/grep-tool.d.ts +0 -23
- package/lib/builtin/grep-tool.d.ts.map +0 -1
- package/lib/builtin/grep-tool.js +0 -121
- package/lib/builtin/grep-tool.js.map +0 -1
- package/lib/builtin/install-skill-tool.d.ts +0 -24
- package/lib/builtin/install-skill-tool.d.ts.map +0 -1
- package/lib/builtin/install-skill-tool.js +0 -76
- package/lib/builtin/install-skill-tool.js.map +0 -1
- package/lib/builtin/knowledge-search-tool.d.ts +0 -6
- package/lib/builtin/knowledge-search-tool.d.ts.map +0 -1
- package/lib/builtin/knowledge-search-tool.js +0 -184
- package/lib/builtin/knowledge-search-tool.js.map +0 -1
- package/lib/builtin/list-dir-tool.d.ts +0 -13
- package/lib/builtin/list-dir-tool.d.ts.map +0 -1
- package/lib/builtin/list-dir-tool.js +0 -57
- package/lib/builtin/list-dir-tool.js.map +0 -1
- package/lib/builtin/load-skill-tool.d.ts +0 -20
- package/lib/builtin/load-skill-tool.d.ts.map +0 -1
- package/lib/builtin/load-skill-tool.js +0 -60
- package/lib/builtin/load-skill-tool.js.map +0 -1
- package/lib/builtin/read-file-tool.d.ts +0 -14
- package/lib/builtin/read-file-tool.d.ts.map +0 -1
- package/lib/builtin/read-file-tool.js +0 -74
- package/lib/builtin/read-file-tool.js.map +0 -1
- package/lib/builtin/run-deferred-task-tool.d.ts +0 -23
- package/lib/builtin/run-deferred-task-tool.d.ts.map +0 -1
- package/lib/builtin/run-deferred-task-tool.js +0 -41
- package/lib/builtin/run-deferred-task-tool.js.map +0 -1
- package/lib/builtin/spawn-task-tool.d.ts.map +0 -1
- package/lib/builtin/spawn-task-tool.js.map +0 -1
- package/lib/builtin/todo-read-tool.d.ts +0 -14
- package/lib/builtin/todo-read-tool.d.ts.map +0 -1
- package/lib/builtin/todo-read-tool.js +0 -56
- package/lib/builtin/todo-read-tool.js.map +0 -1
- package/lib/builtin/todo-write-tool.d.ts +0 -14
- package/lib/builtin/todo-write-tool.d.ts.map +0 -1
- package/lib/builtin/todo-write-tool.js +0 -54
- package/lib/builtin/todo-write-tool.js.map +0 -1
- package/lib/builtin/web-fetch-tool.d.ts +0 -21
- package/lib/builtin/web-fetch-tool.d.ts.map +0 -1
- package/lib/builtin/web-fetch-tool.js +0 -86
- package/lib/builtin/web-fetch-tool.js.map +0 -1
- package/lib/builtin/web-search-locale.d.ts +0 -16
- package/lib/builtin/web-search-locale.d.ts.map +0 -1
- package/lib/builtin/web-search-locale.js +0 -74
- package/lib/builtin/web-search-locale.js.map +0 -1
- package/lib/builtin/web-search-tool.d.ts +0 -20
- package/lib/builtin/web-search-tool.d.ts.map +0 -1
- package/lib/builtin/web-search-tool.js +0 -115
- package/lib/builtin/web-search-tool.js.map +0 -1
- package/lib/builtin/web-tool-utils.d.ts.map +0 -1
- package/lib/builtin/web-tool-utils.js.map +0 -1
- package/lib/builtin/write-file-tool.d.ts +0 -13
- package/lib/builtin/write-file-tool.d.ts.map +0 -1
- package/lib/builtin/write-file-tool.js +0 -55
- package/lib/builtin/write-file-tool.js.map +0 -1
- package/lib/builtin-tools.d.ts +0 -25
- package/lib/builtin-tools.d.ts.map +0 -1
- package/lib/builtin-tools.js +0 -54
- package/lib/builtin-tools.js.map +0 -1
- package/lib/defaults/hooks.d.ts +0 -6
- package/lib/defaults/hooks.d.ts.map +0 -1
- package/lib/defaults/hooks.js +0 -9
- package/lib/defaults/hooks.js.map +0 -1
- package/lib/defaults/subagents.d.ts +0 -6
- package/lib/defaults/subagents.d.ts.map +0 -1
- package/lib/defaults/subagents.js +0 -23
- package/lib/defaults/subagents.js.map +0 -1
- package/lib/defaults/tools.d.ts +0 -5
- package/lib/defaults/tools.d.ts.map +0 -1
- package/lib/defaults/tools.js +0 -6
- package/lib/defaults/tools.js.map +0 -1
- package/lib/discovery/index.d.ts +0 -5
- package/lib/discovery/index.d.ts.map +0 -1
- package/lib/discovery/index.js +0 -5
- package/lib/discovery/index.js.map +0 -1
- package/lib/discovery/skills.d.ts +0 -53
- package/lib/discovery/skills.d.ts.map +0 -1
- package/lib/discovery/skills.js +0 -306
- package/lib/discovery/skills.js.map +0 -1
- package/lib/discovery/tools.d.ts +0 -53
- package/lib/discovery/tools.d.ts.map +0 -1
- package/lib/discovery/tools.js +0 -305
- package/lib/discovery/tools.js.map +0 -1
- package/lib/features/agent-feature.d.ts +0 -23
- package/lib/features/agent-feature.d.ts.map +0 -1
- package/lib/features/agent-feature.js +0 -51
- package/lib/features/agent-feature.js.map +0 -1
- package/lib/features/index.d.ts +0 -3
- package/lib/features/index.d.ts.map +0 -1
- package/lib/features/index.js +0 -3
- package/lib/features/index.js.map +0 -1
- package/lib/features/mcp-feature.d.ts +0 -25
- package/lib/features/mcp-feature.d.ts.map +0 -1
- package/lib/features/mcp-feature.js +0 -52
- package/lib/features/mcp-feature.js.map +0 -1
- package/lib/hooks.d.ts +0 -144
- package/lib/hooks.d.ts.map +0 -1
- package/lib/hooks.js +0 -82
- package/lib/hooks.js.map +0 -1
- package/lib/ingress/capability-ingress.d.ts +0 -76
- package/lib/ingress/capability-ingress.d.ts.map +0 -1
- package/lib/ingress/capability-ingress.js +0 -274
- package/lib/ingress/capability-ingress.js.map +0 -1
- package/lib/ingress/index.d.ts +0 -2
- package/lib/ingress/index.d.ts.map +0 -1
- package/lib/ingress/index.js +0 -2
- package/lib/ingress/index.js.map +0 -1
- package/lib/init/introspection-args.d.ts +0 -37
- package/lib/init/introspection-args.d.ts.map +0 -1
- package/lib/init/introspection-args.js +0 -71
- package/lib/init/introspection-args.js.map +0 -1
- package/lib/init/introspection-collectors.d.ts +0 -26
- package/lib/init/introspection-collectors.d.ts.map +0 -1
- package/lib/init/introspection-collectors.js +0 -108
- package/lib/init/introspection-collectors.js.map +0 -1
- package/lib/init/introspection-commands-format.d.ts +0 -40
- package/lib/init/introspection-commands-format.d.ts.map +0 -1
- package/lib/init/introspection-commands-format.js +0 -93
- package/lib/init/introspection-commands-format.js.map +0 -1
- package/lib/init/introspection-pagination.d.ts +0 -14
- package/lib/init/introspection-pagination.d.ts.map +0 -1
- package/lib/init/introspection-pagination.js +0 -33
- package/lib/init/introspection-pagination.js.map +0 -1
- package/lib/init/introspection-rest.d.ts +0 -24
- package/lib/init/introspection-rest.d.ts.map +0 -1
- package/lib/init/introspection-rest.js +0 -65
- package/lib/init/introspection-rest.js.map +0 -1
- package/lib/init/upgrade-agent-db-schema.d.ts +0 -49
- package/lib/init/upgrade-agent-db-schema.d.ts.map +0 -1
- package/lib/init/upgrade-agent-db-schema.js +0 -210
- package/lib/init/upgrade-agent-db-schema.js.map +0 -1
- package/lib/init/upgrade-endpoint-id-schema.d.ts +0 -12
- package/lib/init/upgrade-endpoint-id-schema.d.ts.map +0 -1
- package/lib/init/upgrade-endpoint-id-schema.js +0 -58
- package/lib/init/upgrade-endpoint-id-schema.js.map +0 -1
- package/lib/plugin-runtime/workroom-governed-dispatch-reasons.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-governed-dispatch-reasons.js.map +0 -1
- package/lib/resource-hub/tool-registry.d.ts +0 -60
- package/lib/resource-hub/tool-registry.d.ts.map +0 -1
- package/lib/resource-hub/tool-registry.js +0 -228
- package/lib/resource-hub/tool-registry.js.map +0 -1
- package/lib/security/owner-approve-always-store.d.ts +0 -67
- package/lib/security/owner-approve-always-store.d.ts.map +0 -1
- package/lib/security/owner-approve-always-store.js +0 -510
- package/lib/security/owner-approve-always-store.js.map +0 -1
- package/lib/security/turn-sandbox-authority.d.ts +0 -13
- package/lib/security/turn-sandbox-authority.d.ts.map +0 -1
- package/lib/security/turn-sandbox-authority.js +0 -42
- package/lib/security/turn-sandbox-authority.js.map +0 -1
- package/lib/skill/skill-load-opts.d.ts +0 -5
- package/lib/skill/skill-load-opts.d.ts.map +0 -1
- package/lib/skill/skill-load-opts.js +0 -14
- package/lib/skill/skill-load-opts.js.map +0 -1
- package/lib/stability/registry-cleanup.d.ts +0 -5
- package/lib/stability/registry-cleanup.d.ts.map +0 -1
- package/lib/stability/registry-cleanup.js +0 -20
- package/lib/stability/registry-cleanup.js.map +0 -1
- package/lib/tool/classic-tool-execution-authority.d.ts +0 -22
- package/lib/tool/classic-tool-execution-authority.d.ts.map +0 -1
- package/lib/tool/classic-tool-execution-authority.js +0 -80
- package/lib/tool/classic-tool-execution-authority.js.map +0 -1
- package/lib/tool/web-search-locale-attach.d.ts +0 -4
- package/lib/tool/web-search-locale-attach.d.ts.map +0 -1
- package/lib/tool/web-search-locale-attach.js +0 -20
- package/lib/tool/web-search-locale-attach.js.map +0 -1
- package/lib/typing-indicator/integration.d.ts +0 -89
- package/lib/typing-indicator/integration.d.ts.map +0 -1
- package/lib/typing-indicator/integration.js +0 -261
- package/lib/typing-indicator/integration.js.map +0 -1
- package/lib/workroom/journal.d.ts.map +0 -1
- package/lib/workroom/journal.js +0 -2022
- package/lib/workroom/journal.js.map +0 -1
- package/lib/workroom/local-assignment-executor.d.ts.map +0 -1
- package/lib/workroom/local-assignment-executor.js.map +0 -1
- package/lib/workroom/projection-outbox.d.ts.map +0 -1
- package/lib/workroom/projection-outbox.js +0 -1324
- package/lib/workroom/projection-outbox.js.map +0 -1
- /package/lib/{builtin → orchestration}/five-agent/index.d.ts +0 -0
- /package/lib/{builtin → orchestration}/five-agent/index.js +0 -0
- /package/lib/{builtin → orchestration}/five-agent/prompts.d.ts +0 -0
- /package/lib/{builtin → orchestration}/five-agent/prompts.js +0 -0
- /package/lib/{builtin → orchestration}/five-agent/role-capability-policy.d.ts +0 -0
- /package/lib/{builtin → orchestration}/five-agent/role-capability-policy.js +0 -0
- /package/lib/{builtin → orchestration}/five-agent/roles.d.ts +0 -0
- /package/lib/{builtin → orchestration}/five-agent/roles.js +0 -0
- /package/lib/{builtin → plugin-runtime}/file-edit-quote-utils.d.ts +0 -0
- /package/lib/{builtin → plugin-runtime}/file-edit-quote-utils.js +0 -0
- /package/lib/{builtin → web}/bing-search-html.d.ts +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type SkillInstructionReadResult = Readonly<{
|
|
2
|
+
status: 'found';
|
|
3
|
+
instructions: string;
|
|
4
|
+
} | {
|
|
5
|
+
status: 'missing';
|
|
6
|
+
name: string;
|
|
7
|
+
}>;
|
|
8
|
+
export interface SkillInstructionSource {
|
|
9
|
+
read(name: string): Promise<SkillInstructionReadResult>;
|
|
10
|
+
}
|
|
11
|
+
export interface SkillInstructionReaderOptions {
|
|
12
|
+
readonly registeredFile?: (name: string) => string | undefined;
|
|
13
|
+
readonly directories: () => readonly string[];
|
|
14
|
+
readonly maxChars: number;
|
|
15
|
+
}
|
|
16
|
+
/** Resolves and reads Skill instructions without exposing filesystem lookup rules to callers. */
|
|
17
|
+
export declare class SkillInstructionReader implements SkillInstructionSource {
|
|
18
|
+
#private;
|
|
19
|
+
constructor(options: SkillInstructionReaderOptions);
|
|
20
|
+
read(name: string): Promise<SkillInstructionReadResult>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=skill-instruction-reader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-instruction-reader.d.ts","sourceRoot":"","sources":["../../src/skill/skill-instruction-reader.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAC7C;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,GACzC;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CACtC,CAAC;AAEF,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAC/D,QAAQ,CAAC,WAAW,EAAE,MAAM,SAAS,MAAM,EAAE,CAAC;IAC9C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,iGAAiG;AACjG,qBAAa,sBAAuB,YAAW,sBAAsB;;gBAGvD,OAAO,EAAE,6BAA6B;IAO5C,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,0BAA0B,CAAC;CA8B9D"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import { join } from 'node:path';
|
|
4
|
+
import { checkSkillDependencies, extractSkillInstructions } from './skill-instructions.js';
|
|
5
|
+
/** Resolves and reads Skill instructions without exposing filesystem lookup rules to callers. */
|
|
6
|
+
export class SkillInstructionReader {
|
|
7
|
+
#options;
|
|
8
|
+
constructor(options) {
|
|
9
|
+
if (!Number.isInteger(options.maxChars) || options.maxChars <= 0) {
|
|
10
|
+
throw new TypeError('Skill instruction maxChars must be a positive integer');
|
|
11
|
+
}
|
|
12
|
+
this.#options = options;
|
|
13
|
+
}
|
|
14
|
+
async read(name) {
|
|
15
|
+
const canonicalName = name.trim();
|
|
16
|
+
if (!canonicalName
|
|
17
|
+
|| canonicalName !== name
|
|
18
|
+
|| canonicalName === '.'
|
|
19
|
+
|| canonicalName === '..'
|
|
20
|
+
|| canonicalName.includes('/')
|
|
21
|
+
|| canonicalName.includes('\\')) {
|
|
22
|
+
throw new TypeError('Skill name must be a non-empty canonical name');
|
|
23
|
+
}
|
|
24
|
+
const registered = this.#options.registeredFile?.(canonicalName);
|
|
25
|
+
if (registered && existsSync(registered))
|
|
26
|
+
return this.#readFile(canonicalName, registered);
|
|
27
|
+
for (const directory of this.#options.directories()) {
|
|
28
|
+
const candidate = join(directory, canonicalName, 'SKILL.md');
|
|
29
|
+
if (existsSync(candidate))
|
|
30
|
+
return this.#readFile(canonicalName, candidate);
|
|
31
|
+
}
|
|
32
|
+
return Object.freeze({ status: 'missing', name: canonicalName });
|
|
33
|
+
}
|
|
34
|
+
async #readFile(name, file) {
|
|
35
|
+
const content = await readFile(file, 'utf8');
|
|
36
|
+
const dependencyWarning = await checkSkillDependencies(content);
|
|
37
|
+
const instructions = extractSkillInstructions(name, content, this.#options.maxChars);
|
|
38
|
+
return Object.freeze({
|
|
39
|
+
status: 'found',
|
|
40
|
+
instructions: dependencyWarning ? `${dependencyWarning}\n\n${instructions}` : instructions,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=skill-instruction-reader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-instruction-reader.js","sourceRoot":"","sources":["../../src/skill/skill-instruction-reader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAiB3F,iGAAiG;AACjG,MAAM,OAAO,sBAAsB;IACxB,QAAQ,CAAgC;IAEjD,YAAY,OAAsC;QAChD,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,EAAE,CAAC;YACjE,MAAM,IAAI,SAAS,CAAC,uDAAuD,CAAC,CAAC;QAC/E,CAAC;QACD,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,IAAY;QACrB,MAAM,aA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OAAO;YACf,YAAY,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,iBAAiB,OAAO,YAAY,EAAE,CAAC,CAAC,CAAC,YAAY;SAC3F,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Return a readable warning when a Skill declares unavailable executable dependencies. */
|
|
2
|
+
export declare function checkSkillDependencies(content: string): Promise<string>;
|
|
3
|
+
/** Extract bounded, action-oriented instructions from a SKILL.md document. */
|
|
4
|
+
export declare function extractSkillInstructions(name: string, content: string, maxBodyLength?: number): string;
|
|
5
|
+
//# sourceMappingURL=skill-instructions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-instructions.d.ts","sourceRoot":"","sources":["../../src/skill/skill-instructions.ts"],"names":[],"mappings":"AAKA,2FAA2F;AAC3F,wBAAsB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAsB7E;AAED,8EAA8E;AAC9E,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,aAAa,SAAO,GACnB,MAAM,CAsBR"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { execFile } from 'node:child_process';
|
|
2
|
+
import { promisify } from 'node:util';
|
|
3
|
+
const execFileAsync = promisify(execFile);
|
|
4
|
+
/** Return a readable warning when a Skill declares unavailable executable dependencies. */
|
|
5
|
+
export async function checkSkillDependencies(content) {
|
|
6
|
+
const frontmatter = content.match(/^---\s*\n([\s\S]*?)\n---/u);
|
|
7
|
+
if (!frontmatter)
|
|
8
|
+
return '';
|
|
9
|
+
const module = await import('js-yaml');
|
|
10
|
+
const yaml = module.default ?? module;
|
|
11
|
+
const metadata = yaml.load(frontmatter[1]);
|
|
12
|
+
const dependencies = metadata?.compatibility?.deps;
|
|
13
|
+
if (!Array.isArray(dependencies))
|
|
14
|
+
return '';
|
|
15
|
+
const missing = [];
|
|
16
|
+
for (const value of dependencies) {
|
|
17
|
+
if (typeof value !== 'string' || !value.trim())
|
|
18
|
+
continue;
|
|
19
|
+
try {
|
|
20
|
+
await execFileAsync('which', [value]);
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
missing.push(value);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return missing.length === 0
|
|
27
|
+
? ''
|
|
28
|
+
: `⚠️ 当前环境缺少以下依赖,请先安装后再使用本技能:${missing.join(', ')}`;
|
|
29
|
+
}
|
|
30
|
+
/** Extract bounded, action-oriented instructions from a SKILL.md document. */
|
|
31
|
+
export function extractSkillInstructions(name, content, maxBodyLength = 4000) {
|
|
32
|
+
const lines = [`Skill '${name}' loaded. 请立即根据以下指导执行工具调用:`, ''];
|
|
33
|
+
const frontmatter = content.match(/^---\s*\n([\s\S]*?)\n---/u);
|
|
34
|
+
if (frontmatter) {
|
|
35
|
+
const tools = frontmatter[1].match(/tools:\s*\n((?:\s+-\s+.+\n?)+)/u);
|
|
36
|
+
if (tools)
|
|
37
|
+
lines.push('## 可用工具', tools[0].trim(), '');
|
|
38
|
+
}
|
|
39
|
+
const body = frontmatter && frontmatter.index !== undefined
|
|
40
|
+
? content.slice(frontmatter.index + frontmatter[0].length).replace(/^\s+/u, '')
|
|
41
|
+
: content;
|
|
42
|
+
const quickActions = body.match(/## (?:快速操作|Quick\s*Actions)[\s\S]*?(?=\n## [^\s]|$)/iu);
|
|
43
|
+
if (quickActions && maxBodyLength <= 2000) {
|
|
44
|
+
lines.push(quickActions[0].trim(), '', immediateAction());
|
|
45
|
+
return lines.join('\n');
|
|
46
|
+
}
|
|
47
|
+
const rules = content.match(/## 执行规则[\s\S]*?(?=\n## [^\s]|$)/u);
|
|
48
|
+
const workflow = content.match(/## (?:Workflow|Instructions|使用说明)[\s\S]*?(?=\n## [^\s]|$)/iu);
|
|
49
|
+
if (rules)
|
|
50
|
+
lines.push(rules[0].trim(), '');
|
|
51
|
+
else if (workflow)
|
|
52
|
+
lines.push(workflow[0].trim(), '');
|
|
53
|
+
else
|
|
54
|
+
appendIntro(lines, body, maxBodyLength);
|
|
55
|
+
lines.push(immediateAction());
|
|
56
|
+
return lines.join('\n');
|
|
57
|
+
}
|
|
58
|
+
function appendIntro(lines, body, maxBodyLength) {
|
|
59
|
+
if (!body.trim())
|
|
60
|
+
return;
|
|
61
|
+
const firstHeading = body.match(/\n## [^\s]/u);
|
|
62
|
+
const intro = firstHeading ? body.slice(0, firstHeading.index).trim() : body.trim();
|
|
63
|
+
const quickStart = body.match(/## (?:快速开始|Quick\s*Start|Getting\s*Started)[\s\S]*?(?=\n## [^\s]|$)/iu);
|
|
64
|
+
const authentication = body.match(/## (?:认证|Authentication|Auth)[\s\S]*?(?=\n## [^\s]|$)/iu);
|
|
65
|
+
lines.push('## 指导', intro, '');
|
|
66
|
+
if (!quickStart && !authentication && !(intro.length < 200 && body.length > intro.length))
|
|
67
|
+
return;
|
|
68
|
+
const detail = [quickStart?.[0].trim(), authentication?.[0].trim()]
|
|
69
|
+
.filter((value) => Boolean(value))
|
|
70
|
+
.join('\n\n') || body.slice(intro.length).trim();
|
|
71
|
+
lines.push(detail.length > maxBodyLength
|
|
72
|
+
? `${detail.slice(0, maxBodyLength)}\n...(truncated)`
|
|
73
|
+
: detail, '');
|
|
74
|
+
}
|
|
75
|
+
function immediateAction() {
|
|
76
|
+
return '## 立即行动\n根据上面的指导,立即调用工具完成用户请求。禁止重复调用 load_skill,禁止用文本描述代替实际工具调用。';
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=skill-instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-instructions.js","sourceRoot":"","sources":["../../src/skill/skill-instructions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,MAAM,aAAa,GAAG,SAAS,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AE,CAAC;IACnD,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,aAAa;QACtC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,kBAAkB;QACrD,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;AAClB,CAAC;AAED,SAAS,eAAe;IACtB,OAAO,kEAAkE,CAAC;AAC5E,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* 使其符合统一的能力接缝(Capability Seam)架构。
|
|
6
6
|
*/
|
|
7
7
|
import type { SeamScope } from '../seam/seam-provider.js';
|
|
8
|
-
import type { SkillService, SkillMetadata
|
|
8
|
+
import type { SkillService, SkillMetadata } from '../seam/skill-service.js';
|
|
9
9
|
import type { SkillRegistry } from '../resource-hub/skill-registry.js';
|
|
10
10
|
/**
|
|
11
11
|
* 将 SkillRegistry 适配为 SkillService
|
|
@@ -21,9 +21,9 @@ export declare class SkillRegistryAsService implements SkillService {
|
|
|
21
21
|
readonly description = "Zhin skill registry";
|
|
22
22
|
readonly tags: string[];
|
|
23
23
|
constructor(registry: SkillRegistry);
|
|
24
|
-
catalog(
|
|
25
|
-
describe(
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
catalog(scope: SeamScope | 'global'): Promise<SkillMetadata[]>;
|
|
25
|
+
describe(scope: SeamScope | 'global', skillId: string): Promise<string>;
|
|
26
|
+
isAvailable(scope: SeamScope | 'global', skillId: string): boolean;
|
|
27
|
+
private findSkill;
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=skill-registry-as-service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-registry-as-service.d.ts","sourceRoot":"","sources":["../../src/skill/skill-registry-as-service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,
|
|
1
|
+
{"version":3,"file":"skill-registry-as-service.d.ts","sourceRoot":"","sources":["../../src/skill/skill-registry-as-service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGvE;;;;;;;GAOG;AACH,qBAAa,sBAAuB,YAAW,YAAY;IAK7C,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAJrC,QAAQ,CAAC,EAAE,iBAAiB;IAC5B,QAAQ,CAAC,WAAW,yBAAyB;IAC7C,QAAQ,CAAC,IAAI,WAA2B;gBAEX,QAAQ,EAAE,aAAa;IAE9C,OAAO,CAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAY9D,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAW7E,WAAW,CAAC,KAAK,EAAE,SAAS,GAAG,QAAQ,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO;IAIlE,OAAO,CAAC,SAAS;CAMlB"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* 将现有的 SkillRegistry 和约定目录发现逻辑包装为标准的 SkillService,
|
|
5
5
|
* 使其符合统一的能力接缝(Capability Seam)架构。
|
|
6
6
|
*/
|
|
7
|
+
import { readFile } from 'node:fs/promises';
|
|
7
8
|
/**
|
|
8
9
|
* 将 SkillRegistry 适配为 SkillService
|
|
9
10
|
*
|
|
@@ -20,34 +21,38 @@ export class SkillRegistryAsService {
|
|
|
20
21
|
constructor(registry) {
|
|
21
22
|
this.registry = registry;
|
|
22
23
|
}
|
|
23
|
-
async catalog(
|
|
24
|
-
|
|
24
|
+
async catalog(scope) {
|
|
25
|
+
const skills = scope === 'global'
|
|
26
|
+
? this.registry.getAll()
|
|
27
|
+
: this.registry.getForAgent(String(scope));
|
|
28
|
+
return skills.map((skill) => ({
|
|
25
29
|
name: skill.name,
|
|
26
30
|
description: skill.description,
|
|
27
31
|
keywords: skill.keywords,
|
|
28
32
|
category: skill.tags?.[0],
|
|
29
33
|
}));
|
|
30
34
|
}
|
|
31
|
-
async describe(
|
|
32
|
-
const skill = this.
|
|
35
|
+
async describe(scope, skillId) {
|
|
36
|
+
const skill = this.findSkill(scope, skillId);
|
|
33
37
|
if (!skill)
|
|
34
38
|
throw new Error(`Skill not found: ${skillId}`);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
async invoke(_scope, request) {
|
|
39
|
+
if (!skill.filePath)
|
|
40
|
+
return skill.description;
|
|
38
41
|
try {
|
|
39
|
-
|
|
40
|
-
if (!skill) {
|
|
41
|
-
return { success: false, error: `Skill not found: ${request.skillId}` };
|
|
42
|
-
}
|
|
43
|
-
return { success: true, output: skill };
|
|
42
|
+
return await readFile(skill.filePath, 'utf8');
|
|
44
43
|
}
|
|
45
|
-
catch
|
|
46
|
-
return
|
|
44
|
+
catch {
|
|
45
|
+
return skill.description;
|
|
47
46
|
}
|
|
48
47
|
}
|
|
49
|
-
isAvailable(
|
|
50
|
-
return this.
|
|
48
|
+
isAvailable(scope, skillId) {
|
|
49
|
+
return this.findSkill(scope, skillId) !== undefined;
|
|
50
|
+
}
|
|
51
|
+
findSkill(scope, skillId) {
|
|
52
|
+
const skills = scope === 'global'
|
|
53
|
+
? this.registry.getAll()
|
|
54
|
+
: this.registry.getForAgent(String(scope));
|
|
55
|
+
return skills.find((skill) => skill.name === skillId);
|
|
51
56
|
}
|
|
52
57
|
}
|
|
53
58
|
//# sourceMappingURL=skill-registry-as-service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-registry-as-service.js","sourceRoot":"","sources":["../../src/skill/skill-registry-as-service.ts"],"names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AC9C,IAAI,CAAC;YACH,OAAO,MAAM,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QAChD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC,WAAW,CAAC;QAC3B,CAAC;IACH,CAAC;IAED,WAAW,CAAC,KAA2B,EAAE,OAAe;QACtD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,SAAS,CAAC;IACtD,CAAC;IAEO,SAAS,CAAC,KAA2B,EAAE,OAAe;QAC5D,MAAM,MAAM,GAAG,KAAK,KAAK,QAAQ;YAC/B,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;YACxB,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAC7C,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC;IACxD,CAAC;CACF"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { normalizeTool } from '../resource-hub/tool-selection.js';
|
|
2
2
|
import { SkillRegistry } from '../resource-hub/skill-registry.js';
|
|
3
3
|
function toBlueprintSkill(skill) {
|
|
4
4
|
return {
|
|
5
5
|
name: skill.name,
|
|
6
6
|
description: skill.description,
|
|
7
|
-
tools: skill.tools.map((tool) =>
|
|
7
|
+
tools: skill.tools.map((tool) => normalizeTool(tool)),
|
|
8
8
|
keywords: skill.keywords ?? [],
|
|
9
9
|
tags: skill.tags ?? [],
|
|
10
10
|
platforms: skill.platforms,
|
|
@@ -36,7 +36,7 @@ export class SkillSystem {
|
|
|
36
36
|
}
|
|
37
37
|
collectTools(context, agentId) {
|
|
38
38
|
const tools = this.registry.collectAllTools(agentId);
|
|
39
|
-
return tools.map((tool) =>
|
|
39
|
+
return tools.map((tool) => normalizeTool(tool, context.message));
|
|
40
40
|
}
|
|
41
41
|
getAlwaysSkills(agentId) {
|
|
42
42
|
if (typeof this.registry.getAlwaysSkills !== 'function')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-system.js","sourceRoot":"","sources":["../../src/skill/skill-system.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"skill-system.js","sourceRoot":"","sources":["../../src/skill/skill-system.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AASlE,SAAS,gBAAgB,CAAC,KAAuB;IAC/C,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAc,CAAC;QAClE,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,EAAE;QAC9B,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,EAAE;QACtB,SAAS,EAAE,KAAK,CAAC,SAAS;KAC3B,CAAC;AACJ,CAAC;AAED,MAAM,OAAO,WAAW;IAKH;IAJF,QAAQ,CAAgB;IAEzC,YACE,QAAwB,EACP,UAA6B,EAAE;QAA/B,YAAO,GAAP,OAAO,CAAwB;QAEhD,IAAI,CAAC,QAAQ,GAAG,QAAQ,IAAI,IAAI,aAAa,EAAE,CAAC;IAClD,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IAED,QAAQ,CAAC,KAAuB,EAAE,KAAwD,EAAE,MAAe;QACzG,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,CAAC,KAAa,EAAE,OAA4B;QAChD,MAAM,UAAU,GAAG,OAAO,EAAE,UAAU,IAAI,CAAC,CAAC;QAC5C,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,KAAK,EAAE;YAC/C,UAAU;YACV,QAAQ,EAAE,OAAO,EAAE,QAAQ;SAC5B,CAAC,CAAC;QACH,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC;YACvC,KAAK,EAAE,gBAAgB,CAAC,KAAK,CAAC;YAC9B,KAAK;SACN,CAAC,CAAC,CAAC;IACN,CAAC;IAED,YAAY,CAAC,OAAoB,EAAE,OAAgB;QACjD,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;QACrD,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;IACnE,CAAC;IAED,eAAe,CAAC,OAAgB;QAC9B,IAAI,OAAO,IAAI,CAAC,QAAQ,CAAC,eAAe,KAAK,UAAU;YAAE,OAAO,EAAE,CAAC;QACnE,OAAO,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;CACF;AAED,MAAM,UAAU,iBAAiB,CAAC,QAAwB;IACxD,OAAO,IAAI,WAAW,CAAC,QAAQ,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,WAAW,EAAE,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* spawn_task — 主会话将耗时任务派给后台子 agent(与 issue #396 对齐)
|
|
3
3
|
*/
|
|
4
|
-
import { type Message, type
|
|
4
|
+
import { type Message, type ToolParametersSchema, type ToolResult } from '@zhin.js/core';
|
|
5
5
|
import type { AgentTool } from '@zhin.js/ai';
|
|
6
6
|
import type { SubagentSystem, SubagentOrigin } from '../subagent/index.js';
|
|
7
|
-
import {
|
|
8
|
-
import { type PermissionTaskRules } from '../spawn/permission-task.js';
|
|
7
|
+
import { type PermissionTaskRules } from './permission-task.js';
|
|
9
8
|
export interface SpawnTaskToolOptions {
|
|
10
9
|
/** 经 permission.task 过滤后可展示的子 agent 名 */
|
|
11
10
|
allowedAgents?: string[];
|
|
@@ -13,7 +12,7 @@ export interface SpawnTaskToolOptions {
|
|
|
13
12
|
}
|
|
14
13
|
export declare const SPAWN_TASK_PARAMETERS: ToolParametersSchema;
|
|
15
14
|
export declare function originFromMessage(message: Message): SubagentOrigin;
|
|
16
|
-
export declare class
|
|
15
|
+
export declare class SpawnTaskTool {
|
|
17
16
|
private readonly sessionCommMessage;
|
|
18
17
|
private readonly manager;
|
|
19
18
|
readonly name = "spawn_task";
|
|
@@ -21,8 +20,8 @@ export declare class SpawnTaskBuiltinTool extends BuiltinBaseTool {
|
|
|
21
20
|
readonly parameters: ToolParametersSchema<Record<string, any>>;
|
|
22
21
|
private readonly permissionTaskRules?;
|
|
23
22
|
constructor(sessionCommMessage: Message, manager: SubagentSystem, options?: SpawnTaskToolOptions);
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
definition(): AgentTool;
|
|
24
|
+
execute(args: Record<string, unknown>): Promise<ToolResult>;
|
|
26
25
|
}
|
|
27
26
|
export declare function createSpawnTaskTool(commMessage: Message, manager: SubagentSystem, options?: SpawnTaskToolOptions): AgentTool;
|
|
28
27
|
//# sourceMappingURL=spawn-task-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spawn-task-tool.d.ts","sourceRoot":"","sources":["../../src/spawn/spawn-task-tool.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAG3E,OAAO,EAEL,KAAK,mBAAmB,EACzB,MAAM,sBAAsB,CAAC;AAC9B,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;CAC3C;AAgBD,eAAO,MAAM,qBAAqB,EAAE,oBAqCnC,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,OAAO,GAAG,cAAc,CAElE;AAUD,qBAAa,aAAa;IAOtB,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,OAAO;IAP1B,QAAQ,CAAC,IAAI,gBAAgB;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,UAAU,4CAAyB;IAC5C,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAsB;gBAGxC,kBAAkB,EAAE,OAAO,EAC3B,OAAO,EAAE,cAAc,EACxC,OAAO,CAAC,EAAE,oBAAoB;IAMhC,UAAU,IAAI,SAAS;IAYjB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;CA8ClE;AAED,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,OAAO,EACpB,OAAO,EAAE,cAAc,EACvB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,SAAS,CAMX"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { BuiltinBaseTool } from './builtin-base-tool.js';
|
|
2
1
|
import { getActiveDeferredTurnController } from '../tool-catalog/deferred-turn-controller.js';
|
|
3
|
-
import { assertSpawnAgentAllowed, } from '
|
|
2
|
+
import { assertSpawnAgentAllowed, } from './permission-task.js';
|
|
4
3
|
function buildSpawnTaskDescription(allowedAgents) {
|
|
5
4
|
const lines = [
|
|
6
5
|
'Delegate complex or long-running work to a temporary chat sub-agent. This does not create or update a durable Workroom Task. It runs asynchronously and returns an ephemeral subtask ID; set wait=true to block until completion.',
|
|
@@ -11,7 +10,7 @@ function buildSpawnTaskDescription(allowedAgents) {
|
|
|
11
10
|
lines.push(`Allowed sub-agent types: ${allowedAgents.join(', ')}.`);
|
|
12
11
|
}
|
|
13
12
|
else {
|
|
14
|
-
lines.push('Allowed sub-agent types are defined in ai.agents and agents
|
|
13
|
+
lines.push('Allowed sub-agent types are defined in ai.agents and agents/<name>/agent.json.');
|
|
15
14
|
}
|
|
16
15
|
return lines.join(' ');
|
|
17
16
|
}
|
|
@@ -28,7 +27,7 @@ export const SPAWN_TASK_PARAMETERS = {
|
|
|
28
27
|
},
|
|
29
28
|
agent: {
|
|
30
29
|
type: 'string',
|
|
31
|
-
description: 'Sub-agent name (must exist in ai.agents and agents/<name
|
|
30
|
+
description: 'Sub-agent name (must exist in ai.agents and agents/<name>/agent.json; default subtask toolset).',
|
|
32
31
|
},
|
|
33
32
|
wait: {
|
|
34
33
|
type: 'boolean',
|
|
@@ -37,7 +36,7 @@ export const SPAWN_TASK_PARAMETERS = {
|
|
|
37
36
|
context: {
|
|
38
37
|
type: 'string',
|
|
39
38
|
enum: ['fork', 'fresh'],
|
|
40
|
-
description: 'Context mode: fork injects recent parent session messages; fresh starts empty. Default follows
|
|
39
|
+
description: 'Context mode: fork injects recent parent session messages; fresh starts empty. Default follows agent.json or role.',
|
|
41
40
|
},
|
|
42
41
|
tools: {
|
|
43
42
|
type: 'array',
|
|
@@ -63,7 +62,7 @@ function parseStringArray(value) {
|
|
|
63
62
|
.map(item => item.trim());
|
|
64
63
|
return items.length > 0 ? items : undefined;
|
|
65
64
|
}
|
|
66
|
-
export class
|
|
65
|
+
export class SpawnTaskTool {
|
|
67
66
|
sessionCommMessage;
|
|
68
67
|
manager;
|
|
69
68
|
name = 'spawn_task';
|
|
@@ -71,20 +70,23 @@ export class SpawnTaskBuiltinTool extends BuiltinBaseTool {
|
|
|
71
70
|
parameters = SPAWN_TASK_PARAMETERS;
|
|
72
71
|
permissionTaskRules;
|
|
73
72
|
constructor(sessionCommMessage, manager, options) {
|
|
74
|
-
super();
|
|
75
73
|
this.sessionCommMessage = sessionCommMessage;
|
|
76
74
|
this.manager = manager;
|
|
77
75
|
this.description = buildSpawnTaskDescription(options?.allowedAgents);
|
|
78
76
|
this.permissionTaskRules = options?.permissionTaskRules;
|
|
79
|
-
this.tags.push('agent', 'async', 'task', '后台', '子任务');
|
|
80
|
-
this.keywords.push('后台', '异步', '子任务', 'spawn', 'background', '并行', '独立处理');
|
|
81
77
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
78
|
+
definition() {
|
|
79
|
+
return {
|
|
80
|
+
name: this.name,
|
|
81
|
+
description: this.description,
|
|
82
|
+
parameters: this.parameters,
|
|
83
|
+
source: 'builtin:context',
|
|
84
|
+
tags: ['agent', 'async', 'task', '后台', '子任务'],
|
|
85
|
+
keywords: ['后台', '异步', '子任务', 'spawn', 'background', '并行', '独立处理'],
|
|
86
|
+
execute: (args) => this.execute(args),
|
|
87
|
+
};
|
|
86
88
|
}
|
|
87
|
-
async
|
|
89
|
+
async execute(args) {
|
|
88
90
|
const task = args.task;
|
|
89
91
|
const label = args.label;
|
|
90
92
|
const agentName = args.agent;
|
|
@@ -127,6 +129,6 @@ export class SpawnTaskBuiltinTool extends BuiltinBaseTool {
|
|
|
127
129
|
}
|
|
128
130
|
}
|
|
129
131
|
export function createSpawnTaskTool(commMessage, manager, options) {
|
|
130
|
-
return new
|
|
132
|
+
return new SpawnTaskTool(commMessage, manager, options).definition();
|
|
131
133
|
}
|
|
132
134
|
//# sourceMappingURL=spawn-task-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spawn-task-tool.js","sourceRoot":"","sources":["../../src/spawn/sp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|
2
|
+
* ADR 0014 P2-1 — 实例级 Agent 状态 / RSS 内存压力监控
|
|
3
3
|
*/
|
|
4
4
|
import { Logger } from '@zhin.js/logger';
|
|
5
|
+
import type { AgentCompactionRuntime } from '../memory/compaction-runtime.js';
|
|
5
6
|
export interface StabilityMetricCollector {
|
|
6
7
|
name: string;
|
|
7
8
|
collect: () => number;
|
|
@@ -12,18 +13,18 @@ export interface StabilityMetricCollector {
|
|
|
12
13
|
}
|
|
13
14
|
export interface StabilityMetricSnapshot {
|
|
14
15
|
compactionStates: number;
|
|
15
|
-
pendingOrchestration: number;
|
|
16
16
|
rssMb?: number;
|
|
17
17
|
[key: string]: number | undefined;
|
|
18
18
|
}
|
|
19
19
|
export interface StabilityMonitorOptions {
|
|
20
|
+
compactionRuntime: AgentCompactionRuntime;
|
|
20
21
|
intervalMs?: number;
|
|
21
22
|
logger?: Logger;
|
|
22
23
|
collectors?: StabilityMetricCollector[];
|
|
23
24
|
includeRss?: boolean;
|
|
24
25
|
}
|
|
25
|
-
export declare function collectStabilityMetrics(options?: {
|
|
26
|
+
export declare function collectStabilityMetrics(compactionRuntime: AgentCompactionRuntime, options?: {
|
|
26
27
|
includeRss?: boolean;
|
|
27
28
|
}): Promise<StabilityMetricSnapshot>;
|
|
28
|
-
export declare function startStabilityMonitor(options
|
|
29
|
+
export declare function startStabilityMonitor(options: StabilityMonitorOptions): () => void;
|
|
29
30
|
//# sourceMappingURL=memory-pressure.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-pressure.d.ts","sourceRoot":"","sources":["../../src/stability/memory-pressure.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAiB,MAAM,EAAa,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"memory-pressure.d.ts","sourceRoot":"","sources":["../../src/stability/memory-pressure.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAiB,MAAM,EAAa,MAAM,iBAAiB,CAAC;AACnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAI9E,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,MAAM,CAAC;IACtB,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,uBAAuB;IACtC,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACnC;AAED,MAAM,WAAW,uBAAuB;IACtC,iBAAiB,EAAE,sBAAsB,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,wBAAwB,EAAE,CAAC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAWD,wBAAsB,uBAAuB,CAC3C,iBAAiB,EAAE,sBAAsB,EACzC,OAAO,GAAE;IAAE,UAAU,CAAC,EAAE,OAAO,CAAA;CAAO,GACrC,OAAO,CAAC,uBAAuB,CAAC,CAUlC;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,uBAAuB,GAAG,MAAM,IAAI,CA+BlF"}
|
|
@@ -1,38 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ADR 0014 P2-1 —
|
|
2
|
+
* ADR 0014 P2-1 — 实例级 Agent 状态 / RSS 内存压力监控
|
|
3
3
|
*/
|
|
4
4
|
import { formatCompact, getLogger } from '@zhin.js/logger';
|
|
5
|
-
import { getCompactionStateCount, evictCompactionStatesIfOverPressure } from '../memory/compaction-runtime.js';
|
|
6
|
-
import { getPendingOrchestrationCount, evictPendingOrchestrationIfOverPressure, } from '../security/owner-approve-always-store.js';
|
|
7
5
|
const defaultLogger = getLogger('StabilityMonitor');
|
|
8
|
-
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
collect: getPendingOrchestrationCount,
|
|
18
|
-
threshold: 100,
|
|
19
|
-
evict: evictPendingOrchestrationIfOverPressure,
|
|
20
|
-
},
|
|
21
|
-
];
|
|
22
|
-
export async function collectStabilityMetrics(options = {}) {
|
|
6
|
+
function defaultCollectors(compactionRuntime) {
|
|
7
|
+
return [{
|
|
8
|
+
name: 'compactionStates',
|
|
9
|
+
collect: () => compactionRuntime.stateCount,
|
|
10
|
+
threshold: 4000,
|
|
11
|
+
evict: () => compactionRuntime.evictIfOverPressure(),
|
|
12
|
+
}];
|
|
13
|
+
}
|
|
14
|
+
export async function collectStabilityMetrics(compactionRuntime, options = {}) {
|
|
23
15
|
const snapshot = {
|
|
24
|
-
compactionStates:
|
|
25
|
-
pendingOrchestration: getPendingOrchestrationCount(),
|
|
16
|
+
compactionStates: compactionRuntime.stateCount,
|
|
26
17
|
};
|
|
27
18
|
if (options.includeRss !== false && typeof process.memoryUsage === 'function') {
|
|
28
19
|
snapshot.rssMb = Math.round(process.memoryUsage().rss / (1024 * 1024));
|
|
29
20
|
}
|
|
30
21
|
return snapshot;
|
|
31
22
|
}
|
|
32
|
-
export function startStabilityMonitor(options
|
|
23
|
+
export function startStabilityMonitor(options) {
|
|
33
24
|
const log = options.logger ?? defaultLogger;
|
|
34
25
|
const intervalMs = options.intervalMs ?? 60_000;
|
|
35
|
-
const collectors = options.collectors ??
|
|
26
|
+
const collectors = options.collectors ?? defaultCollectors(options.compactionRuntime);
|
|
36
27
|
const includeRss = options.includeRss !== false;
|
|
37
28
|
const timer = setInterval(() => {
|
|
38
29
|
void (async () => {
|
|
@@ -48,7 +39,7 @@ export function startStabilityMonitor(options = {}) {
|
|
|
48
39
|
}
|
|
49
40
|
}
|
|
50
41
|
if (includeRss) {
|
|
51
|
-
const metrics = await collectStabilityMetrics({ includeRss: true });
|
|
42
|
+
const metrics = await collectStabilityMetrics(options.compactionRuntime, { includeRss: true });
|
|
52
43
|
log.debug(formatCompact({ op: 'stability', ...metrics }));
|
|
53
44
|
}
|
|
54
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-pressure.js","sourceRoot":"","sources":["../../src/stability/memory-pressure.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,aAAa,EAAU,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"memory-pressure.js","sourceRoot":"","sources":["../../src/stability/memory-pressure.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,aAAa,EAAU,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAGnE,MAAM,aAAa,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC;AAyBpD,SAAS,iBAAiB,CAAC,iBAAyC;IAClE,OAAO,CAAC;YACN,IAAI,EAAE,kBAAkB;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,UAAU;YAC3C,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,GAAG,EAAE,CAAC,iBAAiB,CAAC,mBAAmB,EAAE;SACrD,CAAC,CAAC;AACL,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,iBAAyC,EACzC,UAAoC,EAAE;IAEtC,MAAM,QAAQ,GAA4B;QACxC,gBAAgB,EAAE,iBAAiB,CAAC,UAAU;KAC/C,CAAC;IAEF,IAAI,OAAO,CAAC,UAAU,KAAK,KAAK,IAAI,OAAO,OAAO,CAAC,WAAW,KAAK,UAAU,EAAE,CAAC;QAC9E,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,GAAG,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;IACzE,CAAC;IAED,OAAO,QAAQ,C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C,KAAK,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC,CAAC;gBAC5D,CAAC;YACH,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACb,GAAG,CAAC,KAAK,CAAC,4BAA4B,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAC5F,CAAC;QACH,CAAC,CAAC,EAAE,CAAC;IACP,CAAC,EAAE,UAAU,CAAC,CAAC;IAEf,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC;IAChB,OAAO,GAAG,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { AgentTool } from '@zhin.js/ai';
|
|
2
|
+
export interface ResolveStandaloneToolsOptions {
|
|
3
|
+
readonly includeRegisteredTools: boolean;
|
|
4
|
+
readonly explicitTools: readonly AgentTool[];
|
|
5
|
+
}
|
|
6
|
+
/** Owns the explicit Tool namespace used by programmatic standalone Agents. */
|
|
7
|
+
export declare class StandaloneToolCatalog {
|
|
8
|
+
#private;
|
|
9
|
+
register(tool: AgentTool): () => void;
|
|
10
|
+
snapshot(): readonly AgentTool[];
|
|
11
|
+
resolve(options: ResolveStandaloneToolsOptions): AgentTool[];
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=standalone-tool-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standalone-tool-catalog.d.ts","sourceRoot":"","sources":["../../src/standalone/standalone-tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,sBAAsB,EAAE,OAAO,CAAC;IACzC,QAAQ,CAAC,aAAa,EAAE,SAAS,SAAS,EAAE,CAAC;CAC9C;AAED,+EAA+E;AAC/E,qBAAa,qBAAqB;;IAGhC,QAAQ,CAAC,IAAI,EAAE,SAAS,GAAG,MAAM,IAAI;IAcrC,QAAQ,IAAI,SAAS,SAAS,EAAE;IAIhC,OAAO,CAAC,OAAO,EAAE,6BAA6B,GAAG,SAAS,EAAE;CAe7D"}
|