@zhin.js/agent 1.1.23 → 1.1.27
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 +46 -24
- 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.js +1 -1
- 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/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 -75
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +29 -59
- 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/journal/file-journal-store.d.ts.map +1 -1
- package/lib/journal/file-journal-store.js +10 -6
- package/lib/journal/file-journal-store.js.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 +60 -16
- 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 +16 -0
- package/lib/plugin-runtime/deferred-capability-plan.d.ts.map +1 -1
- package/lib/plugin-runtime/deferred-capability-plan.js +88 -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 +21 -12
- 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 +28 -1
- package/lib/plugin-runtime/index.d.ts.map +1 -1
- package/lib/plugin-runtime/index.js +25 -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-production-composition.d.ts +1 -1
- package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts +1 -1
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts.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 +10 -110
- 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-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 +1 -1
- package/lib/plugin-runtime/workroom-data-governance-runtime.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-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 +1 -1
- package/lib/plugin-runtime/workroom-local-agent-loop.d.ts.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.js +1 -1
- 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-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-kernel-authority.d.ts +1 -1
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts.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-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 +3 -3
- package/lib/plugin-runtime/workroom-projection-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-projection-runtime.js +1 -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 +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts.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/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 +3 -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 +1 -9
- package/lib/seam/seam-integration.d.ts.map +1 -1
- package/lib/seam/seam-integration.js +0 -18
- package/lib/seam/seam-integration.js.map +1 -1
- package/lib/seam/skill-service.d.ts +0 -15
- package/lib/seam/skill-service.d.ts.map +1 -1
- package/lib/seam/tokens.d.ts +0 -3
- package/lib/seam/tokens.d.ts.map +1 -1
- package/lib/seam/tokens.js +0 -2
- package/lib/seam/tokens.js.map +1 -1
- package/lib/seam/tool-service.d.ts +3 -3
- 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-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.d.ts +1 -1
- package/lib/user-profile.js +2 -2
- 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 +2 -2
- package/lib/workroom/assignment-authority-grant-repository.d.ts.map +1 -1
- package/lib/workroom/assignment-authority-grant-repository.js +1 -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.d.ts +1 -1
- package/lib/workroom/catalog.js +2 -2
- 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 +4 -0
- package/lib/workroom/durable-file-store.d.ts.map +1 -1
- package/lib/workroom/durable-file-store.js +8 -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/file-profile-journal.d.ts +1 -0
- package/lib/workroom/file-profile-journal.d.ts.map +1 -1
- package/lib/workroom/file-profile-journal.js +3 -0
- package/lib/workroom/file-profile-journal.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-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} +18 -96
- 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 +243 -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/journal-model.d.ts +1 -1
- package/lib/workroom/journal-model.js +1 -1
- package/lib/workroom/journal-model.js.map +1 -1
- 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-outbox.d.ts +1 -0
- package/lib/workroom/remote-dispatch-outbox.d.ts.map +1 -1
- package/lib/workroom/remote-dispatch-outbox.js +3 -0
- package/lib/workroom/remote-dispatch-outbox.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 +1 -1
- package/lib/workroom/workroom-kernel.d.ts.map +1 -1
- package/lib/workroom/workroom-kernel.js +31 -13
- 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/tool-registry-as-service.d.ts +0 -17
- package/lib/tool/tool-registry-as-service.d.ts.map +0 -1
- package/lib/tool/tool-registry-as-service.js +0 -54
- package/lib/tool/tool-registry-as-service.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 -2038
- 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 -1326
- 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/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @zhin.js/agent
|
|
2
2
|
|
|
3
|
-
Zhin AI Agent
|
|
3
|
+
Zhin AI Agent 组合层:根入口提供 Agent 创作与领域 API;`@zhin.js/agent/runtime` 提供 CLI composition root 使用的 Host 装配和 generation-owned 执行机制。
|
|
4
4
|
|
|
5
5
|
领域词汇见 [CONTEXT.md](./CONTEXT.md)。用户向文档:[AI 模块](https://zhin.js.org/advanced/ai)、[消息如何流转](../../docs/essentials/message-flow.md)。
|
|
6
6
|
|
|
@@ -39,7 +39,12 @@ Tool/MCP 执行 handle 只在 turn lease 内有效,防止访问已 retire 的
|
|
|
39
39
|
Turn engine 也只从该 lease 的 snapshot 解析;缺失时 fail-closed,不回退到进程全局
|
|
40
40
|
runner 或其他 generation。这是迁移完成后的唯一权威契约,不能用缩减执行器替代。
|
|
41
41
|
|
|
42
|
-
`
|
|
42
|
+
`ZhinAgent` 的 Host 装配函数 `composeZhinAgentRuntime` 属于 runtime 内部面,统一从
|
|
43
|
+
`@zhin.js/agent/runtime` 导入;它返回显式的 `host` 契约,composition root 不再通过
|
|
44
|
+
`asPrivate` 取得内部状态。根入口也不再导出 classic `ToolRuntime`、builtin policy resolver、
|
|
45
|
+
数据库激活或运行时内省函数,避免插件作者依赖生产 `TurnToolRuntime` 之外的第二套执行权威。
|
|
46
|
+
|
|
47
|
+
`ask_user` 也是 generation-owned Tool capability:工具只拿当前 Turn 的 `QuestionPort`,
|
|
43
48
|
Root-owned `InteractionRouter` 用 canonical session + authenticated subject 匹配后续回复。
|
|
44
49
|
IM adapter 在 middleware/command/Agent fallback 前 claim 回复;Router 不保存 `Message`、
|
|
45
50
|
Adapter 或过期回复句柄。HTTP/A2A 等入口若要支持交互,必须显式提供自己的 QuestionPort;
|
|
@@ -92,7 +97,7 @@ turn 会跨代执行。
|
|
|
92
97
|
- 🤖 **agentLoop 统一路径**:ZhinAgent、Subagent、Deferred Worker、AIService 均经 `agentLoop`(legacy `Agent.run` 仅保留在 `@zhin.js/ai` 供单测)
|
|
93
98
|
- 📝 **会话持久化**:`AgentSessionStore` + `ContextRepository`;IM 事实由 `ConversationEventStore` 独占
|
|
94
99
|
- 🧠 **ZhinAgent**:与 Zhin 消息流集成的智能体(SOUL/TOOLS/AGENTS、工具收集、执行策略)
|
|
95
|
-
- 🔍 **模型自动发现**:`ModelRegistry` 调用 `listModels()`;结果写入 `provider.models` 并供 `
|
|
100
|
+
- 🔍 **模型自动发现**:`ModelRegistry` 调用 `listModels()`;结果写入 `provider.models` 并供 owner-scoped `LlmApiRuntime` 校验
|
|
96
101
|
- 🔄 **模型自动降级**:首选模型失败时按 `resolveModelCandidates` 候选链 fallback(文本 / 多模态 / standalone 均走 agentLoop)
|
|
97
102
|
- 🛡️ **6 层 Bash 安全**:`ExecPolicy` 纵深防御(危险黑名单、环境变量剥离、wrapper 剥离、复合命令拆分、只读放行、交互式审批)
|
|
98
103
|
- 📂 **文件访问安全**:`FilePolicy` 路径检查、设备路径拦截、命令读写分类
|
|
@@ -104,7 +109,7 @@ turn 会跨代执行。
|
|
|
104
109
|
- 🔧 **内置工具**:bash、read_file、write_file、ask_user、web_search、`inspect_conversation_reference` 等
|
|
105
110
|
- 📐 **Compaction(ADR 0010)**:生产 `agentLoop` 接线 L1 micro + L2 LLM;IM `/compact`;yaml `ai.agent.compaction`
|
|
106
111
|
- 🌳 **会话树**:`parent_id` + `active_leaf`;IM `/tree`、`/reset`;branch summarization;Console `GET/POST /api/agent/sessions/...`
|
|
107
|
-
- 🪝 **Hook
|
|
112
|
+
- 🪝 **Hook 系统**:generation-owned `AgentResourceHub.hooks` 与 canonical stream events
|
|
108
113
|
|
|
109
114
|
## 依赖关系
|
|
110
115
|
|
|
@@ -129,21 +134,41 @@ packages/im/agent/src/
|
|
|
129
134
|
session/ Session System — Agent session/history;IM conversation context 由 ConversationEventStore 游标提供
|
|
130
135
|
event/ Event System — Agent turn 域事件(不替代 Kernel RunEvent)
|
|
131
136
|
skill/ Skill System — SkillRegistry 统一出口
|
|
132
|
-
memory/ Memory System — Port → ContextRepository + compaction
|
|
137
|
+
memory/ Memory System — Port → ContextRepository + host-owned compaction runtime
|
|
133
138
|
subagent/ Subagent System — SubagentSystem + ImResultSink
|
|
134
139
|
context/ Context System — builder/injector 链、tail limit
|
|
135
140
|
prompt/ 系统提示词、assembly、workspace 模板
|
|
136
141
|
turn/ Turn pipeline、inbound 队列、auto-continue、metrics
|
|
137
142
|
config/ ZhinAgent 配置 SSOT、model harness
|
|
138
|
-
resource-hub/
|
|
143
|
+
resource-hub/ Skill / SubAgent / MCP / Hook support resources
|
|
139
144
|
workroom/ Workroom Kernel — versioned Journal + pure replay/decision
|
|
140
145
|
zhin-agent/ ZhinAgent 门面类(单文件 index.ts)
|
|
141
146
|
init/ Plugin Runtime 组合、数据库激活与 ZhinAgent dispose 生命周期
|
|
142
147
|
```
|
|
143
148
|
|
|
149
|
+
Workroom Journal 以 `workroom/journal/index.ts` 作为唯一领域入口。入口只公开 Journal
|
|
150
|
+
端口、错误、适配器和稳定的摘要函数;内部依赖保持单向:事件校验与受治理载荷引用位于
|
|
151
|
+
底层,存储事件编解码和控制投影建立在其上,载荷发布/回放复用控制投影,Memory、File、
|
|
152
|
+
Database 适配器只组合这些机制。新增存储实现应实现 `WorkroomJournal`,不应把数据库、
|
|
153
|
+
文件系统或载荷治理逻辑重新放进领域入口。
|
|
154
|
+
|
|
155
|
+
Workroom Projection Outbox 同样以 `workroom/projection-outbox/index.ts` 为唯一领域入口。
|
|
156
|
+
Binding 和持久 Item 必须显式携带 `audience` 与绑定代际 `cursorId`;运行时不会猜测旧
|
|
157
|
+
快照的默认 audience,也不会把旧 Run cursor 在线迁移到新绑定。Repository 只负责 CAS
|
|
158
|
+
状态,Tracer 只把权威事实投影为草稿,Governance 物化可披露内容,Delivery Worker
|
|
159
|
+
负责租约和外部投递,四者通过窄端口协作。
|
|
160
|
+
|
|
144
161
|
普通 `spawn_task` 只执行当前聊天的非 Workroom 子任务,不创建或修改 Run/Task facts。Workroom command adapter 必须持有认证后的 Project capability;标准 Host 已装配 generation-owned Scheduler、Executor、Reviewer authority/view 与 Sponsor typed control,但不会发布模型可写的通用 transition 工具。验收不再是 `WorkroomCommand`:Task 必须先由 generation-owned `workroomAcceptancePolicyDecisionToken` 固定 immutable Contract/Policy snapshot,未 pin 不得 claim;`WorkroomKernel.evaluateTaskAcceptance()` 随后只调用同一可信端口,并用 Journal CAS 写入结构化 Acceptance Record。生产 baseline 只允许 low-risk、全机械检查且证据与 claims 完整的候选自动通过;medium/judgment 与 high/critical 路由分别持久化 Reviewer Assignment / Sponsor Gate,固定 candidate hash、Contract/Policy、owner、deadline 与恢复动作。Reviewer verdict 只能由独立 claimed Reviewer Assignment 的认证提交产生;Sponsor decision 只能经 Catalog/Profile 绑定的认证 typed control 进入,普通 discussion 不能改变状态。缺少受治理 Acceptance Projection source、可信 Risk Header、typed Check、Artifact/Effect facts 或 Context provider 时会形成可恢复的持久 blocker,而不是降级验收。
|
|
145
162
|
|
|
146
|
-
`AgentResourceHub` 是
|
|
163
|
+
`AgentResourceHub` 是 generation-owned 的 Agent 支持资源入口,管理 Skill、SubAgent、MCP 与 Hook,不拥有 Tool 或 Workroom Run/Task/Assignment 状态。Tool 只通过 `tools/<name>/index.ts` 或 `context.addTool()` 进入候选 generation,由唯一 `ToolIndex` 发布;持久编排只能通过 Workroom Kernel 与专用 typed ports。
|
|
164
|
+
|
|
165
|
+
Agent 生命周期事件由本包的 `AIEventPayload` / `AIEventName` 定义。Runtime 消费方通过
|
|
166
|
+
`subscribeAIEventsOnTarget` 订阅显式 event target;事件契约不再挂在经典 `Plugin` namespace,
|
|
167
|
+
也不再写入经典 `Plugin.dispatch()` 链或依赖 Plugin AsyncLocalStorage 恢复隐式上下文。
|
|
168
|
+
组合根为每个 generation 创建 `AgentEventBus`,以 `agentEventBusToken` 发布给同代服务并在
|
|
169
|
+
retire 时清理;旧代在途事件不会进入候选代。`ZhinAgent`、ToolRuntime 与事件系统都不持有
|
|
170
|
+
经典 `Plugin` 对象。请求者角色来自 IM 入站阶段写入的消息身份,Skill 来自 generation
|
|
171
|
+
capability projection 与标准工作区目录,不再遍历可变 Plugin 树。
|
|
147
172
|
|
|
148
173
|
Root Host 若要接入远程 Tool / Skill Provider,可在 generation Scope 提供
|
|
149
174
|
`capabilitySeamToken`。`CapabilityIngress` 会把 `SeamIntegration` 投影进同一份 immutable
|
|
@@ -186,7 +211,6 @@ pnpm add @ai-sdk/openai # 示例:按厂商安装 provider SDK
|
|
|
186
211
|
import {
|
|
187
212
|
ZhinAgent,
|
|
188
213
|
AIService,
|
|
189
|
-
registerAIHook,
|
|
190
214
|
} from 'zhin.js/agent'
|
|
191
215
|
|
|
192
216
|
// 使用 ctx.ai (AIService)
|
|
@@ -221,17 +245,17 @@ useContext('ai', async (ai) => {
|
|
|
221
245
|
| Agent | `ServiceAgent`、`CreateServiceAgentOptions`(`AIService.createAgent`);legacy `Agent` / `createAgent` re-export 自 `@zhin.js/ai` |
|
|
222
246
|
| Model harness | `MODEL_HARNESS_DEFAULTS`, `resolveModelHarness`, `mergeModelHarnessValues` |
|
|
223
247
|
| 服务与会话 | `AIService`;会话/context 类型见 `@zhin.js/ai`(`ContextRepository`、`AgentSessionStore`) |
|
|
224
|
-
| ZhinAgent | `ZhinAgent`,以及 config / exec-policy / file-policy / `@zhin.js/agent/tool` / prompt
|
|
225
|
-
| 安全策略 | `checkExecPolicy`, `applyExecPolicyToTools`, `isDangerousCommand`, `stripEnvVarPrefix`, `stripSafeWrappers`, `splitCompoundCommand`, `extractCommandName`, `ExecPolicyResult`, `checkFileAccess`, `classifyBashCommand`, `isBlockedDevicePath` |
|
|
248
|
+
| ZhinAgent | `ZhinAgent`,以及 config / exec-policy / file-policy / `@zhin.js/agent/tool` / prompt 等 |
|
|
249
|
+
| 安全策略 | `OwnerApprovalRuntime`;`checkExecPolicy`, `applyExecPolicyToTools`, `isDangerousCommand`, `stripEnvVarPrefix`, `stripSafeWrappers`, `splitCompoundCommand`, `extractCommandName`, `ExecPolicyResult`, `checkFileAccess`, `classifyBashCommand`, `isBlockedDevicePath` |
|
|
226
250
|
| 提示词构建 | `buildRichSystemPrompt`, `buildEnhancedPersona`, `buildUserMessageWithHistory`, `buildContextHint` |
|
|
227
251
|
| 上下文与记忆 | `ContextRepository`, `AgentSessionStore`(`@zhin.js/ai`);`ConversationEventStore`(`@zhin.js/im-contract`) |
|
|
228
252
|
| 跟进与定时 | `FollowUpManager`, `PersistentCronEngine`, `createCronTools`, `setCronManager`, `getCronManager` |
|
|
229
|
-
| 压缩与 Bootstrap | `compactSession
|
|
230
|
-
| Hook | `
|
|
231
|
-
|
|
|
253
|
+
| 压缩与 Bootstrap | `compactSession`;`@zhin.js/agent/memory` 导出实例级 `AgentCompactionRuntime`;`estimateTokens`, `loadBootstrapFiles`, `loadSoulPersona`, `loadToolsGuide`, `loadAgentsMemory` |
|
|
254
|
+
| Hook | `AgentResourceHub`、`HookRegistry`、`aiHookRuntimeBus` |
|
|
255
|
+
| 内置工具 | generation-owned definitions 见 `src/plugin-runtime/native-*-tools.ts`;回合统一经 `ToolIndex` / `TurnToolRuntime` 执行 |
|
|
232
256
|
| 输出与检测 | `parseOutput`, `renderToPlainText`, `renderToSatori`, `detectTone` |
|
|
233
257
|
| 子代理 | `SubagentSystem` |
|
|
234
|
-
|
|
|
258
|
+
| 支持资源 | `AgentResourceHub`、`SkillRegistry`、`SubAgentRegistry`、`McpRegistry`、`HookRegistry` |
|
|
235
259
|
| MCP 客户端 | `McpClientManager`、`McpClientConnection`、`mcpToolToAgentTool`、`ensureMcpConnections`(见下方「MCP」) |
|
|
236
260
|
| 限流 | `RateLimiter` |
|
|
237
261
|
| 存储抽象 | `StorageBackend`, `MemoryStorageBackend`, `DatabaseStorageBackend`, `createSwappableBackend` |
|
|
@@ -247,7 +271,7 @@ declare module '@zhin.js/core' {
|
|
|
247
271
|
namespace Plugin {
|
|
248
272
|
interface Contexts {
|
|
249
273
|
ai: AIService // 会话、Provider、ZhinAgent、runAgent 等
|
|
250
|
-
agent: AgentResourceHub //
|
|
274
|
+
agent: AgentResourceHub // 技能/子代理/MCP 条目/Hook 注册表
|
|
251
275
|
}
|
|
252
276
|
}
|
|
253
277
|
}
|
|
@@ -256,7 +280,7 @@ declare module '@zhin.js/core' {
|
|
|
256
280
|
| Context | 用途 |
|
|
257
281
|
|---------|------|
|
|
258
282
|
| `ctx.ai` | 业务侧 AI 服务:会话、`createAgent`(→ `ServiceAgent`)/ `runAgent`、全局 ZhinAgent |
|
|
259
|
-
| `ctx.agent` | `AgentResourceHub`
|
|
283
|
+
| `ctx.agent` | `AgentResourceHub` 支持资源注册:`addSkill(...)`、`addSubAgent(...)`、`addMcp(...)`、`addHook(...)`;Tool 使用 `context.addTool()`,不承担 Workroom 状态编排 |
|
|
260
284
|
|
|
261
285
|
主包 `zhin.js` 的 `Plugin.Contexts` 类型已包含上述两项。
|
|
262
286
|
|
|
@@ -321,7 +345,6 @@ useContext('ai', async (ai) => {
|
|
|
321
345
|
provider: 'openai',
|
|
322
346
|
model: 'gpt-4o',
|
|
323
347
|
systemPrompt: '你只负责代码审查与建议,不闲聊。',
|
|
324
|
-
useBuiltinTools: true,
|
|
325
348
|
})
|
|
326
349
|
const codeResult = await codeAgent.run('审查这段 TypeScript 的类型安全')
|
|
327
350
|
|
|
@@ -329,13 +352,14 @@ useContext('ai', async (ai) => {
|
|
|
329
352
|
provider: 'ollama',
|
|
330
353
|
model: 'qwen2.5',
|
|
331
354
|
systemPrompt: '只做中英互译,不解释。',
|
|
332
|
-
|
|
333
|
-
collectExternalTools: false,
|
|
355
|
+
includeRegisteredTools: false,
|
|
334
356
|
})
|
|
335
357
|
const translated = await translateAgent.run('Hello world')
|
|
336
358
|
})
|
|
337
359
|
```
|
|
338
360
|
|
|
361
|
+
Standalone Agent 不隐式继承主 Agent 的 native Tool。能力必须通过 `tools` 显式传入,或先用
|
|
362
|
+
`ai.registerTool()` 注册;`includeRegisteredTools: false` 可为单次 Agent 建立空白能力边界。
|
|
339
363
|
适合:按场景/按接口使用不同「角色」的 Agent(代码、翻译、总结等),彼此独立。
|
|
340
364
|
|
|
341
365
|
### 3. 一次调用、单次任务(不持有 Agent 实例)
|
|
@@ -367,7 +391,7 @@ useContext('ai', async (ai) => {
|
|
|
367
391
|
`AIService` 构造时:
|
|
368
392
|
|
|
369
393
|
1. 按 `ai.providers.<别名>` 实例化 Provider(须配置 `sdk`,如 `openai` 或 `openai-compatible`)。
|
|
370
|
-
2. `
|
|
394
|
+
2. `AIService` 创建独立的 `LlmApiRuntime`:**未写 `models` 的 provider** 先使用空白名单,由后台 `ModelRegistry.discover()` 填充 `provider.models`;**写了 `models`** 则用 yaml 白名单。
|
|
371
395
|
3. `createZhinAgent` 启动时 `loadCache()` 先恢复上次发现结果,再异步刷新 `/v1/models`。
|
|
372
396
|
|
|
373
397
|
`agents.<name>.model`(如 `mimo-v2.5-pro`)须在发现列表中,或在中转 API 的 `/v1/models` 响应里出现;无需为每个模型手写 yaml,除非要锁定白名单。
|
|
@@ -394,7 +418,7 @@ ai:
|
|
|
394
418
|
`AIService` 构造时:
|
|
395
419
|
|
|
396
420
|
1. 按 `ai.providers.<别名>` 实例化 Provider(须配置 `sdk`,如 `openai` 或 `openai-compatible`)。
|
|
397
|
-
2. `
|
|
421
|
+
2. `AIService` 创建独立的 `LlmApiRuntime`:**未写 `models` 的 provider** 先使用空白名单,由后台 `ModelRegistry.discover()` 填充 `provider.models`;**写了 `models`** 则用 yaml 白名单。
|
|
398
422
|
3. `createZhinAgent` 启动时 `loadCache()` 先恢复上次发现结果,再异步刷新 `/v1/models`。
|
|
399
423
|
|
|
400
424
|
`agents.<name>.model`(如 `mimo-v2.5-pro`)须在发现列表中,或在中转 API 的 `/v1/models` 响应里出现;无需为每个模型手写 yaml,除非要锁定白名单。
|
|
@@ -480,7 +504,6 @@ src/
|
|
|
480
504
|
│ ├── index.ts # AgentResourceHub class
|
|
481
505
|
│ ├── types.ts # ResourceScope, Skill, SubAgentDef, AIHook…
|
|
482
506
|
│ ├── resource-registry.ts
|
|
483
|
-
│ ├── tool-registry.ts
|
|
484
507
|
│ ├── skill-registry.ts
|
|
485
508
|
│ ├── subagent-registry.ts
|
|
486
509
|
│ ├── mcp-registry.ts
|
|
@@ -498,8 +521,7 @@ src/
|
|
|
498
521
|
├── internal/ # host 契约、asPrivate、turn-context、phase/prompt trace
|
|
499
522
|
├── discovery/ # 文件化资源发现(tools / skills / agents)
|
|
500
523
|
├── security/ # exec-policy、file-policy
|
|
501
|
-
├── builtin/ #
|
|
502
|
-
├── builtin-tools.ts # createBuiltinTools() 聚合
|
|
524
|
+
├── builtin/ # 尚未迁移的服务级 / turn meta 工具实现
|
|
503
525
|
│
|
|
504
526
|
├── defaults/ # ★ 各注册表的默认资源
|
|
505
527
|
│ ├── skills.ts # 默认 common skills
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Activity Feedback — endpoint 适配器集成(复用 typing-indicator 底层适配器)
|
|
3
3
|
*/
|
|
4
|
-
import type { EndpointControl } from '@zhin.js/
|
|
4
|
+
import type { EndpointControl } from '@zhin.js/adapter';
|
|
5
5
|
import type { ConversationRef } from '@zhin.js/im-contract';
|
|
6
6
|
import { type TypingIndicator, type TypingIndicatorOptions } from '../typing-indicator/index.js';
|
|
7
7
|
import { PLATFORM_FEATURES, buildTypingSendContent, type PlatformFeatures } from '../typing-indicator/adapter-integration.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter-integration.d.ts","sourceRoot":"","sources":["../../src/activity-feedback/adapter-integration.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"adapter-integration.d.ts","sourceRoot":"","sources":["../../src/activity-feedback/adapter-integration.ts"],"names":[],"mappings":"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"}
|
|
@@ -8,5 +8,4 @@ export { resolveSubagentActivityTag, formatSubagentActivityPrefix, withSubagentA
|
|
|
8
8
|
export { ActivityFeedbackManager, } from './manager.js';
|
|
9
9
|
export { PLATFORM_FEATURES, buildTypingSendContent, enableActivityFeedbackForBot, isGenericActivityFeedbackManager, } from './adapter-integration.js';
|
|
10
10
|
export type { PlatformFeatures, EndpointWithActivityFeedback, ActivityFeedbackSendPort, PlatformActivityFeedbackManager, PlatformActivityFeedbackStartOptions, BotActivityFeedbackManager, } from './adapter-integration.js';
|
|
11
|
-
export { activityFeedbackAiBus, ActivityFeedbackAIBus } from './ai-bus.js';
|
|
12
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/activity-feedback/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,2BAA2B,EAC3B,2BAA2B,EAC3B,sBAAsB,EACtB,mCAAmC,GACpC,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EACL,kCAAkC,GACnC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,YAAY,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,EACxB,2BAA2B,EAC3B,KAAK,4BAA4B,GAClC,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,EAC1B,mCAAmC,EACnC,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,wBAAwB,EACxB,+BAA+B,EAC/B,oCAAoC,EACpC,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/activity-feedback/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,2BAA2B,EAC3B,2BAA2B,EAC3B,sBAAsB,EACtB,mCAAmC,GACpC,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EACL,kCAAkC,GACnC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,YAAY,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,EACxB,2BAA2B,EAC3B,KAAK,4BAA4B,GAClC,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,EAC1B,mCAAmC,EACnC,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,wBAAwB,EACxB,+BAA+B,EAC/B,oCAAoC,EACpC,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC"}
|
|
@@ -5,5 +5,4 @@ export { toActivityFeedbackEventContext, resolveActivitySceneType, resolveActivi
|
|
|
5
5
|
export { resolveSubagentActivityTag, formatSubagentActivityPrefix, withSubagentActivityPrefix, applySubagentActivityPrefixToConfig, resolveActivityFeedbackSessionId, } from './subagent-prefix.js';
|
|
6
6
|
export { ActivityFeedbackManager, } from './manager.js';
|
|
7
7
|
export { PLATFORM_FEATURES, buildTypingSendContent, enableActivityFeedbackForBot, isGenericActivityFeedbackManager, } from './adapter-integration.js';
|
|
8
|
-
export { activityFeedbackAiBus, ActivityFeedbackAIBus } from './ai-bus.js';
|
|
9
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/activity-feedback/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EACL,kCAAkC,GACnC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,EACxB,2BAA2B,GAE5B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,EAC1B,mCAAmC,EACnC,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,0BAA0B,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/activity-feedback/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,OAAO,EACL,kCAAkC,GACnC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,EACxB,2BAA2B,GAE5B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,EAC1B,mCAAmC,EACnC,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,0BAA0B,CAAC"}
|
|
@@ -2,7 +2,7 @@ import type { AIEventPayload } from '../ai-event-subscriber.js';
|
|
|
2
2
|
import type { ResolvedActivityFeedbackPhaseConfig } from './types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Subagent activity feedback tag (e.g. researcher).
|
|
5
|
-
* Prefer ai.agents /
|
|
5
|
+
* Prefer ai.agents / agents/<name>/agent.json name; fall back to role; never use long task labels.
|
|
6
6
|
*/
|
|
7
7
|
export declare function resolveSubagentActivityTag(payload: Pick<AIEventPayload, 'source' | 'agentId'>): string | undefined;
|
|
8
8
|
export declare function formatSubagentActivityPrefix(tag: string): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Subagent activity feedback tag (e.g. researcher).
|
|
3
|
-
* Prefer ai.agents /
|
|
3
|
+
* Prefer ai.agents / agents/<name>/agent.json name; fall back to role; never use long task labels.
|
|
4
4
|
*/
|
|
5
5
|
export function resolveSubagentActivityTag(payload) {
|
|
6
6
|
if (payload.source !== 'subagent')
|
package/lib/ai-event-bus.d.ts
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
|
-
import { type Plugin } from '@zhin.js/core';
|
|
2
1
|
import type { AIHookEvent } from './resource-hub/types.js';
|
|
3
|
-
|
|
4
|
-
export interface AISessionNewPayload extends
|
|
2
|
+
import type { AIEventPayload } from './ai-event-contract.js';
|
|
3
|
+
export interface AISessionNewPayload extends AIEventPayload {
|
|
5
4
|
reason: 'first_message';
|
|
6
5
|
}
|
|
7
|
-
export interface AISessionCompactPayload extends
|
|
6
|
+
export interface AISessionCompactPayload extends AIEventPayload {
|
|
8
7
|
compactedCount: number;
|
|
9
8
|
savedTokens: number;
|
|
10
9
|
totalTokensBefore: number;
|
|
11
10
|
totalTokensAfter: number;
|
|
12
11
|
}
|
|
13
|
-
export declare function createAIHookBusPayload(event: AIHookEvent, source:
|
|
14
|
-
export declare function isAISessionNewPayload(payload:
|
|
15
|
-
export declare function isAISessionCompactPayload(payload:
|
|
16
|
-
export declare function onAIHook(plugin: Plugin, listener: (payload: Plugin.AIEventPayload) => void): () => void;
|
|
17
|
-
export declare function onAISessionNew(plugin: Plugin, listener: (payload: AISessionNewPayload) => void): () => void;
|
|
18
|
-
export declare function onAISessionCompact(plugin: Plugin, listener: (payload: AISessionCompactPayload) => void): () => void;
|
|
12
|
+
export declare function createAIHookBusPayload(event: AIHookEvent, source: AIEventPayload['source'], agentId?: string): AIEventPayload;
|
|
13
|
+
export declare function isAISessionNewPayload(payload: AIEventPayload): payload is AISessionNewPayload;
|
|
14
|
+
export declare function isAISessionCompactPayload(payload: AIEventPayload): payload is AISessionCompactPayload;
|
|
19
15
|
//# sourceMappingURL=ai-event-bus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-event-bus.d.ts","sourceRoot":"","sources":["../src/ai-event-bus.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ai-event-bus.d.ts","sourceRoot":"","sources":["../src/ai-event-bus.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACzD,MAAM,EAAE,eAAe,CAAC;CACzB;AAED,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC7D,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAoBD,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,EAChC,OAAO,CAAC,EAAE,MAAM,GACf,cAAc,CA4BhB;AAED,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,IAAI,mBAAmB,CAE7F;AAED,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,IAAI,uBAAuB,CAKrG"}
|
package/lib/ai-event-bus.js
CHANGED
|
@@ -54,17 +54,4 @@ export function isAISessionCompactPayload(payload) {
|
|
|
54
54
|
&& typeof payload.totalTokensBefore === 'number'
|
|
55
55
|
&& typeof payload.totalTokensAfter === 'number';
|
|
56
56
|
}
|
|
57
|
-
function onAIEvent(plugin, event, listener) {
|
|
58
|
-
plugin.on(event, listener);
|
|
59
|
-
return () => plugin.off(event, listener);
|
|
60
|
-
}
|
|
61
|
-
export function onAIHook(plugin, listener) {
|
|
62
|
-
return onAIEvent(plugin, 'ai.hook', listener);
|
|
63
|
-
}
|
|
64
|
-
export function onAISessionNew(plugin, listener) {
|
|
65
|
-
return onAIEvent(plugin, 'ai.session.new', listener);
|
|
66
|
-
}
|
|
67
|
-
export function onAISessionCompact(plugin, listener) {
|
|
68
|
-
return onAIEvent(plugin, 'ai.session.compact', listener);
|
|
69
|
-
}
|
|
70
57
|
//# sourceMappingURL=ai-event-bus.js.map
|
package/lib/ai-event-bus.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-event-bus.js","sourceRoot":"","sources":["../src/ai-event-bus.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ai-event-bus.js","sourceRoot":"","sources":["../src/ai-event-bus.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Agent-owned lifecycle event contract shared by Runtime publishers and subscribers. */
|
|
2
|
+
export type AIEventName = 'ai.processing.start' | 'ai.processing.finish' | 'ai.processing.error' | 'ai.agent.start' | 'ai.agent.finish' | 'ai.thinking' | 'ai.tool.call' | 'ai.tool.result' | 'ai.response' | 'ai.typing.start' | 'ai.typing.stop' | 'ai.activity.queued.start' | 'ai.activity.queued.clear' | 'ai.subagent.spawn' | 'ai.subagent.start' | 'ai.subagent.finish' | 'ai.deferred.start' | 'ai.deferred.finish' | 'ai.mcp.connect.start' | 'ai.mcp.connect.finish' | 'ai.mcp.connect.error' | 'ai.session.new' | 'ai.session.compact' | 'ai.hook' | 'schedule.start' | 'schedule.finish' | 'schedule.error';
|
|
3
|
+
export type AIEventSource = 'zhin-agent' | 'subagent' | 'ai-hook' | 'orchestrator-hook';
|
|
4
|
+
export type AIEventMode = 'text' | 'multimodal';
|
|
5
|
+
export type AIEventPath = 'chat' | 'fast' | 'agent' | 'multimodal' | 'rate_limited';
|
|
6
|
+
export interface AIEventPayload {
|
|
7
|
+
sessionId: string;
|
|
8
|
+
source: AIEventSource;
|
|
9
|
+
mode?: AIEventMode;
|
|
10
|
+
path?: AIEventPath;
|
|
11
|
+
userId?: string;
|
|
12
|
+
platform?: string;
|
|
13
|
+
endpointKey?: string;
|
|
14
|
+
sceneId?: string;
|
|
15
|
+
messageId?: string;
|
|
16
|
+
scope?: string;
|
|
17
|
+
content?: string;
|
|
18
|
+
reply?: string;
|
|
19
|
+
thinking?: string;
|
|
20
|
+
toolName?: string;
|
|
21
|
+
args?: Record<string, unknown>;
|
|
22
|
+
result?: unknown;
|
|
23
|
+
error?: string;
|
|
24
|
+
model?: string;
|
|
25
|
+
iterations?: number;
|
|
26
|
+
reason?: string;
|
|
27
|
+
taskId?: string;
|
|
28
|
+
label?: string;
|
|
29
|
+
status?: 'ok' | 'partial' | 'error';
|
|
30
|
+
serverName?: string;
|
|
31
|
+
loadedToolNames?: string[];
|
|
32
|
+
hookType?: string;
|
|
33
|
+
hookAction?: string;
|
|
34
|
+
hookContext?: Record<string, unknown>;
|
|
35
|
+
messages?: string[];
|
|
36
|
+
agentId?: string;
|
|
37
|
+
compactedCount?: number;
|
|
38
|
+
savedTokens?: number;
|
|
39
|
+
totalTokensBefore?: number;
|
|
40
|
+
totalTokensAfter?: number;
|
|
41
|
+
keepTyping?: boolean;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=ai-event-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-event-contract.d.ts","sourceRoot":"","sources":["../src/ai-event-contract.ts"],"names":[],"mappings":"AAAA,yFAAyF;AACzF,MAAM,MAAM,WAAW,GACnB,qBAAqB,GACrB,sBAAsB,GACtB,qBAAqB,GACrB,gBAAgB,GAChB,iBAAiB,GACjB,aAAa,GACb,cAAc,GACd,gBAAgB,GAChB,aAAa,GACb,iBAAiB,GACjB,gBAAgB,GAChB,0BAA0B,GAC1B,0BAA0B,GAC1B,mBAAmB,GACnB,mBAAmB,GACnB,oBAAoB,GACpB,mBAAmB,GACnB,oBAAoB,GACpB,sBAAsB,GACtB,uBAAuB,GACvB,sBAAsB,GACtB,gBAAgB,GAChB,oBAAoB,GACpB,SAAS,GACT,gBAAgB,GAChB,iBAAiB,GACjB,gBAAgB,CAAC;AAErB,MAAM,MAAM,aAAa,GAAG,YAAY,GAAG,UAAU,GAAG,SAAS,GAAG,mBAAmB,CAAC;AACxF,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,YAAY,CAAC;AAChD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,YAAY,GAAG,cAAc,CAAC;AAEpF,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-event-contract.js","sourceRoot":"","sources":["../src/ai-event-contract.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type AIEventName
|
|
3
|
-
export type AIEventPayload = Plugin.AIEventPayload;
|
|
1
|
+
import type { AIEventName, AIEventPayload, AIEventSource } from './ai-event-contract.js';
|
|
2
|
+
export type { AIEventName, AIEventPayload } from './ai-event-contract.js';
|
|
4
3
|
export interface AIEventFilter {
|
|
5
4
|
sessionId?: string;
|
|
6
5
|
platform?: string;
|
|
7
6
|
endpointKey?: string;
|
|
8
7
|
sceneId?: string;
|
|
9
|
-
source?:
|
|
8
|
+
source?: AIEventSource;
|
|
10
9
|
}
|
|
11
10
|
export interface AIEventHandlers {
|
|
12
11
|
onAny?: (event: AIEventName, payload: AIEventPayload) => void;
|
|
@@ -49,5 +48,4 @@ export interface AIEventTarget {
|
|
|
49
48
|
* Does **not** restore Plugin ALS — safe for Plugin Runtime setup.
|
|
50
49
|
*/
|
|
51
50
|
export declare function subscribeAIEventsOnTarget(target: AIEventTarget, handlers: AIEventHandlers, filter?: AIEventFilter): () => void;
|
|
52
|
-
export declare function subscribeAIEvents(plugin: Plugin, handlers: AIEventHandlers, filter?: AIEventFilter): () => void;
|
|
53
51
|
//# sourceMappingURL=ai-event-subscriber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-event-subscriber.d.ts","sourceRoot":"","sources":["../src/ai-event-subscriber.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ai-event-subscriber.d.ts","sourceRoot":"","sources":["../src/ai-event-subscriber.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { storage } from '@zhin.js/core';
|
|
2
1
|
const EVENT_HANDLER_MAP = {
|
|
3
2
|
'ai.processing.start': 'onProcessingStart',
|
|
4
3
|
'ai.processing.finish': 'onProcessingFinish',
|
|
@@ -75,22 +74,4 @@ export function subscribeAIEventsOnTarget(target, handlers, filter) {
|
|
|
75
74
|
dispose();
|
|
76
75
|
};
|
|
77
76
|
}
|
|
78
|
-
export function subscribeAIEvents(plugin, handlers, filter) {
|
|
79
|
-
const disposers = AI_EVENT_NAMES.map((eventName) => {
|
|
80
|
-
const listener = (payload) => {
|
|
81
|
-
if (!matchesFilter(payload, filter))
|
|
82
|
-
return;
|
|
83
|
-
// broadcast 不经过 usePlugin 加载栈;在订阅方入口恢复 ALS,避免监听里 getPlugin() 失效
|
|
84
|
-
void storage.run(plugin, async () => {
|
|
85
|
-
await invokeHandlers(eventName, payload, handlers);
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
plugin.on(eventName, listener);
|
|
89
|
-
return () => plugin.off(eventName, listener);
|
|
90
|
-
});
|
|
91
|
-
return () => {
|
|
92
|
-
for (const dispose of disposers)
|
|
93
|
-
dispose();
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
77
|
//# sourceMappingURL=ai-event-subscriber.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-event-subscriber.js","sourceRoot":"","sources":["../src/ai-event-subscriber.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ai-event-subscriber.js","sourceRoot":"","sources":["../src/ai-event-subscriber.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { AIEventPayload } from './ai-event-
|
|
1
|
+
import type { AIEventPayload } from './ai-event-contract.js';
|
|
2
2
|
type AIHookBusListener = (payload: AIEventPayload) => void;
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* Plugin ALS / `onAIHook(plugin, …)`.
|
|
4
|
+
* Runtime AI hook event bus.
|
|
6
5
|
*
|
|
7
6
|
* `emitAIHookBusEvent` fans out here so Runtime plugins can observe hooks
|
|
8
|
-
* without a host Plugin
|
|
7
|
+
* without a classic host Plugin.
|
|
9
8
|
*/
|
|
10
9
|
export declare class AIHookRuntimeBus {
|
|
11
10
|
private readonly listeners;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-hook-runtime-bus.d.ts","sourceRoot":"","sources":["../src/ai-hook-runtime-bus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ai-hook-runtime-bus.d.ts","sourceRoot":"","sources":["../src/ai-hook-runtime-bus.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,KAAK,iBAAiB,GAAG,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;AAE3D;;;;;GAKG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA6C;IAEvE,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,GAAG,IAAI;IAUpD,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,GAAG,IAAI;IAKrD,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;IAYlD,KAAK,IAAI,IAAI;CAGd;AAED,eAAO,MAAM,gBAAgB,kBAAyB,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
* Plugin ALS / `onAIHook(plugin, …)`.
|
|
2
|
+
* Runtime AI hook event bus.
|
|
4
3
|
*
|
|
5
4
|
* `emitAIHookBusEvent` fans out here so Runtime plugins can observe hooks
|
|
6
|
-
* without a host Plugin
|
|
5
|
+
* without a classic host Plugin.
|
|
7
6
|
*/
|
|
8
7
|
export class AIHookRuntimeBus {
|
|
9
8
|
listeners = new Map();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-hook-runtime-bus.js","sourceRoot":"","sources":["../src/ai-hook-runtime-bus.ts"],"names":[],"mappings":"AAIA
|
|
1
|
+
{"version":3,"file":"ai-hook-runtime-bus.js","sourceRoot":"","sources":["../src/ai-hook-runtime-bus.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,MAAM,OAAO,gBAAgB;IACV,SAAS,GAAG,IAAI,GAAG,EAAkC,CAAC;IAEvE,EAAE,CAAC,KAAa,EAAE,QAA2B;QAC3C,IAAI,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACpC,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC;YAChB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QACjC,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAClB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,GAAG,CAAC,KAAa,EAAE,QAA2B;QAC5C,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC5C,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,CAAC,KAAa,EAAE,OAAuB;QACzC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACtC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC;YAAE,OAAO;QACnC,KAAK,MAAM,QAAQ,IAAI,GAAG,EAAE,CAAC;YAC3B,IAAI,CAAC;gBACH,QAAQ,CAAC,OAAO,CAAC,CAAC;YACpB,CAAC;YAAC,MAAM,CAAC;gBACP,sDAAsD;YACxD,CAAC;QACH,CAAC;IACH,CAAC;IAED,KAAK;QACH,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;CACF;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -3,15 +3,13 @@
|
|
|
3
3
|
* Routes scheduled task output through NotificationRouter (unified outbound chain).
|
|
4
4
|
*/
|
|
5
5
|
import type { JobNotify } from './types.js';
|
|
6
|
-
import { type DeliverResult, type NotificationRouter
|
|
6
|
+
import { type DeliverResult, type NotificationRouter } from './notification-router.js';
|
|
7
7
|
export interface DeliverScheduleToAdapterInput {
|
|
8
8
|
notify: JobNotify;
|
|
9
9
|
content: string;
|
|
10
10
|
jobId?: string;
|
|
11
11
|
label?: string;
|
|
12
|
-
router
|
|
13
|
-
/** @deprecated 仅用于未注入 router 时的回退构造 */
|
|
14
|
-
resolveAdapter?: NotificationRouterDeps['resolveAdapter'];
|
|
12
|
+
router: NotificationRouter;
|
|
15
13
|
source?: string;
|
|
16
14
|
}
|
|
17
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deliver-schedule-to-adapter.d.ts","sourceRoot":"","sources":["../../src/assistant/deliver-schedule-to-adapter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,
|
|
1
|
+
{"version":3,"file":"deliver-schedule-to-adapter.d.ts","sourceRoot":"","sources":["../../src/assistant/deliver-schedule-to-adapter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,SAAS,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,6BAA6B,GACnC,OAAO,CAAC,aAAa,CAAC,CAGxB"}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
import { createNotificationRouter, } from './notification-router.js';
|
|
2
1
|
/**
|
|
3
2
|
* Deliver schedule/cron task output to IM via the unified outbound chain.
|
|
4
3
|
*/
|
|
5
4
|
export async function deliverScheduleToAdapter(input) {
|
|
6
|
-
const { notify, content, jobId, label, source } = input;
|
|
7
|
-
const router = input.router ?? (input.resolveAdapter
|
|
8
|
-
? createNotificationRouter({ resolveAdapter: input.resolveAdapter })
|
|
9
|
-
: undefined);
|
|
10
|
-
if (!router) {
|
|
11
|
-
return { delivered: false, channel: notify.channel };
|
|
12
|
-
}
|
|
5
|
+
const { notify, content, jobId, label, source, router } = input;
|
|
13
6
|
return router.deliver({ notify, content, jobId, label, source });
|
|
14
7
|
}
|
|
15
8
|
//# sourceMappingURL=deliver-schedule-to-adapter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deliver-schedule-to-adapter.js","sourceRoot":"","sources":["../../src/assistant/deliver-schedule-to-adapter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deliver-schedule-to-adapter.js","sourceRoot":"","sources":["../../src/assistant/deliver-schedule-to-adapter.ts"],"names":[],"mappings":"AAmBA;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAC5C,KAAoC;IAEpC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAChE,OAAO,MAAM,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ha-home-backend.d.ts","sourceRoot":"","sources":["../../../src/assistant/domains/ha-home-backend.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ha-home-backend.d.ts","sourceRoot":"","sources":["../../../src/assistant/domains/ha-home-backend.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAgE,MAAM,mBAAmB,CAAC;AAC3H,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAI7B,MAAM,MAAM,OAAO,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE7E,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAYD,qBAAa,aAAa;IACxB,OAAO,CAAC,GAAG,CAA8B;IACzC,OAAO,CAAC,OAAO,CAAU;gBAEb,UAAU,EAAE,mBAAmB,EAAE,OAAO,GAAE,OAA2C;IAKjG,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAIrC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IASnC,OAAO,CAAC,OAAO;IAMf,OAAO,CAAC,KAAK;YAKC,SAAS;IAoBjB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAYrD,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,GAAG;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE;IAUrF,WAAW,CACf,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC7B,OAAO,CAAC,IAAI,CAAC;IAUhB;;;OAGG;IACG,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAsBpF,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAO/C,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;CAMvD"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* HaHomeBackend — Home Assistant REST client(别名解析 + 服务调用)
|
|
3
3
|
*/
|
|
4
|
-
import { getLogger } from '@zhin.js/
|
|
5
|
-
import { formatCompact } from '@zhin.js/logger';
|
|
4
|
+
import { getLogger, formatCompact } from '@zhin.js/logger';
|
|
6
5
|
import { resolveAssistantHomeConfig } from '../home-config.js';
|
|
7
6
|
import { parseEntityDomain } from './home-entity.js';
|
|
8
7
|
export { parseEntityDomain };
|