@zhin.js/agent 1.1.30 → 1.1.32
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 +5 -20
- package/lib/config/deprecated-agent-binding-keys.d.ts +21 -0
- package/lib/config/deprecated-agent-binding-keys.d.ts.map +1 -0
- package/lib/config/deprecated-agent-binding-keys.js +37 -0
- package/lib/config/deprecated-agent-binding-keys.js.map +1 -0
- package/lib/config/deprecated-agent-keys.d.ts +16 -0
- package/lib/config/deprecated-agent-keys.d.ts.map +1 -0
- package/lib/config/deprecated-agent-keys.js +23 -0
- package/lib/config/deprecated-agent-keys.js.map +1 -0
- package/lib/config/fix-ai-config.d.ts.map +1 -1
- package/lib/config/fix-ai-config.js +16 -20
- package/lib/config/fix-ai-config.js.map +1 -1
- package/lib/config/index.d.ts +4 -1
- package/lib/config/index.d.ts.map +1 -1
- package/lib/config/index.js +3 -1
- package/lib/config/index.js.map +1 -1
- package/lib/config/model-harness-runtime.d.ts.map +1 -1
- package/lib/config/model-harness-runtime.js +47 -5
- package/lib/config/model-harness-runtime.js.map +1 -1
- package/lib/config/model-harness.d.ts +30 -0
- package/lib/config/model-harness.d.ts.map +1 -1
- package/lib/config/normalize-ai-config.d.ts.map +1 -1
- package/lib/config/normalize-ai-config.js +10 -2
- package/lib/config/normalize-ai-config.js.map +1 -1
- package/lib/config/perception-config.d.ts +36 -0
- package/lib/config/perception-config.d.ts.map +1 -0
- package/lib/config/perception-config.js +55 -0
- package/lib/config/perception-config.js.map +1 -0
- package/lib/config/types.d.ts +13 -1
- package/lib/config/types.d.ts.map +1 -1
- package/lib/config/types.js.map +1 -1
- package/lib/config/validate-ai-config.d.ts.map +1 -1
- package/lib/config/validate-ai-config.js +0 -19
- package/lib/config/validate-ai-config.js.map +1 -1
- package/lib/config/zhin-agent-config.d.ts +36 -1
- package/lib/config/zhin-agent-config.d.ts.map +1 -1
- package/lib/config/zhin-agent-defaults.d.ts.map +1 -1
- package/lib/config/zhin-agent-defaults.js +7 -4
- package/lib/config/zhin-agent-defaults.js.map +1 -1
- package/lib/config/zhin-agent-dependencies.d.ts +5 -0
- package/lib/config/zhin-agent-dependencies.d.ts.map +1 -1
- package/lib/context/context-system.d.ts +4 -0
- package/lib/context/context-system.d.ts.map +1 -1
- package/lib/context/context-system.js +2 -0
- package/lib/context/context-system.js.map +1 -1
- package/lib/context/model-resolver.d.ts +1 -0
- package/lib/context/model-resolver.d.ts.map +1 -1
- package/lib/context/model-resolver.js +4 -1
- package/lib/context/model-resolver.js.map +1 -1
- package/lib/context/turn-envelope.d.ts +4 -0
- 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/core/agent-core-run.d.ts +22 -1
- package/lib/core/agent-core-run.d.ts.map +1 -1
- package/lib/core/agent-core-run.js +363 -51
- package/lib/core/agent-core-run.js.map +1 -1
- package/lib/core/agent-core.d.ts +5 -0
- package/lib/core/agent-core.d.ts.map +1 -1
- package/lib/core/agent-core.js +5 -0
- package/lib/core/agent-core.js.map +1 -1
- package/lib/core/agent-loop-standalone.d.ts +6 -0
- package/lib/core/agent-loop-standalone.d.ts.map +1 -1
- package/lib/core/agent-loop-standalone.js +7 -2
- package/lib/core/agent-loop-standalone.js.map +1 -1
- package/lib/core/agent-loop-turn.d.ts +5 -0
- package/lib/core/agent-loop-turn.d.ts.map +1 -1
- package/lib/core/agent-loop-turn.js +5 -0
- package/lib/core/agent-loop-turn.js.map +1 -1
- package/lib/core/contracts.d.ts +1 -1
- package/lib/core/contracts.js +1 -1
- package/lib/core/exhausted-turn-reply.d.ts +33 -0
- package/lib/core/exhausted-turn-reply.d.ts.map +1 -0
- package/lib/core/exhausted-turn-reply.js +54 -0
- package/lib/core/exhausted-turn-reply.js.map +1 -0
- package/lib/core/exploration-budget.d.ts +17 -0
- package/lib/core/exploration-budget.d.ts.map +1 -0
- package/lib/core/exploration-budget.js +41 -0
- package/lib/core/exploration-budget.js.map +1 -0
- package/lib/core/index.d.ts +3 -0
- package/lib/core/index.d.ts.map +1 -1
- package/lib/core/index.js +2 -0
- package/lib/core/index.js.map +1 -1
- package/lib/core/missing-tool-resolver.d.ts +17 -0
- package/lib/core/missing-tool-resolver.d.ts.map +1 -0
- package/lib/core/missing-tool-resolver.js +21 -0
- package/lib/core/missing-tool-resolver.js.map +1 -0
- package/lib/core/progress-reporter.d.ts +46 -0
- package/lib/core/progress-reporter.d.ts.map +1 -0
- package/lib/core/progress-reporter.js +100 -0
- package/lib/core/progress-reporter.js.map +1 -0
- package/lib/core/tool-calls-user-format.d.ts +5 -0
- package/lib/core/tool-calls-user-format.d.ts.map +1 -1
- package/lib/core/tool-calls-user-format.js +23 -3
- package/lib/core/tool-calls-user-format.js.map +1 -1
- package/lib/core/turn-event-mapper.d.ts.map +1 -1
- package/lib/core/turn-event-mapper.js +2 -0
- package/lib/core/turn-event-mapper.js.map +1 -1
- package/lib/core/turn-progress.d.ts +75 -0
- package/lib/core/turn-progress.d.ts.map +1 -0
- package/lib/core/turn-progress.js +152 -0
- package/lib/core/turn-progress.js.map +1 -0
- package/lib/deferred-worker-runner.d.ts +6 -0
- package/lib/deferred-worker-runner.d.ts.map +1 -1
- package/lib/deferred-worker-runner.js +4 -0
- package/lib/deferred-worker-runner.js.map +1 -1
- package/lib/detached-task/index.d.ts +6 -0
- package/lib/detached-task/index.d.ts.map +1 -0
- package/lib/detached-task/index.js +6 -0
- package/lib/detached-task/index.js.map +1 -0
- package/lib/detached-task/interjection.d.ts +28 -0
- package/lib/detached-task/interjection.d.ts.map +1 -0
- package/lib/detached-task/interjection.js +128 -0
- package/lib/detached-task/interjection.js.map +1 -0
- package/lib/detached-task/runner.d.ts +89 -0
- package/lib/detached-task/runner.d.ts.map +1 -0
- package/lib/detached-task/runner.js +334 -0
- package/lib/detached-task/runner.js.map +1 -0
- package/lib/detached-task/store.d.ts +21 -0
- package/lib/detached-task/store.d.ts.map +1 -0
- package/lib/detached-task/store.js +63 -0
- package/lib/detached-task/store.js.map +1 -0
- package/lib/detached-task/token.d.ts +8 -0
- package/lib/detached-task/token.d.ts.map +1 -0
- package/lib/detached-task/token.js +8 -0
- package/lib/detached-task/token.js.map +1 -0
- package/lib/detached-task/types.d.ts +104 -0
- package/lib/detached-task/types.d.ts.map +1 -0
- package/lib/detached-task/types.js +43 -0
- package/lib/detached-task/types.js.map +1 -0
- package/lib/event/turn-event.d.ts +11 -0
- package/lib/event/turn-event.d.ts.map +1 -1
- package/lib/event/turn-event.js.map +1 -1
- package/lib/index.d.ts +5 -87
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -85
- package/lib/index.js.map +1 -1
- package/lib/init/activate-ai-database-storage.d.ts +1 -3
- package/lib/init/activate-ai-database-storage.d.ts.map +1 -1
- package/lib/init/activate-ai-database-storage.js +13 -18
- 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 +4 -0
- package/lib/init/configure-zhin-agent.js.map +1 -1
- package/lib/init/define-ai-database-models.d.ts +1 -1
- package/lib/init/define-ai-database-models.d.ts.map +1 -1
- package/lib/init/define-ai-database-models.js +1 -21
- package/lib/init/define-ai-database-models.js.map +1 -1
- package/lib/init/runtime-management-commands.d.ts +8 -0
- package/lib/init/runtime-management-commands.d.ts.map +1 -1
- package/lib/init/runtime-management-commands.js +38 -0
- package/lib/init/runtime-management-commands.js.map +1 -1
- package/lib/internal/agent-host.d.ts +11 -0
- package/lib/internal/agent-host.d.ts.map +1 -1
- package/lib/media/index.d.ts +1 -0
- package/lib/media/index.d.ts.map +1 -1
- package/lib/media/index.js +1 -0
- package/lib/media/index.js.map +1 -1
- package/lib/media/perception.d.ts +47 -0
- package/lib/media/perception.d.ts.map +1 -0
- package/lib/media/perception.js +136 -0
- package/lib/media/perception.js.map +1 -0
- package/lib/memory/compaction-runtime.d.ts +13 -0
- package/lib/memory/compaction-runtime.d.ts.map +1 -1
- package/lib/memory/compaction-runtime.js +25 -3
- package/lib/memory/compaction-runtime.js.map +1 -1
- package/lib/memory/index.d.ts +2 -0
- package/lib/memory/index.d.ts.map +1 -1
- package/lib/memory/index.js +1 -0
- package/lib/memory/index.js.map +1 -1
- package/lib/memory/memory-write-policy.d.ts +39 -0
- package/lib/memory/memory-write-policy.d.ts.map +1 -0
- package/lib/memory/memory-write-policy.js +44 -0
- package/lib/memory/memory-write-policy.js.map +1 -0
- package/lib/memory/semantic-recall.d.ts +44 -0
- package/lib/memory/semantic-recall.d.ts.map +1 -0
- package/lib/memory/semantic-recall.js +69 -0
- package/lib/memory/semantic-recall.js.map +1 -0
- package/lib/memory/told-ledger.d.ts +54 -0
- package/lib/memory/told-ledger.d.ts.map +1 -0
- package/lib/memory/told-ledger.js +119 -0
- package/lib/memory/told-ledger.js.map +1 -0
- package/lib/plugin-runtime/agent-host-port.d.ts +0 -102
- 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 +42 -10
- package/lib/plugin-runtime/agent-runtime.js.map +1 -1
- package/lib/plugin-runtime/agent-trace-runtime.d.ts +5 -0
- package/lib/plugin-runtime/agent-trace-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/agent-trace-runtime.js +7 -0
- package/lib/plugin-runtime/agent-trace-runtime.js.map +1 -1
- package/lib/plugin-runtime/deferred-capability-plan.d.ts +27 -24
- package/lib/plugin-runtime/deferred-capability-plan.d.ts.map +1 -1
- package/lib/plugin-runtime/deferred-capability-plan.js +52 -82
- package/lib/plugin-runtime/deferred-capability-plan.js.map +1 -1
- package/lib/plugin-runtime/file-search-scope.d.ts +22 -0
- package/lib/plugin-runtime/file-search-scope.d.ts.map +1 -0
- package/lib/plugin-runtime/file-search-scope.js +129 -0
- package/lib/plugin-runtime/file-search-scope.js.map +1 -0
- package/lib/plugin-runtime/full-agent-turn-engine.d.ts.map +1 -1
- package/lib/plugin-runtime/full-agent-turn-engine.js +177 -21
- package/lib/plugin-runtime/full-agent-turn-engine.js.map +1 -1
- package/lib/plugin-runtime/index.d.ts +0 -78
- package/lib/plugin-runtime/index.d.ts.map +1 -1
- package/lib/plugin-runtime/index.js +0 -77
- package/lib/plugin-runtime/index.js.map +1 -1
- package/lib/plugin-runtime/native-bash-tool.d.ts +12 -0
- package/lib/plugin-runtime/native-bash-tool.d.ts.map +1 -1
- package/lib/plugin-runtime/native-bash-tool.js +32 -8
- package/lib/plugin-runtime/native-bash-tool.js.map +1 -1
- package/lib/plugin-runtime/native-file-tools.d.ts.map +1 -1
- package/lib/plugin-runtime/native-file-tools.js +120 -51
- package/lib/plugin-runtime/native-file-tools.js.map +1 -1
- package/lib/plugin-runtime/native-semantic-memory-tools.d.ts +27 -1
- package/lib/plugin-runtime/native-semantic-memory-tools.d.ts.map +1 -1
- package/lib/plugin-runtime/native-semantic-memory-tools.js +87 -9
- package/lib/plugin-runtime/native-semantic-memory-tools.js.map +1 -1
- package/lib/plugin-runtime/subagent-turn-capability.d.ts +32 -0
- package/lib/plugin-runtime/subagent-turn-capability.d.ts.map +1 -0
- package/lib/plugin-runtime/subagent-turn-capability.js +168 -0
- package/lib/plugin-runtime/subagent-turn-capability.js.map +1 -0
- package/lib/prompt/estimate-tokens.d.ts +7 -0
- package/lib/prompt/estimate-tokens.d.ts.map +1 -0
- package/lib/prompt/estimate-tokens.js +12 -0
- package/lib/prompt/estimate-tokens.js.map +1 -0
- package/lib/prompt/system-prompt.d.ts +2 -0
- package/lib/prompt/system-prompt.d.ts.map +1 -1
- package/lib/prompt/system-prompt.js +13 -2
- package/lib/prompt/system-prompt.js.map +1 -1
- package/lib/routing/subagent-summarize.d.ts +1 -1
- package/lib/routing/subagent-summarize.d.ts.map +1 -1
- package/lib/routing/subagent-summarize.js +2 -2
- package/lib/routing/subagent-summarize.js.map +1 -1
- package/lib/security/file-role-policy.d.ts +4 -2
- package/lib/security/file-role-policy.d.ts.map +1 -1
- package/lib/security/file-role-policy.js +21 -9
- package/lib/security/file-role-policy.js.map +1 -1
- package/lib/security/outbound-leak-guard.d.ts +61 -0
- package/lib/security/outbound-leak-guard.d.ts.map +1 -0
- package/lib/security/outbound-leak-guard.js +145 -0
- package/lib/security/outbound-leak-guard.js.map +1 -0
- package/lib/security/policy-facade.d.ts.map +1 -1
- package/lib/security/policy-facade.js +9 -0
- package/lib/security/policy-facade.js.map +1 -1
- package/lib/security/policy-narrowing.d.ts +12 -0
- package/lib/security/policy-narrowing.d.ts.map +1 -0
- package/lib/security/policy-narrowing.js +38 -0
- package/lib/security/policy-narrowing.js.map +1 -0
- package/lib/security/provenance.d.ts +65 -0
- package/lib/security/provenance.d.ts.map +1 -0
- package/lib/security/provenance.js +112 -0
- package/lib/security/provenance.js.map +1 -0
- package/lib/security/trust-level.d.ts +76 -0
- package/lib/security/trust-level.d.ts.map +1 -0
- package/lib/security/trust-level.js +87 -0
- package/lib/security/trust-level.js.map +1 -0
- package/lib/security/usage-quota.d.ts +73 -0
- package/lib/security/usage-quota.d.ts.map +1 -0
- package/lib/security/usage-quota.js +123 -0
- package/lib/security/usage-quota.js.map +1 -0
- package/lib/service.d.ts +4 -0
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +16 -1
- package/lib/service.js.map +1 -1
- package/lib/session/approval-port.d.ts +26 -0
- package/lib/session/approval-port.d.ts.map +1 -1
- package/lib/session/approval-port.js +36 -0
- package/lib/session/approval-port.js.map +1 -1
- package/lib/session/approval-review-agent.d.ts +2 -2
- package/lib/session/approval-review-agent.d.ts.map +1 -1
- package/lib/session/approval-review-agent.js +57 -39
- package/lib/session/approval-review-agent.js.map +1 -1
- package/lib/session/session-io.d.ts.map +1 -1
- package/lib/session/session-io.js +1 -0
- package/lib/session/session-io.js.map +1 -1
- package/lib/session/turn-ingress-session.d.ts.map +1 -1
- package/lib/session/turn-ingress-session.js +1 -0
- package/lib/session/turn-ingress-session.js.map +1 -1
- package/lib/skill/capability-catalog.d.ts +27 -0
- package/lib/skill/capability-catalog.d.ts.map +1 -0
- package/lib/skill/capability-catalog.js +70 -0
- package/lib/skill/capability-catalog.js.map +1 -0
- package/lib/tool/deferred-resolution.d.ts.map +1 -1
- package/lib/tool/deferred-resolution.js +2 -1
- package/lib/tool/deferred-resolution.js.map +1 -1
- package/lib/tool/turn-tool-runtime.d.ts +13 -1
- package/lib/tool/turn-tool-runtime.d.ts.map +1 -1
- package/lib/tool/turn-tool-runtime.js +81 -7
- package/lib/tool/turn-tool-runtime.js.map +1 -1
- package/lib/tool-catalog/deferred-turn-controller.d.ts +4 -0
- package/lib/tool-catalog/deferred-turn-controller.d.ts.map +1 -1
- package/lib/tool-catalog/deferred-turn-controller.js +13 -3
- package/lib/tool-catalog/deferred-turn-controller.js.map +1 -1
- package/lib/tool-catalog/resolve-config.d.ts.map +1 -1
- package/lib/tool-catalog/resolve-config.js +5 -1
- package/lib/tool-catalog/resolve-config.js.map +1 -1
- package/lib/tool-catalog/types.d.ts +14 -1
- package/lib/tool-catalog/types.d.ts.map +1 -1
- package/lib/tool-catalog/types.js +15 -0
- package/lib/tool-catalog/types.js.map +1 -1
- package/lib/trace/context-budget.d.ts +56 -0
- package/lib/trace/context-budget.d.ts.map +1 -0
- package/lib/trace/context-budget.js +102 -0
- package/lib/trace/context-budget.js.map +1 -0
- package/lib/trace/index.d.ts +12 -0
- package/lib/trace/index.d.ts.map +1 -0
- package/lib/trace/index.js +7 -0
- package/lib/trace/index.js.map +1 -0
- package/lib/trace/turn-trace-archive.d.ts +49 -0
- package/lib/trace/turn-trace-archive.d.ts.map +1 -0
- package/lib/trace/turn-trace-archive.js +208 -0
- package/lib/trace/turn-trace-archive.js.map +1 -0
- package/lib/trace/turn-trace-format.d.ts +10 -0
- package/lib/trace/turn-trace-format.d.ts.map +1 -0
- package/lib/trace/turn-trace-format.js +132 -0
- package/lib/trace/turn-trace-format.js.map +1 -0
- package/lib/trace/turn-trace-registry.d.ts +30 -0
- package/lib/trace/turn-trace-registry.d.ts.map +1 -0
- package/lib/trace/turn-trace-registry.js +62 -0
- package/lib/trace/turn-trace-registry.js.map +1 -0
- package/lib/trace/turn-trace-store.d.ts +15 -0
- package/lib/trace/turn-trace-store.d.ts.map +1 -0
- package/lib/trace/turn-trace-store.js +67 -0
- package/lib/trace/turn-trace-store.js.map +1 -0
- package/lib/trace/turn-trace.d.ts +147 -0
- package/lib/trace/turn-trace.d.ts.map +1 -0
- package/lib/trace/turn-trace.js +341 -0
- package/lib/trace/turn-trace.js.map +1 -0
- package/lib/turn/execute-agent-turn.d.ts.map +1 -1
- package/lib/turn/execute-agent-turn.js +21 -10
- package/lib/turn/execute-agent-turn.js.map +1 -1
- package/lib/turn/inbound-media.d.ts +15 -0
- package/lib/turn/inbound-media.d.ts.map +1 -1
- package/lib/turn/inbound-media.js +41 -1
- package/lib/turn/inbound-media.js.map +1 -1
- package/lib/turn/inbound-queue-config.d.ts +1 -0
- package/lib/turn/inbound-queue-config.d.ts.map +1 -1
- package/lib/turn/inbound-queue-config.js +9 -1
- package/lib/turn/inbound-queue-config.js.map +1 -1
- package/lib/turn/index.d.ts +5 -0
- package/lib/turn/index.d.ts.map +1 -1
- package/lib/turn/index.js +4 -0
- package/lib/turn/index.js.map +1 -1
- package/lib/turn/journal-feed.d.ts +31 -0
- package/lib/turn/journal-feed.d.ts.map +1 -0
- package/lib/turn/journal-feed.js +43 -0
- package/lib/turn/journal-feed.js.map +1 -0
- package/lib/turn/turn-admission-gate.d.ts +62 -0
- package/lib/turn/turn-admission-gate.d.ts.map +1 -0
- package/lib/turn/turn-admission-gate.js +194 -0
- package/lib/turn/turn-admission-gate.js.map +1 -0
- package/lib/turn/turn-ingress.d.ts +4 -0
- package/lib/turn/turn-ingress.d.ts.map +1 -1
- package/lib/turn/turn-ingress.js.map +1 -1
- package/lib/turn/turn-pipeline.js +1 -0
- package/lib/turn/turn-pipeline.js.map +1 -1
- package/lib/zhin-agent/index.d.ts +9 -0
- package/lib/zhin-agent/index.d.ts.map +1 -1
- package/lib/zhin-agent/index.js +13 -0
- package/lib/zhin-agent/index.js.map +1 -1
- package/package.json +20 -13
- package/lib/data-governance/data-governance.d.ts +0 -198
- package/lib/data-governance/data-governance.d.ts.map +0 -1
- package/lib/data-governance/data-governance.js +0 -660
- package/lib/data-governance/data-governance.js.map +0 -1
- package/lib/data-governance/database-payload-lifecycle-repository.d.ts +0 -68
- package/lib/data-governance/database-payload-lifecycle-repository.d.ts.map +0 -1
- package/lib/data-governance/database-payload-lifecycle-repository.js +0 -226
- package/lib/data-governance/database-payload-lifecycle-repository.js.map +0 -1
- package/lib/data-governance/disclosure-authority.d.ts +0 -38
- package/lib/data-governance/disclosure-authority.d.ts.map +0 -1
- package/lib/data-governance/disclosure-authority.js +0 -2
- package/lib/data-governance/disclosure-authority.js.map +0 -1
- package/lib/data-governance/disclosure-manifest.d.ts +0 -110
- package/lib/data-governance/disclosure-manifest.d.ts.map +0 -1
- package/lib/data-governance/disclosure-manifest.js +0 -264
- package/lib/data-governance/disclosure-manifest.js.map +0 -1
- package/lib/data-governance/encrypted-database-payload-vault.d.ts +0 -107
- package/lib/data-governance/encrypted-database-payload-vault.d.ts.map +0 -1
- package/lib/data-governance/encrypted-database-payload-vault.js +0 -236
- package/lib/data-governance/encrypted-database-payload-vault.js.map +0 -1
- package/lib/data-governance/encrypted-file-payload-vault.d.ts +0 -117
- package/lib/data-governance/encrypted-file-payload-vault.d.ts.map +0 -1
- package/lib/data-governance/encrypted-file-payload-vault.js +0 -507
- package/lib/data-governance/encrypted-file-payload-vault.js.map +0 -1
- package/lib/data-governance/file-payload-lifecycle-repository.d.ts +0 -19
- package/lib/data-governance/file-payload-lifecycle-repository.d.ts.map +0 -1
- package/lib/data-governance/file-payload-lifecycle-repository.js +0 -194
- package/lib/data-governance/file-payload-lifecycle-repository.js.map +0 -1
- package/lib/data-governance/governance-authority-repository.d.ts +0 -152
- package/lib/data-governance/governance-authority-repository.d.ts.map +0 -1
- package/lib/data-governance/governance-authority-repository.js +0 -455
- package/lib/data-governance/governance-authority-repository.js.map +0 -1
- package/lib/data-governance/governed-payload-write-saga.d.ts +0 -126
- package/lib/data-governance/governed-payload-write-saga.d.ts.map +0 -1
- package/lib/data-governance/governed-payload-write-saga.js +0 -471
- package/lib/data-governance/governed-payload-write-saga.js.map +0 -1
- package/lib/data-governance/payload-hold-overdue-projection.d.ts +0 -57
- package/lib/data-governance/payload-hold-overdue-projection.d.ts.map +0 -1
- package/lib/data-governance/payload-hold-overdue-projection.js +0 -80
- package/lib/data-governance/payload-hold-overdue-projection.js.map +0 -1
- package/lib/data-governance/payload-lifecycle.d.ts +0 -359
- package/lib/data-governance/payload-lifecycle.d.ts.map +0 -1
- package/lib/data-governance/payload-lifecycle.js +0 -930
- package/lib/data-governance/payload-lifecycle.js.map +0 -1
- package/lib/data-governance/payload-vault-storage-handoff.d.ts +0 -255
- package/lib/data-governance/payload-vault-storage-handoff.d.ts.map +0 -1
- package/lib/data-governance/payload-vault-storage-handoff.js +0 -471
- package/lib/data-governance/payload-vault-storage-handoff.js.map +0 -1
- package/lib/plugin-runtime/database-overlay-pack-promotion-repository.d.ts +0 -70
- package/lib/plugin-runtime/database-overlay-pack-promotion-repository.d.ts.map +0 -1
- package/lib/plugin-runtime/database-overlay-pack-promotion-repository.js +0 -203
- package/lib/plugin-runtime/database-overlay-pack-promotion-repository.js.map +0 -1
- package/lib/plugin-runtime/github-actions-delivery-provider.d.ts +0 -44
- package/lib/plugin-runtime/github-actions-delivery-provider.d.ts.map +0 -1
- package/lib/plugin-runtime/github-actions-delivery-provider.js +0 -246
- package/lib/plugin-runtime/github-actions-delivery-provider.js.map +0 -1
- package/lib/plugin-runtime/github-exact-merge-gateway.d.ts +0 -62
- package/lib/plugin-runtime/github-exact-merge-gateway.d.ts.map +0 -1
- package/lib/plugin-runtime/github-exact-merge-gateway.js +0 -79
- package/lib/plugin-runtime/github-exact-merge-gateway.js.map +0 -1
- package/lib/plugin-runtime/github-workroom-capability.d.ts +0 -15
- package/lib/plugin-runtime/github-workroom-capability.d.ts.map +0 -1
- package/lib/plugin-runtime/github-workroom-capability.js +0 -79
- package/lib/plugin-runtime/github-workroom-capability.js.map +0 -1
- package/lib/plugin-runtime/self-delivery-project-composition.d.ts +0 -25
- package/lib/plugin-runtime/self-delivery-project-composition.d.ts.map +0 -1
- package/lib/plugin-runtime/self-delivery-project-composition.js +0 -85
- package/lib/plugin-runtime/self-delivery-project-composition.js.map +0 -1
- package/lib/plugin-runtime/self-delivery-project.d.ts +0 -65
- package/lib/plugin-runtime/self-delivery-project.d.ts.map +0 -1
- package/lib/plugin-runtime/self-delivery-project.js +0 -140
- package/lib/plugin-runtime/self-delivery-project.js.map +0 -1
- package/lib/plugin-runtime/workroom-acceptance-authority.d.ts +0 -5
- package/lib/plugin-runtime/workroom-acceptance-authority.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-acceptance-authority.js +0 -14
- package/lib/plugin-runtime/workroom-acceptance-authority.js.map +0 -1
- package/lib/plugin-runtime/workroom-acceptance-fact-providers.d.ts +0 -233
- package/lib/plugin-runtime/workroom-acceptance-fact-providers.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-acceptance-fact-providers.js +0 -517
- package/lib/plugin-runtime/workroom-acceptance-fact-providers.js.map +0 -1
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.d.ts +0 -139
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.js +0 -435
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.js.map +0 -1
- package/lib/plugin-runtime/workroom-acceptance-policy.d.ts +0 -4
- package/lib/plugin-runtime/workroom-acceptance-policy.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-acceptance-policy.js +0 -20
- package/lib/plugin-runtime/workroom-acceptance-policy.js.map +0 -1
- package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts +0 -177
- package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-acceptance-production-composition.js +0 -794
- package/lib/plugin-runtime/workroom-acceptance-production-composition.js.map +0 -1
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts +0 -189
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.js +0 -590
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.js.map +0 -1
- package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts +0 -75
- package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-accepted-source-runtime.js +0 -267
- package/lib/plugin-runtime/workroom-accepted-source-runtime.js.map +0 -1
- package/lib/plugin-runtime/workroom-assignment-authority-grant-runtime.d.ts +0 -42
- package/lib/plugin-runtime/workroom-assignment-authority-grant-runtime.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-assignment-authority-grant-runtime.js +0 -90
- package/lib/plugin-runtime/workroom-assignment-authority-grant-runtime.js.map +0 -1
- package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts +0 -84
- package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-assignment-authority-provider.js +0 -494
- package/lib/plugin-runtime/workroom-assignment-authority-provider.js.map +0 -1
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts +0 -58
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.js +0 -218
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.js.map +0 -1
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.d.ts +0 -49
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.js +0 -140
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.js.map +0 -1
- package/lib/plugin-runtime/workroom-data-governance-bootstrap.d.ts +0 -27
- package/lib/plugin-runtime/workroom-data-governance-bootstrap.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-data-governance-bootstrap.js +0 -324
- package/lib/plugin-runtime/workroom-data-governance-bootstrap.js.map +0 -1
- package/lib/plugin-runtime/workroom-data-governance-composition.d.ts +0 -28
- package/lib/plugin-runtime/workroom-data-governance-composition.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-data-governance-composition.js +0 -41
- package/lib/plugin-runtime/workroom-data-governance-composition.js.map +0 -1
- package/lib/plugin-runtime/workroom-data-governance-root-provider.d.ts +0 -51
- package/lib/plugin-runtime/workroom-data-governance-root-provider.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-data-governance-root-provider.js +0 -66
- package/lib/plugin-runtime/workroom-data-governance-root-provider.js.map +0 -1
- package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts +0 -100
- package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-data-governance-runtime.js +0 -1356
- package/lib/plugin-runtime/workroom-data-governance-runtime.js.map +0 -1
- package/lib/plugin-runtime/workroom-data-governance-storage.d.ts +0 -66
- package/lib/plugin-runtime/workroom-data-governance-storage.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-data-governance-storage.js +0 -159
- package/lib/plugin-runtime/workroom-data-governance-storage.js.map +0 -1
- package/lib/plugin-runtime/workroom-data-lifecycle-composition.d.ts +0 -37
- package/lib/plugin-runtime/workroom-data-lifecycle-composition.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-data-lifecycle-composition.js +0 -131
- package/lib/plugin-runtime/workroom-data-lifecycle-composition.js.map +0 -1
- package/lib/plugin-runtime/workroom-data-lifecycle-console.d.ts +0 -238
- package/lib/plugin-runtime/workroom-data-lifecycle-console.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-data-lifecycle-console.js +0 -495
- package/lib/plugin-runtime/workroom-data-lifecycle-console.js.map +0 -1
- package/lib/plugin-runtime/workroom-data-lifecycle-human-ingress.d.ts +0 -15
- package/lib/plugin-runtime/workroom-data-lifecycle-human-ingress.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-data-lifecycle-human-ingress.js +0 -119
- package/lib/plugin-runtime/workroom-data-lifecycle-human-ingress.js.map +0 -1
- package/lib/plugin-runtime/workroom-delivery-gateway.d.ts +0 -96
- package/lib/plugin-runtime/workroom-delivery-gateway.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-delivery-gateway.js +0 -129
- package/lib/plugin-runtime/workroom-delivery-gateway.js.map +0 -1
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.d.ts +0 -142
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.js +0 -302
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.js.map +0 -1
- package/lib/plugin-runtime/workroom-dynamic-planning.d.ts +0 -4
- package/lib/plugin-runtime/workroom-dynamic-planning.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-dynamic-planning.js +0 -13
- package/lib/plugin-runtime/workroom-dynamic-planning.js.map +0 -1
- package/lib/plugin-runtime/workroom-effect-composition.d.ts +0 -37
- package/lib/plugin-runtime/workroom-effect-composition.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-effect-composition.js +0 -80
- package/lib/plugin-runtime/workroom-effect-composition.js.map +0 -1
- package/lib/plugin-runtime/workroom-effect-production.d.ts +0 -138
- package/lib/plugin-runtime/workroom-effect-production.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-effect-production.js +0 -291
- package/lib/plugin-runtime/workroom-effect-production.js.map +0 -1
- package/lib/plugin-runtime/workroom-effect-runtime.d.ts +0 -56
- package/lib/plugin-runtime/workroom-effect-runtime.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-effect-runtime.js +0 -239
- package/lib/plugin-runtime/workroom-effect-runtime.js.map +0 -1
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts +0 -32
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.js +0 -43
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.js.map +0 -1
- package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts +0 -16
- package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-journal-payload-composition.js +0 -69
- package/lib/plugin-runtime/workroom-journal-payload-composition.js.map +0 -1
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.d.ts +0 -17
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.js +0 -101
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.js.map +0 -1
- package/lib/plugin-runtime/workroom-local-agent-loop.d.ts +0 -91
- package/lib/plugin-runtime/workroom-local-agent-loop.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-local-agent-loop.js +0 -313
- package/lib/plugin-runtime/workroom-local-agent-loop.js.map +0 -1
- package/lib/plugin-runtime/workroom-local-assignment-authority.d.ts +0 -5
- package/lib/plugin-runtime/workroom-local-assignment-authority.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-local-assignment-authority.js +0 -16
- package/lib/plugin-runtime/workroom-local-assignment-authority.js.map +0 -1
- package/lib/plugin-runtime/workroom-local-assignment-executor.d.ts +0 -59
- package/lib/plugin-runtime/workroom-local-assignment-executor.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-local-assignment-executor.js +0 -197
- package/lib/plugin-runtime/workroom-local-assignment-executor.js.map +0 -1
- package/lib/plugin-runtime/workroom-local-assignment-runtime.d.ts +0 -34
- package/lib/plugin-runtime/workroom-local-assignment-runtime.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-local-assignment-runtime.js +0 -235
- package/lib/plugin-runtime/workroom-local-assignment-runtime.js.map +0 -1
- package/lib/plugin-runtime/workroom-local-assignment-supply.d.ts +0 -39
- package/lib/plugin-runtime/workroom-local-assignment-supply.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-local-assignment-supply.js +0 -107
- package/lib/plugin-runtime/workroom-local-assignment-supply.js.map +0 -1
- package/lib/plugin-runtime/workroom-overlay-pack-promotion.d.ts +0 -145
- package/lib/plugin-runtime/workroom-overlay-pack-promotion.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-overlay-pack-promotion.js +0 -516
- package/lib/plugin-runtime/workroom-overlay-pack-promotion.js.map +0 -1
- package/lib/plugin-runtime/workroom-payload-processor-recall.d.ts +0 -91
- package/lib/plugin-runtime/workroom-payload-processor-recall.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-payload-processor-recall.js +0 -189
- package/lib/plugin-runtime/workroom-payload-processor-recall.js.map +0 -1
- package/lib/plugin-runtime/workroom-plan-gate-authority.d.ts +0 -7
- package/lib/plugin-runtime/workroom-plan-gate-authority.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-plan-gate-authority.js +0 -40
- package/lib/plugin-runtime/workroom-plan-gate-authority.js.map +0 -1
- package/lib/plugin-runtime/workroom-portfolio-capacity.d.ts +0 -132
- package/lib/plugin-runtime/workroom-portfolio-capacity.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-portfolio-capacity.js +0 -189
- package/lib/plugin-runtime/workroom-portfolio-capacity.js.map +0 -1
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts +0 -38
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.js +0 -103
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.js.map +0 -1
- package/lib/plugin-runtime/workroom-portfolio-control-composition.d.ts +0 -30
- package/lib/plugin-runtime/workroom-portfolio-control-composition.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-portfolio-control-composition.js +0 -103
- package/lib/plugin-runtime/workroom-portfolio-control-composition.js.map +0 -1
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.d.ts +0 -42
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.js +0 -209
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.js.map +0 -1
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts +0 -141
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.js +0 -334
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.js.map +0 -1
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts +0 -23
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.js +0 -88
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.js.map +0 -1
- package/lib/plugin-runtime/workroom-portfolio-sponsor.d.ts +0 -96
- package/lib/plugin-runtime/workroom-portfolio-sponsor.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-portfolio-sponsor.js +0 -313
- package/lib/plugin-runtime/workroom-portfolio-sponsor.js.map +0 -1
- package/lib/plugin-runtime/workroom-preemption-runtime.d.ts +0 -57
- package/lib/plugin-runtime/workroom-preemption-runtime.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-preemption-runtime.js +0 -163
- package/lib/plugin-runtime/workroom-preemption-runtime.js.map +0 -1
- package/lib/plugin-runtime/workroom-priority-authority.d.ts +0 -19
- package/lib/plugin-runtime/workroom-priority-authority.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-priority-authority.js +0 -76
- package/lib/plugin-runtime/workroom-priority-authority.js.map +0 -1
- package/lib/plugin-runtime/workroom-profile-authority-composition.d.ts +0 -61
- package/lib/plugin-runtime/workroom-profile-authority-composition.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-profile-authority-composition.js +0 -232
- package/lib/plugin-runtime/workroom-profile-authority-composition.js.map +0 -1
- package/lib/plugin-runtime/workroom-profile-authority-runtime.d.ts +0 -229
- package/lib/plugin-runtime/workroom-profile-authority-runtime.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-profile-authority-runtime.js +0 -1133
- package/lib/plugin-runtime/workroom-profile-authority-runtime.js.map +0 -1
- package/lib/plugin-runtime/workroom-projection-outbound.d.ts +0 -10
- package/lib/plugin-runtime/workroom-projection-outbound.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-projection-outbound.js +0 -35
- package/lib/plugin-runtime/workroom-projection-outbound.js.map +0 -1
- package/lib/plugin-runtime/workroom-projection-runtime.d.ts +0 -93
- package/lib/plugin-runtime/workroom-projection-runtime.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-projection-runtime.js +0 -476
- package/lib/plugin-runtime/workroom-projection-runtime.js.map +0 -1
- package/lib/plugin-runtime/workroom-remote-assignment-authority.d.ts +0 -9
- package/lib/plugin-runtime/workroom-remote-assignment-authority.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-remote-assignment-authority.js +0 -20
- package/lib/plugin-runtime/workroom-remote-assignment-authority.js.map +0 -1
- package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts +0 -38
- package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-remote-callback-runtime.js +0 -80
- package/lib/plugin-runtime/workroom-remote-callback-runtime.js.map +0 -1
- package/lib/plugin-runtime/workroom-remote-executor.d.ts +0 -9
- package/lib/plugin-runtime/workroom-remote-executor.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-remote-executor.js +0 -23
- package/lib/plugin-runtime/workroom-remote-executor.js.map +0 -1
- package/lib/plugin-runtime/workroom-reviewer-authority-runtime.d.ts +0 -72
- package/lib/plugin-runtime/workroom-reviewer-authority-runtime.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-reviewer-authority-runtime.js +0 -142
- package/lib/plugin-runtime/workroom-reviewer-authority-runtime.js.map +0 -1
- package/lib/plugin-runtime/workroom-risk-acceptance-runtime.d.ts +0 -112
- package/lib/plugin-runtime/workroom-risk-acceptance-runtime.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-risk-acceptance-runtime.js +0 -376
- package/lib/plugin-runtime/workroom-risk-acceptance-runtime.js.map +0 -1
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts +0 -42
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.js +0 -125
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.js.map +0 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts +0 -32
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.js +0 -83
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.js.map +0 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-contract.d.ts +0 -16
- package/lib/plugin-runtime/workroom-scheduler-portfolio-contract.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-contract.js +0 -49
- package/lib/plugin-runtime/workroom-scheduler-portfolio-contract.js.map +0 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts +0 -66
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.js +0 -250
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.js.map +0 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.d.ts +0 -42
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.js +0 -141
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.js.map +0 -1
- package/lib/plugin-runtime/workroom-scheduler-route-registry.d.ts +0 -27
- package/lib/plugin-runtime/workroom-scheduler-route-registry.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-scheduler-route-registry.js +0 -136
- package/lib/plugin-runtime/workroom-scheduler-route-registry.js.map +0 -1
- package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts +0 -84
- package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts.map +0 -1
- package/lib/plugin-runtime/workroom-scheduler-runtime.js +0 -236
- package/lib/plugin-runtime/workroom-scheduler-runtime.js.map +0 -1
- package/lib/portfolio/capacity-control-outbox.d.ts +0 -174
- package/lib/portfolio/capacity-control-outbox.d.ts.map +0 -1
- package/lib/portfolio/capacity-control-outbox.js +0 -338
- package/lib/portfolio/capacity-control-outbox.js.map +0 -1
- package/lib/portfolio/database-capacity-control-outbox.d.ts +0 -62
- package/lib/portfolio/database-capacity-control-outbox.d.ts.map +0 -1
- package/lib/portfolio/database-capacity-control-outbox.js +0 -166
- package/lib/portfolio/database-capacity-control-outbox.js.map +0 -1
- package/lib/portfolio/file-capacity-control-outbox.d.ts +0 -10
- package/lib/portfolio/file-capacity-control-outbox.d.ts.map +0 -1
- package/lib/portfolio/file-capacity-control-outbox.js +0 -113
- package/lib/portfolio/file-capacity-control-outbox.js.map +0 -1
- package/lib/portfolio/file-portfolio-journal.d.ts +0 -11
- package/lib/portfolio/file-portfolio-journal.d.ts.map +0 -1
- package/lib/portfolio/file-portfolio-journal.js +0 -196
- package/lib/portfolio/file-portfolio-journal.js.map +0 -1
- package/lib/portfolio/portfolio-admission.d.ts +0 -95
- package/lib/portfolio/portfolio-admission.d.ts.map +0 -1
- package/lib/portfolio/portfolio-admission.js +0 -1080
- package/lib/portfolio/portfolio-admission.js.map +0 -1
- package/lib/portfolio/portfolio-journal.d.ts +0 -359
- package/lib/portfolio/portfolio-journal.d.ts.map +0 -1
- package/lib/portfolio/portfolio-journal.js +0 -844
- package/lib/portfolio/portfolio-journal.js.map +0 -1
- package/lib/portfolio/resource-bundle.d.ts +0 -136
- package/lib/portfolio/resource-bundle.d.ts.map +0 -1
- package/lib/portfolio/resource-bundle.js +0 -387
- package/lib/portfolio/resource-bundle.js.map +0 -1
- package/lib/portfolio/sponsor-projection.d.ts +0 -78
- package/lib/portfolio/sponsor-projection.d.ts.map +0 -1
- package/lib/portfolio/sponsor-projection.js +0 -135
- package/lib/portfolio/sponsor-projection.js.map +0 -1
- package/lib/routing/match-rules.d.ts +0 -4
- package/lib/routing/match-rules.d.ts.map +0 -1
- package/lib/routing/match-rules.js +0 -29
- package/lib/routing/match-rules.js.map +0 -1
- package/lib/routing/route-matcher.d.ts +0 -16
- package/lib/routing/route-matcher.d.ts.map +0 -1
- package/lib/routing/route-matcher.js +0 -62
- package/lib/routing/route-matcher.js.map +0 -1
- package/lib/routing/workroom-bot-identity.d.ts +0 -22
- package/lib/routing/workroom-bot-identity.d.ts.map +0 -1
- package/lib/routing/workroom-bot-identity.js +0 -53
- package/lib/routing/workroom-bot-identity.js.map +0 -1
- package/lib/workroom/acceptance-control.d.ts +0 -77
- package/lib/workroom/acceptance-control.d.ts.map +0 -1
- package/lib/workroom/acceptance-control.js +0 -345
- package/lib/workroom/acceptance-control.js.map +0 -1
- package/lib/workroom/acceptance-policy.d.ts +0 -152
- package/lib/workroom/acceptance-policy.d.ts.map +0 -1
- package/lib/workroom/acceptance-policy.js +0 -610
- package/lib/workroom/acceptance-policy.js.map +0 -1
- package/lib/workroom/accepted-source-memory-application.d.ts +0 -113
- package/lib/workroom/accepted-source-memory-application.d.ts.map +0 -1
- package/lib/workroom/accepted-source-memory-application.js +0 -327
- package/lib/workroom/accepted-source-memory-application.js.map +0 -1
- package/lib/workroom/accepted-source-projector.d.ts +0 -89
- package/lib/workroom/accepted-source-projector.d.ts.map +0 -1
- package/lib/workroom/accepted-source-projector.js +0 -281
- package/lib/workroom/accepted-source-projector.js.map +0 -1
- package/lib/workroom/assignment-authority-grant-application.d.ts +0 -125
- package/lib/workroom/assignment-authority-grant-application.d.ts.map +0 -1
- package/lib/workroom/assignment-authority-grant-application.js +0 -318
- package/lib/workroom/assignment-authority-grant-application.js.map +0 -1
- package/lib/workroom/assignment-authority-grant-repository.d.ts +0 -152
- package/lib/workroom/assignment-authority-grant-repository.d.ts.map +0 -1
- package/lib/workroom/assignment-authority-grant-repository.js +0 -389
- package/lib/workroom/assignment-authority-grant-repository.js.map +0 -1
- package/lib/workroom/assignment-authority.d.ts +0 -75
- package/lib/workroom/assignment-authority.d.ts.map +0 -1
- package/lib/workroom/assignment-authority.js +0 -179
- package/lib/workroom/assignment-authority.js.map +0 -1
- package/lib/workroom/assignment-executor.d.ts +0 -110
- package/lib/workroom/assignment-executor.d.ts.map +0 -1
- package/lib/workroom/assignment-executor.js +0 -371
- package/lib/workroom/assignment-executor.js.map +0 -1
- package/lib/workroom/assignment-observation-ingress.d.ts +0 -21
- package/lib/workroom/assignment-observation-ingress.d.ts.map +0 -1
- package/lib/workroom/assignment-observation-ingress.js +0 -24
- package/lib/workroom/assignment-observation-ingress.js.map +0 -1
- package/lib/workroom/canonical-value.d.ts +0 -7
- package/lib/workroom/canonical-value.d.ts.map +0 -1
- package/lib/workroom/canonical-value.js +0 -32
- package/lib/workroom/canonical-value.js.map +0 -1
- package/lib/workroom/catalog-definition.d.ts +0 -52
- package/lib/workroom/catalog-definition.d.ts.map +0 -1
- package/lib/workroom/catalog-definition.js +0 -6
- package/lib/workroom/catalog-definition.js.map +0 -1
- package/lib/workroom/catalog.d.ts +0 -80
- package/lib/workroom/catalog.d.ts.map +0 -1
- package/lib/workroom/catalog.js +0 -386
- package/lib/workroom/catalog.js.map +0 -1
- package/lib/workroom/coding-assignment-executor.d.ts +0 -90
- package/lib/workroom/coding-assignment-executor.d.ts.map +0 -1
- package/lib/workroom/coding-assignment-executor.js +0 -250
- package/lib/workroom/coding-assignment-executor.js.map +0 -1
- package/lib/workroom/coding-git-objects.d.ts +0 -17
- package/lib/workroom/coding-git-objects.d.ts.map +0 -1
- package/lib/workroom/coding-git-objects.js +0 -68
- package/lib/workroom/coding-git-objects.js.map +0 -1
- package/lib/workroom/database-project-knowledge-journal.d.ts +0 -62
- package/lib/workroom/database-project-knowledge-journal.d.ts.map +0 -1
- package/lib/workroom/database-project-knowledge-journal.js +0 -161
- package/lib/workroom/database-project-knowledge-journal.js.map +0 -1
- package/lib/workroom/durable-file-store.d.ts +0 -56
- package/lib/workroom/durable-file-store.d.ts.map +0 -1
- package/lib/workroom/durable-file-store.js +0 -125
- package/lib/workroom/durable-file-store.js.map +0 -1
- package/lib/workroom/dynamic-workflow-planner.d.ts +0 -86
- package/lib/workroom/dynamic-workflow-planner.d.ts.map +0 -1
- package/lib/workroom/dynamic-workflow-planner.js +0 -260
- package/lib/workroom/dynamic-workflow-planner.js.map +0 -1
- package/lib/workroom/effect-blocker-repository.d.ts +0 -51
- package/lib/workroom/effect-blocker-repository.d.ts.map +0 -1
- package/lib/workroom/effect-blocker-repository.js +0 -174
- package/lib/workroom/effect-blocker-repository.js.map +0 -1
- package/lib/workroom/effect-ledger.d.ts +0 -211
- package/lib/workroom/effect-ledger.d.ts.map +0 -1
- package/lib/workroom/effect-ledger.js +0 -484
- package/lib/workroom/effect-ledger.js.map +0 -1
- package/lib/workroom/file-accepted-source-memory-repository.d.ts +0 -15
- package/lib/workroom/file-accepted-source-memory-repository.d.ts.map +0 -1
- package/lib/workroom/file-accepted-source-memory-repository.js +0 -136
- package/lib/workroom/file-accepted-source-memory-repository.js.map +0 -1
- package/lib/workroom/file-coding-execution-store.d.ts +0 -25
- package/lib/workroom/file-coding-execution-store.d.ts.map +0 -1
- package/lib/workroom/file-coding-execution-store.js +0 -122
- package/lib/workroom/file-coding-execution-store.js.map +0 -1
- package/lib/workroom/file-effect-ledger.d.ts +0 -10
- package/lib/workroom/file-effect-ledger.d.ts.map +0 -1
- package/lib/workroom/file-effect-ledger.js +0 -121
- package/lib/workroom/file-effect-ledger.js.map +0 -1
- package/lib/workroom/file-human-ingress-application.d.ts +0 -10
- package/lib/workroom/file-human-ingress-application.d.ts.map +0 -1
- package/lib/workroom/file-human-ingress-application.js +0 -177
- package/lib/workroom/file-human-ingress-application.js.map +0 -1
- package/lib/workroom/file-human-ingress.d.ts +0 -24
- package/lib/workroom/file-human-ingress.d.ts.map +0 -1
- package/lib/workroom/file-human-ingress.js +0 -234
- package/lib/workroom/file-human-ingress.js.map +0 -1
- package/lib/workroom/file-interaction-space-binding-repository.d.ts +0 -24
- package/lib/workroom/file-interaction-space-binding-repository.d.ts.map +0 -1
- package/lib/workroom/file-interaction-space-binding-repository.js +0 -293
- package/lib/workroom/file-interaction-space-binding-repository.js.map +0 -1
- package/lib/workroom/file-profile-journal.d.ts +0 -33
- package/lib/workroom/file-profile-journal.d.ts.map +0 -1
- package/lib/workroom/file-profile-journal.js +0 -311
- package/lib/workroom/file-profile-journal.js.map +0 -1
- package/lib/workroom/git-workspace-gateway.d.ts +0 -152
- package/lib/workroom/git-workspace-gateway.d.ts.map +0 -1
- package/lib/workroom/git-workspace-gateway.js +0 -257
- package/lib/workroom/git-workspace-gateway.js.map +0 -1
- package/lib/workroom/github-workspace-transport.d.ts +0 -30
- package/lib/workroom/github-workspace-transport.d.ts.map +0 -1
- package/lib/workroom/github-workspace-transport.js +0 -224
- package/lib/workroom/github-workspace-transport.js.map +0 -1
- package/lib/workroom/governed-dispatch-reasons.d.ts +0 -10
- package/lib/workroom/governed-dispatch-reasons.d.ts.map +0 -1
- package/lib/workroom/governed-dispatch-reasons.js +0 -20
- package/lib/workroom/governed-dispatch-reasons.js.map +0 -1
- package/lib/workroom/human-ingress-application.d.ts +0 -128
- package/lib/workroom/human-ingress-application.d.ts.map +0 -1
- package/lib/workroom/human-ingress-application.js +0 -415
- package/lib/workroom/human-ingress-application.js.map +0 -1
- package/lib/workroom/human-ingress-orchestrator.d.ts +0 -99
- package/lib/workroom/human-ingress-orchestrator.d.ts.map +0 -1
- package/lib/workroom/human-ingress-orchestrator.js +0 -262
- package/lib/workroom/human-ingress-orchestrator.js.map +0 -1
- package/lib/workroom/human-ingress-source-reader.d.ts +0 -29
- package/lib/workroom/human-ingress-source-reader.d.ts.map +0 -1
- package/lib/workroom/human-ingress-source-reader.js +0 -126
- package/lib/workroom/human-ingress-source-reader.js.map +0 -1
- package/lib/workroom/human-ingress.d.ts +0 -182
- package/lib/workroom/human-ingress.d.ts.map +0 -1
- package/lib/workroom/human-ingress.js +0 -526
- package/lib/workroom/human-ingress.js.map +0 -1
- package/lib/workroom/interaction-space-binding-service.d.ts +0 -57
- package/lib/workroom/interaction-space-binding-service.d.ts.map +0 -1
- package/lib/workroom/interaction-space-binding-service.js +0 -197
- package/lib/workroom/interaction-space-binding-service.js.map +0 -1
- package/lib/workroom/interaction-space-router.d.ts +0 -75
- package/lib/workroom/interaction-space-router.d.ts.map +0 -1
- package/lib/workroom/interaction-space-router.js +0 -243
- package/lib/workroom/interaction-space-router.js.map +0 -1
- package/lib/workroom/journal/activatable-journal.d.ts +0 -15
- package/lib/workroom/journal/activatable-journal.d.ts.map +0 -1
- package/lib/workroom/journal/activatable-journal.js +0 -39
- package/lib/workroom/journal/activatable-journal.js.map +0 -1
- package/lib/workroom/journal/contracts.d.ts +0 -141
- package/lib/workroom/journal/contracts.d.ts.map +0 -1
- package/lib/workroom/journal/contracts.js +0 -19
- package/lib/workroom/journal/contracts.js.map +0 -1
- package/lib/workroom/journal/database-journal.d.ts +0 -31
- package/lib/workroom/journal/database-journal.d.ts.map +0 -1
- package/lib/workroom/journal/database-journal.js +0 -118
- package/lib/workroom/journal/database-journal.js.map +0 -1
- package/lib/workroom/journal/event-codec.d.ts +0 -26
- package/lib/workroom/journal/event-codec.d.ts.map +0 -1
- package/lib/workroom/journal/event-codec.js +0 -243
- package/lib/workroom/journal/event-codec.js.map +0 -1
- package/lib/workroom/journal/event-validation.d.ts +0 -10
- package/lib/workroom/journal/event-validation.d.ts.map +0 -1
- package/lib/workroom/journal/event-validation.js +0 -671
- package/lib/workroom/journal/event-validation.js.map +0 -1
- package/lib/workroom/journal/file-journal.d.ts +0 -15
- package/lib/workroom/journal/file-journal.d.ts.map +0 -1
- package/lib/workroom/journal/file-journal.js +0 -272
- package/lib/workroom/journal/file-journal.js.map +0 -1
- package/lib/workroom/journal/index.d.ts +0 -9
- package/lib/workroom/journal/index.d.ts.map +0 -1
- package/lib/workroom/journal/index.js +0 -8
- package/lib/workroom/journal/index.js.map +0 -1
- package/lib/workroom/journal/memory-journal.d.ts +0 -27
- package/lib/workroom/journal/memory-journal.d.ts.map +0 -1
- package/lib/workroom/journal/memory-journal.js +0 -103
- package/lib/workroom/journal/memory-journal.js.map +0 -1
- package/lib/workroom/journal/payload-governance.d.ts +0 -29
- package/lib/workroom/journal/payload-governance.d.ts.map +0 -1
- package/lib/workroom/journal/payload-governance.js +0 -282
- package/lib/workroom/journal/payload-governance.js.map +0 -1
- package/lib/workroom/journal/payload-reference.d.ts +0 -9
- package/lib/workroom/journal/payload-reference.d.ts.map +0 -1
- package/lib/workroom/journal/payload-reference.js +0 -60
- package/lib/workroom/journal/payload-reference.js.map +0 -1
- package/lib/workroom/journal/stored-event-projection.d.ts +0 -6
- package/lib/workroom/journal/stored-event-projection.d.ts.map +0 -1
- package/lib/workroom/journal/stored-event-projection.js +0 -280
- package/lib/workroom/journal/stored-event-projection.js.map +0 -1
- package/lib/workroom/journal-model.d.ts +0 -40
- package/lib/workroom/journal-model.d.ts.map +0 -1
- package/lib/workroom/journal-model.js +0 -12
- package/lib/workroom/journal-model.js.map +0 -1
- package/lib/workroom/kernel-contracts.d.ts +0 -168
- package/lib/workroom/kernel-contracts.d.ts.map +0 -1
- package/lib/workroom/kernel-contracts.js +0 -2
- package/lib/workroom/kernel-contracts.js.map +0 -1
- package/lib/workroom/kernel-state.d.ts +0 -5
- package/lib/workroom/kernel-state.d.ts.map +0 -1
- package/lib/workroom/kernel-state.js +0 -885
- package/lib/workroom/kernel-state.js.map +0 -1
- package/lib/workroom/legacy-embedded-payload-migration.d.ts +0 -89
- package/lib/workroom/legacy-embedded-payload-migration.d.ts.map +0 -1
- package/lib/workroom/legacy-embedded-payload-migration.js +0 -312
- package/lib/workroom/legacy-embedded-payload-migration.js.map +0 -1
- package/lib/workroom/legacy-run-offline-migration.d.ts +0 -84
- package/lib/workroom/legacy-run-offline-migration.d.ts.map +0 -1
- package/lib/workroom/legacy-run-offline-migration.js +0 -470
- package/lib/workroom/legacy-run-offline-migration.js.map +0 -1
- package/lib/workroom/local-assignment-issuance.d.ts +0 -68
- package/lib/workroom/local-assignment-issuance.d.ts.map +0 -1
- package/lib/workroom/local-assignment-issuance.js +0 -128
- package/lib/workroom/local-assignment-issuance.js.map +0 -1
- package/lib/workroom/plan-approval-control.d.ts +0 -52
- package/lib/workroom/plan-approval-control.d.ts.map +0 -1
- package/lib/workroom/plan-approval-control.js +0 -9
- package/lib/workroom/plan-approval-control.js.map +0 -1
- package/lib/workroom/plan-revision.d.ts +0 -44
- package/lib/workroom/plan-revision.d.ts.map +0 -1
- package/lib/workroom/plan-revision.js +0 -133
- package/lib/workroom/plan-revision.js.map +0 -1
- package/lib/workroom/profile-compiler.d.ts +0 -130
- package/lib/workroom/profile-compiler.d.ts.map +0 -1
- package/lib/workroom/profile-compiler.js +0 -357
- package/lib/workroom/profile-compiler.js.map +0 -1
- package/lib/workroom/profile-registry.d.ts +0 -191
- package/lib/workroom/profile-registry.d.ts.map +0 -1
- package/lib/workroom/profile-registry.js +0 -698
- package/lib/workroom/profile-registry.js.map +0 -1
- package/lib/workroom/project-knowledge-registry.d.ts +0 -136
- package/lib/workroom/project-knowledge-registry.d.ts.map +0 -1
- package/lib/workroom/project-knowledge-registry.js +0 -429
- package/lib/workroom/project-knowledge-registry.js.map +0 -1
- package/lib/workroom/projection-outbox/contracts.d.ts +0 -195
- package/lib/workroom/projection-outbox/contracts.d.ts.map +0 -1
- package/lib/workroom/projection-outbox/contracts.js +0 -11
- package/lib/workroom/projection-outbox/contracts.js.map +0 -1
- package/lib/workroom/projection-outbox/delivery-worker.d.ts +0 -22
- package/lib/workroom/projection-outbox/delivery-worker.d.ts.map +0 -1
- package/lib/workroom/projection-outbox/delivery-worker.js +0 -96
- package/lib/workroom/projection-outbox/delivery-worker.js.map +0 -1
- package/lib/workroom/projection-outbox/file-repository.d.ts +0 -11
- package/lib/workroom/projection-outbox/file-repository.d.ts.map +0 -1
- package/lib/workroom/projection-outbox/file-repository.js +0 -89
- package/lib/workroom/projection-outbox/file-repository.js.map +0 -1
- package/lib/workroom/projection-outbox/index.d.ts +0 -10
- package/lib/workroom/projection-outbox/index.d.ts.map +0 -1
- package/lib/workroom/projection-outbox/index.js +0 -8
- package/lib/workroom/projection-outbox/index.js.map +0 -1
- package/lib/workroom/projection-outbox/memory-repository.d.ts +0 -11
- package/lib/workroom/projection-outbox/memory-repository.d.ts.map +0 -1
- package/lib/workroom/projection-outbox/memory-repository.js +0 -40
- package/lib/workroom/projection-outbox/memory-repository.js.map +0 -1
- package/lib/workroom/projection-outbox/projector.d.ts +0 -36
- package/lib/workroom/projection-outbox/projector.d.ts.map +0 -1
- package/lib/workroom/projection-outbox/projector.js +0 -517
- package/lib/workroom/projection-outbox/projector.js.map +0 -1
- package/lib/workroom/projection-outbox/repository-state.d.ts +0 -17
- package/lib/workroom/projection-outbox/repository-state.d.ts.map +0 -1
- package/lib/workroom/projection-outbox/repository-state.js +0 -343
- package/lib/workroom/projection-outbox/repository-state.js.map +0 -1
- package/lib/workroom/projection-outbox/tracer.d.ts +0 -19
- package/lib/workroom/projection-outbox/tracer.d.ts.map +0 -1
- package/lib/workroom/projection-outbox/tracer.js +0 -201
- package/lib/workroom/projection-outbox/tracer.js.map +0 -1
- package/lib/workroom/remote-assignment-dispatch-command.d.ts +0 -31
- package/lib/workroom/remote-assignment-dispatch-command.d.ts.map +0 -1
- package/lib/workroom/remote-assignment-dispatch-command.js +0 -56
- package/lib/workroom/remote-assignment-dispatch-command.js.map +0 -1
- package/lib/workroom/remote-assignment-issuance.d.ts +0 -88
- package/lib/workroom/remote-assignment-issuance.d.ts.map +0 -1
- package/lib/workroom/remote-assignment-issuance.js +0 -201
- package/lib/workroom/remote-assignment-issuance.js.map +0 -1
- package/lib/workroom/remote-callback-application.d.ts +0 -115
- package/lib/workroom/remote-callback-application.d.ts.map +0 -1
- package/lib/workroom/remote-callback-application.js +0 -570
- package/lib/workroom/remote-callback-application.js.map +0 -1
- package/lib/workroom/remote-callback-gateway.d.ts +0 -60
- package/lib/workroom/remote-callback-gateway.d.ts.map +0 -1
- package/lib/workroom/remote-callback-gateway.js +0 -173
- package/lib/workroom/remote-callback-gateway.js.map +0 -1
- package/lib/workroom/remote-callback-inbox.d.ts +0 -278
- package/lib/workroom/remote-callback-inbox.d.ts.map +0 -1
- package/lib/workroom/remote-callback-inbox.js +0 -1088
- package/lib/workroom/remote-callback-inbox.js.map +0 -1
- package/lib/workroom/remote-callback-reconciliation-worker.d.ts +0 -60
- package/lib/workroom/remote-callback-reconciliation-worker.d.ts.map +0 -1
- package/lib/workroom/remote-callback-reconciliation-worker.js +0 -197
- package/lib/workroom/remote-callback-reconciliation-worker.js.map +0 -1
- package/lib/workroom/remote-dispatch-admission.d.ts +0 -45
- package/lib/workroom/remote-dispatch-admission.d.ts.map +0 -1
- package/lib/workroom/remote-dispatch-admission.js +0 -187
- package/lib/workroom/remote-dispatch-admission.js.map +0 -1
- package/lib/workroom/remote-dispatch-outbox.d.ts +0 -204
- package/lib/workroom/remote-dispatch-outbox.d.ts.map +0 -1
- package/lib/workroom/remote-dispatch-outbox.js +0 -768
- package/lib/workroom/remote-dispatch-outbox.js.map +0 -1
- package/lib/workroom/remote-dispatch-scheduler.d.ts +0 -36
- package/lib/workroom/remote-dispatch-scheduler.d.ts.map +0 -1
- package/lib/workroom/remote-dispatch-scheduler.js +0 -133
- package/lib/workroom/remote-dispatch-scheduler.js.map +0 -1
- package/lib/workroom/remote-dispatch-worker.d.ts +0 -22
- package/lib/workroom/remote-dispatch-worker.d.ts.map +0 -1
- package/lib/workroom/remote-dispatch-worker.js +0 -124
- package/lib/workroom/remote-dispatch-worker.js.map +0 -1
- package/lib/workroom/remote-dispatch.d.ts +0 -79
- package/lib/workroom/remote-dispatch.d.ts.map +0 -1
- package/lib/workroom/remote-dispatch.js +0 -220
- package/lib/workroom/remote-dispatch.js.map +0 -1
- package/lib/workroom/remote-executor.d.ts +0 -15
- package/lib/workroom/remote-executor.d.ts.map +0 -1
- package/lib/workroom/remote-executor.js +0 -21
- package/lib/workroom/remote-executor.js.map +0 -1
- package/lib/workroom/role-capability-snapshot.d.ts +0 -88
- package/lib/workroom/role-capability-snapshot.d.ts.map +0 -1
- package/lib/workroom/role-capability-snapshot.js +0 -456
- package/lib/workroom/role-capability-snapshot.js.map +0 -1
- package/lib/workroom/runtime.d.ts +0 -142
- package/lib/workroom/runtime.d.ts.map +0 -1
- package/lib/workroom/runtime.js +0 -543
- package/lib/workroom/runtime.js.map +0 -1
- package/lib/workroom/scheduler-priority-control.d.ts +0 -35
- package/lib/workroom/scheduler-priority-control.d.ts.map +0 -1
- package/lib/workroom/scheduler-priority-control.js +0 -9
- package/lib/workroom/scheduler-priority-control.js.map +0 -1
- package/lib/workroom/software-delivery-plan.d.ts +0 -32
- package/lib/workroom/software-delivery-plan.d.ts.map +0 -1
- package/lib/workroom/software-delivery-plan.js +0 -60
- package/lib/workroom/software-delivery-plan.js.map +0 -1
- package/lib/workroom/validate-catalog.d.ts +0 -2
- package/lib/workroom/validate-catalog.d.ts.map +0 -1
- package/lib/workroom/validate-catalog.js +0 -230
- package/lib/workroom/validate-catalog.js.map +0 -1
- package/lib/workroom/workflow-plan-builder.d.ts +0 -88
- package/lib/workroom/workflow-plan-builder.d.ts.map +0 -1
- package/lib/workroom/workflow-plan-builder.js +0 -232
- package/lib/workroom/workflow-plan-builder.js.map +0 -1
- package/lib/workroom/workroom-assignment-knowledge-context.d.ts +0 -102
- package/lib/workroom/workroom-assignment-knowledge-context.d.ts.map +0 -1
- package/lib/workroom/workroom-assignment-knowledge-context.js +0 -127
- package/lib/workroom/workroom-assignment-knowledge-context.js.map +0 -1
- package/lib/workroom/workroom-kernel.d.ts +0 -157
- package/lib/workroom/workroom-kernel.d.ts.map +0 -1
- package/lib/workroom/workroom-kernel.js +0 -1526
- package/lib/workroom/workroom-kernel.js.map +0 -1
- package/lib/workroom/workroom-preemption.d.ts +0 -65
- package/lib/workroom/workroom-preemption.d.ts.map +0 -1
- package/lib/workroom/workroom-preemption.js +0 -213
- package/lib/workroom/workroom-preemption.js.map +0 -1
- package/lib/workroom/workroom-run-control.d.ts +0 -69
- package/lib/workroom/workroom-run-control.d.ts.map +0 -1
- package/lib/workroom/workroom-run-control.js +0 -144
- package/lib/workroom/workroom-run-control.js.map +0 -1
- package/lib/workroom/workroom-scheduler-application.d.ts +0 -43
- package/lib/workroom/workroom-scheduler-application.d.ts.map +0 -1
- package/lib/workroom/workroom-scheduler-application.js +0 -71
- package/lib/workroom/workroom-scheduler-application.js.map +0 -1
- package/lib/workroom/workroom-scheduler.d.ts +0 -135
- package/lib/workroom/workroom-scheduler.d.ts.map +0 -1
- package/lib/workroom/workroom-scheduler.js +0 -660
- package/lib/workroom/workroom-scheduler.js.map +0 -1
- package/lib/workroom/workroom-task-report-store.d.ts +0 -131
- package/lib/workroom/workroom-task-report-store.d.ts.map +0 -1
- package/lib/workroom/workroom-task-report-store.js +0 -528
- package/lib/workroom/workroom-task-report-store.js.map +0 -1
|
@@ -1,1356 +0,0 @@
|
|
|
1
|
-
import { createHash } from 'node:crypto';
|
|
2
|
-
import { classifyDataDescriptor, } from '../data-governance/data-governance.js';
|
|
3
|
-
import { materializeDisclosureManifest, } from '../data-governance/disclosure-manifest.js';
|
|
4
|
-
import { EncryptedFilePayloadVault, PayloadVaultCryptographyUnavailableError, } from '../data-governance/encrypted-file-payload-vault.js';
|
|
5
|
-
import { FileDataGovernanceAuthorityRepository, DataGovernanceAuthorityUnauthorizedError, createGovernedSourceAuthority, } from '../data-governance/governance-authority-repository.js';
|
|
6
|
-
import { FileGovernedPayloadWriteSagaRepository, GovernedPayloadPublicationReconciler, GovernedPayloadWritePurgeConsumer, createGovernedPayloadWriteIntentId, } from '../data-governance/governed-payload-write-saga.js';
|
|
7
|
-
import { join } from 'node:path';
|
|
8
|
-
import { createToken } from '@zhin.js/plugin-runtime';
|
|
9
|
-
import { WorkroomPlanningClarificationError, } from '../workroom/human-ingress-orchestrator.js';
|
|
10
|
-
import { canonicalWorkroomJson, deepFreezeWorkroomValue as deepFreeze, digestCanonicalWorkroomValue as digest, } from '../workroom/canonical-value.js';
|
|
11
|
-
import { WorkroomGovernedPayloadHeaderCasLostError, WorkroomGovernedPayloadPublicationAbandonedError, } from '../workroom/workroom-task-report-store.js';
|
|
12
|
-
import { createWorkroomJournalPayloadObjectId, } from '../workroom/journal/index.js';
|
|
13
|
-
import { createWorkroomDynamicPlanningGenerationSnapshot, createWorkroomPlanningDisclosure, createWorkroomPlanningDisclosureSourceBinding, } from './workroom-dynamic-planning-provider.js';
|
|
14
|
-
import { createWorkroomGovernedAcceptanceProjection, } from './workroom-acceptance-provider-composition.js';
|
|
15
|
-
export const workroomDisclosureManifestAuthorityToken = createToken('zhin.agent.workroom-disclosure-manifest-authority', 'Authority-owned exact sink-rule Disclosure Manifest materializer');
|
|
16
|
-
/** Trusted Root composition helper; raw repository/Vault are intentionally not returned. */
|
|
17
|
-
export function createFileWorkroomDataGovernanceRuntime(options) {
|
|
18
|
-
const repository = new FileDataGovernanceAuthorityRepository(join(options.stateRoot, 'workroom-data-governance-authority'), options.governance);
|
|
19
|
-
const cryptography = options.cryptography ?? Object.freeze({
|
|
20
|
-
wrap: async () => null,
|
|
21
|
-
unwrap: async () => null,
|
|
22
|
-
});
|
|
23
|
-
const vault = options.vault ?? new EncryptedFilePayloadVault({
|
|
24
|
-
directory: join(options.stateRoot, 'workroom-payload-vault'),
|
|
25
|
-
generation: options.generation,
|
|
26
|
-
cryptography,
|
|
27
|
-
});
|
|
28
|
-
const payloadWrites = new FileGovernedPayloadWriteSagaRepository(join(options.stateRoot, 'workroom-payload-write-sagas'));
|
|
29
|
-
const payloadPurge = options.payloadPurge
|
|
30
|
-
? new GovernedPayloadWritePurgeConsumer({
|
|
31
|
-
generation: options.generation,
|
|
32
|
-
repository: payloadWrites,
|
|
33
|
-
provider: options.payloadPurge,
|
|
34
|
-
})
|
|
35
|
-
: undefined;
|
|
36
|
-
return new WorkroomDataGovernanceRuntime({
|
|
37
|
-
generation: options.generation,
|
|
38
|
-
repository,
|
|
39
|
-
vault,
|
|
40
|
-
payloadWrites,
|
|
41
|
-
...(payloadPurge ? { payloadPurge } : {}),
|
|
42
|
-
...(options.payloadPublicationVerifier
|
|
43
|
-
? { payloadPublicationVerifier: options.payloadPublicationVerifier }
|
|
44
|
-
: {}),
|
|
45
|
-
...(options.payloadLifecycleIndex ? { payloadLifecycleIndex: options.payloadLifecycleIndex } : {}),
|
|
46
|
-
signal: options.signal,
|
|
47
|
-
...(options.evidenceSources ? { evidenceSources: options.evidenceSources } : {}),
|
|
48
|
-
...(options.acceptanceProjectionSources
|
|
49
|
-
? { acceptanceProjectionSources: options.acceptanceProjectionSources }
|
|
50
|
-
: {}),
|
|
51
|
-
...(options.transforms ? { transforms: options.transforms } : {}),
|
|
52
|
-
...(options.now ? { now: options.now } : {}),
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
export const workroomAcceptanceProjectionSourceAuthorityToken = createToken('zhin.agent.workroom-acceptance-projection-source-authority', 'Trusted exact Profile-policy source resolver for governed Acceptance projection payloads');
|
|
56
|
-
/**
|
|
57
|
-
* One immutable Root-generation adapter over persistent policy/source facts.
|
|
58
|
-
* It never falls back to config or request metadata authority.
|
|
59
|
-
*/
|
|
60
|
-
export class WorkroomDataGovernanceRuntime {
|
|
61
|
-
options;
|
|
62
|
-
generation;
|
|
63
|
-
planningDisclosure;
|
|
64
|
-
disclosureManifest;
|
|
65
|
-
assignmentDisclosure;
|
|
66
|
-
evidencePayloads;
|
|
67
|
-
taskReportPayloads;
|
|
68
|
-
acceptanceProjectionPayloads;
|
|
69
|
-
journalPayloads;
|
|
70
|
-
#now;
|
|
71
|
-
constructor(options) {
|
|
72
|
-
this.options = options;
|
|
73
|
-
this.generation = positive(options.generation, 'generation');
|
|
74
|
-
this.#now = options.now ?? Date.now;
|
|
75
|
-
this.planningDisclosure = Object.freeze({
|
|
76
|
-
materialize: async (request, signal) => await this.#materializePlanning(request, signal),
|
|
77
|
-
});
|
|
78
|
-
this.disclosureManifest = Object.freeze({
|
|
79
|
-
materialize: async (request, signal) => await this.#materializeRegistered(request, signal),
|
|
80
|
-
revalidate: async (input, signal) => await this.#revalidateRegistered(input, signal),
|
|
81
|
-
prepareProjection: async (input, signal) => await this.#prepareProjection(input, signal),
|
|
82
|
-
});
|
|
83
|
-
this.assignmentDisclosure = Object.freeze({
|
|
84
|
-
materialize: async (request) => await this.#materializeAssignment(request),
|
|
85
|
-
});
|
|
86
|
-
this.evidencePayloads = Object.freeze({
|
|
87
|
-
write: async (input, signal) => await this.#writeEvidence(input, signal),
|
|
88
|
-
});
|
|
89
|
-
this.taskReportPayloads = Object.freeze({
|
|
90
|
-
write: async (input, signal) => await this.#writeTaskReport(input, signal),
|
|
91
|
-
read: async (input, signal) => await this.#readTaskReport(input, signal),
|
|
92
|
-
});
|
|
93
|
-
this.acceptanceProjectionPayloads = Object.freeze({
|
|
94
|
-
write: async (input, signal) => await this.#writeAcceptanceProjection(input, signal),
|
|
95
|
-
read: async (input, signal) => await this.#readAcceptanceProjection(input, signal),
|
|
96
|
-
});
|
|
97
|
-
this.journalPayloads = Object.freeze({
|
|
98
|
-
write: async (input) => await this.#writeJournalPayload(input),
|
|
99
|
-
read: async (input) => await this.#readJournalPayload(input),
|
|
100
|
-
publish: async (input) => await this.#publishJournalPayloads(input),
|
|
101
|
-
prepare: async (input) => await this.#prepareJournalPayloads(input),
|
|
102
|
-
abandon: async (input) => await this.#abandonJournalPayloads(input),
|
|
103
|
-
reconcile: async (input) => await this.#reconcileJournalPayloads(input),
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
/** Trusted generation handoff hook; no raw Vault or receipt body is returned. */
|
|
107
|
-
async reconcilePayloadPurges(projectIds, signal) {
|
|
108
|
-
if (!this.options.payloadPurge || !this.options.payloadWrites)
|
|
109
|
-
return;
|
|
110
|
-
const publications = new GovernedPayloadPublicationReconciler({
|
|
111
|
-
repository: this.options.payloadWrites,
|
|
112
|
-
purge: this.options.payloadPurge,
|
|
113
|
-
...(this.options.payloadPublicationVerifier
|
|
114
|
-
? { verifier: this.options.payloadPublicationVerifier }
|
|
115
|
-
: {}),
|
|
116
|
-
});
|
|
117
|
-
for (const projectId of [...new Set(projectIds)].sort()) {
|
|
118
|
-
await publications.drainProject(projectId, signal);
|
|
119
|
-
await this.options.payloadPurge.drainProject(projectId, signal);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
async #writeJournalPayload(input) {
|
|
123
|
-
const operationId = `workroom-journal-write:${input.eventId}:${digest(input.fieldPath)}`;
|
|
124
|
-
await this.#requirePayloadInfrastructure(this.options.signal, {
|
|
125
|
-
operationId,
|
|
126
|
-
projectId: input.projectId,
|
|
127
|
-
});
|
|
128
|
-
const payload = new TextEncoder().encode(canonicalWorkroomJson(input.value));
|
|
129
|
-
if (hashBytes(payload) !== input.contentHash) {
|
|
130
|
-
throw new Error('Governed Workroom Journal payload content hash drift');
|
|
131
|
-
}
|
|
132
|
-
const source = deepFreeze({
|
|
133
|
-
kind: 'command',
|
|
134
|
-
ref: input.source.ref,
|
|
135
|
-
digest: input.source.digest,
|
|
136
|
-
bindingDigest: input.source.bindingDigest,
|
|
137
|
-
verification: 'verified',
|
|
138
|
-
});
|
|
139
|
-
return await this.#writeDerivedPayload({
|
|
140
|
-
operationId,
|
|
141
|
-
projectId: input.projectId,
|
|
142
|
-
kind: 'journal',
|
|
143
|
-
objectId: createWorkroomJournalPayloadObjectId(input),
|
|
144
|
-
payload,
|
|
145
|
-
source,
|
|
146
|
-
signal: this.options.signal,
|
|
147
|
-
createdAt: input.occurredAt,
|
|
148
|
-
publicationScope: input.runId,
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
async #publishJournalPayloads(input) {
|
|
152
|
-
if (!this.options.payloadWrites)
|
|
153
|
-
return;
|
|
154
|
-
for (const receipt of input.receipts) {
|
|
155
|
-
const intentId = journalIntentId(input.projectId, input.runId, receipt);
|
|
156
|
-
const pending = await this.options.payloadWrites.read(intentId);
|
|
157
|
-
if (!pending)
|
|
158
|
-
throw new Error('Governed Workroom Journal payload intent is unavailable');
|
|
159
|
-
if (pending.state === 'published')
|
|
160
|
-
continue;
|
|
161
|
-
if (pending.state !== 'authority_indexed') {
|
|
162
|
-
throw new Error(`Governed Workroom Journal payload cannot be published from ${pending.state}`);
|
|
163
|
-
}
|
|
164
|
-
await this.options.payloadWrites.publish(intentId, input.publicationDigest);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
async #prepareJournalPayloads(input) {
|
|
168
|
-
if (!this.options.payloadWrites)
|
|
169
|
-
return;
|
|
170
|
-
for (const receipt of input.receipts) {
|
|
171
|
-
const pending = await this.options.payloadWrites.read(journalIntentId(input.projectId, input.runId, receipt));
|
|
172
|
-
if (!pending || (pending.state !== 'authority_indexed' && pending.state !== 'published')) {
|
|
173
|
-
throw new Error('Governed Workroom Journal payload is not ready for header publication');
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
async #abandonJournalPayloads(input) {
|
|
178
|
-
if (!this.options.payloadWrites)
|
|
179
|
-
return;
|
|
180
|
-
for (const receipt of input.receipts) {
|
|
181
|
-
const intentId = journalIntentId(input.projectId, input.runId, receipt);
|
|
182
|
-
const pending = await this.options.payloadWrites.read(intentId);
|
|
183
|
-
if (!pending || pending.state === 'published' || pending.state === 'purge_required')
|
|
184
|
-
continue;
|
|
185
|
-
await this.options.payloadWrites.requirePurge(intentId, input.reason);
|
|
186
|
-
await this.#purgeIntent(intentId);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
async #reconcileJournalPayloads(input) {
|
|
190
|
-
if (!this.options.payloadWrites)
|
|
191
|
-
return;
|
|
192
|
-
for (const receipt of input.receipts) {
|
|
193
|
-
const intentId = journalIntentId(input.projectId, input.runId, receipt);
|
|
194
|
-
const pending = await this.options.payloadWrites.read(intentId);
|
|
195
|
-
if (!pending)
|
|
196
|
-
throw new Error('Governed Workroom Journal payload intent is unavailable');
|
|
197
|
-
if (pending.state === 'published')
|
|
198
|
-
continue;
|
|
199
|
-
if (pending.state !== 'authority_indexed') {
|
|
200
|
-
throw new Error(`Governed Workroom Journal committed payload is ${pending.state}`);
|
|
201
|
-
}
|
|
202
|
-
await this.options.payloadWrites.publish(intentId, input.publicationDigest);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
async #readJournalPayload(input) {
|
|
206
|
-
await this.#requirePayloadInfrastructure(this.options.signal, {
|
|
207
|
-
operationId: `workroom-journal-read:${input.eventId}:${digest(input.fieldPath)}`,
|
|
208
|
-
projectId: input.projectId,
|
|
209
|
-
});
|
|
210
|
-
const currentAuthority = await this.options.repository.readProject(input.projectId);
|
|
211
|
-
const source = await this.options.repository.readSource(input.projectId, input.receipt.descriptor.objectId, input.receipt.descriptor.payloadHash);
|
|
212
|
-
const authority = source && currentAuthority
|
|
213
|
-
? source.projectAuthorityDigest === currentAuthority.digest
|
|
214
|
-
? currentAuthority
|
|
215
|
-
: await this.options.repository.readProjectRevision?.(input.projectId, source.projectAuthorityRevision)
|
|
216
|
-
: undefined;
|
|
217
|
-
const sinkRuleId = 'workroom-journal:kernel-replay';
|
|
218
|
-
const sink = authority?.sinks[sinkRuleId];
|
|
219
|
-
const destination = sink && authority?.policy.destinations[sink.destinationId];
|
|
220
|
-
if (!source || !authority || source.projectAuthorityDigest !== authority.digest
|
|
221
|
-
|| source.projectAuthorityRevision !== authority.revision || !sink?.fixedPrincipalId
|
|
222
|
-
|| !destination) {
|
|
223
|
-
throw new Error('Workroom Journal replay disclosure authority is unavailable');
|
|
224
|
-
}
|
|
225
|
-
const manifest = await this.#materialize({
|
|
226
|
-
operationId: `workroom-journal-read:${input.eventId}:${digest(input.fieldPath)}`,
|
|
227
|
-
authority,
|
|
228
|
-
source,
|
|
229
|
-
context: {
|
|
230
|
-
channel: sink.channel,
|
|
231
|
-
purpose: sink.purpose,
|
|
232
|
-
requestedMode: sink.requestedMode,
|
|
233
|
-
policyRevision: authority.policy.revision,
|
|
234
|
-
principal: {
|
|
235
|
-
principalId: sink.fixedPrincipalId,
|
|
236
|
-
tenantId: authority.tenantId,
|
|
237
|
-
projectId: authority.projectId,
|
|
238
|
-
...sink.principal,
|
|
239
|
-
},
|
|
240
|
-
destination,
|
|
241
|
-
recipients: structuredClone(sink.recipients),
|
|
242
|
-
},
|
|
243
|
-
signal: this.options.signal,
|
|
244
|
-
});
|
|
245
|
-
if (!manifest || manifest.output.mode !== 'full'
|
|
246
|
-
|| manifest.output.handle.vaultObjectId !== input.receipt.descriptor.vaultObjectId
|
|
247
|
-
|| manifest.output.handle.descriptorDigest !== input.receipt.descriptor.descriptorDigest
|
|
248
|
-
|| manifest.output.handle.locationManifestDigest !== input.receipt.descriptor.locationManifestDigest
|
|
249
|
-
|| manifest.output.payloadHash !== input.contentHash) {
|
|
250
|
-
throw new Error('Workroom Journal replay disclosure is not exact/full');
|
|
251
|
-
}
|
|
252
|
-
await this.#requirePayloadInfrastructure(this.options.signal);
|
|
253
|
-
const payload = await this.options.vault.readExact({
|
|
254
|
-
handle: manifest.output.handle,
|
|
255
|
-
requestDigest: manifest.requestDigest,
|
|
256
|
-
purpose: manifest.purpose,
|
|
257
|
-
principalId: manifest.principal.principalId,
|
|
258
|
-
destinationId: manifest.destination.id,
|
|
259
|
-
}, this.options.signal);
|
|
260
|
-
if (hashBytes(payload) !== input.contentHash) {
|
|
261
|
-
throw new Error('Governed Workroom Journal payload content hash mismatch');
|
|
262
|
-
}
|
|
263
|
-
try {
|
|
264
|
-
return JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(payload));
|
|
265
|
-
}
|
|
266
|
-
catch (error) {
|
|
267
|
-
throw new Error('Governed Workroom Journal payload is not canonical JSON', { cause: error });
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
async #writeEvidence(input, signal) {
|
|
271
|
-
const operationId = `evidence:${input.attribution.assignmentId}:${input.attribution.attempt}:${input.attribution.fence}`;
|
|
272
|
-
await this.#requirePayloadInfrastructure(signal, {
|
|
273
|
-
operationId,
|
|
274
|
-
projectId: input.attribution.projectId,
|
|
275
|
-
});
|
|
276
|
-
const payload = new TextEncoder().encode(input.content);
|
|
277
|
-
const payloadHash = hashBytes(payload);
|
|
278
|
-
const trusted = await this.options.evidenceSources?.resolve({
|
|
279
|
-
claimedSource: structuredClone(input.claimedSource),
|
|
280
|
-
attribution: structuredClone(input.attribution),
|
|
281
|
-
payloadHash,
|
|
282
|
-
}) ?? null;
|
|
283
|
-
const source = trusted
|
|
284
|
-
? validateReceiptSource(trusted)
|
|
285
|
-
: deepFreeze({
|
|
286
|
-
kind: input.claimedSource.kind,
|
|
287
|
-
ref: `quarantine:workroom-evidence:${digest({
|
|
288
|
-
attribution: input.attribution,
|
|
289
|
-
mediaType: input.mediaType,
|
|
290
|
-
payloadHash,
|
|
291
|
-
})}`,
|
|
292
|
-
digest: digest({ version: 1, disposition: 'unverified', payloadHash }),
|
|
293
|
-
bindingDigest: digest({ version: 1, attribution: input.attribution, payloadHash }),
|
|
294
|
-
verification: 'unverified',
|
|
295
|
-
});
|
|
296
|
-
return await this.#writeDerivedPayload({
|
|
297
|
-
operationId,
|
|
298
|
-
projectId: input.attribution.projectId,
|
|
299
|
-
kind: 'evidence',
|
|
300
|
-
objectId: `workroom-evidence-payload:${digest({
|
|
301
|
-
attribution: input.attribution,
|
|
302
|
-
mediaType: input.mediaType,
|
|
303
|
-
payloadHash,
|
|
304
|
-
})}`,
|
|
305
|
-
payload,
|
|
306
|
-
source,
|
|
307
|
-
signal,
|
|
308
|
-
consumer: 'evidence_header',
|
|
309
|
-
publicationScope: digest({
|
|
310
|
-
version: 1,
|
|
311
|
-
attribution: input.attribution,
|
|
312
|
-
payloadHash,
|
|
313
|
-
}),
|
|
314
|
-
publication: input.publication,
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
async #writeTaskReport(input, signal) {
|
|
318
|
-
const operationId = `task-report:${input.report.candidateHash}`;
|
|
319
|
-
await this.#requirePayloadInfrastructure(signal, {
|
|
320
|
-
operationId,
|
|
321
|
-
projectId: input.attribution.projectId,
|
|
322
|
-
});
|
|
323
|
-
const payload = new TextEncoder().encode(canonicalWorkroomJson(input.report));
|
|
324
|
-
const payloadHash = hashBytes(payload);
|
|
325
|
-
const source = deepFreeze({
|
|
326
|
-
kind: 'tool',
|
|
327
|
-
ref: `workroom-task:${encodeURIComponent(input.attribution.projectId)}:`
|
|
328
|
-
+ `${encodeURIComponent(input.attribution.runId)}:${encodeURIComponent(input.attribution.taskKey)}:`
|
|
329
|
-
+ input.attribution.taskRevision,
|
|
330
|
-
digest: digest({ version: 1, reportRef: input.report.ref, candidateHash: input.report.candidateHash }),
|
|
331
|
-
bindingDigest: digest({ version: 1, attribution: input.attribution, reportDigest: input.report.digest }),
|
|
332
|
-
verification: 'verified',
|
|
333
|
-
});
|
|
334
|
-
return await this.#writeDerivedPayload({
|
|
335
|
-
operationId,
|
|
336
|
-
projectId: input.attribution.projectId,
|
|
337
|
-
kind: 'taskReport',
|
|
338
|
-
objectId: `workroom-task-report-payload:${input.report.candidateHash}`,
|
|
339
|
-
payload,
|
|
340
|
-
source,
|
|
341
|
-
signal,
|
|
342
|
-
consumer: 'task_report_header',
|
|
343
|
-
publicationScope: input.report.ref,
|
|
344
|
-
publication: input.publication,
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
async #writeAcceptanceProjection(input, signal) {
|
|
348
|
-
const linked = linkSignals(this.options.signal, signal);
|
|
349
|
-
try {
|
|
350
|
-
linked.signal.throwIfAborted();
|
|
351
|
-
const projection = createWorkroomGovernedAcceptanceProjection(input.projection);
|
|
352
|
-
if (canonicalWorkroomJson(projection) !== canonicalWorkroomJson(input.projection)
|
|
353
|
-
|| projection.projectId !== input.projectId) {
|
|
354
|
-
throw new Error('Acceptance projection governed payload candidate drift');
|
|
355
|
-
}
|
|
356
|
-
const trusted = await this.options.acceptanceProjectionSources?.resolve({
|
|
357
|
-
projectId: input.projectId,
|
|
358
|
-
projectionDigest: projection.digest,
|
|
359
|
-
source: structuredClone(input.source),
|
|
360
|
-
}, linked.signal);
|
|
361
|
-
linked.signal.throwIfAborted();
|
|
362
|
-
if (!trusted || trusted.kind !== 'profile-policy' || trusted.verification !== 'verified'
|
|
363
|
-
|| trusted.ref !== input.source.ref || trusted.digest !== input.source.digest
|
|
364
|
-
|| trusted.issuer !== input.source.issuer || trusted.issuerDigest !== input.source.issuerDigest
|
|
365
|
-
|| trusted.revision !== input.source.revision
|
|
366
|
-
|| trusted.bindingDigest !== input.source.bindingDigest) {
|
|
367
|
-
throw new Error('Trusted Acceptance projection Profile-policy source is unavailable');
|
|
368
|
-
}
|
|
369
|
-
const { digest: _projectionDigest, ...projectionInput } = projection;
|
|
370
|
-
const payload = new TextEncoder().encode(canonicalWorkroomJson(projectionInput));
|
|
371
|
-
if (hashBytes(payload) !== projection.digest) {
|
|
372
|
-
throw new Error('Acceptance projection canonical payload hash drift');
|
|
373
|
-
}
|
|
374
|
-
const receipt = await this.#writeDerivedPayload({
|
|
375
|
-
operationId: input.operationId,
|
|
376
|
-
projectId: input.projectId,
|
|
377
|
-
kind: 'acceptanceProjection',
|
|
378
|
-
objectId: `workroom-acceptance-projection:${projection.digest.slice('sha256:'.length)}`,
|
|
379
|
-
payload,
|
|
380
|
-
source: deepFreeze(structuredClone(trusted)),
|
|
381
|
-
signal: linked.signal,
|
|
382
|
-
});
|
|
383
|
-
return deepFreeze({
|
|
384
|
-
vaultObjectId: receipt.descriptor.vaultObjectId,
|
|
385
|
-
objectId: receipt.descriptor.objectId,
|
|
386
|
-
payloadHash: receipt.descriptor.payloadHash,
|
|
387
|
-
descriptorDigest: receipt.descriptor.descriptorDigest,
|
|
388
|
-
locationManifestDigest: receipt.descriptor.locationManifestDigest,
|
|
389
|
-
source: receipt.source,
|
|
390
|
-
sourceBindingDigest: receipt.source.bindingDigest,
|
|
391
|
-
bytes: receipt.descriptor.bytes,
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
finally {
|
|
395
|
-
linked.dispose();
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
async #readAcceptanceProjection(input, signal) {
|
|
399
|
-
const linked = linkSignals(this.options.signal, signal);
|
|
400
|
-
try {
|
|
401
|
-
linked.signal.throwIfAborted();
|
|
402
|
-
if (input.purpose !== 'acceptance-policy') {
|
|
403
|
-
throw new Error('Acceptance projection disclosure purpose is invalid');
|
|
404
|
-
}
|
|
405
|
-
assertAcceptanceProjectionReceipt(input.receipt);
|
|
406
|
-
const trusted = await this.options.acceptanceProjectionSources?.resolve({
|
|
407
|
-
projectId: input.projectId,
|
|
408
|
-
projectionDigest: input.receipt.payloadHash,
|
|
409
|
-
source: {
|
|
410
|
-
kind: input.receipt.source.kind,
|
|
411
|
-
ref: input.receipt.source.ref,
|
|
412
|
-
digest: input.receipt.source.digest,
|
|
413
|
-
issuer: input.receipt.source.issuer,
|
|
414
|
-
issuerDigest: input.receipt.source.issuerDigest,
|
|
415
|
-
revision: input.receipt.source.revision,
|
|
416
|
-
bindingDigest: input.receipt.source.bindingDigest,
|
|
417
|
-
},
|
|
418
|
-
}, linked.signal);
|
|
419
|
-
linked.signal.throwIfAborted();
|
|
420
|
-
if (!trusted || canonicalWorkroomJson(trusted) !== canonicalWorkroomJson(input.receipt.source)) {
|
|
421
|
-
return undefined;
|
|
422
|
-
}
|
|
423
|
-
const sourceAuthority = await this.options.repository.readSource(input.projectId, input.receipt.objectId, input.receipt.payloadHash);
|
|
424
|
-
if (!sourceAuthority
|
|
425
|
-
|| sourceAuthority.sourceBindingDigest !== input.receipt.source.bindingDigest
|
|
426
|
-
|| sourceAuthority.handle.vaultObjectId !== input.receipt.vaultObjectId
|
|
427
|
-
|| sourceAuthority.handle.descriptorDigest !== input.receipt.descriptorDigest
|
|
428
|
-
|| sourceAuthority.handle.locationManifestDigest !== input.receipt.locationManifestDigest) {
|
|
429
|
-
return undefined;
|
|
430
|
-
}
|
|
431
|
-
const currentAuthority = await this.options.repository.readProject(input.projectId);
|
|
432
|
-
const authority = currentAuthority?.revision === sourceAuthority.projectAuthorityRevision
|
|
433
|
-
&& currentAuthority.digest === sourceAuthority.projectAuthorityDigest
|
|
434
|
-
? currentAuthority
|
|
435
|
-
: await this.options.repository.readProjectRevision?.(input.projectId, sourceAuthority.projectAuthorityRevision);
|
|
436
|
-
const sinkRuleId = 'acceptance-projection:acceptance-policy';
|
|
437
|
-
const sink = authority?.sinks[sinkRuleId];
|
|
438
|
-
const destination = sink && authority?.policy.destinations[sink.destinationId];
|
|
439
|
-
if (!authority || authority.digest !== sourceAuthority.projectAuthorityDigest
|
|
440
|
-
|| !sink?.fixedPrincipalId || !destination)
|
|
441
|
-
return undefined;
|
|
442
|
-
const manifest = await this.#materialize({
|
|
443
|
-
operationId: input.operationId,
|
|
444
|
-
authority,
|
|
445
|
-
source: sourceAuthority,
|
|
446
|
-
context: {
|
|
447
|
-
channel: sink.channel,
|
|
448
|
-
purpose: sink.purpose,
|
|
449
|
-
requestedMode: sink.requestedMode,
|
|
450
|
-
policyRevision: authority.policy.revision,
|
|
451
|
-
principal: {
|
|
452
|
-
principalId: sink.fixedPrincipalId,
|
|
453
|
-
tenantId: authority.tenantId,
|
|
454
|
-
projectId: authority.projectId,
|
|
455
|
-
...sink.principal,
|
|
456
|
-
},
|
|
457
|
-
destination,
|
|
458
|
-
recipients: structuredClone(sink.recipients),
|
|
459
|
-
},
|
|
460
|
-
signal: linked.signal,
|
|
461
|
-
});
|
|
462
|
-
if (manifest.output.mode !== 'full'
|
|
463
|
-
|| manifest.output.handle.vaultObjectId !== input.receipt.vaultObjectId
|
|
464
|
-
|| manifest.output.handle.descriptorDigest !== input.receipt.descriptorDigest
|
|
465
|
-
|| manifest.output.handle.locationManifestDigest !== input.receipt.locationManifestDigest
|
|
466
|
-
|| manifest.output.payloadHash !== input.receipt.payloadHash)
|
|
467
|
-
return undefined;
|
|
468
|
-
await this.#requirePayloadInfrastructure(linked.signal);
|
|
469
|
-
const payload = await this.options.vault.readExact({
|
|
470
|
-
handle: manifest.output.handle,
|
|
471
|
-
requestDigest: manifest.requestDigest,
|
|
472
|
-
purpose: manifest.purpose,
|
|
473
|
-
principalId: manifest.principal.principalId,
|
|
474
|
-
destinationId: manifest.destination.id,
|
|
475
|
-
}, linked.signal);
|
|
476
|
-
let candidate;
|
|
477
|
-
try {
|
|
478
|
-
candidate = JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(payload));
|
|
479
|
-
}
|
|
480
|
-
catch (error) {
|
|
481
|
-
throw new Error('Acceptance projection governed payload is malformed', { cause: error });
|
|
482
|
-
}
|
|
483
|
-
if (!isAcceptanceProjectionInput(candidate)) {
|
|
484
|
-
throw new Error('Acceptance projection governed payload is malformed');
|
|
485
|
-
}
|
|
486
|
-
const projection = createWorkroomGovernedAcceptanceProjection(candidate);
|
|
487
|
-
if (projection.digest !== input.receipt.payloadHash || projection.projectId !== input.projectId) {
|
|
488
|
-
throw new Error('Acceptance projection governed payload binding drift');
|
|
489
|
-
}
|
|
490
|
-
return projection;
|
|
491
|
-
}
|
|
492
|
-
finally {
|
|
493
|
-
linked.dispose();
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
async #writeDerivedPayload(input) {
|
|
497
|
-
const linked = linkSignals(this.options.signal, input.signal);
|
|
498
|
-
let intentId;
|
|
499
|
-
let authorityIndexed = false;
|
|
500
|
-
let publicationStarted = false;
|
|
501
|
-
let publicationConfirmed = false;
|
|
502
|
-
try {
|
|
503
|
-
const infrastructure = await this.#requirePayloadInfrastructure(linked.signal);
|
|
504
|
-
const authority = await this.options.repository.readProject(input.projectId);
|
|
505
|
-
if (!authority)
|
|
506
|
-
throw new Error('Data Governance Project authority is unavailable');
|
|
507
|
-
const rule = authority.derivedPayloads[input.kind];
|
|
508
|
-
if (!rule)
|
|
509
|
-
throw new Error(`Governed ${input.kind} payload authority is unavailable`);
|
|
510
|
-
const payloadHash = hashBytes(input.payload);
|
|
511
|
-
const existingSource = await this.options.repository.readSource(input.projectId, input.objectId, payloadHash);
|
|
512
|
-
if (existingSource && !input.publication
|
|
513
|
-
&& existingSource.sourceBindingDigest === input.source.bindingDigest
|
|
514
|
-
&& existingSource.projectAuthorityRevision === authority.revision
|
|
515
|
-
&& existingSource.projectAuthorityDigest === authority.digest
|
|
516
|
-
&& existingSource.descriptor.objectId === input.objectId
|
|
517
|
-
&& existingSource.descriptor.payloadHash === payloadHash
|
|
518
|
-
&& existingSource.handle.objectId === input.objectId
|
|
519
|
-
&& existingSource.handle.payloadHash === payloadHash
|
|
520
|
-
&& existingSource.handle.descriptorDigest === digest(existingSource.descriptor)) {
|
|
521
|
-
await infrastructure.payloadLifecycleIndex.register({
|
|
522
|
-
operationId: input.operationId,
|
|
523
|
-
handle: existingSource.handle,
|
|
524
|
-
}, linked.signal);
|
|
525
|
-
return deepFreeze({
|
|
526
|
-
descriptor: {
|
|
527
|
-
vaultObjectId: existingSource.handle.vaultObjectId,
|
|
528
|
-
objectId: existingSource.handle.objectId,
|
|
529
|
-
payloadHash: existingSource.handle.payloadHash,
|
|
530
|
-
descriptorDigest: existingSource.handle.descriptorDigest,
|
|
531
|
-
locationManifestDigest: existingSource.handle.locationManifestDigest,
|
|
532
|
-
bytes: input.payload.byteLength,
|
|
533
|
-
},
|
|
534
|
-
source: structuredClone(input.source),
|
|
535
|
-
});
|
|
536
|
-
}
|
|
537
|
-
const createdAt = input.createdAt ?? this.#now();
|
|
538
|
-
const classified = classifyDataDescriptor({
|
|
539
|
-
objectId: input.objectId,
|
|
540
|
-
payloadHash,
|
|
541
|
-
tenantId: authority.tenantId,
|
|
542
|
-
projectId: authority.projectId,
|
|
543
|
-
kind: input.kind === 'evidence'
|
|
544
|
-
? 'evidence'
|
|
545
|
-
: input.kind === 'taskReport'
|
|
546
|
-
? 'task_report'
|
|
547
|
-
: input.kind === 'acceptanceProjection' || input.kind === 'journal'
|
|
548
|
-
? 'workroom_fact'
|
|
549
|
-
: 'projection_payload',
|
|
550
|
-
proposedConfidentiality: rule.proposedConfidentiality,
|
|
551
|
-
categories: rule.categories,
|
|
552
|
-
allowedPurposes: rule.allowedPurposes,
|
|
553
|
-
allowedRegions: rule.allowedRegions,
|
|
554
|
-
subjectRefs: [],
|
|
555
|
-
retention: {
|
|
556
|
-
class: rule.retentionClass,
|
|
557
|
-
minimumRetainUntil: safeAdd(createdAt, rule.minimumRetentionMs),
|
|
558
|
-
deleteAfter: safeAdd(createdAt, rule.maximumRetentionMs),
|
|
559
|
-
},
|
|
560
|
-
lineage: { sourceObjectIds: [input.source.ref] },
|
|
561
|
-
}, authority.categoryRegistry);
|
|
562
|
-
if (classified.status === 'quarantined') {
|
|
563
|
-
await this.#block(input.operationId, input.projectId, 'source_classification_quarantined');
|
|
564
|
-
throw new Error(`Governed ${input.kind} payload classification is quarantined`);
|
|
565
|
-
}
|
|
566
|
-
const descriptor = classified.descriptor;
|
|
567
|
-
const descriptorDigest = digest(descriptor);
|
|
568
|
-
let intent = await infrastructure.payloadWrites.begin({
|
|
569
|
-
operationId: input.operationId,
|
|
570
|
-
projectId: input.projectId,
|
|
571
|
-
objectId: descriptor.objectId,
|
|
572
|
-
payloadHash: descriptor.payloadHash,
|
|
573
|
-
descriptorDigest,
|
|
574
|
-
sourceBindingDigest: input.source.bindingDigest,
|
|
575
|
-
consumer: input.consumer ?? (input.kind === 'journal' ? 'journal_header' : 'authority_source'),
|
|
576
|
-
...(input.publicationScope ? { publicationScope: input.publicationScope } : {}),
|
|
577
|
-
});
|
|
578
|
-
intentId = intent.intentId;
|
|
579
|
-
if (intent.state === 'purge_required') {
|
|
580
|
-
throw new Error('Governed Payload write was abandoned and cannot be republished');
|
|
581
|
-
}
|
|
582
|
-
let handle = intent.handle;
|
|
583
|
-
if (!handle) {
|
|
584
|
-
handle = await this.options.vault.putSource({
|
|
585
|
-
descriptor,
|
|
586
|
-
descriptorDigest,
|
|
587
|
-
payload: input.payload,
|
|
588
|
-
sourceBindingDigest: input.source.bindingDigest,
|
|
589
|
-
}, linked.signal);
|
|
590
|
-
intent = await infrastructure.payloadWrites.recordVault(intentId, handle);
|
|
591
|
-
}
|
|
592
|
-
if (intent.state === 'vault_written') {
|
|
593
|
-
const lifecycleIndex = await infrastructure.payloadLifecycleIndex.register({
|
|
594
|
-
operationId: input.operationId,
|
|
595
|
-
handle,
|
|
596
|
-
}, linked.signal);
|
|
597
|
-
const sourceAuthority = createGovernedSourceAuthority({
|
|
598
|
-
version: 1,
|
|
599
|
-
projectId: authority.projectId,
|
|
600
|
-
sourceRef: descriptor.objectId,
|
|
601
|
-
sourceDigest: descriptor.payloadHash,
|
|
602
|
-
sourceBindingDigest: input.source.bindingDigest,
|
|
603
|
-
descriptor,
|
|
604
|
-
handle,
|
|
605
|
-
projectAuthorityRevision: authority.revision,
|
|
606
|
-
projectAuthorityDigest: authority.digest,
|
|
607
|
-
});
|
|
608
|
-
const persistedSource = await this.options.repository.appendSource(sourceAuthority);
|
|
609
|
-
if (canonicalWorkroomJson(persistedSource) !== canonicalWorkroomJson(sourceAuthority)) {
|
|
610
|
-
throw new Error('Governed Payload source authority CAS winner drift');
|
|
611
|
-
}
|
|
612
|
-
intent = await infrastructure.payloadWrites.recordAuthorityIndex(intentId, digest({
|
|
613
|
-
sourceAuthorityDigest: sourceAuthority.digest,
|
|
614
|
-
lifecycleIndexDigest: lifecycleIndex.digest,
|
|
615
|
-
}));
|
|
616
|
-
}
|
|
617
|
-
authorityIndexed = intent.state === 'authority_indexed' || intent.state === 'published';
|
|
618
|
-
const receipt = deepFreeze({
|
|
619
|
-
descriptor: {
|
|
620
|
-
vaultObjectId: handle.vaultObjectId,
|
|
621
|
-
objectId: handle.objectId,
|
|
622
|
-
payloadHash: handle.payloadHash,
|
|
623
|
-
descriptorDigest: handle.descriptorDigest,
|
|
624
|
-
locationManifestDigest: handle.locationManifestDigest,
|
|
625
|
-
bytes: input.payload.byteLength,
|
|
626
|
-
},
|
|
627
|
-
source: structuredClone(input.source),
|
|
628
|
-
});
|
|
629
|
-
if (input.publication && intent.state !== 'published') {
|
|
630
|
-
publicationStarted = true;
|
|
631
|
-
const publicationReceipt = deepFreeze({
|
|
632
|
-
descriptor: receipt.descriptor,
|
|
633
|
-
source: validatePublicationReceiptSource(input.source),
|
|
634
|
-
});
|
|
635
|
-
const publication = await input.publication.publish(publicationReceipt, linked.signal);
|
|
636
|
-
publicationConfirmed = true;
|
|
637
|
-
await infrastructure.payloadWrites.publish(intentId, exactDigest(publication.publicationDigest, 'payload publicationDigest'));
|
|
638
|
-
}
|
|
639
|
-
return receipt;
|
|
640
|
-
}
|
|
641
|
-
catch (error) {
|
|
642
|
-
if (intentId) {
|
|
643
|
-
const snapshot = await this.options.payloadWrites?.read(intentId);
|
|
644
|
-
const definiteAbandon = !authorityIndexed
|
|
645
|
-
|| error instanceof WorkroomGovernedPayloadHeaderCasLostError
|
|
646
|
-
|| error instanceof WorkroomGovernedPayloadPublicationAbandonedError;
|
|
647
|
-
if (snapshot && snapshot.state !== 'published' && definiteAbandon
|
|
648
|
-
&& !(publicationStarted && publicationConfirmed)) {
|
|
649
|
-
if (snapshot.state !== 'purge_required') {
|
|
650
|
-
await this.options.payloadWrites?.requirePurge(intentId, error instanceof WorkroomGovernedPayloadHeaderCasLostError
|
|
651
|
-
? 'cas_lost'
|
|
652
|
-
: 'write_failed');
|
|
653
|
-
}
|
|
654
|
-
await this.#purgeIntent(intentId);
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
|
-
if (linked.signal.aborted) {
|
|
658
|
-
throw linked.signal.reason ?? new DOMException('Governed payload write cancelled', 'AbortError');
|
|
659
|
-
}
|
|
660
|
-
await this.#block(input.operationId, input.projectId, blockerKind(error));
|
|
661
|
-
throw error;
|
|
662
|
-
}
|
|
663
|
-
finally {
|
|
664
|
-
linked.dispose();
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
async #purgeIntent(intentId) {
|
|
668
|
-
if (!this.options.payloadPurge)
|
|
669
|
-
return;
|
|
670
|
-
await this.options.payloadPurge.processIntent(intentId, this.options.signal);
|
|
671
|
-
}
|
|
672
|
-
async #requirePayloadInfrastructure(signal, blocker) {
|
|
673
|
-
signal.throwIfAborted();
|
|
674
|
-
const payloadWrites = this.options.payloadWrites;
|
|
675
|
-
const payloadLifecycleIndex = this.options.payloadLifecycleIndex;
|
|
676
|
-
const payloadPurge = this.options.payloadPurge;
|
|
677
|
-
const rejectUnavailable = async (unavailable) => {
|
|
678
|
-
if (blocker) {
|
|
679
|
-
await this.#block(blocker.operationId, blocker.projectId, blockerKind(unavailable));
|
|
680
|
-
}
|
|
681
|
-
throw unavailable;
|
|
682
|
-
};
|
|
683
|
-
if (!payloadWrites) {
|
|
684
|
-
return await rejectUnavailable(new Error('Governed Payload durable write saga authority is unavailable'));
|
|
685
|
-
}
|
|
686
|
-
if (!payloadLifecycleIndex) {
|
|
687
|
-
return await rejectUnavailable(new Error('Governed Payload Lifecycle index authority is unavailable'));
|
|
688
|
-
}
|
|
689
|
-
if (!payloadPurge) {
|
|
690
|
-
return await rejectUnavailable(new Error('Governed Payload orphan purge authority is unavailable'));
|
|
691
|
-
}
|
|
692
|
-
await payloadWrites.assertReady();
|
|
693
|
-
signal.throwIfAborted();
|
|
694
|
-
return Object.freeze({
|
|
695
|
-
payloadWrites,
|
|
696
|
-
payloadLifecycleIndex,
|
|
697
|
-
payloadPurge,
|
|
698
|
-
});
|
|
699
|
-
}
|
|
700
|
-
async #readTaskReport(input, signal) {
|
|
701
|
-
await this.#requirePayloadInfrastructure(signal, {
|
|
702
|
-
operationId: `accepted-source-read:${input.candidateHash}`,
|
|
703
|
-
projectId: input.projectId,
|
|
704
|
-
});
|
|
705
|
-
const authority = await this.options.repository.readProject(input.projectId);
|
|
706
|
-
const sinkRuleId = 'task-report:accepted-source-memory-projector';
|
|
707
|
-
const sink = authority?.sinks[sinkRuleId];
|
|
708
|
-
if (!authority || !sink?.fixedPrincipalId) {
|
|
709
|
-
throw new Error('Accepted-source Task Report disclosure authority is unavailable');
|
|
710
|
-
}
|
|
711
|
-
const manifest = await this.disclosureManifest.materialize({
|
|
712
|
-
operationId: `accepted-source-read:${input.candidateHash}`,
|
|
713
|
-
projectId: input.projectId,
|
|
714
|
-
sourceRef: input.receipt.descriptor.objectId,
|
|
715
|
-
sourceDigest: input.receipt.descriptor.payloadHash,
|
|
716
|
-
sinkRuleId,
|
|
717
|
-
principalId: sink.fixedPrincipalId,
|
|
718
|
-
}, signal);
|
|
719
|
-
if (!manifest || manifest.output.mode !== 'full'
|
|
720
|
-
|| manifest.output.handle.vaultObjectId !== input.receipt.descriptor.vaultObjectId
|
|
721
|
-
|| manifest.output.handle.descriptorDigest !== input.receipt.descriptor.descriptorDigest
|
|
722
|
-
|| manifest.output.payloadHash !== input.receipt.descriptor.payloadHash) {
|
|
723
|
-
throw new Error('Accepted-source Task Report disclosure is not exact/full');
|
|
724
|
-
}
|
|
725
|
-
const payload = await this.options.vault.readExact({
|
|
726
|
-
handle: manifest.output.handle,
|
|
727
|
-
requestDigest: manifest.requestDigest,
|
|
728
|
-
purpose: manifest.purpose,
|
|
729
|
-
principalId: manifest.principal.principalId,
|
|
730
|
-
destinationId: manifest.destination.id,
|
|
731
|
-
}, signal);
|
|
732
|
-
let report;
|
|
733
|
-
try {
|
|
734
|
-
report = JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(payload));
|
|
735
|
-
}
|
|
736
|
-
catch (error) {
|
|
737
|
-
throw new Error('Governed Task Report payload is not canonical JSON', { cause: error });
|
|
738
|
-
}
|
|
739
|
-
if (!report || typeof report !== 'object'
|
|
740
|
-
|| report.projectId !== input.projectId
|
|
741
|
-
|| report.runId !== input.runId
|
|
742
|
-
|| report.taskKey !== input.taskKey
|
|
743
|
-
|| report.ref !== input.reportRef
|
|
744
|
-
|| report.candidateHash !== input.candidateHash) {
|
|
745
|
-
throw new Error('Governed Task Report payload escaped accepted-source scope');
|
|
746
|
-
}
|
|
747
|
-
return deepFreeze(report);
|
|
748
|
-
}
|
|
749
|
-
async #materializePlanning(request, operationSignal) {
|
|
750
|
-
const linked = linkSignals(this.options.signal, operationSignal);
|
|
751
|
-
const binding = createWorkroomPlanningDisclosureSourceBinding(request.input.source);
|
|
752
|
-
try {
|
|
753
|
-
this.#assertGeneration(request);
|
|
754
|
-
if (canonicalWorkroomJson(binding) !== canonicalWorkroomJson(request.source)) {
|
|
755
|
-
throw new Error('Planning disclosure source binding drift');
|
|
756
|
-
}
|
|
757
|
-
const authority = await this.options.repository.readProject(request.input.projectId);
|
|
758
|
-
if (!authority) {
|
|
759
|
-
await this.#block(request.input.operationId, request.input.projectId, 'project_authority_unavailable', binding.digest);
|
|
760
|
-
throw new WorkroomPlanningClarificationError('planning_disclosure_unavailable');
|
|
761
|
-
}
|
|
762
|
-
const source = await this.#resolvePlanningSource(request, authority, binding.digest, linked.signal);
|
|
763
|
-
const manifest = await this.#materialize({
|
|
764
|
-
operationId: request.input.operationId,
|
|
765
|
-
authority,
|
|
766
|
-
source,
|
|
767
|
-
context: {
|
|
768
|
-
channel: 'model_provider',
|
|
769
|
-
purpose: 'orchestration',
|
|
770
|
-
requestedMode: authority.planning.source.requestedMode,
|
|
771
|
-
policyRevision: authority.policy.revision,
|
|
772
|
-
principal: {
|
|
773
|
-
principalId: request.input.principalId,
|
|
774
|
-
tenantId: authority.tenantId,
|
|
775
|
-
projectId: authority.projectId,
|
|
776
|
-
...authority.planning.principal,
|
|
777
|
-
},
|
|
778
|
-
destination: authority.policy.destinations[authority.planning.destinationId],
|
|
779
|
-
recipients: authority.planning.recipients,
|
|
780
|
-
},
|
|
781
|
-
signal: linked.signal,
|
|
782
|
-
});
|
|
783
|
-
await this.#requirePayloadInfrastructure(linked.signal);
|
|
784
|
-
const payload = await this.options.vault.readExact(deepFreeze({
|
|
785
|
-
handle: structuredClone(manifest.output.handle),
|
|
786
|
-
requestDigest: manifest.requestDigest,
|
|
787
|
-
purpose: manifest.purpose,
|
|
788
|
-
principalId: manifest.principal.principalId,
|
|
789
|
-
destinationId: manifest.destination.id,
|
|
790
|
-
}), linked.signal);
|
|
791
|
-
if (hashBytes(payload) !== manifest.output.payloadHash) {
|
|
792
|
-
throw new Error('Planning disclosure output body hash mismatch');
|
|
793
|
-
}
|
|
794
|
-
let text;
|
|
795
|
-
try {
|
|
796
|
-
text = new TextDecoder('utf-8', { fatal: true }).decode(payload);
|
|
797
|
-
}
|
|
798
|
-
catch (error) {
|
|
799
|
-
throw new Error('Planning disclosure output is not valid UTF-8', { cause: error });
|
|
800
|
-
}
|
|
801
|
-
return createWorkroomPlanningDisclosure({ source: request.source, manifest, text });
|
|
802
|
-
}
|
|
803
|
-
catch (error) {
|
|
804
|
-
if (error instanceof WorkroomPlanningClarificationError)
|
|
805
|
-
throw error;
|
|
806
|
-
const kind = blockerKind(error);
|
|
807
|
-
await this.#block(request.input.operationId, request.input.projectId, kind, binding.digest);
|
|
808
|
-
if (linked.signal.aborted) {
|
|
809
|
-
throw linked.signal.reason ?? new DOMException('Data Governance planning cancelled', 'AbortError');
|
|
810
|
-
}
|
|
811
|
-
throw new WorkroomPlanningClarificationError('planning_disclosure_unavailable');
|
|
812
|
-
}
|
|
813
|
-
finally {
|
|
814
|
-
linked.dispose();
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
async #resolvePlanningSource(request, authority, sourceBindingDigest, signal) {
|
|
818
|
-
const infrastructure = await this.#requirePayloadInfrastructure(signal);
|
|
819
|
-
const existing = await this.options.repository.readSource(request.input.projectId, request.input.source.ref, request.input.source.digest);
|
|
820
|
-
if (existing) {
|
|
821
|
-
if (existing.sourceBindingDigest !== sourceBindingDigest
|
|
822
|
-
|| existing.projectAuthorityDigest !== authority.digest
|
|
823
|
-
|| existing.projectAuthorityRevision !== authority.revision) {
|
|
824
|
-
throw new Error('Governed source authority is stale for current policy');
|
|
825
|
-
}
|
|
826
|
-
await infrastructure.payloadLifecycleIndex.register({
|
|
827
|
-
operationId: request.input.operationId,
|
|
828
|
-
handle: existing.handle,
|
|
829
|
-
}, signal);
|
|
830
|
-
return existing;
|
|
831
|
-
}
|
|
832
|
-
const payload = new TextEncoder().encode(request.input.source.text);
|
|
833
|
-
const payloadHash = hashBytes(payload);
|
|
834
|
-
const timestamp = nonNegative(request.input.source.event.timestamp, 'source timestamp');
|
|
835
|
-
const rule = authority.planning.source;
|
|
836
|
-
const classified = classifyDataDescriptor({
|
|
837
|
-
objectId: `workroom-source:${request.input.source.digest}`,
|
|
838
|
-
payloadHash,
|
|
839
|
-
tenantId: authority.tenantId,
|
|
840
|
-
projectId: authority.projectId,
|
|
841
|
-
kind: 'source_message',
|
|
842
|
-
proposedConfidentiality: rule.proposedConfidentiality,
|
|
843
|
-
categories: rule.categories,
|
|
844
|
-
allowedPurposes: rule.allowedPurposes,
|
|
845
|
-
allowedRegions: rule.allowedRegions,
|
|
846
|
-
subjectRefs: rule.linkPrincipalAsSubject ? [request.input.principalId] : [],
|
|
847
|
-
retention: {
|
|
848
|
-
class: rule.retentionClass,
|
|
849
|
-
minimumRetainUntil: safeAdd(timestamp, rule.minimumRetentionMs),
|
|
850
|
-
deleteAfter: safeAdd(timestamp, rule.maximumRetentionMs),
|
|
851
|
-
},
|
|
852
|
-
lineage: { sourceObjectIds: [request.input.source.ref] },
|
|
853
|
-
}, authority.categoryRegistry);
|
|
854
|
-
if (classified.status === 'quarantined') {
|
|
855
|
-
throw new Error(`Source classification quarantined: ${classified.reasonCodes.join(',')}`);
|
|
856
|
-
}
|
|
857
|
-
const descriptor = classified.descriptor;
|
|
858
|
-
const handle = await this.options.vault.putSource({
|
|
859
|
-
descriptor,
|
|
860
|
-
descriptorDigest: digest(descriptor),
|
|
861
|
-
payload,
|
|
862
|
-
sourceBindingDigest,
|
|
863
|
-
}, signal);
|
|
864
|
-
await infrastructure.payloadLifecycleIndex.register({
|
|
865
|
-
operationId: request.input.operationId,
|
|
866
|
-
handle,
|
|
867
|
-
}, signal);
|
|
868
|
-
return await this.options.repository.appendSource(createGovernedSourceAuthority({
|
|
869
|
-
version: 1,
|
|
870
|
-
projectId: authority.projectId,
|
|
871
|
-
sourceRef: request.input.source.ref,
|
|
872
|
-
sourceDigest: request.input.source.digest,
|
|
873
|
-
sourceBindingDigest,
|
|
874
|
-
descriptor,
|
|
875
|
-
handle,
|
|
876
|
-
projectAuthorityRevision: authority.revision,
|
|
877
|
-
projectAuthorityDigest: authority.digest,
|
|
878
|
-
}));
|
|
879
|
-
}
|
|
880
|
-
async #materializeRegistered(request, operationSignal) {
|
|
881
|
-
const linked = linkSignals(this.options.signal, operationSignal);
|
|
882
|
-
try {
|
|
883
|
-
const authority = await this.options.repository.readProject(request.projectId);
|
|
884
|
-
if (!authority) {
|
|
885
|
-
await this.#block(request.operationId, request.projectId, 'project_authority_unavailable');
|
|
886
|
-
return null;
|
|
887
|
-
}
|
|
888
|
-
const source = await this.options.repository.readSource(request.projectId, request.sourceRef, request.sourceDigest);
|
|
889
|
-
if (!source || source.projectAuthorityDigest !== authority.digest) {
|
|
890
|
-
await this.#block(request.operationId, request.projectId, 'source_authority_conflict', undefined, authority.digest);
|
|
891
|
-
return null;
|
|
892
|
-
}
|
|
893
|
-
const rule = authority.sinks[request.sinkRuleId];
|
|
894
|
-
const destination = rule && authority.policy.destinations[rule.destinationId];
|
|
895
|
-
if (!rule || !destination
|
|
896
|
-
|| (rule.fixedPrincipalId !== undefined && request.principalId !== rule.fixedPrincipalId)) {
|
|
897
|
-
await this.#block(request.operationId, request.projectId, 'disclosure_denied', source.sourceBindingDigest, authority.digest);
|
|
898
|
-
return null;
|
|
899
|
-
}
|
|
900
|
-
return await this.#materialize({
|
|
901
|
-
operationId: request.operationId,
|
|
902
|
-
authority,
|
|
903
|
-
source,
|
|
904
|
-
context: {
|
|
905
|
-
channel: rule.channel,
|
|
906
|
-
purpose: rule.purpose,
|
|
907
|
-
requestedMode: rule.requestedMode,
|
|
908
|
-
policyRevision: authority.policy.revision,
|
|
909
|
-
principal: {
|
|
910
|
-
principalId: request.principalId,
|
|
911
|
-
...(request.assignmentId === undefined ? {} : { assignmentId: request.assignmentId }),
|
|
912
|
-
tenantId: authority.tenantId,
|
|
913
|
-
projectId: authority.projectId,
|
|
914
|
-
...rule.principal,
|
|
915
|
-
},
|
|
916
|
-
destination,
|
|
917
|
-
recipients: structuredClone(rule.recipients),
|
|
918
|
-
},
|
|
919
|
-
signal: linked.signal,
|
|
920
|
-
});
|
|
921
|
-
}
|
|
922
|
-
catch (error) {
|
|
923
|
-
await this.#block(request.operationId, request.projectId, blockerKind(error));
|
|
924
|
-
if (linked.signal.aborted) {
|
|
925
|
-
throw linked.signal.reason ?? new DOMException('Data Governance operation cancelled', 'AbortError');
|
|
926
|
-
}
|
|
927
|
-
return null;
|
|
928
|
-
}
|
|
929
|
-
finally {
|
|
930
|
-
linked.dispose();
|
|
931
|
-
}
|
|
932
|
-
}
|
|
933
|
-
async #prepareProjection(input, operationSignal) {
|
|
934
|
-
const linked = linkSignals(this.options.signal, operationSignal);
|
|
935
|
-
try {
|
|
936
|
-
const authority = await this.options.repository.readProject(input.projectId);
|
|
937
|
-
const sink = authority?.sinks[input.sinkRuleId];
|
|
938
|
-
const expectedChannel = input.sinkRuleId === 'projection:sponsor-room'
|
|
939
|
-
? 'sponsor_projection'
|
|
940
|
-
: 'workroom_projection';
|
|
941
|
-
if (!authority || !sink || sink.channel !== expectedChannel || !sink.fixedPrincipalId
|
|
942
|
-
|| !authority.derivedPayloads.projection) {
|
|
943
|
-
const reason = authority ? 'disclosure_denied' : 'project_authority_unavailable';
|
|
944
|
-
await this.#block(input.operationId, input.projectId, reason, undefined, authority?.digest);
|
|
945
|
-
return deepFreeze({ status: 'blocked', reason });
|
|
946
|
-
}
|
|
947
|
-
if (input.sourceEventIds.length === 0 || input.sourceEventIds.some(value => !value.trim())) {
|
|
948
|
-
await this.#block(input.operationId, input.projectId, 'source_authority_conflict', undefined, authority.digest);
|
|
949
|
-
return deepFreeze({ status: 'blocked', reason: 'source_authority_conflict' });
|
|
950
|
-
}
|
|
951
|
-
const authorityEpoch = deepFreeze({
|
|
952
|
-
revision: authority.revision,
|
|
953
|
-
digest: authority.digest,
|
|
954
|
-
});
|
|
955
|
-
const payload = new TextEncoder().encode(input.body);
|
|
956
|
-
const payloadHash = hashBytes(payload);
|
|
957
|
-
const source = deepFreeze({
|
|
958
|
-
kind: 'tool',
|
|
959
|
-
ref: `workroom-projection-events:${digest({
|
|
960
|
-
projectId: input.projectId,
|
|
961
|
-
sourceEventIds: input.sourceEventIds,
|
|
962
|
-
authorityEpoch,
|
|
963
|
-
})}`,
|
|
964
|
-
digest: digest({ version: 1, sourceEventIds: input.sourceEventIds, authorityEpoch }),
|
|
965
|
-
bindingDigest: digest({
|
|
966
|
-
version: 1, projectId: input.projectId, sourceEventIds: input.sourceEventIds, payloadHash,
|
|
967
|
-
authorityEpoch,
|
|
968
|
-
}),
|
|
969
|
-
verification: 'verified',
|
|
970
|
-
});
|
|
971
|
-
const receipt = await this.#writeDerivedPayload({
|
|
972
|
-
operationId: `${input.operationId}:authority:${authority.revision}:${authority.digest}`,
|
|
973
|
-
projectId: input.projectId,
|
|
974
|
-
kind: 'projection',
|
|
975
|
-
objectId: `workroom-projection-payload:${digest({
|
|
976
|
-
projectId: input.projectId, sourceEventIds: input.sourceEventIds, payloadHash, authorityEpoch,
|
|
977
|
-
})}`,
|
|
978
|
-
payload,
|
|
979
|
-
source,
|
|
980
|
-
signal: linked.signal,
|
|
981
|
-
});
|
|
982
|
-
const request = deepFreeze({
|
|
983
|
-
operationId: input.operationId,
|
|
984
|
-
projectId: input.projectId,
|
|
985
|
-
sourceRef: receipt.descriptor.objectId,
|
|
986
|
-
sourceDigest: receipt.descriptor.payloadHash,
|
|
987
|
-
sinkRuleId: input.sinkRuleId,
|
|
988
|
-
principalId: sink.fixedPrincipalId,
|
|
989
|
-
});
|
|
990
|
-
const manifest = await this.#materializeRegistered(request, linked.signal);
|
|
991
|
-
if (!manifest)
|
|
992
|
-
return deepFreeze({ status: 'blocked', reason: 'disclosure_denied' });
|
|
993
|
-
return deepFreeze({ status: 'ready', request, manifest });
|
|
994
|
-
}
|
|
995
|
-
catch (error) {
|
|
996
|
-
if (linked.signal.aborted) {
|
|
997
|
-
throw linked.signal.reason ?? new DOMException('Projection disclosure cancelled', 'AbortError');
|
|
998
|
-
}
|
|
999
|
-
const reason = blockerKind(error);
|
|
1000
|
-
await this.#block(input.operationId, input.projectId, reason);
|
|
1001
|
-
return deepFreeze({ status: 'blocked', reason });
|
|
1002
|
-
}
|
|
1003
|
-
finally {
|
|
1004
|
-
linked.dispose();
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
async #revalidateRegistered(input, operationSignal) {
|
|
1008
|
-
const linked = linkSignals(this.options.signal, operationSignal);
|
|
1009
|
-
let reason;
|
|
1010
|
-
try {
|
|
1011
|
-
const { request, manifest } = input;
|
|
1012
|
-
const authority = await this.options.repository.readProject(request.projectId);
|
|
1013
|
-
if (!authority)
|
|
1014
|
-
reason = 'project_authority_unavailable';
|
|
1015
|
-
const source = authority
|
|
1016
|
-
? await this.options.repository.readSource(request.projectId, request.sourceRef, request.sourceDigest)
|
|
1017
|
-
: undefined;
|
|
1018
|
-
const sourceInvalid = !source
|
|
1019
|
-
|| source.sourceRef !== request.sourceRef
|
|
1020
|
-
|| source.sourceDigest !== request.sourceDigest
|
|
1021
|
-
|| source.projectAuthorityDigest !== authority.digest
|
|
1022
|
-
|| source.projectAuthorityRevision !== authority.revision
|
|
1023
|
-
|| source.descriptor.objectId !== manifest.source.objectId
|
|
1024
|
-
|| source.descriptor.payloadHash !== manifest.source.payloadHash
|
|
1025
|
-
|| digest(source.descriptor) !== manifest.source.descriptorDigest
|
|
1026
|
-
|| digest(source.descriptor.lineage) !== manifest.source.lineageDigest
|
|
1027
|
-
|| canonicalWorkroomJson(source.handle) !== canonicalWorkroomJson(manifest.source.handle);
|
|
1028
|
-
const rule = authority?.sinks[request.sinkRuleId];
|
|
1029
|
-
const destination = rule && authority?.policy.destinations[rule.destinationId];
|
|
1030
|
-
if (!reason && (!rule || !destination
|
|
1031
|
-
|| (rule.fixedPrincipalId !== undefined && request.principalId !== rule.fixedPrincipalId)
|
|
1032
|
-
|| manifest.channel !== rule.channel
|
|
1033
|
-
|| manifest.purpose !== rule.purpose
|
|
1034
|
-
|| manifest.principal.principalId !== request.principalId
|
|
1035
|
-
|| manifest.principal.assignmentId !== request.assignmentId
|
|
1036
|
-
|| manifest.destination.id !== rule.destinationId)) {
|
|
1037
|
-
reason = 'disclosure_manifest_stale';
|
|
1038
|
-
}
|
|
1039
|
-
if (!reason && (manifest.destination.recipientRevision !== rule.recipients.revision
|
|
1040
|
-
|| manifest.destination.recipientDigest !== rule.recipients.digest
|
|
1041
|
-
|| destination.recipientSnapshotRevision !== rule.recipients.revision
|
|
1042
|
-
|| destination.recipientSnapshotDigest !== rule.recipients.digest)) {
|
|
1043
|
-
reason = 'disclosure_recipient_revoked';
|
|
1044
|
-
}
|
|
1045
|
-
if (!reason && manifest.destination.contractDigest !== destination.contractDigest) {
|
|
1046
|
-
reason = 'disclosure_manifest_stale';
|
|
1047
|
-
}
|
|
1048
|
-
// Any policy replacement invalidates the persisted decision. A wider
|
|
1049
|
-
// current policy must never silently extend an older Manifest.
|
|
1050
|
-
if (!reason && (manifest.policy.revision !== authority.policy.revision
|
|
1051
|
-
|| manifest.policy.digest !== authority.policy.digest)) {
|
|
1052
|
-
reason = 'disclosure_manifest_stale';
|
|
1053
|
-
}
|
|
1054
|
-
if (!reason && sourceInvalid)
|
|
1055
|
-
reason = 'source_authority_conflict';
|
|
1056
|
-
const now = this.#now();
|
|
1057
|
-
if (!reason && now >= manifest.expiresAt)
|
|
1058
|
-
reason = 'disclosure_manifest_expired';
|
|
1059
|
-
if (!reason && !exactCurrentApprovals(manifest, authority.approvals, now)) {
|
|
1060
|
-
reason = 'disclosure_approval_required';
|
|
1061
|
-
}
|
|
1062
|
-
if (reason) {
|
|
1063
|
-
await this.#block(request.operationId, request.projectId, reason, source?.sourceBindingDigest, authority?.digest);
|
|
1064
|
-
return deepFreeze({ status: 'blocked', reason });
|
|
1065
|
-
}
|
|
1066
|
-
linked.signal.throwIfAborted();
|
|
1067
|
-
await this.#requirePayloadInfrastructure(linked.signal);
|
|
1068
|
-
const body = await this.options.vault.readExact({
|
|
1069
|
-
handle: structuredClone(manifest.output.handle),
|
|
1070
|
-
requestDigest: manifest.requestDigest,
|
|
1071
|
-
purpose: manifest.purpose,
|
|
1072
|
-
principalId: manifest.principal.principalId,
|
|
1073
|
-
destinationId: manifest.destination.id,
|
|
1074
|
-
}, linked.signal);
|
|
1075
|
-
if (hashBytes(body) !== manifest.output.payloadHash) {
|
|
1076
|
-
await this.#block(request.operationId, request.projectId, 'source_authority_conflict', source?.sourceBindingDigest, authority?.digest);
|
|
1077
|
-
return deepFreeze({ status: 'blocked', reason: 'source_authority_conflict' });
|
|
1078
|
-
}
|
|
1079
|
-
return Object.freeze({ status: 'ready', manifest: deepFreeze(structuredClone(manifest)), body });
|
|
1080
|
-
}
|
|
1081
|
-
catch (error) {
|
|
1082
|
-
if (linked.signal.aborted) {
|
|
1083
|
-
throw linked.signal.reason ?? new DOMException('Data Governance dispatch cancelled', 'AbortError');
|
|
1084
|
-
}
|
|
1085
|
-
const blocked = blockerKind(error);
|
|
1086
|
-
await this.#block(input.request.operationId, input.request.projectId, blocked);
|
|
1087
|
-
return deepFreeze({ status: 'blocked', reason: blocked });
|
|
1088
|
-
}
|
|
1089
|
-
finally {
|
|
1090
|
-
linked.dispose();
|
|
1091
|
-
}
|
|
1092
|
-
}
|
|
1093
|
-
async #materializeAssignment(request) {
|
|
1094
|
-
let authority;
|
|
1095
|
-
try {
|
|
1096
|
-
authority = await this.options.repository.readProject(request.preview.projectId);
|
|
1097
|
-
}
|
|
1098
|
-
catch (error) {
|
|
1099
|
-
if (this.options.signal.aborted)
|
|
1100
|
-
throw this.options.signal.reason;
|
|
1101
|
-
await this.#block(request.preview.operationId, request.preview.projectId, blockerKind(error));
|
|
1102
|
-
return null;
|
|
1103
|
-
}
|
|
1104
|
-
const rule = authority?.remote[request.endpointId];
|
|
1105
|
-
if (!authority || !rule || request.preview.generation !== this.generation
|
|
1106
|
-
|| rule.principal.role !== request.preview.role) {
|
|
1107
|
-
await this.#block(request.preview.operationId, request.preview.projectId, authority ? 'disclosure_denied' : 'project_authority_unavailable', undefined, authority?.digest);
|
|
1108
|
-
return null;
|
|
1109
|
-
}
|
|
1110
|
-
return await this.disclosureManifest.materialize({
|
|
1111
|
-
operationId: request.preview.operationId,
|
|
1112
|
-
projectId: request.preview.projectId,
|
|
1113
|
-
sourceRef: request.contextView.ref,
|
|
1114
|
-
sourceDigest: request.contextView.hash,
|
|
1115
|
-
sinkRuleId: `remote:${request.endpointId}`,
|
|
1116
|
-
principalId: request.principalId,
|
|
1117
|
-
assignmentId: request.assignmentId,
|
|
1118
|
-
}, this.options.signal);
|
|
1119
|
-
}
|
|
1120
|
-
async #materialize(input) {
|
|
1121
|
-
const decisionInput = deepFreeze({
|
|
1122
|
-
descriptor: structuredClone(input.source.descriptor),
|
|
1123
|
-
policy: structuredClone(input.authority.policy),
|
|
1124
|
-
context: structuredClone(input.context),
|
|
1125
|
-
approvals: structuredClone(input.authority.approvals),
|
|
1126
|
-
evaluatedAt: this.#now(),
|
|
1127
|
-
});
|
|
1128
|
-
return await materializeDisclosureManifest({
|
|
1129
|
-
decisionInput,
|
|
1130
|
-
categoryRegistry: input.authority.categoryRegistry,
|
|
1131
|
-
source: input.source.handle,
|
|
1132
|
-
vault: this.options.vault,
|
|
1133
|
-
...(this.options.transforms ? { transforms: this.options.transforms } : {}),
|
|
1134
|
-
signal: input.signal,
|
|
1135
|
-
});
|
|
1136
|
-
}
|
|
1137
|
-
#assertGeneration(request) {
|
|
1138
|
-
const expected = createWorkroomDynamicPlanningGenerationSnapshot(this.generation);
|
|
1139
|
-
if (canonicalWorkroomJson(request.generation) !== canonicalWorkroomJson(expected)) {
|
|
1140
|
-
throw new Error('Data Governance request escaped its Root generation');
|
|
1141
|
-
}
|
|
1142
|
-
this.options.signal.throwIfAborted();
|
|
1143
|
-
}
|
|
1144
|
-
async #block(operationId, projectId, kind, sourceBindingDigest, authorityDigest) {
|
|
1145
|
-
await this.options.repository.recordBlocker({
|
|
1146
|
-
version: 1,
|
|
1147
|
-
generation: this.generation,
|
|
1148
|
-
operationId,
|
|
1149
|
-
projectId,
|
|
1150
|
-
kind,
|
|
1151
|
-
...(authorityDigest ? { authorityDigest } : {}),
|
|
1152
|
-
...(sourceBindingDigest && /^sha256:[a-f\d]{64}$/u.test(sourceBindingDigest)
|
|
1153
|
-
? { sourceBindingDigest }
|
|
1154
|
-
: {}),
|
|
1155
|
-
createdAt: this.#now(),
|
|
1156
|
-
});
|
|
1157
|
-
}
|
|
1158
|
-
}
|
|
1159
|
-
function blockerKind(error) {
|
|
1160
|
-
if (error instanceof DOMException && error.name === 'AbortError')
|
|
1161
|
-
return 'generation_retired';
|
|
1162
|
-
if (error instanceof DataGovernanceAuthorityUnauthorizedError)
|
|
1163
|
-
return 'project_authority_unavailable';
|
|
1164
|
-
if (error instanceof PayloadVaultCryptographyUnavailableError)
|
|
1165
|
-
return 'payload_vault_key_unavailable';
|
|
1166
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
1167
|
-
if (message.includes('Project authority is unavailable'))
|
|
1168
|
-
return 'project_authority_unavailable';
|
|
1169
|
-
if (message.includes('quarantined'))
|
|
1170
|
-
return 'source_classification_quarantined';
|
|
1171
|
-
if (message.includes('approval'))
|
|
1172
|
-
return 'disclosure_approval_required';
|
|
1173
|
-
if (message.includes('stale') || message.includes('conflict'))
|
|
1174
|
-
return 'source_authority_conflict';
|
|
1175
|
-
if (message.includes('Abort') || message.includes('retired'))
|
|
1176
|
-
return 'generation_retired';
|
|
1177
|
-
return 'disclosure_denied';
|
|
1178
|
-
}
|
|
1179
|
-
function exactCurrentApprovals(manifest, approvals, now) {
|
|
1180
|
-
if (manifest.approvalIds.length === 0)
|
|
1181
|
-
return true;
|
|
1182
|
-
const byId = new Map(approvals.map(approval => [approval.id, approval]));
|
|
1183
|
-
return manifest.approvalIds.every((id) => {
|
|
1184
|
-
const approval = byId.get(id);
|
|
1185
|
-
return approval?.decision === 'approved'
|
|
1186
|
-
&& approval.requestDigest === manifest.requestDigest
|
|
1187
|
-
&& approval.policyRevision === manifest.policy.revision
|
|
1188
|
-
&& now < approval.expiresAt;
|
|
1189
|
-
});
|
|
1190
|
-
}
|
|
1191
|
-
function validateReceiptSource(value) {
|
|
1192
|
-
if (!value || !['command', 'file', 'url', 'tool', 'human'].includes(value.kind)
|
|
1193
|
-
|| typeof value.ref !== 'string' || !value.ref.trim()
|
|
1194
|
-
|| !/^sha256:[a-f\d]{64}$/u.test(value.digest)
|
|
1195
|
-
|| !/^sha256:[a-f\d]{64}$/u.test(value.bindingDigest)
|
|
1196
|
-
|| (value.verification !== 'verified' && value.verification !== 'unverified')) {
|
|
1197
|
-
throw new Error('Trusted Evidence source resolver returned invalid canonical authority');
|
|
1198
|
-
}
|
|
1199
|
-
return deepFreeze(structuredClone(value));
|
|
1200
|
-
}
|
|
1201
|
-
function validatePublicationReceiptSource(value) {
|
|
1202
|
-
const kind = (() => {
|
|
1203
|
-
switch (value.kind) {
|
|
1204
|
-
case 'command': return 'command';
|
|
1205
|
-
case 'file': return 'file';
|
|
1206
|
-
case 'url': return 'url';
|
|
1207
|
-
case 'tool': return 'tool';
|
|
1208
|
-
case 'human': return 'human';
|
|
1209
|
-
default: throw new Error('Governed Payload header publication source kind is invalid');
|
|
1210
|
-
}
|
|
1211
|
-
})();
|
|
1212
|
-
return validateReceiptSource(deepFreeze({
|
|
1213
|
-
kind,
|
|
1214
|
-
ref: value.ref,
|
|
1215
|
-
digest: value.digest,
|
|
1216
|
-
bindingDigest: value.bindingDigest,
|
|
1217
|
-
verification: value.verification,
|
|
1218
|
-
}));
|
|
1219
|
-
}
|
|
1220
|
-
function exactDigest(value, label) {
|
|
1221
|
-
if (!/^sha256:[a-f\d]{64}$/u.test(value)) {
|
|
1222
|
-
throw new Error(`${label} is invalid`);
|
|
1223
|
-
}
|
|
1224
|
-
return value;
|
|
1225
|
-
}
|
|
1226
|
-
function assertAcceptanceProjectionReceipt(receipt) {
|
|
1227
|
-
if (!receipt.vaultObjectId.trim() || !receipt.objectId.trim()
|
|
1228
|
-
|| !/^sha256:[a-f\d]{64}$/u.test(receipt.payloadHash)
|
|
1229
|
-
|| !/^sha256:[a-f\d]{64}$/u.test(receipt.descriptorDigest)
|
|
1230
|
-
|| !/^sha256:[a-f\d]{64}$/u.test(receipt.locationManifestDigest)
|
|
1231
|
-
|| !/^sha256:[a-f\d]{64}$/u.test(receipt.sourceBindingDigest)
|
|
1232
|
-
|| receipt.source.kind !== 'profile-policy'
|
|
1233
|
-
|| !receipt.source.ref.trim()
|
|
1234
|
-
|| !/^sha256:[a-f\d]{64}$/u.test(receipt.source.digest)
|
|
1235
|
-
|| !receipt.source.issuer.trim()
|
|
1236
|
-
|| !/^sha256:[a-f\d]{64}$/u.test(receipt.source.issuerDigest)
|
|
1237
|
-
|| !Number.isSafeInteger(receipt.source.revision) || receipt.source.revision < 1
|
|
1238
|
-
|| !/^sha256:[a-f\d]{64}$/u.test(receipt.source.bindingDigest)
|
|
1239
|
-
|| receipt.source.bindingDigest !== receipt.sourceBindingDigest
|
|
1240
|
-
|| receipt.source.verification !== 'verified'
|
|
1241
|
-
|| !Number.isSafeInteger(receipt.bytes) || receipt.bytes < 1) {
|
|
1242
|
-
throw new Error('Acceptance projection governed payload receipt is malformed');
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
function isAcceptanceProjectionInput(value) {
|
|
1246
|
-
if (!isRecord(value)
|
|
1247
|
-
|| value.version !== 1
|
|
1248
|
-
|| typeof value.projectId !== 'string'
|
|
1249
|
-
|| typeof value.profileRevisionId !== 'string'
|
|
1250
|
-
|| typeof value.profileDigest !== 'string'
|
|
1251
|
-
|| typeof value.revision !== 'number'
|
|
1252
|
-
|| typeof value.issuer !== 'string'
|
|
1253
|
-
|| !Array.isArray(value.tasks)
|
|
1254
|
-
|| !value.tasks.every(isAcceptanceTaskPolicy)
|
|
1255
|
-
|| !isRecord(value.memorySchema)
|
|
1256
|
-
|| typeof value.memorySchema.revision !== 'number'
|
|
1257
|
-
|| !Array.isArray(value.memorySchema.claimRules)
|
|
1258
|
-
|| !value.memorySchema.claimRules.every(isMemoryClaimRule)) {
|
|
1259
|
-
return false;
|
|
1260
|
-
}
|
|
1261
|
-
return Object.keys(value).every(key => [
|
|
1262
|
-
'version', 'projectId', 'profileRevisionId', 'profileDigest', 'revision', 'issuer', 'tasks', 'memorySchema',
|
|
1263
|
-
].includes(key));
|
|
1264
|
-
}
|
|
1265
|
-
function isAcceptanceTaskPolicy(value) {
|
|
1266
|
-
if (!isRecord(value)
|
|
1267
|
-
|| typeof value.taskKey !== 'string'
|
|
1268
|
-
|| !['task_result', 'integration_candidate', 'effect_intent'].includes(String(value.kind))
|
|
1269
|
-
|| !Array.isArray(value.criteria)
|
|
1270
|
-
|| !value.criteria.every(isAcceptanceCriterion)
|
|
1271
|
-
|| !Array.isArray(value.requiredEvidence)
|
|
1272
|
-
|| !value.requiredEvidence.every(item => typeof item === 'string')
|
|
1273
|
-
|| !['baseline', 'reviewer_required', 'sponsor_required', 'reviewer_then_sponsor']
|
|
1274
|
-
.includes(String(value.minimumRoute))
|
|
1275
|
-
|| typeof value.reviewerPrincipalId !== 'string'
|
|
1276
|
-
|| typeof value.sponsorPrincipalId !== 'string'
|
|
1277
|
-
|| typeof value.reviewerTimeoutMs !== 'number'
|
|
1278
|
-
|| typeof value.sponsorTimeoutMs !== 'number') {
|
|
1279
|
-
return false;
|
|
1280
|
-
}
|
|
1281
|
-
return Object.keys(value).every(key => [
|
|
1282
|
-
'taskKey', 'kind', 'criteria', 'requiredEvidence', 'minimumRoute', 'reviewerPrincipalId',
|
|
1283
|
-
'sponsorPrincipalId', 'reviewerTimeoutMs', 'sponsorTimeoutMs',
|
|
1284
|
-
].includes(key));
|
|
1285
|
-
}
|
|
1286
|
-
function isAcceptanceCriterion(value) {
|
|
1287
|
-
return isRecord(value)
|
|
1288
|
-
&& typeof value.id === 'string'
|
|
1289
|
-
&& ['deterministic', 'judgment'].includes(String(value.kind))
|
|
1290
|
-
&& typeof value.description === 'string'
|
|
1291
|
-
&& Object.keys(value).every(key => ['id', 'kind', 'description'].includes(key));
|
|
1292
|
-
}
|
|
1293
|
-
function isMemoryClaimRule(value) {
|
|
1294
|
-
return isRecord(value)
|
|
1295
|
-
&& typeof value.key === 'string'
|
|
1296
|
-
&& value.valueType === 'string'
|
|
1297
|
-
&& Array.isArray(value.allowedStatuses)
|
|
1298
|
-
&& value.allowedStatuses.every(status => status === 'verified' || status === 'assumed')
|
|
1299
|
-
&& typeof value.allowSupersedes === 'boolean'
|
|
1300
|
-
&& Object.keys(value).every(key => [
|
|
1301
|
-
'key', 'valueType', 'allowedStatuses', 'allowSupersedes',
|
|
1302
|
-
].includes(key));
|
|
1303
|
-
}
|
|
1304
|
-
function isRecord(value) {
|
|
1305
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
1306
|
-
}
|
|
1307
|
-
function linkSignals(generation, operation) {
|
|
1308
|
-
const controller = new AbortController();
|
|
1309
|
-
const abortGeneration = () => controller.abort(generation.reason);
|
|
1310
|
-
const abortOperation = () => controller.abort(operation.reason);
|
|
1311
|
-
generation.addEventListener('abort', abortGeneration, { once: true });
|
|
1312
|
-
operation.addEventListener('abort', abortOperation, { once: true });
|
|
1313
|
-
if (generation.aborted)
|
|
1314
|
-
abortGeneration();
|
|
1315
|
-
else if (operation.aborted)
|
|
1316
|
-
abortOperation();
|
|
1317
|
-
return {
|
|
1318
|
-
signal: controller.signal,
|
|
1319
|
-
dispose: () => {
|
|
1320
|
-
generation.removeEventListener('abort', abortGeneration);
|
|
1321
|
-
operation.removeEventListener('abort', abortOperation);
|
|
1322
|
-
},
|
|
1323
|
-
};
|
|
1324
|
-
}
|
|
1325
|
-
function journalIntentId(projectId, runId, receipt) {
|
|
1326
|
-
return createGovernedPayloadWriteIntentId({
|
|
1327
|
-
operationId: `journal-publication:${runId}`,
|
|
1328
|
-
projectId,
|
|
1329
|
-
objectId: receipt.descriptor.objectId,
|
|
1330
|
-
payloadHash: receipt.descriptor.payloadHash,
|
|
1331
|
-
descriptorDigest: receipt.descriptor.descriptorDigest,
|
|
1332
|
-
sourceBindingDigest: receipt.source.bindingDigest,
|
|
1333
|
-
consumer: 'journal_header',
|
|
1334
|
-
publicationScope: runId,
|
|
1335
|
-
});
|
|
1336
|
-
}
|
|
1337
|
-
function hashBytes(value) {
|
|
1338
|
-
return `sha256:${createHash('sha256').update(value).digest('hex')}`;
|
|
1339
|
-
}
|
|
1340
|
-
function positive(value, label) {
|
|
1341
|
-
if (!Number.isSafeInteger(value) || Number(value) < 1)
|
|
1342
|
-
throw new Error(`Data Governance ${label} is invalid`);
|
|
1343
|
-
return Number(value);
|
|
1344
|
-
}
|
|
1345
|
-
function nonNegative(value, label) {
|
|
1346
|
-
if (!Number.isSafeInteger(value) || Number(value) < 0)
|
|
1347
|
-
throw new Error(`Data Governance ${label} is invalid`);
|
|
1348
|
-
return Number(value);
|
|
1349
|
-
}
|
|
1350
|
-
function safeAdd(left, right) {
|
|
1351
|
-
const value = left + right;
|
|
1352
|
-
if (!Number.isSafeInteger(value) || value < 0)
|
|
1353
|
-
throw new Error('Data Governance retention overflow');
|
|
1354
|
-
return value;
|
|
1355
|
-
}
|
|
1356
|
-
//# sourceMappingURL=workroom-data-governance-runtime.js.map
|