@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,133 @@
|
|
|
1
|
+
import { canonicalWorkroomJson, deepFreezeWorkroomValue as deepFreeze, digestCanonicalWorkroomValue, } from './canonical-value.js';
|
|
2
|
+
import { assertWorkflowPlanProposal, } from './workflow-plan-builder.js';
|
|
3
|
+
/**
|
|
4
|
+
* Canonical proposal constructor. This object deliberately carries no
|
|
5
|
+
* principal or authority claim; only WorkroomKernel may admit it.
|
|
6
|
+
*/
|
|
7
|
+
export function createWorkflowPlanRevisionCandidate(input) {
|
|
8
|
+
for (const [value, label] of [
|
|
9
|
+
[input.proposalId, 'proposalId'], [input.projectId, 'projectId'], [input.runId, 'runId'],
|
|
10
|
+
[input.basePlanDigest, 'basePlanDigest'], [input.provenance.sourceRef, 'provenance.sourceRef'],
|
|
11
|
+
[input.provenance.sourceDigest, 'provenance.sourceDigest'], [input.reason, 'reason'],
|
|
12
|
+
])
|
|
13
|
+
requireText(value, `Plan Revision ${label}`);
|
|
14
|
+
nonNegativeInteger(input.expectedSequence, 'Plan Revision expectedSequence');
|
|
15
|
+
positiveInteger(input.basePlanRevision, 'Plan Revision basePlanRevision');
|
|
16
|
+
requireDigest(input.basePlanDigest, 'Plan Revision basePlanDigest');
|
|
17
|
+
requireDigest(input.provenance.sourceDigest, 'Plan Revision provenance sourceDigest');
|
|
18
|
+
assertWorkflowPlanProposal(input.basePlan);
|
|
19
|
+
assertWorkflowPlanProposal(input.nextPlan);
|
|
20
|
+
if (input.basePlan.projectId !== input.projectId || input.nextPlan.projectId !== input.projectId) {
|
|
21
|
+
throw new Error('Plan Revision Plans belong to another Project');
|
|
22
|
+
}
|
|
23
|
+
if (input.basePlan.digest !== input.basePlanDigest) {
|
|
24
|
+
throw new Error('Plan Revision base Plan digest does not match');
|
|
25
|
+
}
|
|
26
|
+
assertPinnedPlanMetadata(input.basePlan, input.nextPlan);
|
|
27
|
+
const revisions = normalizeTaskRevisions(input.basePlan, input.baseTaskRevisions);
|
|
28
|
+
const diff = computeWorkflowPlanRevisionDiff(input.basePlan, input.nextPlan, revisions);
|
|
29
|
+
if (diff.added.length + diff.replaced.length + diff.removed.length === 0) {
|
|
30
|
+
throw new Error('Plan Revision must contain a change');
|
|
31
|
+
}
|
|
32
|
+
const body = deepFreeze({
|
|
33
|
+
version: 1,
|
|
34
|
+
type: 'plan_revision',
|
|
35
|
+
proposalId: input.proposalId,
|
|
36
|
+
projectId: input.projectId,
|
|
37
|
+
runId: input.runId,
|
|
38
|
+
expectedSequence: input.expectedSequence,
|
|
39
|
+
basePlanRevision: input.basePlanRevision,
|
|
40
|
+
basePlanDigest: input.basePlanDigest,
|
|
41
|
+
baseTaskRevisions: revisions,
|
|
42
|
+
provenance: structuredClone(input.provenance),
|
|
43
|
+
reason: input.reason,
|
|
44
|
+
nextPlan: structuredClone(input.nextPlan),
|
|
45
|
+
diff,
|
|
46
|
+
});
|
|
47
|
+
return deepFreeze({ ...body, digest: digestCanonicalWorkroomValue(body) });
|
|
48
|
+
}
|
|
49
|
+
export function assertWorkflowPlanRevisionCandidate(value) {
|
|
50
|
+
if (!value || value.version !== 1 || value.type !== 'plan_revision') {
|
|
51
|
+
throw new Error('Plan Revision candidate shape is invalid');
|
|
52
|
+
}
|
|
53
|
+
const actual = Object.keys(value).sort();
|
|
54
|
+
const expected = [
|
|
55
|
+
'basePlanDigest', 'basePlanRevision', 'baseTaskRevisions', 'diff', 'digest',
|
|
56
|
+
'expectedSequence', 'nextPlan', 'projectId', 'proposalId', 'provenance',
|
|
57
|
+
'reason', 'runId', 'type', 'version',
|
|
58
|
+
].sort();
|
|
59
|
+
if (actual.length !== expected.length || actual.some((key, index) => key !== expected[index])) {
|
|
60
|
+
throw new Error('Plan Revision candidate keys are invalid');
|
|
61
|
+
}
|
|
62
|
+
assertWorkflowPlanProposal(value.nextPlan);
|
|
63
|
+
const body = { ...structuredClone(value) };
|
|
64
|
+
delete body.digest;
|
|
65
|
+
if (digestCanonicalWorkroomValue(body) !== value.digest) {
|
|
66
|
+
throw new Error('Plan Revision candidate digest does not match its canonical body');
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
export function computeWorkflowPlanRevisionDiff(basePlan, nextPlan, baseTaskRevisions) {
|
|
70
|
+
assertWorkflowPlanProposal(basePlan);
|
|
71
|
+
assertWorkflowPlanProposal(nextPlan);
|
|
72
|
+
assertPinnedPlanMetadata(basePlan, nextPlan);
|
|
73
|
+
const base = new Map(basePlan.tasks.map(task => [task.key, task]));
|
|
74
|
+
const next = new Map(nextPlan.tasks.map(task => [task.key, task]));
|
|
75
|
+
const added = nextPlan.tasks.filter(task => !base.has(task.key));
|
|
76
|
+
const replaced = nextPlan.tasks.flatMap(task => {
|
|
77
|
+
const previous = base.get(task.key);
|
|
78
|
+
if (!previous || canonicalWorkroomJson(previous) === canonicalWorkroomJson(task))
|
|
79
|
+
return [];
|
|
80
|
+
return [{
|
|
81
|
+
taskKey: task.key,
|
|
82
|
+
expectedTaskRevision: positiveInteger(baseTaskRevisions[task.key], `Plan Revision base Task ${task.key} revision`),
|
|
83
|
+
task,
|
|
84
|
+
}];
|
|
85
|
+
});
|
|
86
|
+
const removed = basePlan.tasks.filter(task => !next.has(task.key)).map(task => ({
|
|
87
|
+
taskKey: task.key,
|
|
88
|
+
expectedTaskRevision: positiveInteger(baseTaskRevisions[task.key], `Plan Revision base Task ${task.key} revision`),
|
|
89
|
+
}));
|
|
90
|
+
return deepFreeze({ added, replaced, removed });
|
|
91
|
+
}
|
|
92
|
+
function normalizeTaskRevisions(basePlan, value) {
|
|
93
|
+
const keys = Object.keys(value).sort();
|
|
94
|
+
const expected = basePlan.tasks.map(task => task.key).sort();
|
|
95
|
+
if (canonicalWorkroomJson(keys) !== canonicalWorkroomJson(expected)) {
|
|
96
|
+
throw new Error('Plan Revision base Task revisions are incomplete');
|
|
97
|
+
}
|
|
98
|
+
return deepFreeze(Object.fromEntries(keys.map(key => [
|
|
99
|
+
key,
|
|
100
|
+
positiveInteger(value[key], `Plan Revision base Task ${key} revision`),
|
|
101
|
+
])));
|
|
102
|
+
}
|
|
103
|
+
function assertPinnedPlanMetadata(base, next) {
|
|
104
|
+
const mutable = new Set(['proposalId', 'tasks', 'digest']);
|
|
105
|
+
const basePinned = Object.fromEntries(Object.entries(base).filter(([key]) => !mutable.has(key)));
|
|
106
|
+
const nextPinned = Object.fromEntries(Object.entries(next).filter(([key]) => !mutable.has(key)));
|
|
107
|
+
if (canonicalWorkroomJson(basePinned) !== canonicalWorkroomJson(nextPinned)) {
|
|
108
|
+
throw new Error('Plan Revision cannot replace pinned Project/Profile/Planning/Scheduler policy');
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function requireText(value, label) {
|
|
112
|
+
if (typeof value !== 'string' || !value.trim() || value !== value.trim()) {
|
|
113
|
+
throw new Error(`${label} must be canonical non-empty text`);
|
|
114
|
+
}
|
|
115
|
+
return value;
|
|
116
|
+
}
|
|
117
|
+
function requireDigest(value, label) {
|
|
118
|
+
if (typeof value !== 'string' || !/^sha256:[a-f0-9]{64}$/u.test(value)) {
|
|
119
|
+
throw new Error(`${label} must be a canonical sha256 digest`);
|
|
120
|
+
}
|
|
121
|
+
return value;
|
|
122
|
+
}
|
|
123
|
+
function positiveInteger(value, label) {
|
|
124
|
+
if (!Number.isSafeInteger(value) || Number(value) < 1)
|
|
125
|
+
throw new Error(`${label} must be a positive safe integer`);
|
|
126
|
+
return Number(value);
|
|
127
|
+
}
|
|
128
|
+
function nonNegativeInteger(value, label) {
|
|
129
|
+
if (!Number.isSafeInteger(value) || Number(value) < 0)
|
|
130
|
+
throw new Error(`${label} must be a non-negative safe integer`);
|
|
131
|
+
return Number(value);
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=plan-revision.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plan-revision.js","sourceRoot":"","sources":["../../src/workroom/plan-revision.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,uBAAuB,IAAI,UAAU,EACrC,4BAA4B,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,0BAA0B,GAG3B,MAAM,4BAA4B,CAAC;AA0CpC;;;GAGG;AACH,MAAM,UAAU,mCAAmC,CACjD,KAAyC;IAEzC,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI;QAC3B,CAAC,KAAK,CAAC,UAAU,EAAE,YAAY,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,KAA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competency' | 'integration' | 'policy';
|
|
3
|
+
export interface CapabilityPackRef {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly version: string;
|
|
6
|
+
readonly digest: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CapabilityDefinition {
|
|
9
|
+
readonly id: string;
|
|
10
|
+
readonly digest: string;
|
|
11
|
+
}
|
|
12
|
+
export type ProfileToolDefinition = CapabilityDefinition;
|
|
13
|
+
export interface ProfileSkillDefinition extends CapabilityDefinition {
|
|
14
|
+
readonly requiresTools: readonly string[];
|
|
15
|
+
}
|
|
16
|
+
export interface ProfileAgentDefinition extends CapabilityDefinition {
|
|
17
|
+
readonly role: string;
|
|
18
|
+
readonly allowedTools: readonly string[];
|
|
19
|
+
readonly allowedSkills: readonly string[];
|
|
20
|
+
}
|
|
21
|
+
/** Content-free Project Knowledge handle plus its exact Assignment closure. */
|
|
22
|
+
export interface ProfileKnowledgeDefinition extends CapabilityDefinition {
|
|
23
|
+
readonly allowedRoles: readonly string[];
|
|
24
|
+
/** Empty means every Task assigned to an allowed role. */
|
|
25
|
+
readonly taskKeys: readonly string[];
|
|
26
|
+
}
|
|
27
|
+
export interface ProfileAcceptancePolicyDefinition extends CapabilityDefinition {
|
|
28
|
+
readonly tasks: readonly Readonly<{
|
|
29
|
+
taskKey: string;
|
|
30
|
+
kind: 'task_result' | 'integration_candidate' | 'effect_intent';
|
|
31
|
+
criteria: readonly Readonly<{
|
|
32
|
+
id: string;
|
|
33
|
+
kind: 'deterministic' | 'judgment';
|
|
34
|
+
description: string;
|
|
35
|
+
}>[];
|
|
36
|
+
requiredEvidence: readonly string[];
|
|
37
|
+
minimumRoute: 'baseline' | 'reviewer_required' | 'sponsor_required' | 'reviewer_then_sponsor';
|
|
38
|
+
reviewerPrincipalId: string;
|
|
39
|
+
sponsorPrincipalId: string;
|
|
40
|
+
reviewerTimeoutMs: number;
|
|
41
|
+
sponsorTimeoutMs: number;
|
|
42
|
+
}>[];
|
|
43
|
+
readonly memorySchema: Readonly<{
|
|
44
|
+
revision: number;
|
|
45
|
+
claimRules: readonly Readonly<{
|
|
46
|
+
key: string;
|
|
47
|
+
valueType: 'string';
|
|
48
|
+
allowedStatuses: readonly ('verified' | 'assumed')[];
|
|
49
|
+
allowSupersedes: boolean;
|
|
50
|
+
}>[];
|
|
51
|
+
}>;
|
|
52
|
+
}
|
|
53
|
+
export interface WorkflowCapabilityRequirement {
|
|
54
|
+
readonly tools?: readonly string[];
|
|
55
|
+
readonly skills?: readonly string[];
|
|
56
|
+
}
|
|
57
|
+
export interface WorkflowTaskTemplate {
|
|
58
|
+
readonly key: string;
|
|
59
|
+
readonly role: string;
|
|
60
|
+
readonly requires: WorkflowCapabilityRequirement;
|
|
61
|
+
/** Exact content-free atomic demand; absence makes Portfolio admission unavailable. */
|
|
62
|
+
readonly resourceRequirements?: PortfolioResourceBundle;
|
|
63
|
+
}
|
|
64
|
+
export interface WorkflowStrategyDefinition extends CapabilityDefinition {
|
|
65
|
+
readonly requiredByProfile: boolean;
|
|
66
|
+
readonly tasks: readonly WorkflowTaskTemplate[];
|
|
67
|
+
}
|
|
68
|
+
export interface CapabilityPack extends CapabilityPackRef {
|
|
69
|
+
readonly kind: CapabilityPackKind;
|
|
70
|
+
readonly requires?: readonly CapabilityPackRef[];
|
|
71
|
+
readonly tools?: readonly ProfileToolDefinition[];
|
|
72
|
+
readonly skills?: readonly ProfileSkillDefinition[];
|
|
73
|
+
readonly agents?: readonly ProfileAgentDefinition[];
|
|
74
|
+
readonly workflows?: readonly WorkflowStrategyDefinition[];
|
|
75
|
+
readonly memories?: readonly ProfileKnowledgeDefinition[];
|
|
76
|
+
readonly glossaries?: readonly ProfileKnowledgeDefinition[];
|
|
77
|
+
readonly acceptancePolicies?: readonly ProfileAcceptancePolicyDefinition[];
|
|
78
|
+
}
|
|
79
|
+
export interface WorkroomProfileRevision {
|
|
80
|
+
readonly id: string;
|
|
81
|
+
readonly projectId: string;
|
|
82
|
+
readonly charterRevisionId: string;
|
|
83
|
+
readonly packs: readonly CapabilityPackRef[];
|
|
84
|
+
readonly enabledTools: readonly string[];
|
|
85
|
+
readonly enabledSkills: readonly string[];
|
|
86
|
+
readonly enabledAgents: readonly string[];
|
|
87
|
+
readonly enabledWorkflows: readonly string[];
|
|
88
|
+
readonly enabledMemories?: readonly string[];
|
|
89
|
+
readonly enabledGlossaries?: readonly string[];
|
|
90
|
+
readonly enabledAcceptancePolicies?: readonly string[];
|
|
91
|
+
}
|
|
92
|
+
export interface GenerationCapabilitySupply {
|
|
93
|
+
readonly tools: readonly CapabilityDefinition[];
|
|
94
|
+
readonly skills: readonly CapabilityDefinition[];
|
|
95
|
+
readonly agents: readonly CapabilityDefinition[];
|
|
96
|
+
}
|
|
97
|
+
export interface WorkroomProfileCompilerInput {
|
|
98
|
+
readonly revision: WorkroomProfileRevision;
|
|
99
|
+
readonly packs: readonly CapabilityPack[];
|
|
100
|
+
readonly generationSupply: GenerationCapabilitySupply;
|
|
101
|
+
}
|
|
102
|
+
export interface ProfileCompilerDiagnostic {
|
|
103
|
+
readonly code: string;
|
|
104
|
+
readonly path: string;
|
|
105
|
+
readonly message: string;
|
|
106
|
+
}
|
|
107
|
+
export interface CompiledWorkroomProfile {
|
|
108
|
+
readonly revisionId: string;
|
|
109
|
+
readonly projectId: string;
|
|
110
|
+
readonly charterRevisionId: string;
|
|
111
|
+
readonly packRefs: readonly CapabilityPackRef[];
|
|
112
|
+
readonly tools: readonly ProfileToolDefinition[];
|
|
113
|
+
readonly skills: readonly ProfileSkillDefinition[];
|
|
114
|
+
readonly agents: readonly ProfileAgentDefinition[];
|
|
115
|
+
readonly workflows: readonly WorkflowStrategyDefinition[];
|
|
116
|
+
readonly memories: readonly ProfileKnowledgeDefinition[];
|
|
117
|
+
readonly glossaries: readonly ProfileKnowledgeDefinition[];
|
|
118
|
+
readonly acceptancePolicies: readonly ProfileAcceptancePolicyDefinition[];
|
|
119
|
+
readonly digest: string;
|
|
120
|
+
}
|
|
121
|
+
export type CompileWorkroomProfileResult = Readonly<{
|
|
122
|
+
ok: true;
|
|
123
|
+
profile: CompiledWorkroomProfile;
|
|
124
|
+
diagnostics: readonly [];
|
|
125
|
+
}> | Readonly<{
|
|
126
|
+
ok: false;
|
|
127
|
+
diagnostics: readonly ProfileCompilerDiagnostic[];
|
|
128
|
+
}>;
|
|
129
|
+
export declare function compileWorkroomProfile(input: WorkroomProfileCompilerInput): CompileWorkroomProfileResult;
|
|
130
|
+
//# sourceMappingURL=profile-compiler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-compiler.d.ts","sourceRoot":"","sources":["../../src/workroom/profile-compiler.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,uBAAuB,EAC7B,MAAM,mCAAmC,CAAC;AAE3C,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,YAAY,GAAG,aAAa,GAAG,QAAQ,CAAC;AAEpF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,qBAAqB,GAAG,oBAAoB,CAAC;AAEzD,MAAM,WAAW,sBAAuB,SAAQ,oBAAoB;IAClE,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,sBAAuB,SAAQ,oBAAoB;IAClE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IACzC,QAAQ,CAAC,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C;AAED,+EAA+E;AAC/E,MAAM,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E,SAAS,qBAAqB,EAAE,CAAC;IACjD,QAAQ,CAAC,MAAM,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACnD,QAAQ,CAAC,MAAM,EAAE,SAAS,sBAAsB,EAAE,CAAC;IACnD,QAAQ,CAAC,SAAS,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAC1D,QAAQ,CAAC,QAAQ,EAAE,SAAS,0BAA0B,EAAE,CAAC;IACzD,QAAQ,CAAC,UAAU,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAC3D,QAAQ,CAAC,kBAAkB,EAAE,SAAS,iCAAiC,EAAE,CAAC;IAC1E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,4BAA4B,GACpC,QAAQ,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,uBAAuB,CAAC;IAAC,WAAW,EAAE,SAAS,EAAE,CAAA;CAAE,CAAC,GAClF,QAAQ,CAAC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,WAAW,EAAE,SAAS,yBAAyB,EAAE,CAAA;CAAE,CAAC,CAAC;AAE/E,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,4BAA4B,GAAG,4BAA4B,CA8LxG"}
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
import { compareCanonicalWorkroomText } from './canonical-value.js';
|
|
2
|
+
import { createHash } from 'node:crypto';
|
|
3
|
+
import { parsePortfolioResourceBundle, } from '../portfolio/portfolio-journal.js';
|
|
4
|
+
export function compileWorkroomProfile(input) {
|
|
5
|
+
const diagnostics = [];
|
|
6
|
+
const packCatalog = indexExact(input.packs, 'packs', diagnostics);
|
|
7
|
+
const packs = input.revision.packs
|
|
8
|
+
.map((ref) => {
|
|
9
|
+
const candidate = packCatalog.get(packVersionKey(ref));
|
|
10
|
+
const path = `revision.packs.${packVersionKey(ref)}`;
|
|
11
|
+
if (!candidate) {
|
|
12
|
+
diagnostics.push({
|
|
13
|
+
code: 'pack.not_found',
|
|
14
|
+
path,
|
|
15
|
+
message: `Capability Pack ${packVersionKey(ref)} is not available`,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
else if (candidate.digest !== ref.digest) {
|
|
19
|
+
diagnostics.push({
|
|
20
|
+
code: 'pack.digest_mismatch',
|
|
21
|
+
path,
|
|
22
|
+
message: `Capability Pack ${packVersionKey(ref)} has digest ${candidate.digest}, expected ${ref.digest}`,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return candidate?.digest === ref.digest ? candidate : undefined;
|
|
26
|
+
})
|
|
27
|
+
.filter((pack) => Boolean(pack))
|
|
28
|
+
.sort(comparePack);
|
|
29
|
+
const selectedPacks = new Map(packs.map((pack) => [packVersionKey(pack), pack]));
|
|
30
|
+
for (const pack of packs) {
|
|
31
|
+
for (const requirement of pack.requires ?? []) {
|
|
32
|
+
const dependency = selectedPacks.get(packVersionKey(requirement));
|
|
33
|
+
const path = `packs.${packVersionKey(pack)}.requires.${packVersionKey(requirement)}`;
|
|
34
|
+
if (!dependency) {
|
|
35
|
+
diagnostics.push({
|
|
36
|
+
code: 'pack.dependency_missing',
|
|
37
|
+
path,
|
|
38
|
+
message: `Capability Pack ${packVersionKey(pack)} requires selected Pack ${packVersionKey(requirement)}`,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
else if (dependency.digest !== requirement.digest) {
|
|
42
|
+
diagnostics.push({
|
|
43
|
+
code: 'pack.dependency_digest_mismatch',
|
|
44
|
+
path,
|
|
45
|
+
message: `Capability Pack ${packVersionKey(pack)} requires ${packVersionKey(requirement)} digest ${requirement.digest}, selected ${dependency.digest}`,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const tools = selectDefinitions(input.revision.enabledTools, packs.flatMap((pack) => pack.tools ?? []), input.generationSupply.tools, 'tool', diagnostics);
|
|
51
|
+
const skills = selectDefinitions(input.revision.enabledSkills, packs.flatMap((pack) => pack.skills ?? []), input.generationSupply.skills, 'skill', diagnostics);
|
|
52
|
+
const agents = selectDefinitions(input.revision.enabledAgents, packs.flatMap((pack) => pack.agents ?? []), input.generationSupply.agents, 'agent', diagnostics);
|
|
53
|
+
const packWorkflows = packs.flatMap((pack) => pack.workflows ?? []);
|
|
54
|
+
const enabledWorkflowIds = new Set(input.revision.enabledWorkflows);
|
|
55
|
+
for (const workflow of sortById(packWorkflows.filter((item) => item.requiredByProfile))) {
|
|
56
|
+
if (enabledWorkflowIds.has(workflow.id))
|
|
57
|
+
continue;
|
|
58
|
+
diagnostics.push({
|
|
59
|
+
code: 'workflow.required_not_enabled',
|
|
60
|
+
path: `workflows.${workflow.id}`,
|
|
61
|
+
message: `Required Workflow ${workflow.id} is not enabled by this Profile revision`,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
const workflows = selectPackDefinitions(input.revision.enabledWorkflows, packWorkflows, 'workflow', diagnostics);
|
|
65
|
+
const memories = selectPackDefinitions(input.revision.enabledMemories ?? [], packs.flatMap((pack) => pack.memories ?? []), 'memory', diagnostics);
|
|
66
|
+
const glossaries = selectPackDefinitions(input.revision.enabledGlossaries ?? [], packs.flatMap((pack) => pack.glossaries ?? []), 'glossary', diagnostics);
|
|
67
|
+
const acceptancePolicies = selectPackDefinitions(input.revision.enabledAcceptancePolicies ?? [], packs.flatMap((pack) => pack.acceptancePolicies ?? []), 'acceptancePolicy', diagnostics);
|
|
68
|
+
if (acceptancePolicies.length > 1) {
|
|
69
|
+
diagnostics.push({
|
|
70
|
+
code: 'acceptancePolicy.multiple_selected',
|
|
71
|
+
path: 'revision.enabledAcceptancePolicies',
|
|
72
|
+
message: 'A Profile revision must select exactly one Acceptance Policy authority',
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
const acceptanceTaskOwners = new Map();
|
|
76
|
+
for (const policy of acceptancePolicies) {
|
|
77
|
+
for (const task of policy.tasks) {
|
|
78
|
+
const owner = acceptanceTaskOwners.get(task.taskKey);
|
|
79
|
+
if (owner) {
|
|
80
|
+
diagnostics.push({
|
|
81
|
+
code: 'acceptancePolicy.task_conflict',
|
|
82
|
+
path: `acceptancePolicies.${policy.id}.tasks.${task.taskKey}`,
|
|
83
|
+
message: `Acceptance Task ${task.taskKey} is already owned by Policy ${owner}`,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
acceptanceTaskOwners.set(task.taskKey, policy.id);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
const enabledToolIds = new Set(tools.map((tool) => tool.id));
|
|
92
|
+
const enabledSkills = new Map(skills.map((skill) => [skill.id, skill]));
|
|
93
|
+
for (const skill of skills) {
|
|
94
|
+
for (const toolId of unique(skill.requiresTools)) {
|
|
95
|
+
if (enabledToolIds.has(toolId))
|
|
96
|
+
continue;
|
|
97
|
+
diagnostics.push({
|
|
98
|
+
code: 'skill.required_tool_not_enabled',
|
|
99
|
+
path: `skills.${skill.id}.requiresTools.${toolId}`,
|
|
100
|
+
message: `Skill ${skill.id} requires Tool ${toolId}, but the Tool is not enabled by this Profile revision`,
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
for (const workflow of workflows) {
|
|
105
|
+
for (const task of workflow.tasks) {
|
|
106
|
+
if (task.resourceRequirements !== undefined) {
|
|
107
|
+
try {
|
|
108
|
+
parsePortfolioResourceBundle(task.resourceRequirements);
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
diagnostics.push({
|
|
112
|
+
code: 'workflow.task_resource_requirements_invalid',
|
|
113
|
+
path: `workflows.${workflow.id}.tasks.${task.key}.resourceRequirements`,
|
|
114
|
+
message: error instanceof Error ? error.message : String(error),
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (!workflow.requiredByProfile)
|
|
119
|
+
continue;
|
|
120
|
+
const requiredSkills = unique(task.requires.skills ?? []);
|
|
121
|
+
const requiredTools = unique([
|
|
122
|
+
...(task.requires.tools ?? []),
|
|
123
|
+
...requiredSkills.flatMap((skillId) => enabledSkills.get(skillId)?.requiresTools ?? []),
|
|
124
|
+
]);
|
|
125
|
+
const capableAgent = agents.some((agent) => agent.role === task.role
|
|
126
|
+
&& requiredSkills.every((skillId) => enabledSkills.has(skillId) && agent.allowedSkills.includes(skillId))
|
|
127
|
+
&& requiredTools.every((toolId) => enabledToolIds.has(toolId) && agent.allowedTools.includes(toolId)));
|
|
128
|
+
if (!capableAgent) {
|
|
129
|
+
diagnostics.push({
|
|
130
|
+
code: 'workflow.task_unsatisfied',
|
|
131
|
+
path: `workflows.${workflow.id}.tasks.${task.key}`,
|
|
132
|
+
message: `Required Workflow task ${workflow.id}/${task.key} has no enabled Agent within the Profile capability ceiling`,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (diagnostics.length > 0)
|
|
138
|
+
return failed(diagnostics);
|
|
139
|
+
const projection = {
|
|
140
|
+
revisionId: input.revision.id,
|
|
141
|
+
projectId: input.revision.projectId,
|
|
142
|
+
charterRevisionId: input.revision.charterRevisionId,
|
|
143
|
+
packRefs: [...input.revision.packs].sort(comparePackRef).map(copyPackRef),
|
|
144
|
+
tools: sortById(tools).map(copyTool),
|
|
145
|
+
skills: sortById(skills).map(copySkill),
|
|
146
|
+
agents: sortById(agents).map(copyAgent),
|
|
147
|
+
workflows: sortById(workflows).map(copyWorkflow),
|
|
148
|
+
memories: sortById(memories).map(copyKnowledge),
|
|
149
|
+
glossaries: sortById(glossaries).map(copyKnowledge),
|
|
150
|
+
acceptancePolicies: sortById(acceptancePolicies).map(copyAcceptancePolicy),
|
|
151
|
+
};
|
|
152
|
+
const profile = deepFreeze({
|
|
153
|
+
...projection,
|
|
154
|
+
digest: digest(projection),
|
|
155
|
+
});
|
|
156
|
+
return deepFreeze({ ok: true, profile, diagnostics: [] });
|
|
157
|
+
}
|
|
158
|
+
function selectDefinitions(enabled, definitions, supply, kind, diagnostics) {
|
|
159
|
+
const selected = selectPackDefinitions(enabled, definitions, kind, diagnostics);
|
|
160
|
+
const available = new Map();
|
|
161
|
+
for (const item of [...supply].sort(compareDefinition)) {
|
|
162
|
+
const current = available.get(item.id);
|
|
163
|
+
if (current && current.digest !== item.digest) {
|
|
164
|
+
diagnostics.push({
|
|
165
|
+
code: `${kind}.generation_supply_conflict`,
|
|
166
|
+
path: `generationSupply.${kind}s.${item.id}`,
|
|
167
|
+
message: `${label(kind)} ${item.id} has conflicting digests in the active generation`,
|
|
168
|
+
});
|
|
169
|
+
continue;
|
|
170
|
+
}
|
|
171
|
+
available.set(item.id, item);
|
|
172
|
+
}
|
|
173
|
+
for (const item of selected) {
|
|
174
|
+
const supplied = available.get(item.id);
|
|
175
|
+
if (!supplied || supplied.digest !== item.digest) {
|
|
176
|
+
diagnostics.push({
|
|
177
|
+
code: `${kind}.generation_supply_mismatch`,
|
|
178
|
+
path: `generationSupply.${kind}s.${item.id}`,
|
|
179
|
+
message: `${label(kind)} ${item.id} is not present in the active generation with digest ${item.digest}`,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return selected;
|
|
184
|
+
}
|
|
185
|
+
function selectPackDefinitions(enabled, definitions, kind, diagnostics) {
|
|
186
|
+
const catalog = new Map();
|
|
187
|
+
for (const definition of [...definitions].sort(compareDefinition)) {
|
|
188
|
+
const current = catalog.get(definition.id);
|
|
189
|
+
if (current && (current.digest !== definition.digest || stableJson(current) !== stableJson(definition))) {
|
|
190
|
+
diagnostics.push({
|
|
191
|
+
code: `${kind}.canonical_conflict`,
|
|
192
|
+
path: `${kind}s.${definition.id}`,
|
|
193
|
+
message: `${label(kind)} ${definition.id} has conflicting canonical digests`,
|
|
194
|
+
});
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
catalog.set(definition.id, definition);
|
|
198
|
+
}
|
|
199
|
+
return unique(enabled).flatMap((id) => {
|
|
200
|
+
const definition = catalog.get(id);
|
|
201
|
+
if (definition)
|
|
202
|
+
return [definition];
|
|
203
|
+
diagnostics.push({
|
|
204
|
+
code: `${kind}.not_in_profile_packs`,
|
|
205
|
+
path: `revision.enabled${label(kind)}s.${id}`,
|
|
206
|
+
message: `${label(kind)} ${id} is not supplied by the selected Capability Packs`,
|
|
207
|
+
});
|
|
208
|
+
return [];
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
function indexExact(packs, path, diagnostics) {
|
|
212
|
+
const result = new Map();
|
|
213
|
+
for (const pack of [...packs].sort(comparePack)) {
|
|
214
|
+
const key = packVersionKey(pack);
|
|
215
|
+
const current = result.get(key);
|
|
216
|
+
if (current && (current.digest !== pack.digest || stableJson(current) !== stableJson(pack))) {
|
|
217
|
+
diagnostics.push({
|
|
218
|
+
code: 'pack.canonical_conflict',
|
|
219
|
+
path: `${path}.${key}`,
|
|
220
|
+
message: `Capability Pack ${key} has conflicting canonical digests`,
|
|
221
|
+
});
|
|
222
|
+
continue;
|
|
223
|
+
}
|
|
224
|
+
result.set(key, pack);
|
|
225
|
+
}
|
|
226
|
+
return result;
|
|
227
|
+
}
|
|
228
|
+
function capabilityKey(value) {
|
|
229
|
+
return `${value.id}@${value.version}#${value.digest}`;
|
|
230
|
+
}
|
|
231
|
+
function packVersionKey(value) {
|
|
232
|
+
return `${value.id}@${value.version}`;
|
|
233
|
+
}
|
|
234
|
+
function comparePack(left, right) {
|
|
235
|
+
return compareCanonicalWorkroomText(capabilityKey(left), capabilityKey(right));
|
|
236
|
+
}
|
|
237
|
+
function comparePackRef(left, right) {
|
|
238
|
+
return compareCanonicalWorkroomText(capabilityKey(left), capabilityKey(right));
|
|
239
|
+
}
|
|
240
|
+
function compareDefinition(left, right) {
|
|
241
|
+
return compareCanonicalWorkroomText(`${left.id}#${left.digest}`, `${right.id}#${right.digest}`);
|
|
242
|
+
}
|
|
243
|
+
function sortById(values) {
|
|
244
|
+
return [...values].sort((left, right) => compareCanonicalWorkroomText(left.id, right.id));
|
|
245
|
+
}
|
|
246
|
+
function unique(values) {
|
|
247
|
+
return [...new Set(values)].sort((left, right) => compareCanonicalWorkroomText(left, right));
|
|
248
|
+
}
|
|
249
|
+
function label(value) {
|
|
250
|
+
return `${value.slice(0, 1).toUpperCase()}${value.slice(1)}`;
|
|
251
|
+
}
|
|
252
|
+
function copyPackRef(value) {
|
|
253
|
+
return { id: value.id, version: value.version, digest: value.digest };
|
|
254
|
+
}
|
|
255
|
+
function copyTool(value) {
|
|
256
|
+
return { id: value.id, digest: value.digest };
|
|
257
|
+
}
|
|
258
|
+
function copySkill(value) {
|
|
259
|
+
return { id: value.id, digest: value.digest, requiresTools: unique(value.requiresTools) };
|
|
260
|
+
}
|
|
261
|
+
function copyAgent(value) {
|
|
262
|
+
return {
|
|
263
|
+
id: value.id,
|
|
264
|
+
digest: value.digest,
|
|
265
|
+
role: value.role,
|
|
266
|
+
allowedTools: unique(value.allowedTools),
|
|
267
|
+
allowedSkills: unique(value.allowedSkills),
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
function copyWorkflow(value) {
|
|
271
|
+
return {
|
|
272
|
+
id: value.id,
|
|
273
|
+
digest: value.digest,
|
|
274
|
+
requiredByProfile: value.requiredByProfile,
|
|
275
|
+
tasks: [...value.tasks]
|
|
276
|
+
.sort((left, right) => compareCanonicalWorkroomText(left.key, right.key))
|
|
277
|
+
.map((task) => ({
|
|
278
|
+
key: task.key,
|
|
279
|
+
role: task.role,
|
|
280
|
+
requires: {
|
|
281
|
+
tools: unique(task.requires.tools ?? []),
|
|
282
|
+
skills: unique(task.requires.skills ?? []),
|
|
283
|
+
},
|
|
284
|
+
...(task.resourceRequirements === undefined
|
|
285
|
+
? {}
|
|
286
|
+
: { resourceRequirements: parsePortfolioResourceBundle(task.resourceRequirements) }),
|
|
287
|
+
})),
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
function copyKnowledge(value) {
|
|
291
|
+
return {
|
|
292
|
+
id: value.id,
|
|
293
|
+
digest: value.digest,
|
|
294
|
+
allowedRoles: unique(value.allowedRoles),
|
|
295
|
+
taskKeys: unique(value.taskKeys),
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
function copyAcceptancePolicy(value) {
|
|
299
|
+
return {
|
|
300
|
+
id: value.id,
|
|
301
|
+
digest: value.digest,
|
|
302
|
+
tasks: [...value.tasks]
|
|
303
|
+
.sort((left, right) => compareCanonicalWorkroomText(left.taskKey, right.taskKey))
|
|
304
|
+
.map(task => ({
|
|
305
|
+
taskKey: task.taskKey,
|
|
306
|
+
kind: task.kind,
|
|
307
|
+
criteria: [...task.criteria]
|
|
308
|
+
.sort((left, right) => compareCanonicalWorkroomText(left.id, right.id))
|
|
309
|
+
.map(criterion => ({ ...criterion })),
|
|
310
|
+
requiredEvidence: unique(task.requiredEvidence),
|
|
311
|
+
minimumRoute: task.minimumRoute,
|
|
312
|
+
reviewerPrincipalId: task.reviewerPrincipalId,
|
|
313
|
+
sponsorPrincipalId: task.sponsorPrincipalId,
|
|
314
|
+
reviewerTimeoutMs: task.reviewerTimeoutMs,
|
|
315
|
+
sponsorTimeoutMs: task.sponsorTimeoutMs,
|
|
316
|
+
})),
|
|
317
|
+
memorySchema: {
|
|
318
|
+
revision: value.memorySchema.revision,
|
|
319
|
+
claimRules: [...value.memorySchema.claimRules]
|
|
320
|
+
.sort((left, right) => compareCanonicalWorkroomText(left.key, right.key))
|
|
321
|
+
.map(rule => ({
|
|
322
|
+
key: rule.key,
|
|
323
|
+
valueType: rule.valueType,
|
|
324
|
+
allowedStatuses: [...new Set(rule.allowedStatuses)].sort(),
|
|
325
|
+
allowSupersedes: rule.allowSupersedes,
|
|
326
|
+
})),
|
|
327
|
+
},
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
function failed(diagnostics) {
|
|
331
|
+
return deepFreeze({
|
|
332
|
+
ok: false,
|
|
333
|
+
diagnostics: [...diagnostics].sort((left, right) => compareCanonicalWorkroomText(`${left.path}\u0000${left.code}\u0000${left.message}`, `${right.path}\u0000${right.code}\u0000${right.message}`)),
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
function digest(value) {
|
|
337
|
+
return `sha256:${createHash('sha256').update(stableJson(value)).digest('hex')}`;
|
|
338
|
+
}
|
|
339
|
+
function stableJson(value) {
|
|
340
|
+
if (Array.isArray(value))
|
|
341
|
+
return `[${value.map(stableJson).join(',')}]`;
|
|
342
|
+
if (value && typeof value === 'object') {
|
|
343
|
+
return `{${Object.entries(value)
|
|
344
|
+
.sort(([left], [right]) => compareCanonicalWorkroomText(left, right))
|
|
345
|
+
.map(([key, item]) => `${JSON.stringify(key)}:${stableJson(item)}`)
|
|
346
|
+
.join(',')}}`;
|
|
347
|
+
}
|
|
348
|
+
return JSON.stringify(value);
|
|
349
|
+
}
|
|
350
|
+
function deepFreeze(value) {
|
|
351
|
+
if (!value || typeof value !== 'object' || Object.isFrozen(value))
|
|
352
|
+
return value;
|
|
353
|
+
for (const item of Object.values(value))
|
|
354
|
+
deepFreeze(item);
|
|
355
|
+
return Object.freeze(value);
|
|
356
|
+
}
|
|
357
|
+
//# sourceMappingURL=profile-compiler.js.map
|