@zhin.js/agent 1.1.13 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -20
- package/lib/ai-event-bus.d.ts +1 -1
- package/lib/ai-hook-handlers.d.ts +1 -1
- package/lib/assistant/config.d.ts +3 -17
- package/lib/assistant/config.d.ts.map +1 -1
- package/lib/assistant/config.js +1 -8
- package/lib/assistant/config.js.map +1 -1
- package/lib/assistant/index.d.ts +6 -9
- package/lib/assistant/index.d.ts.map +1 -1
- package/lib/assistant/index.js +4 -6
- package/lib/assistant/index.js.map +1 -1
- package/lib/assistant/job-engine.d.ts +0 -4
- package/lib/assistant/job-engine.d.ts.map +1 -1
- package/lib/assistant/job-engine.js +0 -2
- package/lib/assistant/job-engine.js.map +1 -1
- package/lib/assistant/job-store.d.ts +1 -8
- package/lib/assistant/job-store.d.ts.map +1 -1
- package/lib/assistant/job-store.js +3 -9
- package/lib/assistant/job-store.js.map +1 -1
- package/lib/assistant/job-worker.d.ts +2 -3
- package/lib/assistant/job-worker.d.ts.map +1 -1
- package/lib/assistant/job-worker.js +15 -25
- package/lib/assistant/job-worker.js.map +1 -1
- package/lib/assistant/runtime-contract.d.ts +22 -0
- package/lib/assistant/runtime-contract.d.ts.map +1 -0
- package/lib/assistant/runtime-contract.js +2 -0
- package/lib/assistant/runtime-contract.js.map +1 -0
- package/lib/assistant/types.d.ts +0 -10
- package/lib/assistant/types.d.ts.map +1 -1
- package/lib/assistant/types.js +0 -4
- package/lib/assistant/types.js.map +1 -1
- package/lib/authoring/bridge.d.ts +1 -1
- package/lib/authoring/index.d.ts +0 -4
- package/lib/authoring/index.d.ts.map +1 -1
- package/lib/authoring/index.js +0 -2
- package/lib/authoring/index.js.map +1 -1
- package/lib/authoring/types.d.ts +3 -39
- package/lib/authoring/types.d.ts.map +1 -1
- package/lib/authoring/types.js.map +1 -1
- package/lib/builtin/bash-tool.d.ts.map +1 -1
- package/lib/builtin/bash-tool.js +15 -2
- package/lib/builtin/bash-tool.js.map +1 -1
- package/lib/builtin/five-agent/index.d.ts +0 -1
- package/lib/builtin/five-agent/index.d.ts.map +1 -1
- package/lib/builtin/five-agent/index.js +0 -1
- package/lib/builtin/five-agent/index.js.map +1 -1
- package/lib/builtin/five-agent/role-capability-policy.d.ts +1 -1
- package/lib/builtin/five-agent/role-capability-policy.d.ts.map +1 -1
- package/lib/builtin/five-agent/role-capability-policy.js +1 -1
- package/lib/builtin/five-agent/role-capability-policy.js.map +1 -1
- package/lib/builtin/spawn-task-tool.d.ts +1 -1
- package/lib/builtin/spawn-task-tool.d.ts.map +1 -1
- package/lib/builtin/spawn-task-tool.js +4 -100
- package/lib/builtin/spawn-task-tool.js.map +1 -1
- package/lib/builtin-tools.d.ts +0 -2
- package/lib/builtin-tools.d.ts.map +1 -1
- package/lib/builtin-tools.js +0 -6
- package/lib/builtin-tools.js.map +1 -1
- package/lib/common-adapter-tools.d.ts +1 -1
- package/lib/config/agent-interfaces.d.ts +2 -1
- package/lib/config/agent-interfaces.d.ts.map +1 -1
- package/lib/config/index.d.ts +3 -3
- package/lib/config/index.d.ts.map +1 -1
- package/lib/config/index.js +2 -2
- package/lib/config/index.js.map +1 -1
- package/lib/config/keyword-triggers.d.ts +0 -1
- package/lib/config/keyword-triggers.d.ts.map +1 -1
- package/lib/config/keyword-triggers.js +0 -1
- package/lib/config/keyword-triggers.js.map +1 -1
- package/lib/config/normalize-ai-config.d.ts.map +1 -1
- package/lib/config/normalize-ai-config.js +9 -0
- package/lib/config/normalize-ai-config.js.map +1 -1
- package/lib/config/validate-ai-config.d.ts +1 -0
- package/lib/config/validate-ai-config.d.ts.map +1 -1
- package/lib/config/validate-ai-config.js +179 -0
- package/lib/config/validate-ai-config.js.map +1 -1
- package/lib/config/zhin-agent-config.d.ts +0 -3
- package/lib/config/zhin-agent-config.d.ts.map +1 -1
- package/lib/config/zhin-agent-constants.d.ts +0 -3
- package/lib/config/zhin-agent-constants.d.ts.map +1 -1
- package/lib/config/zhin-agent-constants.js +0 -14
- package/lib/config/zhin-agent-constants.js.map +1 -1
- package/lib/config/zhin-agent-defaults.d.ts.map +1 -1
- package/lib/config/zhin-agent-defaults.js +0 -3
- package/lib/config/zhin-agent-defaults.js.map +1 -1
- package/lib/config/zhin-agent-dependencies.d.ts +4 -5
- package/lib/config/zhin-agent-dependencies.d.ts.map +1 -1
- package/lib/context/context-system.d.ts +2 -1
- package/lib/context/context-system.d.ts.map +1 -1
- package/lib/context/context-system.js +1 -0
- package/lib/context/context-system.js.map +1 -1
- package/lib/context/context-tail-limit.d.ts +2 -2
- package/lib/context/context-tail-limit.d.ts.map +1 -1
- package/lib/context/context-tail-limit.js +2 -3
- package/lib/context/context-tail-limit.js.map +1 -1
- package/lib/context/im-turn-context-adapter.d.ts +1 -2
- package/lib/context/im-turn-context-adapter.d.ts.map +1 -1
- package/lib/context/im-turn-context-adapter.js +1 -5
- package/lib/context/im-turn-context-adapter.js.map +1 -1
- package/lib/context/turn-envelope.d.ts +1 -1
- package/lib/context/turn-envelope.d.ts.map +1 -1
- package/lib/context/turn-envelope.js +4 -0
- package/lib/context/turn-envelope.js.map +1 -1
- package/lib/context/turn-user-message.d.ts +1 -1
- package/lib/context/turn-user-message.d.ts.map +1 -1
- package/lib/context/turn-user-message.js +3 -3
- package/lib/context/turn-user-message.js.map +1 -1
- package/lib/core/agent-core-run.d.ts.map +1 -1
- package/lib/core/agent-core-run.js +36 -12
- package/lib/core/agent-core-run.js.map +1 -1
- package/lib/core/agent-loop-standalone.d.ts +1 -1
- package/lib/core/agent-loop-standalone.js +13 -6
- package/lib/core/agent-loop-standalone.js.map +1 -1
- package/lib/core/tool-execution-authority.d.ts +2 -2
- package/lib/core/tool-execution-authority.d.ts.map +1 -1
- package/lib/data-governance/data-governance.d.ts +198 -0
- package/lib/data-governance/data-governance.d.ts.map +1 -0
- package/lib/data-governance/data-governance.js +660 -0
- package/lib/data-governance/data-governance.js.map +1 -0
- package/lib/data-governance/database-payload-lifecycle-repository.d.ts +68 -0
- package/lib/data-governance/database-payload-lifecycle-repository.d.ts.map +1 -0
- package/lib/data-governance/database-payload-lifecycle-repository.js +226 -0
- package/lib/data-governance/database-payload-lifecycle-repository.js.map +1 -0
- package/lib/data-governance/disclosure-manifest.d.ts +110 -0
- package/lib/data-governance/disclosure-manifest.d.ts.map +1 -0
- package/lib/data-governance/disclosure-manifest.js +264 -0
- package/lib/data-governance/disclosure-manifest.js.map +1 -0
- package/lib/data-governance/encrypted-database-payload-vault.d.ts +107 -0
- package/lib/data-governance/encrypted-database-payload-vault.d.ts.map +1 -0
- package/lib/data-governance/encrypted-database-payload-vault.js +236 -0
- package/lib/data-governance/encrypted-database-payload-vault.js.map +1 -0
- package/lib/data-governance/encrypted-file-payload-vault.d.ts +117 -0
- package/lib/data-governance/encrypted-file-payload-vault.d.ts.map +1 -0
- package/lib/data-governance/encrypted-file-payload-vault.js +507 -0
- package/lib/data-governance/encrypted-file-payload-vault.js.map +1 -0
- package/lib/data-governance/file-payload-lifecycle-repository.d.ts +19 -0
- package/lib/data-governance/file-payload-lifecycle-repository.d.ts.map +1 -0
- package/lib/data-governance/file-payload-lifecycle-repository.js +194 -0
- package/lib/data-governance/file-payload-lifecycle-repository.js.map +1 -0
- package/lib/data-governance/governance-authority-repository.d.ts +148 -0
- package/lib/data-governance/governance-authority-repository.d.ts.map +1 -0
- package/lib/data-governance/governance-authority-repository.js +439 -0
- package/lib/data-governance/governance-authority-repository.js.map +1 -0
- package/lib/data-governance/governed-payload-write-saga.d.ts +126 -0
- package/lib/data-governance/governed-payload-write-saga.d.ts.map +1 -0
- package/lib/data-governance/governed-payload-write-saga.js +471 -0
- package/lib/data-governance/governed-payload-write-saga.js.map +1 -0
- package/lib/data-governance/payload-hold-overdue-projection.d.ts +57 -0
- package/lib/data-governance/payload-hold-overdue-projection.d.ts.map +1 -0
- package/lib/data-governance/payload-hold-overdue-projection.js +80 -0
- package/lib/data-governance/payload-hold-overdue-projection.js.map +1 -0
- package/lib/data-governance/payload-lifecycle.d.ts +359 -0
- package/lib/data-governance/payload-lifecycle.d.ts.map +1 -0
- package/lib/data-governance/payload-lifecycle.js +930 -0
- package/lib/data-governance/payload-lifecycle.js.map +1 -0
- package/lib/data-governance/payload-vault-storage-handoff.d.ts +255 -0
- package/lib/data-governance/payload-vault-storage-handoff.d.ts.map +1 -0
- package/lib/data-governance/payload-vault-storage-handoff.js +471 -0
- package/lib/data-governance/payload-vault-storage-handoff.js.map +1 -0
- package/lib/defaults/hooks.d.ts +2 -2
- package/lib/defaults/hooks.d.ts.map +1 -1
- package/lib/defaults/hooks.js +2 -2
- package/lib/defaults/hooks.js.map +1 -1
- package/lib/defaults/subagents.d.ts +2 -2
- package/lib/defaults/subagents.d.ts.map +1 -1
- package/lib/defaults/subagents.js +2 -2
- package/lib/defaults/subagents.js.map +1 -1
- package/lib/defaults/tools.d.ts +1 -2
- package/lib/defaults/tools.js +2 -2
- package/lib/defaults/tools.js.map +1 -1
- package/lib/discovery/agent-surface-info.d.ts +0 -2
- package/lib/discovery/agent-surface-info.d.ts.map +1 -1
- package/lib/discovery/agent-surface-info.js +0 -5
- package/lib/discovery/agent-surface-info.js.map +1 -1
- package/lib/discovery/agent-surface.d.ts.map +1 -1
- package/lib/discovery/agent-surface.js +0 -39
- package/lib/discovery/agent-surface.js.map +1 -1
- package/lib/event/agent-stream-hooks.d.ts +1 -1
- package/lib/event/hook-stream-sink.d.ts +1 -1
- package/lib/event/publish-agent-stream.d.ts +3 -3
- package/lib/event/publish-agent-stream.d.ts.map +1 -1
- package/lib/event/publish-agent-stream.js +1 -1
- package/lib/event/publish-agent-stream.js.map +1 -1
- package/lib/event/session-events.d.ts +1 -1
- package/lib/event/turn-event.d.ts +22 -2
- package/lib/event/turn-event.d.ts.map +1 -1
- package/lib/event/turn-event.js.map +1 -1
- package/lib/event/turn-to-agent-stream.js +6 -0
- package/lib/event/turn-to-agent-stream.js.map +1 -1
- package/lib/features/agent-feature.d.ts +1 -1
- package/lib/features/mcp-feature.d.ts +1 -1
- package/lib/index.d.ts +99 -33
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +94 -21
- package/lib/index.js.map +1 -1
- package/lib/ingress/capability-ingress.d.ts +5 -5
- package/lib/ingress/capability-ingress.d.ts.map +1 -1
- package/lib/ingress/capability-ingress.js +26 -26
- package/lib/ingress/capability-ingress.js.map +1 -1
- package/lib/init/activate-ai-database-storage.d.ts +5 -3
- package/lib/init/activate-ai-database-storage.d.ts.map +1 -1
- package/lib/init/activate-ai-database-storage.js +23 -32
- package/lib/init/activate-ai-database-storage.js.map +1 -1
- package/lib/init/configure-zhin-agent.d.ts +1 -1
- package/lib/init/configure-zhin-agent.d.ts.map +1 -1
- package/lib/init/configure-zhin-agent.js +3 -5
- package/lib/init/configure-zhin-agent.js.map +1 -1
- package/lib/init/define-ai-database-models.d.ts.map +1 -1
- package/lib/init/define-ai-database-models.js +21 -5
- package/lib/init/define-ai-database-models.js.map +1 -1
- package/lib/init/dispose-zhin-agent.d.ts +1 -3
- package/lib/init/dispose-zhin-agent.d.ts.map +1 -1
- package/lib/init/dispose-zhin-agent.js +0 -2
- package/lib/init/dispose-zhin-agent.js.map +1 -1
- package/lib/init/introspection-collectors.d.ts +1 -1
- package/lib/init/introspection-collectors.d.ts.map +1 -1
- package/lib/init/introspection-collectors.js +13 -14
- package/lib/init/introspection-collectors.js.map +1 -1
- package/lib/internal/agent-host.d.ts +5 -8
- package/lib/internal/agent-host.d.ts.map +1 -1
- package/lib/internal/host-types.d.ts +4 -0
- package/lib/internal/host-types.d.ts.map +1 -1
- package/lib/journal/persistent-turn-journal.d.ts +5 -1
- package/lib/journal/persistent-turn-journal.d.ts.map +1 -1
- package/lib/journal/persistent-turn-journal.js +11 -1
- package/lib/journal/persistent-turn-journal.js.map +1 -1
- package/lib/mcp-client/bridge.d.ts +1 -1
- package/lib/mcp-client/connection.d.ts +1 -1
- package/lib/mcp-client/index.d.ts +1 -1
- package/lib/media/media-normalize.d.ts +9 -5
- package/lib/media/media-normalize.d.ts.map +1 -1
- package/lib/media/media-normalize.js +125 -69
- package/lib/media/media-normalize.js.map +1 -1
- package/lib/media/media-publisher.d.ts.map +1 -1
- package/lib/media/media-publisher.js +48 -3
- package/lib/media/media-publisher.js.map +1 -1
- package/lib/media/vision-capability.js +1 -1
- package/lib/media/vision-capability.js.map +1 -1
- package/lib/memory/index.d.ts +1 -1
- package/lib/memory/index.d.ts.map +1 -1
- package/lib/plugin-ai-hook-bus.d.ts +1 -1
- package/lib/plugin-runtime/agent-host-port.d.ts +66 -4
- package/lib/plugin-runtime/agent-host-port.d.ts.map +1 -1
- package/lib/plugin-runtime/agent-host-port.js.map +1 -1
- package/lib/plugin-runtime/agent-runtime.d.ts +3 -0
- package/lib/plugin-runtime/agent-runtime.d.ts.map +1 -1
- package/lib/plugin-runtime/agent-runtime.js +73 -3
- package/lib/plugin-runtime/agent-runtime.js.map +1 -1
- package/lib/plugin-runtime/agent-trace-runtime.d.ts +37 -0
- package/lib/plugin-runtime/agent-trace-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/agent-trace-runtime.js +150 -0
- package/lib/plugin-runtime/agent-trace-runtime.js.map +1 -0
- package/lib/plugin-runtime/capability-tools.js +2 -2
- package/lib/plugin-runtime/capability-tools.js.map +1 -1
- package/lib/plugin-runtime/database-overlay-pack-promotion-repository.d.ts +70 -0
- package/lib/plugin-runtime/database-overlay-pack-promotion-repository.d.ts.map +1 -0
- package/lib/plugin-runtime/database-overlay-pack-promotion-repository.js +203 -0
- package/lib/plugin-runtime/database-overlay-pack-promotion-repository.js.map +1 -0
- package/lib/plugin-runtime/deferred-capability-plan.d.ts +26 -0
- package/lib/plugin-runtime/deferred-capability-plan.d.ts.map +1 -1
- package/lib/plugin-runtime/deferred-capability-plan.js +98 -4
- package/lib/plugin-runtime/deferred-capability-plan.js.map +1 -1
- package/lib/plugin-runtime/full-agent-turn-engine.js +48 -5
- package/lib/plugin-runtime/full-agent-turn-engine.js.map +1 -1
- package/lib/plugin-runtime/host-mcp-projection.d.ts +1 -1
- package/lib/plugin-runtime/index.d.ts +66 -0
- package/lib/plugin-runtime/index.d.ts.map +1 -1
- package/lib/plugin-runtime/index.js +65 -0
- package/lib/plugin-runtime/index.js.map +1 -1
- package/lib/plugin-runtime/native-interaction-tools.js +1 -1
- package/lib/plugin-runtime/native-interaction-tools.js.map +1 -1
- package/lib/plugin-runtime/native-semantic-memory-tools.d.ts +17 -0
- package/lib/plugin-runtime/native-semantic-memory-tools.d.ts.map +1 -0
- package/lib/plugin-runtime/native-semantic-memory-tools.js +169 -0
- package/lib/plugin-runtime/native-semantic-memory-tools.js.map +1 -0
- package/lib/plugin-runtime/turn-intent-resolver.d.ts +20 -0
- package/lib/plugin-runtime/turn-intent-resolver.d.ts.map +1 -0
- package/lib/plugin-runtime/turn-intent-resolver.js +8 -0
- package/lib/plugin-runtime/turn-intent-resolver.js.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-authority.d.ts +5 -0
- package/lib/plugin-runtime/workroom-acceptance-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-authority.js +14 -0
- package/lib/plugin-runtime/workroom-acceptance-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-fact-providers.d.ts +233 -0
- package/lib/plugin-runtime/workroom-acceptance-fact-providers.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-fact-providers.js +517 -0
- package/lib/plugin-runtime/workroom-acceptance-fact-providers.js.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.d.ts +139 -0
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.js +430 -0
- package/lib/plugin-runtime/workroom-acceptance-internal-providers.js.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-policy.d.ts +4 -0
- package/lib/plugin-runtime/workroom-acceptance-policy.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-policy.js +20 -0
- package/lib/plugin-runtime/workroom-acceptance-policy.js.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts +175 -0
- package/lib/plugin-runtime/workroom-acceptance-production-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-production-composition.js +793 -0
- package/lib/plugin-runtime/workroom-acceptance-production-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts +186 -0
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.js +553 -0
- package/lib/plugin-runtime/workroom-acceptance-provider-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts +75 -0
- package/lib/plugin-runtime/workroom-accepted-source-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-accepted-source-runtime.js +267 -0
- package/lib/plugin-runtime/workroom-accepted-source-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-assignment-authority-grant-runtime.d.ts +42 -0
- package/lib/plugin-runtime/workroom-assignment-authority-grant-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-assignment-authority-grant-runtime.js +90 -0
- package/lib/plugin-runtime/workroom-assignment-authority-grant-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts +159 -0
- package/lib/plugin-runtime/workroom-assignment-authority-provider.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-assignment-authority-provider.js +595 -0
- package/lib/plugin-runtime/workroom-assignment-authority-provider.js.map +1 -0
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts +58 -0
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.js +218 -0
- package/lib/plugin-runtime/workroom-assignment-knowledge-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.d.ts +47 -0
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.js +115 -0
- package/lib/plugin-runtime/workroom-data-governance-authority-writer.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-composition.d.ts +28 -0
- package/lib/plugin-runtime/workroom-data-governance-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-composition.js +41 -0
- package/lib/plugin-runtime/workroom-data-governance-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-root-provider.d.ts +51 -0
- package/lib/plugin-runtime/workroom-data-governance-root-provider.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-root-provider.js +66 -0
- package/lib/plugin-runtime/workroom-data-governance-root-provider.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts +134 -0
- package/lib/plugin-runtime/workroom-data-governance-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-runtime.js +1253 -0
- package/lib/plugin-runtime/workroom-data-governance-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-storage.d.ts +66 -0
- package/lib/plugin-runtime/workroom-data-governance-storage.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-governance-storage.js +160 -0
- package/lib/plugin-runtime/workroom-data-governance-storage.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-composition.d.ts +37 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-composition.js +131 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-console.d.ts +238 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-console.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-console.js +495 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-console.js.map +1 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-human-ingress.d.ts +15 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-human-ingress.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-human-ingress.js +119 -0
- package/lib/plugin-runtime/workroom-data-lifecycle-human-ingress.js.map +1 -0
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.d.ts +142 -0
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.js +301 -0
- package/lib/plugin-runtime/workroom-dynamic-planning-provider.js.map +1 -0
- package/lib/plugin-runtime/workroom-dynamic-planning.d.ts +4 -0
- package/lib/plugin-runtime/workroom-dynamic-planning.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-dynamic-planning.js +13 -0
- package/lib/plugin-runtime/workroom-dynamic-planning.js.map +1 -0
- package/lib/plugin-runtime/workroom-effect-composition.d.ts +37 -0
- package/lib/plugin-runtime/workroom-effect-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-effect-composition.js +69 -0
- package/lib/plugin-runtime/workroom-effect-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-effect-production.d.ts +133 -0
- package/lib/plugin-runtime/workroom-effect-production.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-effect-production.js +272 -0
- package/lib/plugin-runtime/workroom-effect-production.js.map +1 -0
- package/lib/plugin-runtime/workroom-effect-runtime.d.ts +72 -0
- package/lib/plugin-runtime/workroom-effect-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-effect-runtime.js +179 -0
- package/lib/plugin-runtime/workroom-effect-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts +27 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.js +40 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-reasons.d.ts +10 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-reasons.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-reasons.js +20 -0
- package/lib/plugin-runtime/workroom-governed-dispatch-reasons.js.map +1 -0
- package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts +16 -0
- package/lib/plugin-runtime/workroom-journal-payload-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-journal-payload-composition.js +69 -0
- package/lib/plugin-runtime/workroom-journal-payload-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.d.ts +17 -0
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.js +101 -0
- package/lib/plugin-runtime/workroom-local-agent-core-adapter.js.map +1 -0
- package/lib/plugin-runtime/workroom-local-agent-loop.d.ts +90 -0
- package/lib/plugin-runtime/workroom-local-agent-loop.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-local-agent-loop.js +303 -0
- package/lib/plugin-runtime/workroom-local-agent-loop.js.map +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-authority.d.ts +5 -0
- package/lib/plugin-runtime/workroom-local-assignment-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-authority.js +16 -0
- package/lib/plugin-runtime/workroom-local-assignment-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-runtime.d.ts +33 -0
- package/lib/plugin-runtime/workroom-local-assignment-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-runtime.js +189 -0
- package/lib/plugin-runtime/workroom-local-assignment-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-supply.d.ts +39 -0
- package/lib/plugin-runtime/workroom-local-assignment-supply.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-local-assignment-supply.js +107 -0
- package/lib/plugin-runtime/workroom-local-assignment-supply.js.map +1 -0
- package/lib/plugin-runtime/workroom-overlay-pack-promotion.d.ts +145 -0
- package/lib/plugin-runtime/workroom-overlay-pack-promotion.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-overlay-pack-promotion.js +516 -0
- package/lib/plugin-runtime/workroom-overlay-pack-promotion.js.map +1 -0
- package/lib/plugin-runtime/workroom-payload-processor-recall.d.ts +91 -0
- package/lib/plugin-runtime/workroom-payload-processor-recall.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-payload-processor-recall.js +189 -0
- package/lib/plugin-runtime/workroom-payload-processor-recall.js.map +1 -0
- package/lib/plugin-runtime/workroom-plan-gate-authority.d.ts +7 -0
- package/lib/plugin-runtime/workroom-plan-gate-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-plan-gate-authority.js +40 -0
- package/lib/plugin-runtime/workroom-plan-gate-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-capacity.d.ts +132 -0
- package/lib/plugin-runtime/workroom-portfolio-capacity.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-capacity.js +189 -0
- package/lib/plugin-runtime/workroom-portfolio-capacity.js.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts +38 -0
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.js +103 -0
- package/lib/plugin-runtime/workroom-portfolio-checkpoint-ack.js.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-control-composition.d.ts +30 -0
- package/lib/plugin-runtime/workroom-portfolio-control-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-control-composition.js +102 -0
- package/lib/plugin-runtime/workroom-portfolio-control-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.d.ts +41 -0
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.js +208 -0
- package/lib/plugin-runtime/workroom-portfolio-control-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts +141 -0
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.js +331 -0
- package/lib/plugin-runtime/workroom-portfolio-grant-assignment.js.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts +23 -0
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.js +82 -0
- package/lib/plugin-runtime/workroom-portfolio-kernel-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-sponsor.d.ts +96 -0
- package/lib/plugin-runtime/workroom-portfolio-sponsor.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-portfolio-sponsor.js +313 -0
- package/lib/plugin-runtime/workroom-portfolio-sponsor.js.map +1 -0
- package/lib/plugin-runtime/workroom-preemption-runtime.d.ts +57 -0
- package/lib/plugin-runtime/workroom-preemption-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-preemption-runtime.js +163 -0
- package/lib/plugin-runtime/workroom-preemption-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-priority-authority.d.ts +11 -0
- package/lib/plugin-runtime/workroom-priority-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-priority-authority.js +72 -0
- package/lib/plugin-runtime/workroom-priority-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-profile-authority-composition.d.ts +61 -0
- package/lib/plugin-runtime/workroom-profile-authority-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-profile-authority-composition.js +231 -0
- package/lib/plugin-runtime/workroom-profile-authority-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-profile-authority-runtime.d.ts +228 -0
- package/lib/plugin-runtime/workroom-profile-authority-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-profile-authority-runtime.js +1132 -0
- package/lib/plugin-runtime/workroom-profile-authority-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-projection-outbound.d.ts +10 -0
- package/lib/plugin-runtime/workroom-projection-outbound.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-projection-outbound.js +35 -0
- package/lib/plugin-runtime/workroom-projection-outbound.js.map +1 -0
- package/lib/plugin-runtime/workroom-projection-runtime.d.ts +87 -0
- package/lib/plugin-runtime/workroom-projection-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-projection-runtime.js +421 -0
- package/lib/plugin-runtime/workroom-projection-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-remote-assignment-authority.d.ts +9 -0
- package/lib/plugin-runtime/workroom-remote-assignment-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-remote-assignment-authority.js +20 -0
- package/lib/plugin-runtime/workroom-remote-assignment-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts +38 -0
- package/lib/plugin-runtime/workroom-remote-callback-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-remote-callback-runtime.js +80 -0
- package/lib/plugin-runtime/workroom-remote-callback-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-remote-executor.d.ts +20 -0
- package/lib/plugin-runtime/workroom-remote-executor.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-remote-executor.js +42 -0
- package/lib/plugin-runtime/workroom-remote-executor.js.map +1 -0
- package/lib/plugin-runtime/workroom-reviewer-authority-runtime.d.ts +72 -0
- package/lib/plugin-runtime/workroom-reviewer-authority-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-reviewer-authority-runtime.js +142 -0
- package/lib/plugin-runtime/workroom-reviewer-authority-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-risk-acceptance-runtime.d.ts +112 -0
- package/lib/plugin-runtime/workroom-risk-acceptance-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-risk-acceptance-runtime.js +376 -0
- package/lib/plugin-runtime/workroom-risk-acceptance-runtime.js.map +1 -0
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts +42 -0
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.js +125 -0
- package/lib/plugin-runtime/workroom-run-profile-pin-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts +25 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.js +79 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-composition.js.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-contract.d.ts +16 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-contract.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-contract.js +49 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-contract.js.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts +63 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.js +233 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-request-authority.js.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.d.ts +37 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.js +122 -0
- package/lib/plugin-runtime/workroom-scheduler-portfolio-supply.js.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-route-registry.d.ts +27 -0
- package/lib/plugin-runtime/workroom-scheduler-route-registry.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-route-registry.js +136 -0
- package/lib/plugin-runtime/workroom-scheduler-route-registry.js.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts +84 -0
- package/lib/plugin-runtime/workroom-scheduler-runtime.d.ts.map +1 -0
- package/lib/plugin-runtime/workroom-scheduler-runtime.js +231 -0
- package/lib/plugin-runtime/workroom-scheduler-runtime.js.map +1 -0
- package/lib/portfolio/capacity-control-outbox.d.ts +174 -0
- package/lib/portfolio/capacity-control-outbox.d.ts.map +1 -0
- package/lib/portfolio/capacity-control-outbox.js +338 -0
- package/lib/portfolio/capacity-control-outbox.js.map +1 -0
- package/lib/portfolio/database-capacity-control-outbox.d.ts +62 -0
- package/lib/portfolio/database-capacity-control-outbox.d.ts.map +1 -0
- package/lib/portfolio/database-capacity-control-outbox.js +166 -0
- package/lib/portfolio/database-capacity-control-outbox.js.map +1 -0
- package/lib/portfolio/file-capacity-control-outbox.d.ts +10 -0
- package/lib/portfolio/file-capacity-control-outbox.d.ts.map +1 -0
- package/lib/portfolio/file-capacity-control-outbox.js +113 -0
- package/lib/portfolio/file-capacity-control-outbox.js.map +1 -0
- package/lib/portfolio/file-portfolio-journal.d.ts +11 -0
- package/lib/portfolio/file-portfolio-journal.d.ts.map +1 -0
- package/lib/portfolio/file-portfolio-journal.js +196 -0
- package/lib/portfolio/file-portfolio-journal.js.map +1 -0
- package/lib/portfolio/portfolio-admission.d.ts +95 -0
- package/lib/portfolio/portfolio-admission.d.ts.map +1 -0
- package/lib/portfolio/portfolio-admission.js +1080 -0
- package/lib/portfolio/portfolio-admission.js.map +1 -0
- package/lib/portfolio/portfolio-journal.d.ts +359 -0
- package/lib/portfolio/portfolio-journal.d.ts.map +1 -0
- package/lib/portfolio/portfolio-journal.js +844 -0
- package/lib/portfolio/portfolio-journal.js.map +1 -0
- package/lib/portfolio/resource-bundle.d.ts +136 -0
- package/lib/portfolio/resource-bundle.d.ts.map +1 -0
- package/lib/portfolio/resource-bundle.js +387 -0
- package/lib/portfolio/resource-bundle.js.map +1 -0
- package/lib/portfolio/sponsor-projection.d.ts +78 -0
- package/lib/portfolio/sponsor-projection.d.ts.map +1 -0
- package/lib/portfolio/sponsor-projection.js +135 -0
- package/lib/portfolio/sponsor-projection.js.map +1 -0
- package/lib/prompt/assembly.d.ts.map +1 -1
- package/lib/prompt/assembly.js +1 -3
- package/lib/prompt/assembly.js.map +1 -1
- package/lib/prompt/prompt-builder.d.ts +1 -1
- package/lib/prompt/prompt-builder.d.ts.map +1 -1
- package/lib/prompt/system-prompt.d.ts +1 -1
- package/lib/prompt/system-prompt.js +2 -2
- package/lib/prompt/system-prompt.js.map +1 -1
- package/lib/reserved-tools.d.ts.map +1 -1
- package/lib/reserved-tools.js +0 -1
- package/lib/reserved-tools.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/hook-registry.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/hook-registry.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/index.d.ts +4 -11
- package/lib/{orchestrator → resource-hub}/index.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/index.js +4 -8
- package/lib/{orchestrator → resource-hub}/index.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/mcp-lifecycle.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/mcp-lifecycle.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/mcp-registry.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/mcp-registry.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/resolve-subagent-tools.d.ts +3 -3
- package/lib/resource-hub/resolve-subagent-tools.d.ts.map +1 -0
- package/lib/{orchestrator → resource-hub}/resolve-subagent-tools.js +18 -13
- package/lib/resource-hub/resolve-subagent-tools.js.map +1 -0
- package/lib/{orchestrator → resource-hub}/resource-registry.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/resource-registry.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/role-configs.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/role-configs.js +0 -2
- package/lib/{orchestrator → resource-hub}/role-configs.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/skill-registry.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/skill-registry.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/subagent-registry.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/subagent-registry.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/tool-registry.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/tool-registry.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/tool-selection.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/tool-selection.js.map +1 -1
- package/lib/{orchestrator → resource-hub}/types.d.ts +1 -1
- package/lib/{orchestrator → resource-hub}/types.d.ts.map +1 -1
- package/lib/{orchestrator → resource-hub}/types.js.map +1 -1
- package/lib/routing/workroom-bot-identity.d.ts +22 -0
- package/lib/routing/workroom-bot-identity.d.ts.map +1 -0
- package/lib/routing/workroom-bot-identity.js +46 -0
- package/lib/routing/workroom-bot-identity.js.map +1 -0
- package/lib/schedule-domain/budget-guard.d.ts +1 -1
- package/lib/schedule-domain/budget-guard.d.ts.map +1 -1
- package/lib/schedule-domain/budget-guard.js +9 -1
- package/lib/schedule-domain/budget-guard.js.map +1 -1
- package/lib/schedule-domain/execution-domain.d.ts +1 -0
- package/lib/schedule-domain/execution-domain.d.ts.map +1 -1
- package/lib/schedule-domain/execution-domain.js +3 -1
- package/lib/schedule-domain/execution-domain.js.map +1 -1
- package/lib/schedule-domain/schedule-execution-queue.d.ts +24 -0
- package/lib/schedule-domain/schedule-execution-queue.d.ts.map +1 -0
- package/lib/schedule-domain/schedule-execution-queue.js +123 -0
- package/lib/schedule-domain/schedule-execution-queue.js.map +1 -0
- package/lib/seam/seam-integration.d.ts +1 -1
- package/lib/seam/seam-integration.js +1 -1
- package/lib/seam/skill-service.d.ts +1 -1
- package/lib/security/exec-policy.d.ts +11 -1
- package/lib/security/exec-policy.d.ts.map +1 -1
- package/lib/security/exec-policy.js +16 -4
- package/lib/security/exec-policy.js.map +1 -1
- package/lib/security/policy-facade.d.ts.map +1 -1
- package/lib/security/policy-facade.js +60 -5
- package/lib/security/policy-facade.js.map +1 -1
- package/lib/security/sandbox-docker.js +1 -1
- package/lib/security/sandbox-docker.js.map +1 -1
- package/lib/security/sandbox.d.ts +2 -0
- package/lib/security/sandbox.d.ts.map +1 -1
- package/lib/security/sandbox.js +16 -4
- package/lib/security/sandbox.js.map +1 -1
- package/lib/security/turn-file-authority.d.ts +1 -1
- package/lib/security/turn-file-authority.d.ts.map +1 -1
- package/lib/security/turn-file-authority.js +10 -3
- package/lib/security/turn-file-authority.js.map +1 -1
- package/lib/security/turn-sandbox-authority.d.ts +13 -0
- package/lib/security/turn-sandbox-authority.d.ts.map +1 -0
- package/lib/security/turn-sandbox-authority.js +42 -0
- package/lib/security/turn-sandbox-authority.js.map +1 -0
- package/lib/service.d.ts +2 -0
- package/lib/service.d.ts.map +1 -1
- package/lib/service.js +2 -1
- package/lib/service.js.map +1 -1
- package/lib/session/approval-port.d.ts +2 -0
- package/lib/session/approval-port.d.ts.map +1 -1
- package/lib/session/approval-port.js.map +1 -1
- package/lib/session/index.d.ts +2 -6
- package/lib/session/index.d.ts.map +1 -1
- package/lib/session/index.js +2 -4
- package/lib/session/index.js.map +1 -1
- package/lib/session/session-io.d.ts +2 -6
- package/lib/session/session-io.d.ts.map +1 -1
- package/lib/session/session-io.js +4 -20
- package/lib/session/session-io.js.map +1 -1
- package/lib/session/session-system.d.ts +0 -2
- package/lib/session/session-system.d.ts.map +1 -1
- package/lib/session/session-system.js +2 -13
- package/lib/session/session-system.js.map +1 -1
- package/lib/session/turn-ingress-session.d.ts +1 -5
- package/lib/session/turn-ingress-session.d.ts.map +1 -1
- package/lib/session/turn-ingress-session.js +27 -29
- package/lib/session/turn-ingress-session.js.map +1 -1
- package/lib/session-tree-runtime.d.ts +15 -0
- package/lib/session-tree-runtime.d.ts.map +1 -0
- package/lib/{session-tree-runtime-registry.js → session-tree-runtime.js} +5 -15
- package/lib/session-tree-runtime.js.map +1 -0
- package/lib/skill/index.d.ts +2 -2
- package/lib/skill/index.d.ts.map +1 -1
- package/lib/skill/index.js +1 -1
- package/lib/skill/skill-registry-as-service.d.ts +1 -1
- package/lib/skill/skill-system.d.ts +4 -4
- package/lib/skill/skill-system.d.ts.map +1 -1
- package/lib/skill/skill-system.js +2 -2
- package/lib/skill/skill-system.js.map +1 -1
- package/lib/subagent/subagent-runtime.d.ts +2 -7
- package/lib/subagent/subagent-runtime.d.ts.map +1 -1
- package/lib/subagent/subagent-runtime.js +4 -43
- package/lib/subagent/subagent-runtime.js.map +1 -1
- package/lib/subagent/subagent-system-init.d.ts.map +1 -1
- package/lib/subagent/subagent-system-init.js +0 -2
- package/lib/subagent/subagent-system-init.js.map +1 -1
- package/lib/subagent-ai-events.d.ts +1 -1
- package/lib/subagent-ai-events.js +1 -1
- package/lib/subagent-preset.d.ts +1 -1
- package/lib/subagent-preset.d.ts.map +1 -1
- package/lib/subagent-prompt.d.ts +0 -2
- package/lib/subagent-prompt.d.ts.map +1 -1
- package/lib/subagent-prompt.js +3 -3
- package/lib/subagent-prompt.js.map +1 -1
- package/lib/task-executor.d.ts +1 -0
- package/lib/task-executor.d.ts.map +1 -1
- package/lib/task-executor.js +4 -1
- package/lib/task-executor.js.map +1 -1
- package/lib/tool/classic-tool-execution-authority.js +2 -2
- package/lib/tool/classic-tool-execution-authority.js.map +1 -1
- package/lib/tool/context-tools.d.ts +1 -4
- package/lib/tool/context-tools.d.ts.map +1 -1
- package/lib/tool/context-tools.js +0 -50
- package/lib/tool/context-tools.js.map +1 -1
- package/lib/tool/contracts.d.ts +1 -1
- package/lib/tool/conversation-reference-tool.d.ts +5 -0
- package/lib/tool/conversation-reference-tool.d.ts.map +1 -0
- package/lib/tool/conversation-reference-tool.js +40 -0
- package/lib/tool/conversation-reference-tool.js.map +1 -0
- package/lib/tool/index.d.ts +1 -0
- package/lib/tool/index.d.ts.map +1 -1
- package/lib/tool/index.js +1 -0
- package/lib/tool/index.js.map +1 -1
- package/lib/tool/prepare-turn-tools.d.ts.map +1 -1
- package/lib/tool/prepare-turn-tools.js +7 -22
- package/lib/tool/prepare-turn-tools.js.map +1 -1
- package/lib/tool/runtime.d.ts +3 -4
- package/lib/tool/runtime.d.ts.map +1 -1
- package/lib/tool/runtime.js +0 -1
- package/lib/tool/runtime.js.map +1 -1
- package/lib/tool/sources.d.ts +3 -4
- package/lib/tool/sources.d.ts.map +1 -1
- package/lib/tool/sources.js +2 -6
- package/lib/tool/sources.js.map +1 -1
- package/lib/tool/tool-approval-once-store.d.ts +1 -1
- package/lib/tool/tool-approval-once-store.js +1 -1
- package/lib/tool/tool-system.d.ts.map +1 -1
- package/lib/tool/tool-system.js.map +1 -1
- package/lib/tool/turn-tool-runtime.d.ts +2 -1
- package/lib/tool/turn-tool-runtime.d.ts.map +1 -1
- package/lib/tool/turn-tool-runtime.js +76 -21
- package/lib/tool/turn-tool-runtime.js.map +1 -1
- package/lib/tool-bridge.d.ts +2 -2
- package/lib/tool-bridge.js +1 -1
- package/lib/tool-catalog/deferred-turn-controller.d.ts +1 -1
- package/lib/tool-catalog/tool-catalog.d.ts +1 -1
- package/lib/turn/auto-continue.d.ts +1 -1
- package/lib/turn/deferred-delivery.d.ts +1 -1
- package/lib/turn/inbound-media.d.ts +12 -8
- package/lib/turn/inbound-media.d.ts.map +1 -1
- package/lib/turn/inbound-media.js +61 -42
- package/lib/turn/inbound-media.js.map +1 -1
- package/lib/turn/inbound-queue-config.d.ts +1 -1
- package/lib/turn/inbound-queue-runtime.d.ts +1 -1
- package/lib/turn/inbound-turn-queue.d.ts +1 -1
- package/lib/turn/index.d.ts +1 -1
- package/lib/turn/index.d.ts.map +1 -1
- package/lib/turn/index.js.map +1 -1
- package/lib/turn/persist-deferred-context.d.ts +1 -1
- package/lib/turn/persist-subagent-context.d.ts +1 -1
- package/lib/turn/process-stream.d.ts +1 -1
- package/lib/turn/prompt-api.d.ts +1 -1
- package/lib/turn/prompt-controller.d.ts +6 -0
- package/lib/turn/prompt-controller.d.ts.map +1 -1
- package/lib/turn/prompt-controller.js +58 -5
- package/lib/turn/prompt-controller.js.map +1 -1
- package/lib/turn/turn-ingress.d.ts +55 -5
- package/lib/turn/turn-ingress.d.ts.map +1 -1
- package/lib/turn/turn-ingress.js +18 -0
- package/lib/turn/turn-ingress.js.map +1 -1
- package/lib/turn/turn-pipeline.d.ts.map +1 -1
- package/lib/turn/turn-pipeline.js +5 -4
- package/lib/turn/turn-pipeline.js.map +1 -1
- package/lib/utils/keyed-mutex.d.ts +1 -1
- package/lib/utils/keyed-mutex.d.ts.map +1 -1
- package/lib/utils/keyed-mutex.js +32 -5
- package/lib/utils/keyed-mutex.js.map +1 -1
- package/lib/workroom/acceptance-control.d.ts +76 -0
- package/lib/workroom/acceptance-control.d.ts.map +1 -0
- package/lib/workroom/acceptance-control.js +335 -0
- package/lib/workroom/acceptance-control.js.map +1 -0
- package/lib/workroom/acceptance-policy.d.ts +152 -0
- package/lib/workroom/acceptance-policy.d.ts.map +1 -0
- package/lib/workroom/acceptance-policy.js +610 -0
- package/lib/workroom/acceptance-policy.js.map +1 -0
- package/lib/workroom/accepted-source-memory-application.d.ts +113 -0
- package/lib/workroom/accepted-source-memory-application.d.ts.map +1 -0
- package/lib/workroom/accepted-source-memory-application.js +327 -0
- package/lib/workroom/accepted-source-memory-application.js.map +1 -0
- package/lib/workroom/accepted-source-projector.d.ts +89 -0
- package/lib/workroom/accepted-source-projector.d.ts.map +1 -0
- package/lib/workroom/accepted-source-projector.js +281 -0
- package/lib/workroom/accepted-source-projector.js.map +1 -0
- package/lib/workroom/assignment-authority-grant-application.d.ts +125 -0
- package/lib/workroom/assignment-authority-grant-application.d.ts.map +1 -0
- package/lib/workroom/assignment-authority-grant-application.js +317 -0
- package/lib/workroom/assignment-authority-grant-application.js.map +1 -0
- package/lib/workroom/assignment-authority-grant-repository.d.ts +151 -0
- package/lib/workroom/assignment-authority-grant-repository.d.ts.map +1 -0
- package/lib/workroom/assignment-authority-grant-repository.js +387 -0
- package/lib/workroom/assignment-authority-grant-repository.js.map +1 -0
- package/lib/workroom/assignment-executor.d.ts +110 -0
- package/lib/workroom/assignment-executor.d.ts.map +1 -0
- package/lib/workroom/assignment-executor.js +371 -0
- package/lib/workroom/assignment-executor.js.map +1 -0
- package/lib/workroom/assignment-observation-ingress.d.ts +21 -0
- package/lib/workroom/assignment-observation-ingress.d.ts.map +1 -0
- package/lib/workroom/assignment-observation-ingress.js +24 -0
- package/lib/workroom/assignment-observation-ingress.js.map +1 -0
- package/lib/workroom/canonical-value.d.ts +7 -0
- package/lib/workroom/canonical-value.d.ts.map +1 -0
- package/lib/workroom/canonical-value.js +32 -0
- package/lib/workroom/canonical-value.js.map +1 -0
- package/lib/workroom/catalog-definition.d.ts +49 -0
- package/lib/workroom/catalog-definition.d.ts.map +1 -0
- package/lib/workroom/catalog-definition.js +2 -0
- package/lib/workroom/catalog-definition.js.map +1 -0
- package/lib/workroom/catalog.d.ts +80 -0
- package/lib/workroom/catalog.d.ts.map +1 -0
- package/lib/workroom/catalog.js +372 -0
- package/lib/workroom/catalog.js.map +1 -0
- package/lib/workroom/database-project-knowledge-journal.d.ts +62 -0
- package/lib/workroom/database-project-knowledge-journal.d.ts.map +1 -0
- package/lib/workroom/database-project-knowledge-journal.js +161 -0
- package/lib/workroom/database-project-knowledge-journal.js.map +1 -0
- package/lib/workroom/durable-file-store.d.ts +52 -0
- package/lib/workroom/durable-file-store.d.ts.map +1 -0
- package/lib/workroom/durable-file-store.js +117 -0
- package/lib/workroom/durable-file-store.js.map +1 -0
- package/lib/workroom/dynamic-workflow-planner.d.ts +86 -0
- package/lib/workroom/dynamic-workflow-planner.d.ts.map +1 -0
- package/lib/workroom/dynamic-workflow-planner.js +260 -0
- package/lib/workroom/dynamic-workflow-planner.js.map +1 -0
- package/lib/workroom/effect-blocker-repository.d.ts +35 -0
- package/lib/workroom/effect-blocker-repository.d.ts.map +1 -0
- package/lib/workroom/effect-blocker-repository.js +174 -0
- package/lib/workroom/effect-blocker-repository.js.map +1 -0
- package/lib/workroom/effect-ledger.d.ts +191 -0
- package/lib/workroom/effect-ledger.d.ts.map +1 -0
- package/lib/workroom/effect-ledger.js +443 -0
- package/lib/workroom/effect-ledger.js.map +1 -0
- package/lib/workroom/file-accepted-source-memory-repository.d.ts +15 -0
- package/lib/workroom/file-accepted-source-memory-repository.d.ts.map +1 -0
- package/lib/workroom/file-accepted-source-memory-repository.js +133 -0
- package/lib/workroom/file-accepted-source-memory-repository.js.map +1 -0
- package/lib/workroom/file-effect-ledger.d.ts +10 -0
- package/lib/workroom/file-effect-ledger.d.ts.map +1 -0
- package/lib/workroom/file-effect-ledger.js +118 -0
- package/lib/workroom/file-effect-ledger.js.map +1 -0
- package/lib/workroom/file-human-ingress-application.d.ts +10 -0
- package/lib/workroom/file-human-ingress-application.d.ts.map +1 -0
- package/lib/workroom/file-human-ingress-application.js +177 -0
- package/lib/workroom/file-human-ingress-application.js.map +1 -0
- package/lib/workroom/file-human-ingress.d.ts +24 -0
- package/lib/workroom/file-human-ingress.d.ts.map +1 -0
- package/lib/workroom/file-human-ingress.js +234 -0
- package/lib/workroom/file-human-ingress.js.map +1 -0
- package/lib/workroom/file-interaction-space-binding-repository.d.ts +24 -0
- package/lib/workroom/file-interaction-space-binding-repository.d.ts.map +1 -0
- package/lib/workroom/file-interaction-space-binding-repository.js +293 -0
- package/lib/workroom/file-interaction-space-binding-repository.js.map +1 -0
- package/lib/workroom/file-profile-journal.d.ts +32 -0
- package/lib/workroom/file-profile-journal.d.ts.map +1 -0
- package/lib/workroom/file-profile-journal.js +308 -0
- package/lib/workroom/file-profile-journal.js.map +1 -0
- package/lib/workroom/git-workspace-gateway.d.ts +149 -0
- package/lib/workroom/git-workspace-gateway.d.ts.map +1 -0
- package/lib/workroom/git-workspace-gateway.js +248 -0
- package/lib/workroom/git-workspace-gateway.js.map +1 -0
- package/lib/workroom/human-ingress-application.d.ts +126 -0
- package/lib/workroom/human-ingress-application.d.ts.map +1 -0
- package/lib/workroom/human-ingress-application.js +414 -0
- package/lib/workroom/human-ingress-application.js.map +1 -0
- package/lib/workroom/human-ingress-orchestrator.d.ts +99 -0
- package/lib/workroom/human-ingress-orchestrator.d.ts.map +1 -0
- package/lib/workroom/human-ingress-orchestrator.js +234 -0
- package/lib/workroom/human-ingress-orchestrator.js.map +1 -0
- package/lib/workroom/human-ingress-source-reader.d.ts +29 -0
- package/lib/workroom/human-ingress-source-reader.d.ts.map +1 -0
- package/lib/workroom/human-ingress-source-reader.js +119 -0
- package/lib/workroom/human-ingress-source-reader.js.map +1 -0
- package/lib/workroom/human-ingress.d.ts +182 -0
- package/lib/workroom/human-ingress.d.ts.map +1 -0
- package/lib/workroom/human-ingress.js +526 -0
- package/lib/workroom/human-ingress.js.map +1 -0
- package/lib/workroom/interaction-space-binding-service.d.ts +57 -0
- package/lib/workroom/interaction-space-binding-service.d.ts.map +1 -0
- package/lib/workroom/interaction-space-binding-service.js +197 -0
- package/lib/workroom/interaction-space-binding-service.js.map +1 -0
- package/lib/workroom/interaction-space-router.d.ts +75 -0
- package/lib/workroom/interaction-space-router.d.ts.map +1 -0
- package/lib/workroom/interaction-space-router.js +243 -0
- package/lib/workroom/interaction-space-router.js.map +1 -0
- package/lib/workroom/journal-model.d.ts +40 -0
- package/lib/workroom/journal-model.d.ts.map +1 -0
- package/lib/workroom/journal-model.js +12 -0
- package/lib/workroom/journal-model.js.map +1 -0
- package/lib/workroom/journal.d.ts +214 -0
- package/lib/workroom/journal.d.ts.map +1 -0
- package/lib/workroom/journal.js +1935 -0
- package/lib/workroom/journal.js.map +1 -0
- package/lib/workroom/kernel-contracts.d.ts +167 -0
- package/lib/workroom/kernel-contracts.d.ts.map +1 -0
- package/lib/workroom/kernel-contracts.js +2 -0
- package/lib/workroom/kernel-contracts.js.map +1 -0
- package/lib/workroom/kernel-state.d.ts +5 -0
- package/lib/workroom/kernel-state.d.ts.map +1 -0
- package/lib/workroom/kernel-state.js +819 -0
- package/lib/workroom/kernel-state.js.map +1 -0
- package/lib/workroom/legacy-embedded-payload-migration.d.ts +89 -0
- package/lib/workroom/legacy-embedded-payload-migration.d.ts.map +1 -0
- package/lib/workroom/legacy-embedded-payload-migration.js +312 -0
- package/lib/workroom/legacy-embedded-payload-migration.js.map +1 -0
- package/lib/workroom/legacy-run-offline-migration.d.ts +84 -0
- package/lib/workroom/legacy-run-offline-migration.d.ts.map +1 -0
- package/lib/workroom/legacy-run-offline-migration.js +470 -0
- package/lib/workroom/legacy-run-offline-migration.js.map +1 -0
- package/lib/workroom/local-assignment-executor.d.ts +59 -0
- package/lib/workroom/local-assignment-executor.d.ts.map +1 -0
- package/lib/workroom/local-assignment-executor.js +197 -0
- package/lib/workroom/local-assignment-executor.js.map +1 -0
- package/lib/workroom/local-assignment-issuance.d.ts +68 -0
- package/lib/workroom/local-assignment-issuance.d.ts.map +1 -0
- package/lib/workroom/local-assignment-issuance.js +128 -0
- package/lib/workroom/local-assignment-issuance.js.map +1 -0
- package/lib/workroom/plan-approval-control.d.ts +52 -0
- package/lib/workroom/plan-approval-control.d.ts.map +1 -0
- package/lib/workroom/plan-approval-control.js +9 -0
- package/lib/workroom/plan-approval-control.js.map +1 -0
- package/lib/workroom/plan-revision.d.ts +44 -0
- package/lib/workroom/plan-revision.d.ts.map +1 -0
- package/lib/workroom/plan-revision.js +133 -0
- package/lib/workroom/plan-revision.js.map +1 -0
- package/lib/workroom/profile-compiler.d.ts +130 -0
- package/lib/workroom/profile-compiler.d.ts.map +1 -0
- package/lib/workroom/profile-compiler.js +357 -0
- package/lib/workroom/profile-compiler.js.map +1 -0
- package/lib/workroom/profile-registry.d.ts +191 -0
- package/lib/workroom/profile-registry.d.ts.map +1 -0
- package/lib/workroom/profile-registry.js +698 -0
- package/lib/workroom/profile-registry.js.map +1 -0
- package/lib/workroom/project-knowledge-registry.d.ts +136 -0
- package/lib/workroom/project-knowledge-registry.d.ts.map +1 -0
- package/lib/workroom/project-knowledge-registry.js +429 -0
- package/lib/workroom/project-knowledge-registry.js.map +1 -0
- package/lib/workroom/projection-outbox.d.ts +254 -0
- package/lib/workroom/projection-outbox.d.ts.map +1 -0
- package/lib/workroom/projection-outbox.js +1312 -0
- package/lib/workroom/projection-outbox.js.map +1 -0
- package/lib/workroom/remote-assignment-dispatch-command.d.ts +31 -0
- package/lib/workroom/remote-assignment-dispatch-command.d.ts.map +1 -0
- package/lib/workroom/remote-assignment-dispatch-command.js +56 -0
- package/lib/workroom/remote-assignment-dispatch-command.js.map +1 -0
- package/lib/workroom/remote-assignment-issuance.d.ts +88 -0
- package/lib/workroom/remote-assignment-issuance.d.ts.map +1 -0
- package/lib/workroom/remote-assignment-issuance.js +201 -0
- package/lib/workroom/remote-assignment-issuance.js.map +1 -0
- package/lib/workroom/remote-callback-application.d.ts +115 -0
- package/lib/workroom/remote-callback-application.d.ts.map +1 -0
- package/lib/workroom/remote-callback-application.js +570 -0
- package/lib/workroom/remote-callback-application.js.map +1 -0
- package/lib/workroom/remote-callback-gateway.d.ts +60 -0
- package/lib/workroom/remote-callback-gateway.d.ts.map +1 -0
- package/lib/workroom/remote-callback-gateway.js +173 -0
- package/lib/workroom/remote-callback-gateway.js.map +1 -0
- package/lib/workroom/remote-callback-inbox.d.ts +278 -0
- package/lib/workroom/remote-callback-inbox.d.ts.map +1 -0
- package/lib/workroom/remote-callback-inbox.js +1088 -0
- package/lib/workroom/remote-callback-inbox.js.map +1 -0
- package/lib/workroom/remote-callback-reconciliation-worker.d.ts +60 -0
- package/lib/workroom/remote-callback-reconciliation-worker.d.ts.map +1 -0
- package/lib/workroom/remote-callback-reconciliation-worker.js +197 -0
- package/lib/workroom/remote-callback-reconciliation-worker.js.map +1 -0
- package/lib/workroom/remote-dispatch-admission.d.ts +45 -0
- package/lib/workroom/remote-dispatch-admission.d.ts.map +1 -0
- package/lib/workroom/remote-dispatch-admission.js +187 -0
- package/lib/workroom/remote-dispatch-admission.js.map +1 -0
- package/lib/workroom/remote-dispatch-outbox.d.ts +203 -0
- package/lib/workroom/remote-dispatch-outbox.d.ts.map +1 -0
- package/lib/workroom/remote-dispatch-outbox.js +765 -0
- package/lib/workroom/remote-dispatch-outbox.js.map +1 -0
- package/lib/workroom/remote-dispatch-scheduler.d.ts +36 -0
- package/lib/workroom/remote-dispatch-scheduler.d.ts.map +1 -0
- package/lib/workroom/remote-dispatch-scheduler.js +133 -0
- package/lib/workroom/remote-dispatch-scheduler.js.map +1 -0
- package/lib/workroom/remote-dispatch-worker.d.ts +22 -0
- package/lib/workroom/remote-dispatch-worker.d.ts.map +1 -0
- package/lib/workroom/remote-dispatch-worker.js +124 -0
- package/lib/workroom/remote-dispatch-worker.js.map +1 -0
- package/lib/workroom/remote-dispatch.d.ts +79 -0
- package/lib/workroom/remote-dispatch.d.ts.map +1 -0
- package/lib/workroom/remote-dispatch.js +220 -0
- package/lib/workroom/remote-dispatch.js.map +1 -0
- package/lib/workroom/role-capability-snapshot.d.ts +88 -0
- package/lib/workroom/role-capability-snapshot.d.ts.map +1 -0
- package/lib/workroom/role-capability-snapshot.js +456 -0
- package/lib/workroom/role-capability-snapshot.js.map +1 -0
- package/lib/workroom/runtime.d.ts +109 -0
- package/lib/workroom/runtime.d.ts.map +1 -0
- package/lib/workroom/runtime.js +450 -0
- package/lib/workroom/runtime.js.map +1 -0
- package/lib/workroom/scheduler-priority-control.d.ts +35 -0
- package/lib/workroom/scheduler-priority-control.d.ts.map +1 -0
- package/lib/workroom/scheduler-priority-control.js +9 -0
- package/lib/workroom/scheduler-priority-control.js.map +1 -0
- package/lib/workroom/workflow-plan-builder.d.ts +88 -0
- package/lib/workroom/workflow-plan-builder.d.ts.map +1 -0
- package/lib/workroom/workflow-plan-builder.js +232 -0
- package/lib/workroom/workflow-plan-builder.js.map +1 -0
- package/lib/workroom/workroom-assignment-knowledge-context.d.ts +102 -0
- package/lib/workroom/workroom-assignment-knowledge-context.d.ts.map +1 -0
- package/lib/workroom/workroom-assignment-knowledge-context.js +127 -0
- package/lib/workroom/workroom-assignment-knowledge-context.js.map +1 -0
- package/lib/workroom/workroom-kernel.d.ts +141 -0
- package/lib/workroom/workroom-kernel.d.ts.map +1 -0
- package/lib/workroom/workroom-kernel.js +1325 -0
- package/lib/workroom/workroom-kernel.js.map +1 -0
- package/lib/workroom/workroom-preemption.d.ts +65 -0
- package/lib/workroom/workroom-preemption.d.ts.map +1 -0
- package/lib/workroom/workroom-preemption.js +213 -0
- package/lib/workroom/workroom-preemption.js.map +1 -0
- package/lib/workroom/workroom-scheduler-application.d.ts +43 -0
- package/lib/workroom/workroom-scheduler-application.d.ts.map +1 -0
- package/lib/workroom/workroom-scheduler-application.js +71 -0
- package/lib/workroom/workroom-scheduler-application.js.map +1 -0
- package/lib/workroom/workroom-scheduler.d.ts +135 -0
- package/lib/workroom/workroom-scheduler.d.ts.map +1 -0
- package/lib/workroom/workroom-scheduler.js +649 -0
- package/lib/workroom/workroom-scheduler.js.map +1 -0
- package/lib/workroom/workroom-task-report-store.d.ts +131 -0
- package/lib/workroom/workroom-task-report-store.d.ts.map +1 -0
- package/lib/workroom/workroom-task-report-store.js +528 -0
- package/lib/workroom/workroom-task-report-store.js.map +1 -0
- package/lib/zhin-agent/index.d.ts +7 -22
- package/lib/zhin-agent/index.d.ts.map +1 -1
- package/lib/zhin-agent/index.js +5 -33
- package/lib/zhin-agent/index.js.map +1 -1
- package/lib/zhin-agent/runtime-modules.d.ts +3 -3
- package/lib/zhin-agent/runtime-modules.d.ts.map +1 -1
- package/lib/zhin-agent/runtime-modules.js +3 -3
- package/lib/zhin-agent/runtime-modules.js.map +1 -1
- package/package.json +10 -16
- package/lib/a2a/delegation-message.d.ts +0 -14
- package/lib/a2a/delegation-message.d.ts.map +0 -1
- package/lib/a2a/delegation-message.js +0 -53
- package/lib/a2a/delegation-message.js.map +0 -1
- package/lib/a2a/task-state.d.ts +0 -9
- package/lib/a2a/task-state.d.ts.map +0 -1
- package/lib/a2a/task-state.js +0 -53
- package/lib/a2a/task-state.js.map +0 -1
- package/lib/assistant/runtime-registry.d.ts +0 -23
- package/lib/assistant/runtime-registry.d.ts.map +0 -1
- package/lib/assistant/runtime-registry.js +0 -27
- package/lib/assistant/runtime-registry.js.map +0 -1
- package/lib/authoring/define-dynamic.d.ts +0 -4
- package/lib/authoring/define-dynamic.d.ts.map +0 -1
- package/lib/authoring/define-dynamic.js +0 -8
- package/lib/authoring/define-dynamic.js.map +0 -1
- package/lib/authoring/define-state.d.ts +0 -4
- package/lib/authoring/define-state.d.ts.map +0 -1
- package/lib/authoring/define-state.js +0 -8
- package/lib/authoring/define-state.js.map +0 -1
- package/lib/builtin/five-agent/strategy.d.ts +0 -4
- package/lib/builtin/five-agent/strategy.d.ts.map +0 -1
- package/lib/builtin/five-agent/strategy.js +0 -42
- package/lib/builtin/five-agent/strategy.js.map +0 -1
- package/lib/builtin/memory-search-tool.d.ts +0 -2
- package/lib/builtin/memory-search-tool.d.ts.map +0 -1
- package/lib/builtin/memory-search-tool.js +0 -58
- package/lib/builtin/memory-search-tool.js.map +0 -1
- package/lib/builtin/memory-upsert-tool.d.ts +0 -2
- package/lib/builtin/memory-upsert-tool.d.ts.map +0 -1
- package/lib/builtin/memory-upsert-tool.js +0 -72
- package/lib/builtin/memory-upsert-tool.js.map +0 -1
- package/lib/builtin/orchestration-tools.d.ts +0 -7
- package/lib/builtin/orchestration-tools.d.ts.map +0 -1
- package/lib/builtin/orchestration-tools.js +0 -259
- package/lib/builtin/orchestration-tools.js.map +0 -1
- package/lib/connection/authorization-flow.d.ts +0 -26
- package/lib/connection/authorization-flow.d.ts.map +0 -1
- package/lib/connection/authorization-flow.js +0 -76
- package/lib/connection/authorization-flow.js.map +0 -1
- package/lib/connection/index.d.ts +0 -3
- package/lib/connection/index.d.ts.map +0 -1
- package/lib/connection/index.js +0 -2
- package/lib/connection/index.js.map +0 -1
- package/lib/dynamic/dynamic-registry.d.ts +0 -34
- package/lib/dynamic/dynamic-registry.d.ts.map +0 -1
- package/lib/dynamic/dynamic-registry.js +0 -52
- package/lib/dynamic/dynamic-registry.js.map +0 -1
- package/lib/init/bootstrap-gate.d.ts +0 -6
- package/lib/init/bootstrap-gate.d.ts.map +0 -1
- package/lib/init/bootstrap-gate.js +0 -28
- package/lib/init/bootstrap-gate.js.map +0 -1
- package/lib/memory-entry-registry.d.ts +0 -13
- package/lib/memory-entry-registry.d.ts.map +0 -1
- package/lib/memory-entry-registry.js +0 -24
- package/lib/memory-entry-registry.js.map +0 -1
- package/lib/orchestration-memory-hook.d.ts +0 -3
- package/lib/orchestration-memory-hook.d.ts.map +0 -1
- package/lib/orchestration-memory-hook.js +0 -22
- package/lib/orchestration-memory-hook.js.map +0 -1
- package/lib/orchestration-runtime-registry.d.ts +0 -16
- package/lib/orchestration-runtime-registry.d.ts.map +0 -1
- package/lib/orchestration-runtime-registry.js +0 -20
- package/lib/orchestration-runtime-registry.js.map +0 -1
- package/lib/orchestrator/agent-dispatcher.d.ts +0 -171
- package/lib/orchestrator/agent-dispatcher.d.ts.map +0 -1
- package/lib/orchestrator/agent-dispatcher.js +0 -415
- package/lib/orchestrator/agent-dispatcher.js.map +0 -1
- package/lib/orchestrator/bootstrap-executors.d.ts +0 -7
- package/lib/orchestrator/bootstrap-executors.d.ts.map +0 -1
- package/lib/orchestrator/bootstrap-executors.js +0 -73
- package/lib/orchestrator/bootstrap-executors.js.map +0 -1
- package/lib/orchestrator/orchestration-mappers.d.ts +0 -9
- package/lib/orchestrator/orchestration-mappers.d.ts.map +0 -1
- package/lib/orchestrator/orchestration-mappers.js +0 -117
- package/lib/orchestrator/orchestration-mappers.js.map +0 -1
- package/lib/orchestrator/orchestration-repository.d.ts +0 -91
- package/lib/orchestrator/orchestration-repository.d.ts.map +0 -1
- package/lib/orchestrator/orchestration-repository.js +0 -389
- package/lib/orchestrator/orchestration-repository.js.map +0 -1
- package/lib/orchestrator/orchestration-service.d.ts +0 -133
- package/lib/orchestrator/orchestration-service.d.ts.map +0 -1
- package/lib/orchestrator/orchestration-service.js +0 -582
- package/lib/orchestrator/orchestration-service.js.map +0 -1
- package/lib/orchestrator/orchestration-source.d.ts +0 -5
- package/lib/orchestrator/orchestration-source.d.ts.map +0 -1
- package/lib/orchestrator/orchestration-source.js +0 -22
- package/lib/orchestrator/orchestration-source.js.map +0 -1
- package/lib/orchestrator/orchestration-types.d.ts +0 -88
- package/lib/orchestrator/orchestration-types.d.ts.map +0 -1
- package/lib/orchestrator/orchestration-types.js +0 -2
- package/lib/orchestrator/orchestration-types.js.map +0 -1
- package/lib/orchestrator/remote-agent-registry.d.ts +0 -37
- package/lib/orchestrator/remote-agent-registry.d.ts.map +0 -1
- package/lib/orchestrator/remote-agent-registry.js +0 -178
- package/lib/orchestrator/remote-agent-registry.js.map +0 -1
- package/lib/orchestrator/remote-task-executor.d.ts +0 -10
- package/lib/orchestrator/remote-task-executor.d.ts.map +0 -1
- package/lib/orchestrator/remote-task-executor.js +0 -231
- package/lib/orchestrator/remote-task-executor.js.map +0 -1
- package/lib/orchestrator/remote-task-poller.d.ts +0 -18
- package/lib/orchestrator/remote-task-poller.d.ts.map +0 -1
- package/lib/orchestrator/remote-task-poller.js +0 -84
- package/lib/orchestrator/remote-task-poller.js.map +0 -1
- package/lib/orchestrator/resolve-subagent-tools.d.ts.map +0 -1
- package/lib/orchestrator/resolve-subagent-tools.js.map +0 -1
- package/lib/orchestrator/task-queue.d.ts +0 -167
- package/lib/orchestrator/task-queue.d.ts.map +0 -1
- package/lib/orchestrator/task-queue.js +0 -416
- package/lib/orchestrator/task-queue.js.map +0 -1
- package/lib/session/passive-group-buffer.d.ts +0 -15
- package/lib/session/passive-group-buffer.d.ts.map +0 -1
- package/lib/session/passive-group-buffer.js +0 -50
- package/lib/session/passive-group-buffer.js.map +0 -1
- package/lib/session/passive-group-session.d.ts +0 -10
- package/lib/session/passive-group-session.d.ts.map +0 -1
- package/lib/session/passive-group-session.js +0 -32
- package/lib/session/passive-group-session.js.map +0 -1
- package/lib/session-tree-runtime-registry.d.ts +0 -22
- package/lib/session-tree-runtime-registry.d.ts.map +0 -1
- package/lib/session-tree-runtime-registry.js.map +0 -1
- package/lib/state/agent-state-store.d.ts +0 -18
- package/lib/state/agent-state-store.d.ts.map +0 -1
- package/lib/state/agent-state-store.js +0 -50
- package/lib/state/agent-state-store.js.map +0 -1
- /package/lib/{orchestrator → resource-hub}/hook-registry.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/hook-registry.js +0 -0
- /package/lib/{orchestrator → resource-hub}/mcp-lifecycle.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/mcp-lifecycle.js +0 -0
- /package/lib/{orchestrator → resource-hub}/mcp-registry.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/mcp-registry.js +0 -0
- /package/lib/{orchestrator → resource-hub}/resource-registry.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/resource-registry.js +0 -0
- /package/lib/{orchestrator → resource-hub}/role-configs.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/skill-registry.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/skill-registry.js +0 -0
- /package/lib/{orchestrator → resource-hub}/subagent-registry.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/subagent-registry.js +0 -0
- /package/lib/{orchestrator → resource-hub}/tool-registry.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/tool-registry.js +0 -0
- /package/lib/{orchestrator → resource-hub}/tool-selection.d.ts +0 -0
- /package/lib/{orchestrator → resource-hub}/tool-selection.js +0 -0
- /package/lib/{orchestrator → resource-hub}/types.js +0 -0
|
@@ -0,0 +1,660 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { compareCanonicalWorkroomText } from '../workroom/canonical-value.js';
|
|
3
|
+
export function createDataCategoryRegistrySnapshot(input) {
|
|
4
|
+
if (!isNonEmpty(input.id) || !isNonEmpty(input.tenantId)
|
|
5
|
+
|| !Number.isSafeInteger(input.revision) || input.revision < 1) {
|
|
6
|
+
throw new Error('Data Category Registry identity is invalid');
|
|
7
|
+
}
|
|
8
|
+
const kindFloors = Object.fromEntries(Object.entries(input.kindFloors)
|
|
9
|
+
.sort(([left], [right]) => compareCanonicalWorkroomText(left, right))
|
|
10
|
+
.map(([kind, floor]) => {
|
|
11
|
+
if (!isMember(kind, DATA_KINDS) || !isMember(floor, DISCLOSABLE_CONFIDENTIALITY_CLASSES)) {
|
|
12
|
+
throw new Error(`Data Category Registry kind floor is invalid: ${kind}`);
|
|
13
|
+
}
|
|
14
|
+
return [kind, floor];
|
|
15
|
+
}));
|
|
16
|
+
const categories = Object.fromEntries(Object.entries(input.categories)
|
|
17
|
+
.sort(([left], [right]) => compareCanonicalWorkroomText(left, right))
|
|
18
|
+
.map(([category, rule]) => {
|
|
19
|
+
if (!isNonEmpty(category) || !isRecord(rule)
|
|
20
|
+
|| Object.keys(rule).some(key => key !== 'confidentialityFloor')
|
|
21
|
+
|| !isMember(rule.confidentialityFloor, DISCLOSABLE_CONFIDENTIALITY_CLASSES)) {
|
|
22
|
+
throw new Error(`Data Category Registry category rule is invalid: ${category}`);
|
|
23
|
+
}
|
|
24
|
+
return [category, deepFreeze({ confidentialityFloor: rule.confidentialityFloor })];
|
|
25
|
+
}));
|
|
26
|
+
const projection = deepFreeze({
|
|
27
|
+
id: input.id.trim(),
|
|
28
|
+
revision: input.revision,
|
|
29
|
+
tenantId: input.tenantId.trim(),
|
|
30
|
+
kindFloors,
|
|
31
|
+
categories,
|
|
32
|
+
});
|
|
33
|
+
return deepFreeze({ ...projection, digest: hashStable(projection) });
|
|
34
|
+
}
|
|
35
|
+
export function assertDataCategoryRegistrySnapshot(value) {
|
|
36
|
+
const { digest, ...input } = value;
|
|
37
|
+
const canonical = createDataCategoryRegistrySnapshot(input);
|
|
38
|
+
if (digest !== canonical.digest || stableSerialize(value) !== stableSerialize(canonical)) {
|
|
39
|
+
throw new Error('Data Category Registry digest does not match its content');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export function createDisclosureRecipientSetSnapshot(input) {
|
|
43
|
+
if (!Number.isSafeInteger(input.revision) || input.revision < 1 || !Array.isArray(input.recipients)
|
|
44
|
+
|| input.recipients.length === 0) {
|
|
45
|
+
throw new Error('Disclosure recipient snapshot is invalid');
|
|
46
|
+
}
|
|
47
|
+
const recipients = input.recipients.map((recipient) => {
|
|
48
|
+
if (!isNonEmpty(recipient.principalId) || !isNonEmpty(recipient.tenantId)
|
|
49
|
+
|| (recipient.projectId !== undefined && !isNonEmpty(recipient.projectId))
|
|
50
|
+
|| !isMember(recipient.clearance, DISCLOSABLE_CONFIDENTIALITY_CLASSES)) {
|
|
51
|
+
throw new Error('Disclosure recipient is invalid');
|
|
52
|
+
}
|
|
53
|
+
return deepFreeze({
|
|
54
|
+
principalId: recipient.principalId.trim(),
|
|
55
|
+
tenantId: recipient.tenantId.trim(),
|
|
56
|
+
...(recipient.projectId === undefined ? {} : { projectId: recipient.projectId.trim() }),
|
|
57
|
+
clearance: recipient.clearance,
|
|
58
|
+
});
|
|
59
|
+
}).sort((left, right) => compareCanonicalWorkroomText(left.principalId, right.principalId));
|
|
60
|
+
if (new Set(recipients.map(({ principalId }) => principalId)).size !== recipients.length) {
|
|
61
|
+
throw new Error('Disclosure recipient snapshot contains duplicate principal ids');
|
|
62
|
+
}
|
|
63
|
+
const projection = deepFreeze({ revision: input.revision, recipients });
|
|
64
|
+
return deepFreeze({ ...projection, digest: hashStable(projection) });
|
|
65
|
+
}
|
|
66
|
+
export function assertDisclosureRecipientSetSnapshot(value) {
|
|
67
|
+
const canonical = createDisclosureRecipientSetSnapshot({
|
|
68
|
+
revision: value.revision,
|
|
69
|
+
recipients: value.recipients,
|
|
70
|
+
});
|
|
71
|
+
if (value.digest !== canonical.digest || stableSerialize(value) !== stableSerialize(canonical)) {
|
|
72
|
+
throw new Error('Disclosure recipient snapshot digest does not match its content');
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
export function createProcessingDestinationContract(input) {
|
|
76
|
+
const projection = canonicalDestination(input);
|
|
77
|
+
return deepFreeze({
|
|
78
|
+
...projection,
|
|
79
|
+
contractDigest: hashStable(projection),
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
export function assertProcessingDestinationContract(value) {
|
|
83
|
+
const { contractDigest, ...input } = value;
|
|
84
|
+
const canonical = createProcessingDestinationContract(input);
|
|
85
|
+
if (contractDigest !== canonical.contractDigest || stableSerialize(value) !== stableSerialize(canonical)) {
|
|
86
|
+
throw new Error('Processing Destination contract digest does not match its content');
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
export function createDataGovernancePolicySnapshot(input) {
|
|
90
|
+
const destinations = Object.fromEntries(Object.entries(input.destinations)
|
|
91
|
+
.sort(([left], [right]) => compareCanonicalWorkroomText(left, right))
|
|
92
|
+
.map(([id, destination]) => {
|
|
93
|
+
assertProcessingDestinationContract(destination);
|
|
94
|
+
if (id !== destination.id)
|
|
95
|
+
throw new Error('Processing Destination catalog id mismatch');
|
|
96
|
+
return [id, destination];
|
|
97
|
+
}));
|
|
98
|
+
const transforms = Object.fromEntries(Object.entries(input.transforms)
|
|
99
|
+
.sort(([left], [right]) => compareCanonicalWorkroomText(left, right))
|
|
100
|
+
.map(([id, transform]) => {
|
|
101
|
+
if (id !== transform.id || !isNonEmpty(id)
|
|
102
|
+
|| !Array.isArray(transform.inputCategoriesAny)
|
|
103
|
+
|| transform.inputCategoriesAny.some(value => !isNonEmpty(value))
|
|
104
|
+
|| !Array.isArray(transform.outputCategories)
|
|
105
|
+
|| transform.outputCategories.some(value => !isNonEmpty(value))
|
|
106
|
+
|| !isMember(transform.outputConfidentiality, DISCLOSABLE_CONFIDENTIALITY_CLASSES)
|
|
107
|
+
|| !isMemberArray(transform.allowedChannels, DISCLOSURE_CHANNELS)) {
|
|
108
|
+
throw new Error(`Invalid trusted disclosure transform ${id}`);
|
|
109
|
+
}
|
|
110
|
+
return [id, deepFreeze({
|
|
111
|
+
id,
|
|
112
|
+
inputCategoriesAny: uniqueSorted(transform.inputCategoriesAny),
|
|
113
|
+
outputConfidentiality: transform.outputConfidentiality,
|
|
114
|
+
outputCategories: uniqueSorted(transform.outputCategories),
|
|
115
|
+
allowedChannels: uniqueSorted(transform.allowedChannels),
|
|
116
|
+
})];
|
|
117
|
+
}));
|
|
118
|
+
if (!isNonEmpty(input.id) || !isNonEmpty(input.tenantId) || !isNonEmpty(input.projectId)) {
|
|
119
|
+
throw new Error('Data Governance Policy identity must be non-empty');
|
|
120
|
+
}
|
|
121
|
+
if (!Number.isSafeInteger(input.revision) || input.revision < 1) {
|
|
122
|
+
throw new Error('Data Governance Policy revision must be a positive safe integer');
|
|
123
|
+
}
|
|
124
|
+
const ceilingKeys = Object.keys(input.channelCeilings);
|
|
125
|
+
if (ceilingKeys.length !== DISCLOSURE_CHANNELS.length
|
|
126
|
+
|| ceilingKeys.some(key => !isMember(key, DISCLOSURE_CHANNELS))
|
|
127
|
+
|| Object.values(input.channelCeilings)
|
|
128
|
+
.some(value => !isMember(value, DISCLOSABLE_CONFIDENTIALITY_CLASSES))
|
|
129
|
+
|| !isMember(input.externalApprovalFloor, DISCLOSABLE_CONFIDENTIALITY_CLASSES)) {
|
|
130
|
+
throw new Error('Data Governance Policy disclosure ceilings are invalid');
|
|
131
|
+
}
|
|
132
|
+
const projection = deepFreeze({
|
|
133
|
+
id: input.id.trim(),
|
|
134
|
+
revision: input.revision,
|
|
135
|
+
tenantId: input.tenantId.trim(),
|
|
136
|
+
projectId: input.projectId.trim(),
|
|
137
|
+
destinations,
|
|
138
|
+
channelCeilings: { ...input.channelCeilings },
|
|
139
|
+
transforms,
|
|
140
|
+
externalApprovalFloor: input.externalApprovalFloor,
|
|
141
|
+
});
|
|
142
|
+
return deepFreeze({ ...projection, digest: hashStable(projection) });
|
|
143
|
+
}
|
|
144
|
+
export function assertDataGovernancePolicySnapshot(value) {
|
|
145
|
+
const { digest, ...input } = value;
|
|
146
|
+
const canonical = createDataGovernancePolicySnapshot(input);
|
|
147
|
+
if (digest !== canonical.digest || stableSerialize(value) !== stableSerialize(canonical)) {
|
|
148
|
+
throw new Error('Data Governance Policy digest does not match its content');
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
export function classifyDataDescriptor(candidateInput, registry) {
|
|
152
|
+
if (!isDataDescriptorCandidate(candidateInput)) {
|
|
153
|
+
return deepFreeze({
|
|
154
|
+
status: 'quarantined',
|
|
155
|
+
objectId: candidateObjectId(candidateInput),
|
|
156
|
+
categoryRegistryRevision: registry.revision,
|
|
157
|
+
reasonCodes: ['descriptor_malformed'],
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
const candidate = candidateInput;
|
|
161
|
+
const reasonCodes = [];
|
|
162
|
+
const proposedConfidentiality = candidate.proposedConfidentiality;
|
|
163
|
+
if (proposedConfidentiality === 'unknown')
|
|
164
|
+
reasonCodes.push('classification_unknown');
|
|
165
|
+
if (candidate.categories.some((category) => registry.categories[category] === undefined)) {
|
|
166
|
+
reasonCodes.push('category_unknown');
|
|
167
|
+
}
|
|
168
|
+
if (candidate.tenantId !== registry.tenantId)
|
|
169
|
+
reasonCodes.push('registry_tenant_mismatch');
|
|
170
|
+
if (registry.kindFloors[candidate.kind] === undefined)
|
|
171
|
+
reasonCodes.push('kind_floor_missing');
|
|
172
|
+
if (!isNonEmpty(candidate.objectId)
|
|
173
|
+
|| !/^sha256:[a-f\d]{64}$/u.test(candidate.payloadHash)
|
|
174
|
+
|| !isNonEmpty(candidate.tenantId)
|
|
175
|
+
|| !isNonEmpty(candidate.projectId)
|
|
176
|
+
|| candidate.allowedPurposes.length === 0
|
|
177
|
+
|| candidate.allowedRegions.length === 0) {
|
|
178
|
+
reasonCodes.push('descriptor_malformed');
|
|
179
|
+
}
|
|
180
|
+
if (!Number.isSafeInteger(candidate.retention.minimumRetainUntil)
|
|
181
|
+
|| !Number.isSafeInteger(candidate.retention.deleteAfter)
|
|
182
|
+
|| candidate.retention.minimumRetainUntil < 0
|
|
183
|
+
|| candidate.retention.minimumRetainUntil > candidate.retention.deleteAfter) {
|
|
184
|
+
reasonCodes.push('retention_window_invalid');
|
|
185
|
+
}
|
|
186
|
+
if (reasonCodes.length > 0) {
|
|
187
|
+
return deepFreeze({
|
|
188
|
+
status: 'quarantined',
|
|
189
|
+
objectId: candidate.objectId.trim(),
|
|
190
|
+
categoryRegistryRevision: registry.revision,
|
|
191
|
+
reasonCodes,
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
const categoryFloors = candidate.categories.map((category) => (registry.categories[category]?.confidentialityFloor ?? 'restricted'));
|
|
195
|
+
if (proposedConfidentiality === 'unknown')
|
|
196
|
+
throw new Error('unreachable quarantined classification');
|
|
197
|
+
const floors = [
|
|
198
|
+
proposedConfidentiality,
|
|
199
|
+
registry.kindFloors[candidate.kind] ?? 'restricted',
|
|
200
|
+
...categoryFloors,
|
|
201
|
+
];
|
|
202
|
+
const confidentiality = floors.reduce(stricterConfidentiality, 'public');
|
|
203
|
+
return deepFreeze({
|
|
204
|
+
status: 'registered',
|
|
205
|
+
descriptor: {
|
|
206
|
+
objectId: candidate.objectId,
|
|
207
|
+
payloadHash: candidate.payloadHash,
|
|
208
|
+
tenantId: candidate.tenantId,
|
|
209
|
+
projectId: candidate.projectId,
|
|
210
|
+
kind: candidate.kind,
|
|
211
|
+
confidentiality,
|
|
212
|
+
categories: uniqueSorted(candidate.categories),
|
|
213
|
+
allowedPurposes: uniqueSorted(candidate.allowedPurposes),
|
|
214
|
+
allowedRegions: uniqueSorted(candidate.allowedRegions),
|
|
215
|
+
subjectRefs: uniqueSorted(candidate.subjectRefs),
|
|
216
|
+
retention: { ...candidate.retention },
|
|
217
|
+
lineage: {
|
|
218
|
+
...candidate.lineage,
|
|
219
|
+
sourceObjectIds: uniqueSorted(candidate.lineage.sourceObjectIds),
|
|
220
|
+
},
|
|
221
|
+
classificationSource: {
|
|
222
|
+
categoryRegistryId: registry.id,
|
|
223
|
+
categoryRegistryRevision: registry.revision,
|
|
224
|
+
categoryRegistryDigest: registry.digest,
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
/** Re-validates a registered Descriptor against the trusted generation registry used at ingress. */
|
|
230
|
+
export function assertRegisteredDataDescriptor(descriptor, registry) {
|
|
231
|
+
assertDataCategoryRegistrySnapshot(registry);
|
|
232
|
+
if (!isRecord(descriptor)
|
|
233
|
+
|| !isMember(descriptor.kind, DATA_KINDS)
|
|
234
|
+
|| !isMember(descriptor.confidentiality, DISCLOSABLE_CONFIDENTIALITY_CLASSES)
|
|
235
|
+
|| !isStringArray(descriptor.categories)
|
|
236
|
+
|| !isMemberArray(descriptor.allowedPurposes, DISCLOSURE_PURPOSES)
|
|
237
|
+
|| !isStringArray(descriptor.allowedRegions)
|
|
238
|
+
|| !isStringArray(descriptor.subjectRefs)
|
|
239
|
+
|| !isRecord(descriptor.retention)
|
|
240
|
+
|| !isMember(descriptor.retention.class, RETENTION_CLASSES)
|
|
241
|
+
|| !isRecord(descriptor.lineage)
|
|
242
|
+
|| !isStringArray(descriptor.lineage.sourceObjectIds)
|
|
243
|
+
|| (descriptor.lineage.transformRef !== undefined
|
|
244
|
+
&& typeof descriptor.lineage.transformRef !== 'string')
|
|
245
|
+
|| !isRecord(descriptor.classificationSource)) {
|
|
246
|
+
throw new Error('Data Descriptor registered snapshot is malformed or non-canonical');
|
|
247
|
+
}
|
|
248
|
+
if (descriptor.classificationSource.categoryRegistryId !== registry.id
|
|
249
|
+
|| descriptor.classificationSource.categoryRegistryRevision !== registry.revision
|
|
250
|
+
|| descriptor.classificationSource.categoryRegistryDigest !== registry.digest
|
|
251
|
+
|| descriptor.tenantId !== registry.tenantId) {
|
|
252
|
+
throw new Error('Data Descriptor registry proof does not match the trusted registry');
|
|
253
|
+
}
|
|
254
|
+
const kindFloor = registry.kindFloors[descriptor.kind];
|
|
255
|
+
const categoryFloors = descriptor.categories.map(category => registry.categories[category]?.confidentialityFloor);
|
|
256
|
+
if (!kindFloor || categoryFloors.some(floor => floor === undefined)) {
|
|
257
|
+
throw new Error('Data Descriptor references an unknown trusted floor');
|
|
258
|
+
}
|
|
259
|
+
const trustedFloor = [kindFloor, ...categoryFloors.filter((floor) => floor !== undefined)]
|
|
260
|
+
.reduce(stricterConfidentiality, 'public');
|
|
261
|
+
if (CONFIDENTIALITY_LEVEL[descriptor.confidentiality] < CONFIDENTIALITY_LEVEL[trustedFloor]) {
|
|
262
|
+
throw new Error('Data Descriptor confidentiality is below its trusted floor');
|
|
263
|
+
}
|
|
264
|
+
if (!isNonEmpty(descriptor.objectId) || !/^sha256:[a-f\d]{64}$/u.test(descriptor.payloadHash)
|
|
265
|
+
|| !isNonEmpty(descriptor.projectId)
|
|
266
|
+
|| descriptor.allowedPurposes.length === 0 || descriptor.allowedRegions.length === 0
|
|
267
|
+
|| stableSerialize(descriptor.categories) !== stableSerialize(uniqueSorted(descriptor.categories))
|
|
268
|
+
|| stableSerialize(descriptor.allowedPurposes) !== stableSerialize(uniqueSorted(descriptor.allowedPurposes))
|
|
269
|
+
|| stableSerialize(descriptor.allowedRegions) !== stableSerialize(uniqueSorted(descriptor.allowedRegions))
|
|
270
|
+
|| stableSerialize(descriptor.subjectRefs) !== stableSerialize(uniqueSorted(descriptor.subjectRefs))
|
|
271
|
+
|| stableSerialize(descriptor.lineage.sourceObjectIds)
|
|
272
|
+
!== stableSerialize(uniqueSorted(descriptor.lineage.sourceObjectIds))
|
|
273
|
+
|| !Number.isSafeInteger(descriptor.retention.minimumRetainUntil)
|
|
274
|
+
|| !Number.isSafeInteger(descriptor.retention.deleteAfter)
|
|
275
|
+
|| descriptor.retention.minimumRetainUntil < 0
|
|
276
|
+
|| descriptor.retention.minimumRetainUntil > descriptor.retention.deleteAfter) {
|
|
277
|
+
throw new Error('Data Descriptor registered snapshot is malformed or non-canonical');
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
const DATA_KINDS = [
|
|
281
|
+
'source_message',
|
|
282
|
+
'workroom_fact',
|
|
283
|
+
'context_digest',
|
|
284
|
+
'task_report',
|
|
285
|
+
'artifact',
|
|
286
|
+
'evidence',
|
|
287
|
+
'execution_trace',
|
|
288
|
+
'projection_payload',
|
|
289
|
+
];
|
|
290
|
+
const CONFIDENTIALITY_CLASSES = [
|
|
291
|
+
'public',
|
|
292
|
+
'project_internal',
|
|
293
|
+
'confidential',
|
|
294
|
+
'restricted',
|
|
295
|
+
'unknown',
|
|
296
|
+
];
|
|
297
|
+
const DISCLOSABLE_CONFIDENTIALITY_CLASSES = [
|
|
298
|
+
'public',
|
|
299
|
+
'project_internal',
|
|
300
|
+
'confidential',
|
|
301
|
+
'restricted',
|
|
302
|
+
];
|
|
303
|
+
const DISCLOSURE_PURPOSES = [
|
|
304
|
+
'orchestration',
|
|
305
|
+
'task_execution',
|
|
306
|
+
'acceptance_review',
|
|
307
|
+
'workroom_awareness',
|
|
308
|
+
'portfolio_oversight',
|
|
309
|
+
'remote_execution',
|
|
310
|
+
'audit',
|
|
311
|
+
'reconciliation',
|
|
312
|
+
];
|
|
313
|
+
const DISCLOSURE_CHANNELS = [
|
|
314
|
+
'context_view',
|
|
315
|
+
'evidence_port',
|
|
316
|
+
'workroom_projection',
|
|
317
|
+
'sponsor_projection',
|
|
318
|
+
'console',
|
|
319
|
+
'model_provider',
|
|
320
|
+
'a2a',
|
|
321
|
+
];
|
|
322
|
+
const RETENTION_CLASSES = [
|
|
323
|
+
'transient',
|
|
324
|
+
'operational',
|
|
325
|
+
'project_record',
|
|
326
|
+
'regulated_record',
|
|
327
|
+
];
|
|
328
|
+
function isDataDescriptorCandidate(value) {
|
|
329
|
+
if (!isRecord(value))
|
|
330
|
+
return false;
|
|
331
|
+
if (typeof value.objectId !== 'string'
|
|
332
|
+
|| typeof value.payloadHash !== 'string'
|
|
333
|
+
|| typeof value.tenantId !== 'string'
|
|
334
|
+
|| typeof value.projectId !== 'string'
|
|
335
|
+
|| !isMember(value.kind, DATA_KINDS)
|
|
336
|
+
|| !isMember(value.proposedConfidentiality, CONFIDENTIALITY_CLASSES)
|
|
337
|
+
|| !isStringArray(value.categories)
|
|
338
|
+
|| !isMemberArray(value.allowedPurposes, DISCLOSURE_PURPOSES)
|
|
339
|
+
|| !isStringArray(value.allowedRegions)
|
|
340
|
+
|| !isStringArray(value.subjectRefs)
|
|
341
|
+
|| !isRecord(value.retention)
|
|
342
|
+
|| !isMember(value.retention.class, RETENTION_CLASSES)
|
|
343
|
+
|| typeof value.retention.minimumRetainUntil !== 'number'
|
|
344
|
+
|| typeof value.retention.deleteAfter !== 'number'
|
|
345
|
+
|| !isRecord(value.lineage)
|
|
346
|
+
|| !isStringArray(value.lineage.sourceObjectIds)) {
|
|
347
|
+
return false;
|
|
348
|
+
}
|
|
349
|
+
return value.lineage.transformRef === undefined || typeof value.lineage.transformRef === 'string';
|
|
350
|
+
}
|
|
351
|
+
function candidateObjectId(value) {
|
|
352
|
+
return isRecord(value) && typeof value.objectId === 'string' ? value.objectId.trim() : '';
|
|
353
|
+
}
|
|
354
|
+
function isRecord(value) {
|
|
355
|
+
return value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
356
|
+
}
|
|
357
|
+
function isStringArray(value) {
|
|
358
|
+
return Array.isArray(value) && value.every((item) => typeof item === 'string');
|
|
359
|
+
}
|
|
360
|
+
function isMember(value, members) {
|
|
361
|
+
return typeof value === 'string' && members.includes(value);
|
|
362
|
+
}
|
|
363
|
+
function isMemberArray(value, members) {
|
|
364
|
+
return Array.isArray(value) && value.every((item) => isMember(item, members));
|
|
365
|
+
}
|
|
366
|
+
function uniqueSorted(values) {
|
|
367
|
+
return [...new Set(values)].sort(compareCanonicalWorkroomText);
|
|
368
|
+
}
|
|
369
|
+
function canonicalDestination(input) {
|
|
370
|
+
const requiredStrings = [
|
|
371
|
+
input.id,
|
|
372
|
+
input.owner,
|
|
373
|
+
input.endpoint,
|
|
374
|
+
input.tenantId,
|
|
375
|
+
input.trustDomain,
|
|
376
|
+
];
|
|
377
|
+
if (requiredStrings.some((value) => !isNonEmpty(value))) {
|
|
378
|
+
throw new Error('Processing Destination identity must be non-empty');
|
|
379
|
+
}
|
|
380
|
+
if (input.projectId !== undefined && !isNonEmpty(input.projectId)) {
|
|
381
|
+
throw new Error('Processing Destination project id must be non-empty when present');
|
|
382
|
+
}
|
|
383
|
+
if (!Array.isArray(input.processingRegions)
|
|
384
|
+
|| input.processingRegions.length === 0
|
|
385
|
+
|| input.processingRegions.some((value) => !isNonEmpty(value))) {
|
|
386
|
+
throw new Error('Processing Destination regions must be non-empty');
|
|
387
|
+
}
|
|
388
|
+
if (!Array.isArray(input.allowedCategories)
|
|
389
|
+
|| input.allowedCategories.some((value) => !isNonEmpty(value))) {
|
|
390
|
+
throw new Error('Processing Destination categories must be non-empty');
|
|
391
|
+
}
|
|
392
|
+
if (!isMember(input.maxConfidentiality, DISCLOSABLE_CONFIDENTIALITY_CLASSES)
|
|
393
|
+
|| !isMember(input.loggingMode, ['disabled', 'metadata_only', 'full'])
|
|
394
|
+
|| typeof input.external !== 'boolean'
|
|
395
|
+
|| typeof input.noTraining !== 'boolean'
|
|
396
|
+
|| typeof input.allowsRedisclosure !== 'boolean'
|
|
397
|
+
|| typeof input.supportsDeletion !== 'boolean') {
|
|
398
|
+
throw new Error('Processing Destination policy fields are invalid');
|
|
399
|
+
}
|
|
400
|
+
if (!Number.isSafeInteger(input.maximumRetentionSeconds) || input.maximumRetentionSeconds < 1) {
|
|
401
|
+
throw new Error('Processing Destination maximum retention must be a positive safe integer');
|
|
402
|
+
}
|
|
403
|
+
if (!Number.isSafeInteger(input.recipientSnapshotRevision) || input.recipientSnapshotRevision < 1) {
|
|
404
|
+
throw new Error('Processing Destination recipient revision must be a positive safe integer');
|
|
405
|
+
}
|
|
406
|
+
if (!/^sha256:[a-f\d]{64}$/u.test(input.recipientSnapshotDigest)) {
|
|
407
|
+
throw new Error('Processing Destination recipient digest must be canonical SHA-256');
|
|
408
|
+
}
|
|
409
|
+
return deepFreeze({
|
|
410
|
+
id: input.id.trim(),
|
|
411
|
+
owner: input.owner.trim(),
|
|
412
|
+
endpoint: input.endpoint.trim(),
|
|
413
|
+
tenantId: input.tenantId.trim(),
|
|
414
|
+
...(input.projectId === undefined ? {} : { projectId: input.projectId.trim() }),
|
|
415
|
+
trustDomain: input.trustDomain.trim(),
|
|
416
|
+
processingRegions: uniqueSorted(input.processingRegions.map((value) => value.trim())),
|
|
417
|
+
maxConfidentiality: input.maxConfidentiality,
|
|
418
|
+
allowedCategories: uniqueSorted(input.allowedCategories.map((value) => value.trim())),
|
|
419
|
+
external: input.external,
|
|
420
|
+
noTraining: input.noTraining,
|
|
421
|
+
loggingMode: input.loggingMode,
|
|
422
|
+
maximumRetentionSeconds: input.maximumRetentionSeconds,
|
|
423
|
+
allowsRedisclosure: input.allowsRedisclosure,
|
|
424
|
+
supportsDeletion: input.supportsDeletion,
|
|
425
|
+
recipientSnapshotRevision: input.recipientSnapshotRevision,
|
|
426
|
+
recipientSnapshotDigest: input.recipientSnapshotDigest,
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
function hashStable(value) {
|
|
430
|
+
return `sha256:${createHash('sha256').update(stableSerialize(value)).digest('hex')}`;
|
|
431
|
+
}
|
|
432
|
+
export function decideDisclosure(input) {
|
|
433
|
+
const requestDigest = disclosureRequestDigest(input.descriptor, input.context, input.policy);
|
|
434
|
+
const hardDenials = [];
|
|
435
|
+
if (input.evaluatedAt >= input.descriptor.retention.deleteAfter) {
|
|
436
|
+
hardDenials.push('payload_retention_expired');
|
|
437
|
+
}
|
|
438
|
+
if (input.policy.channelCeilings[input.context.channel] === undefined) {
|
|
439
|
+
hardDenials.push('channel_policy_missing');
|
|
440
|
+
}
|
|
441
|
+
if (input.descriptor.categories.includes('credential')) {
|
|
442
|
+
hardDenials.push('credential_requires_secret_capability_port');
|
|
443
|
+
}
|
|
444
|
+
if (input.context.destination.processingRegions.length === 0) {
|
|
445
|
+
hardDenials.push('destination_region_unknown');
|
|
446
|
+
}
|
|
447
|
+
else if (input.context.destination.processingRegions.some((region) => (!input.descriptor.allowedRegions.includes(region)))) {
|
|
448
|
+
hardDenials.push('residency_violation');
|
|
449
|
+
}
|
|
450
|
+
if (input.context.destination.external
|
|
451
|
+
&& input.descriptor.confidentiality !== 'public'
|
|
452
|
+
&& !input.context.destination.noTraining) {
|
|
453
|
+
hardDenials.push('external_training_not_prohibited');
|
|
454
|
+
}
|
|
455
|
+
if (input.context.destination.tenantId !== input.descriptor.tenantId) {
|
|
456
|
+
hardDenials.push('destination_tenant_mismatch');
|
|
457
|
+
}
|
|
458
|
+
if (input.context.destination.projectId !== undefined
|
|
459
|
+
&& input.context.destination.projectId !== input.descriptor.projectId) {
|
|
460
|
+
hardDenials.push('destination_project_mismatch');
|
|
461
|
+
}
|
|
462
|
+
if (input.context.policyRevision !== input.policy.revision) {
|
|
463
|
+
hardDenials.push('policy_revision_mismatch');
|
|
464
|
+
}
|
|
465
|
+
if (input.context.principal.tenantId !== input.descriptor.tenantId
|
|
466
|
+
|| input.context.principal.tenantId !== input.policy.tenantId) {
|
|
467
|
+
hardDenials.push('principal_tenant_mismatch');
|
|
468
|
+
}
|
|
469
|
+
if (input.context.principal.projectId !== input.descriptor.projectId
|
|
470
|
+
|| input.context.principal.projectId !== input.policy.projectId) {
|
|
471
|
+
hardDenials.push('principal_project_mismatch');
|
|
472
|
+
}
|
|
473
|
+
if (!input.descriptor.allowedPurposes.includes(input.context.purpose)
|
|
474
|
+
|| !input.context.principal.allowedPurposes.includes(input.context.purpose)) {
|
|
475
|
+
hardDenials.push('purpose_not_allowed');
|
|
476
|
+
}
|
|
477
|
+
const trustedDestination = input.policy.destinations[input.context.destination.id];
|
|
478
|
+
if (trustedDestination === undefined) {
|
|
479
|
+
hardDenials.push('destination_unknown');
|
|
480
|
+
}
|
|
481
|
+
else if (stableSerialize(trustedDestination) !== stableSerialize(input.context.destination)) {
|
|
482
|
+
hardDenials.push('destination_contract_mismatch');
|
|
483
|
+
}
|
|
484
|
+
if (input.context.recipients.revision !== input.context.destination.recipientSnapshotRevision
|
|
485
|
+
|| input.context.recipients.digest !== input.context.destination.recipientSnapshotDigest) {
|
|
486
|
+
hardDenials.push('recipient_snapshot_mismatch');
|
|
487
|
+
}
|
|
488
|
+
if (input.context.recipients.recipients.length === 0) {
|
|
489
|
+
hardDenials.push('recipient_snapshot_empty');
|
|
490
|
+
}
|
|
491
|
+
if (input.context.recipients.recipients.some((recipient) => recipient.tenantId !== input.descriptor.tenantId)) {
|
|
492
|
+
hardDenials.push('recipient_tenant_mismatch');
|
|
493
|
+
}
|
|
494
|
+
if (input.context.recipients.recipients.some((recipient) => (recipient.projectId !== undefined && recipient.projectId !== input.descriptor.projectId))) {
|
|
495
|
+
hardDenials.push('recipient_project_mismatch');
|
|
496
|
+
}
|
|
497
|
+
if (hardDenials.length > 0) {
|
|
498
|
+
return disclosureDecision(input, requestDigest, 'deny', hardDenials);
|
|
499
|
+
}
|
|
500
|
+
const recipientCeiling = input.context.recipients.recipients
|
|
501
|
+
.map((recipient) => recipient.clearance)
|
|
502
|
+
.reduce(moreRestrictiveCeiling, 'restricted');
|
|
503
|
+
const disclosureCeiling = [
|
|
504
|
+
input.policy.channelCeilings[input.context.channel],
|
|
505
|
+
input.context.destination.maxConfidentiality,
|
|
506
|
+
input.context.principal.clearance,
|
|
507
|
+
recipientCeiling,
|
|
508
|
+
].reduce(moreRestrictiveCeiling, 'restricted');
|
|
509
|
+
const classificationBlocked = (CONFIDENTIALITY_LEVEL[input.descriptor.confidentiality]
|
|
510
|
+
> CONFIDENTIALITY_LEVEL[disclosureCeiling]);
|
|
511
|
+
const categoriesBlocked = input.descriptor.categories.some((category) => (!input.context.destination.allowedCategories.includes(category)));
|
|
512
|
+
if (classificationBlocked || categoriesBlocked) {
|
|
513
|
+
const transform = Object.values(input.policy.transforms)
|
|
514
|
+
.sort((left, right) => compareCanonicalWorkroomText(left.id, right.id))
|
|
515
|
+
.find((candidate) => (candidate.allowedChannels.includes(input.context.channel)
|
|
516
|
+
&& candidate.inputCategoriesAny.some((category) => input.descriptor.categories.includes(category))
|
|
517
|
+
&& CONFIDENTIALITY_LEVEL[candidate.outputConfidentiality] <= CONFIDENTIALITY_LEVEL[disclosureCeiling]
|
|
518
|
+
&& candidate.outputCategories.every((category) => (input.context.destination.allowedCategories.includes(category)))));
|
|
519
|
+
if (transform !== undefined) {
|
|
520
|
+
return disclosureDecision(input, requestDigest, 'transform_required', [
|
|
521
|
+
...(classificationBlocked ? ['classification_above_destination_ceiling'] : []),
|
|
522
|
+
...(categoriesBlocked ? ['destination_category_blocked'] : []),
|
|
523
|
+
'trusted_transform_required',
|
|
524
|
+
], { requiredTransformId: transform.id });
|
|
525
|
+
}
|
|
526
|
+
const blockedReasons = [
|
|
527
|
+
...(classificationBlocked ? ['classification_above_destination_ceiling'] : []),
|
|
528
|
+
...(categoriesBlocked ? ['destination_category_blocked'] : []),
|
|
529
|
+
];
|
|
530
|
+
if (input.context.requestedMode === 'metadata_only') {
|
|
531
|
+
return disclosureDecision(input, requestDigest, 'metadata_only', [
|
|
532
|
+
...blockedReasons,
|
|
533
|
+
'body_withheld_by_disclosure_policy',
|
|
534
|
+
]);
|
|
535
|
+
}
|
|
536
|
+
return disclosureDecision(input, requestDigest, 'deny', [
|
|
537
|
+
...blockedReasons,
|
|
538
|
+
'no_trusted_minimizing_transform',
|
|
539
|
+
]);
|
|
540
|
+
}
|
|
541
|
+
const approvalRoles = [];
|
|
542
|
+
if (input.context.destination.external
|
|
543
|
+
&& CONFIDENTIALITY_LEVEL[input.descriptor.confidentiality]
|
|
544
|
+
>= CONFIDENTIALITY_LEVEL[input.policy.externalApprovalFloor]) {
|
|
545
|
+
approvalRoles.push('compliance');
|
|
546
|
+
}
|
|
547
|
+
const missingApprovalRoles = approvalRoles.filter((role) => (!input.approvals.some((approval) => (approval.requestDigest === requestDigest
|
|
548
|
+
&& approval.role === role
|
|
549
|
+
&& approval.policyRevision === input.policy.revision
|
|
550
|
+
&& approval.decision === 'approved'
|
|
551
|
+
&& approval.expiresAt > input.evaluatedAt))));
|
|
552
|
+
if (missingApprovalRoles.length > 0) {
|
|
553
|
+
return disclosureDecision(input, requestDigest, 'approval_required', ['exact_approval_required'], { requiredApprovalRoles: missingApprovalRoles });
|
|
554
|
+
}
|
|
555
|
+
if (input.context.requestedMode === 'metadata_only') {
|
|
556
|
+
return disclosureDecision(input, requestDigest, 'metadata_only', ['metadata_only_requested'], {
|
|
557
|
+
approvalIds: approvalRoles.map((role) => input.approvals.find((approval) => (approval.requestDigest === requestDigest && approval.role === role
|
|
558
|
+
&& approval.policyRevision === input.policy.revision && approval.decision === 'approved'
|
|
559
|
+
&& approval.expiresAt > input.evaluatedAt)).id),
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
return disclosureDecision(input, requestDigest, 'full', [input.context.destination.external
|
|
563
|
+
? 'authorized_external_disclosure'
|
|
564
|
+
: 'authorized_minimum_disclosure'], {
|
|
565
|
+
approvalIds: approvalRoles.map((role) => input.approvals.find((approval) => (approval.requestDigest === requestDigest && approval.role === role
|
|
566
|
+
&& approval.policyRevision === input.policy.revision && approval.decision === 'approved'
|
|
567
|
+
&& approval.expiresAt > input.evaluatedAt)).id),
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
function disclosureDecision(input, requestDigest, disposition, reasonCodes, extra = {}) {
|
|
571
|
+
return deepFreeze({
|
|
572
|
+
disposition,
|
|
573
|
+
requestDigest,
|
|
574
|
+
reasonCodes: [...reasonCodes],
|
|
575
|
+
policy: { revision: input.policy.revision, digest: input.policy.digest },
|
|
576
|
+
contextBinding: {
|
|
577
|
+
objectId: input.descriptor.objectId,
|
|
578
|
+
payloadHash: input.descriptor.payloadHash,
|
|
579
|
+
channel: input.context.channel,
|
|
580
|
+
purpose: input.context.purpose,
|
|
581
|
+
principalId: input.context.principal.principalId,
|
|
582
|
+
...(input.context.principal.assignmentId === undefined
|
|
583
|
+
? {}
|
|
584
|
+
: { assignmentId: input.context.principal.assignmentId }),
|
|
585
|
+
destinationId: input.context.destination.id,
|
|
586
|
+
destinationContractDigest: input.context.destination.contractDigest,
|
|
587
|
+
recipientRevision: input.context.recipients.revision,
|
|
588
|
+
recipientDigest: input.context.recipients.digest,
|
|
589
|
+
recipients: input.context.recipients.recipients.map((recipient) => ({ ...recipient })),
|
|
590
|
+
principalSnapshot: {
|
|
591
|
+
...input.context.principal,
|
|
592
|
+
allowedPurposes: [...input.context.principal.allowedPurposes],
|
|
593
|
+
},
|
|
594
|
+
destinationSnapshot: {
|
|
595
|
+
...input.context.destination,
|
|
596
|
+
processingRegions: [...input.context.destination.processingRegions],
|
|
597
|
+
allowedCategories: [...input.context.destination.allowedCategories],
|
|
598
|
+
},
|
|
599
|
+
recipientSnapshot: {
|
|
600
|
+
revision: input.context.recipients.revision,
|
|
601
|
+
digest: input.context.recipients.digest,
|
|
602
|
+
recipients: input.context.recipients.recipients.map((recipient) => ({ ...recipient })),
|
|
603
|
+
},
|
|
604
|
+
},
|
|
605
|
+
requiredApprovalRoles: [],
|
|
606
|
+
approvalIds: [],
|
|
607
|
+
...extra,
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
function disclosureRequestDigest(descriptor, context, policy) {
|
|
611
|
+
const serialized = stableSerialize({
|
|
612
|
+
descriptor,
|
|
613
|
+
channel: context.channel,
|
|
614
|
+
purpose: context.purpose,
|
|
615
|
+
requestedMode: context.requestedMode,
|
|
616
|
+
principal: context.principal,
|
|
617
|
+
destination: context.destination,
|
|
618
|
+
recipients: context.recipients,
|
|
619
|
+
policyRevision: policy.revision,
|
|
620
|
+
policyDigest: policy.digest,
|
|
621
|
+
});
|
|
622
|
+
return `sha256:${createHash('sha256').update(serialized).digest('hex')}`;
|
|
623
|
+
}
|
|
624
|
+
function stableSerialize(value) {
|
|
625
|
+
if (Array.isArray(value))
|
|
626
|
+
return `[${value.map(stableSerialize).join(',')}]`;
|
|
627
|
+
if (value !== null && typeof value === 'object') {
|
|
628
|
+
return `{${Object.entries(value)
|
|
629
|
+
.filter(([, nested]) => nested !== undefined)
|
|
630
|
+
.sort(([left], [right]) => compareCanonicalWorkroomText(left, right))
|
|
631
|
+
.map(([key, nested]) => `${JSON.stringify(key)}:${stableSerialize(nested)}`)
|
|
632
|
+
.join(',')}}`;
|
|
633
|
+
}
|
|
634
|
+
return JSON.stringify(value);
|
|
635
|
+
}
|
|
636
|
+
function isNonEmpty(value) {
|
|
637
|
+
return typeof value === 'string' && value.trim().length > 0;
|
|
638
|
+
}
|
|
639
|
+
const CONFIDENTIALITY_LEVEL = {
|
|
640
|
+
public: 0,
|
|
641
|
+
project_internal: 1,
|
|
642
|
+
confidential: 2,
|
|
643
|
+
restricted: 3,
|
|
644
|
+
unknown: 4,
|
|
645
|
+
};
|
|
646
|
+
function stricterConfidentiality(left, right) {
|
|
647
|
+
return CONFIDENTIALITY_LEVEL[left] >= CONFIDENTIALITY_LEVEL[right] ? left : right;
|
|
648
|
+
}
|
|
649
|
+
function moreRestrictiveCeiling(left, right) {
|
|
650
|
+
return CONFIDENTIALITY_LEVEL[left] <= CONFIDENTIALITY_LEVEL[right] ? left : right;
|
|
651
|
+
}
|
|
652
|
+
function deepFreeze(value) {
|
|
653
|
+
if (value !== null && typeof value === 'object' && !Object.isFrozen(value)) {
|
|
654
|
+
for (const nested of Object.values(value))
|
|
655
|
+
deepFreeze(nested);
|
|
656
|
+
Object.freeze(value);
|
|
657
|
+
}
|
|
658
|
+
return value;
|
|
659
|
+
}
|
|
660
|
+
//# sourceMappingURL=data-governance.js.map
|