@zhin.js/agent 1.1.13 → 1.1.14
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 +40 -20
- package/lib/ai-event-bus.d.ts +1 -1
- package/lib/ai-hook-handlers.d.ts +1 -1
- package/lib/assistant/config.d.ts +3 -17
- package/lib/assistant/config.d.ts.map +1 -1
- package/lib/assistant/config.js +1 -8
- package/lib/assistant/config.js.map +1 -1
- package/lib/assistant/index.d.ts +6 -9
- package/lib/assistant/index.d.ts.map +1 -1
- package/lib/assistant/index.js +4 -6
- package/lib/assistant/index.js.map +1 -1
- package/lib/assistant/job-engine.d.ts +0 -4
- package/lib/assistant/job-engine.d.ts.map +1 -1
- package/lib/assistant/job-engine.js +0 -2
- package/lib/assistant/job-engine.js.map +1 -1
- package/lib/assistant/job-store.d.ts +1 -8
- package/lib/assistant/job-store.d.ts.map +1 -1
- package/lib/assistant/job-store.js +3 -9
- package/lib/assistant/job-store.js.map +1 -1
- package/lib/assistant/job-worker.d.ts +2 -3
- package/lib/assistant/job-worker.d.ts.map +1 -1
- package/lib/assistant/job-worker.js +15 -25
- package/lib/assistant/job-worker.js.map +1 -1
- package/lib/assistant/runtime-contract.d.ts +22 -0
- package/lib/assistant/runtime-contract.d.ts.map +1 -0
- package/lib/assistant/runtime-contract.js +2 -0
- package/lib/assistant/runtime-contract.js.map +1 -0
- package/lib/assistant/types.d.ts +0 -10
- package/lib/assistant/types.d.ts.map +1 -1
- package/lib/assistant/types.js +0 -4
- package/lib/assistant/types.js.map +1 -1
- package/lib/authoring/bridge.d.ts +1 -1
- package/lib/authoring/index.d.ts +0 -4
- package/lib/authoring/index.d.ts.map +1 -1
- package/lib/authoring/index.js +0 -2
- package/lib/authoring/index.js.map +1 -1
- package/lib/authoring/types.d.ts +3 -39
- package/lib/authoring/types.d.ts.map +1 -1
- package/lib/authoring/types.js.map +1 -1
- package/lib/builtin/bash-tool.d.ts.map +1 -1
- package/lib/builtin/bash-tool.js +15 -2
- package/lib/builtin/bash-tool.js.map +1 -1
- package/lib/builtin/five-agent/index.d.ts +0 -1
- package/lib/builtin/five-agent/index.d.ts.map +1 -1
- package/lib/builtin/five-agent/index.js +0 -1
- package/lib/builtin/five-agent/index.js.map +1 -1
- package/lib/builtin/five-agent/role-capability-policy.d.ts +1 -1
- package/lib/builtin/five-agent/role-capability-policy.d.ts.map +1 -1
- package/lib/builtin/five-agent/role-capability-policy.js +1 -1
- package/lib/builtin/five-agent/role-capability-policy.js.map +1 -1
- package/lib/builtin/spawn-task-tool.d.ts +1 -1
- package/lib/builtin/spawn-task-tool.d.ts.map +1 -1
- package/lib/builtin/spawn-task-tool.js +4 -100
- package/lib/builtin/spawn-task-tool.js.map +1 -1
- package/lib/builtin-tools.d.ts +0 -2
- package/lib/builtin-tools.d.ts.map +1 -1
- package/lib/builtin-tools.js +0 -6
- package/lib/builtin-tools.js.map +1 -1
- package/lib/common-adapter-tools.d.ts +1 -1
- package/lib/config/agent-interfaces.d.ts +2 -1
- package/lib/config/agent-interfaces.d.ts.map +1 -1
- package/lib/config/index.d.ts +3 -3
- package/lib/config/index.d.ts.map +1 -1
- package/lib/config/index.js +2 -2
- package/lib/config/index.js.map +1 -1
- package/lib/config/keyword-triggers.d.ts +0 -1
- package/lib/config/keyword-triggers.d.ts.map +1 -1
- package/lib/config/keyword-triggers.js +0 -1
- package/lib/config/keyword-triggers.js.map +1 -1
- package/lib/config/normalize-ai-config.d.ts.map +1 -1
- package/lib/config/normalize-ai-config.js +9 -0
- package/lib/config/normalize-ai-config.js.map +1 -1
- package/lib/config/validate-ai-config.d.ts +1 -0
- package/lib/config/validate-ai-config.d.ts.map +1 -1
- package/lib/config/validate-ai-config.js +179 -0
- package/lib/config/validate-ai-config.js.map +1 -1
- package/lib/config/zhin-agent-config.d.ts +0 -3
- package/lib/config/zhin-agent-config.d.ts.map +1 -1
- package/lib/config/zhin-agent-constants.d.ts +0 -3
- package/lib/config/zhin-agent-constants.d.ts.map +1 -1
- package/lib/config/zhin-agent-constants.js +0 -14
- package/lib/config/zhin-agent-constants.js.map +1 -1
- package/lib/config/zhin-agent-defaults.d.ts.map +1 -1
- package/lib/config/zhin-agent-defaults.js +0 -3
- package/lib/config/zhin-agent-defaults.js.map +1 -1
- package/lib/config/zhin-agent-dependencies.d.ts +4 -5
- package/lib/config/zhin-agent-dependencies.d.ts.map +1 -1
- package/lib/context/context-system.d.ts +2 -1
- package/lib/context/context-system.d.ts.map +1 -1
- package/lib/context/context-system.js +1 -0
- package/lib/context/context-system.js.map +1 -1
- package/lib/context/context-tail-limit.d.ts +2 -2
- package/lib/context/context-tail-limit.d.ts.map +1 -1
- package/lib/context/context-tail-limit.js +2 -3
- package/lib/context/context-tail-limit.js.map +1 -1
- package/lib/context/im-turn-context-adapter.d.ts +1 -2
- package/lib/context/im-turn-context-adapter.d.ts.map +1 -1
- package/lib/context/im-turn-context-adapter.js +1 -5
- package/lib/context/im-turn-context-adapter.js.map +1 -1
- package/lib/context/turn-envelope.d.ts +1 -1
- package/lib/context/turn-envelope.d.ts.map +1 -1
- package/lib/context/turn-envelope.js +4 -0
- package/lib/context/turn-envelope.js.map +1 -1
- package/lib/context/turn-user-message.d.ts +1 -1
- package/lib/context/turn-user-message.d.ts.map +1 -1
- package/lib/context/turn-user-message.js +3 -3
- 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 +36 -12
- package/lib/core/agent-core-run.js.map +1 -1
- package/lib/core/agent-loop-standalone.d.ts +1 -1
- package/lib/core/agent-loop-standalone.js +13 -6
- package/lib/core/agent-loop-standalone.js.map +1 -1
- package/lib/core/tool-execution-authority.d.ts +2 -2
- package/lib/core/tool-execution-authority.d.ts.map +1 -1
- package/lib/data-governance/data-governance.d.ts +198 -0
- package/lib/data-governance/data-governance.d.ts.map +1 -0
- package/lib/data-governance/data-governance.js +660 -0
- package/lib/data-governance/data-governance.js.map +1 -0
- package/lib/data-governance/database-payload-lifecycle-repository.d.ts +68 -0
- package/lib/data-governance/database-payload-lifecycle-repository.d.ts.map +1 -0
- package/lib/data-governance/database-payload-lifecycle-repository.js +226 -0
- package/lib/data-governance/database-payload-lifecycle-repository.js.map +1 -0
- package/lib/data-governance/disclosure-manifest.d.ts +110 -0
- package/lib/data-governance/disclosure-manifest.d.ts.map +1 -0
- package/lib/data-governance/disclosure-manifest.js +264 -0
- package/lib/data-governance/disclosure-manifest.js.map +1 -0
- package/lib/data-governance/encrypted-database-payload-vault.d.ts +107 -0
- package/lib/data-governance/encrypted-database-payload-vault.d.ts.map +1 -0
- package/lib/data-governance/encrypted-database-payload-vault.js +236 -0
- package/lib/data-governance/encrypted-database-payload-vault.js.map +1 -0
- package/lib/data-governance/encrypted-file-payload-vault.d.ts +117 -0
- package/lib/data-governance/encrypted-file-payload-vault.d.ts.map +1 -0
- package/lib/data-governance/encrypted-file-payload-vault.js +507 -0
- package/lib/data-governance/encrypted-file-payload-vault.js.map +1 -0
- package/lib/data-governance/file-payload-lifecycle-repository.d.ts +19 -0
- package/lib/data-governance/file-payload-lifecycle-repository.d.ts.map +1 -0
- package/lib/data-governance/file-payload-lifecycle-repository.js +194 -0
- package/lib/data-governance/file-payload-lifecycle-repository.js.map +1 -0
- package/lib/data-governance/governance-authority-repository.d.ts +148 -0
- package/lib/data-governance/governance-authority-repository.d.ts.map +1 -0
- package/lib/data-governance/governance-authority-repository.js +439 -0
- package/lib/data-governance/governance-authority-repository.js.map +1 -0
- package/lib/data-governance/governed-payload-write-saga.d.ts +126 -0
- package/lib/data-governance/governed-payload-write-saga.d.ts.map +1 -0
- package/lib/data-governance/governed-payload-write-saga.js +471 -0
- package/lib/data-governance/governed-payload-write-saga.js.map +1 -0
- package/lib/data-governance/payload-hold-overdue-projection.d.ts +57 -0
- package/lib/data-governance/payload-hold-overdue-projection.d.ts.map +1 -0
- package/lib/data-governance/payload-hold-overdue-projection.js +80 -0
- package/lib/data-governance/payload-hold-overdue-projection.js.map +1 -0
- package/lib/data-governance/payload-lifecycle.d.ts +359 -0
- package/lib/data-governance/payload-lifecycle.d.ts.map +1 -0
- package/lib/data-governance/payload-lifecycle.js +930 -0
- package/lib/data-governance/payload-lifecycle.js.map +1 -0
- package/lib/data-governance/payload-vault-storage-handoff.d.ts +255 -0
- package/lib/data-governance/payload-vault-storage-handoff.d.ts.map +1 -0
- package/lib/data-governance/payload-vault-storage-handoff.js +471 -0
- package/lib/data-governance/payload-vault-storage-handoff.js.map +1 -0
- package/lib/defaults/hooks.d.ts +2 -2
- package/lib/defaults/hooks.d.ts.map +1 -1
- package/lib/defaults/hooks.js +2 -2
- package/lib/defaults/hooks.js.map +1 -1
- package/lib/defaults/subagents.d.ts +2 -2
- package/lib/defaults/subagents.d.ts.map +1 -1
- package/lib/defaults/subagents.js +2 -2
- package/lib/defaults/subagents.js.map +1 -1
- package/lib/defaults/tools.d.ts +1 -2
- package/lib/defaults/tools.js +2 -2
- package/lib/defaults/tools.js.map +1 -1
- package/lib/discovery/agent-surface-info.d.ts +0 -2
- package/lib/discovery/agent-surface-info.d.ts.map +1 -1
- package/lib/discovery/agent-surface-info.js +0 -5
- package/lib/discovery/agent-surface-info.js.map +1 -1
- package/lib/discovery/agent-surface.d.ts.map +1 -1
- package/lib/discovery/agent-surface.js +0 -39
- package/lib/discovery/agent-surface.js.map +1 -1
- package/lib/event/agent-stream-hooks.d.ts +1 -1
- package/lib/event/hook-stream-sink.d.ts +1 -1
- package/lib/event/publish-agent-stream.d.ts +3 -3
- package/lib/event/publish-agent-stream.d.ts.map +1 -1
- package/lib/event/publish-agent-stream.js +1 -1
- package/lib/event/publish-agent-stream.js.map +1 -1
- package/lib/event/session-events.d.ts +1 -1
- package/lib/event/turn-event.d.ts +22 -2
- package/lib/event/turn-event.d.ts.map +1 -1
- package/lib/event/turn-event.js.map +1 -1
- package/lib/event/turn-to-agent-stream.js +6 -0
- package/lib/event/turn-to-agent-stream.js.map +1 -1
- package/lib/features/agent-feature.d.ts +1 -1
- package/lib/features/mcp-feature.d.ts +1 -1
- package/lib/index.d.ts +99 -33
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +94 -21
- package/lib/index.js.map +1 -1
- package/lib/ingress/capability-ingress.d.ts +5 -5
- package/lib/ingress/capability-ingress.d.ts.map +1 -1
- package/lib/ingress/capability-ingress.js +26 -26
- package/lib/ingress/capability-ingress.js.map +1 -1
- package/lib/init/activate-ai-database-storage.d.ts +5 -3
- package/lib/init/activate-ai-database-storage.d.ts.map +1 -1
- package/lib/init/activate-ai-database-storage.js +23 -32
- package/lib/init/activate-ai-database-storage.js.map +1 -1
- package/lib/init/configure-zhin-agent.d.ts +1 -1
- package/lib/init/configure-zhin-agent.d.ts.map +1 -1
- package/lib/init/configure-zhin-agent.js +3 -5
- package/lib/init/configure-zhin-agent.js.map +1 -1
- package/lib/init/define-ai-database-models.d.ts.map +1 -1
- package/lib/init/define-ai-database-models.js +21 -5
- package/lib/init/define-ai-database-models.js.map +1 -1
- package/lib/init/dispose-zhin-agent.d.ts +1 -3
- package/lib/init/dispose-zhin-agent.d.ts.map +1 -1
- package/lib/init/dispose-zhin-agent.js +0 -2
- package/lib/init/dispose-zhin-agent.js.map +1 -1
- package/lib/init/introspection-collectors.d.ts +1 -1
- package/lib/init/introspection-collectors.d.ts.map +1 -1
- package/lib/init/introspection-collectors.js +13 -14
- package/lib/init/introspection-collectors.js.map +1 -1
- package/lib/internal/agent-host.d.ts +5 -8
- package/lib/internal/agent-host.d.ts.map +1 -1
- package/lib/internal/host-types.d.ts +4 -0
- package/lib/internal/host-types.d.ts.map +1 -1
- package/lib/journal/persistent-turn-journal.d.ts +5 -1
- package/lib/journal/persistent-turn-journal.d.ts.map +1 -1
- package/lib/journal/persistent-turn-journal.js +11 -1
- package/lib/journal/persistent-turn-journal.js.map +1 -1
- package/lib/mcp-client/bridge.d.ts +1 -1
- package/lib/mcp-client/connection.d.ts +1 -1
- package/lib/mcp-client/index.d.ts +1 -1
- package/lib/media/media-normalize.d.ts +9 -5
- package/lib/media/media-normalize.d.ts.map +1 -1
- package/lib/media/media-normalize.js +125 -69
- package/lib/media/media-normalize.js.map +1 -1
- package/lib/media/media-publisher.d.ts.map +1 -1
- package/lib/media/media-publisher.js +48 -3
- package/lib/media/media-publisher.js.map +1 -1
- package/lib/media/vision-capability.js +1 -1
- package/lib/media/vision-capability.js.map +1 -1
- package/lib/memory/index.d.ts +1 -1
- package/lib/memory/index.d.ts.map +1 -1
- package/lib/plugin-ai-hook-bus.d.ts +1 -1
- package/lib/plugin-runtime/agent-host-port.d.ts +66 -4
- 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 +3 -0
- package/lib/plugin-runtime/agent-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/agent-runtime.js +73 -3
- package/lib/plugin-runtime/agent-runtime.js.map +1 -1
- package/lib/plugin-runtime/agent-trace-runtime.d.ts +37 -0
- package/lib/plugin-runtime/agent-trace-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/agent-trace-runtime.js +150 -0
- package/lib/plugin-runtime/agent-trace-runtime.js.map +1 -0
- package/lib/plugin-runtime/capability-tools.js +2 -2
- package/lib/plugin-runtime/capability-tools.js.map +1 -1
- package/lib/plugin-runtime/database-overlay-pack-promotion-repository.d.ts +70 -0
- package/lib/plugin-runtime/database-overlay-pack-promotion-repository.d.ts.map +1 -0
- package/lib/plugin-runtime/database-overlay-pack-promotion-repository.js +203 -0
- package/lib/plugin-runtime/database-overlay-pack-promotion-repository.js.map +1 -0
- package/lib/plugin-runtime/deferred-capability-plan.d.ts +26 -0
- package/lib/plugin-runtime/deferred-capability-plan.d.ts.map +1 -1
- package/lib/plugin-runtime/deferred-capability-plan.js +98 -4
- package/lib/plugin-runtime/deferred-capability-plan.js.map +1 -1
- package/lib/plugin-runtime/full-agent-turn-engine.js +48 -5
- package/lib/plugin-runtime/full-agent-turn-engine.js.map +1 -1
- package/lib/plugin-runtime/host-mcp-projection.d.ts +1 -1
- package/lib/plugin-runtime/index.d.ts +66 -0
- package/lib/plugin-runtime/index.d.ts.map +1 -1
- package/lib/plugin-runtime/index.js +65 -0
- package/lib/plugin-runtime/index.js.map +1 -1
- 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-semantic-memory-tools.d.ts +17 -0
- package/lib/plugin-runtime/native-semantic-memory-tools.d.ts.map +1 -0
- package/lib/plugin-runtime/native-semantic-memory-tools.js +169 -0
- package/lib/plugin-runtime/native-semantic-memory-tools.js.map +1 -0
- package/lib/plugin-runtime/turn-intent-resolver.d.ts +20 -0
- package/lib/plugin-runtime/turn-intent-resolver.d.ts.map +1 -0
- package/lib/plugin-runtime/turn-intent-resolver.js +8 -0
- package/lib/plugin-runtime/turn-intent-resolver.js.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-authority.d.ts +5 -0
- package/lib/plugin-runtime/workroom-acceptance-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-authority.js +14 -0
- package/lib/plugin-runtime/workroom-acceptance-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-fact-providers.d.ts +233 -0
- package/lib/plugin-runtime/workroom-acceptance-fact-providers.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-fact-providers.js +517 -0
- package/lib/plugin-runtime/workroom-acceptance-fact-providers.js.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.d.ts +139 -0
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.js +430 -0
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.js.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-policy.d.ts +4 -0
- package/lib/plugin-runtime/workroom-acceptance-policy.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-policy.js +20 -0
- package/lib/plugin-runtime/workroom-acceptance-policy.js.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts +175 -0
- package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-production-composition.js +793 -0
- package/lib/plugin-runtime/workroom-acceptance-production-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts +186 -0
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.js +553 -0
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts +75 -0
- package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-accepted-source-runtime.js +267 -0
- package/lib/plugin-runtime/workroom-accepted-source-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-assignment-authority-grant-runtime.d.ts +42 -0
- package/lib/plugin-runtime/workroom-assignment-authority-grant-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-assignment-authority-grant-runtime.js +90 -0
- package/lib/plugin-runtime/workroom-assignment-authority-grant-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts +159 -0
- package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-assignment-authority-provider.js +595 -0
- package/lib/plugin-runtime/workroom-assignment-authority-provider.js.map +1 -0
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts +58 -0
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.js +218 -0
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.d.ts +47 -0
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.js +115 -0
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-composition.d.ts +28 -0
- package/lib/plugin-runtime/workroom-data-governance-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-composition.js +41 -0
- package/lib/plugin-runtime/workroom-data-governance-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-root-provider.d.ts +51 -0
- package/lib/plugin-runtime/workroom-data-governance-root-provider.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-root-provider.js +66 -0
- package/lib/plugin-runtime/workroom-data-governance-root-provider.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts +134 -0
- package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-runtime.js +1253 -0
- package/lib/plugin-runtime/workroom-data-governance-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-storage.d.ts +66 -0
- package/lib/plugin-runtime/workroom-data-governance-storage.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-storage.js +160 -0
- package/lib/plugin-runtime/workroom-data-governance-storage.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-composition.d.ts +37 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-composition.js +131 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-console.d.ts +238 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-console.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-console.js +495 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-console.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-human-ingress.d.ts +15 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-human-ingress.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-human-ingress.js +119 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-human-ingress.js.map +1 -0
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.d.ts +142 -0
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.js +301 -0
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.js.map +1 -0
- package/lib/plugin-runtime/workroom-dynamic-planning.d.ts +4 -0
- package/lib/plugin-runtime/workroom-dynamic-planning.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-dynamic-planning.js +13 -0
- package/lib/plugin-runtime/workroom-dynamic-planning.js.map +1 -0
- package/lib/plugin-runtime/workroom-effect-composition.d.ts +37 -0
- package/lib/plugin-runtime/workroom-effect-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-effect-composition.js +69 -0
- package/lib/plugin-runtime/workroom-effect-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-effect-production.d.ts +133 -0
- package/lib/plugin-runtime/workroom-effect-production.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-effect-production.js +272 -0
- package/lib/plugin-runtime/workroom-effect-production.js.map +1 -0
- package/lib/plugin-runtime/workroom-effect-runtime.d.ts +72 -0
- package/lib/plugin-runtime/workroom-effect-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-effect-runtime.js +179 -0
- package/lib/plugin-runtime/workroom-effect-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts +27 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.js +40 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-reasons.d.ts +10 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-reasons.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-reasons.js +20 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-reasons.js.map +1 -0
- package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts +16 -0
- package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-journal-payload-composition.js +69 -0
- package/lib/plugin-runtime/workroom-journal-payload-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.d.ts +17 -0
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.js +101 -0
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.js.map +1 -0
- package/lib/plugin-runtime/workroom-local-agent-loop.d.ts +90 -0
- package/lib/plugin-runtime/workroom-local-agent-loop.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-local-agent-loop.js +303 -0
- package/lib/plugin-runtime/workroom-local-agent-loop.js.map +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-authority.d.ts +5 -0
- package/lib/plugin-runtime/workroom-local-assignment-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-authority.js +16 -0
- package/lib/plugin-runtime/workroom-local-assignment-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-runtime.d.ts +33 -0
- package/lib/plugin-runtime/workroom-local-assignment-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-runtime.js +189 -0
- package/lib/plugin-runtime/workroom-local-assignment-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-supply.d.ts +39 -0
- package/lib/plugin-runtime/workroom-local-assignment-supply.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-supply.js +107 -0
- package/lib/plugin-runtime/workroom-local-assignment-supply.js.map +1 -0
- package/lib/plugin-runtime/workroom-overlay-pack-promotion.d.ts +145 -0
- package/lib/plugin-runtime/workroom-overlay-pack-promotion.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-overlay-pack-promotion.js +516 -0
- package/lib/plugin-runtime/workroom-overlay-pack-promotion.js.map +1 -0
- package/lib/plugin-runtime/workroom-payload-processor-recall.d.ts +91 -0
- package/lib/plugin-runtime/workroom-payload-processor-recall.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-payload-processor-recall.js +189 -0
- package/lib/plugin-runtime/workroom-payload-processor-recall.js.map +1 -0
- package/lib/plugin-runtime/workroom-plan-gate-authority.d.ts +7 -0
- package/lib/plugin-runtime/workroom-plan-gate-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-plan-gate-authority.js +40 -0
- package/lib/plugin-runtime/workroom-plan-gate-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-capacity.d.ts +132 -0
- package/lib/plugin-runtime/workroom-portfolio-capacity.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-capacity.js +189 -0
- package/lib/plugin-runtime/workroom-portfolio-capacity.js.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts +38 -0
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.js +103 -0
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.js.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-control-composition.d.ts +30 -0
- package/lib/plugin-runtime/workroom-portfolio-control-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-control-composition.js +102 -0
- package/lib/plugin-runtime/workroom-portfolio-control-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.d.ts +41 -0
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.js +208 -0
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts +141 -0
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.js +331 -0
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.js.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts +23 -0
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.js +82 -0
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-sponsor.d.ts +96 -0
- package/lib/plugin-runtime/workroom-portfolio-sponsor.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-sponsor.js +313 -0
- package/lib/plugin-runtime/workroom-portfolio-sponsor.js.map +1 -0
- package/lib/plugin-runtime/workroom-preemption-runtime.d.ts +57 -0
- package/lib/plugin-runtime/workroom-preemption-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-preemption-runtime.js +163 -0
- package/lib/plugin-runtime/workroom-preemption-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-priority-authority.d.ts +11 -0
- package/lib/plugin-runtime/workroom-priority-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-priority-authority.js +72 -0
- package/lib/plugin-runtime/workroom-priority-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-profile-authority-composition.d.ts +61 -0
- package/lib/plugin-runtime/workroom-profile-authority-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-profile-authority-composition.js +231 -0
- package/lib/plugin-runtime/workroom-profile-authority-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-profile-authority-runtime.d.ts +228 -0
- package/lib/plugin-runtime/workroom-profile-authority-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-profile-authority-runtime.js +1132 -0
- package/lib/plugin-runtime/workroom-profile-authority-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-projection-outbound.d.ts +10 -0
- package/lib/plugin-runtime/workroom-projection-outbound.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-projection-outbound.js +35 -0
- package/lib/plugin-runtime/workroom-projection-outbound.js.map +1 -0
- package/lib/plugin-runtime/workroom-projection-runtime.d.ts +87 -0
- package/lib/plugin-runtime/workroom-projection-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-projection-runtime.js +421 -0
- package/lib/plugin-runtime/workroom-projection-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-remote-assignment-authority.d.ts +9 -0
- package/lib/plugin-runtime/workroom-remote-assignment-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-remote-assignment-authority.js +20 -0
- package/lib/plugin-runtime/workroom-remote-assignment-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts +38 -0
- package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-remote-callback-runtime.js +80 -0
- package/lib/plugin-runtime/workroom-remote-callback-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-remote-executor.d.ts +20 -0
- package/lib/plugin-runtime/workroom-remote-executor.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-remote-executor.js +42 -0
- package/lib/plugin-runtime/workroom-remote-executor.js.map +1 -0
- package/lib/plugin-runtime/workroom-reviewer-authority-runtime.d.ts +72 -0
- package/lib/plugin-runtime/workroom-reviewer-authority-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-reviewer-authority-runtime.js +142 -0
- package/lib/plugin-runtime/workroom-reviewer-authority-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-risk-acceptance-runtime.d.ts +112 -0
- package/lib/plugin-runtime/workroom-risk-acceptance-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-risk-acceptance-runtime.js +376 -0
- package/lib/plugin-runtime/workroom-risk-acceptance-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts +42 -0
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.js +125 -0
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts +25 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.js +79 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-contract.d.ts +16 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-contract.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-contract.js +49 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-contract.js.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts +63 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.js +233 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.d.ts +37 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.js +122 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.js.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-route-registry.d.ts +27 -0
- package/lib/plugin-runtime/workroom-scheduler-route-registry.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-route-registry.js +136 -0
- package/lib/plugin-runtime/workroom-scheduler-route-registry.js.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts +84 -0
- package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-runtime.js +231 -0
- package/lib/plugin-runtime/workroom-scheduler-runtime.js.map +1 -0
- package/lib/portfolio/capacity-control-outbox.d.ts +174 -0
- package/lib/portfolio/capacity-control-outbox.d.ts.map +1 -0
- package/lib/portfolio/capacity-control-outbox.js +338 -0
- package/lib/portfolio/capacity-control-outbox.js.map +1 -0
- package/lib/portfolio/database-capacity-control-outbox.d.ts +62 -0
- package/lib/portfolio/database-capacity-control-outbox.d.ts.map +1 -0
- package/lib/portfolio/database-capacity-control-outbox.js +166 -0
- package/lib/portfolio/database-capacity-control-outbox.js.map +1 -0
- package/lib/portfolio/file-capacity-control-outbox.d.ts +10 -0
- package/lib/portfolio/file-capacity-control-outbox.d.ts.map +1 -0
- package/lib/portfolio/file-capacity-control-outbox.js +113 -0
- package/lib/portfolio/file-capacity-control-outbox.js.map +1 -0
- package/lib/portfolio/file-portfolio-journal.d.ts +11 -0
- package/lib/portfolio/file-portfolio-journal.d.ts.map +1 -0
- package/lib/portfolio/file-portfolio-journal.js +196 -0
- package/lib/portfolio/file-portfolio-journal.js.map +1 -0
- package/lib/portfolio/portfolio-admission.d.ts +95 -0
- package/lib/portfolio/portfolio-admission.d.ts.map +1 -0
- package/lib/portfolio/portfolio-admission.js +1080 -0
- package/lib/portfolio/portfolio-admission.js.map +1 -0
- package/lib/portfolio/portfolio-journal.d.ts +359 -0
- package/lib/portfolio/portfolio-journal.d.ts.map +1 -0
- package/lib/portfolio/portfolio-journal.js +844 -0
- package/lib/portfolio/portfolio-journal.js.map +1 -0
- package/lib/portfolio/resource-bundle.d.ts +136 -0
- package/lib/portfolio/resource-bundle.d.ts.map +1 -0
- package/lib/portfolio/resource-bundle.js +387 -0
- package/lib/portfolio/resource-bundle.js.map +1 -0
- package/lib/portfolio/sponsor-projection.d.ts +78 -0
- package/lib/portfolio/sponsor-projection.d.ts.map +1 -0
- package/lib/portfolio/sponsor-projection.js +135 -0
- package/lib/portfolio/sponsor-projection.js.map +1 -0
- package/lib/prompt/assembly.d.ts.map +1 -1
- package/lib/prompt/assembly.js +1 -3
- package/lib/prompt/assembly.js.map +1 -1
- package/lib/prompt/prompt-builder.d.ts +1 -1
- package/lib/prompt/prompt-builder.d.ts.map +1 -1
- package/lib/prompt/system-prompt.d.ts +1 -1
- package/lib/prompt/system-prompt.js +2 -2
- package/lib/prompt/system-prompt.js.map +1 -1
- package/lib/reserved-tools.d.ts.map +1 -1
- package/lib/reserved-tools.js +0 -1
- package/lib/reserved-tools.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/hook-registry.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/hook-registry.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/index.d.ts +4 -11
- package/lib/{orchestrator → resource-hub}/index.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/index.js +4 -8
- package/lib/{orchestrator → resource-hub}/index.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/mcp-lifecycle.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/mcp-lifecycle.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/mcp-registry.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/mcp-registry.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/resolve-subagent-tools.d.ts +3 -3
- package/lib/resource-hub/resolve-subagent-tools.d.ts.map +1 -0
- package/lib/{orchestrator → resource-hub}/resolve-subagent-tools.js +18 -13
- package/lib/resource-hub/resolve-subagent-tools.js.map +1 -0
- package/lib/{orchestrator → resource-hub}/resource-registry.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/resource-registry.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/role-configs.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/role-configs.js +0 -2
- package/lib/{orchestrator → resource-hub}/role-configs.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/skill-registry.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/skill-registry.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/subagent-registry.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/subagent-registry.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/tool-registry.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/tool-registry.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/tool-selection.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/tool-selection.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/types.d.ts +1 -1
- package/lib/{orchestrator → resource-hub}/types.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/types.js.map +1 -1
- package/lib/routing/workroom-bot-identity.d.ts +22 -0
- package/lib/routing/workroom-bot-identity.d.ts.map +1 -0
- package/lib/routing/workroom-bot-identity.js +46 -0
- package/lib/routing/workroom-bot-identity.js.map +1 -0
- package/lib/schedule-domain/budget-guard.d.ts +1 -1
- package/lib/schedule-domain/budget-guard.d.ts.map +1 -1
- package/lib/schedule-domain/budget-guard.js +9 -1
- package/lib/schedule-domain/budget-guard.js.map +1 -1
- package/lib/schedule-domain/execution-domain.d.ts +1 -0
- package/lib/schedule-domain/execution-domain.d.ts.map +1 -1
- package/lib/schedule-domain/execution-domain.js +3 -1
- package/lib/schedule-domain/execution-domain.js.map +1 -1
- package/lib/schedule-domain/schedule-execution-queue.d.ts +24 -0
- package/lib/schedule-domain/schedule-execution-queue.d.ts.map +1 -0
- package/lib/schedule-domain/schedule-execution-queue.js +123 -0
- package/lib/schedule-domain/schedule-execution-queue.js.map +1 -0
- package/lib/seam/seam-integration.d.ts +1 -1
- package/lib/seam/seam-integration.js +1 -1
- package/lib/seam/skill-service.d.ts +1 -1
- package/lib/security/exec-policy.d.ts +11 -1
- package/lib/security/exec-policy.d.ts.map +1 -1
- package/lib/security/exec-policy.js +16 -4
- package/lib/security/exec-policy.js.map +1 -1
- package/lib/security/policy-facade.d.ts.map +1 -1
- package/lib/security/policy-facade.js +60 -5
- package/lib/security/policy-facade.js.map +1 -1
- package/lib/security/sandbox-docker.js +1 -1
- package/lib/security/sandbox-docker.js.map +1 -1
- package/lib/security/sandbox.d.ts +2 -0
- package/lib/security/sandbox.d.ts.map +1 -1
- package/lib/security/sandbox.js +16 -4
- package/lib/security/sandbox.js.map +1 -1
- package/lib/security/turn-file-authority.d.ts +1 -1
- package/lib/security/turn-file-authority.d.ts.map +1 -1
- package/lib/security/turn-file-authority.js +10 -3
- package/lib/security/turn-file-authority.js.map +1 -1
- package/lib/security/turn-sandbox-authority.d.ts +13 -0
- package/lib/security/turn-sandbox-authority.d.ts.map +1 -0
- package/lib/security/turn-sandbox-authority.js +42 -0
- package/lib/security/turn-sandbox-authority.js.map +1 -0
- package/lib/service.d.ts +2 -0
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +2 -1
- package/lib/service.js.map +1 -1
- package/lib/session/approval-port.d.ts +2 -0
- package/lib/session/approval-port.d.ts.map +1 -1
- package/lib/session/approval-port.js.map +1 -1
- package/lib/session/index.d.ts +2 -6
- package/lib/session/index.d.ts.map +1 -1
- package/lib/session/index.js +2 -4
- package/lib/session/index.js.map +1 -1
- package/lib/session/session-io.d.ts +2 -6
- package/lib/session/session-io.d.ts.map +1 -1
- package/lib/session/session-io.js +4 -20
- package/lib/session/session-io.js.map +1 -1
- package/lib/session/session-system.d.ts +0 -2
- package/lib/session/session-system.d.ts.map +1 -1
- package/lib/session/session-system.js +2 -13
- package/lib/session/session-system.js.map +1 -1
- package/lib/session/turn-ingress-session.d.ts +1 -5
- package/lib/session/turn-ingress-session.d.ts.map +1 -1
- package/lib/session/turn-ingress-session.js +27 -29
- package/lib/session/turn-ingress-session.js.map +1 -1
- package/lib/session-tree-runtime.d.ts +15 -0
- package/lib/session-tree-runtime.d.ts.map +1 -0
- package/lib/{session-tree-runtime-registry.js → session-tree-runtime.js} +5 -15
- package/lib/session-tree-runtime.js.map +1 -0
- package/lib/skill/index.d.ts +2 -2
- package/lib/skill/index.d.ts.map +1 -1
- package/lib/skill/index.js +1 -1
- package/lib/skill/skill-registry-as-service.d.ts +1 -1
- package/lib/skill/skill-system.d.ts +4 -4
- package/lib/skill/skill-system.d.ts.map +1 -1
- package/lib/skill/skill-system.js +2 -2
- package/lib/skill/skill-system.js.map +1 -1
- package/lib/subagent/subagent-runtime.d.ts +2 -7
- package/lib/subagent/subagent-runtime.d.ts.map +1 -1
- package/lib/subagent/subagent-runtime.js +4 -43
- package/lib/subagent/subagent-runtime.js.map +1 -1
- package/lib/subagent/subagent-system-init.d.ts.map +1 -1
- package/lib/subagent/subagent-system-init.js +0 -2
- package/lib/subagent/subagent-system-init.js.map +1 -1
- package/lib/subagent-ai-events.d.ts +1 -1
- package/lib/subagent-ai-events.js +1 -1
- package/lib/subagent-preset.d.ts +1 -1
- package/lib/subagent-preset.d.ts.map +1 -1
- package/lib/subagent-prompt.d.ts +0 -2
- package/lib/subagent-prompt.d.ts.map +1 -1
- package/lib/subagent-prompt.js +3 -3
- package/lib/subagent-prompt.js.map +1 -1
- package/lib/task-executor.d.ts +1 -0
- package/lib/task-executor.d.ts.map +1 -1
- package/lib/task-executor.js +4 -1
- package/lib/task-executor.js.map +1 -1
- package/lib/tool/classic-tool-execution-authority.js +2 -2
- package/lib/tool/classic-tool-execution-authority.js.map +1 -1
- package/lib/tool/context-tools.d.ts +1 -4
- package/lib/tool/context-tools.d.ts.map +1 -1
- package/lib/tool/context-tools.js +0 -50
- package/lib/tool/context-tools.js.map +1 -1
- package/lib/tool/contracts.d.ts +1 -1
- package/lib/tool/conversation-reference-tool.d.ts +5 -0
- package/lib/tool/conversation-reference-tool.d.ts.map +1 -0
- package/lib/tool/conversation-reference-tool.js +40 -0
- package/lib/tool/conversation-reference-tool.js.map +1 -0
- package/lib/tool/index.d.ts +1 -0
- package/lib/tool/index.d.ts.map +1 -1
- package/lib/tool/index.js +1 -0
- 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 +7 -22
- package/lib/tool/prepare-turn-tools.js.map +1 -1
- package/lib/tool/runtime.d.ts +3 -4
- package/lib/tool/runtime.d.ts.map +1 -1
- package/lib/tool/runtime.js +0 -1
- package/lib/tool/runtime.js.map +1 -1
- package/lib/tool/sources.d.ts +3 -4
- package/lib/tool/sources.d.ts.map +1 -1
- package/lib/tool/sources.js +2 -6
- package/lib/tool/sources.js.map +1 -1
- package/lib/tool/tool-approval-once-store.d.ts +1 -1
- package/lib/tool/tool-approval-once-store.js +1 -1
- package/lib/tool/tool-system.d.ts.map +1 -1
- package/lib/tool/tool-system.js.map +1 -1
- package/lib/tool/turn-tool-runtime.d.ts +2 -1
- package/lib/tool/turn-tool-runtime.d.ts.map +1 -1
- package/lib/tool/turn-tool-runtime.js +76 -21
- package/lib/tool/turn-tool-runtime.js.map +1 -1
- package/lib/tool-bridge.d.ts +2 -2
- package/lib/tool-bridge.js +1 -1
- package/lib/tool-catalog/deferred-turn-controller.d.ts +1 -1
- package/lib/tool-catalog/tool-catalog.d.ts +1 -1
- package/lib/turn/auto-continue.d.ts +1 -1
- package/lib/turn/deferred-delivery.d.ts +1 -1
- package/lib/turn/inbound-media.d.ts +12 -8
- package/lib/turn/inbound-media.d.ts.map +1 -1
- package/lib/turn/inbound-media.js +61 -42
- package/lib/turn/inbound-media.js.map +1 -1
- package/lib/turn/inbound-queue-config.d.ts +1 -1
- package/lib/turn/inbound-queue-runtime.d.ts +1 -1
- package/lib/turn/inbound-turn-queue.d.ts +1 -1
- package/lib/turn/index.d.ts +1 -1
- package/lib/turn/index.d.ts.map +1 -1
- package/lib/turn/index.js.map +1 -1
- package/lib/turn/persist-deferred-context.d.ts +1 -1
- package/lib/turn/persist-subagent-context.d.ts +1 -1
- package/lib/turn/process-stream.d.ts +1 -1
- package/lib/turn/prompt-api.d.ts +1 -1
- package/lib/turn/prompt-controller.d.ts +6 -0
- package/lib/turn/prompt-controller.d.ts.map +1 -1
- package/lib/turn/prompt-controller.js +58 -5
- package/lib/turn/prompt-controller.js.map +1 -1
- package/lib/turn/turn-ingress.d.ts +55 -5
- package/lib/turn/turn-ingress.d.ts.map +1 -1
- package/lib/turn/turn-ingress.js +18 -0
- package/lib/turn/turn-ingress.js.map +1 -1
- package/lib/turn/turn-pipeline.d.ts.map +1 -1
- package/lib/turn/turn-pipeline.js +5 -4
- package/lib/turn/turn-pipeline.js.map +1 -1
- package/lib/utils/keyed-mutex.d.ts +1 -1
- package/lib/utils/keyed-mutex.d.ts.map +1 -1
- package/lib/utils/keyed-mutex.js +32 -5
- package/lib/utils/keyed-mutex.js.map +1 -1
- package/lib/workroom/acceptance-control.d.ts +76 -0
- package/lib/workroom/acceptance-control.d.ts.map +1 -0
- package/lib/workroom/acceptance-control.js +335 -0
- package/lib/workroom/acceptance-control.js.map +1 -0
- package/lib/workroom/acceptance-policy.d.ts +152 -0
- package/lib/workroom/acceptance-policy.d.ts.map +1 -0
- package/lib/workroom/acceptance-policy.js +610 -0
- package/lib/workroom/acceptance-policy.js.map +1 -0
- package/lib/workroom/accepted-source-memory-application.d.ts +113 -0
- package/lib/workroom/accepted-source-memory-application.d.ts.map +1 -0
- package/lib/workroom/accepted-source-memory-application.js +327 -0
- package/lib/workroom/accepted-source-memory-application.js.map +1 -0
- package/lib/workroom/accepted-source-projector.d.ts +89 -0
- package/lib/workroom/accepted-source-projector.d.ts.map +1 -0
- package/lib/workroom/accepted-source-projector.js +281 -0
- package/lib/workroom/accepted-source-projector.js.map +1 -0
- package/lib/workroom/assignment-authority-grant-application.d.ts +125 -0
- package/lib/workroom/assignment-authority-grant-application.d.ts.map +1 -0
- package/lib/workroom/assignment-authority-grant-application.js +317 -0
- package/lib/workroom/assignment-authority-grant-application.js.map +1 -0
- package/lib/workroom/assignment-authority-grant-repository.d.ts +151 -0
- package/lib/workroom/assignment-authority-grant-repository.d.ts.map +1 -0
- package/lib/workroom/assignment-authority-grant-repository.js +387 -0
- package/lib/workroom/assignment-authority-grant-repository.js.map +1 -0
- package/lib/workroom/assignment-executor.d.ts +110 -0
- package/lib/workroom/assignment-executor.d.ts.map +1 -0
- package/lib/workroom/assignment-executor.js +371 -0
- package/lib/workroom/assignment-executor.js.map +1 -0
- package/lib/workroom/assignment-observation-ingress.d.ts +21 -0
- package/lib/workroom/assignment-observation-ingress.d.ts.map +1 -0
- package/lib/workroom/assignment-observation-ingress.js +24 -0
- package/lib/workroom/assignment-observation-ingress.js.map +1 -0
- package/lib/workroom/canonical-value.d.ts +7 -0
- package/lib/workroom/canonical-value.d.ts.map +1 -0
- package/lib/workroom/canonical-value.js +32 -0
- package/lib/workroom/canonical-value.js.map +1 -0
- package/lib/workroom/catalog-definition.d.ts +49 -0
- package/lib/workroom/catalog-definition.d.ts.map +1 -0
- package/lib/workroom/catalog-definition.js +2 -0
- package/lib/workroom/catalog-definition.js.map +1 -0
- package/lib/workroom/catalog.d.ts +80 -0
- package/lib/workroom/catalog.d.ts.map +1 -0
- package/lib/workroom/catalog.js +372 -0
- package/lib/workroom/catalog.js.map +1 -0
- package/lib/workroom/database-project-knowledge-journal.d.ts +62 -0
- package/lib/workroom/database-project-knowledge-journal.d.ts.map +1 -0
- package/lib/workroom/database-project-knowledge-journal.js +161 -0
- package/lib/workroom/database-project-knowledge-journal.js.map +1 -0
- package/lib/workroom/durable-file-store.d.ts +52 -0
- package/lib/workroom/durable-file-store.d.ts.map +1 -0
- package/lib/workroom/durable-file-store.js +117 -0
- package/lib/workroom/durable-file-store.js.map +1 -0
- package/lib/workroom/dynamic-workflow-planner.d.ts +86 -0
- package/lib/workroom/dynamic-workflow-planner.d.ts.map +1 -0
- package/lib/workroom/dynamic-workflow-planner.js +260 -0
- package/lib/workroom/dynamic-workflow-planner.js.map +1 -0
- package/lib/workroom/effect-blocker-repository.d.ts +35 -0
- package/lib/workroom/effect-blocker-repository.d.ts.map +1 -0
- package/lib/workroom/effect-blocker-repository.js +174 -0
- package/lib/workroom/effect-blocker-repository.js.map +1 -0
- package/lib/workroom/effect-ledger.d.ts +191 -0
- package/lib/workroom/effect-ledger.d.ts.map +1 -0
- package/lib/workroom/effect-ledger.js +443 -0
- package/lib/workroom/effect-ledger.js.map +1 -0
- package/lib/workroom/file-accepted-source-memory-repository.d.ts +15 -0
- package/lib/workroom/file-accepted-source-memory-repository.d.ts.map +1 -0
- package/lib/workroom/file-accepted-source-memory-repository.js +133 -0
- package/lib/workroom/file-accepted-source-memory-repository.js.map +1 -0
- package/lib/workroom/file-effect-ledger.d.ts +10 -0
- package/lib/workroom/file-effect-ledger.d.ts.map +1 -0
- package/lib/workroom/file-effect-ledger.js +118 -0
- package/lib/workroom/file-effect-ledger.js.map +1 -0
- package/lib/workroom/file-human-ingress-application.d.ts +10 -0
- package/lib/workroom/file-human-ingress-application.d.ts.map +1 -0
- package/lib/workroom/file-human-ingress-application.js +177 -0
- package/lib/workroom/file-human-ingress-application.js.map +1 -0
- package/lib/workroom/file-human-ingress.d.ts +24 -0
- package/lib/workroom/file-human-ingress.d.ts.map +1 -0
- package/lib/workroom/file-human-ingress.js +234 -0
- package/lib/workroom/file-human-ingress.js.map +1 -0
- package/lib/workroom/file-interaction-space-binding-repository.d.ts +24 -0
- package/lib/workroom/file-interaction-space-binding-repository.d.ts.map +1 -0
- package/lib/workroom/file-interaction-space-binding-repository.js +293 -0
- package/lib/workroom/file-interaction-space-binding-repository.js.map +1 -0
- package/lib/workroom/file-profile-journal.d.ts +32 -0
- package/lib/workroom/file-profile-journal.d.ts.map +1 -0
- package/lib/workroom/file-profile-journal.js +308 -0
- package/lib/workroom/file-profile-journal.js.map +1 -0
- package/lib/workroom/git-workspace-gateway.d.ts +149 -0
- package/lib/workroom/git-workspace-gateway.d.ts.map +1 -0
- package/lib/workroom/git-workspace-gateway.js +248 -0
- package/lib/workroom/git-workspace-gateway.js.map +1 -0
- package/lib/workroom/human-ingress-application.d.ts +126 -0
- package/lib/workroom/human-ingress-application.d.ts.map +1 -0
- package/lib/workroom/human-ingress-application.js +414 -0
- package/lib/workroom/human-ingress-application.js.map +1 -0
- package/lib/workroom/human-ingress-orchestrator.d.ts +99 -0
- package/lib/workroom/human-ingress-orchestrator.d.ts.map +1 -0
- package/lib/workroom/human-ingress-orchestrator.js +234 -0
- package/lib/workroom/human-ingress-orchestrator.js.map +1 -0
- package/lib/workroom/human-ingress-source-reader.d.ts +29 -0
- package/lib/workroom/human-ingress-source-reader.d.ts.map +1 -0
- package/lib/workroom/human-ingress-source-reader.js +119 -0
- package/lib/workroom/human-ingress-source-reader.js.map +1 -0
- package/lib/workroom/human-ingress.d.ts +182 -0
- package/lib/workroom/human-ingress.d.ts.map +1 -0
- package/lib/workroom/human-ingress.js +526 -0
- package/lib/workroom/human-ingress.js.map +1 -0
- package/lib/workroom/interaction-space-binding-service.d.ts +57 -0
- package/lib/workroom/interaction-space-binding-service.d.ts.map +1 -0
- package/lib/workroom/interaction-space-binding-service.js +197 -0
- package/lib/workroom/interaction-space-binding-service.js.map +1 -0
- package/lib/workroom/interaction-space-router.d.ts +75 -0
- package/lib/workroom/interaction-space-router.d.ts.map +1 -0
- package/lib/workroom/interaction-space-router.js +243 -0
- package/lib/workroom/interaction-space-router.js.map +1 -0
- package/lib/workroom/journal-model.d.ts +40 -0
- package/lib/workroom/journal-model.d.ts.map +1 -0
- package/lib/workroom/journal-model.js +12 -0
- package/lib/workroom/journal-model.js.map +1 -0
- package/lib/workroom/journal.d.ts +214 -0
- package/lib/workroom/journal.d.ts.map +1 -0
- package/lib/workroom/journal.js +1935 -0
- package/lib/workroom/journal.js.map +1 -0
- package/lib/workroom/kernel-contracts.d.ts +167 -0
- package/lib/workroom/kernel-contracts.d.ts.map +1 -0
- package/lib/workroom/kernel-contracts.js +2 -0
- package/lib/workroom/kernel-contracts.js.map +1 -0
- package/lib/workroom/kernel-state.d.ts +5 -0
- package/lib/workroom/kernel-state.d.ts.map +1 -0
- package/lib/workroom/kernel-state.js +819 -0
- package/lib/workroom/kernel-state.js.map +1 -0
- package/lib/workroom/legacy-embedded-payload-migration.d.ts +89 -0
- package/lib/workroom/legacy-embedded-payload-migration.d.ts.map +1 -0
- package/lib/workroom/legacy-embedded-payload-migration.js +312 -0
- package/lib/workroom/legacy-embedded-payload-migration.js.map +1 -0
- package/lib/workroom/legacy-run-offline-migration.d.ts +84 -0
- package/lib/workroom/legacy-run-offline-migration.d.ts.map +1 -0
- package/lib/workroom/legacy-run-offline-migration.js +470 -0
- package/lib/workroom/legacy-run-offline-migration.js.map +1 -0
- package/lib/workroom/local-assignment-executor.d.ts +59 -0
- package/lib/workroom/local-assignment-executor.d.ts.map +1 -0
- package/lib/workroom/local-assignment-executor.js +197 -0
- package/lib/workroom/local-assignment-executor.js.map +1 -0
- package/lib/workroom/local-assignment-issuance.d.ts +68 -0
- package/lib/workroom/local-assignment-issuance.d.ts.map +1 -0
- package/lib/workroom/local-assignment-issuance.js +128 -0
- package/lib/workroom/local-assignment-issuance.js.map +1 -0
- package/lib/workroom/plan-approval-control.d.ts +52 -0
- package/lib/workroom/plan-approval-control.d.ts.map +1 -0
- package/lib/workroom/plan-approval-control.js +9 -0
- package/lib/workroom/plan-approval-control.js.map +1 -0
- package/lib/workroom/plan-revision.d.ts +44 -0
- package/lib/workroom/plan-revision.d.ts.map +1 -0
- package/lib/workroom/plan-revision.js +133 -0
- package/lib/workroom/plan-revision.js.map +1 -0
- package/lib/workroom/profile-compiler.d.ts +130 -0
- package/lib/workroom/profile-compiler.d.ts.map +1 -0
- package/lib/workroom/profile-compiler.js +357 -0
- package/lib/workroom/profile-compiler.js.map +1 -0
- package/lib/workroom/profile-registry.d.ts +191 -0
- package/lib/workroom/profile-registry.d.ts.map +1 -0
- package/lib/workroom/profile-registry.js +698 -0
- package/lib/workroom/profile-registry.js.map +1 -0
- package/lib/workroom/project-knowledge-registry.d.ts +136 -0
- package/lib/workroom/project-knowledge-registry.d.ts.map +1 -0
- package/lib/workroom/project-knowledge-registry.js +429 -0
- package/lib/workroom/project-knowledge-registry.js.map +1 -0
- package/lib/workroom/projection-outbox.d.ts +254 -0
- package/lib/workroom/projection-outbox.d.ts.map +1 -0
- package/lib/workroom/projection-outbox.js +1312 -0
- package/lib/workroom/projection-outbox.js.map +1 -0
- package/lib/workroom/remote-assignment-dispatch-command.d.ts +31 -0
- package/lib/workroom/remote-assignment-dispatch-command.d.ts.map +1 -0
- package/lib/workroom/remote-assignment-dispatch-command.js +56 -0
- package/lib/workroom/remote-assignment-dispatch-command.js.map +1 -0
- package/lib/workroom/remote-assignment-issuance.d.ts +88 -0
- package/lib/workroom/remote-assignment-issuance.d.ts.map +1 -0
- package/lib/workroom/remote-assignment-issuance.js +201 -0
- package/lib/workroom/remote-assignment-issuance.js.map +1 -0
- package/lib/workroom/remote-callback-application.d.ts +115 -0
- package/lib/workroom/remote-callback-application.d.ts.map +1 -0
- package/lib/workroom/remote-callback-application.js +570 -0
- package/lib/workroom/remote-callback-application.js.map +1 -0
- package/lib/workroom/remote-callback-gateway.d.ts +60 -0
- package/lib/workroom/remote-callback-gateway.d.ts.map +1 -0
- package/lib/workroom/remote-callback-gateway.js +173 -0
- package/lib/workroom/remote-callback-gateway.js.map +1 -0
- package/lib/workroom/remote-callback-inbox.d.ts +278 -0
- package/lib/workroom/remote-callback-inbox.d.ts.map +1 -0
- package/lib/workroom/remote-callback-inbox.js +1088 -0
- package/lib/workroom/remote-callback-inbox.js.map +1 -0
- package/lib/workroom/remote-callback-reconciliation-worker.d.ts +60 -0
- package/lib/workroom/remote-callback-reconciliation-worker.d.ts.map +1 -0
- package/lib/workroom/remote-callback-reconciliation-worker.js +197 -0
- package/lib/workroom/remote-callback-reconciliation-worker.js.map +1 -0
- package/lib/workroom/remote-dispatch-admission.d.ts +45 -0
- package/lib/workroom/remote-dispatch-admission.d.ts.map +1 -0
- package/lib/workroom/remote-dispatch-admission.js +187 -0
- package/lib/workroom/remote-dispatch-admission.js.map +1 -0
- package/lib/workroom/remote-dispatch-outbox.d.ts +203 -0
- package/lib/workroom/remote-dispatch-outbox.d.ts.map +1 -0
- package/lib/workroom/remote-dispatch-outbox.js +765 -0
- package/lib/workroom/remote-dispatch-outbox.js.map +1 -0
- package/lib/workroom/remote-dispatch-scheduler.d.ts +36 -0
- package/lib/workroom/remote-dispatch-scheduler.d.ts.map +1 -0
- package/lib/workroom/remote-dispatch-scheduler.js +133 -0
- package/lib/workroom/remote-dispatch-scheduler.js.map +1 -0
- package/lib/workroom/remote-dispatch-worker.d.ts +22 -0
- package/lib/workroom/remote-dispatch-worker.d.ts.map +1 -0
- package/lib/workroom/remote-dispatch-worker.js +124 -0
- package/lib/workroom/remote-dispatch-worker.js.map +1 -0
- package/lib/workroom/remote-dispatch.d.ts +79 -0
- package/lib/workroom/remote-dispatch.d.ts.map +1 -0
- package/lib/workroom/remote-dispatch.js +220 -0
- package/lib/workroom/remote-dispatch.js.map +1 -0
- package/lib/workroom/role-capability-snapshot.d.ts +88 -0
- package/lib/workroom/role-capability-snapshot.d.ts.map +1 -0
- package/lib/workroom/role-capability-snapshot.js +456 -0
- package/lib/workroom/role-capability-snapshot.js.map +1 -0
- package/lib/workroom/runtime.d.ts +109 -0
- package/lib/workroom/runtime.d.ts.map +1 -0
- package/lib/workroom/runtime.js +450 -0
- package/lib/workroom/runtime.js.map +1 -0
- package/lib/workroom/scheduler-priority-control.d.ts +35 -0
- package/lib/workroom/scheduler-priority-control.d.ts.map +1 -0
- package/lib/workroom/scheduler-priority-control.js +9 -0
- package/lib/workroom/scheduler-priority-control.js.map +1 -0
- package/lib/workroom/workflow-plan-builder.d.ts +88 -0
- package/lib/workroom/workflow-plan-builder.d.ts.map +1 -0
- package/lib/workroom/workflow-plan-builder.js +232 -0
- package/lib/workroom/workflow-plan-builder.js.map +1 -0
- package/lib/workroom/workroom-assignment-knowledge-context.d.ts +102 -0
- package/lib/workroom/workroom-assignment-knowledge-context.d.ts.map +1 -0
- package/lib/workroom/workroom-assignment-knowledge-context.js +127 -0
- package/lib/workroom/workroom-assignment-knowledge-context.js.map +1 -0
- package/lib/workroom/workroom-kernel.d.ts +141 -0
- package/lib/workroom/workroom-kernel.d.ts.map +1 -0
- package/lib/workroom/workroom-kernel.js +1325 -0
- package/lib/workroom/workroom-kernel.js.map +1 -0
- package/lib/workroom/workroom-preemption.d.ts +65 -0
- package/lib/workroom/workroom-preemption.d.ts.map +1 -0
- package/lib/workroom/workroom-preemption.js +213 -0
- package/lib/workroom/workroom-preemption.js.map +1 -0
- package/lib/workroom/workroom-scheduler-application.d.ts +43 -0
- package/lib/workroom/workroom-scheduler-application.d.ts.map +1 -0
- package/lib/workroom/workroom-scheduler-application.js +71 -0
- package/lib/workroom/workroom-scheduler-application.js.map +1 -0
- package/lib/workroom/workroom-scheduler.d.ts +135 -0
- package/lib/workroom/workroom-scheduler.d.ts.map +1 -0
- package/lib/workroom/workroom-scheduler.js +649 -0
- package/lib/workroom/workroom-scheduler.js.map +1 -0
- package/lib/workroom/workroom-task-report-store.d.ts +131 -0
- package/lib/workroom/workroom-task-report-store.d.ts.map +1 -0
- package/lib/workroom/workroom-task-report-store.js +528 -0
- package/lib/workroom/workroom-task-report-store.js.map +1 -0
- package/lib/zhin-agent/index.d.ts +7 -22
- package/lib/zhin-agent/index.d.ts.map +1 -1
- package/lib/zhin-agent/index.js +5 -33
- package/lib/zhin-agent/index.js.map +1 -1
- package/lib/zhin-agent/runtime-modules.d.ts +3 -3
- package/lib/zhin-agent/runtime-modules.d.ts.map +1 -1
- package/lib/zhin-agent/runtime-modules.js +3 -3
- package/lib/zhin-agent/runtime-modules.js.map +1 -1
- package/package.json +10 -16
- package/lib/a2a/delegation-message.d.ts +0 -14
- package/lib/a2a/delegation-message.d.ts.map +0 -1
- package/lib/a2a/delegation-message.js +0 -53
- package/lib/a2a/delegation-message.js.map +0 -1
- package/lib/a2a/task-state.d.ts +0 -9
- package/lib/a2a/task-state.d.ts.map +0 -1
- package/lib/a2a/task-state.js +0 -53
- package/lib/a2a/task-state.js.map +0 -1
- package/lib/assistant/runtime-registry.d.ts +0 -23
- package/lib/assistant/runtime-registry.d.ts.map +0 -1
- package/lib/assistant/runtime-registry.js +0 -27
- package/lib/assistant/runtime-registry.js.map +0 -1
- package/lib/authoring/define-dynamic.d.ts +0 -4
- package/lib/authoring/define-dynamic.d.ts.map +0 -1
- package/lib/authoring/define-dynamic.js +0 -8
- package/lib/authoring/define-dynamic.js.map +0 -1
- package/lib/authoring/define-state.d.ts +0 -4
- package/lib/authoring/define-state.d.ts.map +0 -1
- package/lib/authoring/define-state.js +0 -8
- package/lib/authoring/define-state.js.map +0 -1
- package/lib/builtin/five-agent/strategy.d.ts +0 -4
- package/lib/builtin/five-agent/strategy.d.ts.map +0 -1
- package/lib/builtin/five-agent/strategy.js +0 -42
- package/lib/builtin/five-agent/strategy.js.map +0 -1
- package/lib/builtin/memory-search-tool.d.ts +0 -2
- package/lib/builtin/memory-search-tool.d.ts.map +0 -1
- package/lib/builtin/memory-search-tool.js +0 -58
- package/lib/builtin/memory-search-tool.js.map +0 -1
- package/lib/builtin/memory-upsert-tool.d.ts +0 -2
- package/lib/builtin/memory-upsert-tool.d.ts.map +0 -1
- package/lib/builtin/memory-upsert-tool.js +0 -72
- package/lib/builtin/memory-upsert-tool.js.map +0 -1
- package/lib/builtin/orchestration-tools.d.ts +0 -7
- package/lib/builtin/orchestration-tools.d.ts.map +0 -1
- package/lib/builtin/orchestration-tools.js +0 -259
- package/lib/builtin/orchestration-tools.js.map +0 -1
- package/lib/connection/authorization-flow.d.ts +0 -26
- package/lib/connection/authorization-flow.d.ts.map +0 -1
- package/lib/connection/authorization-flow.js +0 -76
- package/lib/connection/authorization-flow.js.map +0 -1
- package/lib/connection/index.d.ts +0 -3
- package/lib/connection/index.d.ts.map +0 -1
- package/lib/connection/index.js +0 -2
- package/lib/connection/index.js.map +0 -1
- package/lib/dynamic/dynamic-registry.d.ts +0 -34
- package/lib/dynamic/dynamic-registry.d.ts.map +0 -1
- package/lib/dynamic/dynamic-registry.js +0 -52
- package/lib/dynamic/dynamic-registry.js.map +0 -1
- package/lib/init/bootstrap-gate.d.ts +0 -6
- package/lib/init/bootstrap-gate.d.ts.map +0 -1
- package/lib/init/bootstrap-gate.js +0 -28
- package/lib/init/bootstrap-gate.js.map +0 -1
- package/lib/memory-entry-registry.d.ts +0 -13
- package/lib/memory-entry-registry.d.ts.map +0 -1
- package/lib/memory-entry-registry.js +0 -24
- package/lib/memory-entry-registry.js.map +0 -1
- package/lib/orchestration-memory-hook.d.ts +0 -3
- package/lib/orchestration-memory-hook.d.ts.map +0 -1
- package/lib/orchestration-memory-hook.js +0 -22
- package/lib/orchestration-memory-hook.js.map +0 -1
- package/lib/orchestration-runtime-registry.d.ts +0 -16
- package/lib/orchestration-runtime-registry.d.ts.map +0 -1
- package/lib/orchestration-runtime-registry.js +0 -20
- package/lib/orchestration-runtime-registry.js.map +0 -1
- package/lib/orchestrator/agent-dispatcher.d.ts +0 -171
- package/lib/orchestrator/agent-dispatcher.d.ts.map +0 -1
- package/lib/orchestrator/agent-dispatcher.js +0 -415
- package/lib/orchestrator/agent-dispatcher.js.map +0 -1
- package/lib/orchestrator/bootstrap-executors.d.ts +0 -7
- package/lib/orchestrator/bootstrap-executors.d.ts.map +0 -1
- package/lib/orchestrator/bootstrap-executors.js +0 -73
- package/lib/orchestrator/bootstrap-executors.js.map +0 -1
- package/lib/orchestrator/orchestration-mappers.d.ts +0 -9
- package/lib/orchestrator/orchestration-mappers.d.ts.map +0 -1
- package/lib/orchestrator/orchestration-mappers.js +0 -117
- package/lib/orchestrator/orchestration-mappers.js.map +0 -1
- package/lib/orchestrator/orchestration-repository.d.ts +0 -91
- package/lib/orchestrator/orchestration-repository.d.ts.map +0 -1
- package/lib/orchestrator/orchestration-repository.js +0 -389
- package/lib/orchestrator/orchestration-repository.js.map +0 -1
- package/lib/orchestrator/orchestration-service.d.ts +0 -133
- package/lib/orchestrator/orchestration-service.d.ts.map +0 -1
- package/lib/orchestrator/orchestration-service.js +0 -582
- package/lib/orchestrator/orchestration-service.js.map +0 -1
- package/lib/orchestrator/orchestration-source.d.ts +0 -5
- package/lib/orchestrator/orchestration-source.d.ts.map +0 -1
- package/lib/orchestrator/orchestration-source.js +0 -22
- package/lib/orchestrator/orchestration-source.js.map +0 -1
- package/lib/orchestrator/orchestration-types.d.ts +0 -88
- package/lib/orchestrator/orchestration-types.d.ts.map +0 -1
- package/lib/orchestrator/orchestration-types.js +0 -2
- package/lib/orchestrator/orchestration-types.js.map +0 -1
- package/lib/orchestrator/remote-agent-registry.d.ts +0 -37
- package/lib/orchestrator/remote-agent-registry.d.ts.map +0 -1
- package/lib/orchestrator/remote-agent-registry.js +0 -178
- package/lib/orchestrator/remote-agent-registry.js.map +0 -1
- package/lib/orchestrator/remote-task-executor.d.ts +0 -10
- package/lib/orchestrator/remote-task-executor.d.ts.map +0 -1
- package/lib/orchestrator/remote-task-executor.js +0 -231
- package/lib/orchestrator/remote-task-executor.js.map +0 -1
- package/lib/orchestrator/remote-task-poller.d.ts +0 -18
- package/lib/orchestrator/remote-task-poller.d.ts.map +0 -1
- package/lib/orchestrator/remote-task-poller.js +0 -84
- package/lib/orchestrator/remote-task-poller.js.map +0 -1
- package/lib/orchestrator/resolve-subagent-tools.d.ts.map +0 -1
- package/lib/orchestrator/resolve-subagent-tools.js.map +0 -1
- package/lib/orchestrator/task-queue.d.ts +0 -167
- package/lib/orchestrator/task-queue.d.ts.map +0 -1
- package/lib/orchestrator/task-queue.js +0 -416
- package/lib/orchestrator/task-queue.js.map +0 -1
- package/lib/session/passive-group-buffer.d.ts +0 -15
- package/lib/session/passive-group-buffer.d.ts.map +0 -1
- package/lib/session/passive-group-buffer.js +0 -50
- package/lib/session/passive-group-buffer.js.map +0 -1
- package/lib/session/passive-group-session.d.ts +0 -10
- package/lib/session/passive-group-session.d.ts.map +0 -1
- package/lib/session/passive-group-session.js +0 -32
- package/lib/session/passive-group-session.js.map +0 -1
- package/lib/session-tree-runtime-registry.d.ts +0 -22
- package/lib/session-tree-runtime-registry.d.ts.map +0 -1
- package/lib/session-tree-runtime-registry.js.map +0 -1
- package/lib/state/agent-state-store.d.ts +0 -18
- package/lib/state/agent-state-store.d.ts.map +0 -1
- package/lib/state/agent-state-store.js +0 -50
- package/lib/state/agent-state-store.js.map +0 -1
- /package/lib/{orchestrator → resource-hub}/hook-registry.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/hook-registry.js +0 -0
- /package/lib/{orchestrator → resource-hub}/mcp-lifecycle.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/mcp-lifecycle.js +0 -0
- /package/lib/{orchestrator → resource-hub}/mcp-registry.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/mcp-registry.js +0 -0
- /package/lib/{orchestrator → resource-hub}/resource-registry.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/resource-registry.js +0 -0
- /package/lib/{orchestrator → resource-hub}/role-configs.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/skill-registry.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/skill-registry.js +0 -0
- /package/lib/{orchestrator → resource-hub}/subagent-registry.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/subagent-registry.js +0 -0
- /package/lib/{orchestrator → resource-hub}/tool-registry.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/tool-registry.js +0 -0
- /package/lib/{orchestrator → resource-hub}/tool-selection.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/tool-selection.js +0 -0
- /package/lib/{orchestrator → resource-hub}/types.js +0 -0
|
@@ -0,0 +1,649 @@
|
|
|
1
|
+
import { canonicalWorkroomJson, compareCanonicalWorkroomText, deepFreezeWorkroomValue as deepFreeze, digestCanonicalWorkroomValue, } from './canonical-value.js';
|
|
2
|
+
export function parseWorkroomDispatchTaskDecision(value) {
|
|
3
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
4
|
+
throw new Error('Workroom Scheduler dispatch decision shape is invalid');
|
|
5
|
+
}
|
|
6
|
+
const input = value;
|
|
7
|
+
const actualKeys = Object.keys(input).sort();
|
|
8
|
+
const expectedKeys = [
|
|
9
|
+
'decisionId', 'digest', 'expectedSequence', 'policy', 'projectId', 'reason',
|
|
10
|
+
'role', 'runId', 'sponsorLane', 'taskKey', 'taskRevision', 'type', 'version',
|
|
11
|
+
].sort();
|
|
12
|
+
if (actualKeys.length !== expectedKeys.length
|
|
13
|
+
|| actualKeys.some((key, index) => key !== expectedKeys[index])) {
|
|
14
|
+
throw new Error('Workroom Scheduler dispatch decision keys are invalid');
|
|
15
|
+
}
|
|
16
|
+
if (input.version !== 1 || input.type !== 'dispatch_task') {
|
|
17
|
+
throw new Error('Workroom Scheduler dispatch decision version/type is invalid');
|
|
18
|
+
}
|
|
19
|
+
const body = deepFreeze({
|
|
20
|
+
version: 1,
|
|
21
|
+
type: 'dispatch_task',
|
|
22
|
+
projectId: text(input.projectId, 'Scheduler decision projectId'),
|
|
23
|
+
runId: text(input.runId, 'Scheduler decision runId'),
|
|
24
|
+
expectedSequence: nonNegativeInteger(input.expectedSequence, 'Scheduler decision expectedSequence'),
|
|
25
|
+
taskKey: text(input.taskKey, 'Scheduler decision taskKey'),
|
|
26
|
+
taskRevision: positiveInteger(input.taskRevision, 'Scheduler decision taskRevision'),
|
|
27
|
+
role: text(input.role, 'Scheduler decision role'),
|
|
28
|
+
sponsorLane: lane(input.sponsorLane),
|
|
29
|
+
reason: schedulerReason(input.reason),
|
|
30
|
+
policy: {
|
|
31
|
+
ref: text(input.policy?.ref, 'Scheduler decision policy ref'),
|
|
32
|
+
revision: positiveInteger(input.policy?.revision, 'Scheduler decision policy revision'),
|
|
33
|
+
digest: canonicalDigest(input.policy?.digest, 'Scheduler decision policy digest'),
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
const digest = digestCanonicalWorkroomValue(body);
|
|
37
|
+
const expectedId = `scheduler:${digest.slice('sha256:'.length)}`;
|
|
38
|
+
if (input.digest !== digest || input.decisionId !== expectedId) {
|
|
39
|
+
throw new Error('Workroom Scheduler dispatch decision digest/identity is invalid');
|
|
40
|
+
}
|
|
41
|
+
return deepFreeze({ ...body, digest, decisionId: expectedId });
|
|
42
|
+
}
|
|
43
|
+
export function parseWorkroomPreemptionPrepareDecision(value) {
|
|
44
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
45
|
+
throw new Error('Workroom preemption prepare decision shape is invalid');
|
|
46
|
+
}
|
|
47
|
+
const input = value;
|
|
48
|
+
const actualKeys = Object.keys(input).sort();
|
|
49
|
+
const expectedKeys = [
|
|
50
|
+
'allowedSuccessors', 'assignmentAttempt', 'assignmentEnvelopeDigest', 'assignmentFence',
|
|
51
|
+
'assignmentId', 'deadline', 'decisionId', 'digest', 'expectedSequence', 'owner', 'policy',
|
|
52
|
+
'projectId', 'reason', 'requestedAt', 'reservedTaskKey', 'reservedTaskRevision', 'runId',
|
|
53
|
+
'takeoverFence', 'type', 'version', 'victimTaskKey', 'victimTaskRevision',
|
|
54
|
+
].sort();
|
|
55
|
+
if (actualKeys.length !== expectedKeys.length
|
|
56
|
+
|| actualKeys.some((key, index) => key !== expectedKeys[index])) {
|
|
57
|
+
throw new Error('Workroom preemption prepare decision keys are invalid');
|
|
58
|
+
}
|
|
59
|
+
const body = deepFreeze({
|
|
60
|
+
version: 1,
|
|
61
|
+
type: 'prepare_preemption',
|
|
62
|
+
projectId: text(input.projectId, 'Preemption projectId'),
|
|
63
|
+
runId: text(input.runId, 'Preemption runId'),
|
|
64
|
+
expectedSequence: nonNegativeInteger(input.expectedSequence, 'Preemption expectedSequence'),
|
|
65
|
+
victimTaskKey: text(input.victimTaskKey, 'Preemption victimTaskKey'),
|
|
66
|
+
victimTaskRevision: positiveInteger(input.victimTaskRevision, 'Preemption victimTaskRevision'),
|
|
67
|
+
reservedTaskKey: text(input.reservedTaskKey, 'Preemption reservedTaskKey'),
|
|
68
|
+
reservedTaskRevision: positiveInteger(input.reservedTaskRevision, 'Preemption reservedTaskRevision'),
|
|
69
|
+
assignmentId: text(input.assignmentId, 'Preemption assignmentId'),
|
|
70
|
+
assignmentAttempt: positiveInteger(input.assignmentAttempt, 'Preemption assignmentAttempt'),
|
|
71
|
+
assignmentFence: positiveInteger(input.assignmentFence, 'Preemption assignmentFence'),
|
|
72
|
+
assignmentEnvelopeDigest: canonicalDigest(input.assignmentEnvelopeDigest, 'Preemption Envelope digest'),
|
|
73
|
+
owner: text(input.owner, 'Preemption owner'),
|
|
74
|
+
requestedAt: finiteTime(input.requestedAt, 'Preemption requestedAt'),
|
|
75
|
+
deadline: finiteTime(input.deadline, 'Preemption deadline'),
|
|
76
|
+
takeoverFence: positiveInteger(input.takeoverFence, 'Preemption takeoverFence'),
|
|
77
|
+
reason: preemptionReason(input.reason),
|
|
78
|
+
allowedSuccessors: ['replan', 'cancel_run'],
|
|
79
|
+
policy: {
|
|
80
|
+
ref: text(input.policy?.ref, 'Preemption policy ref'),
|
|
81
|
+
revision: positiveInteger(input.policy?.revision, 'Preemption policy revision'),
|
|
82
|
+
digest: canonicalDigest(input.policy?.digest, 'Preemption policy digest'),
|
|
83
|
+
},
|
|
84
|
+
});
|
|
85
|
+
if (body.deadline <= body.requestedAt || body.takeoverFence !== body.assignmentFence + 1
|
|
86
|
+
|| canonicalWorkroomJson(input.allowedSuccessors) !== canonicalWorkroomJson(body.allowedSuccessors)) {
|
|
87
|
+
throw new Error('Workroom preemption deadline/fence/successors are invalid');
|
|
88
|
+
}
|
|
89
|
+
const digest = digestCanonicalWorkroomValue(body);
|
|
90
|
+
const decisionId = `scheduler-preemption:${digest.slice('sha256:'.length)}`;
|
|
91
|
+
if (input.digest !== digest || input.decisionId !== decisionId) {
|
|
92
|
+
throw new Error('Workroom preemption prepare decision digest/identity is invalid');
|
|
93
|
+
}
|
|
94
|
+
return deepFreeze({ ...body, digest, decisionId });
|
|
95
|
+
}
|
|
96
|
+
const LANE_ORDER = Object.freeze({
|
|
97
|
+
urgent: 0,
|
|
98
|
+
high: 1,
|
|
99
|
+
normal: 2,
|
|
100
|
+
low: 3,
|
|
101
|
+
});
|
|
102
|
+
export function createWorkroomSchedulerPolicySnapshot(input) {
|
|
103
|
+
text(input.policyRef, 'Scheduler policyRef');
|
|
104
|
+
positiveInteger(input.revision, 'Scheduler policy revision');
|
|
105
|
+
nonNegativeInteger(input.pinnedAtSequence, 'Scheduler policy pinnedAtSequence');
|
|
106
|
+
positiveInteger(input.capacity, 'Scheduler capacity');
|
|
107
|
+
positiveInteger(input.agingStepMs, 'Scheduler agingStepMs');
|
|
108
|
+
positiveInteger(input.preemptionDeadlineMs, 'Scheduler preemptionDeadlineMs');
|
|
109
|
+
const starvationBoundMs = deepFreeze({
|
|
110
|
+
urgent: positiveInteger(input.starvationBoundMs?.urgent, 'Scheduler urgent starvation bound'),
|
|
111
|
+
high: positiveInteger(input.starvationBoundMs?.high, 'Scheduler high starvation bound'),
|
|
112
|
+
normal: positiveInteger(input.starvationBoundMs?.normal, 'Scheduler normal starvation bound'),
|
|
113
|
+
low: positiveInteger(input.starvationBoundMs?.low, 'Scheduler low starvation bound'),
|
|
114
|
+
});
|
|
115
|
+
const body = deepFreeze({
|
|
116
|
+
version: 1,
|
|
117
|
+
comparatorVersion: 1,
|
|
118
|
+
policyRef: input.policyRef,
|
|
119
|
+
revision: input.revision,
|
|
120
|
+
pinnedAtSequence: input.pinnedAtSequence,
|
|
121
|
+
capacity: input.capacity,
|
|
122
|
+
agingStepMs: input.agingStepMs,
|
|
123
|
+
starvationBoundMs,
|
|
124
|
+
preemptionDeadlineMs: input.preemptionDeadlineMs,
|
|
125
|
+
});
|
|
126
|
+
return deepFreeze({ ...body, digest: digestCanonicalWorkroomValue(body) });
|
|
127
|
+
}
|
|
128
|
+
export function assertWorkroomSchedulerPolicySnapshot(value, pinnedAtSequence) {
|
|
129
|
+
if (!value || value.version !== 1 || value.comparatorVersion !== 1) {
|
|
130
|
+
throw new Error('Workroom Scheduler Policy Snapshot shape is invalid');
|
|
131
|
+
}
|
|
132
|
+
const rebuilt = createWorkroomSchedulerPolicySnapshot(value);
|
|
133
|
+
if (rebuilt.digest !== value.digest) {
|
|
134
|
+
throw new Error('Workroom Scheduler Policy Snapshot digest does not match its canonical body');
|
|
135
|
+
}
|
|
136
|
+
if (pinnedAtSequence !== undefined && value.pinnedAtSequence !== pinnedAtSequence) {
|
|
137
|
+
throw new Error('Workroom Scheduler Policy Snapshot is pinned at another Journal sequence');
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
/** Pure `Journal facts + pinned policy -> one typed decision` boundary. */
|
|
141
|
+
export function decideWorkroomSchedule(events) {
|
|
142
|
+
const state = projectScheduler(events);
|
|
143
|
+
if (state.cancelRequested)
|
|
144
|
+
return null;
|
|
145
|
+
assertWaitRecoveryMetadata(state.tasks);
|
|
146
|
+
const used = state.activeAssignments.size + state.pendingDispatches.size;
|
|
147
|
+
const candidates = [...state.tasks.values()].filter(task => task.status === 'ready'
|
|
148
|
+
&& !state.pendingDispatches.has(task.key)
|
|
149
|
+
&& task.dependsOn.every(key => state.tasks.get(key)?.status === 'accepted'));
|
|
150
|
+
const selected = candidates.sort((left, right) => compareTasks(state, left, right))[0];
|
|
151
|
+
if (!selected)
|
|
152
|
+
return null;
|
|
153
|
+
if (used >= state.policy.capacity) {
|
|
154
|
+
if (state.pendingPreemptionDecisionId)
|
|
155
|
+
return null;
|
|
156
|
+
const incomingStarved = isStarved(state, selected);
|
|
157
|
+
const victims = [...state.activeAssignments.entries()].flatMap(([assignmentId, assignment]) => {
|
|
158
|
+
const task = state.tasks.get(assignment.taskKey);
|
|
159
|
+
if (!task || assignment.status !== 'running' || task.preemptibility !== 'checkpointable')
|
|
160
|
+
return [];
|
|
161
|
+
if (!incomingStarved && LANE_ORDER[selected.sponsorLane] >= LANE_ORDER[task.sponsorLane])
|
|
162
|
+
return [];
|
|
163
|
+
return [{ assignmentId, assignment, task }];
|
|
164
|
+
}).sort((left, right) => {
|
|
165
|
+
const laneOrder = LANE_ORDER[right.task.sponsorLane] - LANE_ORDER[left.task.sponsorLane];
|
|
166
|
+
if (laneOrder !== 0)
|
|
167
|
+
return laneOrder;
|
|
168
|
+
return compareCanonicalWorkroomText(left.task.key, right.task.key);
|
|
169
|
+
});
|
|
170
|
+
const victim = victims[0];
|
|
171
|
+
if (!victim)
|
|
172
|
+
return null;
|
|
173
|
+
const body = deepFreeze({
|
|
174
|
+
version: 1,
|
|
175
|
+
type: 'prepare_preemption',
|
|
176
|
+
projectId: state.projectId,
|
|
177
|
+
runId: state.runId,
|
|
178
|
+
expectedSequence: state.sequence,
|
|
179
|
+
victimTaskKey: victim.task.key,
|
|
180
|
+
victimTaskRevision: victim.task.revision,
|
|
181
|
+
reservedTaskKey: selected.key,
|
|
182
|
+
reservedTaskRevision: selected.revision,
|
|
183
|
+
assignmentId: victim.assignmentId,
|
|
184
|
+
assignmentAttempt: victim.assignment.attempt,
|
|
185
|
+
assignmentFence: victim.assignment.fence,
|
|
186
|
+
assignmentEnvelopeDigest: victim.assignment.envelopeDigest,
|
|
187
|
+
owner: victim.assignment.owner,
|
|
188
|
+
requestedAt: state.now,
|
|
189
|
+
deadline: state.now + state.policy.preemptionDeadlineMs,
|
|
190
|
+
takeoverFence: victim.assignment.fence + 1,
|
|
191
|
+
reason: incomingStarved ? 'starvation_bound' : 'higher_priority',
|
|
192
|
+
allowedSuccessors: ['replan', 'cancel_run'],
|
|
193
|
+
policy: {
|
|
194
|
+
ref: state.policy.policyRef,
|
|
195
|
+
revision: state.policy.revision,
|
|
196
|
+
digest: state.policy.digest,
|
|
197
|
+
},
|
|
198
|
+
});
|
|
199
|
+
const digest = digestCanonicalWorkroomValue(body);
|
|
200
|
+
return deepFreeze({
|
|
201
|
+
...body,
|
|
202
|
+
decisionId: `scheduler-preemption:${digest.slice('sha256:'.length)}`,
|
|
203
|
+
digest,
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
const reason = state.reservedTaskKey === selected.key
|
|
207
|
+
? 'preemption_reservation'
|
|
208
|
+
: isStarved(state, selected) ? 'starvation_bound' : 'scheduler_order';
|
|
209
|
+
const body = deepFreeze({
|
|
210
|
+
version: 1,
|
|
211
|
+
type: 'dispatch_task',
|
|
212
|
+
projectId: state.projectId,
|
|
213
|
+
runId: state.runId,
|
|
214
|
+
expectedSequence: state.sequence,
|
|
215
|
+
taskKey: selected.key,
|
|
216
|
+
taskRevision: selected.revision,
|
|
217
|
+
role: selected.role,
|
|
218
|
+
sponsorLane: selected.sponsorLane,
|
|
219
|
+
reason,
|
|
220
|
+
policy: {
|
|
221
|
+
ref: state.policy.policyRef,
|
|
222
|
+
revision: state.policy.revision,
|
|
223
|
+
digest: state.policy.digest,
|
|
224
|
+
},
|
|
225
|
+
});
|
|
226
|
+
const digest = digestCanonicalWorkroomValue(body);
|
|
227
|
+
return deepFreeze({
|
|
228
|
+
...body,
|
|
229
|
+
decisionId: `scheduler:${digest.slice('sha256:'.length)}`,
|
|
230
|
+
digest,
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Creates a typed proposal only. The Sponsor/Orchestrator principal and
|
|
235
|
+
* authorityRef must be injected by a trusted role-scoped command port before
|
|
236
|
+
* a Kernel CAS adapter may persist it.
|
|
237
|
+
*/
|
|
238
|
+
export function proposeWorkroomPriorityChange(input) {
|
|
239
|
+
for (const [value, label] of [
|
|
240
|
+
[input.projectId, 'projectId'], [input.runId, 'runId'], [input.taskKey, 'taskKey'],
|
|
241
|
+
[input.principalId, 'principalId'], [input.authorityRef, 'authorityRef'],
|
|
242
|
+
])
|
|
243
|
+
text(value, `Priority change ${label}`);
|
|
244
|
+
positiveInteger(input.taskRevision, 'Priority change taskRevision');
|
|
245
|
+
nonNegativeInteger(input.expectedSequence, 'Priority change expectedSequence');
|
|
246
|
+
nonNegativeInteger(input.localRank, 'Priority change localRank');
|
|
247
|
+
finiteTime(input.deadline, 'Priority change deadline');
|
|
248
|
+
lane(input.currentLane);
|
|
249
|
+
lane(input.requestedLane);
|
|
250
|
+
if (input.authority === 'orchestrator' && input.requestedLane !== input.currentLane) {
|
|
251
|
+
throw new Error('Orchestrator cannot move a Task across Sponsor lanes');
|
|
252
|
+
}
|
|
253
|
+
const body = deepFreeze({
|
|
254
|
+
version: 1,
|
|
255
|
+
type: 'priority_change',
|
|
256
|
+
...structuredClone(input),
|
|
257
|
+
owner: input.principalId,
|
|
258
|
+
allowedSuccessors: ['restore', 'rebase', 'cancel_run'],
|
|
259
|
+
});
|
|
260
|
+
const digest = digestCanonicalWorkroomValue(body);
|
|
261
|
+
return deepFreeze({
|
|
262
|
+
...body,
|
|
263
|
+
proposalId: `scheduler-priority:${digest.slice('sha256:'.length)}`,
|
|
264
|
+
digest,
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
export function parseWorkroomPriorityChangeProposal(value) {
|
|
268
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
269
|
+
throw new Error('Workroom priority change proposal shape is invalid');
|
|
270
|
+
}
|
|
271
|
+
const input = value;
|
|
272
|
+
const rebuilt = proposeWorkroomPriorityChange({
|
|
273
|
+
projectId: input.projectId,
|
|
274
|
+
runId: input.runId,
|
|
275
|
+
taskKey: input.taskKey,
|
|
276
|
+
taskRevision: input.taskRevision,
|
|
277
|
+
expectedSequence: input.expectedSequence,
|
|
278
|
+
currentLane: input.currentLane,
|
|
279
|
+
requestedLane: input.requestedLane,
|
|
280
|
+
localRank: input.localRank,
|
|
281
|
+
principalId: input.principalId,
|
|
282
|
+
authority: input.authority,
|
|
283
|
+
authorityRef: input.authorityRef,
|
|
284
|
+
deadline: input.deadline,
|
|
285
|
+
});
|
|
286
|
+
if (canonicalWorkroomJson(rebuilt) !== canonicalWorkroomJson(input)) {
|
|
287
|
+
throw new Error('Workroom priority change proposal is not canonical');
|
|
288
|
+
}
|
|
289
|
+
return rebuilt;
|
|
290
|
+
}
|
|
291
|
+
export function getWorkroomScheduledTaskSnapshot(events, taskKey) {
|
|
292
|
+
const task = projectScheduler(events).tasks.get(text(taskKey, 'Scheduled Task key'));
|
|
293
|
+
if (!task)
|
|
294
|
+
throw new Error(`Scheduled Task ${taskKey} not found`);
|
|
295
|
+
return deepFreeze({
|
|
296
|
+
taskRevision: task.revision,
|
|
297
|
+
sponsorLane: task.sponsorLane,
|
|
298
|
+
localRank: task.localRank,
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
export function getWorkroomScheduledTaskCapacitySnapshot(events, taskKey) {
|
|
302
|
+
const task = projectScheduler(events).tasks.get(text(taskKey, 'Scheduled Task key'));
|
|
303
|
+
if (!task)
|
|
304
|
+
throw new Error(`Scheduled Task ${taskKey} not found`);
|
|
305
|
+
return deepFreeze({
|
|
306
|
+
taskKey: task.key,
|
|
307
|
+
taskRevision: task.revision,
|
|
308
|
+
role: task.role,
|
|
309
|
+
preemptibility: task.preemptibility,
|
|
310
|
+
status: task.status,
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
function projectScheduler(events) {
|
|
314
|
+
const created = events[0];
|
|
315
|
+
if (!created || created.sequence !== 0 || created.type !== 'run.created') {
|
|
316
|
+
throw new Error('Workroom Scheduler requires a Run Journal beginning at sequence 0');
|
|
317
|
+
}
|
|
318
|
+
const tasks = new Map();
|
|
319
|
+
const activeAssignments = new Map();
|
|
320
|
+
const pendingDispatches = new Set();
|
|
321
|
+
let policy;
|
|
322
|
+
let now = created.occurredAt;
|
|
323
|
+
let cancelRequested = false;
|
|
324
|
+
let reservedTaskKey;
|
|
325
|
+
let pendingPreemptionDecisionId;
|
|
326
|
+
for (const [index, event] of events.entries()) {
|
|
327
|
+
if (event.runId !== created.runId || event.sequence !== index) {
|
|
328
|
+
throw new Error('Workroom Scheduler Journal scope/sequence is not contiguous');
|
|
329
|
+
}
|
|
330
|
+
now = event.type === 'clock.advanced'
|
|
331
|
+
? finiteTime(event.payload.now, 'Scheduler clock')
|
|
332
|
+
: Math.max(now, finiteTime(event.occurredAt, 'Scheduler event time'));
|
|
333
|
+
switch (event.type) {
|
|
334
|
+
case 'plan.admitted': {
|
|
335
|
+
if (policy)
|
|
336
|
+
throw new Error('Workroom Scheduler Policy Snapshot is duplicated');
|
|
337
|
+
const plan = event.payload.plan && typeof event.payload.plan === 'object'
|
|
338
|
+
? event.payload.plan
|
|
339
|
+
: undefined;
|
|
340
|
+
const candidate = (event.payload.schedulerPolicy ?? plan?.schedulerPolicy);
|
|
341
|
+
if (!candidate)
|
|
342
|
+
throw new Error('Workroom Scheduler Policy Snapshot is not pinned');
|
|
343
|
+
assertWorkroomSchedulerPolicySnapshot(candidate, event.sequence);
|
|
344
|
+
policy = candidate;
|
|
345
|
+
break;
|
|
346
|
+
}
|
|
347
|
+
case 'run.cancel_requested':
|
|
348
|
+
case 'run.cancelled':
|
|
349
|
+
cancelRequested = true;
|
|
350
|
+
break;
|
|
351
|
+
case 'task.planned': {
|
|
352
|
+
const key = text(event.payload.taskKey, 'Scheduled Task key');
|
|
353
|
+
if (tasks.has(key))
|
|
354
|
+
throw new Error(`Scheduled Task ${key} is duplicated`);
|
|
355
|
+
tasks.set(key, Object.freeze({
|
|
356
|
+
key,
|
|
357
|
+
revision: 1,
|
|
358
|
+
role: text(event.payload.role, `Scheduled Task ${key} role`),
|
|
359
|
+
sponsorLane: lane(event.payload.sponsorLane),
|
|
360
|
+
localRank: nonNegativeInteger(event.payload.localRank, `Scheduled Task ${key} localRank`),
|
|
361
|
+
...(event.payload.deadline === undefined
|
|
362
|
+
? {}
|
|
363
|
+
: { deadline: finiteTime(event.payload.deadline, `Scheduled Task ${key} deadline`) }),
|
|
364
|
+
enqueuedAt: finiteTime(event.payload.enqueuedAt, `Scheduled Task ${key} enqueuedAt`),
|
|
365
|
+
enqueueSequence: event.sequence,
|
|
366
|
+
dependsOn: stringList(event.payload.dependsOn, `Scheduled Task ${key} dependsOn`),
|
|
367
|
+
preemptibility: preemptibility(event.payload.preemptibility),
|
|
368
|
+
status: 'ready',
|
|
369
|
+
blockers: new Map(),
|
|
370
|
+
}));
|
|
371
|
+
break;
|
|
372
|
+
}
|
|
373
|
+
case 'task.blocked': {
|
|
374
|
+
const task = requireTask(tasks, event.payload.taskKey);
|
|
375
|
+
const blockers = new Map(task.blockers);
|
|
376
|
+
blockers.set(text(event.payload.blockerId, 'Task Blocker id'), Object.freeze({
|
|
377
|
+
owner: typeof event.payload.owner === 'string' ? event.payload.owner : '',
|
|
378
|
+
deadline: typeof event.payload.deadline === 'number' ? event.payload.deadline : Number.NaN,
|
|
379
|
+
allowedSuccessors: Array.isArray(event.payload.allowedActions)
|
|
380
|
+
? event.payload.allowedActions.map(String)
|
|
381
|
+
: ['resolve', 'replan', 'cancel'],
|
|
382
|
+
}));
|
|
383
|
+
tasks.set(task.key, Object.freeze({ ...task, status: 'blocked', blockers }));
|
|
384
|
+
break;
|
|
385
|
+
}
|
|
386
|
+
case 'task.blocker_resolved': {
|
|
387
|
+
const task = requireTask(tasks, event.payload.taskKey);
|
|
388
|
+
const blockers = new Map(task.blockers);
|
|
389
|
+
blockers.delete(String(event.payload.blockerId));
|
|
390
|
+
tasks.set(task.key, Object.freeze({
|
|
391
|
+
...task,
|
|
392
|
+
status: blockers.size === 0 ? 'ready' : 'blocked',
|
|
393
|
+
enqueuedAt: blockers.size === 0 ? event.occurredAt : task.enqueuedAt,
|
|
394
|
+
enqueueSequence: blockers.size === 0 ? event.sequence : task.enqueueSequence,
|
|
395
|
+
blockers,
|
|
396
|
+
}));
|
|
397
|
+
break;
|
|
398
|
+
}
|
|
399
|
+
case 'assignment.claimed': {
|
|
400
|
+
const assignmentId = text(event.payload.assignmentId, 'Assignment id');
|
|
401
|
+
const task = requireTask(tasks, event.payload.taskKey);
|
|
402
|
+
activeAssignments.set(assignmentId, {
|
|
403
|
+
taskKey: task.key,
|
|
404
|
+
status: 'leased',
|
|
405
|
+
attempt: positiveInteger(event.payload.attempt, 'Assignment attempt'),
|
|
406
|
+
fence: positiveInteger(event.payload.fence, 'Assignment fence'),
|
|
407
|
+
envelopeDigest: canonicalDigest(event.payload.envelopeDigest, 'Assignment Envelope digest'),
|
|
408
|
+
owner: text(event.payload.owner, 'Assignment owner'),
|
|
409
|
+
});
|
|
410
|
+
pendingDispatches.delete(task.key);
|
|
411
|
+
tasks.set(task.key, Object.freeze({ ...task, status: 'executing' }));
|
|
412
|
+
break;
|
|
413
|
+
}
|
|
414
|
+
case 'assignment.started': {
|
|
415
|
+
const assignment = activeAssignments.get(String(event.payload.assignmentId));
|
|
416
|
+
if (assignment)
|
|
417
|
+
activeAssignments.set(String(event.payload.assignmentId), { ...assignment, status: 'running' });
|
|
418
|
+
break;
|
|
419
|
+
}
|
|
420
|
+
case 'assignment.execution_completed': {
|
|
421
|
+
const assignment = activeAssignments.get(String(event.payload.assignmentId));
|
|
422
|
+
if (assignment) {
|
|
423
|
+
activeAssignments.delete(String(event.payload.assignmentId));
|
|
424
|
+
const task = requireTask(tasks, assignment.taskKey);
|
|
425
|
+
tasks.set(task.key, Object.freeze({ ...task, status: 'awaiting_acceptance' }));
|
|
426
|
+
}
|
|
427
|
+
break;
|
|
428
|
+
}
|
|
429
|
+
case 'assignment.cancelled':
|
|
430
|
+
case 'assignment.preempted':
|
|
431
|
+
case 'assignment.lease_expired': {
|
|
432
|
+
const assignment = activeAssignments.get(String(event.payload.assignmentId));
|
|
433
|
+
if (assignment) {
|
|
434
|
+
activeAssignments.delete(String(event.payload.assignmentId));
|
|
435
|
+
const task = requireTask(tasks, assignment.taskKey);
|
|
436
|
+
tasks.set(task.key, Object.freeze({
|
|
437
|
+
...task, status: 'ready', enqueuedAt: event.occurredAt, enqueueSequence: event.sequence,
|
|
438
|
+
}));
|
|
439
|
+
}
|
|
440
|
+
break;
|
|
441
|
+
}
|
|
442
|
+
case 'task.accepted':
|
|
443
|
+
setTaskStatus(tasks, event.payload.taskKey, 'accepted');
|
|
444
|
+
break;
|
|
445
|
+
case 'task.failed':
|
|
446
|
+
setTaskStatus(tasks, event.payload.taskKey, 'failed');
|
|
447
|
+
break;
|
|
448
|
+
case 'task.cancelled':
|
|
449
|
+
setTaskStatus(tasks, event.payload.taskKey, 'cancelled');
|
|
450
|
+
break;
|
|
451
|
+
case 'task.rework_requested':
|
|
452
|
+
case 'task.revised': {
|
|
453
|
+
const task = requireTask(tasks, event.payload.taskKey);
|
|
454
|
+
tasks.set(task.key, Object.freeze({
|
|
455
|
+
...task,
|
|
456
|
+
revision: task.revision + 1,
|
|
457
|
+
status: 'ready',
|
|
458
|
+
enqueuedAt: event.occurredAt,
|
|
459
|
+
enqueueSequence: event.sequence,
|
|
460
|
+
}));
|
|
461
|
+
break;
|
|
462
|
+
}
|
|
463
|
+
case 'task.plan_revised': {
|
|
464
|
+
const task = requireTask(tasks, event.payload.taskKey);
|
|
465
|
+
if (Number(event.payload.expectedTaskRevision) !== task.revision
|
|
466
|
+
|| Number(event.payload.newTaskRevision) !== task.revision + 1) {
|
|
467
|
+
throw new Error('Persisted Plan Revision targets another Task revision');
|
|
468
|
+
}
|
|
469
|
+
tasks.set(task.key, Object.freeze({
|
|
470
|
+
...task,
|
|
471
|
+
revision: task.revision + 1,
|
|
472
|
+
role: text(event.payload.role, `Scheduled Task ${task.key} role`),
|
|
473
|
+
sponsorLane: lane(event.payload.sponsorLane),
|
|
474
|
+
localRank: nonNegativeInteger(event.payload.localRank, `Scheduled Task ${task.key} localRank`),
|
|
475
|
+
deadline: finiteTime(event.payload.deadline, `Scheduled Task ${task.key} deadline`),
|
|
476
|
+
enqueuedAt: finiteTime(event.payload.enqueuedAt, `Scheduled Task ${task.key} enqueuedAt`),
|
|
477
|
+
enqueueSequence: event.sequence,
|
|
478
|
+
dependsOn: stringList(event.payload.dependsOn, `Scheduled Task ${task.key} dependsOn`),
|
|
479
|
+
preemptibility: preemptibility(event.payload.preemptibility),
|
|
480
|
+
status: 'ready',
|
|
481
|
+
blockers: new Map(),
|
|
482
|
+
}));
|
|
483
|
+
break;
|
|
484
|
+
}
|
|
485
|
+
case 'scheduler.priority_changed': {
|
|
486
|
+
const task = requireTask(tasks, event.payload.taskKey);
|
|
487
|
+
if (Number(event.payload.taskRevision) !== task.revision) {
|
|
488
|
+
throw new Error('Persisted Workroom priority change targets another Task revision');
|
|
489
|
+
}
|
|
490
|
+
tasks.set(task.key, Object.freeze({
|
|
491
|
+
...task,
|
|
492
|
+
sponsorLane: lane(event.payload.requestedLane),
|
|
493
|
+
localRank: nonNegativeInteger(event.payload.localRank, 'Persisted priority localRank'),
|
|
494
|
+
}));
|
|
495
|
+
break;
|
|
496
|
+
}
|
|
497
|
+
case 'scheduler.dispatch_requested':
|
|
498
|
+
pendingDispatches.add(text(event.payload.taskKey, 'Scheduler dispatch Task key'));
|
|
499
|
+
break;
|
|
500
|
+
case 'scheduler.preemption_requested':
|
|
501
|
+
reservedTaskKey = text(event.payload.reservedTaskKey, 'Scheduler reserved Task key');
|
|
502
|
+
pendingPreemptionDecisionId = text(event.payload.decisionId, 'Scheduler preemption decision id');
|
|
503
|
+
break;
|
|
504
|
+
case 'scheduler.preemption_checkpoint_acknowledged':
|
|
505
|
+
if (event.payload.decisionId === pendingPreemptionDecisionId) {
|
|
506
|
+
pendingPreemptionDecisionId = undefined;
|
|
507
|
+
}
|
|
508
|
+
break;
|
|
509
|
+
case 'scheduler.preemption_timed_out':
|
|
510
|
+
if (event.payload.decisionId === pendingPreemptionDecisionId) {
|
|
511
|
+
pendingPreemptionDecisionId = undefined;
|
|
512
|
+
reservedTaskKey = undefined;
|
|
513
|
+
}
|
|
514
|
+
break;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
if (!policy)
|
|
518
|
+
throw new Error('Workroom Scheduler Policy Snapshot is not pinned');
|
|
519
|
+
return Object.freeze({
|
|
520
|
+
runId: created.runId,
|
|
521
|
+
projectId: text(created.payload.projectId, 'Workroom Project id'),
|
|
522
|
+
sequence: events.at(-1).sequence,
|
|
523
|
+
now,
|
|
524
|
+
cancelRequested,
|
|
525
|
+
policy,
|
|
526
|
+
tasks,
|
|
527
|
+
activeAssignments,
|
|
528
|
+
pendingDispatches,
|
|
529
|
+
...(reservedTaskKey === undefined ? {} : { reservedTaskKey }),
|
|
530
|
+
...(pendingPreemptionDecisionId === undefined ? {} : { pendingPreemptionDecisionId }),
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
function compareTasks(state, left, right) {
|
|
534
|
+
const leftReserved = left.key === state.reservedTaskKey;
|
|
535
|
+
const rightReserved = right.key === state.reservedTaskKey;
|
|
536
|
+
if (leftReserved !== rightReserved)
|
|
537
|
+
return leftReserved ? -1 : 1;
|
|
538
|
+
const leftStarved = isStarved(state, left);
|
|
539
|
+
const rightStarved = isStarved(state, right);
|
|
540
|
+
if (leftStarved !== rightStarved)
|
|
541
|
+
return leftStarved ? -1 : 1;
|
|
542
|
+
if (leftStarved && rightStarved) {
|
|
543
|
+
const leftAt = left.enqueuedAt + state.policy.starvationBoundMs[left.sponsorLane];
|
|
544
|
+
const rightAt = right.enqueuedAt + state.policy.starvationBoundMs[right.sponsorLane];
|
|
545
|
+
if (leftAt !== rightAt)
|
|
546
|
+
return leftAt - rightAt;
|
|
547
|
+
}
|
|
548
|
+
const laneOrder = LANE_ORDER[left.sponsorLane] - LANE_ORDER[right.sponsorLane];
|
|
549
|
+
if (laneOrder !== 0)
|
|
550
|
+
return laneOrder;
|
|
551
|
+
const leftDeadline = left.deadline ?? Number.POSITIVE_INFINITY;
|
|
552
|
+
const rightDeadline = right.deadline ?? Number.POSITIVE_INFINITY;
|
|
553
|
+
if (leftDeadline !== rightDeadline)
|
|
554
|
+
return leftDeadline - rightDeadline;
|
|
555
|
+
const rank = effectiveRank(state, right) - effectiveRank(state, left);
|
|
556
|
+
if (rank !== 0)
|
|
557
|
+
return rank;
|
|
558
|
+
if (left.enqueueSequence !== right.enqueueSequence) {
|
|
559
|
+
return left.enqueueSequence - right.enqueueSequence;
|
|
560
|
+
}
|
|
561
|
+
return compareCanonicalWorkroomText(left.key, right.key);
|
|
562
|
+
}
|
|
563
|
+
function effectiveRank(state, task) {
|
|
564
|
+
return task.localRank + Math.floor(Math.max(0, state.now - task.enqueuedAt) / state.policy.agingStepMs);
|
|
565
|
+
}
|
|
566
|
+
function isStarved(state, task) {
|
|
567
|
+
return state.now - task.enqueuedAt >= state.policy.starvationBoundMs[task.sponsorLane];
|
|
568
|
+
}
|
|
569
|
+
function assertWaitRecoveryMetadata(tasks) {
|
|
570
|
+
for (const task of tasks.values()) {
|
|
571
|
+
for (const blocker of task.blockers.values()) {
|
|
572
|
+
if (!blocker.owner.trim() || !Number.isFinite(blocker.deadline) || blocker.deadline < 0
|
|
573
|
+
|| blocker.allowedSuccessors.length === 0
|
|
574
|
+
|| !blocker.allowedSuccessors.includes('cancel')) {
|
|
575
|
+
throw new Error('Workroom wait requires owner, deadline and allowed successors including cancel');
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
function setTaskStatus(tasks, key, status) {
|
|
581
|
+
const task = requireTask(tasks, key);
|
|
582
|
+
tasks.set(task.key, Object.freeze({ ...task, status }));
|
|
583
|
+
}
|
|
584
|
+
function requireTask(tasks, key) {
|
|
585
|
+
const id = text(key, 'Scheduled Task key');
|
|
586
|
+
const task = tasks.get(id);
|
|
587
|
+
if (!task)
|
|
588
|
+
throw new Error(`Scheduled Task ${id} is absent from the admitted Plan`);
|
|
589
|
+
return task;
|
|
590
|
+
}
|
|
591
|
+
function lane(value) {
|
|
592
|
+
if (!['urgent', 'high', 'normal', 'low'].includes(String(value))) {
|
|
593
|
+
throw new Error('Workroom Sponsor lane is invalid');
|
|
594
|
+
}
|
|
595
|
+
return value;
|
|
596
|
+
}
|
|
597
|
+
function preemptibility(value) {
|
|
598
|
+
if (value !== 'checkpointable' && value !== 'atomic') {
|
|
599
|
+
throw new Error('Workroom Task preemptibility is invalid');
|
|
600
|
+
}
|
|
601
|
+
return value;
|
|
602
|
+
}
|
|
603
|
+
function schedulerReason(value) {
|
|
604
|
+
if (!['scheduler_order', 'starvation_bound', 'preemption_reservation'].includes(String(value))) {
|
|
605
|
+
throw new Error('Workroom Scheduler dispatch reason is invalid');
|
|
606
|
+
}
|
|
607
|
+
return value;
|
|
608
|
+
}
|
|
609
|
+
function preemptionReason(value) {
|
|
610
|
+
if (value !== 'higher_priority' && value !== 'starvation_bound') {
|
|
611
|
+
throw new Error('Workroom preemption reason is invalid');
|
|
612
|
+
}
|
|
613
|
+
return value;
|
|
614
|
+
}
|
|
615
|
+
function canonicalDigest(value, label) {
|
|
616
|
+
if (typeof value !== 'string' || !/^sha256:[a-f0-9]{64}$/u.test(value)) {
|
|
617
|
+
throw new Error(`${label} must be a canonical SHA-256 digest`);
|
|
618
|
+
}
|
|
619
|
+
return value;
|
|
620
|
+
}
|
|
621
|
+
function text(value, label) {
|
|
622
|
+
if (typeof value !== 'string' || !value.trim() || value !== value.trim()) {
|
|
623
|
+
throw new Error(`${label} is required`);
|
|
624
|
+
}
|
|
625
|
+
return value;
|
|
626
|
+
}
|
|
627
|
+
function stringList(value, label) {
|
|
628
|
+
if (!Array.isArray(value) || value.some(item => typeof item !== 'string' || !item.trim())) {
|
|
629
|
+
throw new Error(`${label} must be a string list`);
|
|
630
|
+
}
|
|
631
|
+
return Object.freeze([...new Set(value)].sort());
|
|
632
|
+
}
|
|
633
|
+
function positiveInteger(value, label) {
|
|
634
|
+
if (!Number.isSafeInteger(value) || Number(value) < 1)
|
|
635
|
+
throw new Error(`${label} must be a positive safe integer`);
|
|
636
|
+
return Number(value);
|
|
637
|
+
}
|
|
638
|
+
function nonNegativeInteger(value, label) {
|
|
639
|
+
if (!Number.isSafeInteger(value) || Number(value) < 0)
|
|
640
|
+
throw new Error(`${label} must be a non-negative safe integer`);
|
|
641
|
+
return Number(value);
|
|
642
|
+
}
|
|
643
|
+
function finiteTime(value, label) {
|
|
644
|
+
if (typeof value !== 'number' || !Number.isFinite(value) || value < 0) {
|
|
645
|
+
throw new Error(`${label} must be a non-negative finite timestamp`);
|
|
646
|
+
}
|
|
647
|
+
return value;
|
|
648
|
+
}
|
|
649
|
+
//# sourceMappingURL=workroom-scheduler.js.map
|