@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
package/lib/hooks.d.ts
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AI Hooks — AI 生命周期事件钩子系统
|
|
3
|
-
*
|
|
4
|
-
* 借鉴 OpenClaw 的 Hooks 设计,提供可扩展的事件驱动钩子:
|
|
5
|
-
*
|
|
6
|
-
* - message:received — 收到消息时触发
|
|
7
|
-
* - message:sent — 发送消息时触发
|
|
8
|
-
* - session:compact — 会话压缩时触发
|
|
9
|
-
* - session:new — 新建会话时触发
|
|
10
|
-
* - agent:bootstrap — Agent 初始化时触发
|
|
11
|
-
* - agent:tool-call — 工具调用时触发
|
|
12
|
-
*
|
|
13
|
-
* 钩子按注册顺序执行,错误不会中断其他钩子。
|
|
14
|
-
*/
|
|
15
|
-
import { runModuleAIHookHandlers } from './ai-hook-handlers.js';
|
|
16
|
-
/** 事件类型 */
|
|
17
|
-
export type AIHookEventType = 'message' | 'session' | 'agent' | 'tool';
|
|
18
|
-
/** Hook 事件基础接口 */
|
|
19
|
-
export interface AIHookEvent {
|
|
20
|
-
/** 事件类型 */
|
|
21
|
-
type: AIHookEventType;
|
|
22
|
-
/** 具体动作 */
|
|
23
|
-
action: string;
|
|
24
|
-
/** 会话标识 */
|
|
25
|
-
sessionId?: string;
|
|
26
|
-
/** 附加上下文 */
|
|
27
|
-
context: Record<string, unknown>;
|
|
28
|
-
/** 事件时间戳 */
|
|
29
|
-
timestamp: Date;
|
|
30
|
-
/** 钩子可以推送消息到这个数组 */
|
|
31
|
-
messages: string[];
|
|
32
|
-
}
|
|
33
|
-
/** 消息接收事件 */
|
|
34
|
-
export interface MessageReceivedEvent extends AIHookEvent {
|
|
35
|
-
type: 'message';
|
|
36
|
-
action: 'received';
|
|
37
|
-
context: {
|
|
38
|
-
from: string;
|
|
39
|
-
content: string;
|
|
40
|
-
platform: string;
|
|
41
|
-
channelId?: string;
|
|
42
|
-
messageId?: string;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
/** 消息发送事件 */
|
|
46
|
-
export interface MessageSentEvent extends AIHookEvent {
|
|
47
|
-
type: 'message';
|
|
48
|
-
action: 'sent';
|
|
49
|
-
context: {
|
|
50
|
-
to: string;
|
|
51
|
-
content: string;
|
|
52
|
-
success: boolean;
|
|
53
|
-
error?: string;
|
|
54
|
-
platform: string;
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
/** 会话压缩事件 */
|
|
58
|
-
export interface SessionCompactEvent extends AIHookEvent {
|
|
59
|
-
type: 'session';
|
|
60
|
-
action: 'compact';
|
|
61
|
-
context: {
|
|
62
|
-
compactedCount: number;
|
|
63
|
-
savedTokens: number;
|
|
64
|
-
summary: string;
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
/** 会话新建事件 */
|
|
68
|
-
export interface SessionNewEvent extends AIHookEvent {
|
|
69
|
-
type: 'session';
|
|
70
|
-
action: 'new';
|
|
71
|
-
context: {
|
|
72
|
-
previousSessionId?: string;
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
/** Agent 初始化事件 */
|
|
76
|
-
export interface AgentBootstrapEvent extends AIHookEvent {
|
|
77
|
-
type: 'agent';
|
|
78
|
-
action: 'bootstrap';
|
|
79
|
-
context: {
|
|
80
|
-
workspaceDir: string;
|
|
81
|
-
toolCount: number;
|
|
82
|
-
skillCount: number;
|
|
83
|
-
bootstrapFiles: string[];
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
/** 工具调用事件 */
|
|
87
|
-
export interface ToolCallEvent extends AIHookEvent {
|
|
88
|
-
type: 'tool';
|
|
89
|
-
action: 'call';
|
|
90
|
-
context: {
|
|
91
|
-
toolName: string;
|
|
92
|
-
args: Record<string, unknown>;
|
|
93
|
-
result?: string;
|
|
94
|
-
durationMs?: number;
|
|
95
|
-
success: boolean;
|
|
96
|
-
error?: string;
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
/** Hook 处理函数 */
|
|
100
|
-
export type AIHookHandler = (event: AIHookEvent) => Promise<void> | void;
|
|
101
|
-
/**
|
|
102
|
-
* 注册 Hook 处理函数
|
|
103
|
-
*
|
|
104
|
-
* @param eventKey - 事件类型(如 'message')或具体动作(如 'message:received')
|
|
105
|
-
* @param handler - 处理函数
|
|
106
|
-
*
|
|
107
|
-
* @example
|
|
108
|
-
* ```ts
|
|
109
|
-
* // 监听所有消息事件
|
|
110
|
-
* registerAIHook('message', async (event) => {
|
|
111
|
-
* console.log('消息事件:', event.action);
|
|
112
|
-
* });
|
|
113
|
-
*
|
|
114
|
-
* // 只监听消息接收
|
|
115
|
-
* registerAIHook('message:received', async (event) => {
|
|
116
|
-
* console.log('收到消息:', event.context.content);
|
|
117
|
-
* });
|
|
118
|
-
* ```
|
|
119
|
-
*/
|
|
120
|
-
export declare function registerAIHook(eventKey: string, handler: AIHookHandler): () => void;
|
|
121
|
-
/**
|
|
122
|
-
* 注销 Hook 处理函数
|
|
123
|
-
*/
|
|
124
|
-
export declare function unregisterAIHook(eventKey: string, handler: AIHookHandler): void;
|
|
125
|
-
/**
|
|
126
|
-
* 清除所有 Hook(测试用)
|
|
127
|
-
*/
|
|
128
|
-
export declare function clearAIHooks(): void;
|
|
129
|
-
/**
|
|
130
|
-
* 获取已注册的事件 key 列表(调试用)
|
|
131
|
-
*/
|
|
132
|
-
export declare function getRegisteredAIHookKeys(): string[];
|
|
133
|
-
/**
|
|
134
|
-
* 触发 Hook 事件
|
|
135
|
-
*
|
|
136
|
-
* 扇出到 Runtime bus + `registerAIHook` handlers +(若有)host Plugin。
|
|
137
|
-
*/
|
|
138
|
-
export declare function triggerAIHook(event: AIHookEvent): Promise<void>;
|
|
139
|
-
export { runModuleAIHookHandlers };
|
|
140
|
-
/**
|
|
141
|
-
* 创建 Hook 事件(辅助函数)
|
|
142
|
-
*/
|
|
143
|
-
export declare function createAIHookEvent(type: AIHookEventType, action: string, sessionId?: string, context?: Record<string, unknown>): AIHookEvent;
|
|
144
|
-
//# sourceMappingURL=hooks.d.ts.map
|
package/lib/hooks.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAKL,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAM/B,WAAW;AACX,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,SAAS,GACT,OAAO,GACP,MAAM,CAAC;AAEX,kBAAkB;AAClB,MAAM,WAAW,WAAW;IAC1B,WAAW;IACX,IAAI,EAAE,eAAe,CAAC;IACtB,WAAW;IACX,MAAM,EAAE,MAAM,CAAC;IACf,WAAW;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY;IACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,YAAY;IACZ,SAAS,EAAE,IAAI,CAAC;IAChB,oBAAoB;IACpB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,aAAa;AACb,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED,aAAa;AACb,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE;QACP,EAA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AAChB,MAAM,MAAM,aAAa,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAMzE;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,MAAM,IAAI,CAEnF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI,CAE/E;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,EAAE,CAElD;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAErE;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAC;AAEnC;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,eAAe,EACrB,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GACpC,WAAW,CASb"}
|
package/lib/hooks.js
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AI Hooks — AI 生命周期事件钩子系统
|
|
3
|
-
*
|
|
4
|
-
* 借鉴 OpenClaw 的 Hooks 设计,提供可扩展的事件驱动钩子:
|
|
5
|
-
*
|
|
6
|
-
* - message:received — 收到消息时触发
|
|
7
|
-
* - message:sent — 发送消息时触发
|
|
8
|
-
* - session:compact — 会话压缩时触发
|
|
9
|
-
* - session:new — 新建会话时触发
|
|
10
|
-
* - agent:bootstrap — Agent 初始化时触发
|
|
11
|
-
* - agent:tool-call — 工具调用时触发
|
|
12
|
-
*
|
|
13
|
-
* 钩子按注册顺序执行,错误不会中断其他钩子。
|
|
14
|
-
*/
|
|
15
|
-
import { emitAIHookBusEvent } from './plugin-ai-hook-bus.js';
|
|
16
|
-
import { registerModuleAIHook, unregisterModuleAIHook, clearModuleAIHooks, getRegisteredModuleAIHookKeys, runModuleAIHookHandlers, } from './ai-hook-handlers.js';
|
|
17
|
-
// ============================================================================
|
|
18
|
-
// Hook 管理器(委托共享 module registry,供 Runtime + legacy 共用)
|
|
19
|
-
// ============================================================================
|
|
20
|
-
/**
|
|
21
|
-
* 注册 Hook 处理函数
|
|
22
|
-
*
|
|
23
|
-
* @param eventKey - 事件类型(如 'message')或具体动作(如 'message:received')
|
|
24
|
-
* @param handler - 处理函数
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```ts
|
|
28
|
-
* // 监听所有消息事件
|
|
29
|
-
* registerAIHook('message', async (event) => {
|
|
30
|
-
* console.log('消息事件:', event.action);
|
|
31
|
-
* });
|
|
32
|
-
*
|
|
33
|
-
* // 只监听消息接收
|
|
34
|
-
* registerAIHook('message:received', async (event) => {
|
|
35
|
-
* console.log('收到消息:', event.context.content);
|
|
36
|
-
* });
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
export function registerAIHook(eventKey, handler) {
|
|
40
|
-
return registerModuleAIHook(eventKey, handler);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* 注销 Hook 处理函数
|
|
44
|
-
*/
|
|
45
|
-
export function unregisterAIHook(eventKey, handler) {
|
|
46
|
-
unregisterModuleAIHook(eventKey, handler);
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* 清除所有 Hook(测试用)
|
|
50
|
-
*/
|
|
51
|
-
export function clearAIHooks() {
|
|
52
|
-
clearModuleAIHooks();
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* 获取已注册的事件 key 列表(调试用)
|
|
56
|
-
*/
|
|
57
|
-
export function getRegisteredAIHookKeys() {
|
|
58
|
-
return getRegisteredModuleAIHookKeys();
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* 触发 Hook 事件
|
|
62
|
-
*
|
|
63
|
-
* 扇出到 Runtime bus + `registerAIHook` handlers +(若有)host Plugin。
|
|
64
|
-
*/
|
|
65
|
-
export async function triggerAIHook(event) {
|
|
66
|
-
emitAIHookBusEvent(event, 'ai-hook');
|
|
67
|
-
}
|
|
68
|
-
export { runModuleAIHookHandlers };
|
|
69
|
-
/**
|
|
70
|
-
* 创建 Hook 事件(辅助函数)
|
|
71
|
-
*/
|
|
72
|
-
export function createAIHookEvent(type, action, sessionId, context = {}) {
|
|
73
|
-
return {
|
|
74
|
-
type,
|
|
75
|
-
action,
|
|
76
|
-
sessionId,
|
|
77
|
-
context,
|
|
78
|
-
timestamp: new Date(),
|
|
79
|
-
messages: [],
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
//# sourceMappingURL=hooks.js.map
|
package/lib/hooks.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../src/hooks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,6BAA6B,EAC7B,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAwG/B,+EAA+E;AAC/E,uDAAuD;AACvD,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,cAAc,CAAC,QAAgB,EAAE,OAAsB;IACrE,OAAO,oBAAoB,CAAC,QAAQ,EAAE,OAA0D,CAAC,CAAC;AACpG,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,QAAgB,EAAE,OAAsB;IACvE,sBAAsB,CAAC,QAAQ,EAAE,OAA0D,CAAC,CAAC;AAC/F,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;IAC1B,kBAAkB,EAAE,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB;IACrC,OAAO,6BAA6B,EAAE,CAAC;AACzC,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,KAAkB;IACpD,kBAAkB,CAAC,KAAsD,EAAE,SAAS,CAAC,CAAC;AACxF,CAAC;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAC;AAEnC;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAAqB,EACrB,MAAc,EACd,SAAkB,EAClB,UAAmC,EAAE;IAErC,OAAO;QACL,IAAI;QACJ,MAAM;QACN,SAAS;QACT,OAAO;QACP,SAAS,EAAE,IAAI,IAAI,EAAE;QACrB,QAAQ,EAAE,EAAE;KACb,CAAC;AACJ,CAAC"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Capability Ingress — Feature → Agent Resource Hub (ADR 0042)
|
|
3
|
-
*
|
|
4
|
-
* Load filters reuse platforms / scopes / permissions via `canAccessTool`
|
|
5
|
-
* (same vocabulary as Tool Selection). Cache keys use the same message
|
|
6
|
-
* projections `canAccessTool` reads — not a second authoring vocabulary.
|
|
7
|
-
*
|
|
8
|
-
* Ownership: only one on-demand set is live at a time (`live` projection);
|
|
9
|
-
* a cache miss purges previous owned entries then reloads. While a turn is
|
|
10
|
-
* still in flight (holding the previous projection), the purge is deferred
|
|
11
|
-
* until that turn releases its lease, so a concurrent turn never loses the
|
|
12
|
-
* tools it is executing with. Leases release against the projection object
|
|
13
|
-
* they acquired — not the cache key — so an A→B→A key oscillation can never
|
|
14
|
-
* decrement the wrong projection's in-flight count.
|
|
15
|
-
*
|
|
16
|
-
* Named `FeatureCapabilityIngress` to disambiguate from the Plugin Runtime
|
|
17
|
-
* `CapabilityIngress` exported by `@zhin.js/agent/runtime`.
|
|
18
|
-
*/
|
|
19
|
-
import { type Message, type ToolFeature, type SkillFeature } from '@zhin.js/core';
|
|
20
|
-
import type { PermissionHost } from '@zhin.js/permission';
|
|
21
|
-
import type { AgentResourceHub } from '../resource-hub/index.js';
|
|
22
|
-
import type { AgentFeature } from '../features/agent-feature.js';
|
|
23
|
-
import type { MCPFeature } from '../features/mcp-feature.js';
|
|
24
|
-
import type { ResolvedAgentBinding } from '../config/types.js';
|
|
25
|
-
export interface CapabilityFeatureBundle {
|
|
26
|
-
tools?: ToolFeature | null;
|
|
27
|
-
skills?: SkillFeature | null;
|
|
28
|
-
agents?: AgentFeature | null;
|
|
29
|
-
mcps?: MCPFeature | null;
|
|
30
|
-
}
|
|
31
|
-
export interface IngressTurnContext {
|
|
32
|
-
binding: ResolvedAgentBinding;
|
|
33
|
-
message: Message;
|
|
34
|
-
host?: PermissionHost | null;
|
|
35
|
-
}
|
|
36
|
-
/** Result of ensureForTurn; `release()` must be called when the turn ends. */
|
|
37
|
-
export interface IngressTurnLease {
|
|
38
|
-
readonly tools: number;
|
|
39
|
-
readonly skills: number;
|
|
40
|
-
readonly agents: number;
|
|
41
|
-
readonly mcps: number;
|
|
42
|
-
readonly cacheHit: boolean;
|
|
43
|
-
/** End the turn; a deferred purge of the previous projection may run here. */
|
|
44
|
-
release(): void;
|
|
45
|
-
}
|
|
46
|
-
export declare class FeatureCapabilityIngress {
|
|
47
|
-
#private;
|
|
48
|
-
/** Live on-demand projection; ownership is single-slot (purge on miss). */
|
|
49
|
-
private live;
|
|
50
|
-
/** Previous projections kept alive until their in-flight turns release. */
|
|
51
|
-
private retired;
|
|
52
|
-
private staleCounter;
|
|
53
|
-
private coreToolNames;
|
|
54
|
-
/** Test / hot-reload: drop cache so next ensureForTurn re-loads. */
|
|
55
|
-
invalidate(): void;
|
|
56
|
-
/**
|
|
57
|
-
* Boot / refresh: load reserved/builtin tools from ToolFeature into Agent Resource Hub.
|
|
58
|
-
* Returns count of newly tracked builtins (net adds this call).
|
|
59
|
-
*/
|
|
60
|
-
ensureCore(resourceHub: AgentResourceHub, features: CapabilityFeatureBundle): {
|
|
61
|
-
tools: number;
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Inbound: if cache miss, purge previous on-demand set then load Feature
|
|
65
|
-
* capabilities that pass canAccessTool / canAccessSkill for this message.
|
|
66
|
-
* MCP entries are limited to `binding.mcpServers` (empty → none).
|
|
67
|
-
*
|
|
68
|
-
* Concurrency: the returned lease must be released when the turn ends.
|
|
69
|
-
* While any turn is in flight, a cache miss retires the previous
|
|
70
|
-
* projection instead of purging it; the purge runs when the last turn
|
|
71
|
-
* holding that projection releases its lease.
|
|
72
|
-
*/
|
|
73
|
-
ensureForTurn(resourceHub: AgentResourceHub, features: CapabilityFeatureBundle, ctx: IngressTurnContext): Promise<IngressTurnLease>;
|
|
74
|
-
}
|
|
75
|
-
export declare function createFeatureCapabilityIngress(): FeatureCapabilityIngress;
|
|
76
|
-
//# sourceMappingURL=capability-ingress.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capability-ingress.d.ts","sourceRoot":"","sources":["../../src/ingress/capability-ingress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAGL,KAAK,OAAO,EAGZ,KAAK,WAAW,EAChB,KAAK,YAAY,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,MAAM,WAAW,uBAAuB;IACtC,KAAK,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IAC3B,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC7B,MAAM,CAAC,EAAE,YAAY,GAAG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|
-
* (same vocabulary as Tool Selection). Cache keys use the same message
|
|
6
|
-
* projections `canAccessTool` reads — not a second authoring vocabulary.
|
|
7
|
-
*
|
|
8
|
-
* Ownership: only one on-demand set is live at a time (`live` projection);
|
|
9
|
-
* a cache miss purges previous owned entries then reloads. While a turn is
|
|
10
|
-
* still in flight (holding the previous projection), the purge is deferred
|
|
11
|
-
* until that turn releases its lease, so a concurrent turn never loses the
|
|
12
|
-
* tools it is executing with. Leases release against the projection object
|
|
13
|
-
* they acquired — not the cache key — so an A→B→A key oscillation can never
|
|
14
|
-
* decrement the wrong projection's in-flight count.
|
|
15
|
-
*
|
|
16
|
-
* Named `FeatureCapabilityIngress` to disambiguate from the Plugin Runtime
|
|
17
|
-
* `CapabilityIngress` exported by `@zhin.js/agent/runtime`.
|
|
18
|
-
*/
|
|
19
|
-
import { canAccessTool, senderRolesFromMessage, } from '@zhin.js/core';
|
|
20
|
-
import { isBuiltinToolSource } from '@zhin.js/ai';
|
|
21
|
-
function toolToResourceHub(tool) {
|
|
22
|
-
return tool;
|
|
23
|
-
}
|
|
24
|
-
function skillToResourceHub(skill) {
|
|
25
|
-
return {
|
|
26
|
-
name: skill.name,
|
|
27
|
-
description: skill.description,
|
|
28
|
-
tools: (skill.tools ?? []).map(toolToResourceHub),
|
|
29
|
-
platforms: skill.platforms,
|
|
30
|
-
keywords: skill.keywords,
|
|
31
|
-
tags: skill.tags,
|
|
32
|
-
pluginName: skill.pluginName,
|
|
33
|
-
filePath: skill.filePath,
|
|
34
|
-
always: skill.always,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
/** Skill visibility via same platforms/scopes/permissions contract as Tool. */
|
|
38
|
-
async function canAccessSkill(skill, message, host) {
|
|
39
|
-
return canAccessTool({
|
|
40
|
-
name: skill.name,
|
|
41
|
-
description: skill.description,
|
|
42
|
-
parameters: { type: 'object', properties: {} },
|
|
43
|
-
execute: () => undefined,
|
|
44
|
-
platforms: skill.platforms,
|
|
45
|
-
}, message, host);
|
|
46
|
-
}
|
|
47
|
-
function toolAccessMeta(tool) {
|
|
48
|
-
return [
|
|
49
|
-
tool.name,
|
|
50
|
-
tool.source ?? '',
|
|
51
|
-
(tool.platforms ?? []).join(','),
|
|
52
|
-
(tool.scopes ?? []).join(','),
|
|
53
|
-
(tool.permissions ?? []).join(','),
|
|
54
|
-
].join(':');
|
|
55
|
-
}
|
|
56
|
-
function featureFingerprint(features) {
|
|
57
|
-
const tools = (features.tools?.getAll() ?? []).map(toolAccessMeta).sort().join('+');
|
|
58
|
-
const skills = (features.skills?.getAll() ?? [])
|
|
59
|
-
.map((s) => `${s.name}:${(s.platforms ?? []).join(',')}`)
|
|
60
|
-
.sort()
|
|
61
|
-
.join('+');
|
|
62
|
-
const agents = (features.agents?.getAll() ?? []).map((a) => a.name).sort().join('+');
|
|
63
|
-
const mcps = (features.mcps?.getAll() ?? []).map((m) => m.name).sort().join('+');
|
|
64
|
-
const agentEpoch = features.agents?.epoch ?? 0;
|
|
65
|
-
const mcpEpoch = features.mcps?.epoch ?? 0;
|
|
66
|
-
return `t:${tools}|s:${skills}|a:${agents}@${agentEpoch}|m:${mcps}@${mcpEpoch}`;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Fingerprint of message fields that `canAccessTool` consults
|
|
70
|
-
* (platforms ← $adapter, scopes ← $channel.type, permissions ← sender roles).
|
|
71
|
-
*/
|
|
72
|
-
function canAccessProjectionKey(message) {
|
|
73
|
-
const platformsProjection = String(message.$adapter ?? '');
|
|
74
|
-
const scopesProjection = String(message.$channel?.type ?? 'private');
|
|
75
|
-
const permissionsProjection = [...senderRolesFromMessage(message)].map(String).sort().join(',');
|
|
76
|
-
return `p=${platformsProjection}|s=${scopesProjection}|perm=${permissionsProjection}`;
|
|
77
|
-
}
|
|
78
|
-
function buildTurnCacheKey(ctx, fingerprint) {
|
|
79
|
-
const mcpAllow = [...(ctx.binding.mcpServers ?? [])].map(String).sort().join(',');
|
|
80
|
-
return `${ctx.binding.name}|mcp=${mcpAllow}|${canAccessProjectionKey(ctx.message)}|${fingerprint}`;
|
|
81
|
-
}
|
|
82
|
-
function emptyOwned() {
|
|
83
|
-
return {
|
|
84
|
-
tools: new Set(),
|
|
85
|
-
skills: new Set(),
|
|
86
|
-
agents: new Set(),
|
|
87
|
-
mcps: new Set(),
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
function purgeOwned(resourceHub, owned, retained = emptyOwned()) {
|
|
91
|
-
for (const name of owned.tools) {
|
|
92
|
-
if (!retained.tools.has(name))
|
|
93
|
-
resourceHub.removeTool(name);
|
|
94
|
-
}
|
|
95
|
-
for (const name of owned.skills) {
|
|
96
|
-
if (!retained.skills.has(name))
|
|
97
|
-
resourceHub.removeSkill(name);
|
|
98
|
-
}
|
|
99
|
-
for (const name of owned.agents) {
|
|
100
|
-
if (retained.agents.has(name))
|
|
101
|
-
continue;
|
|
102
|
-
// removePreset also drops the SubAgentDef resource
|
|
103
|
-
resourceHub.subagents.removePreset(name);
|
|
104
|
-
}
|
|
105
|
-
for (const name of owned.mcps) {
|
|
106
|
-
if (!retained.mcps.has(name))
|
|
107
|
-
resourceHub.removeMcp(name);
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
function mergeOwned(target, source) {
|
|
111
|
-
for (const name of source.tools)
|
|
112
|
-
target.tools.add(name);
|
|
113
|
-
for (const name of source.skills)
|
|
114
|
-
target.skills.add(name);
|
|
115
|
-
for (const name of source.agents)
|
|
116
|
-
target.agents.add(name);
|
|
117
|
-
for (const name of source.mcps)
|
|
118
|
-
target.mcps.add(name);
|
|
119
|
-
}
|
|
120
|
-
export class FeatureCapabilityIngress {
|
|
121
|
-
/** Live on-demand projection; ownership is single-slot (purge on miss). */
|
|
122
|
-
live = null;
|
|
123
|
-
/** Previous projections kept alive until their in-flight turns release. */
|
|
124
|
-
retired = new Set();
|
|
125
|
-
staleCounter = 0;
|
|
126
|
-
coreToolNames = new Set();
|
|
127
|
-
/** Test / hot-reload: drop cache so next ensureForTurn re-loads. */
|
|
128
|
-
invalidate() {
|
|
129
|
-
// Sentinel key: the next ensureForTurn misses and retires/purges the
|
|
130
|
-
// live projection through the normal path (in-flight leases stay valid
|
|
131
|
-
// because they release against the projection object, not the key).
|
|
132
|
-
if (this.live)
|
|
133
|
-
this.live.key = `stale-${this.staleCounter++}`;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Boot / refresh: load reserved/builtin tools from ToolFeature into Agent Resource Hub.
|
|
137
|
-
* Returns count of newly tracked builtins (net adds this call).
|
|
138
|
-
*/
|
|
139
|
-
ensureCore(resourceHub, features) {
|
|
140
|
-
let added = 0;
|
|
141
|
-
const seen = new Set();
|
|
142
|
-
for (const tool of features.tools?.getAll() ?? []) {
|
|
143
|
-
if (!isBuiltinToolSource(tool.source))
|
|
144
|
-
continue;
|
|
145
|
-
seen.add(tool.name);
|
|
146
|
-
const isNew = !this.coreToolNames.has(tool.name);
|
|
147
|
-
resourceHub.addTool(toolToResourceHub(tool), undefined, tool.source ?? 'builtin');
|
|
148
|
-
this.coreToolNames.add(tool.name);
|
|
149
|
-
if (isNew)
|
|
150
|
-
added++;
|
|
151
|
-
}
|
|
152
|
-
for (const name of [...this.coreToolNames]) {
|
|
153
|
-
if (seen.has(name))
|
|
154
|
-
continue;
|
|
155
|
-
resourceHub.removeTool(name);
|
|
156
|
-
this.coreToolNames.delete(name);
|
|
157
|
-
}
|
|
158
|
-
return { tools: added };
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Inbound: if cache miss, purge previous on-demand set then load Feature
|
|
162
|
-
* capabilities that pass canAccessTool / canAccessSkill for this message.
|
|
163
|
-
* MCP entries are limited to `binding.mcpServers` (empty → none).
|
|
164
|
-
*
|
|
165
|
-
* Concurrency: the returned lease must be released when the turn ends.
|
|
166
|
-
* While any turn is in flight, a cache miss retires the previous
|
|
167
|
-
* projection instead of purging it; the purge runs when the last turn
|
|
168
|
-
* holding that projection releases its lease.
|
|
169
|
-
*/
|
|
170
|
-
async ensureForTurn(resourceHub, features, ctx) {
|
|
171
|
-
const fp = featureFingerprint(features);
|
|
172
|
-
const key = buildTurnCacheKey(ctx, fp);
|
|
173
|
-
if (this.live && this.live.key === key) {
|
|
174
|
-
const projection = this.live;
|
|
175
|
-
projection.inFlight++;
|
|
176
|
-
return {
|
|
177
|
-
tools: 0,
|
|
178
|
-
skills: 0,
|
|
179
|
-
agents: 0,
|
|
180
|
-
mcps: 0,
|
|
181
|
-
cacheHit: true,
|
|
182
|
-
release: () => this.#releaseTurn(resourceHub, projection),
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
// Cache miss: a turn still executing against the live projection keeps
|
|
186
|
-
// its entries; retire the projection and purge once it drains.
|
|
187
|
-
if (this.live) {
|
|
188
|
-
if (this.live.inFlight > 0) {
|
|
189
|
-
this.live.retired = true;
|
|
190
|
-
this.retired.add(this.live);
|
|
191
|
-
}
|
|
192
|
-
else {
|
|
193
|
-
purgeOwned(resourceHub, this.live.owned);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
const projection = { key, owned: emptyOwned(), inFlight: 1, retired: false };
|
|
197
|
-
this.live = projection;
|
|
198
|
-
let tools = 0;
|
|
199
|
-
let skills = 0;
|
|
200
|
-
let agents = 0;
|
|
201
|
-
let mcps = 0;
|
|
202
|
-
const allowedMcp = new Set((ctx.binding.mcpServers ?? []).map((s) => String(s).trim()).filter(Boolean));
|
|
203
|
-
for (const tool of features.tools?.getAll() ?? []) {
|
|
204
|
-
if (isBuiltinToolSource(tool.source))
|
|
205
|
-
continue;
|
|
206
|
-
if (!(await canAccessTool(tool, ctx.message, ctx.host)))
|
|
207
|
-
continue;
|
|
208
|
-
resourceHub.addTool(toolToResourceHub(tool), undefined, tool.source ?? 'feature');
|
|
209
|
-
projection.owned.tools.add(tool.name);
|
|
210
|
-
tools++;
|
|
211
|
-
}
|
|
212
|
-
for (const skill of features.skills?.getAll() ?? []) {
|
|
213
|
-
if (!(await canAccessSkill(skill, ctx.message, ctx.host)))
|
|
214
|
-
continue;
|
|
215
|
-
const resourceHubSkill = skillToResourceHub(skill);
|
|
216
|
-
const toolAccessResults = await Promise.all(resourceHubSkill.tools.map(async (t) => ({
|
|
217
|
-
tool: t,
|
|
218
|
-
allowed: await canAccessTool(t, ctx.message, ctx.host),
|
|
219
|
-
})));
|
|
220
|
-
resourceHubSkill.tools = toolAccessResults.filter((r) => r.allowed).map((r) => r.tool);
|
|
221
|
-
resourceHub.addSkill(resourceHubSkill, undefined, skill.pluginName);
|
|
222
|
-
projection.owned.skills.add(skill.name);
|
|
223
|
-
skills++;
|
|
224
|
-
}
|
|
225
|
-
for (const preset of features.agents?.getAll() ?? []) {
|
|
226
|
-
resourceHub.addAgentPreset(preset, undefined, preset.pluginName ?? 'feature');
|
|
227
|
-
projection.owned.agents.add(preset.name);
|
|
228
|
-
agents++;
|
|
229
|
-
}
|
|
230
|
-
for (const entry of features.mcps?.getAll() ?? []) {
|
|
231
|
-
if (!allowedMcp.has(entry.name))
|
|
232
|
-
continue;
|
|
233
|
-
const { pluginName: _p, ...mcp } = entry;
|
|
234
|
-
resourceHub.addMcp(mcp, undefined, entry.pluginName ?? 'feature');
|
|
235
|
-
projection.owned.mcps.add(entry.name);
|
|
236
|
-
mcps++;
|
|
237
|
-
}
|
|
238
|
-
return {
|
|
239
|
-
tools,
|
|
240
|
-
skills,
|
|
241
|
-
agents,
|
|
242
|
-
mcps,
|
|
243
|
-
cacheHit: false,
|
|
244
|
-
release: () => this.#releaseTurn(resourceHub, projection),
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
#releaseTurn(resourceHub, projection) {
|
|
248
|
-
if (!projection.retired) {
|
|
249
|
-
// Live projection: keep the cache even when no turn is in flight.
|
|
250
|
-
projection.inFlight = Math.max(0, projection.inFlight - 1);
|
|
251
|
-
return;
|
|
252
|
-
}
|
|
253
|
-
if (!this.retired.has(projection))
|
|
254
|
-
return; // already purged (double release)
|
|
255
|
-
projection.inFlight--;
|
|
256
|
-
if (projection.inFlight > 0)
|
|
257
|
-
return;
|
|
258
|
-
this.retired.delete(projection);
|
|
259
|
-
// Skip names the live projection (or another still-active retired
|
|
260
|
-
// projection) re-registered under the same name.
|
|
261
|
-
const retained = emptyOwned();
|
|
262
|
-
if (this.live)
|
|
263
|
-
mergeOwned(retained, this.live.owned);
|
|
264
|
-
for (const other of this.retired) {
|
|
265
|
-
if (other.inFlight > 0)
|
|
266
|
-
mergeOwned(retained, other.owned);
|
|
267
|
-
}
|
|
268
|
-
purgeOwned(resourceHub, projection.owned, retained);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
export function createFeatureCapabilityIngress() {
|
|
272
|
-
return new FeatureCapabilityIngress();
|
|
273
|
-
}
|
|
274
|
-
//# sourceMappingURL=capability-ingress.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capability-ingress.js","sourceRoot":"","sources":["../../src/ingress/capability-ingress.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,aAAa,EACb,sBAAsB,GAMvB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AA2BlD,SAAS,iBAAiB,CAAC,IAAc;IACvC,OAAO,IAAuB,CAAC;AACjC,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAgB;IAC1C,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,KAAK,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,iBAAiB,CAAC;QACjD,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ;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ingress/index.js
DELETED
package/lib/ingress/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ingress/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,8BAA8B,GAI/B,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 内省指令位置参数解析:/cmd [filter] [page]
|
|
3
|
-
*/
|
|
4
|
-
import { type Message } from '@zhin.js/core';
|
|
5
|
-
export interface IntrospectionArgs {
|
|
6
|
-
filter?: string;
|
|
7
|
-
page: number;
|
|
8
|
-
}
|
|
9
|
-
export declare const INTROSPECTION_PAGE_SIZES: {
|
|
10
|
-
readonly cmd: 25;
|
|
11
|
-
readonly tools: 15;
|
|
12
|
-
readonly endpoints: 30;
|
|
13
|
-
readonly bindings: 30;
|
|
14
|
-
readonly mcp: 30;
|
|
15
|
-
};
|
|
16
|
-
export type IntrospectionCommandKind = keyof typeof INTROSPECTION_PAGE_SIZES;
|
|
17
|
-
export declare function messagePlainText(message: Pick<Message, '$content' | '$raw'>): string;
|
|
18
|
-
export declare function parseIntrospectionArgs(raw: string, commandPrefix: string): IntrospectionArgs;
|
|
19
|
-
export declare function parseIntrospectionArgsFromMessage(message: Pick<Message, '$content' | '$raw'>, commandPrefix: string): IntrospectionArgs;
|
|
20
|
-
export declare function parseIntrospectionQuery(query: Record<string, string | undefined>): IntrospectionArgs & {
|
|
21
|
-
pageSize?: number;
|
|
22
|
-
};
|
|
23
|
-
/** 内省命令多 pattern 注册(较长 pattern 优先) */
|
|
24
|
-
export declare function introspectionCommandPatterns(base: string): string[];
|
|
25
|
-
export declare function resolvePublicApiOrigin(config: {
|
|
26
|
-
http?: {
|
|
27
|
-
host?: string;
|
|
28
|
-
port?: number;
|
|
29
|
-
base?: string;
|
|
30
|
-
};
|
|
31
|
-
} | undefined): {
|
|
32
|
-
origin: string;
|
|
33
|
-
apiBase: string;
|
|
34
|
-
};
|
|
35
|
-
export declare const REMOTE_CONSOLE_ORIGIN = "https://console.zhin.dev";
|
|
36
|
-
export declare function buildConsoleDeepLink(origin: string): string;
|
|
37
|
-
//# sourceMappingURL=introspection-args.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"introspection-args.d.ts","sourceRoot":"","sources":["../../src/init/introspection-args.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAW,KAAK,OAAO,EAAE,MAAM,eAAe,CAAC;AACtD,MAAM,WAAW,iBAAiB;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,wBAAwB;;;;;;CAM3B,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,MAAM,OAAO,wBAAwB,CAAC;AAE7E,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAAC,GAAG,MAAM,CAKpF;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,iBAAiB,CAiB5F;AAED,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAAC,EAC3C,aAAa,EAAE,MAAM,GACpB,iBAAiB,CAEnB;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,iBAAiB,GAAG;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,CAS5H;AAED,sCAAsC;AACtC,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAOnE;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE;IAAE,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAA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