@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
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ADR 0010 session-tree columns on existing SQLite DBs.
|
|
3
|
-
* CREATE TABLE IF NOT EXISTS does not add new columns to old tables.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Pre-origin-neutral `agent_sessions` IM address columns (05befc1).
|
|
7
|
-
* CREATE TABLE IF NOT EXISTS does not drop them; leftover NOT NULL columns
|
|
8
|
-
* make `agent_session.create` fail on existing SQLite files.
|
|
9
|
-
*/
|
|
10
|
-
export const LEGACY_AGENT_SESSION_IM_COLUMNS = [
|
|
11
|
-
'platform',
|
|
12
|
-
'endpoint_id',
|
|
13
|
-
'scene_id',
|
|
14
|
-
'scene_type',
|
|
15
|
-
'bot_id',
|
|
16
|
-
];
|
|
17
|
-
/** table → column → SQLite type for ALTER TABLE ADD COLUMN */
|
|
18
|
-
export const AGENT_SESSION_TREE_SCHEMA_PATCHES = {
|
|
19
|
-
agent_messages: {
|
|
20
|
-
id: 'INTEGER',
|
|
21
|
-
parent_id: 'INTEGER',
|
|
22
|
-
extra: 'TEXT',
|
|
23
|
-
},
|
|
24
|
-
agent_sessions: {
|
|
25
|
-
active_leaf_message_id: 'INTEGER',
|
|
26
|
-
},
|
|
27
|
-
agent_summaries: {
|
|
28
|
-
branch_anchor_message_id: 'INTEGER',
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
export function resolveAgentDbQuery(dbFeature) {
|
|
32
|
-
const direct = dbFeature.query;
|
|
33
|
-
if (typeof direct === 'function') {
|
|
34
|
-
return direct.bind(dbFeature);
|
|
35
|
-
}
|
|
36
|
-
const db = dbFeature.db;
|
|
37
|
-
const nested = db?.query;
|
|
38
|
-
if (typeof nested === 'function' && db) {
|
|
39
|
-
return nested.bind(db);
|
|
40
|
-
}
|
|
41
|
-
return undefined;
|
|
42
|
-
}
|
|
43
|
-
export function resolveAgentDbDialect(dbFeature) {
|
|
44
|
-
return dbFeature.db?.dialect?.name ?? '';
|
|
45
|
-
}
|
|
46
|
-
export async function listSqliteTableColumns(query, tableName) {
|
|
47
|
-
const rows = (await query(`PRAGMA table_info("${tableName}")`));
|
|
48
|
-
if (!Array.isArray(rows))
|
|
49
|
-
return new Set();
|
|
50
|
-
return new Set(rows.map((r) => String(r.name ?? '')).filter(Boolean));
|
|
51
|
-
}
|
|
52
|
-
export async function dropLegacyAgentSessionImColumns(dbFeature) {
|
|
53
|
-
const queryFn = resolveAgentDbQuery(dbFeature);
|
|
54
|
-
if (!queryFn)
|
|
55
|
-
return [];
|
|
56
|
-
const dialect = resolveAgentDbDialect(dbFeature);
|
|
57
|
-
if (dialect && dialect !== 'sqlite') {
|
|
58
|
-
return [];
|
|
59
|
-
}
|
|
60
|
-
let existing;
|
|
61
|
-
try {
|
|
62
|
-
existing = await listSqliteTableColumns((sql) => queryFn(sql), 'agent_sessions');
|
|
63
|
-
}
|
|
64
|
-
catch {
|
|
65
|
-
return [];
|
|
66
|
-
}
|
|
67
|
-
if (existing.size === 0)
|
|
68
|
-
return [];
|
|
69
|
-
const dropped = [];
|
|
70
|
-
for (const column of LEGACY_AGENT_SESSION_IM_COLUMNS) {
|
|
71
|
-
if (!existing.has(column))
|
|
72
|
-
continue;
|
|
73
|
-
await queryFn(`ALTER TABLE "agent_sessions" DROP COLUMN "${column}"`);
|
|
74
|
-
dropped.push(`agent_sessions.${column}`);
|
|
75
|
-
}
|
|
76
|
-
return dropped;
|
|
77
|
-
}
|
|
78
|
-
export async function upgradeAgentSessionTreeSchema(dbFeature) {
|
|
79
|
-
const queryFn = resolveAgentDbQuery(dbFeature);
|
|
80
|
-
if (!queryFn)
|
|
81
|
-
return [];
|
|
82
|
-
const dialect = resolveAgentDbDialect(dbFeature);
|
|
83
|
-
if (dialect && dialect !== 'sqlite') {
|
|
84
|
-
return [];
|
|
85
|
-
}
|
|
86
|
-
const added = [];
|
|
87
|
-
for (const [table, columns] of Object.entries(AGENT_SESSION_TREE_SCHEMA_PATCHES)) {
|
|
88
|
-
let existing;
|
|
89
|
-
try {
|
|
90
|
-
existing = await listSqliteTableColumns((sql) => queryFn(sql), table);
|
|
91
|
-
}
|
|
92
|
-
catch {
|
|
93
|
-
continue;
|
|
94
|
-
}
|
|
95
|
-
if (existing.size === 0)
|
|
96
|
-
continue;
|
|
97
|
-
for (const [column, sqlType] of Object.entries(columns)) {
|
|
98
|
-
if (existing.has(column))
|
|
99
|
-
continue;
|
|
100
|
-
await queryFn(`ALTER TABLE "${table}" ADD COLUMN "${column}" ${sqlType}`);
|
|
101
|
-
added.push(`${table}.${column}`);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
return added;
|
|
105
|
-
}
|
|
106
|
-
/** Populate agent_messages.id from SQLite rowid after ADD COLUMN. */
|
|
107
|
-
export async function backfillAgentMessageIdsFromRowid(dbFeature) {
|
|
108
|
-
const queryFn = resolveAgentDbQuery(dbFeature);
|
|
109
|
-
if (!queryFn)
|
|
110
|
-
return 0;
|
|
111
|
-
const dialect = resolveAgentDbDialect(dbFeature);
|
|
112
|
-
if (dialect && dialect !== 'sqlite')
|
|
113
|
-
return 0;
|
|
114
|
-
let columns;
|
|
115
|
-
try {
|
|
116
|
-
columns = await listSqliteTableColumns((sql) => queryFn(sql), 'agent_messages');
|
|
117
|
-
}
|
|
118
|
-
catch {
|
|
119
|
-
return 0;
|
|
120
|
-
}
|
|
121
|
-
if (!columns.has('id'))
|
|
122
|
-
return 0;
|
|
123
|
-
const countRows = (await queryFn(`SELECT COUNT(*) AS c FROM agent_messages WHERE id IS NULL`));
|
|
124
|
-
const pending = Number(countRows?.[0]?.c ?? 0);
|
|
125
|
-
if (pending <= 0)
|
|
126
|
-
return 0;
|
|
127
|
-
await queryFn(`UPDATE agent_messages SET id = rowid WHERE id IS NULL`);
|
|
128
|
-
return pending;
|
|
129
|
-
}
|
|
130
|
-
/** 将同 session 内 parent_id 为 null 的遗留行串成线性链(ADR 0010 迁移) */
|
|
131
|
-
export function planLinearParentBackfill(rows) {
|
|
132
|
-
const bySession = new Map();
|
|
133
|
-
for (const row of rows) {
|
|
134
|
-
const list = bySession.get(row.session_id) ?? [];
|
|
135
|
-
list.push(row);
|
|
136
|
-
bySession.set(row.session_id, list);
|
|
137
|
-
}
|
|
138
|
-
const updates = [];
|
|
139
|
-
for (const list of bySession.values()) {
|
|
140
|
-
const sorted = [...list].sort((a, b) => a.timestamp - b.timestamp || a.id - b.id);
|
|
141
|
-
for (let i = 1; i < sorted.length; i += 1) {
|
|
142
|
-
const row = sorted[i];
|
|
143
|
-
if (row.parent_id != null)
|
|
144
|
-
continue;
|
|
145
|
-
const prev = sorted[i - 1];
|
|
146
|
-
updates.push({ id: row.id, parent_id: prev.id });
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
return updates;
|
|
150
|
-
}
|
|
151
|
-
export async function backfillAgentMessageParentChains(dbFeature) {
|
|
152
|
-
const queryFn = resolveAgentDbQuery(dbFeature);
|
|
153
|
-
if (!queryFn)
|
|
154
|
-
return 0;
|
|
155
|
-
const dialect = resolveAgentDbDialect(dbFeature);
|
|
156
|
-
if (dialect && dialect !== 'sqlite')
|
|
157
|
-
return 0;
|
|
158
|
-
let rows;
|
|
159
|
-
try {
|
|
160
|
-
rows = (await queryFn(`SELECT id, session_id, parent_id, timestamp FROM agent_messages ORDER BY session_id, timestamp, id`));
|
|
161
|
-
}
|
|
162
|
-
catch {
|
|
163
|
-
return 0;
|
|
164
|
-
}
|
|
165
|
-
if (!Array.isArray(rows) || rows.length === 0)
|
|
166
|
-
return 0;
|
|
167
|
-
const updates = planLinearParentBackfill(rows);
|
|
168
|
-
for (const { id, parent_id } of updates) {
|
|
169
|
-
await queryFn(`UPDATE agent_messages SET parent_id = ? WHERE id = ?`, [parent_id, id]);
|
|
170
|
-
}
|
|
171
|
-
return updates.length;
|
|
172
|
-
}
|
|
173
|
-
export async function repairAgentSessionActiveLeaves(dbFeature) {
|
|
174
|
-
const queryFn = resolveAgentDbQuery(dbFeature);
|
|
175
|
-
if (!queryFn)
|
|
176
|
-
return 0;
|
|
177
|
-
const dialect = resolveAgentDbDialect(dbFeature);
|
|
178
|
-
if (dialect && dialect !== 'sqlite')
|
|
179
|
-
return 0;
|
|
180
|
-
let sessions;
|
|
181
|
-
try {
|
|
182
|
-
sessions = (await queryFn(`SELECT session_id, active_leaf_message_id FROM agent_sessions WHERE status = 'active'`));
|
|
183
|
-
}
|
|
184
|
-
catch {
|
|
185
|
-
return 0;
|
|
186
|
-
}
|
|
187
|
-
if (!Array.isArray(sessions))
|
|
188
|
-
return 0;
|
|
189
|
-
let repaired = 0;
|
|
190
|
-
for (const session of sessions) {
|
|
191
|
-
if (session.active_leaf_message_id != null)
|
|
192
|
-
continue;
|
|
193
|
-
const maxRows = (await queryFn(`SELECT MAX(id) AS max_id FROM agent_messages WHERE session_id = ?`, [session.session_id]));
|
|
194
|
-
const maxId = maxRows?.[0]?.max_id;
|
|
195
|
-
if (maxId == null)
|
|
196
|
-
continue;
|
|
197
|
-
await queryFn(`UPDATE agent_sessions SET active_leaf_message_id = ? WHERE session_id = ?`, [maxId, session.session_id]);
|
|
198
|
-
repaired += 1;
|
|
199
|
-
}
|
|
200
|
-
return repaired;
|
|
201
|
-
}
|
|
202
|
-
export async function upgradeAgentSessionTreeData(dbFeature) {
|
|
203
|
-
const dropped = await dropLegacyAgentSessionImColumns(dbFeature);
|
|
204
|
-
const columns = await upgradeAgentSessionTreeSchema(dbFeature);
|
|
205
|
-
const idsBackfilled = await backfillAgentMessageIdsFromRowid(dbFeature);
|
|
206
|
-
const parentLinks = await backfillAgentMessageParentChains(dbFeature);
|
|
207
|
-
const activeLeaves = await repairAgentSessionActiveLeaves(dbFeature);
|
|
208
|
-
return { columns, dropped, idsBackfilled, parentLinks, activeLeaves };
|
|
209
|
-
}
|
|
210
|
-
//# sourceMappingURL=upgrade-agent-db-schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade-agent-db-schema.js","sourceRoot":"","sources":["../../src/init/upgrade-agent-db-schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH;;;;GAIG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC7C,UAAU;IACV,aAAa;IACb,UAAU;IACV,YAAY;IACZ,QAAQ;CACA,CAAC;AAEX,8DAA8D;AAC9D,MAAM,CAAC,MAAM,iCAAiC,GAA2C;IACvF,cAAc,EAAE;QACd,EAAE,EAAE,SAAS;QACb,SAAS,EAAE,SAAS;QACpB,KAAK,EAAE,MAAM;KACd;IACD,cAAc,EAAE;QACd,sBAAsB,EAAE,SAAS;KAClC;IACD,eAAe,EAAE;QACf,wBAAwB,EAAE,SAAS;KACpC;CACF,CAAC;AAEF,MAAM,UAAU,mBAAmB,CACjC,SAA2B;IAE3B,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC;IAC/B,IAAI,OAAO,MAAM,KAAK,UAAU,EAAE,CAAC;QACjC,OAAO,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAChC,CAAC;IACD,MAAM,EAAE,GAAG,SAAS,CAAC,EAAE,CAAC;IACxB,MAAM,MAAM,GAAG,EAAE,EAAE,KAAK,CAAC;IACzB,IAAI,OAAO,MAAM,KAAK,UAAU,IAAI,EAAE,EAAE,CAAC;QACvC,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACzB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,SAA2B;IAC/D,OAAO,SAAS,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC;AAC3C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,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AC,CAAC,CAAC,EAAE,MAAM,CAAC;QACnC,IAAI,KAAK,IAAI,IAAI;YAAE,SAAS;QAC5B,MAAM,OAAO,CACX,2EAA2E,EAC3E,CAAC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,CAC5B,CAAC;QACF,QAAQ,IAAI,CAAC,CAAC;IAChB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAC/C,SAA2B;IAQ3B,MAAM,OAAO,GAAG,MAAM,+BAA+B,CAAC,SAAS,CAAC,CAAC;IACjE,MAAM,OAAO,GAAG,MAAM,6BAA6B,CAAC,SAAS,CAAC,CAAC;IAC/D,MAAM,aAAa,GAAG,MAAM,gCAAgC,CAAC,SAAS,CAAC,CAAC;IACxE,MAAM,WAAW,GAAG,MAAM,gCAAgC,CAAC,SAAS,CAAC,CAAC;IACtE,MAAM,YAAY,GAAG,MAAM,8BAA8B,CAAC,SAAS,CAAC,CAAC;IACrE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;AACxE,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bot → Endpoint 破坏性重命名:旧 SQLite 表 bot_id 列升级为 endpoint_id。
|
|
3
|
-
* CREATE TABLE IF NOT EXISTS 不会改已有表结构。
|
|
4
|
-
*/
|
|
5
|
-
import { type AgentDbQueryable } from './upgrade-agent-db-schema.js';
|
|
6
|
-
export declare function upgradeBotIdToEndpointKeyColumns(dbFeature: AgentDbQueryable): Promise<string[]>;
|
|
7
|
-
/** 在 db.start() 后、任何 ORM 写入前注册(可重复调用,仅注册一次) */
|
|
8
|
-
export declare function registerEndpointKeyColumnMigrationHook(logger: {
|
|
9
|
-
info: (msg: string) => void;
|
|
10
|
-
error: (msg: string, err?: unknown) => void;
|
|
11
|
-
}): void;
|
|
12
|
-
//# sourceMappingURL=upgrade-endpoint-id-schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade-endpoint-id-schema.d.ts","sourceRoot":"","sources":["../../src/init/upgrade-endpoint-id-schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAIL,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAC;AActC,wBAAsB,gCAAgC,CACpD,SAAS,EAAE,gBAAgB,GAC1B,OAAO,CAAC,MAAM,EAAE,CAAC,CA0BnB;AAED,+CAA+C;AAC/C,wBAAgB,sCAAsC,CACpD,MAAM,EAAE;IAAE,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,OAAO,KAAK,IAAI,CAAA;CAAE,GACnF,IAAI,CAcN"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bot → Endpoint 破坏性重命名:旧 SQLite 表 bot_id 列升级为 endpoint_id。
|
|
3
|
-
* CREATE TABLE IF NOT EXISTS 不会改已有表结构。
|
|
4
|
-
*/
|
|
5
|
-
import { onDatabaseAfterStart } from '@zhin.js/core';
|
|
6
|
-
import { listSqliteTableColumns, resolveAgentDbDialect, resolveAgentDbQuery, } from './upgrade-agent-db-schema.js';
|
|
7
|
-
let migrationHookRegistered = false;
|
|
8
|
-
async function listSqliteUserTables(query) {
|
|
9
|
-
const rows = (await query(`SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'`));
|
|
10
|
-
if (!Array.isArray(rows))
|
|
11
|
-
return [];
|
|
12
|
-
return rows.map((r) => String(r.name ?? '')).filter(Boolean);
|
|
13
|
-
}
|
|
14
|
-
export async function upgradeBotIdToEndpointKeyColumns(dbFeature) {
|
|
15
|
-
const queryFn = resolveAgentDbQuery(dbFeature);
|
|
16
|
-
if (!queryFn)
|
|
17
|
-
return [];
|
|
18
|
-
const dialect = resolveAgentDbDialect(dbFeature);
|
|
19
|
-
if (dialect && dialect !== 'sqlite') {
|
|
20
|
-
return [];
|
|
21
|
-
}
|
|
22
|
-
const tables = await listSqliteUserTables((sql) => queryFn(sql));
|
|
23
|
-
const renamed = [];
|
|
24
|
-
for (const table of tables) {
|
|
25
|
-
let columns;
|
|
26
|
-
try {
|
|
27
|
-
columns = await listSqliteTableColumns((sql) => queryFn(sql), table);
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
30
|
-
continue;
|
|
31
|
-
}
|
|
32
|
-
if (columns.size === 0)
|
|
33
|
-
continue;
|
|
34
|
-
if (!columns.has('bot_id') || columns.has('endpoint_id'))
|
|
35
|
-
continue;
|
|
36
|
-
await queryFn(`ALTER TABLE "${table}" RENAME COLUMN "bot_id" TO "endpoint_id"`);
|
|
37
|
-
renamed.push(`${table}.bot_id→endpoint_id`);
|
|
38
|
-
}
|
|
39
|
-
return renamed;
|
|
40
|
-
}
|
|
41
|
-
/** 在 db.start() 后、任何 ORM 写入前注册(可重复调用,仅注册一次) */
|
|
42
|
-
export function registerEndpointKeyColumnMigrationHook(logger) {
|
|
43
|
-
if (migrationHookRegistered)
|
|
44
|
-
return;
|
|
45
|
-
migrationHookRegistered = true;
|
|
46
|
-
onDatabaseAfterStart(async (db) => {
|
|
47
|
-
try {
|
|
48
|
-
const renamed = await upgradeBotIdToEndpointKeyColumns({ db });
|
|
49
|
-
if (renamed.length > 0) {
|
|
50
|
-
logger.info(`Database: renamed bot_id → endpoint_id (${renamed.join(', ')})`);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
catch (e) {
|
|
54
|
-
logger.error('Database: bot_id → endpoint_id migration failed:', e);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=upgrade-endpoint-id-schema.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade-endpoint-id-schema.js","sourceRoot":"","sources":["../../src/init/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AAK,CAAC,CAAC;QACvE,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;QACD,IAAI,OAAO,CAAC,IAAI,KAAK,CAAC;YAAE,SAAS;QACjC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;YAAE,SAAS;QAEnE,MAAM,OAAO,CAAC,gBAAgB,KAAK,2CAA2C,CAAC,CAAC;QAChF,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,qBAAqB,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,+CAA+C;AAC/C,MAAM,UAAU,sCAAsC,CACpD,MAAoF;IAEpF,IAAI,uBAAuB;QAAE,OAAO;IACpC,uBAAuB,GAAG,IAAI,CAAC;IAE/B,oBAAoB,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE;QAChC,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,MAAM,gCAAgC,CAAC,EAAE,EAAE,EAAsB,CAAC,CAAC;YACnF,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACvB,MAAM,CAAC,IAAI,CAAC,2CAA2C,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAChF,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,CAAC,KAAK,CAAC,kDAAkD,EAAE,CAAC,CAAC,CAAC;QACtE,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"workroom-governed-dispatch-reasons.d.ts","sourceRoot":"","sources":["../../src/plugin-runtime/workroom-governed-dispatch-reasons.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,uCAAuC,CAAC;AAE3F,MAAM,MAAM,sCAAsC,GAC9C,eAAe,GACf,iBAAiB,G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AAK,EAAE,MAAM,EAAE,gBAAgB,EAAE;CACnE,CAAC,CAAC;AAEH,MAAM,UAAU,oCAAoC,CAClD,KAAa;IAEb,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;IAClE,CAAC;IACD,MAAM,IAAI,GAAG,KAAsC,CAAC;IACpD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC/D,CAAC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ToolRegistry — unified tool management with common/specialized support.
|
|
3
|
-
*
|
|
4
|
-
* Owns registry state and delegates tool semantics to tool-selection:
|
|
5
|
-
* - core/built/tool.ts (ToolFeature, ZhinTool, permission checking)
|
|
6
|
-
* - ai/tool-filter.ts + tool-search-cache.ts (relevance filtering)
|
|
7
|
-
*/
|
|
8
|
-
import { type AgentTool, type ToolFilterOptions } from '@zhin.js/ai';
|
|
9
|
-
import { ResourceRegistry } from './resource-registry.js';
|
|
10
|
-
import type { ResourceScope, Tool, Message, ToolParametersSchema, PropertySchema, ToolScope } from './types.js';
|
|
11
|
-
import { type ToolLike } from './tool-selection.js';
|
|
12
|
-
export { canAccessTool } from './tool-selection.js';
|
|
13
|
-
export type { ToolLike } from './tool-selection.js';
|
|
14
|
-
interface ParamDef {
|
|
15
|
-
name: string;
|
|
16
|
-
schema: PropertySchema;
|
|
17
|
-
required: boolean;
|
|
18
|
-
}
|
|
19
|
-
type MaybePromise<T> = T | Promise<T>;
|
|
20
|
-
export declare class ZhinTool {
|
|
21
|
-
#private;
|
|
22
|
-
constructor(name: string);
|
|
23
|
-
get name(): string;
|
|
24
|
-
get description(): string;
|
|
25
|
-
get params(): ParamDef[];
|
|
26
|
-
desc(description: string): this;
|
|
27
|
-
param(name: string, schema: PropertySchema, required?: boolean): this;
|
|
28
|
-
platform(...platforms: string[]): this;
|
|
29
|
-
scope(...scopes: ToolScope[]): this;
|
|
30
|
-
permit(...permissions: string[]): this;
|
|
31
|
-
tag(...tags: string[]): this;
|
|
32
|
-
keyword(...keywords: string[]): this;
|
|
33
|
-
hidden(value?: boolean): this;
|
|
34
|
-
preExec(value?: boolean): this;
|
|
35
|
-
kind(value: string): this;
|
|
36
|
-
execute(callback: (args: Record<string, any>, commMessage?: Message) => MaybePromise<any>): this;
|
|
37
|
-
toTool(): Tool;
|
|
38
|
-
toJSON(): Record<string, any>;
|
|
39
|
-
get help(): string;
|
|
40
|
-
toString(): string;
|
|
41
|
-
}
|
|
42
|
-
export declare function isZhinTool(obj: any): obj is ZhinTool;
|
|
43
|
-
export declare function defineTool<TArgs extends Record<string, any> = Record<string, any>>(tool: Tool<TArgs>): Tool;
|
|
44
|
-
export declare function extractParamInfo(parameters: ToolParametersSchema): Tool.ParamInfo[];
|
|
45
|
-
export type ToolInput = Tool | ZhinTool;
|
|
46
|
-
export declare class ToolRegistry extends ResourceRegistry<AgentTool> {
|
|
47
|
-
private readonly logger;
|
|
48
|
-
private readonly toolPluginMap;
|
|
49
|
-
addTool(input: ToolInput | AgentTool | ToolLike, scope?: ResourceScope, source?: string): () => void;
|
|
50
|
-
removeTool(name: string, scope?: ResourceScope): boolean;
|
|
51
|
-
filterByContext(tools: Tool[], commMessage: Message): Tool[];
|
|
52
|
-
filterByRelevance(message: string, agentId?: string, options?: ToolFilterOptions): AgentTool[];
|
|
53
|
-
execute(name: string, args: Record<string, any>, _commMessage?: Message): Promise<unknown>;
|
|
54
|
-
getByTags(tags: string[]): AgentTool[];
|
|
55
|
-
setToolPluginMap(toolName: string, pluginName: string): void;
|
|
56
|
-
getToolsByPlugin(pluginName: string): AgentTool[];
|
|
57
|
-
dispose(): void;
|
|
58
|
-
private findInSpecialized;
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingUR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AI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,aAAa,GAAG,OAAO;IAMxD,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,WAAW,EAAE,OAAO,GAAG,IAAI,EAAE;IAI5D,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,SAAS,EAAE;IAKxF,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAMhG,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE;IAItC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAI5D,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE;IAWxC,OAAO,IAAI,IAAI;IAMxB,OAAO,CAAC,iBAAiB;CAO1B"}
|
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ToolRegistry — unified tool management with common/specialized support.
|
|
3
|
-
*
|
|
4
|
-
* Owns registry state and delegates tool semantics to tool-selection:
|
|
5
|
-
* - core/built/tool.ts (ToolFeature, ZhinTool, permission checking)
|
|
6
|
-
* - ai/tool-filter.ts + tool-search-cache.ts (relevance filtering)
|
|
7
|
-
*/
|
|
8
|
-
import { isBuiltinToolSource, isReservedToolName } from '@zhin.js/ai';
|
|
9
|
-
import { getLogger } from '@zhin.js/core';
|
|
10
|
-
import { ResourceRegistry } from './resource-registry.js';
|
|
11
|
-
import { RESERVED_TOOL_NAMES, RESERVED_TOOL_NAME_PREFIXES } from '../reserved-tools.js';
|
|
12
|
-
import { canAccessTool, sharedToolSelection, } from './tool-selection.js';
|
|
13
|
-
export { canAccessTool } from './tool-selection.js';
|
|
14
|
-
export class ZhinTool {
|
|
15
|
-
#name;
|
|
16
|
-
#description = '';
|
|
17
|
-
#params = [];
|
|
18
|
-
#execute;
|
|
19
|
-
#platforms = [];
|
|
20
|
-
#scopes = [];
|
|
21
|
-
#permissions = [];
|
|
22
|
-
#tags = [];
|
|
23
|
-
#keywords = [];
|
|
24
|
-
#hidden = false;
|
|
25
|
-
#source;
|
|
26
|
-
#preExecutable = false;
|
|
27
|
-
#kind;
|
|
28
|
-
constructor(name) { this.#name = name; }
|
|
29
|
-
get name() { return this.#name; }
|
|
30
|
-
get description() { return this.#description; }
|
|
31
|
-
get params() { return [...this.#params]; }
|
|
32
|
-
desc(description) { this.#description = description; return this; }
|
|
33
|
-
param(name, schema, required = false) {
|
|
34
|
-
const idx = this.#params.findIndex(p => p.name === name);
|
|
35
|
-
if (idx >= 0)
|
|
36
|
-
this.#params[idx] = { name, schema, required };
|
|
37
|
-
else
|
|
38
|
-
this.#params.push({ name, schema, required });
|
|
39
|
-
return this;
|
|
40
|
-
}
|
|
41
|
-
platform(...platforms) { this.#platforms.push(...platforms); return this; }
|
|
42
|
-
scope(...scopes) { this.#scopes.push(...scopes); return this; }
|
|
43
|
-
permit(...permissions) { this.#permissions.push(...permissions); return this; }
|
|
44
|
-
tag(...tags) { this.#tags.push(...tags); return this; }
|
|
45
|
-
keyword(...keywords) { this.#keywords.push(...keywords); return this; }
|
|
46
|
-
hidden(value = true) { this.#hidden = value; return this; }
|
|
47
|
-
preExec(value = true) { this.#preExecutable = value; return this; }
|
|
48
|
-
kind(value) { this.#kind = value; return this; }
|
|
49
|
-
execute(callback) {
|
|
50
|
-
this.#execute = callback;
|
|
51
|
-
return this;
|
|
52
|
-
}
|
|
53
|
-
#buildParameters() {
|
|
54
|
-
const properties = {};
|
|
55
|
-
const required = [];
|
|
56
|
-
const sorted = [...this.#params].sort((a, b) => {
|
|
57
|
-
if (a.required && !b.required)
|
|
58
|
-
return -1;
|
|
59
|
-
if (!a.required && b.required)
|
|
60
|
-
return 1;
|
|
61
|
-
return 0;
|
|
62
|
-
});
|
|
63
|
-
for (const p of sorted) {
|
|
64
|
-
properties[p.name] = p.schema;
|
|
65
|
-
if (p.required)
|
|
66
|
-
required.push(p.name);
|
|
67
|
-
}
|
|
68
|
-
return { type: 'object', properties, required: required.length > 0 ? required : undefined };
|
|
69
|
-
}
|
|
70
|
-
toTool() {
|
|
71
|
-
if (!this.#execute)
|
|
72
|
-
throw new Error(`Tool "${this.#name}" has no execute() defined`);
|
|
73
|
-
const tool = {
|
|
74
|
-
name: this.#name,
|
|
75
|
-
description: this.#description,
|
|
76
|
-
parameters: this.#buildParameters(),
|
|
77
|
-
execute: this.#execute,
|
|
78
|
-
};
|
|
79
|
-
if (this.#platforms.length > 0)
|
|
80
|
-
tool.platforms = this.#platforms;
|
|
81
|
-
if (this.#scopes.length > 0)
|
|
82
|
-
tool.scopes = this.#scopes;
|
|
83
|
-
if (this.#permissions.length > 0)
|
|
84
|
-
tool.permissions = this.#permissions;
|
|
85
|
-
if (this.#tags.length > 0)
|
|
86
|
-
tool.tags = this.#tags;
|
|
87
|
-
if (this.#hidden)
|
|
88
|
-
tool.hidden = this.#hidden;
|
|
89
|
-
if (this.#source)
|
|
90
|
-
tool.source = this.#source;
|
|
91
|
-
if (this.#keywords.length > 0)
|
|
92
|
-
tool.keywords = this.#keywords;
|
|
93
|
-
if (this.#preExecutable)
|
|
94
|
-
tool.preExecutable = true;
|
|
95
|
-
if (this.#kind)
|
|
96
|
-
tool.kind = this.#kind;
|
|
97
|
-
return tool;
|
|
98
|
-
}
|
|
99
|
-
toJSON() {
|
|
100
|
-
const json = {
|
|
101
|
-
name: this.#name,
|
|
102
|
-
description: this.#description,
|
|
103
|
-
parameters: this.#buildParameters(),
|
|
104
|
-
};
|
|
105
|
-
if (this.#platforms.length > 0)
|
|
106
|
-
json.platforms = this.#platforms;
|
|
107
|
-
if (this.#scopes.length > 0)
|
|
108
|
-
json.scopes = this.#scopes;
|
|
109
|
-
if (this.#permissions.length > 0)
|
|
110
|
-
json.permissions = [...this.#permissions];
|
|
111
|
-
if (this.#tags.length > 0)
|
|
112
|
-
json.tags = this.#tags;
|
|
113
|
-
return json;
|
|
114
|
-
}
|
|
115
|
-
get help() {
|
|
116
|
-
const lines = [this.#name];
|
|
117
|
-
if (this.#description)
|
|
118
|
-
lines.push(` ${this.#description}`);
|
|
119
|
-
if (this.#params.length > 0) {
|
|
120
|
-
lines.push(' 参数:');
|
|
121
|
-
for (const p of this.#params) {
|
|
122
|
-
const req = p.required ? '(必填)' : '(可选)';
|
|
123
|
-
lines.push(` ${p.name}: ${p.schema.type} ${req} ${p.schema.description || ''}`);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
if (this.#permissions.length > 0)
|
|
127
|
-
lines.push(` 权限: ${this.#permissions.join(', ')}`);
|
|
128
|
-
if (this.#platforms.length > 0)
|
|
129
|
-
lines.push(` 平台: ${this.#platforms.join(', ')}`);
|
|
130
|
-
if (this.#scopes.length > 0)
|
|
131
|
-
lines.push(` 场景: ${this.#scopes.join(', ')}`);
|
|
132
|
-
return lines.join('\n');
|
|
133
|
-
}
|
|
134
|
-
toString() { return `[ZhinTool: ${this.#name}] ${this.#description}`; }
|
|
135
|
-
}
|
|
136
|
-
export function isZhinTool(obj) {
|
|
137
|
-
return obj instanceof ZhinTool;
|
|
138
|
-
}
|
|
139
|
-
export function defineTool(tool) {
|
|
140
|
-
return tool;
|
|
141
|
-
}
|
|
142
|
-
export function extractParamInfo(parameters) {
|
|
143
|
-
if (!parameters.properties)
|
|
144
|
-
return [];
|
|
145
|
-
const required = parameters.required || [];
|
|
146
|
-
return Object.entries(parameters.properties).map(([name, schema]) => ({
|
|
147
|
-
name, type: schema.type, required: required.includes(name),
|
|
148
|
-
description: schema.description, default: schema.default, enum: schema.enum,
|
|
149
|
-
}));
|
|
150
|
-
}
|
|
151
|
-
// ============================================================================
|
|
152
|
-
// ToolRegistry
|
|
153
|
-
// ============================================================================
|
|
154
|
-
export class ToolRegistry extends ResourceRegistry {
|
|
155
|
-
logger = getLogger('ToolRegistry');
|
|
156
|
-
toolPluginMap = new Map();
|
|
157
|
-
addTool(input, scope, source) {
|
|
158
|
-
const incomingSource = source || 'unknown';
|
|
159
|
-
const normalized = sharedToolSelection.normalize(input);
|
|
160
|
-
const tool = {
|
|
161
|
-
...normalized,
|
|
162
|
-
source: normalized.source || input?.source || incomingSource,
|
|
163
|
-
};
|
|
164
|
-
const protectedName = isReservedToolName(tool.name, {
|
|
165
|
-
reservedNames: RESERVED_TOOL_NAMES,
|
|
166
|
-
reservedPrefixes: RESERVED_TOOL_NAME_PREFIXES,
|
|
167
|
-
});
|
|
168
|
-
if (protectedName && !isBuiltinToolSource(tool.source)) {
|
|
169
|
-
this.logger.warn(`[工具命名] name=${tool.name} source=${incomingSource} action=ignored reason=reserved_name`);
|
|
170
|
-
return () => { };
|
|
171
|
-
}
|
|
172
|
-
const existingEntry = this.getEntry(tool.name, scope);
|
|
173
|
-
if (existingEntry) {
|
|
174
|
-
this.logger.warn(`[工具命名] name=${tool.name} source=${incomingSource} action=overridden previous=${existingEntry.source} reason=duplicate_name_last_wins`);
|
|
175
|
-
}
|
|
176
|
-
sharedToolSelection.invalidate();
|
|
177
|
-
return this.add(tool, scope, incomingSource);
|
|
178
|
-
}
|
|
179
|
-
removeTool(name, scope) {
|
|
180
|
-
sharedToolSelection.invalidate();
|
|
181
|
-
this.toolPluginMap.delete(name);
|
|
182
|
-
return this.remove(name, scope);
|
|
183
|
-
}
|
|
184
|
-
filterByContext(tools, commMessage) {
|
|
185
|
-
return tools.filter(t => canAccessTool(t, commMessage));
|
|
186
|
-
}
|
|
187
|
-
filterByRelevance(message, agentId, options) {
|
|
188
|
-
const pool = agentId ? this.getForAgent(agentId) : this.getAll();
|
|
189
|
-
return sharedToolSelection.filterByRelevance(message, pool, options);
|
|
190
|
-
}
|
|
191
|
-
async execute(name, args, _commMessage) {
|
|
192
|
-
const tool = this.get(name) ?? this.findInSpecialized(name);
|
|
193
|
-
if (!tool)
|
|
194
|
-
throw new Error(`Tool "${name}" not found`);
|
|
195
|
-
return tool.execute(args);
|
|
196
|
-
}
|
|
197
|
-
getByTags(tags) {
|
|
198
|
-
return this.getAll().filter(t => tags.some(tag => t.tags?.includes(tag)));
|
|
199
|
-
}
|
|
200
|
-
setToolPluginMap(toolName, pluginName) {
|
|
201
|
-
this.toolPluginMap.set(toolName, pluginName);
|
|
202
|
-
}
|
|
203
|
-
getToolsByPlugin(pluginName) {
|
|
204
|
-
const result = [];
|
|
205
|
-
for (const [toolName, pName] of this.toolPluginMap) {
|
|
206
|
-
if (pName === pluginName) {
|
|
207
|
-
const t = this.get(toolName);
|
|
208
|
-
if (t)
|
|
209
|
-
result.push(t);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
return result;
|
|
213
|
-
}
|
|
214
|
-
dispose() {
|
|
215
|
-
this.toolPluginMap.clear();
|
|
216
|
-
sharedToolSelection.invalidate();
|
|
217
|
-
super.dispose();
|
|
218
|
-
}
|
|
219
|
-
findInSpecialized(name) {
|
|
220
|
-
for (const agentMap of this.specialized.values()) {
|
|
221
|
-
const entry = agentMap.get(name);
|
|
222
|
-
if (entry)
|
|
223
|
-
return entry.resource;
|
|
224
|
-
}
|
|
225
|
-
return undefined;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
//# sourceMappingURL=tool-registry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-registry.js","sourceRoot":"","sources":["../../src/resource-hub/tool-registry.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA0C,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC9G,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAUxF,OAAO,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