@zhin.js/agent 1.1.23 → 1.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -24
- package/lib/activity-feedback/adapter-integration.d.ts +1 -1
- package/lib/activity-feedback/adapter-integration.d.ts.map +1 -1
- package/lib/activity-feedback/index.d.ts +0 -1
- package/lib/activity-feedback/index.d.ts.map +1 -1
- package/lib/activity-feedback/index.js +0 -1
- package/lib/activity-feedback/index.js.map +1 -1
- package/lib/activity-feedback/subagent-prefix.d.ts +1 -1
- package/lib/activity-feedback/subagent-prefix.js +1 -1
- package/lib/ai-event-bus.d.ts +6 -10
- package/lib/ai-event-bus.d.ts.map +1 -1
- package/lib/ai-event-bus.js +0 -13
- package/lib/ai-event-bus.js.map +1 -1
- package/lib/ai-event-contract.d.ts +43 -0
- package/lib/ai-event-contract.d.ts.map +1 -0
- package/lib/ai-event-contract.js +2 -0
- package/lib/ai-event-contract.js.map +1 -0
- package/lib/ai-event-subscriber.d.ts +3 -5
- package/lib/ai-event-subscriber.d.ts.map +1 -1
- package/lib/ai-event-subscriber.js +0 -19
- package/lib/ai-event-subscriber.js.map +1 -1
- package/lib/ai-hook-runtime-bus.d.ts +3 -4
- package/lib/ai-hook-runtime-bus.d.ts.map +1 -1
- package/lib/ai-hook-runtime-bus.js +2 -3
- package/lib/ai-hook-runtime-bus.js.map +1 -1
- package/lib/assistant/deliver-schedule-to-adapter.d.ts +2 -4
- package/lib/assistant/deliver-schedule-to-adapter.d.ts.map +1 -1
- package/lib/assistant/deliver-schedule-to-adapter.js +1 -8
- package/lib/assistant/deliver-schedule-to-adapter.js.map +1 -1
- package/lib/assistant/domains/ha-home-backend.d.ts.map +1 -1
- package/lib/assistant/domains/ha-home-backend.js +1 -2
- package/lib/assistant/domains/ha-home-backend.js.map +1 -1
- package/lib/assistant/domains/ha-ws-transport.d.ts.map +1 -1
- package/lib/assistant/domains/ha-ws-transport.js +1 -2
- package/lib/assistant/domains/ha-ws-transport.js.map +1 -1
- package/lib/assistant/domains/home-state-watch.d.ts.map +1 -1
- package/lib/assistant/domains/home-state-watch.js +1 -2
- package/lib/assistant/domains/home-state-watch.js.map +1 -1
- package/lib/assistant/event-ingress.d.ts.map +1 -1
- package/lib/assistant/event-ingress.js +1 -2
- package/lib/assistant/event-ingress.js.map +1 -1
- package/lib/assistant/home-policy.d.ts +1 -1
- package/lib/assistant/home-policy.d.ts.map +1 -1
- package/lib/assistant/home-tools.d.ts.map +1 -1
- package/lib/assistant/home-tools.js.map +1 -1
- package/lib/assistant/index.d.ts +2 -2
- package/lib/assistant/index.d.ts.map +1 -1
- package/lib/assistant/index.js +2 -2
- package/lib/assistant/index.js.map +1 -1
- package/lib/assistant/job-engine.d.ts +3 -2
- package/lib/assistant/job-engine.d.ts.map +1 -1
- package/lib/assistant/job-engine.js +6 -4
- package/lib/assistant/job-engine.js.map +1 -1
- package/lib/assistant/job-scheduler.d.ts +2 -2
- package/lib/assistant/job-scheduler.d.ts.map +1 -1
- package/lib/assistant/job-scheduler.js +2 -11
- package/lib/assistant/job-scheduler.js.map +1 -1
- package/lib/assistant/job-worker.js +1 -1
- package/lib/assistant/job-worker.js.map +1 -1
- package/lib/assistant/notification-router.d.ts.map +1 -1
- package/lib/assistant/notification-router.js +2 -2
- package/lib/assistant/notification-router.js.map +1 -1
- package/lib/assistant/profile-loader.d.ts +0 -4
- package/lib/assistant/profile-loader.d.ts.map +1 -1
- package/lib/assistant/profile-loader.js +0 -4
- package/lib/assistant/profile-loader.js.map +1 -1
- package/lib/assistant/schedule-skills.d.ts.map +1 -1
- package/lib/assistant/schedule-skills.js +5 -7
- package/lib/assistant/schedule-skills.js.map +1 -1
- package/lib/authoring/bridge.d.ts +2 -16
- package/lib/authoring/bridge.d.ts.map +1 -1
- package/lib/authoring/bridge.js +1 -74
- package/lib/authoring/bridge.js.map +1 -1
- package/lib/authoring/disable-tool.d.ts +2 -2
- package/lib/authoring/disable-tool.d.ts.map +1 -1
- package/lib/authoring/disable-tool.js +2 -2
- package/lib/authoring/disable-tool.js.map +1 -1
- package/lib/authoring/index.d.ts +1 -11
- package/lib/authoring/index.d.ts.map +1 -1
- package/lib/authoring/index.js +1 -6
- package/lib/authoring/index.js.map +1 -1
- package/lib/authoring/types.d.ts +3 -116
- package/lib/authoring/types.d.ts.map +1 -1
- package/lib/authoring/types.js.map +1 -1
- package/lib/bootstrap.d.ts +3 -8
- package/lib/bootstrap.d.ts.map +1 -1
- package/lib/bootstrap.js +9 -29
- package/lib/bootstrap.js.map +1 -1
- package/lib/builtins/builtin-tool-service.js +1 -1
- package/lib/builtins/builtin-tool-service.js.map +1 -1
- package/lib/config/fix-ai-config.d.ts.map +1 -1
- package/lib/config/fix-ai-config.js +0 -57
- package/lib/config/fix-ai-config.js.map +1 -1
- package/lib/config/index.d.ts +2 -1
- package/lib/config/index.d.ts.map +1 -1
- package/lib/config/index.js +2 -1
- package/lib/config/index.js.map +1 -1
- package/lib/config/provider-instance.d.ts +3 -3
- package/lib/config/provider-instance.d.ts.map +1 -1
- package/lib/config/provider-instance.js.map +1 -1
- package/lib/config/resolve-five-agent-binding.d.ts +1 -1
- package/lib/config/resolve-five-agent-binding.d.ts.map +1 -1
- package/lib/config/validate-ai-config.d.ts +0 -1
- package/lib/config/validate-ai-config.d.ts.map +1 -1
- package/lib/config/validate-ai-config.js +0 -229
- package/lib/config/validate-ai-config.js.map +1 -1
- package/lib/config/zhin-agent-config.d.ts +1 -1
- package/lib/config/zhin-agent-config.d.ts.map +1 -1
- package/lib/config/zhin-agent-defaults.js +4 -4
- package/lib/config/zhin-agent-dependencies.d.ts +5 -5
- package/lib/config/zhin-agent-dependencies.d.ts.map +1 -1
- package/lib/context/agents-instruction.d.ts +0 -1
- package/lib/context/agents-instruction.d.ts.map +1 -1
- package/lib/context/agents-instruction.js +1 -14
- package/lib/context/agents-instruction.js.map +1 -1
- package/lib/context/context-system.d.ts.map +1 -1
- package/lib/context/context-system.js +2 -2
- package/lib/context/context-system.js.map +1 -1
- package/lib/context/index.d.ts +1 -1
- package/lib/context/index.d.ts.map +1 -1
- package/lib/context/index.js +1 -1
- package/lib/context/index.js.map +1 -1
- package/lib/context/turn-user-message.d.ts.map +1 -1
- package/lib/context/turn-user-message.js +1 -2
- package/lib/context/turn-user-message.js.map +1 -1
- package/lib/core/agent-core-run.d.ts.map +1 -1
- package/lib/core/agent-core-run.js +17 -16
- package/lib/core/agent-core-run.js.map +1 -1
- package/lib/core/agent-loop-standalone.d.ts +2 -1
- package/lib/core/agent-loop-standalone.d.ts.map +1 -1
- package/lib/core/agent-loop-standalone.js +19 -18
- package/lib/core/agent-loop-standalone.js.map +1 -1
- package/lib/core/tool-calls-user-format.d.ts.map +1 -1
- package/lib/core/tool-calls-user-format.js +2 -76
- package/lib/core/tool-calls-user-format.js.map +1 -1
- package/lib/create-agent-session.d.ts +1 -1
- package/lib/create-agent-session.d.ts.map +1 -1
- package/lib/create-agent-session.js +2 -2
- package/lib/create-agent-session.js.map +1 -1
- package/lib/data-governance/disclosure-authority.d.ts +38 -0
- package/lib/data-governance/disclosure-authority.d.ts.map +1 -0
- package/lib/data-governance/disclosure-authority.js +2 -0
- package/lib/data-governance/disclosure-authority.js.map +1 -0
- package/lib/deferred-worker-runner.d.ts +2 -1
- package/lib/deferred-worker-runner.d.ts.map +1 -1
- package/lib/deferred-worker-runner.js +6 -4
- package/lib/deferred-worker-runner.js.map +1 -1
- package/lib/discovery/agent-surface-info.d.ts +5 -9
- package/lib/discovery/agent-surface-info.d.ts.map +1 -1
- package/lib/discovery/agent-surface-info.js +81 -45
- package/lib/discovery/agent-surface-info.js.map +1 -1
- package/lib/discovery/agent-surface.d.ts +2 -22
- package/lib/discovery/agent-surface.d.ts.map +1 -1
- package/lib/discovery/agent-surface.js +72 -287
- package/lib/discovery/agent-surface.js.map +1 -1
- package/lib/discovery/agents.d.ts +10 -12
- package/lib/discovery/agents.d.ts.map +1 -1
- package/lib/discovery/agents.js +91 -90
- package/lib/discovery/agents.js.map +1 -1
- package/lib/discovery/utils.d.ts +2 -15
- package/lib/discovery/utils.d.ts.map +1 -1
- package/lib/discovery/utils.js +2 -76
- package/lib/discovery/utils.js.map +1 -1
- package/lib/event/agent-stream-hooks.d.ts +0 -2
- package/lib/event/agent-stream-hooks.d.ts.map +1 -1
- package/lib/event/agent-stream-hooks.js +0 -8
- package/lib/event/agent-stream-hooks.js.map +1 -1
- package/lib/event/ai-event-bus.d.ts +13 -0
- package/lib/event/ai-event-bus.d.ts.map +1 -0
- package/lib/event/ai-event-bus.js +45 -0
- package/lib/event/ai-event-bus.js.map +1 -0
- package/lib/event/event-emitter.d.ts +8 -14
- package/lib/event/event-emitter.d.ts.map +1 -1
- package/lib/event/event-emitter.js +7 -37
- package/lib/event/event-emitter.js.map +1 -1
- package/lib/index.d.ts +42 -75
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +29 -59
- package/lib/index.js.map +1 -1
- package/lib/init/activate-ai-database-storage.d.ts +1 -1
- package/lib/init/activate-ai-database-storage.d.ts.map +1 -1
- package/lib/init/activate-ai-database-storage.js +28 -32
- package/lib/init/activate-ai-database-storage.js.map +1 -1
- package/lib/init/compose-zhin-agent-runtime.d.ts +2 -0
- package/lib/init/compose-zhin-agent-runtime.d.ts.map +1 -1
- package/lib/init/compose-zhin-agent-runtime.js +1 -0
- package/lib/init/compose-zhin-agent-runtime.js.map +1 -1
- package/lib/init/configure-zhin-agent.d.ts +3 -4
- package/lib/init/configure-zhin-agent.d.ts.map +1 -1
- package/lib/init/configure-zhin-agent.js +9 -7
- package/lib/init/configure-zhin-agent.js.map +1 -1
- package/lib/init/define-ai-database-models.js +1 -1
- package/lib/init/dispose-zhin-agent.d.ts +1 -1
- package/lib/init/dispose-zhin-agent.d.ts.map +1 -1
- package/lib/init/dispose-zhin-agent.js +0 -1
- package/lib/init/dispose-zhin-agent.js.map +1 -1
- package/lib/init/runtime-management-commands.d.ts +1 -2
- package/lib/init/runtime-management-commands.d.ts.map +1 -1
- package/lib/init/runtime-management-commands.js.map +1 -1
- package/lib/internal/agent-host.d.ts +10 -5
- package/lib/internal/agent-host.d.ts.map +1 -1
- package/lib/internal/host-types.d.ts +5 -7
- package/lib/internal/host-types.d.ts.map +1 -1
- package/lib/journal/file-journal-store.d.ts.map +1 -1
- package/lib/journal/file-journal-store.js +10 -6
- package/lib/journal/file-journal-store.js.map +1 -1
- package/lib/mcp-client/bridge.d.ts +1 -2
- package/lib/mcp-client/bridge.d.ts.map +1 -1
- package/lib/mcp-client/bridge.js +1 -2
- package/lib/mcp-client/bridge.js.map +1 -1
- package/lib/media/media-publisher.d.ts +1 -1
- package/lib/media/media-publisher.d.ts.map +1 -1
- package/lib/media/media-router.d.ts +4 -7
- package/lib/media/media-router.d.ts.map +1 -1
- package/lib/media/media-router.js +10 -26
- package/lib/media/media-router.js.map +1 -1
- package/lib/media/media-types.d.ts +4 -0
- package/lib/media/media-types.d.ts.map +1 -1
- package/lib/media/media-types.js.map +1 -1
- package/lib/media/resolve-config.d.ts +0 -1
- package/lib/media/resolve-config.d.ts.map +1 -1
- package/lib/media/resolve-config.js +0 -3
- package/lib/media/resolve-config.js.map +1 -1
- package/lib/media/subagent-inbound.d.ts +3 -2
- package/lib/media/subagent-inbound.d.ts.map +1 -1
- package/lib/media/subagent-inbound.js +5 -8
- package/lib/media/subagent-inbound.js.map +1 -1
- package/lib/memory/ai-compaction-strategy.d.ts +3 -2
- package/lib/memory/ai-compaction-strategy.d.ts.map +1 -1
- package/lib/memory/ai-compaction-strategy.js +4 -1
- package/lib/memory/ai-compaction-strategy.js.map +1 -1
- package/lib/memory/compaction-runtime.d.ts +23 -14
- package/lib/memory/compaction-runtime.d.ts.map +1 -1
- package/lib/memory/compaction-runtime.js +92 -76
- package/lib/memory/compaction-runtime.js.map +1 -1
- package/lib/memory/context-repository-store.js +1 -1
- package/lib/memory/context-repository-store.js.map +1 -1
- package/lib/memory/index.d.ts +2 -2
- package/lib/memory/index.d.ts.map +1 -1
- package/lib/memory/index.js +1 -1
- package/lib/memory/index.js.map +1 -1
- package/lib/memory/memory-system.d.ts.map +1 -1
- package/lib/memory/memory-system.js +5 -6
- package/lib/memory/memory-system.js.map +1 -1
- package/lib/memory-layers.d.ts +2 -6
- package/lib/memory-layers.d.ts.map +1 -1
- package/lib/memory-layers.js +23 -75
- package/lib/memory-layers.js.map +1 -1
- package/lib/orchestration/five-agent/index.d.ts.map +1 -0
- package/lib/orchestration/five-agent/index.js.map +1 -0
- package/lib/orchestration/five-agent/prompts.d.ts.map +1 -0
- package/lib/orchestration/five-agent/prompts.js.map +1 -0
- package/lib/orchestration/five-agent/role-capability-policy.d.ts.map +1 -0
- package/lib/orchestration/five-agent/role-capability-policy.js.map +1 -0
- package/lib/orchestration/five-agent/roles.d.ts.map +1 -0
- package/lib/orchestration/five-agent/roles.js.map +1 -0
- package/lib/plugin-ai-hook-bus.d.ts +3 -7
- package/lib/plugin-ai-hook-bus.d.ts.map +1 -1
- package/lib/plugin-ai-hook-bus.js +1 -7
- package/lib/plugin-ai-hook-bus.js.map +1 -1
- package/lib/plugin-runtime/agent-event-bus.d.ts +4 -0
- package/lib/plugin-runtime/agent-event-bus.d.ts.map +1 -0
- package/lib/plugin-runtime/agent-event-bus.js +4 -0
- package/lib/plugin-runtime/agent-event-bus.js.map +1 -0
- package/lib/plugin-runtime/agent-host-port.d.ts +0 -6
- package/lib/plugin-runtime/agent-host-port.d.ts.map +1 -1
- package/lib/plugin-runtime/agent-host-port.js.map +1 -1
- package/lib/plugin-runtime/agent-runtime.d.ts +1 -1
- package/lib/plugin-runtime/agent-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/agent-runtime.js +9 -4
- package/lib/plugin-runtime/agent-runtime.js.map +1 -1
- package/lib/plugin-runtime/capability-ingress.d.ts +1 -1
- package/lib/plugin-runtime/capability-ingress.d.ts.map +1 -1
- package/lib/plugin-runtime/capability-ingress.js +60 -16
- package/lib/plugin-runtime/capability-ingress.js.map +1 -1
- package/lib/plugin-runtime/capability-tools.d.ts.map +1 -1
- package/lib/plugin-runtime/capability-tools.js +5 -3
- package/lib/plugin-runtime/capability-tools.js.map +1 -1
- package/lib/plugin-runtime/deferred-capability-plan.d.ts +16 -0
- package/lib/plugin-runtime/deferred-capability-plan.d.ts.map +1 -1
- package/lib/plugin-runtime/deferred-capability-plan.js +88 -21
- package/lib/plugin-runtime/deferred-capability-plan.js.map +1 -1
- package/lib/plugin-runtime/file-edit-quote-utils.d.ts.map +1 -0
- package/lib/plugin-runtime/file-edit-quote-utils.js.map +1 -0
- package/lib/plugin-runtime/full-agent-turn-engine.d.ts.map +1 -1
- package/lib/plugin-runtime/full-agent-turn-engine.js +21 -12
- package/lib/plugin-runtime/full-agent-turn-engine.js.map +1 -1
- package/lib/plugin-runtime/github-actions-delivery-provider.d.ts +44 -0
- package/lib/plugin-runtime/github-actions-delivery-provider.d.ts.map +1 -0
- package/lib/plugin-runtime/github-actions-delivery-provider.js +246 -0
- package/lib/plugin-runtime/github-actions-delivery-provider.js.map +1 -0
- package/lib/plugin-runtime/github-exact-merge-gateway.d.ts +62 -0
- package/lib/plugin-runtime/github-exact-merge-gateway.d.ts.map +1 -0
- package/lib/plugin-runtime/github-exact-merge-gateway.js +79 -0
- package/lib/plugin-runtime/github-exact-merge-gateway.js.map +1 -0
- package/lib/plugin-runtime/github-workroom-capability.d.ts +15 -0
- package/lib/plugin-runtime/github-workroom-capability.d.ts.map +1 -0
- package/lib/plugin-runtime/github-workroom-capability.js +79 -0
- package/lib/plugin-runtime/github-workroom-capability.js.map +1 -0
- package/lib/plugin-runtime/host-tool-projection.d.ts +1 -1
- package/lib/plugin-runtime/host-tool-projection.d.ts.map +1 -1
- package/lib/plugin-runtime/host-tool-projection.js +5 -3
- package/lib/plugin-runtime/host-tool-projection.js.map +1 -1
- package/lib/plugin-runtime/index.d.ts +28 -1
- package/lib/plugin-runtime/index.d.ts.map +1 -1
- package/lib/plugin-runtime/index.js +25 -1
- package/lib/plugin-runtime/index.js.map +1 -1
- package/lib/plugin-runtime/native-bash-tool.d.ts +35 -0
- package/lib/plugin-runtime/native-bash-tool.d.ts.map +1 -0
- package/lib/plugin-runtime/native-bash-tool.js +110 -0
- package/lib/plugin-runtime/native-bash-tool.js.map +1 -0
- package/lib/plugin-runtime/native-file-tools.d.ts.map +1 -1
- package/lib/plugin-runtime/native-file-tools.js +10 -9
- package/lib/plugin-runtime/native-file-tools.js.map +1 -1
- package/lib/plugin-runtime/native-image-tool.d.ts +12 -0
- package/lib/plugin-runtime/native-image-tool.d.ts.map +1 -0
- package/lib/plugin-runtime/native-image-tool.js +73 -0
- package/lib/plugin-runtime/native-image-tool.js.map +1 -0
- package/lib/plugin-runtime/native-interaction-tools.js +1 -1
- package/lib/plugin-runtime/native-interaction-tools.js.map +1 -1
- package/lib/plugin-runtime/native-knowledge-tool.d.ts +34 -0
- package/lib/plugin-runtime/native-knowledge-tool.d.ts.map +1 -0
- package/lib/plugin-runtime/native-knowledge-tool.js +170 -0
- package/lib/plugin-runtime/native-knowledge-tool.js.map +1 -0
- package/lib/plugin-runtime/native-semantic-memory-tools.js +2 -2
- package/lib/plugin-runtime/native-semantic-memory-tools.js.map +1 -1
- package/lib/plugin-runtime/native-todo-tools.js +2 -2
- package/lib/plugin-runtime/native-todo-tools.js.map +1 -1
- package/lib/plugin-runtime/native-tool-suite.d.ts +15 -0
- package/lib/plugin-runtime/native-tool-suite.d.ts.map +1 -0
- package/lib/plugin-runtime/native-tool-suite.js +18 -0
- package/lib/plugin-runtime/native-tool-suite.js.map +1 -0
- package/lib/plugin-runtime/native-web-tools.d.ts.map +1 -1
- package/lib/plugin-runtime/native-web-tools.js +6 -19
- package/lib/plugin-runtime/native-web-tools.js.map +1 -1
- package/lib/plugin-runtime/schedule-capability-plan.js +6 -1
- package/lib/plugin-runtime/schedule-capability-plan.js.map +1 -1
- package/lib/plugin-runtime/self-delivery-project-composition.d.ts +25 -0
- package/lib/plugin-runtime/self-delivery-project-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/self-delivery-project-composition.js +85 -0
- package/lib/plugin-runtime/self-delivery-project-composition.js.map +1 -0
- package/lib/plugin-runtime/self-delivery-project.d.ts +65 -0
- package/lib/plugin-runtime/self-delivery-project.d.ts.map +1 -0
- package/lib/plugin-runtime/self-delivery-project.js +140 -0
- package/lib/plugin-runtime/self-delivery-project.js.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts +1 -1
- package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts +1 -1
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts +1 -1
- package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts +3 -77
- package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-assignment-authority-provider.js +10 -110
- package/lib/plugin-runtime/workroom-assignment-authority-provider.js.map +1 -1
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts +1 -1
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts +4 -38
- package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-data-governance-runtime.js +1 -1
- package/lib/plugin-runtime/workroom-data-governance-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-delivery-gateway.d.ts +96 -0
- package/lib/plugin-runtime/workroom-delivery-gateway.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-delivery-gateway.js +129 -0
- package/lib/plugin-runtime/workroom-delivery-gateway.js.map +1 -0
- package/lib/plugin-runtime/workroom-effect-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-effect-composition.js +12 -1
- package/lib/plugin-runtime/workroom-effect-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-effect-production.d.ts +5 -0
- package/lib/plugin-runtime/workroom-effect-production.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-effect-production.js +22 -3
- package/lib/plugin-runtime/workroom-effect-production.js.map +1 -1
- package/lib/plugin-runtime/workroom-effect-runtime.d.ts +1 -17
- package/lib/plugin-runtime/workroom-effect-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-effect-runtime.js +77 -17
- package/lib/plugin-runtime/workroom-effect-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts +8 -3
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.js +21 -18
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts +1 -1
- package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-journal-payload-composition.js +1 -1
- package/lib/plugin-runtime/workroom-journal-payload-composition.js.map +1 -1
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.js +3 -3
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.js.map +1 -1
- package/lib/plugin-runtime/workroom-local-agent-loop.d.ts +1 -1
- package/lib/plugin-runtime/workroom-local-agent-loop.d.ts.map +1 -1
- package/lib/{workroom/local-assignment-executor.d.ts → plugin-runtime/workroom-local-assignment-executor.d.ts} +4 -4
- package/lib/plugin-runtime/workroom-local-assignment-executor.d.ts.map +1 -0
- package/lib/{workroom/local-assignment-executor.js → plugin-runtime/workroom-local-assignment-executor.js} +3 -3
- package/lib/plugin-runtime/workroom-local-assignment-executor.js.map +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-runtime.js +1 -1
- package/lib/plugin-runtime/workroom-local-assignment-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts +1 -1
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts +1 -1
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts +1 -1
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-preemption-runtime.d.ts +1 -1
- package/lib/plugin-runtime/workroom-preemption-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-priority-authority.d.ts +11 -3
- package/lib/plugin-runtime/workroom-priority-authority.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-priority-authority.js +51 -47
- package/lib/plugin-runtime/workroom-priority-authority.js.map +1 -1
- package/lib/plugin-runtime/workroom-projection-outbound.d.ts +1 -1
- package/lib/plugin-runtime/workroom-projection-outbound.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-projection-runtime.d.ts +3 -3
- package/lib/plugin-runtime/workroom-projection-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-projection-runtime.js +1 -1
- package/lib/plugin-runtime/workroom-projection-runtime.js.map +1 -1
- package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts +2 -2
- package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-remote-executor.d.ts +1 -12
- package/lib/plugin-runtime/workroom-remote-executor.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-remote-executor.js +1 -20
- package/lib/plugin-runtime/workroom-remote-executor.js.map +1 -1
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts +1 -1
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts +1 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts.map +1 -1
- package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts +1 -1
- package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts.map +1 -1
- package/lib/prompt/assembly.d.ts.map +1 -1
- package/lib/prompt/assembly.js +1 -2
- package/lib/prompt/assembly.js.map +1 -1
- package/lib/prompt/git-context.d.ts +0 -2
- package/lib/prompt/git-context.d.ts.map +1 -1
- package/lib/prompt/git-context.js +1 -12
- package/lib/prompt/git-context.js.map +1 -1
- package/lib/prompt/index.d.ts +1 -1
- package/lib/prompt/index.d.ts.map +1 -1
- package/lib/prompt/index.js +1 -1
- package/lib/prompt/index.js.map +1 -1
- package/lib/prompt/prompt-assembly-registry.d.ts +1 -1
- package/lib/prompt/prompt-assembly-registry.d.ts.map +1 -1
- package/lib/prompt/prompt-assembly-registry.js.map +1 -1
- package/lib/prompt/system-prompt.d.ts +1 -1
- package/lib/prompt/system-prompt.d.ts.map +1 -1
- package/lib/prompt/system-prompt.js +1 -2
- package/lib/prompt/system-prompt.js.map +1 -1
- package/lib/prompt/templates.d.ts +2 -5
- package/lib/prompt/templates.d.ts.map +1 -1
- package/lib/prompt/templates.js +2 -16
- package/lib/prompt/templates.js.map +1 -1
- package/lib/prompt/workspace-prompt.d.ts +0 -1
- package/lib/prompt/workspace-prompt.d.ts.map +1 -1
- package/lib/prompt/workspace-prompt.js +1 -14
- package/lib/prompt/workspace-prompt.js.map +1 -1
- package/lib/reserved-tools.d.ts.map +1 -1
- package/lib/reserved-tools.js +0 -3
- package/lib/reserved-tools.js.map +1 -1
- package/lib/resource-hub/hook-registry.d.ts +1 -1
- package/lib/resource-hub/hook-registry.d.ts.map +1 -1
- package/lib/resource-hub/hook-registry.js +3 -15
- package/lib/resource-hub/hook-registry.js.map +1 -1
- package/lib/resource-hub/index.d.ts +4 -16
- package/lib/resource-hub/index.d.ts.map +1 -1
- package/lib/resource-hub/index.js +3 -20
- package/lib/resource-hub/index.js.map +1 -1
- package/lib/resource-hub/mcp-registry.js +1 -1
- package/lib/resource-hub/mcp-registry.js.map +1 -1
- package/lib/resource-hub/public-api.d.ts +0 -1
- package/lib/resource-hub/public-api.d.ts.map +1 -1
- package/lib/resource-hub/resolve-subagent-tools.d.ts.map +1 -1
- package/lib/resource-hub/resolve-subagent-tools.js +6 -4
- package/lib/resource-hub/resolve-subagent-tools.js.map +1 -1
- package/lib/resource-hub/role-configs.js +4 -4
- package/lib/resource-hub/role-configs.js.map +1 -1
- package/lib/resource-hub/skill-registry.d.ts +1 -1
- package/lib/resource-hub/skill-registry.js +1 -1
- package/lib/resource-hub/subagent-registry.d.ts +0 -2
- package/lib/resource-hub/subagent-registry.d.ts.map +1 -1
- package/lib/resource-hub/subagent-registry.js +0 -2
- package/lib/resource-hub/subagent-registry.js.map +1 -1
- package/lib/resource-hub/tool-selection.d.ts +4 -30
- package/lib/resource-hub/tool-selection.d.ts.map +1 -1
- package/lib/resource-hub/tool-selection.js +4 -289
- package/lib/resource-hub/tool-selection.js.map +1 -1
- package/lib/resource-hub/types.d.ts +6 -1
- package/lib/resource-hub/types.d.ts.map +1 -1
- package/lib/routing/route-matcher.d.ts +1 -1
- package/lib/routing/route-matcher.js +1 -1
- package/lib/schedule-manager.d.ts.map +1 -1
- package/lib/schedule-manager.js.map +1 -1
- package/lib/seam/index.d.ts +3 -3
- package/lib/seam/index.d.ts.map +1 -1
- package/lib/seam/index.js +1 -1
- package/lib/seam/index.js.map +1 -1
- package/lib/seam/seam-integration.d.ts +1 -9
- package/lib/seam/seam-integration.d.ts.map +1 -1
- package/lib/seam/seam-integration.js +0 -18
- package/lib/seam/seam-integration.js.map +1 -1
- package/lib/seam/skill-service.d.ts +0 -15
- package/lib/seam/skill-service.d.ts.map +1 -1
- package/lib/seam/tokens.d.ts +0 -3
- package/lib/seam/tokens.d.ts.map +1 -1
- package/lib/seam/tokens.js +0 -2
- package/lib/seam/tokens.js.map +1 -1
- package/lib/seam/tool-service.d.ts +3 -3
- package/lib/seam/tool-service.d.ts.map +1 -1
- package/lib/security/anomaly-detection.d.ts +2 -7
- package/lib/security/anomaly-detection.d.ts.map +1 -1
- package/lib/security/anomaly-detection.js +2 -20
- package/lib/security/anomaly-detection.js.map +1 -1
- package/lib/security/audit-logger.d.ts +0 -13
- package/lib/security/audit-logger.d.ts.map +1 -1
- package/lib/security/audit-logger.js +0 -30
- package/lib/security/audit-logger.js.map +1 -1
- package/lib/security/comm-message-context.d.ts +4 -0
- package/lib/security/comm-message-context.d.ts.map +1 -1
- package/lib/security/comm-message-context.js +9 -1
- package/lib/security/comm-message-context.js.map +1 -1
- package/lib/security/dangerous-tool-policy.d.ts +3 -3
- package/lib/security/dangerous-tool-policy.d.ts.map +1 -1
- package/lib/security/dangerous-tool-policy.js +8 -28
- package/lib/security/dangerous-tool-policy.js.map +1 -1
- package/lib/security/exec-policy.d.ts +4 -4
- package/lib/security/exec-policy.d.ts.map +1 -1
- package/lib/security/exec-policy.js +21 -62
- package/lib/security/exec-policy.js.map +1 -1
- package/lib/security/file-policy.d.ts.map +1 -1
- package/lib/security/file-policy.js +9 -57
- package/lib/security/file-policy.js.map +1 -1
- package/lib/security/file-role-policy.d.ts +1 -5
- package/lib/security/file-role-policy.d.ts.map +1 -1
- package/lib/security/file-role-policy.js +1 -25
- package/lib/security/file-role-policy.js.map +1 -1
- package/lib/security/index.d.ts +1 -1
- package/lib/security/index.d.ts.map +1 -1
- package/lib/security/index.js +1 -1
- package/lib/security/index.js.map +1 -1
- package/lib/security/owner-approval-contracts.d.ts +6 -0
- package/lib/security/owner-approval-contracts.d.ts.map +1 -0
- package/lib/security/owner-approval-contracts.js +2 -0
- package/lib/security/owner-approval-contracts.js.map +1 -0
- package/lib/security/owner-approval-runtime.d.ts +39 -0
- package/lib/security/owner-approval-runtime.d.ts.map +1 -0
- package/lib/security/owner-approval-runtime.js +159 -0
- package/lib/security/owner-approval-runtime.js.map +1 -0
- package/lib/security/owner-approval-store.d.ts +34 -0
- package/lib/security/owner-approval-store.d.ts.map +1 -0
- package/lib/security/owner-approval-store.js +154 -0
- package/lib/security/owner-approval-store.js.map +1 -0
- package/lib/security/policy-facade.d.ts +8 -15
- package/lib/security/policy-facade.d.ts.map +1 -1
- package/lib/security/policy-facade.js +33 -38
- package/lib/security/policy-facade.js.map +1 -1
- package/lib/security/sandbox.d.ts +0 -13
- package/lib/security/sandbox.d.ts.map +1 -1
- package/lib/security/sandbox.js +0 -21
- package/lib/security/sandbox.js.map +1 -1
- package/lib/security/turn-file-authority.d.ts.map +1 -1
- package/lib/security/turn-file-authority.js +0 -1
- package/lib/security/turn-file-authority.js.map +1 -1
- package/lib/service.d.ts +15 -19
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +42 -39
- package/lib/service.js.map +1 -1
- package/lib/session/approval-port.d.ts +16 -0
- package/lib/session/approval-port.d.ts.map +1 -1
- package/lib/session/approval-port.js.map +1 -1
- package/lib/session/approval-review-agent.d.ts +29 -0
- package/lib/session/approval-review-agent.d.ts.map +1 -0
- package/lib/session/approval-review-agent.js +183 -0
- package/lib/session/approval-review-agent.js.map +1 -0
- package/lib/session/branch-summarization-runtime.d.ts.map +1 -1
- package/lib/session/branch-summarization-runtime.js +3 -2
- package/lib/session/branch-summarization-runtime.js.map +1 -1
- package/lib/session/index.d.ts +2 -2
- package/lib/session/index.d.ts.map +1 -1
- package/lib/session/index.js +2 -2
- package/lib/session/index.js.map +1 -1
- package/lib/session/session-io.d.ts +7 -14
- package/lib/session/session-io.d.ts.map +1 -1
- package/lib/session/session-io.js +14 -47
- package/lib/session/session-io.js.map +1 -1
- package/lib/session/turn-ingress-session.d.ts +2 -5
- package/lib/session/turn-ingress-session.d.ts.map +1 -1
- package/lib/session/turn-ingress-session.js +8 -51
- package/lib/session/turn-ingress-session.js.map +1 -1
- package/lib/skill/skill-instruction-reader-factory.d.ts +5 -0
- package/lib/skill/skill-instruction-reader-factory.d.ts.map +1 -0
- package/lib/skill/skill-instruction-reader-factory.js +13 -0
- package/lib/skill/skill-instruction-reader-factory.js.map +1 -0
- package/lib/skill/skill-instruction-reader.d.ts +22 -0
- package/lib/skill/skill-instruction-reader.d.ts.map +1 -0
- package/lib/skill/skill-instruction-reader.js +44 -0
- package/lib/skill/skill-instruction-reader.js.map +1 -0
- package/lib/skill/skill-instructions.d.ts +5 -0
- package/lib/skill/skill-instructions.d.ts.map +1 -0
- package/lib/skill/skill-instructions.js +78 -0
- package/lib/skill/skill-instructions.js.map +1 -0
- package/lib/skill/skill-system.js +3 -3
- package/lib/skill/skill-system.js.map +1 -1
- package/lib/{builtin → spawn}/spawn-task-tool.d.ts +5 -6
- package/lib/spawn/spawn-task-tool.d.ts.map +1 -0
- package/lib/{builtin → spawn}/spawn-task-tool.js +17 -15
- package/lib/spawn/spawn-task-tool.js.map +1 -0
- package/lib/stability/memory-pressure.d.ts +5 -4
- package/lib/stability/memory-pressure.d.ts.map +1 -1
- package/lib/stability/memory-pressure.js +14 -23
- package/lib/stability/memory-pressure.js.map +1 -1
- package/lib/standalone/standalone-tool-catalog.d.ts +13 -0
- package/lib/standalone/standalone-tool-catalog.d.ts.map +1 -0
- package/lib/standalone/standalone-tool-catalog.js +46 -0
- package/lib/standalone/standalone-tool-catalog.js.map +1 -0
- package/lib/subagent/subagent-runtime.d.ts +7 -5
- package/lib/subagent/subagent-runtime.d.ts.map +1 -1
- package/lib/subagent/subagent-runtime.js +13 -16
- package/lib/subagent/subagent-runtime.js.map +1 -1
- package/lib/subagent/subagent-system-init.d.ts +2 -1
- package/lib/subagent/subagent-system-init.d.ts.map +1 -1
- package/lib/subagent/subagent-system-init.js +1 -0
- package/lib/subagent/subagent-system-init.js.map +1 -1
- package/lib/subagent-ai-events.d.ts +3 -2
- package/lib/subagent-ai-events.d.ts.map +1 -1
- package/lib/subagent-ai-events.js.map +1 -1
- package/lib/subagent-parent-context.js +1 -1
- package/lib/subagent-parent-context.js.map +1 -1
- package/lib/subagent-prompt.d.ts +1 -1
- package/lib/subagent-prompt.js +2 -5
- package/lib/subagent-prompt.js.map +1 -1
- package/lib/task-executor.d.ts +2 -14
- package/lib/task-executor.d.ts.map +1 -1
- package/lib/task-executor.js +2 -11
- package/lib/task-executor.js.map +1 -1
- package/lib/tool/builtin-policy-extractors.d.ts +2 -1
- package/lib/tool/builtin-policy-extractors.d.ts.map +1 -1
- package/lib/tool/builtin-policy-extractors.js +18 -15
- package/lib/tool/builtin-policy-extractors.js.map +1 -1
- package/lib/tool/context-tools.js +1 -1
- package/lib/tool/context-tools.js.map +1 -1
- package/lib/tool/conversation-reference-tool.d.ts.map +1 -1
- package/lib/tool/conversation-reference-tool.js +1 -1
- package/lib/tool/conversation-reference-tool.js.map +1 -1
- package/lib/tool/deferred-resolution.js +2 -2
- package/lib/tool/deferred-resolution.js.map +1 -1
- package/lib/tool/executable-tool-registry.d.ts +11 -0
- package/lib/tool/executable-tool-registry.d.ts.map +1 -0
- package/lib/tool/executable-tool-registry.js +25 -0
- package/lib/tool/executable-tool-registry.js.map +1 -0
- package/lib/tool/index.d.ts +1 -1
- package/lib/tool/index.d.ts.map +1 -1
- package/lib/tool/index.js +1 -1
- package/lib/tool/index.js.map +1 -1
- package/lib/tool/prepare-turn-tools.d.ts.map +1 -1
- package/lib/tool/prepare-turn-tools.js +1 -2
- package/lib/tool/prepare-turn-tools.js.map +1 -1
- package/lib/tool/sources.d.ts.map +1 -1
- package/lib/tool/sources.js +5 -4
- package/lib/tool/sources.js.map +1 -1
- package/lib/tool/tool-approval-gate.d.ts +1 -2
- package/lib/tool/tool-approval-gate.d.ts.map +1 -1
- package/lib/tool/tool-approval-gate.js +24 -0
- package/lib/tool/tool-approval-gate.js.map +1 -1
- package/lib/tool/tool-execution-authority.d.ts +26 -0
- package/lib/tool/tool-execution-authority.d.ts.map +1 -0
- package/lib/tool/tool-execution-authority.js +84 -0
- package/lib/tool/tool-execution-authority.js.map +1 -0
- package/lib/tool/tool-runtime.d.ts +10 -9
- package/lib/tool/tool-runtime.d.ts.map +1 -1
- package/lib/tool/tool-runtime.js +77 -79
- package/lib/tool/tool-runtime.js.map +1 -1
- package/lib/tool/tool-system.js +1 -1
- package/lib/tool/tool-system.js.map +1 -1
- package/lib/tool/turn-tool-runtime.d.ts +6 -2
- package/lib/tool/turn-tool-runtime.d.ts.map +1 -1
- package/lib/tool/turn-tool-runtime.js +19 -5
- package/lib/tool/turn-tool-runtime.js.map +1 -1
- package/lib/tool-catalog/deferred-turn-controller.d.ts +2 -2
- package/lib/tool-catalog/deferred-turn-controller.d.ts.map +1 -1
- package/lib/tool-catalog/deferred-turn-controller.js +4 -4
- package/lib/tool-catalog/deferred-turn-controller.js.map +1 -1
- package/lib/turn/deferred-auto-continue.js +1 -1
- package/lib/turn/deferred-auto-continue.js.map +1 -1
- package/lib/turn/deferred-delivery.js +1 -1
- package/lib/turn/deferred-delivery.js.map +1 -1
- package/lib/turn/inbound-media.d.ts +8 -1
- package/lib/turn/inbound-media.d.ts.map +1 -1
- package/lib/turn/inbound-media.js +4 -6
- package/lib/turn/inbound-media.js.map +1 -1
- package/lib/turn/index.d.ts +2 -2
- package/lib/turn/index.d.ts.map +1 -1
- package/lib/turn/index.js +2 -2
- package/lib/turn/index.js.map +1 -1
- package/lib/turn/persist-deferred-context.js +1 -1
- package/lib/turn/prompt-api.d.ts +3 -4
- package/lib/turn/prompt-api.d.ts.map +1 -1
- package/lib/turn/prompt-api.js +7 -11
- package/lib/turn/prompt-api.js.map +1 -1
- package/lib/turn/task-continuation.d.ts +0 -5
- package/lib/turn/task-continuation.d.ts.map +1 -1
- package/lib/turn/task-continuation.js +0 -15
- package/lib/turn/task-continuation.js.map +1 -1
- package/lib/turn/turn-ingress.d.ts +1 -1
- package/lib/turn/turn-ingress.d.ts.map +1 -1
- package/lib/turn/turn-metrics.d.ts +0 -4
- package/lib/turn/turn-metrics.d.ts.map +1 -1
- package/lib/turn/turn-metrics.js +0 -8
- package/lib/turn/turn-metrics.js.map +1 -1
- package/lib/turn/turn-pipeline.js +7 -4
- package/lib/turn/turn-pipeline.js.map +1 -1
- package/lib/typing-indicator/adapter-integration.d.ts +1 -4
- package/lib/typing-indicator/adapter-integration.d.ts.map +1 -1
- package/lib/typing-indicator/adapter-integration.js.map +1 -1
- package/lib/typing-indicator/index.d.ts +0 -17
- package/lib/typing-indicator/index.d.ts.map +1 -1
- package/lib/typing-indicator/index.js +0 -31
- package/lib/typing-indicator/index.js.map +1 -1
- package/lib/user-profile.d.ts +1 -1
- package/lib/user-profile.js +2 -2
- package/lib/user-profile.js.map +1 -1
- package/lib/utils/config-env.d.ts +1 -1
- package/lib/utils/config-env.js +1 -1
- package/lib/web/bing-search-html.d.ts.map +1 -0
- package/lib/{builtin → web}/bing-search-html.js +2 -6
- package/lib/web/bing-search-html.js.map +1 -0
- package/lib/web/web-search-locale.d.ts +5 -0
- package/lib/web/web-search-locale.d.ts.map +1 -0
- package/lib/web/web-search-locale.js +13 -0
- package/lib/web/web-search-locale.js.map +1 -0
- package/lib/{builtin → web}/web-tool-utils.d.ts +0 -1
- package/lib/web/web-tool-utils.d.ts.map +1 -0
- package/lib/{builtin → web}/web-tool-utils.js +0 -1
- package/lib/web/web-tool-utils.js.map +1 -0
- package/lib/workroom/acceptance-control.d.ts +2 -1
- package/lib/workroom/acceptance-control.d.ts.map +1 -1
- package/lib/workroom/acceptance-control.js +12 -2
- package/lib/workroom/acceptance-control.js.map +1 -1
- package/lib/workroom/accepted-source-memory-application.d.ts +1 -1
- package/lib/workroom/accepted-source-memory-application.d.ts.map +1 -1
- package/lib/workroom/assignment-authority-grant-application.d.ts +2 -2
- package/lib/workroom/assignment-authority-grant-application.d.ts.map +1 -1
- package/lib/workroom/assignment-authority-grant-application.js +1 -1
- package/lib/workroom/assignment-authority-grant-application.js.map +1 -1
- package/lib/workroom/assignment-authority-grant-repository.d.ts +2 -2
- package/lib/workroom/assignment-authority-grant-repository.d.ts.map +1 -1
- package/lib/workroom/assignment-authority-grant-repository.js +1 -1
- package/lib/workroom/assignment-authority-grant-repository.js.map +1 -1
- package/lib/workroom/assignment-authority.d.ts +75 -0
- package/lib/workroom/assignment-authority.d.ts.map +1 -0
- package/lib/workroom/assignment-authority.js +179 -0
- package/lib/workroom/assignment-authority.js.map +1 -0
- package/lib/workroom/catalog-definition.d.ts +0 -6
- package/lib/workroom/catalog-definition.d.ts.map +1 -1
- package/lib/workroom/catalog.d.ts +1 -1
- package/lib/workroom/catalog.js +2 -2
- package/lib/workroom/catalog.js.map +1 -1
- package/lib/workroom/coding-assignment-executor.d.ts +90 -0
- package/lib/workroom/coding-assignment-executor.d.ts.map +1 -0
- package/lib/workroom/coding-assignment-executor.js +250 -0
- package/lib/workroom/coding-assignment-executor.js.map +1 -0
- package/lib/workroom/coding-git-objects.d.ts +17 -0
- package/lib/workroom/coding-git-objects.d.ts.map +1 -0
- package/lib/workroom/coding-git-objects.js +68 -0
- package/lib/workroom/coding-git-objects.js.map +1 -0
- package/lib/workroom/durable-file-store.d.ts +4 -0
- package/lib/workroom/durable-file-store.d.ts.map +1 -1
- package/lib/workroom/durable-file-store.js +8 -0
- package/lib/workroom/durable-file-store.js.map +1 -1
- package/lib/workroom/effect-blocker-repository.d.ts +17 -1
- package/lib/workroom/effect-blocker-repository.d.ts.map +1 -1
- package/lib/workroom/effect-blocker-repository.js.map +1 -1
- package/lib/workroom/effect-ledger.d.ts +21 -1
- package/lib/workroom/effect-ledger.d.ts.map +1 -1
- package/lib/workroom/effect-ledger.js +44 -3
- package/lib/workroom/effect-ledger.js.map +1 -1
- package/lib/workroom/file-accepted-source-memory-repository.d.ts.map +1 -1
- package/lib/workroom/file-accepted-source-memory-repository.js +6 -3
- package/lib/workroom/file-accepted-source-memory-repository.js.map +1 -1
- package/lib/workroom/file-coding-execution-store.d.ts +25 -0
- package/lib/workroom/file-coding-execution-store.d.ts.map +1 -0
- package/lib/workroom/file-coding-execution-store.js +122 -0
- package/lib/workroom/file-coding-execution-store.js.map +1 -0
- package/lib/workroom/file-effect-ledger.d.ts.map +1 -1
- package/lib/workroom/file-effect-ledger.js +6 -3
- package/lib/workroom/file-effect-ledger.js.map +1 -1
- package/lib/workroom/file-profile-journal.d.ts +1 -0
- package/lib/workroom/file-profile-journal.d.ts.map +1 -1
- package/lib/workroom/file-profile-journal.js +3 -0
- package/lib/workroom/file-profile-journal.js.map +1 -1
- package/lib/workroom/git-workspace-gateway.d.ts +6 -3
- package/lib/workroom/git-workspace-gateway.d.ts.map +1 -1
- package/lib/workroom/git-workspace-gateway.js +10 -1
- package/lib/workroom/git-workspace-gateway.js.map +1 -1
- package/lib/workroom/github-workspace-transport.d.ts +30 -0
- package/lib/workroom/github-workspace-transport.d.ts.map +1 -0
- package/lib/workroom/github-workspace-transport.js +224 -0
- package/lib/workroom/github-workspace-transport.js.map +1 -0
- package/lib/{plugin-runtime/workroom-governed-dispatch-reasons.d.ts → workroom/governed-dispatch-reasons.d.ts} +2 -2
- package/lib/workroom/governed-dispatch-reasons.d.ts.map +1 -0
- package/lib/{plugin-runtime/workroom-governed-dispatch-reasons.js → workroom/governed-dispatch-reasons.js} +1 -1
- package/lib/workroom/governed-dispatch-reasons.js.map +1 -0
- package/lib/workroom/human-ingress-source-reader.d.ts +3 -3
- package/lib/workroom/human-ingress-source-reader.d.ts.map +1 -1
- package/lib/workroom/human-ingress-source-reader.js.map +1 -1
- package/lib/workroom/journal/activatable-journal.d.ts +15 -0
- package/lib/workroom/journal/activatable-journal.d.ts.map +1 -0
- package/lib/workroom/journal/activatable-journal.js +39 -0
- package/lib/workroom/journal/activatable-journal.js.map +1 -0
- package/lib/workroom/{journal.d.ts → journal/contracts.d.ts} +18 -96
- package/lib/workroom/journal/contracts.d.ts.map +1 -0
- package/lib/workroom/journal/contracts.js +19 -0
- package/lib/workroom/journal/contracts.js.map +1 -0
- package/lib/workroom/journal/database-journal.d.ts +31 -0
- package/lib/workroom/journal/database-journal.d.ts.map +1 -0
- package/lib/workroom/journal/database-journal.js +118 -0
- package/lib/workroom/journal/database-journal.js.map +1 -0
- package/lib/workroom/journal/event-codec.d.ts +26 -0
- package/lib/workroom/journal/event-codec.d.ts.map +1 -0
- package/lib/workroom/journal/event-codec.js +243 -0
- package/lib/workroom/journal/event-codec.js.map +1 -0
- package/lib/workroom/journal/event-validation.d.ts +10 -0
- package/lib/workroom/journal/event-validation.d.ts.map +1 -0
- package/lib/workroom/journal/event-validation.js +671 -0
- package/lib/workroom/journal/event-validation.js.map +1 -0
- package/lib/workroom/journal/file-journal.d.ts +15 -0
- package/lib/workroom/journal/file-journal.d.ts.map +1 -0
- package/lib/workroom/journal/file-journal.js +272 -0
- package/lib/workroom/journal/file-journal.js.map +1 -0
- package/lib/workroom/journal/index.d.ts +9 -0
- package/lib/workroom/journal/index.d.ts.map +1 -0
- package/lib/workroom/journal/index.js +8 -0
- package/lib/workroom/journal/index.js.map +1 -0
- package/lib/workroom/journal/memory-journal.d.ts +27 -0
- package/lib/workroom/journal/memory-journal.d.ts.map +1 -0
- package/lib/workroom/journal/memory-journal.js +103 -0
- package/lib/workroom/journal/memory-journal.js.map +1 -0
- package/lib/workroom/journal/payload-governance.d.ts +29 -0
- package/lib/workroom/journal/payload-governance.d.ts.map +1 -0
- package/lib/workroom/journal/payload-governance.js +282 -0
- package/lib/workroom/journal/payload-governance.js.map +1 -0
- package/lib/workroom/journal/payload-reference.d.ts +9 -0
- package/lib/workroom/journal/payload-reference.d.ts.map +1 -0
- package/lib/workroom/journal/payload-reference.js +60 -0
- package/lib/workroom/journal/payload-reference.js.map +1 -0
- package/lib/workroom/journal/stored-event-projection.d.ts +6 -0
- package/lib/workroom/journal/stored-event-projection.d.ts.map +1 -0
- package/lib/workroom/journal/stored-event-projection.js +280 -0
- package/lib/workroom/journal/stored-event-projection.js.map +1 -0
- package/lib/workroom/journal-model.d.ts +1 -1
- package/lib/workroom/journal-model.js +1 -1
- package/lib/workroom/journal-model.js.map +1 -1
- package/lib/workroom/kernel-state.d.ts.map +1 -1
- package/lib/workroom/kernel-state.js +35 -3
- package/lib/workroom/kernel-state.js.map +1 -1
- package/lib/workroom/{projection-outbox.d.ts → projection-outbox/contracts.d.ts} +8 -72
- package/lib/workroom/projection-outbox/contracts.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/contracts.js +11 -0
- package/lib/workroom/projection-outbox/contracts.js.map +1 -0
- package/lib/workroom/projection-outbox/delivery-worker.d.ts +22 -0
- package/lib/workroom/projection-outbox/delivery-worker.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/delivery-worker.js +96 -0
- package/lib/workroom/projection-outbox/delivery-worker.js.map +1 -0
- package/lib/workroom/projection-outbox/file-repository.d.ts +11 -0
- package/lib/workroom/projection-outbox/file-repository.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/file-repository.js +89 -0
- package/lib/workroom/projection-outbox/file-repository.js.map +1 -0
- package/lib/workroom/projection-outbox/index.d.ts +10 -0
- package/lib/workroom/projection-outbox/index.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/index.js +8 -0
- package/lib/workroom/projection-outbox/index.js.map +1 -0
- package/lib/workroom/projection-outbox/memory-repository.d.ts +11 -0
- package/lib/workroom/projection-outbox/memory-repository.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/memory-repository.js +40 -0
- package/lib/workroom/projection-outbox/memory-repository.js.map +1 -0
- package/lib/workroom/projection-outbox/projector.d.ts +36 -0
- package/lib/workroom/projection-outbox/projector.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/projector.js +517 -0
- package/lib/workroom/projection-outbox/projector.js.map +1 -0
- package/lib/workroom/projection-outbox/repository-state.d.ts +17 -0
- package/lib/workroom/projection-outbox/repository-state.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/repository-state.js +343 -0
- package/lib/workroom/projection-outbox/repository-state.js.map +1 -0
- package/lib/workroom/projection-outbox/tracer.d.ts +19 -0
- package/lib/workroom/projection-outbox/tracer.d.ts.map +1 -0
- package/lib/workroom/projection-outbox/tracer.js +201 -0
- package/lib/workroom/projection-outbox/tracer.js.map +1 -0
- package/lib/workroom/remote-dispatch-admission.d.ts +2 -2
- package/lib/workroom/remote-dispatch-admission.d.ts.map +1 -1
- package/lib/workroom/remote-dispatch-admission.js +1 -1
- package/lib/workroom/remote-dispatch-admission.js.map +1 -1
- package/lib/workroom/remote-dispatch-outbox.d.ts +1 -0
- package/lib/workroom/remote-dispatch-outbox.d.ts.map +1 -1
- package/lib/workroom/remote-dispatch-outbox.js +3 -0
- package/lib/workroom/remote-dispatch-outbox.js.map +1 -1
- package/lib/workroom/remote-dispatch-worker.d.ts +1 -1
- package/lib/workroom/remote-dispatch-worker.d.ts.map +1 -1
- package/lib/workroom/remote-dispatch-worker.js +1 -1
- package/lib/workroom/remote-dispatch-worker.js.map +1 -1
- package/lib/workroom/remote-executor.d.ts +15 -0
- package/lib/workroom/remote-executor.d.ts.map +1 -0
- package/lib/workroom/remote-executor.js +21 -0
- package/lib/workroom/remote-executor.js.map +1 -0
- package/lib/workroom/runtime.d.ts +1 -1
- package/lib/workroom/runtime.d.ts.map +1 -1
- package/lib/workroom/software-delivery-plan.d.ts +32 -0
- package/lib/workroom/software-delivery-plan.d.ts.map +1 -0
- package/lib/workroom/software-delivery-plan.js +60 -0
- package/lib/workroom/software-delivery-plan.js.map +1 -0
- package/lib/workroom/validate-catalog.d.ts +2 -0
- package/lib/workroom/validate-catalog.d.ts.map +1 -0
- package/lib/workroom/validate-catalog.js +230 -0
- package/lib/workroom/validate-catalog.js.map +1 -0
- package/lib/workroom/workroom-kernel.d.ts +1 -1
- package/lib/workroom/workroom-kernel.d.ts.map +1 -1
- package/lib/workroom/workroom-kernel.js +31 -13
- package/lib/workroom/workroom-kernel.js.map +1 -1
- package/lib/workroom/workroom-preemption.d.ts +1 -1
- package/lib/workroom/workroom-preemption.d.ts.map +1 -1
- package/lib/workroom/workroom-scheduler-application.d.ts +1 -1
- package/lib/workroom/workroom-scheduler-application.d.ts.map +1 -1
- package/lib/workroom/workroom-scheduler-application.js +1 -1
- package/lib/workroom/workroom-scheduler-application.js.map +1 -1
- package/lib/workroom/workroom-scheduler.js +3 -0
- package/lib/workroom/workroom-scheduler.js.map +1 -1
- package/lib/zhin-agent/index.d.ts +12 -6
- package/lib/zhin-agent/index.d.ts.map +1 -1
- package/lib/zhin-agent/index.js +18 -12
- package/lib/zhin-agent/index.js.map +1 -1
- package/package.json +14 -29
- package/lib/activity-feedback/ai-bus.d.ts +0 -21
- package/lib/activity-feedback/ai-bus.d.ts.map +0 -1
- package/lib/activity-feedback/ai-bus.js +0 -59
- package/lib/activity-feedback/ai-bus.js.map +0 -1
- package/lib/ai-hook-handlers.d.ts +0 -8
- package/lib/ai-hook-handlers.d.ts.map +0 -1
- package/lib/ai-hook-handlers.js +0 -46
- package/lib/ai-hook-handlers.js.map +0 -1
- package/lib/authoring/define-agent.d.ts +0 -4
- package/lib/authoring/define-agent.d.ts.map +0 -1
- package/lib/authoring/define-agent.js +0 -8
- package/lib/authoring/define-agent.js.map +0 -1
- package/lib/authoring/define-connection.d.ts +0 -5
- package/lib/authoring/define-connection.d.ts.map +0 -1
- package/lib/authoring/define-connection.js +0 -8
- package/lib/authoring/define-connection.js.map +0 -1
- package/lib/authoring/define-schedule.d.ts +0 -4
- package/lib/authoring/define-schedule.d.ts.map +0 -1
- package/lib/authoring/define-schedule.js +0 -8
- package/lib/authoring/define-schedule.js.map +0 -1
- package/lib/authoring/define-tool.d.ts +0 -20
- package/lib/authoring/define-tool.d.ts.map +0 -1
- package/lib/authoring/define-tool.js +0 -28
- package/lib/authoring/define-tool.js.map +0 -1
- package/lib/authoring/entries/connections.d.ts +0 -3
- package/lib/authoring/entries/connections.d.ts.map +0 -1
- package/lib/authoring/entries/connections.js +0 -2
- package/lib/authoring/entries/connections.js.map +0 -1
- package/lib/authoring/entries/schedules.d.ts +0 -3
- package/lib/authoring/entries/schedules.d.ts.map +0 -1
- package/lib/authoring/entries/schedules.js +0 -2
- package/lib/authoring/entries/schedules.js.map +0 -1
- package/lib/authoring/entries/tools.d.ts +0 -5
- package/lib/authoring/entries/tools.d.ts.map +0 -1
- package/lib/authoring/entries/tools.js +0 -3
- package/lib/authoring/entries/tools.js.map +0 -1
- package/lib/authoring/tool-policy.d.ts +0 -3
- package/lib/authoring/tool-policy.d.ts.map +0 -1
- package/lib/authoring/tool-policy.js +0 -2
- package/lib/authoring/tool-policy.js.map +0 -1
- package/lib/authoring/zod-schema.d.ts +0 -10
- package/lib/authoring/zod-schema.d.ts.map +0 -1
- package/lib/authoring/zod-schema.js +0 -7
- package/lib/authoring/zod-schema.js.map +0 -1
- package/lib/builtin/analyze-media-tool.d.ts +0 -13
- package/lib/builtin/analyze-media-tool.d.ts.map +0 -1
- package/lib/builtin/analyze-media-tool.js +0 -94
- package/lib/builtin/analyze-media-tool.js.map +0 -1
- package/lib/builtin/bash-tool.d.ts +0 -29
- package/lib/builtin/bash-tool.d.ts.map +0 -1
- package/lib/builtin/bash-tool.js +0 -107
- package/lib/builtin/bash-tool.js.map +0 -1
- package/lib/builtin/bing-search-html.d.ts.map +0 -1
- package/lib/builtin/bing-search-html.js.map +0 -1
- package/lib/builtin/builtin-base-tool.d.ts +0 -27
- package/lib/builtin/builtin-base-tool.d.ts.map +0 -1
- package/lib/builtin/builtin-base-tool.js +0 -35
- package/lib/builtin/builtin-base-tool.js.map +0 -1
- package/lib/builtin/edit-file-tool.d.ts +0 -13
- package/lib/builtin/edit-file-tool.d.ts.map +0 -1
- package/lib/builtin/edit-file-tool.js +0 -86
- package/lib/builtin/edit-file-tool.js.map +0 -1
- package/lib/builtin/file-edit-quote-utils.d.ts.map +0 -1
- package/lib/builtin/file-edit-quote-utils.js.map +0 -1
- package/lib/builtin/five-agent/index.d.ts.map +0 -1
- package/lib/builtin/five-agent/index.js.map +0 -1
- package/lib/builtin/five-agent/prompts.d.ts.map +0 -1
- package/lib/builtin/five-agent/prompts.js.map +0 -1
- package/lib/builtin/five-agent/role-capability-policy.d.ts.map +0 -1
- package/lib/builtin/five-agent/role-capability-policy.js.map +0 -1
- package/lib/builtin/five-agent/roles.d.ts.map +0 -1
- package/lib/builtin/five-agent/roles.js.map +0 -1
- package/lib/builtin/generate-image-tool.d.ts +0 -21
- package/lib/builtin/generate-image-tool.d.ts.map +0 -1
- package/lib/builtin/generate-image-tool.js +0 -138
- package/lib/builtin/generate-image-tool.js.map +0 -1
- package/lib/builtin/glob-tool.d.ts +0 -23
- package/lib/builtin/glob-tool.d.ts.map +0 -1
- package/lib/builtin/glob-tool.js +0 -53
- package/lib/builtin/glob-tool.js.map +0 -1
- package/lib/builtin/grep-tool.d.ts +0 -23
- package/lib/builtin/grep-tool.d.ts.map +0 -1
- package/lib/builtin/grep-tool.js +0 -121
- package/lib/builtin/grep-tool.js.map +0 -1
- package/lib/builtin/install-skill-tool.d.ts +0 -24
- package/lib/builtin/install-skill-tool.d.ts.map +0 -1
- package/lib/builtin/install-skill-tool.js +0 -76
- package/lib/builtin/install-skill-tool.js.map +0 -1
- package/lib/builtin/knowledge-search-tool.d.ts +0 -6
- package/lib/builtin/knowledge-search-tool.d.ts.map +0 -1
- package/lib/builtin/knowledge-search-tool.js +0 -184
- package/lib/builtin/knowledge-search-tool.js.map +0 -1
- package/lib/builtin/list-dir-tool.d.ts +0 -13
- package/lib/builtin/list-dir-tool.d.ts.map +0 -1
- package/lib/builtin/list-dir-tool.js +0 -57
- package/lib/builtin/list-dir-tool.js.map +0 -1
- package/lib/builtin/load-skill-tool.d.ts +0 -20
- package/lib/builtin/load-skill-tool.d.ts.map +0 -1
- package/lib/builtin/load-skill-tool.js +0 -60
- package/lib/builtin/load-skill-tool.js.map +0 -1
- package/lib/builtin/read-file-tool.d.ts +0 -14
- package/lib/builtin/read-file-tool.d.ts.map +0 -1
- package/lib/builtin/read-file-tool.js +0 -74
- package/lib/builtin/read-file-tool.js.map +0 -1
- package/lib/builtin/run-deferred-task-tool.d.ts +0 -23
- package/lib/builtin/run-deferred-task-tool.d.ts.map +0 -1
- package/lib/builtin/run-deferred-task-tool.js +0 -41
- package/lib/builtin/run-deferred-task-tool.js.map +0 -1
- package/lib/builtin/spawn-task-tool.d.ts.map +0 -1
- package/lib/builtin/spawn-task-tool.js.map +0 -1
- package/lib/builtin/todo-read-tool.d.ts +0 -14
- package/lib/builtin/todo-read-tool.d.ts.map +0 -1
- package/lib/builtin/todo-read-tool.js +0 -56
- package/lib/builtin/todo-read-tool.js.map +0 -1
- package/lib/builtin/todo-write-tool.d.ts +0 -14
- package/lib/builtin/todo-write-tool.d.ts.map +0 -1
- package/lib/builtin/todo-write-tool.js +0 -54
- package/lib/builtin/todo-write-tool.js.map +0 -1
- package/lib/builtin/web-fetch-tool.d.ts +0 -21
- package/lib/builtin/web-fetch-tool.d.ts.map +0 -1
- package/lib/builtin/web-fetch-tool.js +0 -86
- package/lib/builtin/web-fetch-tool.js.map +0 -1
- package/lib/builtin/web-search-locale.d.ts +0 -16
- package/lib/builtin/web-search-locale.d.ts.map +0 -1
- package/lib/builtin/web-search-locale.js +0 -74
- package/lib/builtin/web-search-locale.js.map +0 -1
- package/lib/builtin/web-search-tool.d.ts +0 -20
- package/lib/builtin/web-search-tool.d.ts.map +0 -1
- package/lib/builtin/web-search-tool.js +0 -115
- package/lib/builtin/web-search-tool.js.map +0 -1
- package/lib/builtin/web-tool-utils.d.ts.map +0 -1
- package/lib/builtin/web-tool-utils.js.map +0 -1
- package/lib/builtin/write-file-tool.d.ts +0 -13
- package/lib/builtin/write-file-tool.d.ts.map +0 -1
- package/lib/builtin/write-file-tool.js +0 -55
- package/lib/builtin/write-file-tool.js.map +0 -1
- package/lib/builtin-tools.d.ts +0 -25
- package/lib/builtin-tools.d.ts.map +0 -1
- package/lib/builtin-tools.js +0 -54
- package/lib/builtin-tools.js.map +0 -1
- package/lib/defaults/hooks.d.ts +0 -6
- package/lib/defaults/hooks.d.ts.map +0 -1
- package/lib/defaults/hooks.js +0 -9
- package/lib/defaults/hooks.js.map +0 -1
- package/lib/defaults/subagents.d.ts +0 -6
- package/lib/defaults/subagents.d.ts.map +0 -1
- package/lib/defaults/subagents.js +0 -23
- package/lib/defaults/subagents.js.map +0 -1
- package/lib/defaults/tools.d.ts +0 -5
- package/lib/defaults/tools.d.ts.map +0 -1
- package/lib/defaults/tools.js +0 -6
- package/lib/defaults/tools.js.map +0 -1
- package/lib/discovery/index.d.ts +0 -5
- package/lib/discovery/index.d.ts.map +0 -1
- package/lib/discovery/index.js +0 -5
- package/lib/discovery/index.js.map +0 -1
- package/lib/discovery/skills.d.ts +0 -53
- package/lib/discovery/skills.d.ts.map +0 -1
- package/lib/discovery/skills.js +0 -306
- package/lib/discovery/skills.js.map +0 -1
- package/lib/discovery/tools.d.ts +0 -53
- package/lib/discovery/tools.d.ts.map +0 -1
- package/lib/discovery/tools.js +0 -305
- package/lib/discovery/tools.js.map +0 -1
- package/lib/features/agent-feature.d.ts +0 -23
- package/lib/features/agent-feature.d.ts.map +0 -1
- package/lib/features/agent-feature.js +0 -51
- package/lib/features/agent-feature.js.map +0 -1
- package/lib/features/index.d.ts +0 -3
- package/lib/features/index.d.ts.map +0 -1
- package/lib/features/index.js +0 -3
- package/lib/features/index.js.map +0 -1
- package/lib/features/mcp-feature.d.ts +0 -25
- package/lib/features/mcp-feature.d.ts.map +0 -1
- package/lib/features/mcp-feature.js +0 -52
- package/lib/features/mcp-feature.js.map +0 -1
- package/lib/hooks.d.ts +0 -144
- package/lib/hooks.d.ts.map +0 -1
- package/lib/hooks.js +0 -82
- package/lib/hooks.js.map +0 -1
- package/lib/ingress/capability-ingress.d.ts +0 -76
- package/lib/ingress/capability-ingress.d.ts.map +0 -1
- package/lib/ingress/capability-ingress.js +0 -274
- package/lib/ingress/capability-ingress.js.map +0 -1
- package/lib/ingress/index.d.ts +0 -2
- package/lib/ingress/index.d.ts.map +0 -1
- package/lib/ingress/index.js +0 -2
- package/lib/ingress/index.js.map +0 -1
- package/lib/init/introspection-args.d.ts +0 -37
- package/lib/init/introspection-args.d.ts.map +0 -1
- package/lib/init/introspection-args.js +0 -71
- package/lib/init/introspection-args.js.map +0 -1
- package/lib/init/introspection-collectors.d.ts +0 -26
- package/lib/init/introspection-collectors.d.ts.map +0 -1
- package/lib/init/introspection-collectors.js +0 -108
- package/lib/init/introspection-collectors.js.map +0 -1
- package/lib/init/introspection-commands-format.d.ts +0 -40
- package/lib/init/introspection-commands-format.d.ts.map +0 -1
- package/lib/init/introspection-commands-format.js +0 -93
- package/lib/init/introspection-commands-format.js.map +0 -1
- package/lib/init/introspection-pagination.d.ts +0 -14
- package/lib/init/introspection-pagination.d.ts.map +0 -1
- package/lib/init/introspection-pagination.js +0 -33
- package/lib/init/introspection-pagination.js.map +0 -1
- package/lib/init/introspection-rest.d.ts +0 -24
- package/lib/init/introspection-rest.d.ts.map +0 -1
- package/lib/init/introspection-rest.js +0 -65
- package/lib/init/introspection-rest.js.map +0 -1
- package/lib/init/upgrade-agent-db-schema.d.ts +0 -49
- package/lib/init/upgrade-agent-db-schema.d.ts.map +0 -1
- package/lib/init/upgrade-agent-db-schema.js +0 -210
- package/lib/init/upgrade-agent-db-schema.js.map +0 -1
- package/lib/init/upgrade-endpoint-id-schema.d.ts +0 -12
- package/lib/init/upgrade-endpoint-id-schema.d.ts.map +0 -1
- package/lib/init/upgrade-endpoint-id-schema.js +0 -58
- package/lib/init/upgrade-endpoint-id-schema.js.map +0 -1
- package/lib/plugin-runtime/workroom-governed-dispatch-reasons.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-governed-dispatch-reasons.js.map +0 -1
- package/lib/resource-hub/tool-registry.d.ts +0 -60
- package/lib/resource-hub/tool-registry.d.ts.map +0 -1
- package/lib/resource-hub/tool-registry.js +0 -228
- package/lib/resource-hub/tool-registry.js.map +0 -1
- package/lib/security/owner-approve-always-store.d.ts +0 -67
- package/lib/security/owner-approve-always-store.d.ts.map +0 -1
- package/lib/security/owner-approve-always-store.js +0 -510
- package/lib/security/owner-approve-always-store.js.map +0 -1
- package/lib/security/turn-sandbox-authority.d.ts +0 -13
- package/lib/security/turn-sandbox-authority.d.ts.map +0 -1
- package/lib/security/turn-sandbox-authority.js +0 -42
- package/lib/security/turn-sandbox-authority.js.map +0 -1
- package/lib/skill/skill-load-opts.d.ts +0 -5
- package/lib/skill/skill-load-opts.d.ts.map +0 -1
- package/lib/skill/skill-load-opts.js +0 -14
- package/lib/skill/skill-load-opts.js.map +0 -1
- package/lib/stability/registry-cleanup.d.ts +0 -5
- package/lib/stability/registry-cleanup.d.ts.map +0 -1
- package/lib/stability/registry-cleanup.js +0 -20
- package/lib/stability/registry-cleanup.js.map +0 -1
- package/lib/tool/classic-tool-execution-authority.d.ts +0 -22
- package/lib/tool/classic-tool-execution-authority.d.ts.map +0 -1
- package/lib/tool/classic-tool-execution-authority.js +0 -80
- package/lib/tool/classic-tool-execution-authority.js.map +0 -1
- package/lib/tool/tool-registry-as-service.d.ts +0 -17
- package/lib/tool/tool-registry-as-service.d.ts.map +0 -1
- package/lib/tool/tool-registry-as-service.js +0 -54
- package/lib/tool/tool-registry-as-service.js.map +0 -1
- package/lib/tool/web-search-locale-attach.d.ts +0 -4
- package/lib/tool/web-search-locale-attach.d.ts.map +0 -1
- package/lib/tool/web-search-locale-attach.js +0 -20
- package/lib/tool/web-search-locale-attach.js.map +0 -1
- package/lib/typing-indicator/integration.d.ts +0 -89
- package/lib/typing-indicator/integration.d.ts.map +0 -1
- package/lib/typing-indicator/integration.js +0 -261
- package/lib/typing-indicator/integration.js.map +0 -1
- package/lib/workroom/journal.d.ts.map +0 -1
- package/lib/workroom/journal.js +0 -2038
- package/lib/workroom/journal.js.map +0 -1
- package/lib/workroom/local-assignment-executor.d.ts.map +0 -1
- package/lib/workroom/local-assignment-executor.js.map +0 -1
- package/lib/workroom/projection-outbox.d.ts.map +0 -1
- package/lib/workroom/projection-outbox.js +0 -1326
- package/lib/workroom/projection-outbox.js.map +0 -1
- /package/lib/{builtin → orchestration}/five-agent/index.d.ts +0 -0
- /package/lib/{builtin → orchestration}/five-agent/index.js +0 -0
- /package/lib/{builtin → orchestration}/five-agent/prompts.d.ts +0 -0
- /package/lib/{builtin → orchestration}/five-agent/prompts.js +0 -0
- /package/lib/{builtin → orchestration}/five-agent/role-capability-policy.d.ts +0 -0
- /package/lib/{builtin → orchestration}/five-agent/role-capability-policy.js +0 -0
- /package/lib/{builtin → orchestration}/five-agent/roles.d.ts +0 -0
- /package/lib/{builtin → orchestration}/five-agent/roles.js +0 -0
- /package/lib/{builtin → plugin-runtime}/file-edit-quote-utils.d.ts +0 -0
- /package/lib/{builtin → plugin-runtime}/file-edit-quote-utils.js +0 -0
- /package/lib/{builtin → web}/bing-search-html.d.ts +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { type AssignmentExecutionEnvelope, type AssignmentExecutionObservation, type AssignmentExecutorPort } from './assignment-executor.js';
|
|
2
|
+
export interface CodingFile {
|
|
3
|
+
readonly path: string;
|
|
4
|
+
readonly content: string;
|
|
5
|
+
readonly mode: '100644' | '100755';
|
|
6
|
+
}
|
|
7
|
+
export interface CodingEdit {
|
|
8
|
+
readonly path: string;
|
|
9
|
+
/** null deletes an existing file. Only regular UTF-8 files are supported. */
|
|
10
|
+
readonly content: string | null;
|
|
11
|
+
}
|
|
12
|
+
export interface CodingAssignmentSnapshot {
|
|
13
|
+
readonly envelopeDigest: string;
|
|
14
|
+
readonly baseCommit: string;
|
|
15
|
+
readonly baseTree: string;
|
|
16
|
+
readonly files: readonly CodingFile[];
|
|
17
|
+
readonly writablePaths: readonly string[];
|
|
18
|
+
readonly instruction: string;
|
|
19
|
+
/** Pinned, locally provisioned image implementing stdin request / stdout edits JSON. */
|
|
20
|
+
readonly image: string;
|
|
21
|
+
readonly command: readonly string[];
|
|
22
|
+
readonly timeoutMs: number;
|
|
23
|
+
readonly maxBytes: number;
|
|
24
|
+
readonly memoryMiB: number;
|
|
25
|
+
readonly workspaceMiB: number;
|
|
26
|
+
readonly cpus: number;
|
|
27
|
+
}
|
|
28
|
+
export interface CodingAssignmentSnapshotPort {
|
|
29
|
+
/** Resolve the operation's pinned generation, not a latest-value configuration. */
|
|
30
|
+
resolve(envelope: AssignmentExecutionEnvelope, signal: AbortSignal): Promise<CodingAssignmentSnapshot>;
|
|
31
|
+
/** Must verify current lease, attempt, fence and cancellation against authoritative state. */
|
|
32
|
+
assertCurrent(envelope: AssignmentExecutionEnvelope, signal: AbortSignal): Promise<void>;
|
|
33
|
+
/** Atomically persist dispatch ownership in the existing assignment store; duplicates fail closed.
|
|
34
|
+
* A crash without a report requires explicit reconciliation, never automatic redispatch. */
|
|
35
|
+
claimExecution(envelope: AssignmentExecutionEnvelope, signal: AbortSignal): Promise<void>;
|
|
36
|
+
/** Release only this successful dispatch claim's resources; never clear its durable dispatch fact. */
|
|
37
|
+
release(envelope: AssignmentExecutionEnvelope): Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
export interface CodingObjectsPort {
|
|
40
|
+
/** Trusted gateway owns credentials; these methods never update a ref or create a PR. */
|
|
41
|
+
createBlob(content: string, signal: AbortSignal): Promise<string>;
|
|
42
|
+
createTree(baseTree: string, entries: readonly {
|
|
43
|
+
path: string;
|
|
44
|
+
mode: '100644' | '100755';
|
|
45
|
+
type: 'blob';
|
|
46
|
+
sha: string | null;
|
|
47
|
+
}[], signal: AbortSignal): Promise<string>;
|
|
48
|
+
createCommit(tree: string, parent: string, message: string, signal: AbortSignal): Promise<string>;
|
|
49
|
+
}
|
|
50
|
+
export interface CodingReportPort {
|
|
51
|
+
/** Lookup is keyed by envelope digest and returns only durable, trusted records. */
|
|
52
|
+
find(envelopeDigest: string, signal: AbortSignal): Promise<{
|
|
53
|
+
ref: string;
|
|
54
|
+
digest: string;
|
|
55
|
+
report: Readonly<Record<string, unknown>>;
|
|
56
|
+
} | undefined>;
|
|
57
|
+
/** Durable immutable storage, addressed by content digest and indexed by envelope digest. */
|
|
58
|
+
save(report: Readonly<Record<string, unknown>>, signal: AbortSignal): Promise<{
|
|
59
|
+
ref: string;
|
|
60
|
+
digest: string;
|
|
61
|
+
}>;
|
|
62
|
+
}
|
|
63
|
+
/** Fixed Docker transport: no bind mounts, inherited environment or networking in the guest. */
|
|
64
|
+
export declare class DockerCodingAssignmentExecutor implements AssignmentExecutorPort {
|
|
65
|
+
private readonly snapshots;
|
|
66
|
+
private readonly objects;
|
|
67
|
+
private readonly reports;
|
|
68
|
+
private readonly dockerBinary;
|
|
69
|
+
constructor(snapshots: CodingAssignmentSnapshotPort, objects: CodingObjectsPort, reports: CodingReportPort, dockerBinary?: string);
|
|
70
|
+
execute(envelope: AssignmentExecutionEnvelope, signal: AbortSignal): AsyncIterable<AssignmentExecutionObservation>;
|
|
71
|
+
private removeContainer;
|
|
72
|
+
}
|
|
73
|
+
export declare function codingDockerArgs(snapshot: CodingAssignmentSnapshot, name: string): string[];
|
|
74
|
+
export declare function validateCodingEdits(value: unknown, snapshot: CodingAssignmentSnapshot): CodingEdit[];
|
|
75
|
+
/** Upload unreachable objects only. Ref/PR mutation must still pass the existing Git Gateway. */
|
|
76
|
+
export declare function uploadCodingObjects(snapshot: CodingAssignmentSnapshot, edits: readonly CodingEdit[], objects: CodingObjectsPort, signal: AbortSignal): Promise<string>;
|
|
77
|
+
/** No shell; bounded stdout/stderr; cancellation kills the attached process and waits for exit.
|
|
78
|
+
* Strict UTF-8 mode validates raw stdout bytes before any lossy decoding. */
|
|
79
|
+
export declare function runCodingProcess(binary: string, args: readonly string[], input: string, signal: AbortSignal, maxBytes: number, cwd?: string, strictUtf8?: boolean): Promise<string>;
|
|
80
|
+
/** Read-only infrastructure check; image availability does not prove a model/backend integration. */
|
|
81
|
+
export declare function inspectCodingDockerReadiness(image: string, signal: AbortSignal, dockerBinary?: string): Promise<{
|
|
82
|
+
ready: boolean;
|
|
83
|
+
blockers: string[];
|
|
84
|
+
}>;
|
|
85
|
+
/** Reconcile daemon leftovers using current assignment authority, without redispatching work. */
|
|
86
|
+
export declare function reconcileCodingContainers(isStale: (envelopeDigest: string, signal: AbortSignal) => Promise<boolean>, signal: AbortSignal, dockerBinary?: string): Promise<{
|
|
87
|
+
inspected: number;
|
|
88
|
+
removed: string[];
|
|
89
|
+
}>;
|
|
90
|
+
//# sourceMappingURL=coding-assignment-executor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coding-assignment-executor.d.ts","sourceRoot":"","sources":["../../src/workroom/coding-assignment-executor.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC5B,MAAM,0BAA0B,CAAC;AAElC,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;CACpC;AACD,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6EAA6E;IAC7E,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AACD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,SAAS,UAAU,EAAE,CAAC;IACtC,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,wFAAwF;IACxF,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,Y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AAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAAE,UAAU,UAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,CA2BvL;AAED,qGAAqG;AACrG,wBAAsB,4BAA4B,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,SAAW,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAc/J;AAED,iGAAiG;AACjG,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,OAAO,CAAC,EAC1E,MAAM,EAAE,WAAW,EACnB,YAAY,SAAW,GACtB,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAanD"}
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { digestCanonicalWorkroomValue as digest } from './canonical-value.js';
|
|
3
|
+
import { assertAssignmentExecutionEnvelope, } from './assignment-executor.js';
|
|
4
|
+
/** Fixed Docker transport: no bind mounts, inherited environment or networking in the guest. */
|
|
5
|
+
export class DockerCodingAssignmentExecutor {
|
|
6
|
+
snapshots;
|
|
7
|
+
objects;
|
|
8
|
+
reports;
|
|
9
|
+
dockerBinary;
|
|
10
|
+
constructor(snapshots, objects, reports, dockerBinary = 'docker') {
|
|
11
|
+
this.snapshots = snapshots;
|
|
12
|
+
this.objects = objects;
|
|
13
|
+
this.reports = reports;
|
|
14
|
+
this.dockerBinary = dockerBinary;
|
|
15
|
+
}
|
|
16
|
+
async *execute(envelope, signal) {
|
|
17
|
+
assertAssignmentExecutionEnvelope(envelope);
|
|
18
|
+
signal.throwIfAborted();
|
|
19
|
+
const snapshot = structuredClone(await this.snapshots.resolve(envelope, signal));
|
|
20
|
+
const name = `zhin-coding-${envelope.digest.slice(7)}`;
|
|
21
|
+
let ownsDispatch = false;
|
|
22
|
+
try {
|
|
23
|
+
validateSnapshot(snapshot, envelope);
|
|
24
|
+
const boundedSignal = AbortSignal.any([signal, AbortSignal.timeout(snapshot.timeoutMs)]);
|
|
25
|
+
await this.snapshots.assertCurrent(envelope, boundedSignal);
|
|
26
|
+
const prior = await this.reports.find(envelope.digest, boundedSignal);
|
|
27
|
+
if (prior) {
|
|
28
|
+
if (prior.digest !== digest(prior.report) || prior.report.envelopeDigest !== envelope.digest || prior.report.baseCommit !== snapshot.baseCommit || typeof prior.report.commit !== 'string')
|
|
29
|
+
throw new Error('Coding recovered report authority mismatch');
|
|
30
|
+
assertSha(prior.report.commit);
|
|
31
|
+
await this.snapshots.assertCurrent(envelope, boundedSignal);
|
|
32
|
+
boundedSignal.throwIfAborted();
|
|
33
|
+
yield { version: 1, type: 'execution_completed', observationId: `${name}/completed`, envelopeDigest: envelope.digest, completion: { report: { ref: prior.ref, digest: prior.digest }, candidate: { ref: `git:${prior.report.commit}`, hash: digest({ baseCommit: snapshot.baseCommit, commit: prior.report.commit }) } } };
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
await this.snapshots.claimExecution(envelope, boundedSignal);
|
|
37
|
+
ownsDispatch = true;
|
|
38
|
+
yield { version: 1, type: 'progress', observationId: `${name}/started`, envelopeDigest: envelope.digest, progress: { summary: 'Running pinned coding image in isolated Docker workspace' } };
|
|
39
|
+
const input = JSON.stringify({ version: 1, envelopeDigest: envelope.digest, baseCommit: snapshot.baseCommit, instruction: snapshot.instruction, files: snapshot.files });
|
|
40
|
+
if (Buffer.byteLength(input) > snapshot.maxBytes)
|
|
41
|
+
throw new Error('Coding input exceeds byte budget');
|
|
42
|
+
const output = await runCodingProcess(this.dockerBinary, codingDockerArgs(snapshot, name), input, boundedSignal, snapshot.maxBytes);
|
|
43
|
+
// Stop the entire guest before interpreting candidate-controlled output.
|
|
44
|
+
await this.removeContainer(name);
|
|
45
|
+
boundedSignal.throwIfAborted();
|
|
46
|
+
const edits = validateCodingEdits(JSON.parse(output), snapshot);
|
|
47
|
+
await this.snapshots.assertCurrent(envelope, boundedSignal);
|
|
48
|
+
const commit = await uploadCodingObjects(snapshot, edits, this.objects, boundedSignal);
|
|
49
|
+
await this.snapshots.assertCurrent(envelope, boundedSignal);
|
|
50
|
+
const report = { version: 1, envelopeDigest: envelope.digest, baseCommit: snapshot.baseCommit, commit, editsDigest: digest(edits), paths: edits.map(edit => edit.path), image: snapshot.image };
|
|
51
|
+
const stored = await this.reports.save(report, boundedSignal);
|
|
52
|
+
if (stored.digest !== digest(report))
|
|
53
|
+
throw new Error('Coding report storage digest mismatch');
|
|
54
|
+
await this.snapshots.assertCurrent(envelope, boundedSignal);
|
|
55
|
+
boundedSignal.throwIfAborted();
|
|
56
|
+
yield { version: 1, type: 'execution_completed', observationId: `${name}/completed`, envelopeDigest: envelope.digest, completion: { report: stored, candidate: { ref: `git:${commit}`, hash: digest({ baseCommit: snapshot.baseCommit, commit }) } } };
|
|
57
|
+
}
|
|
58
|
+
finally {
|
|
59
|
+
try {
|
|
60
|
+
if (ownsDispatch)
|
|
61
|
+
await this.removeContainer(name);
|
|
62
|
+
}
|
|
63
|
+
finally {
|
|
64
|
+
if (ownsDispatch)
|
|
65
|
+
await this.snapshots.release(envelope);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async removeContainer(name) {
|
|
70
|
+
// rm -f addresses the daemon-side container even when the attached CLI was killed.
|
|
71
|
+
try {
|
|
72
|
+
await runCodingProcess(this.dockerBinary, ['rm', '-f', name], '', AbortSignal.timeout(10_000), 16_384);
|
|
73
|
+
}
|
|
74
|
+
catch (error) {
|
|
75
|
+
if (!(error instanceof Error) || !error.message.includes('No such container'))
|
|
76
|
+
throw error;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
export function codingDockerArgs(snapshot, name) {
|
|
81
|
+
return ['run', '--rm', '--pull=never', '--name', name, '--label=dev.zhin.coding-executor=1', `--label=dev.zhin.envelope=${snapshot.envelopeDigest}`, '--network=none', '--read-only', '--cap-drop=ALL', '--security-opt=no-new-privileges', '--pids-limit=128', `--memory=${snapshot.memoryMiB}m`, `--memory-swap=${snapshot.memoryMiB}m`, `--cpus=${snapshot.cpus}`, '--user=65534:65534', '--workdir=/workspace', `--tmpfs=/workspace:rw,nosuid,nodev,size=${snapshot.workspaceMiB}m,mode=1777`, '--tmpfs=/tmp:rw,nosuid,nodev,size=32m,mode=1777', '--entrypoint', snapshot.command[0], '-i', snapshot.image, ...snapshot.command.slice(1)];
|
|
82
|
+
}
|
|
83
|
+
export function validateCodingEdits(value, snapshot) {
|
|
84
|
+
if (!value || typeof value !== 'object' || Object.keys(value).join() !== 'edits' || !Array.isArray(value.edits))
|
|
85
|
+
throw new Error('Coding output requires only edits');
|
|
86
|
+
const edits = value.edits;
|
|
87
|
+
if (!edits.length || edits.length > 256 || Buffer.byteLength(JSON.stringify(value)) > snapshot.maxBytes)
|
|
88
|
+
throw new Error('Coding output exceeds change budget or has no edits');
|
|
89
|
+
const seen = new Set();
|
|
90
|
+
return edits.map(value => {
|
|
91
|
+
if (!value || typeof value !== 'object')
|
|
92
|
+
throw new Error('Invalid coding edit');
|
|
93
|
+
const edit = value;
|
|
94
|
+
if (Object.keys(edit).sort().join() !== 'content,path' || typeof edit.path !== 'string' || (edit.content !== null && typeof edit.content !== 'string'))
|
|
95
|
+
throw new Error('Invalid coding edit');
|
|
96
|
+
assertPath(edit.path);
|
|
97
|
+
if (!snapshot.writablePaths.some(path => edit.path === path || (path.endsWith('/') && edit.path.startsWith(path))))
|
|
98
|
+
throw new Error(`Coding path outside authorized scope: ${edit.path}`);
|
|
99
|
+
if (seen.has(edit.path))
|
|
100
|
+
throw new Error('Duplicate coding path');
|
|
101
|
+
seen.add(edit.path);
|
|
102
|
+
if (edit.content === null && !snapshot.files.some(file => file.path === edit.path))
|
|
103
|
+
throw new Error('Cannot delete unknown coding file');
|
|
104
|
+
return { path: edit.path, content: edit.content };
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
/** Upload unreachable objects only. Ref/PR mutation must still pass the existing Git Gateway. */
|
|
108
|
+
export async function uploadCodingObjects(snapshot, edits, objects, signal) {
|
|
109
|
+
assertSha(snapshot.baseCommit);
|
|
110
|
+
assertSha(snapshot.baseTree);
|
|
111
|
+
const checked = validateCodingEdits({ edits }, snapshot);
|
|
112
|
+
const entries = [];
|
|
113
|
+
for (const edit of checked) {
|
|
114
|
+
signal.throwIfAborted();
|
|
115
|
+
const sha = edit.content === null ? null : await objects.createBlob(edit.content, signal);
|
|
116
|
+
if (sha !== null)
|
|
117
|
+
assertSha(sha);
|
|
118
|
+
entries.push({ path: edit.path, mode: snapshot.files.find(file => file.path === edit.path)?.mode ?? '100644', type: 'blob', sha });
|
|
119
|
+
}
|
|
120
|
+
signal.throwIfAborted();
|
|
121
|
+
const tree = await objects.createTree(snapshot.baseTree, entries, signal);
|
|
122
|
+
assertSha(tree);
|
|
123
|
+
signal.throwIfAborted();
|
|
124
|
+
const commit = await objects.createCommit(tree, snapshot.baseCommit, `Workroom candidate ${snapshot.envelopeDigest}`, signal);
|
|
125
|
+
assertSha(commit);
|
|
126
|
+
return commit;
|
|
127
|
+
}
|
|
128
|
+
function validateSnapshot(snapshot, envelope) {
|
|
129
|
+
if (snapshot.envelopeDigest !== envelope.digest || snapshot.baseCommit !== envelope.workspace.baseRevision.replace(/^git:/u, ''))
|
|
130
|
+
throw new Error('Coding snapshot authority mismatch');
|
|
131
|
+
assertSha(snapshot.baseCommit);
|
|
132
|
+
assertSha(snapshot.baseTree);
|
|
133
|
+
if (!/^[a-z0-9][a-z0-9./:_-]*@sha256:[a-f0-9]{64}$/u.test(snapshot.image))
|
|
134
|
+
throw new Error('Coding image requires immutable digest');
|
|
135
|
+
if (!snapshot.command.length || snapshot.command.some(arg => !arg || arg.includes('\0')))
|
|
136
|
+
throw new Error('Coding command is invalid');
|
|
137
|
+
for (const n of [snapshot.timeoutMs, snapshot.maxBytes, snapshot.memoryMiB, snapshot.workspaceMiB])
|
|
138
|
+
if (!Number.isSafeInteger(n) || n <= 0)
|
|
139
|
+
throw new Error('Coding budget must be positive');
|
|
140
|
+
// Node timers above signed 32-bit delay overflow to 1ms, even where the
|
|
141
|
+
// AbortSignal API accepts an unsigned 32-bit value. Reject before dispatch.
|
|
142
|
+
if (snapshot.timeoutMs > 2_147_483_647)
|
|
143
|
+
throw new Error('Coding timeout exceeds platform timer upper bound');
|
|
144
|
+
if (!Number.isFinite(snapshot.cpus) || snapshot.cpus <= 0)
|
|
145
|
+
throw new Error('Coding CPU budget must be positive');
|
|
146
|
+
for (const path of snapshot.writablePaths)
|
|
147
|
+
assertPath(path.endsWith('/') ? path.slice(0, -1) : path);
|
|
148
|
+
const seen = new Set();
|
|
149
|
+
for (const file of snapshot.files) {
|
|
150
|
+
assertPath(file.path);
|
|
151
|
+
if (seen.has(file.path) || !['100644', '100755'].includes(file.mode) || typeof file.content !== 'string')
|
|
152
|
+
throw new Error('Invalid coding base file');
|
|
153
|
+
seen.add(file.path);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
function assertSha(value) { if (!/^[a-f0-9]{40}$/u.test(value))
|
|
157
|
+
throw new Error('Coding Git object requires exact SHA-1'); }
|
|
158
|
+
function assertPath(path) {
|
|
159
|
+
if (!path || path.startsWith('/') || path.includes('\\') || path.includes(':') || Array.from(path).some(char => char.charCodeAt(0) < 32 || char.charCodeAt(0) === 127) || path.split('/').some(part => !part || part === '.' || part === '..' || part.toLowerCase() === '.git') || (path.toLowerCase() === '.github' || path.toLowerCase().startsWith('.github/')))
|
|
160
|
+
throw new Error(`Unsafe coding path: ${path}`);
|
|
161
|
+
}
|
|
162
|
+
/** No shell; bounded stdout/stderr; cancellation kills the attached process and waits for exit.
|
|
163
|
+
* Strict UTF-8 mode validates raw stdout bytes before any lossy decoding. */
|
|
164
|
+
export async function runCodingProcess(binary, args, input, signal, maxBytes, cwd, strictUtf8 = false) {
|
|
165
|
+
signal.throwIfAborted();
|
|
166
|
+
return new Promise((resolve, reject) => {
|
|
167
|
+
const child = spawn(binary, [...args], { cwd, env: { PATH: process.env.PATH, HOME: '/nonexistent', GIT_CONFIG_NOSYSTEM: '1', GIT_CONFIG_GLOBAL: '/dev/null', GIT_TERMINAL_PROMPT: '0' }, stdio: 'pipe' });
|
|
168
|
+
const output = [];
|
|
169
|
+
const errors = [];
|
|
170
|
+
let bytes = 0;
|
|
171
|
+
let failure;
|
|
172
|
+
const stop = () => { failure ??= new Error('Coding process aborted'); child.kill('SIGKILL'); };
|
|
173
|
+
const collect = (target) => (chunk) => { bytes += chunk.length; if (bytes > maxBytes) {
|
|
174
|
+
failure = new Error('Coding process exceeds output budget');
|
|
175
|
+
child.kill('SIGKILL');
|
|
176
|
+
}
|
|
177
|
+
else
|
|
178
|
+
target.push(chunk); };
|
|
179
|
+
child.stdout.on('data', collect(output));
|
|
180
|
+
child.stderr.on('data', collect(errors));
|
|
181
|
+
child.stdin.on('error', () => { });
|
|
182
|
+
signal.addEventListener('abort', stop, { once: true });
|
|
183
|
+
if (signal.aborted)
|
|
184
|
+
stop();
|
|
185
|
+
child.once('error', error => { signal.removeEventListener('abort', stop); reject(error); });
|
|
186
|
+
child.once('close', code => {
|
|
187
|
+
signal.removeEventListener('abort', stop);
|
|
188
|
+
if (failure) {
|
|
189
|
+
reject(failure);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
if (code !== 0) {
|
|
193
|
+
reject(new Error(`Coding process exited ${code}: ${Buffer.concat(errors).toString('utf8').slice(0, 1024)}`));
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
try {
|
|
197
|
+
const bytes = Buffer.concat(output);
|
|
198
|
+
resolve(strictUtf8 ? new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }).decode(bytes) : bytes.toString('utf8'));
|
|
199
|
+
}
|
|
200
|
+
catch {
|
|
201
|
+
reject(new Error('Coding process output requires valid UTF-8'));
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
child.stdin.end(input);
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
/** Read-only infrastructure check; image availability does not prove a model/backend integration. */
|
|
208
|
+
export async function inspectCodingDockerReadiness(image, signal, dockerBinary = 'docker') {
|
|
209
|
+
signal.throwIfAborted();
|
|
210
|
+
if (!/^[a-z0-9][a-z0-9./:_-]*@sha256:[a-f0-9]{64}$/u.test(image))
|
|
211
|
+
return { ready: false, blockers: ['coding_image_digest_required'] };
|
|
212
|
+
try {
|
|
213
|
+
await runCodingProcess(dockerBinary, ['info', '--format', '{{.ServerVersion}}'], '', signal, 16_384);
|
|
214
|
+
signal.throwIfAborted();
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
signal.throwIfAborted();
|
|
218
|
+
return { ready: false, blockers: ['docker_daemon_unavailable'] };
|
|
219
|
+
}
|
|
220
|
+
try {
|
|
221
|
+
const output = await runCodingProcess(dockerBinary, ['image', 'inspect', '--format', '{{json .RepoDigests}}', image], '', signal, 16_384);
|
|
222
|
+
signal.throwIfAborted();
|
|
223
|
+
const digests = JSON.parse(output);
|
|
224
|
+
if (!Array.isArray(digests) || !digests.includes(image))
|
|
225
|
+
return { ready: false, blockers: ['coding_image_digest_mismatch'] };
|
|
226
|
+
return { ready: true, blockers: [] };
|
|
227
|
+
}
|
|
228
|
+
catch {
|
|
229
|
+
signal.throwIfAborted();
|
|
230
|
+
return { ready: false, blockers: ['coding_image_not_provisioned'] };
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
/** Reconcile daemon leftovers using current assignment authority, without redispatching work. */
|
|
234
|
+
export async function reconcileCodingContainers(isStale, signal, dockerBinary = 'docker') {
|
|
235
|
+
const output = await runCodingProcess(dockerBinary, ['ps', '-a', '--filter', 'label=dev.zhin.coding-executor=1', '--format', '{{.Names}}'], '', signal, 65_536);
|
|
236
|
+
const names = output.split('\n').filter(Boolean);
|
|
237
|
+
const removed = [];
|
|
238
|
+
for (const name of names) {
|
|
239
|
+
if (!/^zhin-coding-[a-f0-9]{64}$/u.test(name))
|
|
240
|
+
throw new Error('Unexpected coding container identity');
|
|
241
|
+
const envelopeDigest = `sha256:${name.slice('zhin-coding-'.length)}`;
|
|
242
|
+
if (!await isStale(envelopeDigest, signal))
|
|
243
|
+
continue;
|
|
244
|
+
signal.throwIfAborted();
|
|
245
|
+
await runCodingProcess(dockerBinary, ['rm', '-f', name], '', signal, 16_384);
|
|
246
|
+
removed.push(name);
|
|
247
|
+
}
|
|
248
|
+
return { inspected: names.length, removed };
|
|
249
|
+
}
|
|
250
|
+
//# sourceMappingURL=coding-assignment-executor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coding-assignment-executor.js","sourceRoot":"","sources":["../../src/workroom/coding-assignment-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,4BAA4B,IAAI,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EACL,iCAAiC,GAIlC,MAAM,0BAA0B,CAAC;AAoDlC,gGAAgG;AAChG,MAAM,OAAO,8BAA8B;IAEtB;IACA;IACA;IACA;IAJnB,YACmB,SAAuC,EACvC,OAA0B,EAC1B,OAAyB,EACzB,eAAe,QAAQ;QAHvB,cAAS,GAAT,SAAS,CAA8B;QACvC,YAAO,GAAP,OAAO,CAAmB;QAC1B,YAAO,GAAP,OAAO,CAAkB;QACzB,iBAAY,GAAZ,YAAY,CAAW;IACvC,CAAC;IAEJ,KAAK,CAAC,CAAC,OAAO,CAAC,QAAqC,EAAE,MAAmB;QACvE,iCAAiC,CA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CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAChK,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACjD,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,6BAA6B,CAAC,IAAI,CAAC,IAAI,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;QACvG,MAAM,cAAc,GAAG,UAAU,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;QACrE,IAAI,CAAC,MAAM,OAAO,CAAC,cAAc,EAAE,MAAM,CAAC;YAAE,SAAS;QACrD,MAAM,CAAC,cAAc,EAAE,CAAC;QACxB,MAAM,gBAAgB,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAC7E,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;AAC9C,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type CodingFile, type CodingObjectsPort } from './coding-assignment-executor.js';
|
|
2
|
+
/** Reads committed regular UTF-8 files without checking out or running repository code. */
|
|
3
|
+
export declare function readCodingGitSnapshot(repository: string, commit: string, paths: readonly string[], signal: AbortSignal, maxBytes?: number): Promise<{
|
|
4
|
+
baseCommit: string;
|
|
5
|
+
baseTree: string;
|
|
6
|
+
files: CodingFile[];
|
|
7
|
+
}>;
|
|
8
|
+
export interface CodingGitHubObjectsOptions {
|
|
9
|
+
readonly owner: string;
|
|
10
|
+
readonly repository: string;
|
|
11
|
+
/** Must return a short-lived service credential; never sent to the coding image. */
|
|
12
|
+
readonly token: (signal: AbortSignal) => Promise<string>;
|
|
13
|
+
readonly fetch?: typeof globalThis.fetch;
|
|
14
|
+
}
|
|
15
|
+
/** Unreachable object creation only; no branches, merges or protection administration. */
|
|
16
|
+
export declare function createCodingGitHubObjectsPort(options: CodingGitHubObjectsOptions): CodingObjectsPort;
|
|
17
|
+
//# sourceMappingURL=coding-git-objects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coding-git-objects.d.ts","sourceRoot":"","sources":["../../src/workroom/coding-git-objects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAE5G,2FAA2F;AAC3F,wBAAsB,qBAAqB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,SAAkB,GAAG,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,EAAE,CAAA;CAAE,CAAC,CAsBjO;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,oFAAoF;IACpF,QAAQ,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACzD,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CAC1C;AAED,0FAA0F;AAC1F,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,0BAA0B,GAAG,iBAAiB,CAqBpG"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { runCodingProcess } from './coding-assignment-executor.js';
|
|
2
|
+
/** Reads committed regular UTF-8 files without checking out or running repository code. */
|
|
3
|
+
export async function readCodingGitSnapshot(repository, commit, paths, signal, maxBytes = 4 * 1024 * 1024) {
|
|
4
|
+
if (!/^[a-f0-9]{40}$/u.test(commit))
|
|
5
|
+
throw new Error('Coding base requires exact SHA-1');
|
|
6
|
+
if (!paths.length)
|
|
7
|
+
throw new Error('Coding context paths required');
|
|
8
|
+
for (const path of paths)
|
|
9
|
+
assertContextPath(path);
|
|
10
|
+
const git = (args) => runCodingProcess('git', ['--literal-pathspecs', '--no-replace-objects', '-c', 'core.fsmonitor=false', ...args], '', signal, maxBytes, repository, true);
|
|
11
|
+
const baseCommit = (await git(['rev-parse', '--verify', `${commit}^{commit}`])).trim();
|
|
12
|
+
if (baseCommit !== commit)
|
|
13
|
+
throw new Error('Coding base commit mismatch');
|
|
14
|
+
const baseTree = (await git(['rev-parse', `${commit}^{tree}`])).trim();
|
|
15
|
+
const entries = (await git(['ls-tree', '-rz', '--full-tree', commit, '--', ...paths])).split('\0').filter(Boolean);
|
|
16
|
+
const files = [];
|
|
17
|
+
let total = 0;
|
|
18
|
+
for (const entry of entries) {
|
|
19
|
+
const match = /^(100644|100755) blob ([a-f0-9]{40})\t(.+)$/u.exec(entry);
|
|
20
|
+
if (!match)
|
|
21
|
+
throw new Error('Coding context forbids symlinks and submodules');
|
|
22
|
+
const content = await git(['cat-file', 'blob', match[2]]);
|
|
23
|
+
// Binary files need a separate, explicit artifact channel.
|
|
24
|
+
if (content.includes('\0'))
|
|
25
|
+
throw new Error('Coding context requires UTF-8 text');
|
|
26
|
+
total += Buffer.byteLength(content);
|
|
27
|
+
if (total > maxBytes)
|
|
28
|
+
throw new Error('Coding context exceeds byte budget');
|
|
29
|
+
files.push({ path: match[3], content, mode: match[1] });
|
|
30
|
+
}
|
|
31
|
+
return { baseCommit, baseTree, files };
|
|
32
|
+
}
|
|
33
|
+
/** Unreachable object creation only; no branches, merges or protection administration. */
|
|
34
|
+
export function createCodingGitHubObjectsPort(options) {
|
|
35
|
+
if (![options.owner, options.repository].every(value => /^[A-Za-z0-9_.-]+$/u.test(value)))
|
|
36
|
+
throw new Error('Invalid Coding GitHub repository');
|
|
37
|
+
const request = async (resource, body, signal) => {
|
|
38
|
+
signal.throwIfAborted();
|
|
39
|
+
const token = await options.token(signal);
|
|
40
|
+
signal.throwIfAborted();
|
|
41
|
+
const response = await (options.fetch ?? globalThis.fetch)(`https://api.github.com/repos/${options.owner}/${options.repository}/git/${resource}`, {
|
|
42
|
+
method: 'POST', redirect: 'error', signal,
|
|
43
|
+
headers: { Authorization: `Bearer ${token}`, Accept: 'application/vnd.github+json', 'Content-Type': 'application/json', 'X-GitHub-Api-Version': '2022-11-28' },
|
|
44
|
+
body: JSON.stringify(body),
|
|
45
|
+
});
|
|
46
|
+
if (!response.ok)
|
|
47
|
+
throw new Error(`Coding GitHub objects ${resource} failed (${response.status})`);
|
|
48
|
+
const value = await response.json();
|
|
49
|
+
if (typeof value.sha !== 'string' || !/^[a-f0-9]{40}$/u.test(value.sha))
|
|
50
|
+
throw new Error('Coding GitHub objects returned invalid SHA');
|
|
51
|
+
return value.sha;
|
|
52
|
+
};
|
|
53
|
+
return {
|
|
54
|
+
createBlob: (content, signal) => request('blobs', { content, encoding: 'utf-8' }, signal),
|
|
55
|
+
createTree: (baseTree, tree, signal) => request('trees', { base_tree: baseTree, tree }, signal),
|
|
56
|
+
createCommit: (tree, parent, message, signal) => request('commits', { tree, parents: [parent], message }, signal),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
function assertContextPath(path) {
|
|
60
|
+
if (typeof path !== 'string' || !path || path.startsWith('/') || path.startsWith('-') || path.includes(':') || path.includes('\\')
|
|
61
|
+
|| Array.from(path).some(char => char.charCodeAt(0) < 32 || char.charCodeAt(0) === 127))
|
|
62
|
+
throw new Error('Coding context requires canonical relative paths');
|
|
63
|
+
const canonical = path.endsWith('/') ? path.slice(0, -1) : path;
|
|
64
|
+
if (canonical.split('/').some(part => !part || part === '.' || part === '..' || part.toLowerCase() === '.git')
|
|
65
|
+
|| canonical.split('/')[0].toLowerCase() === '.github')
|
|
66
|
+
throw new Error('Coding context requires canonical relative paths outside protected .github');
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=coding-git-objects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coding-git-objects.js","sourceRoot":"","sources":["../../src/workroom/coding-git-objects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA2C,MAAM,iCAAiC,CAAC;AAE5G,2FAA2F;AAC3F,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,UAAkB,EAAE,MAAc,EAAE,KAAwB,EAAE,MAAmB,EAAE,QAAQ,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI;IACvJ,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;IACzF,IAAI,CAAC,KAAK,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACpE,KAAK,MAAM,IAAI,IAAI,KAAK;QAAE,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAClD,MAAM,GAAG,GAAG,CAAC,IAAc,EAAE,EAAE,CAAC,gBAAgB,CAAC,KAAK,EAAE,CAAC,qBAAqB,EAAE,sBAAsB,EAAE,IAAI,EAAE,sBAAsB,EAAE,GAAG,IAAI,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;IACxL,MAAM,UAAU,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,WAAW,EAAE,UAAU,EAAE,GAAG,MAAM,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACvF,IAAI,UAAU,KAAK,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IAC1E,MAAM,QAAQ,GAAG,CAAC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C,CAAC,CAAC,IAAI,CAAC;IAChE,IAAI,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,IAAI,IAAI,KAAK,GAAG,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC;WACzG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC,WAAW,EAAE,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,4EAA4E,CAAC,CAAC;AAC3J,CAAC"}
|
|
@@ -5,6 +5,8 @@ export interface DurableFileHandle {
|
|
|
5
5
|
}
|
|
6
6
|
/** The intentionally narrow filesystem seam used by immutable Workroom facts. */
|
|
7
7
|
export interface DurableFileSystem {
|
|
8
|
+
/** False when the platform cannot open and flush directory handles (Windows). */
|
|
9
|
+
readonly supportsDirectorySync?: boolean;
|
|
8
10
|
mkdir(path: string): Promise<void>;
|
|
9
11
|
open(path: string, flags: 'wx' | 'r'): Promise<DurableFileHandle>;
|
|
10
12
|
link(existingPath: string, newPath: string): Promise<void>;
|
|
@@ -24,6 +26,8 @@ export type CreateOnlyPublishResult<Created, Replayed> = Readonly<{
|
|
|
24
26
|
status: 'replayed';
|
|
25
27
|
value: Replayed;
|
|
26
28
|
}>;
|
|
29
|
+
/** Recognizes only the staging suffix produced by publishCreateOnly, for a domain-valid target. */
|
|
30
|
+
export declare function isDurableFileStagingName(name: string, targetPattern: RegExp): boolean;
|
|
27
31
|
/**
|
|
28
32
|
* Crash-durable filesystem operations shared by Workroom file repositories.
|
|
29
33
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"durable-file-store.d.ts","sourceRoot":"","sources":["../../src/workroom/durable-file-store.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,O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,EAAE,wBAAwB,CAAC,OAAO,EAAE,QAAQ,CAAC,GACnD,OAAO,CAAC,uBAAuB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAiChD,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,kBAAkB,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;CAc9E"}
|
|
@@ -2,11 +2,17 @@ import { randomUUID } from 'node:crypto';
|
|
|
2
2
|
import { link as nodeLink, mkdir as nodeMkdir, open as nodeOpen, unlink as nodeUnlink, } from 'node:fs/promises';
|
|
3
3
|
import { dirname } from 'node:path';
|
|
4
4
|
export const nodeDurableFileSystem = Object.freeze({
|
|
5
|
+
supportsDirectorySync: process.platform !== 'win32',
|
|
5
6
|
mkdir: async (path) => { await nodeMkdir(path); },
|
|
6
7
|
open: async (path, flags) => await nodeOpen(path, flags),
|
|
7
8
|
link: async (existingPath, newPath) => await nodeLink(existingPath, newPath),
|
|
8
9
|
unlink: async (path) => { await nodeUnlink(path); },
|
|
9
10
|
});
|
|
11
|
+
/** Recognizes only the staging suffix produced by publishCreateOnly, for a domain-valid target. */
|
|
12
|
+
export function isDurableFileStagingName(name, targetPattern) {
|
|
13
|
+
const match = /^(.+)\.[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}\.tmp$/u.exec(name);
|
|
14
|
+
return Boolean(match && targetPattern.test(match[1]));
|
|
15
|
+
}
|
|
10
16
|
/**
|
|
11
17
|
* Crash-durable filesystem operations shared by Workroom file repositories.
|
|
12
18
|
*
|
|
@@ -36,6 +42,8 @@ export class DurableFileStore {
|
|
|
36
42
|
await this.syncPath(dirname(this.directory));
|
|
37
43
|
}
|
|
38
44
|
async syncPath(path) {
|
|
45
|
+
if (this.fileSystem.supportsDirectorySync === false)
|
|
46
|
+
return;
|
|
39
47
|
const handle = await this.fileSystem.open(path, 'r');
|
|
40
48
|
try {
|
|
41
49
|
await handle.sync();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"durable-file-store.js","sourceRoot":"","sources":["../../src/workroom/durable-file-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,IAAI,IAAI,QAAQ,EAChB,KAAK,IAAI,SAAS,EAClB,IAAI,IAAI,QAAQ,EAChB,MAAM,IAAI,UAAU,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"durable-file-store.js","sourceRoot":"","sources":["../../src/workroom/durable-file-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACL,IAAI,IAAI,QAAQ,EAChB,KAAK,IAAI,SAAS,EAClB,IAAI,IAAI,QAAQ,EAChB,MAAM,IAAI,UAAU,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkBpC,MAAM,CAAC,MAAM,qBAAqB,GAAsB,MAAM,CAAC,MAAM,CAAC;IACpE,qBAAqB,EAAE,OAAO,CAAC,QAAQ,KAAK,OAAO;IACnD,KAAK,EAAE,KAAK,EAAE,IAAY,EAAiB,EAAE,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACxE,IAAI,EAAE,KAAK,EAAE,IAAY,EAAE,KAAiB,EAA8B,EAAE,CAC1E,MAAM,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAC7B,IAAI,EAAE,KAAK,EAAE,YAAoB,EAAE,OAAe,EAAiB,EAAE,CACnE,MAAM,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IACvC,MAAM,EAAE,KAAK,EAAE,IAAY,EAAiB,EAAE,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CAC3E,CAAC,CAAC;AAaH,mGAAmG;A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AK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,KAAK;WAC9D,KAA4B,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
export interface WorkroomEffectBlockerInput {
|
|
2
|
+
readonly projectId: string;
|
|
3
|
+
readonly effectId: string;
|
|
4
|
+
readonly owner: string;
|
|
5
|
+
readonly policy: Readonly<{
|
|
6
|
+
kind: 'pinned_profile' | 'root_emergency_fallback';
|
|
7
|
+
ref: string;
|
|
8
|
+
digest: string;
|
|
9
|
+
}>;
|
|
10
|
+
readonly reason: string;
|
|
11
|
+
readonly deadline: number;
|
|
12
|
+
readonly allowedSuccessors: readonly ('retry' | 'reconcile' | 'cancel')[];
|
|
13
|
+
}
|
|
14
|
+
export interface WorkroomEffectBlockerControlPort {
|
|
15
|
+
block(input: WorkroomEffectBlockerInput): Promise<void>;
|
|
16
|
+
recover(projectId: string, effectId: string): Promise<void>;
|
|
17
|
+
}
|
|
2
18
|
export interface WorkroomEffectBlockerRecord {
|
|
3
19
|
readonly version: 1;
|
|
4
20
|
readonly projectId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"effect-blocker-repository.d.ts","sourceRoot":"","sources":["../../src/workroom/effect-blocker-repository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"effect-blocker-repository.d.ts","sourceRoot":"","sources":["../../src/workroom/effect-blocker-repository.ts"],"names":[],"mappings":"AAUA,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;QACxB,IAAI,EAAE,gBAAgB,GAAG,yBAAyB,CAAC;QACnD,GAAG,EAAE,MAAM,CAAC;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