@zhin.js/agent 1.1.22 → 1.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -25
- package/lib/activity-feedback/adapter-integration.d.ts +1 -1
- package/lib/activity-feedback/adapter-integration.d.ts.map +1 -1
- package/lib/activity-feedback/index.d.ts +0 -1
- package/lib/activity-feedback/index.d.ts.map +1 -1
- package/lib/activity-feedback/index.js +0 -1
- package/lib/activity-feedback/index.js.map +1 -1
- package/lib/activity-feedback/subagent-prefix.d.ts +1 -1
- package/lib/activity-feedback/subagent-prefix.js +1 -1
- package/lib/ai-event-bus.d.ts +6 -10
- package/lib/ai-event-bus.d.ts.map +1 -1
- package/lib/ai-event-bus.js +0 -13
- package/lib/ai-event-bus.js.map +1 -1
- package/lib/ai-event-contract.d.ts +43 -0
- package/lib/ai-event-contract.d.ts.map +1 -0
- package/lib/ai-event-contract.js +2 -0
- package/lib/ai-event-contract.js.map +1 -0
- package/lib/ai-event-subscriber.d.ts +3 -5
- package/lib/ai-event-subscriber.d.ts.map +1 -1
- package/lib/ai-event-subscriber.js +0 -19
- package/lib/ai-event-subscriber.js.map +1 -1
- package/lib/ai-hook-runtime-bus.d.ts +3 -4
- package/lib/ai-hook-runtime-bus.d.ts.map +1 -1
- package/lib/ai-hook-runtime-bus.js +2 -3
- package/lib/ai-hook-runtime-bus.js.map +1 -1
- package/lib/assistant/deliver-schedule-to-adapter.d.ts +2 -4
- package/lib/assistant/deliver-schedule-to-adapter.d.ts.map +1 -1
- package/lib/assistant/deliver-schedule-to-adapter.js +1 -8
- package/lib/assistant/deliver-schedule-to-adapter.js.map +1 -1
- package/lib/assistant/domains/ha-home-backend.d.ts.map +1 -1
- package/lib/assistant/domains/ha-home-backend.js +1 -2
- package/lib/assistant/domains/ha-home-backend.js.map +1 -1
- package/lib/assistant/domains/ha-ws-transport.d.ts.map +1 -1
- package/lib/assistant/domains/ha-ws-transport.js +1 -2
- package/lib/assistant/domains/ha-ws-transport.js.map +1 -1
- package/lib/assistant/domains/home-state-watch.d.ts.map +1 -1
- package/lib/assistant/domains/home-state-watch.js +1 -2
- package/lib/assistant/domains/home-state-watch.js.map +1 -1
- package/lib/assistant/event-ingress.d.ts.map +1 -1
- package/lib/assistant/event-ingress.js +1 -2
- package/lib/assistant/event-ingress.js.map +1 -1
- package/lib/assistant/home-policy.d.ts +1 -1
- package/lib/assistant/home-policy.d.ts.map +1 -1
- package/lib/assistant/home-tools.d.ts.map +1 -1
- package/lib/assistant/home-tools.js.map +1 -1
- package/lib/assistant/index.d.ts +2 -2
- package/lib/assistant/index.d.ts.map +1 -1
- package/lib/assistant/index.js +2 -2
- package/lib/assistant/index.js.map +1 -1
- package/lib/assistant/job-engine.d.ts +3 -2
- package/lib/assistant/job-engine.d.ts.map +1 -1
- package/lib/assistant/job-engine.js +6 -4
- package/lib/assistant/job-engine.js.map +1 -1
- package/lib/assistant/job-scheduler.d.ts +2 -2
- package/lib/assistant/job-scheduler.d.ts.map +1 -1
- package/lib/assistant/job-scheduler.js +2 -11
- package/lib/assistant/job-scheduler.js.map +1 -1
- package/lib/assistant/job-worker.js +1 -1
- package/lib/assistant/job-worker.js.map +1 -1
- package/lib/assistant/notification-router.d.ts.map +1 -1
- package/lib/assistant/notification-router.js +2 -2
- package/lib/assistant/notification-router.js.map +1 -1
- package/lib/assistant/profile-loader.d.ts +0 -4
- package/lib/assistant/profile-loader.d.ts.map +1 -1
- package/lib/assistant/profile-loader.js +0 -4
- package/lib/assistant/profile-loader.js.map +1 -1
- package/lib/assistant/schedule-skills.d.ts.map +1 -1
- package/lib/assistant/schedule-skills.js +5 -7
- package/lib/assistant/schedule-skills.js.map +1 -1
- package/lib/authoring/bridge.d.ts +2 -16
- package/lib/authoring/bridge.d.ts.map +1 -1
- package/lib/authoring/bridge.js +1 -74
- package/lib/authoring/bridge.js.map +1 -1
- package/lib/authoring/disable-tool.d.ts +2 -2
- package/lib/authoring/disable-tool.d.ts.map +1 -1
- package/lib/authoring/disable-tool.js +2 -2
- package/lib/authoring/disable-tool.js.map +1 -1
- package/lib/authoring/index.d.ts +1 -11
- package/lib/authoring/index.d.ts.map +1 -1
- package/lib/authoring/index.js +1 -6
- package/lib/authoring/index.js.map +1 -1
- package/lib/authoring/types.d.ts +3 -116
- package/lib/authoring/types.d.ts.map +1 -1
- package/lib/authoring/types.js.map +1 -1
- package/lib/bootstrap.d.ts +3 -8
- package/lib/bootstrap.d.ts.map +1 -1
- package/lib/bootstrap.js +9 -29
- package/lib/bootstrap.js.map +1 -1
- package/lib/builtins/builtin-tool-service.d.ts +2 -1
- package/lib/builtins/builtin-tool-service.d.ts.map +1 -1
- package/lib/builtins/builtin-tool-service.js +16 -5
- package/lib/builtins/builtin-tool-service.js.map +1 -1
- package/lib/config/fix-ai-config.d.ts.map +1 -1
- package/lib/config/fix-ai-config.js +0 -57
- package/lib/config/fix-ai-config.js.map +1 -1
- package/lib/config/index.d.ts +2 -1
- package/lib/config/index.d.ts.map +1 -1
- package/lib/config/index.js +2 -1
- package/lib/config/index.js.map +1 -1
- package/lib/config/provider-instance.d.ts +3 -3
- package/lib/config/provider-instance.d.ts.map +1 -1
- package/lib/config/provider-instance.js.map +1 -1
- package/lib/config/resolve-five-agent-binding.d.ts +1 -1
- package/lib/config/resolve-five-agent-binding.d.ts.map +1 -1
- package/lib/config/validate-ai-config.d.ts +0 -1
- package/lib/config/validate-ai-config.d.ts.map +1 -1
- package/lib/config/validate-ai-config.js +0 -229
- package/lib/config/validate-ai-config.js.map +1 -1
- package/lib/config/zhin-agent-config.d.ts +1 -1
- package/lib/config/zhin-agent-config.d.ts.map +1 -1
- package/lib/config/zhin-agent-defaults.js +4 -4
- package/lib/config/zhin-agent-dependencies.d.ts +5 -5
- package/lib/config/zhin-agent-dependencies.d.ts.map +1 -1
- package/lib/context/agents-instruction.d.ts +0 -1
- package/lib/context/agents-instruction.d.ts.map +1 -1
- package/lib/context/agents-instruction.js +1 -14
- package/lib/context/agents-instruction.js.map +1 -1
- package/lib/context/context-system.d.ts.map +1 -1
- package/lib/context/context-system.js +2 -2
- package/lib/context/context-system.js.map +1 -1
- package/lib/context/index.d.ts +1 -1
- package/lib/context/index.d.ts.map +1 -1
- package/lib/context/index.js +1 -1
- package/lib/context/index.js.map +1 -1
- package/lib/context/turn-user-message.d.ts.map +1 -1
- package/lib/context/turn-user-message.js +1 -2
- package/lib/context/turn-user-message.js.map +1 -1
- package/lib/core/agent-core-run.d.ts.map +1 -1
- package/lib/core/agent-core-run.js +17 -16
- package/lib/core/agent-core-run.js.map +1 -1
- package/lib/core/agent-loop-standalone.d.ts +2 -1
- package/lib/core/agent-loop-standalone.d.ts.map +1 -1
- package/lib/core/agent-loop-standalone.js +19 -18
- package/lib/core/agent-loop-standalone.js.map +1 -1
- package/lib/core/tool-calls-user-format.d.ts.map +1 -1
- package/lib/core/tool-calls-user-format.js +2 -76
- package/lib/core/tool-calls-user-format.js.map +1 -1
- package/lib/create-agent-session.d.ts +1 -1
- package/lib/create-agent-session.d.ts.map +1 -1
- package/lib/create-agent-session.js +2 -2
- package/lib/create-agent-session.js.map +1 -1
- package/lib/data-governance/disclosure-authority.d.ts +38 -0
- package/lib/data-governance/disclosure-authority.d.ts.map +1 -0
- package/lib/data-governance/disclosure-authority.js +2 -0
- package/lib/data-governance/disclosure-authority.js.map +1 -0
- package/lib/data-governance/governance-authority-repository.d.ts +3 -0
- package/lib/data-governance/governance-authority-repository.d.ts.map +1 -1
- package/lib/data-governance/governance-authority-repository.js +10 -1
- package/lib/data-governance/governance-authority-repository.js.map +1 -1
- package/lib/deferred-worker-runner.d.ts +2 -1
- package/lib/deferred-worker-runner.d.ts.map +1 -1
- package/lib/deferred-worker-runner.js +6 -4
- package/lib/deferred-worker-runner.js.map +1 -1
- package/lib/discovery/agent-surface-info.d.ts +5 -9
- package/lib/discovery/agent-surface-info.d.ts.map +1 -1
- package/lib/discovery/agent-surface-info.js +81 -45
- package/lib/discovery/agent-surface-info.js.map +1 -1
- package/lib/discovery/agent-surface.d.ts +2 -22
- package/lib/discovery/agent-surface.d.ts.map +1 -1
- package/lib/discovery/agent-surface.js +72 -287
- package/lib/discovery/agent-surface.js.map +1 -1
- package/lib/discovery/agents.d.ts +10 -12
- package/lib/discovery/agents.d.ts.map +1 -1
- package/lib/discovery/agents.js +91 -90
- package/lib/discovery/agents.js.map +1 -1
- package/lib/discovery/utils.d.ts +2 -15
- package/lib/discovery/utils.d.ts.map +1 -1
- package/lib/discovery/utils.js +2 -76
- package/lib/discovery/utils.js.map +1 -1
- package/lib/event/agent-stream-hooks.d.ts +0 -2
- package/lib/event/agent-stream-hooks.d.ts.map +1 -1
- package/lib/event/agent-stream-hooks.js +0 -8
- package/lib/event/agent-stream-hooks.js.map +1 -1
- package/lib/event/ai-event-bus.d.ts +13 -0
- package/lib/event/ai-event-bus.d.ts.map +1 -0
- package/lib/event/ai-event-bus.js +45 -0
- package/lib/event/ai-event-bus.js.map +1 -0
- package/lib/event/event-emitter.d.ts +8 -14
- package/lib/event/event-emitter.d.ts.map +1 -1
- package/lib/event/event-emitter.js +7 -37
- package/lib/event/event-emitter.js.map +1 -1
- package/lib/index.d.ts +42 -74
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +29 -58
- package/lib/index.js.map +1 -1
- package/lib/init/activate-ai-database-storage.d.ts +1 -1
- package/lib/init/activate-ai-database-storage.d.ts.map +1 -1
- package/lib/init/activate-ai-database-storage.js +28 -32
- package/lib/init/activate-ai-database-storage.js.map +1 -1
- package/lib/init/compose-zhin-agent-runtime.d.ts +2 -0
- package/lib/init/compose-zhin-agent-runtime.d.ts.map +1 -1
- package/lib/init/compose-zhin-agent-runtime.js +1 -0
- package/lib/init/compose-zhin-agent-runtime.js.map +1 -1
- package/lib/init/configure-zhin-agent.d.ts +3 -4
- package/lib/init/configure-zhin-agent.d.ts.map +1 -1
- package/lib/init/configure-zhin-agent.js +9 -7
- package/lib/init/configure-zhin-agent.js.map +1 -1
- package/lib/init/define-ai-database-models.js +1 -1
- package/lib/init/dispose-zhin-agent.d.ts +1 -1
- package/lib/init/dispose-zhin-agent.d.ts.map +1 -1
- package/lib/init/dispose-zhin-agent.js +0 -1
- package/lib/init/dispose-zhin-agent.js.map +1 -1
- package/lib/init/runtime-management-commands.d.ts +1 -2
- package/lib/init/runtime-management-commands.d.ts.map +1 -1
- package/lib/init/runtime-management-commands.js.map +1 -1
- package/lib/internal/agent-host.d.ts +10 -5
- package/lib/internal/agent-host.d.ts.map +1 -1
- package/lib/internal/host-types.d.ts +5 -7
- package/lib/internal/host-types.d.ts.map +1 -1
- package/lib/mcp-client/bridge.d.ts +1 -2
- package/lib/mcp-client/bridge.d.ts.map +1 -1
- package/lib/mcp-client/bridge.js +1 -2
- package/lib/mcp-client/bridge.js.map +1 -1
- package/lib/media/media-publisher.d.ts +1 -1
- package/lib/media/media-publisher.d.ts.map +1 -1
- package/lib/media/media-router.d.ts +4 -7
- package/lib/media/media-router.d.ts.map +1 -1
- package/lib/media/media-router.js +10 -26
- package/lib/media/media-router.js.map +1 -1
- package/lib/media/media-types.d.ts +4 -0
- package/lib/media/media-types.d.ts.map +1 -1
- package/lib/media/media-types.js.map +1 -1
- package/lib/media/resolve-config.d.ts +0 -1
- package/lib/media/resolve-config.d.ts.map +1 -1
- package/lib/media/resolve-config.js +0 -3
- package/lib/media/resolve-config.js.map +1 -1
- package/lib/media/subagent-inbound.d.ts +3 -2
- package/lib/media/subagent-inbound.d.ts.map +1 -1
- package/lib/media/subagent-inbound.js +5 -8
- package/lib/media/subagent-inbound.js.map +1 -1
- package/lib/memory/ai-compaction-strategy.d.ts +3 -2
- package/lib/memory/ai-compaction-strategy.d.ts.map +1 -1
- package/lib/memory/ai-compaction-strategy.js +4 -1
- package/lib/memory/ai-compaction-strategy.js.map +1 -1
- package/lib/memory/compaction-runtime.d.ts +23 -14
- package/lib/memory/compaction-runtime.d.ts.map +1 -1
- package/lib/memory/compaction-runtime.js +92 -76
- package/lib/memory/compaction-runtime.js.map +1 -1
- package/lib/memory/context-repository-store.js +1 -1
- package/lib/memory/context-repository-store.js.map +1 -1
- package/lib/memory/index.d.ts +2 -2
- package/lib/memory/index.d.ts.map +1 -1
- package/lib/memory/index.js +1 -1
- package/lib/memory/index.js.map +1 -1
- package/lib/memory/memory-system.d.ts.map +1 -1
- package/lib/memory/memory-system.js +5 -6
- package/lib/memory/memory-system.js.map +1 -1
- package/lib/memory-layers.d.ts +2 -6
- package/lib/memory-layers.d.ts.map +1 -1
- package/lib/memory-layers.js +23 -75
- package/lib/memory-layers.js.map +1 -1
- package/lib/orchestration/five-agent/index.d.ts.map +1 -0
- package/lib/orchestration/five-agent/index.js.map +1 -0
- package/lib/orchestration/five-agent/prompts.d.ts.map +1 -0
- package/lib/orchestration/five-agent/prompts.js.map +1 -0
- package/lib/orchestration/five-agent/role-capability-policy.d.ts.map +1 -0
- package/lib/orchestration/five-agent/role-capability-policy.js.map +1 -0
- package/lib/orchestration/five-agent/roles.d.ts.map +1 -0
- package/lib/orchestration/five-agent/roles.js.map +1 -0
- package/lib/plugin-ai-hook-bus.d.ts +3 -7
- package/lib/plugin-ai-hook-bus.d.ts.map +1 -1
- package/lib/plugin-ai-hook-bus.js +1 -7
- package/lib/plugin-ai-hook-bus.js.map +1 -1
- package/lib/plugin-runtime/agent-event-bus.d.ts +4 -0
- package/lib/plugin-runtime/agent-event-bus.d.ts.map +1 -0
- package/lib/plugin-runtime/agent-event-bus.js +4 -0
- package/lib/plugin-runtime/agent-event-bus.js.map +1 -0
- package/lib/plugin-runtime/agent-host-port.d.ts +0 -6
- package/lib/plugin-runtime/agent-host-port.d.ts.map +1 -1
- package/lib/plugin-runtime/agent-host-port.js.map +1 -1
- package/lib/plugin-runtime/agent-runtime.d.ts +1 -1
- package/lib/plugin-runtime/agent-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/agent-runtime.js +9 -4
- package/lib/plugin-runtime/agent-runtime.js.map +1 -1
- package/lib/plugin-runtime/capability-ingress.d.ts +1 -1
- package/lib/plugin-runtime/capability-ingress.d.ts.map +1 -1
- package/lib/plugin-runtime/capability-ingress.js +118 -12
- package/lib/plugin-runtime/capability-ingress.js.map +1 -1
- package/lib/plugin-runtime/capability-tools.d.ts.map +1 -1
- package/lib/plugin-runtime/capability-tools.js +5 -3
- package/lib/plugin-runtime/capability-tools.js.map +1 -1
- package/lib/plugin-runtime/deferred-capability-plan.d.ts.map +1 -1
- package/lib/plugin-runtime/deferred-capability-plan.js +50 -21
- package/lib/plugin-runtime/deferred-capability-plan.js.map +1 -1
- package/lib/plugin-runtime/file-edit-quote-utils.d.ts.map +1 -0
- package/lib/plugin-runtime/file-edit-quote-utils.js.map +1 -0
- package/lib/plugin-runtime/full-agent-turn-engine.d.ts.map +1 -1
- package/lib/plugin-runtime/full-agent-turn-engine.js +10 -10
- package/lib/plugin-runtime/full-agent-turn-engine.js.map +1 -1
- package/lib/plugin-runtime/github-actions-delivery-provider.d.ts +44 -0
- package/lib/plugin-runtime/github-actions-delivery-provider.d.ts.map +1 -0
- package/lib/plugin-runtime/github-actions-delivery-provider.js +246 -0
- package/lib/plugin-runtime/github-actions-delivery-provider.js.map +1 -0
- package/lib/plugin-runtime/github-exact-merge-gateway.d.ts +62 -0
- package/lib/plugin-runtime/github-exact-merge-gateway.d.ts.map +1 -0
- package/lib/plugin-runtime/github-exact-merge-gateway.js +79 -0
- package/lib/plugin-runtime/github-exact-merge-gateway.js.map +1 -0
- package/lib/plugin-runtime/github-workroom-capability.d.ts +15 -0
- package/lib/plugin-runtime/github-workroom-capability.d.ts.map +1 -0
- package/lib/plugin-runtime/github-workroom-capability.js +79 -0
- package/lib/plugin-runtime/github-workroom-capability.js.map +1 -0
- package/lib/plugin-runtime/host-tool-projection.d.ts +1 -1
- package/lib/plugin-runtime/host-tool-projection.d.ts.map +1 -1
- package/lib/plugin-runtime/host-tool-projection.js +5 -3
- package/lib/plugin-runtime/host-tool-projection.js.map +1 -1
- package/lib/plugin-runtime/index.d.ts +29 -1
- package/lib/plugin-runtime/index.d.ts.map +1 -1
- package/lib/plugin-runtime/index.js +26 -1
- package/lib/plugin-runtime/index.js.map +1 -1
- package/lib/plugin-runtime/native-bash-tool.d.ts +35 -0
- package/lib/plugin-runtime/native-bash-tool.d.ts.map +1 -0
- package/lib/plugin-runtime/native-bash-tool.js +110 -0
- package/lib/plugin-runtime/native-bash-tool.js.map +1 -0
- package/lib/plugin-runtime/native-file-tools.d.ts.map +1 -1
- package/lib/plugin-runtime/native-file-tools.js +10 -9
- package/lib/plugin-runtime/native-file-tools.js.map +1 -1
- package/lib/plugin-runtime/native-image-tool.d.ts +12 -0
- package/lib/plugin-runtime/native-image-tool.d.ts.map +1 -0
- package/lib/plugin-runtime/native-image-tool.js +73 -0
- package/lib/plugin-runtime/native-image-tool.js.map +1 -0
- package/lib/plugin-runtime/native-interaction-tools.js +1 -1
- package/lib/plugin-runtime/native-interaction-tools.js.map +1 -1
- package/lib/plugin-runtime/native-knowledge-tool.d.ts +34 -0
- package/lib/plugin-runtime/native-knowledge-tool.d.ts.map +1 -0
- package/lib/plugin-runtime/native-knowledge-tool.js +170 -0
- package/lib/plugin-runtime/native-knowledge-tool.js.map +1 -0
- package/lib/plugin-runtime/native-semantic-memory-tools.js +2 -2
- package/lib/plugin-runtime/native-semantic-memory-tools.js.map +1 -1
- package/lib/plugin-runtime/native-todo-tools.js +2 -2
- package/lib/plugin-runtime/native-todo-tools.js.map +1 -1
- package/lib/plugin-runtime/native-tool-suite.d.ts +15 -0
- package/lib/plugin-runtime/native-tool-suite.d.ts.map +1 -0
- package/lib/plugin-runtime/native-tool-suite.js +18 -0
- package/lib/plugin-runtime/native-tool-suite.js.map +1 -0
- package/lib/plugin-runtime/native-web-tools.d.ts.map +1 -1
- package/lib/plugin-runtime/native-web-tools.js +6 -19
- package/lib/plugin-runtime/native-web-tools.js.map +1 -1
- package/lib/plugin-runtime/schedule-capability-plan.js +6 -1
- package/lib/plugin-runtime/schedule-capability-plan.js.map +1 -1
- package/lib/plugin-runtime/self-delivery-project-composition.d.ts +25 -0
- package/lib/plugin-runtime/self-delivery-project-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/self-delivery-project-composition.js +85 -0
- package/lib/plugin-runtime/self-delivery-project-composition.js.map +1 -0
- package/lib/plugin-runtime/self-delivery-project.d.ts +65 -0
- package/lib/plugin-runtime/self-delivery-project.d.ts.map +1 -0
- package/lib/plugin-runtime/self-delivery-project.js +140 -0
- package/lib/plugin-runtime/self-delivery-project.js.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.js +7 -2
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.js.map +1 -1
- package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts +2 -0
- package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-acceptance-production-composition.js +1 -0
- package/lib/plugin-runtime/workroom-acceptance-production-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts +3 -0
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.js +43 -6
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts +1 -1
- package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts +3 -77
- package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-assignment-authority-provider.js +12 -112
- package/lib/plugin-runtime/workroom-assignment-authority-provider.js.map +1 -1
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts +1 -1
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.d.ts +2 -0
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.js +24 -0
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.js.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-bootstrap.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-bootstrap.js +19 -0
- package/lib/plugin-runtime/workroom-data-governance-bootstrap.js.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts +4 -38
- package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-runtime.js +145 -42
- package/lib/plugin-runtime/workroom-data-governance-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-storage.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-storage.js +1 -2
- package/lib/plugin-runtime/workroom-data-governance-storage.js.map +1 -1
- package/lib/plugin-runtime/workroom-delivery-gateway.d.ts +96 -0
- package/lib/plugin-runtime/workroom-delivery-gateway.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-delivery-gateway.js +129 -0
- package/lib/plugin-runtime/workroom-delivery-gateway.js.map +1 -0
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.js +2 -1
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.js.map +1 -1
- package/lib/plugin-runtime/workroom-effect-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-effect-composition.js +12 -1
- package/lib/plugin-runtime/workroom-effect-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-effect-production.d.ts +5 -0
- package/lib/plugin-runtime/workroom-effect-production.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-effect-production.js +22 -3
- package/lib/plugin-runtime/workroom-effect-production.js.map +1 -1
- package/lib/plugin-runtime/workroom-effect-runtime.d.ts +1 -17
- package/lib/plugin-runtime/workroom-effect-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-effect-runtime.js +77 -17
- package/lib/plugin-runtime/workroom-effect-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts +8 -3
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.js +21 -18
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts +1 -1
- package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-journal-payload-composition.js +1 -1
- package/lib/plugin-runtime/workroom-journal-payload-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.js +3 -3
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.js.map +1 -1
- package/lib/plugin-runtime/workroom-local-agent-loop.d.ts +2 -1
- package/lib/plugin-runtime/workroom-local-agent-loop.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-local-agent-loop.js +11 -1
- package/lib/plugin-runtime/workroom-local-agent-loop.js.map +1 -1
- package/lib/{workroom/local-assignment-executor.d.ts → plugin-runtime/workroom-local-assignment-executor.d.ts} +4 -4
- package/lib/plugin-runtime/workroom-local-assignment-executor.d.ts.map +1 -0
- package/lib/{workroom/local-assignment-executor.js → plugin-runtime/workroom-local-assignment-executor.js} +3 -3
- package/lib/plugin-runtime/workroom-local-assignment-executor.js.map +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-runtime.d.ts +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-local-assignment-runtime.js +72 -26
- package/lib/plugin-runtime/workroom-local-assignment-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts +1 -1
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-control-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-control-composition.js +1 -0
- package/lib/plugin-runtime/workroom-portfolio-control-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.d.ts +1 -0
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.js +1 -0
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts +1 -1
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.js +6 -3
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.js.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts +1 -1
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.js +11 -5
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.js.map +1 -1
- package/lib/plugin-runtime/workroom-preemption-runtime.d.ts +1 -1
- package/lib/plugin-runtime/workroom-preemption-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-priority-authority.d.ts +11 -3
- package/lib/plugin-runtime/workroom-priority-authority.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-priority-authority.js +51 -47
- package/lib/plugin-runtime/workroom-priority-authority.js.map +1 -1
- package/lib/plugin-runtime/workroom-profile-authority-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-profile-authority-composition.js +2 -1
- package/lib/plugin-runtime/workroom-profile-authority-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-profile-authority-runtime.d.ts +1 -0
- package/lib/plugin-runtime/workroom-profile-authority-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-profile-authority-runtime.js +1 -0
- package/lib/plugin-runtime/workroom-profile-authority-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-projection-outbound.d.ts +1 -1
- package/lib/plugin-runtime/workroom-projection-outbound.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-projection-runtime.d.ts +6 -4
- package/lib/plugin-runtime/workroom-projection-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-projection-runtime.js +11 -1
- package/lib/plugin-runtime/workroom-projection-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts +2 -2
- package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-remote-executor.d.ts +1 -12
- package/lib/plugin-runtime/workroom-remote-executor.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-remote-executor.js +1 -20
- package/lib/plugin-runtime/workroom-remote-executor.js.map +1 -1
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts +1 -1
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts +8 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.js +4 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts +4 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.js +23 -6
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.js.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.d.ts +5 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.js +20 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.js.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts +1 -1
- package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-runtime.js +6 -1
- package/lib/plugin-runtime/workroom-scheduler-runtime.js.map +1 -1
- package/lib/prompt/assembly.d.ts.map +1 -1
- package/lib/prompt/assembly.js +1 -2
- package/lib/prompt/assembly.js.map +1 -1
- package/lib/prompt/git-context.d.ts +0 -2
- package/lib/prompt/git-context.d.ts.map +1 -1
- package/lib/prompt/git-context.js +1 -12
- package/lib/prompt/git-context.js.map +1 -1
- package/lib/prompt/index.d.ts +1 -1
- package/lib/prompt/index.d.ts.map +1 -1
- package/lib/prompt/index.js +1 -1
- package/lib/prompt/index.js.map +1 -1
- package/lib/prompt/prompt-assembly-registry.d.ts +1 -1
- package/lib/prompt/prompt-assembly-registry.d.ts.map +1 -1
- package/lib/prompt/prompt-assembly-registry.js.map +1 -1
- package/lib/prompt/system-prompt.d.ts +1 -1
- package/lib/prompt/system-prompt.d.ts.map +1 -1
- package/lib/prompt/system-prompt.js +1 -2
- package/lib/prompt/system-prompt.js.map +1 -1
- package/lib/prompt/templates.d.ts +2 -5
- package/lib/prompt/templates.d.ts.map +1 -1
- package/lib/prompt/templates.js +2 -16
- package/lib/prompt/templates.js.map +1 -1
- package/lib/prompt/workspace-prompt.d.ts +0 -1
- package/lib/prompt/workspace-prompt.d.ts.map +1 -1
- package/lib/prompt/workspace-prompt.js +1 -14
- package/lib/prompt/workspace-prompt.js.map +1 -1
- package/lib/reserved-tools.d.ts.map +1 -1
- package/lib/reserved-tools.js +0 -3
- package/lib/reserved-tools.js.map +1 -1
- package/lib/resource-hub/hook-registry.d.ts +1 -1
- package/lib/resource-hub/hook-registry.d.ts.map +1 -1
- package/lib/resource-hub/hook-registry.js +3 -15
- package/lib/resource-hub/hook-registry.js.map +1 -1
- package/lib/resource-hub/index.d.ts +4 -16
- package/lib/resource-hub/index.d.ts.map +1 -1
- package/lib/resource-hub/index.js +3 -20
- package/lib/resource-hub/index.js.map +1 -1
- package/lib/resource-hub/mcp-registry.js +1 -1
- package/lib/resource-hub/mcp-registry.js.map +1 -1
- package/lib/resource-hub/public-api.d.ts +0 -1
- package/lib/resource-hub/public-api.d.ts.map +1 -1
- package/lib/resource-hub/resolve-subagent-tools.d.ts.map +1 -1
- package/lib/resource-hub/resolve-subagent-tools.js +6 -4
- package/lib/resource-hub/resolve-subagent-tools.js.map +1 -1
- package/lib/resource-hub/role-configs.js +4 -4
- package/lib/resource-hub/role-configs.js.map +1 -1
- package/lib/resource-hub/skill-registry.d.ts +1 -1
- package/lib/resource-hub/skill-registry.js +1 -1
- package/lib/resource-hub/subagent-registry.d.ts +0 -2
- package/lib/resource-hub/subagent-registry.d.ts.map +1 -1
- package/lib/resource-hub/subagent-registry.js +0 -2
- package/lib/resource-hub/subagent-registry.js.map +1 -1
- package/lib/resource-hub/tool-selection.d.ts +4 -30
- package/lib/resource-hub/tool-selection.d.ts.map +1 -1
- package/lib/resource-hub/tool-selection.js +4 -289
- package/lib/resource-hub/tool-selection.js.map +1 -1
- package/lib/resource-hub/types.d.ts +6 -1
- package/lib/resource-hub/types.d.ts.map +1 -1
- package/lib/routing/route-matcher.d.ts +1 -1
- package/lib/routing/route-matcher.js +1 -1
- package/lib/schedule-manager.d.ts.map +1 -1
- package/lib/schedule-manager.js.map +1 -1
- package/lib/seam/index.d.ts +4 -3
- package/lib/seam/index.d.ts.map +1 -1
- package/lib/seam/index.js +1 -1
- package/lib/seam/index.js.map +1 -1
- package/lib/seam/seam-integration.d.ts +26 -37
- package/lib/seam/seam-integration.d.ts.map +1 -1
- package/lib/seam/seam-integration.js +82 -52
- package/lib/seam/seam-integration.js.map +1 -1
- package/lib/seam/seam-provider.d.ts +2 -1
- package/lib/seam/seam-provider.d.ts.map +1 -1
- package/lib/seam/seam-provider.js +25 -11
- package/lib/seam/seam-provider.js.map +1 -1
- package/lib/seam/skill-service.d.ts +0 -21
- package/lib/seam/skill-service.d.ts.map +1 -1
- package/lib/seam/tokens.d.ts +3 -2
- package/lib/seam/tokens.d.ts.map +1 -1
- package/lib/seam/tokens.js +3 -1
- package/lib/seam/tokens.js.map +1 -1
- package/lib/seam/tool-service.d.ts +12 -6
- package/lib/seam/tool-service.d.ts.map +1 -1
- package/lib/security/anomaly-detection.d.ts +2 -7
- package/lib/security/anomaly-detection.d.ts.map +1 -1
- package/lib/security/anomaly-detection.js +2 -20
- package/lib/security/anomaly-detection.js.map +1 -1
- package/lib/security/audit-logger.d.ts +0 -13
- package/lib/security/audit-logger.d.ts.map +1 -1
- package/lib/security/audit-logger.js +0 -30
- package/lib/security/audit-logger.js.map +1 -1
- package/lib/security/comm-message-context.d.ts +4 -0
- package/lib/security/comm-message-context.d.ts.map +1 -1
- package/lib/security/comm-message-context.js +9 -1
- package/lib/security/comm-message-context.js.map +1 -1
- package/lib/security/dangerous-tool-policy.d.ts +3 -3
- package/lib/security/dangerous-tool-policy.d.ts.map +1 -1
- package/lib/security/dangerous-tool-policy.js +8 -28
- package/lib/security/dangerous-tool-policy.js.map +1 -1
- package/lib/security/exec-policy.d.ts +4 -4
- package/lib/security/exec-policy.d.ts.map +1 -1
- package/lib/security/exec-policy.js +21 -62
- package/lib/security/exec-policy.js.map +1 -1
- package/lib/security/file-policy.d.ts.map +1 -1
- package/lib/security/file-policy.js +9 -57
- package/lib/security/file-policy.js.map +1 -1
- package/lib/security/file-role-policy.d.ts +1 -5
- package/lib/security/file-role-policy.d.ts.map +1 -1
- package/lib/security/file-role-policy.js +1 -25
- package/lib/security/file-role-policy.js.map +1 -1
- package/lib/security/index.d.ts +1 -1
- package/lib/security/index.d.ts.map +1 -1
- package/lib/security/index.js +1 -1
- package/lib/security/index.js.map +1 -1
- package/lib/security/owner-approval-contracts.d.ts +6 -0
- package/lib/security/owner-approval-contracts.d.ts.map +1 -0
- package/lib/security/owner-approval-contracts.js +2 -0
- package/lib/security/owner-approval-contracts.js.map +1 -0
- package/lib/security/owner-approval-runtime.d.ts +39 -0
- package/lib/security/owner-approval-runtime.d.ts.map +1 -0
- package/lib/security/owner-approval-runtime.js +159 -0
- package/lib/security/owner-approval-runtime.js.map +1 -0
- package/lib/security/owner-approval-store.d.ts +34 -0
- package/lib/security/owner-approval-store.d.ts.map +1 -0
- package/lib/security/owner-approval-store.js +154 -0
- package/lib/security/owner-approval-store.js.map +1 -0
- package/lib/security/policy-facade.d.ts +8 -15
- package/lib/security/policy-facade.d.ts.map +1 -1
- package/lib/security/policy-facade.js +33 -38
- package/lib/security/policy-facade.js.map +1 -1
- package/lib/security/sandbox.d.ts +0 -13
- package/lib/security/sandbox.d.ts.map +1 -1
- package/lib/security/sandbox.js +0 -21
- package/lib/security/sandbox.js.map +1 -1
- package/lib/security/turn-file-authority.d.ts.map +1 -1
- package/lib/security/turn-file-authority.js +0 -1
- package/lib/security/turn-file-authority.js.map +1 -1
- package/lib/service.d.ts +15 -19
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +42 -39
- package/lib/service.js.map +1 -1
- package/lib/session/approval-port.d.ts +16 -0
- package/lib/session/approval-port.d.ts.map +1 -1
- package/lib/session/approval-port.js.map +1 -1
- package/lib/session/approval-review-agent.d.ts +29 -0
- package/lib/session/approval-review-agent.d.ts.map +1 -0
- package/lib/session/approval-review-agent.js +183 -0
- package/lib/session/approval-review-agent.js.map +1 -0
- package/lib/session/branch-summarization-runtime.d.ts.map +1 -1
- package/lib/session/branch-summarization-runtime.js +3 -2
- package/lib/session/branch-summarization-runtime.js.map +1 -1
- package/lib/session/index.d.ts +2 -2
- package/lib/session/index.d.ts.map +1 -1
- package/lib/session/index.js +2 -2
- package/lib/session/index.js.map +1 -1
- package/lib/session/session-io.d.ts +7 -14
- package/lib/session/session-io.d.ts.map +1 -1
- package/lib/session/session-io.js +14 -47
- package/lib/session/session-io.js.map +1 -1
- package/lib/session/turn-ingress-session.d.ts +2 -5
- package/lib/session/turn-ingress-session.d.ts.map +1 -1
- package/lib/session/turn-ingress-session.js +8 -51
- package/lib/session/turn-ingress-session.js.map +1 -1
- package/lib/skill/skill-instruction-reader-factory.d.ts +5 -0
- package/lib/skill/skill-instruction-reader-factory.d.ts.map +1 -0
- package/lib/skill/skill-instruction-reader-factory.js +13 -0
- package/lib/skill/skill-instruction-reader-factory.js.map +1 -0
- package/lib/skill/skill-instruction-reader.d.ts +22 -0
- package/lib/skill/skill-instruction-reader.d.ts.map +1 -0
- package/lib/skill/skill-instruction-reader.js +44 -0
- package/lib/skill/skill-instruction-reader.js.map +1 -0
- package/lib/skill/skill-instructions.d.ts +5 -0
- package/lib/skill/skill-instructions.d.ts.map +1 -0
- package/lib/skill/skill-instructions.js +78 -0
- package/lib/skill/skill-instructions.js.map +1 -0
- package/lib/skill/skill-registry-as-service.d.ts +5 -5
- package/lib/skill/skill-registry-as-service.d.ts.map +1 -1
- package/lib/skill/skill-registry-as-service.js +21 -16
- package/lib/skill/skill-registry-as-service.js.map +1 -1
- package/lib/skill/skill-system.js +3 -3
- package/lib/skill/skill-system.js.map +1 -1
- package/lib/{builtin → spawn}/spawn-task-tool.d.ts +5 -6
- package/lib/spawn/spawn-task-tool.d.ts.map +1 -0
- package/lib/{builtin → spawn}/spawn-task-tool.js +17 -15
- package/lib/spawn/spawn-task-tool.js.map +1 -0
- package/lib/stability/memory-pressure.d.ts +5 -4
- package/lib/stability/memory-pressure.d.ts.map +1 -1
- package/lib/stability/memory-pressure.js +14 -23
- package/lib/stability/memory-pressure.js.map +1 -1
- package/lib/standalone/standalone-tool-catalog.d.ts +13 -0
- package/lib/standalone/standalone-tool-catalog.d.ts.map +1 -0
- package/lib/standalone/standalone-tool-catalog.js +46 -0
- package/lib/standalone/standalone-tool-catalog.js.map +1 -0
- package/lib/subagent/subagent-runtime.d.ts +7 -5
- package/lib/subagent/subagent-runtime.d.ts.map +1 -1
- package/lib/subagent/subagent-runtime.js +13 -16
- package/lib/subagent/subagent-runtime.js.map +1 -1
- package/lib/subagent/subagent-system-init.d.ts +2 -1
- package/lib/subagent/subagent-system-init.d.ts.map +1 -1
- package/lib/subagent/subagent-system-init.js +1 -0
- package/lib/subagent/subagent-system-init.js.map +1 -1
- package/lib/subagent-ai-events.d.ts +3 -2
- package/lib/subagent-ai-events.d.ts.map +1 -1
- package/lib/subagent-ai-events.js.map +1 -1
- package/lib/subagent-parent-context.js +1 -1
- package/lib/subagent-parent-context.js.map +1 -1
- package/lib/subagent-prompt.d.ts +1 -1
- package/lib/subagent-prompt.js +2 -5
- package/lib/subagent-prompt.js.map +1 -1
- package/lib/task-executor.d.ts +2 -14
- package/lib/task-executor.d.ts.map +1 -1
- package/lib/task-executor.js +2 -11
- package/lib/task-executor.js.map +1 -1
- package/lib/tool/builtin-policy-extractors.d.ts +2 -1
- package/lib/tool/builtin-policy-extractors.d.ts.map +1 -1
- package/lib/tool/builtin-policy-extractors.js +18 -15
- package/lib/tool/builtin-policy-extractors.js.map +1 -1
- package/lib/tool/context-tools.js +1 -1
- package/lib/tool/context-tools.js.map +1 -1
- package/lib/tool/conversation-reference-tool.d.ts.map +1 -1
- package/lib/tool/conversation-reference-tool.js +1 -1
- package/lib/tool/conversation-reference-tool.js.map +1 -1
- package/lib/tool/deferred-resolution.js +2 -2
- package/lib/tool/deferred-resolution.js.map +1 -1
- package/lib/tool/executable-tool-registry.d.ts +11 -0
- package/lib/tool/executable-tool-registry.d.ts.map +1 -0
- package/lib/tool/executable-tool-registry.js +25 -0
- package/lib/tool/executable-tool-registry.js.map +1 -0
- package/lib/tool/index.d.ts +1 -1
- package/lib/tool/index.d.ts.map +1 -1
- package/lib/tool/index.js +1 -1
- package/lib/tool/index.js.map +1 -1
- package/lib/tool/prepare-turn-tools.d.ts.map +1 -1
- package/lib/tool/prepare-turn-tools.js +1 -2
- package/lib/tool/prepare-turn-tools.js.map +1 -1
- package/lib/tool/sources.d.ts.map +1 -1
- package/lib/tool/sources.js +5 -4
- package/lib/tool/sources.js.map +1 -1
- package/lib/tool/tool-approval-gate.d.ts +1 -2
- package/lib/tool/tool-approval-gate.d.ts.map +1 -1
- package/lib/tool/tool-approval-gate.js +24 -0
- package/lib/tool/tool-approval-gate.js.map +1 -1
- package/lib/tool/tool-execution-authority.d.ts +26 -0
- package/lib/tool/tool-execution-authority.d.ts.map +1 -0
- package/lib/tool/tool-execution-authority.js +84 -0
- package/lib/tool/tool-execution-authority.js.map +1 -0
- package/lib/tool/tool-runtime.d.ts +10 -9
- package/lib/tool/tool-runtime.d.ts.map +1 -1
- package/lib/tool/tool-runtime.js +77 -79
- package/lib/tool/tool-runtime.js.map +1 -1
- package/lib/tool/tool-system.js +1 -1
- package/lib/tool/tool-system.js.map +1 -1
- package/lib/tool/turn-tool-runtime.d.ts +6 -2
- package/lib/tool/turn-tool-runtime.d.ts.map +1 -1
- package/lib/tool/turn-tool-runtime.js +19 -5
- package/lib/tool/turn-tool-runtime.js.map +1 -1
- package/lib/tool-catalog/deferred-turn-controller.d.ts +2 -2
- package/lib/tool-catalog/deferred-turn-controller.d.ts.map +1 -1
- package/lib/tool-catalog/deferred-turn-controller.js +4 -4
- package/lib/tool-catalog/deferred-turn-controller.js.map +1 -1
- package/lib/turn/deferred-auto-continue.js +1 -1
- package/lib/turn/deferred-auto-continue.js.map +1 -1
- package/lib/turn/deferred-delivery.js +1 -1
- package/lib/turn/deferred-delivery.js.map +1 -1
- package/lib/turn/inbound-media.d.ts +8 -1
- package/lib/turn/inbound-media.d.ts.map +1 -1
- package/lib/turn/inbound-media.js +4 -6
- package/lib/turn/inbound-media.js.map +1 -1
- package/lib/turn/index.d.ts +2 -2
- package/lib/turn/index.d.ts.map +1 -1
- package/lib/turn/index.js +2 -2
- package/lib/turn/index.js.map +1 -1
- package/lib/turn/persist-deferred-context.js +1 -1
- package/lib/turn/prompt-api.d.ts +3 -4
- package/lib/turn/prompt-api.d.ts.map +1 -1
- package/lib/turn/prompt-api.js +7 -11
- package/lib/turn/prompt-api.js.map +1 -1
- package/lib/turn/task-continuation.d.ts +0 -5
- package/lib/turn/task-continuation.d.ts.map +1 -1
- package/lib/turn/task-continuation.js +0 -15
- package/lib/turn/task-continuation.js.map +1 -1
- package/lib/turn/turn-ingress.d.ts +1 -1
- package/lib/turn/turn-ingress.d.ts.map +1 -1
- package/lib/turn/turn-metrics.d.ts +0 -4
- package/lib/turn/turn-metrics.d.ts.map +1 -1
- package/lib/turn/turn-metrics.js +0 -8
- package/lib/turn/turn-metrics.js.map +1 -1
- package/lib/turn/turn-pipeline.js +7 -4
- package/lib/turn/turn-pipeline.js.map +1 -1
- package/lib/typing-indicator/adapter-integration.d.ts +1 -4
- package/lib/typing-indicator/adapter-integration.d.ts.map +1 -1
- package/lib/typing-indicator/adapter-integration.js.map +1 -1
- package/lib/typing-indicator/index.d.ts +0 -17
- package/lib/typing-indicator/index.d.ts.map +1 -1
- package/lib/typing-indicator/index.js +0 -31
- package/lib/typing-indicator/index.js.map +1 -1
- package/lib/user-profile.js +1 -1
- package/lib/user-profile.js.map +1 -1
- package/lib/utils/config-env.d.ts +1 -1
- package/lib/utils/config-env.js +1 -1
- package/lib/web/bing-search-html.d.ts.map +1 -0
- package/lib/{builtin → web}/bing-search-html.js +2 -6
- package/lib/web/bing-search-html.js.map +1 -0
- package/lib/web/web-search-locale.d.ts +5 -0
- package/lib/web/web-search-locale.d.ts.map +1 -0
- package/lib/web/web-search-locale.js +13 -0
- package/lib/web/web-search-locale.js.map +1 -0
- package/lib/{builtin → web}/web-tool-utils.d.ts +0 -1
- package/lib/web/web-tool-utils.d.ts.map +1 -0
- package/lib/{builtin → web}/web-tool-utils.js +0 -1
- package/lib/web/web-tool-utils.js.map +1 -0
- package/lib/workroom/acceptance-control.d.ts +2 -1
- package/lib/workroom/acceptance-control.d.ts.map +1 -1
- package/lib/workroom/acceptance-control.js +12 -2
- package/lib/workroom/acceptance-control.js.map +1 -1
- package/lib/workroom/accepted-source-memory-application.d.ts +1 -1
- package/lib/workroom/accepted-source-memory-application.d.ts.map +1 -1
- package/lib/workroom/assignment-authority-grant-application.d.ts +2 -2
- package/lib/workroom/assignment-authority-grant-application.d.ts.map +1 -1
- package/lib/workroom/assignment-authority-grant-application.js +1 -1
- package/lib/workroom/assignment-authority-grant-application.js.map +1 -1
- package/lib/workroom/assignment-authority-grant-repository.d.ts +3 -2
- package/lib/workroom/assignment-authority-grant-repository.d.ts.map +1 -1
- package/lib/workroom/assignment-authority-grant-repository.js +3 -1
- package/lib/workroom/assignment-authority-grant-repository.js.map +1 -1
- package/lib/workroom/assignment-authority.d.ts +75 -0
- package/lib/workroom/assignment-authority.d.ts.map +1 -0
- package/lib/workroom/assignment-authority.js +179 -0
- package/lib/workroom/assignment-authority.js.map +1 -0
- package/lib/workroom/catalog-definition.d.ts +0 -6
- package/lib/workroom/catalog-definition.d.ts.map +1 -1
- package/lib/workroom/catalog.js +1 -1
- package/lib/workroom/catalog.js.map +1 -1
- package/lib/workroom/coding-assignment-executor.d.ts +90 -0
- package/lib/workroom/coding-assignment-executor.d.ts.map +1 -0
- package/lib/workroom/coding-assignment-executor.js +250 -0
- package/lib/workroom/coding-assignment-executor.js.map +1 -0
- package/lib/workroom/coding-git-objects.d.ts +17 -0
- package/lib/workroom/coding-git-objects.d.ts.map +1 -0
- package/lib/workroom/coding-git-objects.js +68 -0
- package/lib/workroom/coding-git-objects.js.map +1 -0
- package/lib/workroom/durable-file-store.d.ts +2 -0
- package/lib/workroom/durable-file-store.d.ts.map +1 -1
- package/lib/workroom/durable-file-store.js +5 -0
- package/lib/workroom/durable-file-store.js.map +1 -1
- package/lib/workroom/effect-blocker-repository.d.ts +17 -1
- package/lib/workroom/effect-blocker-repository.d.ts.map +1 -1
- package/lib/workroom/effect-blocker-repository.js.map +1 -1
- package/lib/workroom/effect-ledger.d.ts +21 -1
- package/lib/workroom/effect-ledger.d.ts.map +1 -1
- package/lib/workroom/effect-ledger.js +44 -3
- package/lib/workroom/effect-ledger.js.map +1 -1
- package/lib/workroom/file-accepted-source-memory-repository.d.ts.map +1 -1
- package/lib/workroom/file-accepted-source-memory-repository.js +6 -3
- package/lib/workroom/file-accepted-source-memory-repository.js.map +1 -1
- package/lib/workroom/file-coding-execution-store.d.ts +25 -0
- package/lib/workroom/file-coding-execution-store.d.ts.map +1 -0
- package/lib/workroom/file-coding-execution-store.js +122 -0
- package/lib/workroom/file-coding-execution-store.js.map +1 -0
- package/lib/workroom/file-effect-ledger.d.ts.map +1 -1
- package/lib/workroom/file-effect-ledger.js +6 -3
- package/lib/workroom/file-effect-ledger.js.map +1 -1
- package/lib/workroom/git-workspace-gateway.d.ts +6 -3
- package/lib/workroom/git-workspace-gateway.d.ts.map +1 -1
- package/lib/workroom/git-workspace-gateway.js +10 -1
- package/lib/workroom/git-workspace-gateway.js.map +1 -1
- package/lib/workroom/github-workspace-transport.d.ts +30 -0
- package/lib/workroom/github-workspace-transport.d.ts.map +1 -0
- package/lib/workroom/github-workspace-transport.js +224 -0
- package/lib/workroom/github-workspace-transport.js.map +1 -0
- package/lib/{plugin-runtime/workroom-governed-dispatch-reasons.d.ts → workroom/governed-dispatch-reasons.d.ts} +2 -2
- package/lib/workroom/governed-dispatch-reasons.d.ts.map +1 -0
- package/lib/{plugin-runtime/workroom-governed-dispatch-reasons.js → workroom/governed-dispatch-reasons.js} +1 -1
- package/lib/workroom/governed-dispatch-reasons.js.map +1 -0
- package/lib/workroom/human-ingress-orchestrator.d.ts.map +1 -1
- package/lib/workroom/human-ingress-orchestrator.js +29 -1
- package/lib/workroom/human-ingress-orchestrator.js.map +1 -1
- package/lib/workroom/human-ingress-source-reader.d.ts +3 -3
- package/lib/workroom/human-ingress-source-reader.d.ts.map +1 -1
- package/lib/workroom/human-ingress-source-reader.js.map +1 -1
- package/lib/workroom/journal/activatable-journal.d.ts +15 -0
- package/lib/workroom/journal/activatable-journal.d.ts.map +1 -0
- package/lib/workroom/journal/activatable-journal.js +39 -0
- package/lib/workroom/journal/activatable-journal.js.map +1 -0
- package/lib/workroom/{journal.d.ts → journal/contracts.d.ts} +19 -95
- package/lib/workroom/journal/contracts.d.ts.map +1 -0
- package/lib/workroom/journal/contracts.js +19 -0
- package/lib/workroom/journal/contracts.js.map +1 -0
- package/lib/workroom/journal/database-journal.d.ts +31 -0
- package/lib/workroom/journal/database-journal.d.ts.map +1 -0
- package/lib/workroom/journal/database-journal.js +118 -0
- package/lib/workroom/journal/database-journal.js.map +1 -0
- package/lib/workroom/journal/event-codec.d.ts +26 -0
- package/lib/workroom/journal/event-codec.d.ts.map +1 -0
- package/lib/workroom/journal/event-codec.js +233 -0
- package/lib/workroom/journal/event-codec.js.map +1 -0
- package/lib/workroom/journal/event-validation.d.ts +10 -0
- package/lib/workroom/journal/event-validation.d.ts.map +1 -0
- package/lib/workroom/journal/event-validation.js +671 -0
- package/lib/workroom/journal/event-validation.js.map +1 -0
- package/lib/workroom/journal/file-journal.d.ts +15 -0
- package/lib/workroom/journal/file-journal.d.ts.map +1 -0
- package/lib/workroom/journal/file-journal.js +272 -0
- package/lib/workroom/journal/file-journal.js.map +1 -0
- package/lib/workroom/journal/index.d.ts +9 -0
- package/lib/workroom/journal/index.d.ts.map +1 -0
- package/lib/workroom/journal/index.js +8 -0
- package/lib/workroom/journal/index.js.map +1 -0
- package/lib/workroom/journal/memory-journal.d.ts +27 -0
- package/lib/workroom/journal/memory-journal.d.ts.map +1 -0
- package/lib/workroom/journal/memory-journal.js +103 -0
- package/lib/workroom/journal/memory-journal.js.map +1 -0
- package/lib/workroom/journal/payload-governance.d.ts +29 -0
- package/lib/workroom/journal/payload-governance.d.ts.map +1 -0
- package/lib/workroom/journal/payload-governance.js +282 -0
- package/lib/workroom/journal/payload-governance.js.map +1 -0
- package/lib/workroom/journal/payload-reference.d.ts +9 -0
- package/lib/workroom/journal/payload-reference.d.ts.map +1 -0
- package/lib/workroom/journal/payload-reference.js +60 -0
- package/lib/workroom/journal/payload-reference.js.map +1 -0
- package/lib/workroom/journal/stored-event-projection.d.ts +6 -0
- package/lib/workroom/journal/stored-event-projection.d.ts.map +1 -0
- package/lib/workroom/journal/stored-event-projection.js +280 -0
- package/lib/workroom/journal/stored-event-projection.js.map +1 -0
- package/lib/workroom/kernel-state.d.ts.map +1 -1
- package/lib/workroom/kernel-state.js +35 -3
- package/lib/workroom/kernel-state.js.map +1 -1
- package/lib/workroom/{projection-outbox.d.ts → projection-outbox/contracts.d.ts} +8 -72
- package/lib/workroom/projection-outbox/contracts.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/contracts.js +11 -0
- package/lib/workroom/projection-outbox/contracts.js.map +1 -0
- package/lib/workroom/projection-outbox/delivery-worker.d.ts +22 -0
- package/lib/workroom/projection-outbox/delivery-worker.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/delivery-worker.js +96 -0
- package/lib/workroom/projection-outbox/delivery-worker.js.map +1 -0
- package/lib/workroom/projection-outbox/file-repository.d.ts +11 -0
- package/lib/workroom/projection-outbox/file-repository.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/file-repository.js +89 -0
- package/lib/workroom/projection-outbox/file-repository.js.map +1 -0
- package/lib/workroom/projection-outbox/index.d.ts +10 -0
- package/lib/workroom/projection-outbox/index.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/index.js +8 -0
- package/lib/workroom/projection-outbox/index.js.map +1 -0
- package/lib/workroom/projection-outbox/memory-repository.d.ts +11 -0
- package/lib/workroom/projection-outbox/memory-repository.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/memory-repository.js +40 -0
- package/lib/workroom/projection-outbox/memory-repository.js.map +1 -0
- package/lib/workroom/projection-outbox/projector.d.ts +36 -0
- package/lib/workroom/projection-outbox/projector.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/projector.js +517 -0
- package/lib/workroom/projection-outbox/projector.js.map +1 -0
- package/lib/workroom/projection-outbox/repository-state.d.ts +17 -0
- package/lib/workroom/projection-outbox/repository-state.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/repository-state.js +343 -0
- package/lib/workroom/projection-outbox/repository-state.js.map +1 -0
- package/lib/workroom/projection-outbox/tracer.d.ts +19 -0
- package/lib/workroom/projection-outbox/tracer.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/tracer.js +201 -0
- package/lib/workroom/projection-outbox/tracer.js.map +1 -0
- package/lib/workroom/remote-dispatch-admission.d.ts +2 -2
- package/lib/workroom/remote-dispatch-admission.d.ts.map +1 -1
- package/lib/workroom/remote-dispatch-admission.js +1 -1
- package/lib/workroom/remote-dispatch-admission.js.map +1 -1
- package/lib/workroom/remote-dispatch-worker.d.ts +1 -1
- package/lib/workroom/remote-dispatch-worker.d.ts.map +1 -1
- package/lib/workroom/remote-dispatch-worker.js +1 -1
- package/lib/workroom/remote-dispatch-worker.js.map +1 -1
- package/lib/workroom/remote-executor.d.ts +15 -0
- package/lib/workroom/remote-executor.d.ts.map +1 -0
- package/lib/workroom/remote-executor.js +21 -0
- package/lib/workroom/remote-executor.js.map +1 -0
- package/lib/workroom/runtime.d.ts +1 -1
- package/lib/workroom/runtime.d.ts.map +1 -1
- package/lib/workroom/software-delivery-plan.d.ts +32 -0
- package/lib/workroom/software-delivery-plan.d.ts.map +1 -0
- package/lib/workroom/software-delivery-plan.js +60 -0
- package/lib/workroom/software-delivery-plan.js.map +1 -0
- package/lib/workroom/validate-catalog.d.ts +2 -0
- package/lib/workroom/validate-catalog.d.ts.map +1 -0
- package/lib/workroom/validate-catalog.js +230 -0
- package/lib/workroom/validate-catalog.js.map +1 -0
- package/lib/workroom/workroom-kernel.d.ts +11 -1
- package/lib/workroom/workroom-kernel.d.ts.map +1 -1
- package/lib/workroom/workroom-kernel.js +102 -30
- package/lib/workroom/workroom-kernel.js.map +1 -1
- package/lib/workroom/workroom-preemption.d.ts +1 -1
- package/lib/workroom/workroom-preemption.d.ts.map +1 -1
- package/lib/workroom/workroom-scheduler-application.d.ts +1 -1
- package/lib/workroom/workroom-scheduler-application.d.ts.map +1 -1
- package/lib/workroom/workroom-scheduler-application.js +1 -1
- package/lib/workroom/workroom-scheduler-application.js.map +1 -1
- package/lib/workroom/workroom-scheduler.js +3 -0
- package/lib/workroom/workroom-scheduler.js.map +1 -1
- package/lib/zhin-agent/index.d.ts +12 -6
- package/lib/zhin-agent/index.d.ts.map +1 -1
- package/lib/zhin-agent/index.js +18 -12
- package/lib/zhin-agent/index.js.map +1 -1
- package/package.json +14 -29
- package/lib/activity-feedback/ai-bus.d.ts +0 -21
- package/lib/activity-feedback/ai-bus.d.ts.map +0 -1
- package/lib/activity-feedback/ai-bus.js +0 -59
- package/lib/activity-feedback/ai-bus.js.map +0 -1
- package/lib/ai-hook-handlers.d.ts +0 -8
- package/lib/ai-hook-handlers.d.ts.map +0 -1
- package/lib/ai-hook-handlers.js +0 -46
- package/lib/ai-hook-handlers.js.map +0 -1
- package/lib/authoring/define-agent.d.ts +0 -4
- package/lib/authoring/define-agent.d.ts.map +0 -1
- package/lib/authoring/define-agent.js +0 -8
- package/lib/authoring/define-agent.js.map +0 -1
- package/lib/authoring/define-connection.d.ts +0 -5
- package/lib/authoring/define-connection.d.ts.map +0 -1
- package/lib/authoring/define-connection.js +0 -8
- package/lib/authoring/define-connection.js.map +0 -1
- package/lib/authoring/define-schedule.d.ts +0 -4
- package/lib/authoring/define-schedule.d.ts.map +0 -1
- package/lib/authoring/define-schedule.js +0 -8
- package/lib/authoring/define-schedule.js.map +0 -1
- package/lib/authoring/define-tool.d.ts +0 -20
- package/lib/authoring/define-tool.d.ts.map +0 -1
- package/lib/authoring/define-tool.js +0 -28
- package/lib/authoring/define-tool.js.map +0 -1
- package/lib/authoring/entries/connections.d.ts +0 -3
- package/lib/authoring/entries/connections.d.ts.map +0 -1
- package/lib/authoring/entries/connections.js +0 -2
- package/lib/authoring/entries/connections.js.map +0 -1
- package/lib/authoring/entries/schedules.d.ts +0 -3
- package/lib/authoring/entries/schedules.d.ts.map +0 -1
- package/lib/authoring/entries/schedules.js +0 -2
- package/lib/authoring/entries/schedules.js.map +0 -1
- package/lib/authoring/entries/tools.d.ts +0 -5
- package/lib/authoring/entries/tools.d.ts.map +0 -1
- package/lib/authoring/entries/tools.js +0 -3
- package/lib/authoring/entries/tools.js.map +0 -1
- package/lib/authoring/tool-policy.d.ts +0 -3
- package/lib/authoring/tool-policy.d.ts.map +0 -1
- package/lib/authoring/tool-policy.js +0 -2
- package/lib/authoring/tool-policy.js.map +0 -1
- package/lib/authoring/zod-schema.d.ts +0 -10
- package/lib/authoring/zod-schema.d.ts.map +0 -1
- package/lib/authoring/zod-schema.js +0 -7
- package/lib/authoring/zod-schema.js.map +0 -1
- package/lib/builtin/analyze-media-tool.d.ts +0 -13
- package/lib/builtin/analyze-media-tool.d.ts.map +0 -1
- package/lib/builtin/analyze-media-tool.js +0 -94
- package/lib/builtin/analyze-media-tool.js.map +0 -1
- package/lib/builtin/bash-tool.d.ts +0 -29
- package/lib/builtin/bash-tool.d.ts.map +0 -1
- package/lib/builtin/bash-tool.js +0 -107
- package/lib/builtin/bash-tool.js.map +0 -1
- package/lib/builtin/bing-search-html.d.ts.map +0 -1
- package/lib/builtin/bing-search-html.js.map +0 -1
- package/lib/builtin/builtin-base-tool.d.ts +0 -27
- package/lib/builtin/builtin-base-tool.d.ts.map +0 -1
- package/lib/builtin/builtin-base-tool.js +0 -35
- package/lib/builtin/builtin-base-tool.js.map +0 -1
- package/lib/builtin/edit-file-tool.d.ts +0 -13
- package/lib/builtin/edit-file-tool.d.ts.map +0 -1
- package/lib/builtin/edit-file-tool.js +0 -86
- package/lib/builtin/edit-file-tool.js.map +0 -1
- package/lib/builtin/file-edit-quote-utils.d.ts.map +0 -1
- package/lib/builtin/file-edit-quote-utils.js.map +0 -1
- package/lib/builtin/five-agent/index.d.ts.map +0 -1
- package/lib/builtin/five-agent/index.js.map +0 -1
- package/lib/builtin/five-agent/prompts.d.ts.map +0 -1
- package/lib/builtin/five-agent/prompts.js.map +0 -1
- package/lib/builtin/five-agent/role-capability-policy.d.ts.map +0 -1
- package/lib/builtin/five-agent/role-capability-policy.js.map +0 -1
- package/lib/builtin/five-agent/roles.d.ts.map +0 -1
- package/lib/builtin/five-agent/roles.js.map +0 -1
- package/lib/builtin/generate-image-tool.d.ts +0 -21
- package/lib/builtin/generate-image-tool.d.ts.map +0 -1
- package/lib/builtin/generate-image-tool.js +0 -138
- package/lib/builtin/generate-image-tool.js.map +0 -1
- package/lib/builtin/glob-tool.d.ts +0 -23
- package/lib/builtin/glob-tool.d.ts.map +0 -1
- package/lib/builtin/glob-tool.js +0 -53
- package/lib/builtin/glob-tool.js.map +0 -1
- package/lib/builtin/grep-tool.d.ts +0 -23
- package/lib/builtin/grep-tool.d.ts.map +0 -1
- package/lib/builtin/grep-tool.js +0 -121
- package/lib/builtin/grep-tool.js.map +0 -1
- package/lib/builtin/install-skill-tool.d.ts +0 -24
- package/lib/builtin/install-skill-tool.d.ts.map +0 -1
- package/lib/builtin/install-skill-tool.js +0 -76
- package/lib/builtin/install-skill-tool.js.map +0 -1
- package/lib/builtin/knowledge-search-tool.d.ts +0 -6
- package/lib/builtin/knowledge-search-tool.d.ts.map +0 -1
- package/lib/builtin/knowledge-search-tool.js +0 -184
- package/lib/builtin/knowledge-search-tool.js.map +0 -1
- package/lib/builtin/list-dir-tool.d.ts +0 -13
- package/lib/builtin/list-dir-tool.d.ts.map +0 -1
- package/lib/builtin/list-dir-tool.js +0 -57
- package/lib/builtin/list-dir-tool.js.map +0 -1
- package/lib/builtin/load-skill-tool.d.ts +0 -20
- package/lib/builtin/load-skill-tool.d.ts.map +0 -1
- package/lib/builtin/load-skill-tool.js +0 -60
- package/lib/builtin/load-skill-tool.js.map +0 -1
- package/lib/builtin/read-file-tool.d.ts +0 -14
- package/lib/builtin/read-file-tool.d.ts.map +0 -1
- package/lib/builtin/read-file-tool.js +0 -74
- package/lib/builtin/read-file-tool.js.map +0 -1
- package/lib/builtin/run-deferred-task-tool.d.ts +0 -23
- package/lib/builtin/run-deferred-task-tool.d.ts.map +0 -1
- package/lib/builtin/run-deferred-task-tool.js +0 -41
- package/lib/builtin/run-deferred-task-tool.js.map +0 -1
- package/lib/builtin/spawn-task-tool.d.ts.map +0 -1
- package/lib/builtin/spawn-task-tool.js.map +0 -1
- package/lib/builtin/todo-read-tool.d.ts +0 -14
- package/lib/builtin/todo-read-tool.d.ts.map +0 -1
- package/lib/builtin/todo-read-tool.js +0 -56
- package/lib/builtin/todo-read-tool.js.map +0 -1
- package/lib/builtin/todo-write-tool.d.ts +0 -14
- package/lib/builtin/todo-write-tool.d.ts.map +0 -1
- package/lib/builtin/todo-write-tool.js +0 -54
- package/lib/builtin/todo-write-tool.js.map +0 -1
- package/lib/builtin/web-fetch-tool.d.ts +0 -21
- package/lib/builtin/web-fetch-tool.d.ts.map +0 -1
- package/lib/builtin/web-fetch-tool.js +0 -86
- package/lib/builtin/web-fetch-tool.js.map +0 -1
- package/lib/builtin/web-search-locale.d.ts +0 -16
- package/lib/builtin/web-search-locale.d.ts.map +0 -1
- package/lib/builtin/web-search-locale.js +0 -74
- package/lib/builtin/web-search-locale.js.map +0 -1
- package/lib/builtin/web-search-tool.d.ts +0 -20
- package/lib/builtin/web-search-tool.d.ts.map +0 -1
- package/lib/builtin/web-search-tool.js +0 -115
- package/lib/builtin/web-search-tool.js.map +0 -1
- package/lib/builtin/web-tool-utils.d.ts.map +0 -1
- package/lib/builtin/web-tool-utils.js.map +0 -1
- package/lib/builtin/write-file-tool.d.ts +0 -13
- package/lib/builtin/write-file-tool.d.ts.map +0 -1
- package/lib/builtin/write-file-tool.js +0 -55
- package/lib/builtin/write-file-tool.js.map +0 -1
- package/lib/builtin-tools.d.ts +0 -25
- package/lib/builtin-tools.d.ts.map +0 -1
- package/lib/builtin-tools.js +0 -54
- package/lib/builtin-tools.js.map +0 -1
- package/lib/defaults/hooks.d.ts +0 -6
- package/lib/defaults/hooks.d.ts.map +0 -1
- package/lib/defaults/hooks.js +0 -9
- package/lib/defaults/hooks.js.map +0 -1
- package/lib/defaults/subagents.d.ts +0 -6
- package/lib/defaults/subagents.d.ts.map +0 -1
- package/lib/defaults/subagents.js +0 -23
- package/lib/defaults/subagents.js.map +0 -1
- package/lib/defaults/tools.d.ts +0 -5
- package/lib/defaults/tools.d.ts.map +0 -1
- package/lib/defaults/tools.js +0 -6
- package/lib/defaults/tools.js.map +0 -1
- package/lib/discovery/index.d.ts +0 -5
- package/lib/discovery/index.d.ts.map +0 -1
- package/lib/discovery/index.js +0 -5
- package/lib/discovery/index.js.map +0 -1
- package/lib/discovery/skills.d.ts +0 -53
- package/lib/discovery/skills.d.ts.map +0 -1
- package/lib/discovery/skills.js +0 -306
- package/lib/discovery/skills.js.map +0 -1
- package/lib/discovery/tools.d.ts +0 -53
- package/lib/discovery/tools.d.ts.map +0 -1
- package/lib/discovery/tools.js +0 -305
- package/lib/discovery/tools.js.map +0 -1
- package/lib/features/agent-feature.d.ts +0 -23
- package/lib/features/agent-feature.d.ts.map +0 -1
- package/lib/features/agent-feature.js +0 -51
- package/lib/features/agent-feature.js.map +0 -1
- package/lib/features/index.d.ts +0 -3
- package/lib/features/index.d.ts.map +0 -1
- package/lib/features/index.js +0 -3
- package/lib/features/index.js.map +0 -1
- package/lib/features/mcp-feature.d.ts +0 -25
- package/lib/features/mcp-feature.d.ts.map +0 -1
- package/lib/features/mcp-feature.js +0 -52
- package/lib/features/mcp-feature.js.map +0 -1
- package/lib/hooks.d.ts +0 -144
- package/lib/hooks.d.ts.map +0 -1
- package/lib/hooks.js +0 -82
- package/lib/hooks.js.map +0 -1
- package/lib/ingress/capability-ingress.d.ts +0 -76
- package/lib/ingress/capability-ingress.d.ts.map +0 -1
- package/lib/ingress/capability-ingress.js +0 -274
- package/lib/ingress/capability-ingress.js.map +0 -1
- package/lib/ingress/index.d.ts +0 -2
- package/lib/ingress/index.d.ts.map +0 -1
- package/lib/ingress/index.js +0 -2
- package/lib/ingress/index.js.map +0 -1
- package/lib/init/introspection-args.d.ts +0 -37
- package/lib/init/introspection-args.d.ts.map +0 -1
- package/lib/init/introspection-args.js +0 -71
- package/lib/init/introspection-args.js.map +0 -1
- package/lib/init/introspection-collectors.d.ts +0 -26
- package/lib/init/introspection-collectors.d.ts.map +0 -1
- package/lib/init/introspection-collectors.js +0 -108
- package/lib/init/introspection-collectors.js.map +0 -1
- package/lib/init/introspection-commands-format.d.ts +0 -40
- package/lib/init/introspection-commands-format.d.ts.map +0 -1
- package/lib/init/introspection-commands-format.js +0 -93
- package/lib/init/introspection-commands-format.js.map +0 -1
- package/lib/init/introspection-pagination.d.ts +0 -14
- package/lib/init/introspection-pagination.d.ts.map +0 -1
- package/lib/init/introspection-pagination.js +0 -33
- package/lib/init/introspection-pagination.js.map +0 -1
- package/lib/init/introspection-rest.d.ts +0 -24
- package/lib/init/introspection-rest.d.ts.map +0 -1
- package/lib/init/introspection-rest.js +0 -65
- package/lib/init/introspection-rest.js.map +0 -1
- package/lib/init/upgrade-agent-db-schema.d.ts +0 -49
- package/lib/init/upgrade-agent-db-schema.d.ts.map +0 -1
- package/lib/init/upgrade-agent-db-schema.js +0 -210
- package/lib/init/upgrade-agent-db-schema.js.map +0 -1
- package/lib/init/upgrade-endpoint-id-schema.d.ts +0 -12
- package/lib/init/upgrade-endpoint-id-schema.d.ts.map +0 -1
- package/lib/init/upgrade-endpoint-id-schema.js +0 -58
- package/lib/init/upgrade-endpoint-id-schema.js.map +0 -1
- package/lib/plugin-runtime/workroom-governed-dispatch-reasons.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-governed-dispatch-reasons.js.map +0 -1
- package/lib/resource-hub/tool-registry.d.ts +0 -60
- package/lib/resource-hub/tool-registry.d.ts.map +0 -1
- package/lib/resource-hub/tool-registry.js +0 -228
- package/lib/resource-hub/tool-registry.js.map +0 -1
- package/lib/security/owner-approve-always-store.d.ts +0 -67
- package/lib/security/owner-approve-always-store.d.ts.map +0 -1
- package/lib/security/owner-approve-always-store.js +0 -510
- package/lib/security/owner-approve-always-store.js.map +0 -1
- package/lib/security/turn-sandbox-authority.d.ts +0 -13
- package/lib/security/turn-sandbox-authority.d.ts.map +0 -1
- package/lib/security/turn-sandbox-authority.js +0 -42
- package/lib/security/turn-sandbox-authority.js.map +0 -1
- package/lib/skill/skill-load-opts.d.ts +0 -5
- package/lib/skill/skill-load-opts.d.ts.map +0 -1
- package/lib/skill/skill-load-opts.js +0 -14
- package/lib/skill/skill-load-opts.js.map +0 -1
- package/lib/stability/registry-cleanup.d.ts +0 -5
- package/lib/stability/registry-cleanup.d.ts.map +0 -1
- package/lib/stability/registry-cleanup.js +0 -20
- package/lib/stability/registry-cleanup.js.map +0 -1
- package/lib/tool/classic-tool-execution-authority.d.ts +0 -22
- package/lib/tool/classic-tool-execution-authority.d.ts.map +0 -1
- package/lib/tool/classic-tool-execution-authority.js +0 -80
- package/lib/tool/classic-tool-execution-authority.js.map +0 -1
- package/lib/tool/web-search-locale-attach.d.ts +0 -4
- package/lib/tool/web-search-locale-attach.d.ts.map +0 -1
- package/lib/tool/web-search-locale-attach.js +0 -20
- package/lib/tool/web-search-locale-attach.js.map +0 -1
- package/lib/typing-indicator/integration.d.ts +0 -89
- package/lib/typing-indicator/integration.d.ts.map +0 -1
- package/lib/typing-indicator/integration.js +0 -261
- package/lib/typing-indicator/integration.js.map +0 -1
- package/lib/workroom/journal.d.ts.map +0 -1
- package/lib/workroom/journal.js +0 -2022
- package/lib/workroom/journal.js.map +0 -1
- package/lib/workroom/local-assignment-executor.d.ts.map +0 -1
- package/lib/workroom/local-assignment-executor.js.map +0 -1
- package/lib/workroom/projection-outbox.d.ts.map +0 -1
- package/lib/workroom/projection-outbox.js +0 -1324
- package/lib/workroom/projection-outbox.js.map +0 -1
- /package/lib/{builtin → orchestration}/five-agent/index.d.ts +0 -0
- /package/lib/{builtin → orchestration}/five-agent/index.js +0 -0
- /package/lib/{builtin → orchestration}/five-agent/prompts.d.ts +0 -0
- /package/lib/{builtin → orchestration}/five-agent/prompts.js +0 -0
- /package/lib/{builtin → orchestration}/five-agent/role-capability-policy.d.ts +0 -0
- /package/lib/{builtin → orchestration}/five-agent/role-capability-policy.js +0 -0
- /package/lib/{builtin → orchestration}/five-agent/roles.d.ts +0 -0
- /package/lib/{builtin → orchestration}/five-agent/roles.js +0 -0
- /package/lib/{builtin → plugin-runtime}/file-edit-quote-utils.d.ts +0 -0
- /package/lib/{builtin → plugin-runtime}/file-edit-quote-utils.js +0 -0
- /package/lib/{builtin → web}/bing-search-html.d.ts +0 -0
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import { compareCanonicalWorkroomText, deepFreezeWorkroomValue as deepFreeze, digestCanonicalWorkroomValue as digest, } from '../canonical-value.js';
|
|
2
|
+
import { assertExactRecordKeys, assertProjectionItem, freezeAndValidateBinding, projectionAudience, requireConversation, requireFiniteNumber, requirePositiveInteger, requireRecord, requireSequence, requireText, workroomProjectionBindingKey, } from './projector.js';
|
|
3
|
+
export function emptyProjectionState() {
|
|
4
|
+
return deepFreeze({ revision: 0, bindings: {}, cursors: {}, items: {}, messageIndex: {} });
|
|
5
|
+
}
|
|
6
|
+
export function projectionSnapshotName(revision) {
|
|
7
|
+
return `projection.${String(revision).padStart(16, '0')}.json`;
|
|
8
|
+
}
|
|
9
|
+
export function parseProjectionState(value, expectedRevision) {
|
|
10
|
+
const snapshot = requireRecord(value, 'snapshot');
|
|
11
|
+
assertExactRecordKeys(snapshot, ['state', 'digest'], 'snapshot');
|
|
12
|
+
const state = requireRecord(snapshot.state, 'snapshot.state');
|
|
13
|
+
if (typeof snapshot.digest !== 'string' || digest(state) !== snapshot.digest) {
|
|
14
|
+
throw new Error('Workroom Projection snapshot digest mismatch');
|
|
15
|
+
}
|
|
16
|
+
assertExactRecordKeys(state, ['revision', 'bindings', 'cursors', 'items', 'messageIndex'], 'snapshot.state');
|
|
17
|
+
if (state.revision !== expectedRevision) {
|
|
18
|
+
throw new Error('Workroom Projection snapshot revision mismatch');
|
|
19
|
+
}
|
|
20
|
+
const bindings = requireRecord(state.bindings, 'snapshot.bindings');
|
|
21
|
+
const cursors = requireRecord(state.cursors, 'snapshot.cursors');
|
|
22
|
+
const items = requireRecord(state.items, 'snapshot.items');
|
|
23
|
+
const messageIndex = requireRecord(state.messageIndex, 'snapshot.messageIndex');
|
|
24
|
+
for (const [bindingKey, bindingValue] of Object.entries(bindings)) {
|
|
25
|
+
const binding = freezeAndValidateBinding(bindingValue);
|
|
26
|
+
if (workroomProjectionBindingKey(binding.projectId, projectionAudience(binding)) !== bindingKey) {
|
|
27
|
+
throw new Error('Workroom Projection binding key mismatch');
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
for (const [runId, cursor] of Object.entries(cursors)) {
|
|
31
|
+
requireText(runId, 'snapshot cursor runId');
|
|
32
|
+
requireSequence(cursor, 'snapshot cursor', 0);
|
|
33
|
+
}
|
|
34
|
+
for (const [itemId, itemValue] of Object.entries(items)) {
|
|
35
|
+
const item = itemValue;
|
|
36
|
+
if (item?.id !== itemId)
|
|
37
|
+
throw new Error('Workroom Projection snapshot item key mismatch');
|
|
38
|
+
const cursorId = item.cursorId;
|
|
39
|
+
assertProjectionItem(item, cursorId, -1, Number.MAX_SAFE_INTEGER);
|
|
40
|
+
assertDeliveryState(item.delivery, item.conversation);
|
|
41
|
+
const cursor = cursors[cursorId];
|
|
42
|
+
if (typeof cursor !== 'number' || cursor < item.sourceSequence) {
|
|
43
|
+
throw new Error('Workroom Projection snapshot item exceeds durable cursor');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
for (const [key, entryValue] of Object.entries(messageIndex)) {
|
|
47
|
+
const entry = entryValue;
|
|
48
|
+
const item = items[entry?.projectionId];
|
|
49
|
+
if (!item
|
|
50
|
+
|| workroomProjectionMessageKey(entry.message) !== key
|
|
51
|
+
|| item.delivery.status !== 'sent'
|
|
52
|
+
|| !item.delivery.message
|
|
53
|
+
|| workroomProjectionMessageKey(item.delivery.message) !== key
|
|
54
|
+
|| entry.bindingRevision !== item.bindingRevision
|
|
55
|
+
|| digest(entry.sourceEventIds) !== digest(item.sourceEventIds)
|
|
56
|
+
|| digest(entry.target) !== digest(item.target)
|
|
57
|
+
|| digest(entry.speaker) !== digest(item.speaker)) {
|
|
58
|
+
throw new Error('Workroom Projection Message Index entry is invalid');
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return deepFreeze({
|
|
62
|
+
revision: expectedRevision,
|
|
63
|
+
bindings: { ...bindings },
|
|
64
|
+
cursors: { ...cursors },
|
|
65
|
+
items: { ...items },
|
|
66
|
+
messageIndex: { ...messageIndex },
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
export function applyBinding(state, value) {
|
|
70
|
+
const binding = freezeAndValidateBinding(value);
|
|
71
|
+
const key = workroomProjectionBindingKey(binding.projectId, projectionAudience(binding));
|
|
72
|
+
const current = state.bindings[key];
|
|
73
|
+
if (current && digest(current) === digest(binding))
|
|
74
|
+
return state;
|
|
75
|
+
if (current && binding.bindingRevision <= current.bindingRevision) {
|
|
76
|
+
throw new Error('Workroom Projection binding revision must advance');
|
|
77
|
+
}
|
|
78
|
+
return deepFreeze({
|
|
79
|
+
...state,
|
|
80
|
+
revision: state.revision + 1,
|
|
81
|
+
bindings: { ...state.bindings, [key]: binding },
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
export function applyClaim(state, workerId, now, leaseMs) {
|
|
85
|
+
requireText(workerId, 'claim.workerId');
|
|
86
|
+
requireFiniteNumber(now, 'claim.now');
|
|
87
|
+
requirePositiveInteger(leaseMs, 'claim.leaseMs');
|
|
88
|
+
const current = Object.values(state.items)
|
|
89
|
+
.filter(item => item.delivery.status === 'pending'
|
|
90
|
+
|| (item.delivery.status === 'failed' && item.delivery.retryable === true
|
|
91
|
+
&& (item.delivery.nextAttemptAt === undefined || item.delivery.nextAttemptAt <= now))
|
|
92
|
+
|| (item.delivery.status === 'leased'
|
|
93
|
+
&& Number(item.delivery.leaseExpiresAt) <= now))
|
|
94
|
+
.sort((left, right) => left.sourceSequence - right.sourceSequence || compareCanonicalWorkroomText(left.id, right.id))[0];
|
|
95
|
+
if (!current)
|
|
96
|
+
return undefined;
|
|
97
|
+
const item = deepFreeze({
|
|
98
|
+
...current,
|
|
99
|
+
delivery: {
|
|
100
|
+
status: 'leased',
|
|
101
|
+
attempts: current.delivery.attempts + 1,
|
|
102
|
+
fence: current.delivery.fence + 1,
|
|
103
|
+
leaseOwner: workerId,
|
|
104
|
+
leaseExpiresAt: now + leaseMs,
|
|
105
|
+
},
|
|
106
|
+
});
|
|
107
|
+
return deepFreeze({
|
|
108
|
+
item,
|
|
109
|
+
state: {
|
|
110
|
+
...state,
|
|
111
|
+
revision: state.revision + 1,
|
|
112
|
+
items: { ...state.items, [item.id]: item },
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
export function applySettlement(state, itemId, workerId, fence, resultValue, settledAt) {
|
|
117
|
+
requireFiniteNumber(settledAt, 'delivery settledAt');
|
|
118
|
+
const current = state.items[itemId];
|
|
119
|
+
if (!current
|
|
120
|
+
|| current.delivery.status !== 'leased'
|
|
121
|
+
|| current.delivery.leaseOwner !== workerId
|
|
122
|
+
|| current.delivery.fence !== fence) {
|
|
123
|
+
throw new Error('Workroom Projection delivery settlement is stale or not owned');
|
|
124
|
+
}
|
|
125
|
+
const result = normalizeDeliveryResult(resultValue);
|
|
126
|
+
const delivery = result.status === 'sent'
|
|
127
|
+
? {
|
|
128
|
+
status: 'sent',
|
|
129
|
+
attempts: current.delivery.attempts,
|
|
130
|
+
fence: current.delivery.fence,
|
|
131
|
+
...(result.message ? { message: result.message } : {}),
|
|
132
|
+
}
|
|
133
|
+
: {
|
|
134
|
+
status: 'failed',
|
|
135
|
+
attempts: current.delivery.attempts,
|
|
136
|
+
fence: current.delivery.fence,
|
|
137
|
+
failureCode: result.code,
|
|
138
|
+
retryable: result.retryable,
|
|
139
|
+
...(result.retryable ? { nextAttemptAt: settledAt + retryDelay(current.delivery.attempts) } : {}),
|
|
140
|
+
};
|
|
141
|
+
const item = deepFreeze({ ...current, delivery });
|
|
142
|
+
let messageIndex = state.messageIndex;
|
|
143
|
+
if (result.status === 'sent' && result.message) {
|
|
144
|
+
if (digest(result.message.conversation) !== digest(current.conversation)) {
|
|
145
|
+
throw new Error('Workroom Projection receipt targets another conversation');
|
|
146
|
+
}
|
|
147
|
+
const key = workroomProjectionMessageKey(result.message);
|
|
148
|
+
const entry = deepFreeze({
|
|
149
|
+
projectionId: current.id,
|
|
150
|
+
bindingRevision: current.bindingRevision,
|
|
151
|
+
sourceEventIds: current.sourceEventIds,
|
|
152
|
+
target: current.target,
|
|
153
|
+
speaker: current.speaker,
|
|
154
|
+
message: result.message,
|
|
155
|
+
});
|
|
156
|
+
const existing = messageIndex[key];
|
|
157
|
+
if (existing && digest(existing) !== digest(entry)) {
|
|
158
|
+
throw new Error('Workroom Projection Message Index conflict');
|
|
159
|
+
}
|
|
160
|
+
messageIndex = { ...messageIndex, [key]: entry };
|
|
161
|
+
}
|
|
162
|
+
return deepFreeze({
|
|
163
|
+
...state,
|
|
164
|
+
revision: state.revision + 1,
|
|
165
|
+
items: { ...state.items, [itemId]: item },
|
|
166
|
+
messageIndex,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
export function normalizeDeliveryResult(value) {
|
|
170
|
+
if (value?.status === 'failed') {
|
|
171
|
+
requireText(value.code, 'delivery failure code');
|
|
172
|
+
if (typeof value.retryable !== 'boolean') {
|
|
173
|
+
throw new Error('Workroom Projection delivery retryable must be boolean');
|
|
174
|
+
}
|
|
175
|
+
return deepFreeze({ status: 'failed', code: value.code, retryable: value.retryable });
|
|
176
|
+
}
|
|
177
|
+
if (value?.status !== 'sent')
|
|
178
|
+
throw new Error('Workroom Projection delivery result is invalid');
|
|
179
|
+
if (!value.message)
|
|
180
|
+
return Object.freeze({ status: 'sent' });
|
|
181
|
+
requireConversation(value.message.conversation);
|
|
182
|
+
requireText(value.message.id, 'delivery message.id');
|
|
183
|
+
return deepFreeze({ status: 'sent', message: value.message });
|
|
184
|
+
}
|
|
185
|
+
function assertDeliveryState(value, conversation) {
|
|
186
|
+
const delivery = requireRecord(value, 'delivery state');
|
|
187
|
+
if (!Number.isSafeInteger(delivery.attempts) || Number(delivery.attempts) < 0
|
|
188
|
+
|| !Number.isSafeInteger(delivery.fence) || Number(delivery.fence) < 0
|
|
189
|
+
|| delivery.attempts !== delivery.fence) {
|
|
190
|
+
throw new Error('Workroom Projection delivery attempt/fence is invalid');
|
|
191
|
+
}
|
|
192
|
+
if (delivery.status === 'pending') {
|
|
193
|
+
assertExactRecordKeys(delivery, ['status', 'attempts', 'fence'], 'pending delivery');
|
|
194
|
+
if (delivery.attempts !== 0)
|
|
195
|
+
throw new Error('Workroom Projection pending delivery was attempted');
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
if (delivery.status === 'leased') {
|
|
199
|
+
assertExactRecordKeys(delivery, ['status', 'attempts', 'fence', 'leaseOwner', 'leaseExpiresAt'], 'leased delivery');
|
|
200
|
+
requireText(delivery.leaseOwner, 'delivery.leaseOwner');
|
|
201
|
+
requireFiniteNumber(delivery.leaseExpiresAt, 'delivery.leaseExpiresAt');
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (delivery.status === 'failed') {
|
|
205
|
+
assertExactRecordKeys(delivery, ['status', 'attempts', 'fence', 'failureCode', 'retryable',
|
|
206
|
+
...(delivery.nextAttemptAt !== undefined ? ['nextAttemptAt'] : [])], 'failed delivery');
|
|
207
|
+
requireText(delivery.failureCode, 'delivery.failureCode');
|
|
208
|
+
if (typeof delivery.retryable !== 'boolean') {
|
|
209
|
+
throw new Error('Workroom Projection failed delivery retryable is invalid');
|
|
210
|
+
}
|
|
211
|
+
if (delivery.nextAttemptAt !== undefined) {
|
|
212
|
+
if (delivery.retryable !== true) {
|
|
213
|
+
throw new Error('Workroom Projection non-retryable delivery cannot have nextAttemptAt');
|
|
214
|
+
}
|
|
215
|
+
requireFiniteNumber(delivery.nextAttemptAt, 'delivery.nextAttemptAt');
|
|
216
|
+
}
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
if (delivery.status !== 'sent') {
|
|
220
|
+
throw new Error('Workroom Projection delivery status is invalid');
|
|
221
|
+
}
|
|
222
|
+
assertExactRecordKeys(delivery, ['status', 'attempts', 'fence', ...(delivery.message ? ['message'] : [])], 'sent delivery');
|
|
223
|
+
if (delivery.message) {
|
|
224
|
+
const message = delivery.message;
|
|
225
|
+
workroomProjectionMessageKey(message);
|
|
226
|
+
if (digest(message.conversation) !== digest(conversation)) {
|
|
227
|
+
throw new Error('Workroom Projection persisted receipt targets another conversation');
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
function retryDelay(attempts) {
|
|
232
|
+
return Math.min(60_000, 1_000 * 2 ** Math.min(6, Math.max(0, attempts - 1)));
|
|
233
|
+
}
|
|
234
|
+
export function workroomProjectionMessageKey(value) {
|
|
235
|
+
if (!value)
|
|
236
|
+
throw new Error('Workroom Projection MessageRef is required');
|
|
237
|
+
requireConversation(value.conversation);
|
|
238
|
+
requireText(value.id, 'message.id');
|
|
239
|
+
return [
|
|
240
|
+
value.conversation.endpoint.adapter,
|
|
241
|
+
value.conversation.endpoint.id,
|
|
242
|
+
value.conversation.kind,
|
|
243
|
+
value.conversation.id,
|
|
244
|
+
value.conversation.parent?.kind ?? '',
|
|
245
|
+
value.conversation.parent?.id ?? '',
|
|
246
|
+
value.conversation.threadId ?? '',
|
|
247
|
+
value.id,
|
|
248
|
+
].join('\0');
|
|
249
|
+
}
|
|
250
|
+
/** Pure Message Index lookup; it proposes context and owns no Kernel command port. */
|
|
251
|
+
export function resolveProjectionReplyTarget(state, input) {
|
|
252
|
+
requireText(input.projectId, 'reply projectId');
|
|
253
|
+
requirePositiveInteger(input.bindingRevision, 'reply bindingRevision');
|
|
254
|
+
const entry = state.messageIndex[workroomProjectionMessageKey(input.replyTo)];
|
|
255
|
+
if (!entry) {
|
|
256
|
+
return deepFreeze({
|
|
257
|
+
status: 'clarification_required',
|
|
258
|
+
reason: 'target_not_found',
|
|
259
|
+
candidateRefs: [],
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
if (entry.target.projectId !== input.projectId) {
|
|
263
|
+
return deepFreeze({
|
|
264
|
+
status: 'clarification_required',
|
|
265
|
+
reason: 'cross_project_target',
|
|
266
|
+
candidateRefs: [entry.target.projectId],
|
|
267
|
+
});
|
|
268
|
+
}
|
|
269
|
+
if (input.bindingRevision !== entry.bindingRevision) {
|
|
270
|
+
return deepFreeze({
|
|
271
|
+
status: 'clarification_required',
|
|
272
|
+
reason: 'stale_binding',
|
|
273
|
+
candidateRefs: [entry.projectionId],
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
const target = entry.target;
|
|
277
|
+
if (!target.taskKey || !target.taskRevision
|
|
278
|
+
|| !target.assignmentId || !target.assignmentRevision) {
|
|
279
|
+
return deepFreeze({
|
|
280
|
+
status: 'clarification_required',
|
|
281
|
+
reason: 'non_task_projection',
|
|
282
|
+
candidateRefs: [entry.projectionId],
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
const active = input.activeAssignments.some(candidate => candidate.projectId === target.projectId
|
|
286
|
+
&& candidate.runId === target.runId
|
|
287
|
+
&& candidate.taskKey === target.taskKey
|
|
288
|
+
&& candidate.taskRevision === target.taskRevision
|
|
289
|
+
&& candidate.assignmentId === target.assignmentId
|
|
290
|
+
&& candidate.assignmentRevision === target.assignmentRevision);
|
|
291
|
+
return deepFreeze({
|
|
292
|
+
status: 'task_target',
|
|
293
|
+
via: 'reply',
|
|
294
|
+
disposition: input.intent === 'task_input' && active
|
|
295
|
+
? 'context_proposal'
|
|
296
|
+
: 'discussion_only',
|
|
297
|
+
sourceProjectionId: entry.projectionId,
|
|
298
|
+
sourceEventIds: entry.sourceEventIds,
|
|
299
|
+
target: {
|
|
300
|
+
projectId: target.projectId,
|
|
301
|
+
runId: target.runId,
|
|
302
|
+
taskKey: target.taskKey,
|
|
303
|
+
taskRevision: target.taskRevision,
|
|
304
|
+
assignmentId: target.assignmentId,
|
|
305
|
+
assignmentRevision: target.assignmentRevision,
|
|
306
|
+
agentDefinitionId: target.agentDefinitionId,
|
|
307
|
+
status: active ? 'active' : 'historical',
|
|
308
|
+
},
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
export function applyCapture(state, input) {
|
|
312
|
+
requireText(input.runId, 'capture.runId');
|
|
313
|
+
requireSequence(input.expectedCursor, 'capture.expectedCursor', -1);
|
|
314
|
+
requireSequence(input.cursor, 'capture.cursor', 0);
|
|
315
|
+
const currentCursor = state.cursors[input.runId] ?? -1;
|
|
316
|
+
if (currentCursor !== input.expectedCursor) {
|
|
317
|
+
throw new Error(`Workroom Projection cursor conflict for ${input.runId}`);
|
|
318
|
+
}
|
|
319
|
+
if (input.cursor <= input.expectedCursor) {
|
|
320
|
+
throw new Error('Workroom Projection capture cursor must advance');
|
|
321
|
+
}
|
|
322
|
+
const items = { ...state.items };
|
|
323
|
+
for (const item of input.items) {
|
|
324
|
+
assertProjectionItem(item, input.runId, input.expectedCursor, input.cursor);
|
|
325
|
+
const existing = items[item.id];
|
|
326
|
+
if (existing && existing.digest !== item.digest) {
|
|
327
|
+
throw new Error(`Workroom Projection item conflict: ${item.id}`);
|
|
328
|
+
}
|
|
329
|
+
items[item.id] = item;
|
|
330
|
+
}
|
|
331
|
+
return deepFreeze({
|
|
332
|
+
revision: state.revision + 1,
|
|
333
|
+
bindings: state.bindings,
|
|
334
|
+
cursors: { ...state.cursors, [input.runId]: input.cursor },
|
|
335
|
+
items,
|
|
336
|
+
messageIndex: state.messageIndex,
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
export function hasCode(error, code) {
|
|
340
|
+
return !!error && typeof error === 'object' && 'code' in error
|
|
341
|
+
&& error.code === code;
|
|
342
|
+
}
|
|
343
|
+
//# sourceMappingURL=repository-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository-state.js","sourceRoot":"","sources":["../../../src/workroom/projection-outbox/repository-state.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,IAAI,UAAU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AAG,KAAK,CAAC,KAAK,EAAE,CAAC;IACjC,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAC/B,oBAAoB,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;QAC5E,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAChC,IAAI,QAAQ,IAAI,QAAQ,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,EAAE,CAAC;YAChD,MAAM,IAAI,KAAK,CAAC,sCAAsC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;QACnE,CAAC;QACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IACxB,CAAC;IACD,OAAO,UAAU,CAAC;QAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ,GAAG,CAAC;QAC5B,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,OAAO,EAAE,EAAE,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,EAAE;QAC1D,KAAK;QACL,YAAY,EAAE,KAAK,CAAC,YAAY;KACjC,CAAC,CAAC;AACL,CAAC;AAGD,MAAM,UAAU,OAAO,CAAC,KAAc,EAAE,IAAY;IAClD,OAAO,CAAC,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,KAAK;WACxD,KAA4B,CAAC,IAAI,KAAK,IAAI,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { WorkroomJournal } from '../journal/index.js';
|
|
2
|
+
import type { PortfolioSponsorProjection } from '../../portfolio/sponsor-projection.js';
|
|
3
|
+
import type { WorkroomLifecycleHoldOverdueSnapshot, WorkroomProjectionBinding, WorkroomProjectionGovernancePort, WorkroomProjectionRepository, WorkroomProjectionState } from './contracts.js';
|
|
4
|
+
export interface WorkroomProjectionTracerOptions {
|
|
5
|
+
readonly journal: WorkroomJournal;
|
|
6
|
+
readonly repository: WorkroomProjectionRepository;
|
|
7
|
+
readonly governance?: WorkroomProjectionGovernancePort;
|
|
8
|
+
}
|
|
9
|
+
/** Durable cursor tracer from authoritative Kernel events to an IM outbox. */
|
|
10
|
+
export declare class WorkroomProjectionTracer {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(options: WorkroomProjectionTracerOptions);
|
|
13
|
+
capture(bindingValue: WorkroomProjectionBinding, runId: string, signal?: AbortSignal): Promise<WorkroomProjectionState>;
|
|
14
|
+
/** Capture content-free P12 Hold review facts into the same governed IM outbox. */
|
|
15
|
+
captureLifecycleOverdue(bindingValue: WorkroomProjectionBinding, snapshotValue: WorkroomLifecycleHoldOverdueSnapshot, signal?: AbortSignal): Promise<WorkroomProjectionState>;
|
|
16
|
+
/** Publishes one Project-scoped card from a content-free Portfolio projection. */
|
|
17
|
+
capturePortfolioSponsor(bindingValue: WorkroomProjectionBinding, projectionValue: PortfolioSponsorProjection, signal?: AbortSignal): Promise<WorkroomProjectionState>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=tracer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracer.d.ts","sourceRoot":"","sources":["../../../src/workroom/projection-outbox/tracer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAM3D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACxF,OAAO,KAAK,EACV,oCAAoC,EACpC,yBAAyB,EACzB,gCAAgC,EAChC,4BAA4B,EAC5B,uBAAuB,EACxB,MAAM,gBAAgB,CAAC;AAgBxB,MAAM,WAAW,+BAA+B;IAC9C,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,4BAA4B,CAAC;IAClD,QAAQ,CAAC,UAAU,CAAC,EAAE,gCAAgC,CAAC;CACxD;AAED,8EAA8E;AAC9E,qBAAa,wBAAwB;;gBAKvB,OAAO,EAAE,+BAA+B;IAM9C,OAAO,CACX,YAAY,EAAE,yBAAyB,EACvC,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,WAA0C,GACjD,OAAO,CAAC,uBAAuB,CAAC;IAoDnC,mFAAmF;IAC7E,uBAAuB,CAC3B,YAAY,EAAE,yBAAyB,EACvC,aAAa,EAAE,oCAAoC,EACnD,MAAM,GAAE,WAA0C,GACjD,OAAO,CAAC,uBAAuB,CAAC;IAoBnC,kFAAkF;IAC5E,uBAAuB,CAC3B,YAAY,EAAE,yBAAyB,EACvC,eAAe,EAAE,0BAA0B,EAC3C,MAAM,GAAE,WAA0C,GACjD,OAAO,CAAC,uBAAuB,CAAC;CAoHpC"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { compareCanonicalWorkroomText, deepFreezeWorkroomValue as deepFreeze, digestCanonicalWorkroomValue as digest, } from '../canonical-value.js';
|
|
2
|
+
import { WorkroomProjectionRevisionConflictError } from './contracts.js';
|
|
3
|
+
import { freezeAndValidateBinding, lifecycleOverdueDraft, lifecycleOverdueSourceEventId, materializeProjectionItem, portfolioSponsorDraft, projectEvents, projectionAudience, projectionBindingCursorKey, validateLifecycleOverdueSnapshot, workroomLifecycleProjectionCursorKey, workroomPortfolioProjectionCursorKey, } from './projector.js';
|
|
4
|
+
/** Durable cursor tracer from authoritative Kernel events to an IM outbox. */
|
|
5
|
+
export class WorkroomProjectionTracer {
|
|
6
|
+
#journal;
|
|
7
|
+
#repository;
|
|
8
|
+
#governance;
|
|
9
|
+
constructor(options) {
|
|
10
|
+
this.#journal = options.journal;
|
|
11
|
+
this.#repository = options.repository;
|
|
12
|
+
this.#governance = options.governance;
|
|
13
|
+
}
|
|
14
|
+
async capture(bindingValue, runId, signal = new AbortController().signal) {
|
|
15
|
+
const binding = freezeAndValidateBinding(bindingValue);
|
|
16
|
+
const events = await this.#journal.read(runId);
|
|
17
|
+
if (events.length === 0)
|
|
18
|
+
throw new Error(`Workroom Projection Run ${runId} not found`);
|
|
19
|
+
if (events[0]?.payload.projectId !== binding.projectId) {
|
|
20
|
+
throw new Error('Workroom Projection binding targets another Project');
|
|
21
|
+
}
|
|
22
|
+
for (let conflict = 0; conflict < 8; conflict += 1) {
|
|
23
|
+
const current = await this.#repository.read();
|
|
24
|
+
const cursorId = projectionBindingCursorKey(runId, binding);
|
|
25
|
+
const cursor = current.cursors[cursorId] ?? -1;
|
|
26
|
+
const sourceSequence = events.at(-1)?.sequence ?? -1;
|
|
27
|
+
if (cursor > sourceSequence) {
|
|
28
|
+
throw new Error('Workroom Projection cursor exceeds the authoritative Journal');
|
|
29
|
+
}
|
|
30
|
+
if (cursor >= sourceSequence)
|
|
31
|
+
return current;
|
|
32
|
+
const rawProjection = projectEvents(events, cursor, binding);
|
|
33
|
+
const projected = deepFreeze({
|
|
34
|
+
cursor: rawProjection.cursor,
|
|
35
|
+
items: rawProjection.items.map(item => deepFreeze({ ...item, cursorId })),
|
|
36
|
+
});
|
|
37
|
+
if (projected.cursor <= cursor)
|
|
38
|
+
return current;
|
|
39
|
+
if (!this.#governance && projected.items.length > 0) {
|
|
40
|
+
throw new Error('Workroom Projection governance authority is unavailable');
|
|
41
|
+
}
|
|
42
|
+
const governedItems = await Promise.all(projected.items.map(async (draft) => {
|
|
43
|
+
const governed = await this.#governance.prepareProjection({
|
|
44
|
+
operationId: `projection:${binding.projectId}:${runId}:${draft.sourceSequence}`,
|
|
45
|
+
projectId: binding.projectId,
|
|
46
|
+
sinkRuleId: 'projection:workroom',
|
|
47
|
+
body: draft.content,
|
|
48
|
+
sourceEventIds: draft.sourceEventIds,
|
|
49
|
+
}, signal);
|
|
50
|
+
if (governed.status === 'blocked') {
|
|
51
|
+
throw new Error(`Workroom Projection disclosure blocked: ${governed.reason}`);
|
|
52
|
+
}
|
|
53
|
+
return materializeProjectionItem(draft, governed);
|
|
54
|
+
}));
|
|
55
|
+
try {
|
|
56
|
+
return await this.#repository.capture(current.revision, {
|
|
57
|
+
runId: cursorId,
|
|
58
|
+
expectedCursor: cursor,
|
|
59
|
+
cursor: projected.cursor,
|
|
60
|
+
items: governedItems,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
if (!(error instanceof WorkroomProjectionRevisionConflictError))
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
throw new Error('Workroom Projection capture CAS retries exhausted');
|
|
69
|
+
}
|
|
70
|
+
/** Capture content-free P12 Hold review facts into the same governed IM outbox. */
|
|
71
|
+
async captureLifecycleOverdue(bindingValue, snapshotValue, signal = new AbortController().signal) {
|
|
72
|
+
const binding = freezeAndValidateBinding(bindingValue);
|
|
73
|
+
const snapshot = validateLifecycleOverdueSnapshot(snapshotValue);
|
|
74
|
+
if (snapshot.projectId !== binding.projectId) {
|
|
75
|
+
throw new Error('Workroom Lifecycle Projection binding targets another Project');
|
|
76
|
+
}
|
|
77
|
+
const byObject = new Map();
|
|
78
|
+
for (const item of snapshot.overdue) {
|
|
79
|
+
byObject.set(item.objectId, [...(byObject.get(item.objectId) ?? []), item]);
|
|
80
|
+
}
|
|
81
|
+
let state = await this.#repository.read();
|
|
82
|
+
for (const objectId of [...byObject.keys()].sort(compareCanonicalWorkroomText)) {
|
|
83
|
+
signal.throwIfAborted();
|
|
84
|
+
state = await this.#captureLifecycleObject(binding, objectId, byObject.get(objectId), signal);
|
|
85
|
+
}
|
|
86
|
+
return state;
|
|
87
|
+
}
|
|
88
|
+
/** Publishes one Project-scoped card from a content-free Portfolio projection. */
|
|
89
|
+
async capturePortfolioSponsor(bindingValue, projectionValue, signal = new AbortController().signal) {
|
|
90
|
+
signal.throwIfAborted();
|
|
91
|
+
const binding = freezeAndValidateBinding(bindingValue);
|
|
92
|
+
if (projectionAudience(binding) !== 'sponsor_room') {
|
|
93
|
+
throw new Error('Portfolio Sponsor projection requires a Sponsor Room binding');
|
|
94
|
+
}
|
|
95
|
+
const { digest: suppliedDigest, ...projectionBody } = projectionValue;
|
|
96
|
+
if (suppliedDigest !== digest(projectionBody)) {
|
|
97
|
+
throw new Error('Portfolio Sponsor projection digest mismatch');
|
|
98
|
+
}
|
|
99
|
+
const project = projectionValue.projects[binding.projectId];
|
|
100
|
+
if (!project || project.projectId !== binding.projectId) {
|
|
101
|
+
throw new Error('Portfolio Sponsor projection does not contain the binding Project');
|
|
102
|
+
}
|
|
103
|
+
const runId = workroomPortfolioProjectionCursorKey(projectionValue.portfolioId, binding.projectId);
|
|
104
|
+
const cursorId = projectionBindingCursorKey(runId, binding);
|
|
105
|
+
for (let conflict = 0; conflict < 8; conflict += 1) {
|
|
106
|
+
const current = await this.#repository.read();
|
|
107
|
+
const cursor = current.cursors[cursorId] ?? -1;
|
|
108
|
+
if (cursor > projectionValue.sourceSequence) {
|
|
109
|
+
throw new Error('Portfolio Sponsor cursor exceeds the authoritative projection');
|
|
110
|
+
}
|
|
111
|
+
if (cursor >= projectionValue.sourceSequence)
|
|
112
|
+
return current;
|
|
113
|
+
const draft = deepFreeze({
|
|
114
|
+
...portfolioSponsorDraft(binding, projectionValue, runId),
|
|
115
|
+
cursorId,
|
|
116
|
+
});
|
|
117
|
+
if (!this.#governance) {
|
|
118
|
+
throw new Error('Workroom Projection governance authority is unavailable');
|
|
119
|
+
}
|
|
120
|
+
const governed = await this.#governance.prepareProjection({
|
|
121
|
+
operationId: `projection:${draft.sourceEventIds[0]}`,
|
|
122
|
+
projectId: binding.projectId,
|
|
123
|
+
sinkRuleId: 'projection:sponsor-room',
|
|
124
|
+
body: draft.content,
|
|
125
|
+
sourceEventIds: draft.sourceEventIds,
|
|
126
|
+
}, signal);
|
|
127
|
+
if (governed.status === 'blocked') {
|
|
128
|
+
throw new Error(`Workroom Projection disclosure blocked: ${governed.reason}`);
|
|
129
|
+
}
|
|
130
|
+
try {
|
|
131
|
+
return await this.#repository.capture(current.revision, {
|
|
132
|
+
runId: cursorId,
|
|
133
|
+
expectedCursor: cursor,
|
|
134
|
+
cursor: projectionValue.sourceSequence,
|
|
135
|
+
items: [materializeProjectionItem(draft, governed)],
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
catch (error) {
|
|
139
|
+
if (!(error instanceof WorkroomProjectionRevisionConflictError) || conflict === 7)
|
|
140
|
+
throw error;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
throw new Error('Portfolio Sponsor projection capture retries exhausted');
|
|
144
|
+
}
|
|
145
|
+
async #captureLifecycleObject(binding, objectId, values, signal) {
|
|
146
|
+
const stateSequences = new Set(values.map(value => value.stateSequence));
|
|
147
|
+
const stateDigests = new Set(values.map(value => value.stateDigest));
|
|
148
|
+
if (stateSequences.size !== 1 || stateDigests.size !== 1) {
|
|
149
|
+
throw new Error('Workroom Lifecycle Projection object state binding is inconsistent');
|
|
150
|
+
}
|
|
151
|
+
const runId = workroomLifecycleProjectionCursorKey(binding.projectId, objectId);
|
|
152
|
+
const cursorId = projectionBindingCursorKey(runId, binding);
|
|
153
|
+
for (let conflict = 0; conflict < 8; conflict += 1) {
|
|
154
|
+
const current = await this.#repository.read();
|
|
155
|
+
const cursor = current.cursors[cursorId] ?? -1;
|
|
156
|
+
const existingSources = new Set(Object.values(current.items)
|
|
157
|
+
.filter(item => item.projectId === binding.projectId
|
|
158
|
+
&& item.bindingRevision === binding.bindingRevision)
|
|
159
|
+
.flatMap(item => item.sourceEventIds));
|
|
160
|
+
const pending = values
|
|
161
|
+
.filter(value => !existingSources.has(lifecycleOverdueSourceEventId(binding.projectId, value)))
|
|
162
|
+
.sort((left, right) => compareCanonicalWorkroomText(lifecycleOverdueSourceEventId(binding.projectId, left), lifecycleOverdueSourceEventId(binding.projectId, right)));
|
|
163
|
+
if (pending.length === 0)
|
|
164
|
+
return current;
|
|
165
|
+
const drafts = pending.map((value, index) => deepFreeze({
|
|
166
|
+
...lifecycleOverdueDraft(binding, runId, value, cursor + index + 1),
|
|
167
|
+
cursorId,
|
|
168
|
+
}));
|
|
169
|
+
if (!this.#governance && drafts.length > 0) {
|
|
170
|
+
throw new Error('Workroom Projection governance authority is unavailable');
|
|
171
|
+
}
|
|
172
|
+
const governedItems = await Promise.all(drafts.map(async (draft) => {
|
|
173
|
+
const governed = await this.#governance.prepareProjection({
|
|
174
|
+
operationId: `projection:${draft.sourceEventIds[0]}`,
|
|
175
|
+
projectId: binding.projectId,
|
|
176
|
+
sinkRuleId: 'projection:sponsor-room',
|
|
177
|
+
body: draft.content,
|
|
178
|
+
sourceEventIds: draft.sourceEventIds,
|
|
179
|
+
}, signal);
|
|
180
|
+
if (governed.status === 'blocked') {
|
|
181
|
+
throw new Error(`Workroom Projection disclosure blocked: ${governed.reason}`);
|
|
182
|
+
}
|
|
183
|
+
return materializeProjectionItem(draft, governed);
|
|
184
|
+
}));
|
|
185
|
+
try {
|
|
186
|
+
return await this.#repository.capture(current.revision, {
|
|
187
|
+
runId: cursorId,
|
|
188
|
+
expectedCursor: cursor,
|
|
189
|
+
cursor: cursor + drafts.length,
|
|
190
|
+
items: governedItems,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
if (!(error instanceof WorkroomProjectionRevisionConflictError))
|
|
195
|
+
throw error;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
throw new Error('Workroom Lifecycle Projection capture CAS retries exhausted');
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
//# sourceMappingURL=tracer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracer.js","sourceRoot":"","sources":["../../../src/workroom/projection-outbox/tracer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,IAAI,UAAU,EACrC,4BAA4B,IAAI,MAAM,GACvC,MAAM,uBAAuB,CAAC;AAS/B,OAAO,EAAE,uCAAuC,EAAE,MAAM,g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gBACf,IAAI,CAAC,CAAC,KAAK,YAAY,uCAAuC,CAAC;oBAAE,MAAM,KAAK,CAAC;YAC/E,CAAC;QACH,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;IACjF,CAAC;CACF"}
|
|
@@ -3,8 +3,8 @@ import { type RemoteExecutionLinkRegistryRepository } from './remote-callback-ap
|
|
|
3
3
|
import { type WorkroomRemoteDispatchOutboxProjection, type WorkroomRemoteDispatchOutboxRepository } from './remote-dispatch-outbox.js';
|
|
4
4
|
import { type RunWorkroomRemoteDispatchOnceInput } from './remote-dispatch-worker.js';
|
|
5
5
|
import { type WorkroomRemoteDispatchInput, type WorkroomRemoteDispatchOutboxItem } from './remote-dispatch.js';
|
|
6
|
-
import type { WorkroomRemoteExecutorPort } from '
|
|
7
|
-
import type { WorkroomDisclosureManifestAuthorityPort } from '../
|
|
6
|
+
import type { WorkroomRemoteExecutorPort } from './remote-executor.js';
|
|
7
|
+
import type { WorkroomDisclosureManifestAuthorityPort } from '../data-governance/disclosure-authority.js';
|
|
8
8
|
import type { WorkroomRunState } from './kernel-contracts.js';
|
|
9
9
|
export interface RemoteAssignmentDispatchRunStatePort {
|
|
10
10
|
read(projectId: string, runId: string): Promise<WorkroomRunState>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-dispatch-admission.d.ts","sourceRoot":"","sources":["../../src/workroom/remote-dispatch-admission.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAGL,KAAK,qCAAqC,EAC3C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,KAAK,sCAAsC,EAC3C,KAAK,sCAAsC,EAC5C,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAEL,KAAK,kCAAkC,EACxC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAGL,KAAK,2BAA2B,EAChC,KAAK,gCAAgC,EACtC,MAAM,sB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D,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,gCAAgC,CAAC;CACjD;AAED,MAAM,MAAM,mCAAmC,GAAG,IAAI,CACpD,kCAAkC,EAClC,YAAY,GAAG,UAAU,CAC1B,CAAC;AAEF;;;;GAIG;AACH,qBAAa,+BAA+B;;gBAQ9B,OAAO,EAAE,sCAAsC;IASrD,KAAK,CACT,KAAK,EAAE,sCAAsC,GAC5C,OAAO,CAAC,iCAAiC,CAAC;IA8BvC,OAAO,CACX,KAAK,EAAE,mCAAmC,GACzC,OAAO,CAAC,sCAAsC,CAAC;CAwInD"}
|
|
@@ -2,7 +2,7 @@ import { assertAssignmentExecutionEnvelope, } from './assignment-executor.js';
|
|
|
2
2
|
import { bindRemoteExecutionLinkTransportReceipt, createRemoteExecutionLinkPreregistration, } from './remote-callback-application.js';
|
|
3
3
|
import { runWorkroomRemoteDispatchOnce, } from './remote-dispatch-worker.js';
|
|
4
4
|
import { createWorkroomRemoteDispatchOutboxItem, assertWorkroomGovernedDispatchSupersession, } from './remote-dispatch.js';
|
|
5
|
-
import { createWorkroomGovernedDispatchReason } from '
|
|
5
|
+
import { createWorkroomGovernedDispatchReason } from './governed-dispatch-reasons.js';
|
|
6
6
|
/**
|
|
7
7
|
* Trusted bridge from an already-claimed Assignment Envelope to remote A2A.
|
|
8
8
|
* It has no claim/Task command surface and never translates transport delivery
|