@assemblyline-agents/runtime 5.0.9 → 6.0.0
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 +18 -5
- package/dist/a2a-client.d.ts +1 -3
- package/dist/a2a-client.d.ts.map +1 -1
- package/dist/a2a-client.js +1 -4
- package/dist/a2a-client.js.map +1 -1
- package/dist/agent-event-handlers.d.ts +2 -0
- package/dist/agent-event-handlers.d.ts.map +1 -1
- package/dist/agent-event-handlers.js +1 -1
- package/dist/agent-event-handlers.js.map +1 -1
- package/dist/agent-hook-context.d.ts.map +1 -1
- package/dist/agent-hook-context.js +3 -1
- package/dist/agent-hook-context.js.map +1 -1
- package/dist/agent-hook-controller-factory.d.ts +5 -1
- package/dist/agent-hook-controller-factory.d.ts.map +1 -1
- package/dist/agent-hook-controller-factory.js +11 -9
- package/dist/agent-hook-controller-factory.js.map +1 -1
- package/dist/agent-hook-evaluation.d.ts +0 -2
- package/dist/agent-hook-evaluation.d.ts.map +1 -1
- package/dist/agent-hook-evaluation.js +10 -10
- package/dist/agent-hook-evaluation.js.map +1 -1
- package/dist/agent-hook-run-lifecycle.d.ts +1 -2
- package/dist/agent-hook-run-lifecycle.d.ts.map +1 -1
- package/dist/agent-hook-run-lifecycle.js +1 -2
- package/dist/agent-hook-run-lifecycle.js.map +1 -1
- package/dist/agent-surface.d.ts +5 -2
- package/dist/agent-surface.d.ts.map +1 -1
- package/dist/agent-surface.js +11 -3
- package/dist/agent-surface.js.map +1 -1
- package/dist/artifact-selection.js +1 -1
- package/dist/artifact-selection.js.map +1 -1
- package/dist/assembly-line-runtime.d.ts +9 -0
- package/dist/assembly-line-runtime.d.ts.map +1 -0
- package/dist/assembly-line-runtime.js +9 -0
- package/dist/assembly-line-runtime.js.map +1 -0
- package/dist/attachment-download.d.ts +17 -0
- package/dist/attachment-download.d.ts.map +1 -0
- package/dist/attachment-download.js +51 -0
- package/dist/attachment-download.js.map +1 -0
- package/dist/attachments.d.ts +2 -14
- package/dist/attachments.d.ts.map +1 -1
- package/dist/attachments.js +8 -80
- package/dist/attachments.js.map +1 -1
- package/dist/background-review-types.d.ts +2 -0
- package/dist/background-review-types.d.ts.map +1 -1
- package/dist/background-review.d.ts.map +1 -1
- package/dist/background-review.js +13 -0
- package/dist/background-review.js.map +1 -1
- package/dist/background-subagents.d.ts +1 -1
- package/dist/background-subagents.d.ts.map +1 -1
- package/dist/blob-storage.d.ts +12 -0
- package/dist/blob-storage.d.ts.map +1 -0
- package/dist/blob-storage.js +86 -0
- package/dist/blob-storage.js.map +1 -0
- package/dist/builtin-tool-executors.d.ts.map +1 -1
- package/dist/builtin-tool-executors.js +38 -29
- package/dist/builtin-tool-executors.js.map +1 -1
- package/dist/builtin-tools.d.ts +1 -2
- package/dist/builtin-tools.d.ts.map +1 -1
- package/dist/builtin-tools.js +20 -18
- package/dist/builtin-tools.js.map +1 -1
- package/dist/capability-inspection.d.ts +4 -0
- package/dist/capability-inspection.d.ts.map +1 -1
- package/dist/capability-inspection.js +10 -11
- package/dist/capability-inspection.js.map +1 -1
- package/dist/channel-credential-environment.d.ts +1 -1
- package/dist/channel-credential-environment.d.ts.map +1 -1
- package/dist/channel-credential-environment.js +1 -6
- package/dist/channel-credential-environment.js.map +1 -1
- package/dist/channel-ingress.d.ts +1 -2
- package/dist/channel-ingress.d.ts.map +1 -1
- package/dist/channel-ingress.js +2 -2
- package/dist/channel-ingress.js.map +1 -1
- package/dist/channel-operation.d.ts +0 -1
- package/dist/channel-operation.d.ts.map +1 -1
- package/dist/channel-operation.js +1 -2
- package/dist/channel-operation.js.map +1 -1
- package/dist/channel.d.ts +32 -3
- package/dist/channel.d.ts.map +1 -1
- package/dist/connection-assets.d.ts.map +1 -1
- package/dist/connection-assets.js.map +1 -1
- package/dist/connection-authorization-service.d.ts +52 -0
- package/dist/connection-authorization-service.d.ts.map +1 -0
- package/dist/connection-authorization-service.js +417 -0
- package/dist/connection-authorization-service.js.map +1 -0
- package/dist/connection-credential-materialization.d.ts +23 -0
- package/dist/connection-credential-materialization.d.ts.map +1 -0
- package/dist/connection-credential-materialization.js +223 -0
- package/dist/connection-credential-materialization.js.map +1 -0
- package/dist/connection-definition-loader.d.ts +6 -0
- package/dist/connection-definition-loader.d.ts.map +1 -0
- package/dist/connection-definition-loader.js +102 -0
- package/dist/connection-definition-loader.js.map +1 -0
- package/dist/connection-discovery.d.ts +11 -0
- package/dist/connection-discovery.d.ts.map +1 -0
- package/dist/connection-discovery.js +105 -0
- package/dist/connection-discovery.js.map +1 -0
- package/dist/connection-events.d.ts.map +1 -1
- package/dist/connection-events.js.map +1 -1
- package/dist/connection-oauth-client.d.ts +3 -0
- package/dist/connection-oauth-client.d.ts.map +1 -0
- package/dist/connection-oauth-client.js +64 -0
- package/dist/connection-oauth-client.js.map +1 -0
- package/dist/connection-runtime-types.d.ts +78 -0
- package/dist/connection-runtime-types.d.ts.map +1 -0
- package/dist/connection-runtime-types.js +31 -0
- package/dist/connection-runtime-types.js.map +1 -0
- package/dist/connection-search-scope.d.ts +13 -0
- package/dist/connection-search-scope.d.ts.map +1 -0
- package/dist/connection-search-scope.js +24 -0
- package/dist/connection-search-scope.js.map +1 -0
- package/dist/connections.d.ts +18 -167
- package/dist/connections.d.ts.map +1 -1
- package/dist/connections.js +71 -1017
- package/dist/connections.js.map +1 -1
- package/dist/context-policy-util.d.ts +0 -4
- package/dist/context-policy-util.d.ts.map +1 -1
- package/dist/context-policy-util.js +0 -10
- package/dist/context-policy-util.js.map +1 -1
- package/dist/conversation-context.d.ts +1 -1
- package/dist/conversation-context.d.ts.map +1 -1
- package/dist/conversation-context.js +12 -9
- package/dist/conversation-context.js.map +1 -1
- package/dist/default-outbound-route.d.ts +1 -0
- package/dist/default-outbound-route.d.ts.map +1 -1
- package/dist/default-outbound-route.js +1 -1
- package/dist/default-outbound-route.js.map +1 -1
- package/dist/delivery-queue.d.ts +1 -1
- package/dist/delivery-send.d.ts.map +1 -1
- package/dist/delivery-send.js +3 -2
- package/dist/delivery-send.js.map +1 -1
- package/dist/dynamic-schedule-execution.d.ts +4 -0
- package/dist/dynamic-schedule-execution.d.ts.map +1 -0
- package/dist/dynamic-schedule-execution.js +136 -0
- package/dist/dynamic-schedule-execution.js.map +1 -0
- package/dist/dynamic-schedule-runtime.d.ts +11 -20
- package/dist/dynamic-schedule-runtime.d.ts.map +1 -1
- package/dist/dynamic-schedule-runtime.js +27 -39
- package/dist/dynamic-schedule-runtime.js.map +1 -1
- package/dist/evolution-tracker.d.ts +52 -0
- package/dist/evolution-tracker.d.ts.map +1 -0
- package/dist/evolution-tracker.js +179 -0
- package/dist/evolution-tracker.js.map +1 -0
- package/dist/harness-capabilities.d.ts +7 -0
- package/dist/harness-capabilities.d.ts.map +1 -0
- package/dist/harness-capabilities.js +56 -0
- package/dist/harness-capabilities.js.map +1 -0
- package/dist/harness-continuation-persistence.d.ts +6 -0
- package/dist/harness-continuation-persistence.d.ts.map +1 -0
- package/dist/harness-continuation-persistence.js +11 -0
- package/dist/harness-continuation-persistence.js.map +1 -0
- package/dist/harness-execution-context.d.ts +10 -0
- package/dist/harness-execution-context.d.ts.map +1 -0
- package/dist/harness-execution-context.js +193 -0
- package/dist/harness-execution-context.js.map +1 -0
- package/dist/harness-loop-types.d.ts +67 -0
- package/dist/harness-loop-types.d.ts.map +1 -0
- package/dist/harness-loop-types.js +2 -0
- package/dist/harness-loop-types.js.map +1 -0
- package/dist/harness-loop.d.ts +13 -94
- package/dist/harness-loop.d.ts.map +1 -1
- package/dist/harness-loop.js +19 -551
- package/dist/harness-loop.js.map +1 -1
- package/dist/harness-tool-execution.d.ts +30 -0
- package/dist/harness-tool-execution.d.ts.map +1 -0
- package/dist/harness-tool-execution.js +397 -0
- package/dist/harness-tool-execution.js.map +1 -0
- package/dist/harness-transcript-resume.d.ts +18 -0
- package/dist/harness-transcript-resume.d.ts.map +1 -0
- package/dist/harness-transcript-resume.js +102 -0
- package/dist/harness-transcript-resume.js.map +1 -0
- package/dist/harness-turn-execution.d.ts +11 -0
- package/dist/harness-turn-execution.d.ts.map +1 -0
- package/dist/harness-turn-execution.js +157 -0
- package/dist/harness-turn-execution.js.map +1 -0
- package/dist/index.d.ts +10 -499
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -2139
- package/dist/index.js.map +1 -1
- package/dist/local-sandbox.d.ts +2 -1
- package/dist/local-sandbox.d.ts.map +1 -1
- package/dist/mcp-client.d.ts +11 -1
- package/dist/mcp-client.d.ts.map +1 -1
- package/dist/mcp-client.js +39 -7
- package/dist/mcp-client.js.map +1 -1
- package/dist/media-processor.d.ts +3 -1
- package/dist/media-processor.d.ts.map +1 -1
- package/dist/media-processor.js +15 -1
- package/dist/media-processor.js.map +1 -1
- package/dist/memory-storage.d.ts +51 -0
- package/dist/memory-storage.d.ts.map +1 -0
- package/dist/memory-storage.js +324 -0
- package/dist/memory-storage.js.map +1 -0
- package/dist/model-credential-stores.d.ts.map +1 -1
- package/dist/model-credential-stores.js +6 -12
- package/dist/model-credential-stores.js.map +1 -1
- package/dist/model-provider-environment.d.ts +4 -0
- package/dist/model-provider-environment.d.ts.map +1 -0
- package/dist/model-provider-environment.js +36 -0
- package/dist/model-provider-environment.js.map +1 -0
- package/dist/plugin-embeddings.d.ts +4 -0
- package/dist/plugin-embeddings.d.ts.map +1 -0
- package/dist/plugin-embeddings.js +75 -0
- package/dist/plugin-embeddings.js.map +1 -0
- package/dist/public-api.d.ts +8 -5
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +6 -4
- package/dist/public-api.js.map +1 -1
- package/dist/relay-mcp-client.js +1 -1
- package/dist/relay-mcp-client.js.map +1 -1
- package/dist/replay-resume-authorization.d.ts +8 -0
- package/dist/replay-resume-authorization.d.ts.map +1 -0
- package/dist/replay-resume-authorization.js +181 -0
- package/dist/replay-resume-authorization.js.map +1 -0
- package/dist/replay-resume-connection.d.ts +6 -0
- package/dist/replay-resume-connection.d.ts.map +1 -0
- package/dist/replay-resume-connection.js +75 -0
- package/dist/replay-resume-connection.js.map +1 -0
- package/dist/replay-resume-controls.d.ts +6 -0
- package/dist/replay-resume-controls.d.ts.map +1 -0
- package/dist/replay-resume-controls.js +157 -0
- package/dist/replay-resume-controls.js.map +1 -0
- package/dist/replay-resume-harness.d.ts +14 -0
- package/dist/replay-resume-harness.d.ts.map +1 -0
- package/dist/replay-resume-harness.js +158 -0
- package/dist/replay-resume-harness.js.map +1 -0
- package/dist/replay-resume-recovery.d.ts +10 -0
- package/dist/replay-resume-recovery.d.ts.map +1 -0
- package/dist/replay-resume-recovery.js +62 -0
- package/dist/replay-resume-recovery.js.map +1 -0
- package/dist/replay-resume-shared.d.ts +16 -0
- package/dist/replay-resume-shared.d.ts.map +1 -0
- package/dist/replay-resume-shared.js +55 -0
- package/dist/replay-resume-shared.js.map +1 -0
- package/dist/replay-resume-types.d.ts +85 -0
- package/dist/replay-resume-types.d.ts.map +1 -0
- package/dist/replay-resume-types.js +2 -0
- package/dist/replay-resume-types.js.map +1 -0
- package/dist/replay-resume.d.ts +7 -119
- package/dist/replay-resume.d.ts.map +1 -1
- package/dist/replay-resume.js +5 -715
- package/dist/replay-resume.js.map +1 -1
- package/dist/resource-projection-util.d.ts +1 -2
- package/dist/resource-projection-util.d.ts.map +1 -1
- package/dist/resource-projection-util.js +2 -11
- package/dist/resource-projection-util.js.map +1 -1
- package/dist/resource-projection.d.ts.map +1 -1
- package/dist/resource-projection.js +67 -22
- package/dist/resource-projection.js.map +1 -1
- package/dist/run-execution-host.d.ts +98 -0
- package/dist/run-execution-host.d.ts.map +1 -0
- package/dist/run-execution-host.js +2 -0
- package/dist/run-execution-host.js.map +1 -0
- package/dist/run-execution.d.ts +6 -0
- package/dist/run-execution.d.ts.map +1 -0
- package/dist/run-execution.js +313 -0
- package/dist/run-execution.js.map +1 -0
- package/dist/run-initialization.d.ts +19 -0
- package/dist/run-initialization.d.ts.map +1 -0
- package/dist/run-initialization.js +171 -0
- package/dist/run-initialization.js.map +1 -0
- package/dist/run-recovery.d.ts +1 -1
- package/dist/run-recovery.js.map +1 -1
- package/dist/runtime-connection-definitions.d.ts +35 -0
- package/dist/runtime-connection-definitions.d.ts.map +1 -0
- package/dist/runtime-connection-definitions.js +97 -0
- package/dist/runtime-connection-definitions.js.map +1 -0
- package/dist/runtime-engine-background.d.ts +64 -0
- package/dist/runtime-engine-background.d.ts.map +1 -0
- package/dist/runtime-engine-background.js +136 -0
- package/dist/runtime-engine-background.js.map +1 -0
- package/dist/runtime-engine-base.d.ts +60 -0
- package/dist/runtime-engine-base.d.ts.map +1 -0
- package/dist/runtime-engine-base.js +192 -0
- package/dist/runtime-engine-base.js.map +1 -0
- package/dist/runtime-engine-capabilities.d.ts +81 -0
- package/dist/runtime-engine-capabilities.d.ts.map +1 -0
- package/dist/runtime-engine-capabilities.js +198 -0
- package/dist/runtime-engine-capabilities.js.map +1 -0
- package/dist/runtime-engine-config.d.ts +77 -0
- package/dist/runtime-engine-config.d.ts.map +1 -0
- package/dist/runtime-engine-config.js +187 -0
- package/dist/runtime-engine-config.js.map +1 -0
- package/dist/runtime-engine-foundation.d.ts +11 -0
- package/dist/runtime-engine-foundation.d.ts.map +1 -0
- package/dist/runtime-engine-foundation.js +121 -0
- package/dist/runtime-engine-foundation.js.map +1 -0
- package/dist/runtime-engine-hooks.d.ts +33 -0
- package/dist/runtime-engine-hooks.d.ts.map +1 -0
- package/dist/runtime-engine-hooks.js +149 -0
- package/dist/runtime-engine-hooks.js.map +1 -0
- package/dist/runtime-engine-integrations.d.ts +16 -0
- package/dist/runtime-engine-integrations.d.ts.map +1 -0
- package/dist/runtime-engine-integrations.js +177 -0
- package/dist/runtime-engine-integrations.js.map +1 -0
- package/dist/runtime-engine-operations.d.ts +87 -0
- package/dist/runtime-engine-operations.d.ts.map +1 -0
- package/dist/runtime-engine-operations.js +204 -0
- package/dist/runtime-engine-operations.js.map +1 -0
- package/dist/runtime-engine-resources.d.ts +18 -0
- package/dist/runtime-engine-resources.d.ts.map +1 -0
- package/dist/runtime-engine-resources.js +49 -0
- package/dist/runtime-engine-resources.js.map +1 -0
- package/dist/runtime-engine-run.d.ts +70 -0
- package/dist/runtime-engine-run.d.ts.map +1 -0
- package/dist/runtime-engine-run.js +202 -0
- package/dist/runtime-engine-run.js.map +1 -0
- package/dist/runtime-engine-scheduling.d.ts +22 -0
- package/dist/runtime-engine-scheduling.d.ts.map +1 -0
- package/dist/runtime-engine-scheduling.js +45 -0
- package/dist/runtime-engine-scheduling.js.map +1 -0
- package/dist/runtime-engine-tools.d.ts +8 -0
- package/dist/runtime-engine-tools.d.ts.map +1 -0
- package/dist/runtime-engine-tools.js +80 -0
- package/dist/runtime-engine-tools.js.map +1 -0
- package/dist/runtime-evolution.d.ts +17 -0
- package/dist/runtime-evolution.d.ts.map +1 -0
- package/dist/runtime-evolution.js +51 -0
- package/dist/runtime-evolution.js.map +1 -0
- package/dist/runtime-learning.d.ts +4 -6
- package/dist/runtime-learning.d.ts.map +1 -1
- package/dist/runtime-learning.js +109 -99
- package/dist/runtime-learning.js.map +1 -1
- package/dist/runtime-types.d.ts +21 -7
- package/dist/runtime-types.d.ts.map +1 -1
- package/dist/runtime-util.d.ts +4 -3
- package/dist/runtime-util.d.ts.map +1 -1
- package/dist/runtime-util.js +0 -7
- package/dist/runtime-util.js.map +1 -1
- package/dist/sandbox-fs.d.ts +2 -7
- package/dist/sandbox-fs.d.ts.map +1 -1
- package/dist/sandbox-fs.js +6 -37
- package/dist/sandbox-fs.js.map +1 -1
- package/dist/sandbox-handle.d.ts +1 -3
- package/dist/sandbox-handle.d.ts.map +1 -1
- package/dist/sandbox-handle.js +2 -5
- package/dist/sandbox-handle.js.map +1 -1
- package/dist/sandbox-state-sync.d.ts +2 -0
- package/dist/sandbox-state-sync.d.ts.map +1 -1
- package/dist/sandbox-state-sync.js +26 -2
- package/dist/sandbox-state-sync.js.map +1 -1
- package/dist/sandbox-tool-bridge.js +2 -3
- package/dist/sandbox-tool-bridge.js.map +1 -1
- package/dist/schedule-execution.d.ts +4 -4
- package/dist/schedule-execution.d.ts.map +1 -1
- package/dist/schedule-execution.js +45 -440
- package/dist/schedule-execution.js.map +1 -1
- package/dist/schedule-trigger-context.d.ts +18 -0
- package/dist/schedule-trigger-context.d.ts.map +1 -0
- package/dist/schedule-trigger-context.js +276 -0
- package/dist/schedule-trigger-context.js.map +1 -0
- package/dist/scheduler.d.ts +1 -14
- package/dist/scheduler.d.ts.map +1 -1
- package/dist/scheduler.js +1 -37
- package/dist/scheduler.js.map +1 -1
- package/dist/security.d.ts +0 -4
- package/dist/security.d.ts.map +1 -1
- package/dist/security.js +0 -22
- package/dist/security.js.map +1 -1
- package/dist/self-improvement.d.ts +5 -21
- package/dist/self-improvement.d.ts.map +1 -1
- package/dist/self-improvement.js +10 -40
- package/dist/self-improvement.js.map +1 -1
- package/dist/source-loader.d.ts +0 -3
- package/dist/source-loader.d.ts.map +1 -1
- package/dist/source-loader.js +1 -10
- package/dist/source-loader.js.map +1 -1
- package/dist/state/conversation-state.d.ts +117 -0
- package/dist/state/conversation-state.d.ts.map +1 -0
- package/dist/state/conversation-state.js +2 -0
- package/dist/state/conversation-state.js.map +1 -0
- package/dist/state/run-state.d.ts +129 -0
- package/dist/state/run-state.d.ts.map +1 -0
- package/dist/state/run-state.js +3 -0
- package/dist/state/run-state.js.map +1 -0
- package/dist/state/sandbox-memory-state.d.ts +159 -0
- package/dist/state/sandbox-memory-state.d.ts.map +1 -0
- package/dist/state/sandbox-memory-state.js +2 -0
- package/dist/state/sandbox-memory-state.js.map +1 -0
- package/dist/state/store-contracts.d.ts +329 -0
- package/dist/state/store-contracts.d.ts.map +1 -0
- package/dist/state/store-contracts.js +26 -0
- package/dist/state/store-contracts.js.map +1 -0
- package/dist/state/usage-state.d.ts +111 -0
- package/dist/state/usage-state.d.ts.map +1 -0
- package/dist/state/usage-state.js +2 -0
- package/dist/state/usage-state.js.map +1 -0
- package/dist/state/workspace-state.d.ts +126 -0
- package/dist/state/workspace-state.d.ts.map +1 -0
- package/dist/state/workspace-state.js +16 -0
- package/dist/state/workspace-state.js.map +1 -0
- package/dist/state-stores.d.ts +3 -15
- package/dist/state-stores.d.ts.map +1 -1
- package/dist/state-stores.js +36 -82
- package/dist/state-stores.js.map +1 -1
- package/dist/state.d.ts +7 -1075
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +7 -88
- package/dist/state.js.map +1 -1
- package/dist/storage.d.ts +4 -64
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +5 -408
- package/dist/storage.js.map +1 -1
- package/dist/subagent-execution.d.ts +1 -2
- package/dist/subagent-execution.d.ts.map +1 -1
- package/dist/subagent-execution.js +2 -26
- package/dist/subagent-execution.js.map +1 -1
- package/dist/subagent-handoff.d.ts +13 -0
- package/dist/subagent-handoff.d.ts.map +1 -1
- package/dist/subagent-handoff.js +74 -9
- package/dist/subagent-handoff.js.map +1 -1
- package/dist/tool-apis.d.ts +2 -2
- package/dist/tool-apis.d.ts.map +1 -1
- package/dist/tool-apis.js +26 -14
- package/dist/tool-apis.js.map +1 -1
- package/dist/tool-execution-host.d.ts +121 -0
- package/dist/tool-execution-host.d.ts.map +1 -0
- package/dist/tool-execution-host.js +2 -0
- package/dist/tool-execution-host.js.map +1 -0
- package/dist/tool-execution.d.ts +5 -141
- package/dist/tool-execution.d.ts.map +1 -1
- package/dist/tool-execution.js +6 -395
- package/dist/tool-execution.js.map +1 -1
- package/dist/usage-reconciliation-support.d.ts +20 -0
- package/dist/usage-reconciliation-support.d.ts.map +1 -0
- package/dist/usage-reconciliation-support.js +95 -0
- package/dist/usage-reconciliation-support.js.map +1 -0
- package/dist/usage-reconciliation.d.ts +14 -35
- package/dist/usage-reconciliation.d.ts.map +1 -1
- package/dist/usage-reconciliation.js +17 -394
- package/dist/usage-reconciliation.js.map +1 -1
- package/dist/workspace-paths.d.ts +3 -0
- package/dist/workspace-paths.d.ts.map +1 -0
- package/dist/workspace-paths.js +13 -0
- package/dist/workspace-paths.js.map +1 -0
- package/dist/workspace-service.d.ts +0 -1
- package/dist/workspace-service.d.ts.map +1 -1
- package/dist/workspace-service.js +1 -4
- package/dist/workspace-service.js.map +1 -1
- package/package.json +3 -3
- package/dist/run-timeline.d.ts +0 -11
- package/dist/run-timeline.d.ts.map +0 -1
- package/dist/run-timeline.js +0 -2
- package/dist/run-timeline.js.map +0 -1
- package/dist/trusted-attachments.d.ts +0 -20
- package/dist/trusted-attachments.d.ts.map +0 -1
- package/dist/trusted-attachments.js +0 -276
- package/dist/trusted-attachments.js.map +0 -1
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { join, resolve } from "node:path";
|
|
2
|
+
import { AgentSourceModuleLoader } from "./source-loader.js";
|
|
3
|
+
import { SandboxAuthoredToolExecutor } from "./sandbox-authored-tool-executor.js";
|
|
4
|
+
import { ARTIFACT_DIR_NAME } from "@assemblyline-agents/core";
|
|
5
|
+
import { resolveBooleanEnv, resolveNonNegativeIntegerEnv, resolvePositiveIntegerEnv } from "./env-config.js";
|
|
6
|
+
import { RunProgressSupervisor } from "./run-heartbeat.js";
|
|
7
|
+
import { RuntimeLearningManager } from "./runtime-learning.js";
|
|
8
|
+
import { RuntimeConnectionDefinitionManager } from "./runtime-connection-definitions.js";
|
|
9
|
+
import { createSkillBundleIndex, createSkillResourceReader } from "./skill-bundles.js";
|
|
10
|
+
import { RuntimeWorkspaceManager } from "./workspace-runtime.js";
|
|
11
|
+
import { RuntimeAutomationManager } from "./dynamic-schedule-runtime.js";
|
|
12
|
+
import { normalizeScheduleTriggerDefinitionImpl } from "./schedule-execution.js";
|
|
13
|
+
import { executeSubagentRunImpl, finalizeSubagentHandoffImpl } from "./subagent-execution.js";
|
|
14
|
+
import { DEFAULT_MAX_MODEL_ITERATIONS, DEFAULT_OUTPUT_VALIDATION_MAX_RETRIES } from "./harness-loop.js";
|
|
15
|
+
import { ConversationTurnDispatcher } from "./conversation-turn-dispatch.js";
|
|
16
|
+
import { BackgroundSubagentCoordinator } from "./background-subagents.js";
|
|
17
|
+
import { BoundedSemaphore } from "./concurrency.js";
|
|
18
|
+
import { DEFAULT_MODEL_OUTPUT_MAX_CHARS } from "@assemblyline-agents/core";
|
|
19
|
+
import { resolveResourceProjectionPolicy } from "./resource-projection-util.js";
|
|
20
|
+
import { resolveSandboxSnapshotPolicy } from "./sandbox-snapshot-policy.js";
|
|
21
|
+
import { RuntimeEngineConfig } from "./runtime-engine-config.js";
|
|
22
|
+
import { RuntimeEvolutionManager } from "./runtime-evolution.js";
|
|
23
|
+
export class RuntimeEngineBase extends RuntimeEngineConfig {
|
|
24
|
+
runtimeEvolution;
|
|
25
|
+
runtimeLearning;
|
|
26
|
+
runtimeAutomations;
|
|
27
|
+
runtimeConnectionDefinitions;
|
|
28
|
+
schedulerEnabled;
|
|
29
|
+
schedulerTickMs;
|
|
30
|
+
/** @internal */
|
|
31
|
+
scheduleMaxConsecutiveFailures;
|
|
32
|
+
now;
|
|
33
|
+
sandboxSnapshotPolicy;
|
|
34
|
+
sandboxSyncInline;
|
|
35
|
+
sandboxSyncLeaseMs;
|
|
36
|
+
sandboxSyncBatchSize;
|
|
37
|
+
sandboxSyncMaxAttempts;
|
|
38
|
+
deliveryQueueLeaseMs;
|
|
39
|
+
/** @internal */
|
|
40
|
+
toolOutputMaxChars;
|
|
41
|
+
/** @internal */
|
|
42
|
+
toolTimeoutMs;
|
|
43
|
+
deliveryQueueBatchSize;
|
|
44
|
+
deliveryQueueMaxAttempts;
|
|
45
|
+
deliveryQueueIntervalMs;
|
|
46
|
+
runHeartbeatMs;
|
|
47
|
+
runRecoveryIntervalMs;
|
|
48
|
+
maxModelIterations;
|
|
49
|
+
outputValidationMaxRetries;
|
|
50
|
+
/** @internal */
|
|
51
|
+
runSemaphore;
|
|
52
|
+
conversationTurnDispatcher;
|
|
53
|
+
backgroundSubagents;
|
|
54
|
+
resourceProjectionPolicy;
|
|
55
|
+
/** @internal */
|
|
56
|
+
sourceLoader;
|
|
57
|
+
sandboxAuthoredToolExecutor;
|
|
58
|
+
skillBundleIndex;
|
|
59
|
+
skillResourceReader;
|
|
60
|
+
/** @internal */
|
|
61
|
+
contextPolicyPromise;
|
|
62
|
+
/** Fast local view of durable control intents, refreshed by run heartbeats. */
|
|
63
|
+
runControlIntents = new Map();
|
|
64
|
+
/** Runs currently owned by this process, used to route immediate control signals without leaking orphan ids. */
|
|
65
|
+
activeRunExecutions = new Set();
|
|
66
|
+
runProgress;
|
|
67
|
+
runStallTimeoutMs;
|
|
68
|
+
constructor(options) {
|
|
69
|
+
super(options);
|
|
70
|
+
this.runtimeEvolution = new RuntimeEvolutionManager({
|
|
71
|
+
...(this.evolutionTracker ? { tracker: this.evolutionTracker } : {}),
|
|
72
|
+
state: this.state,
|
|
73
|
+
logger: this.logger
|
|
74
|
+
});
|
|
75
|
+
this.runtimeConnectionDefinitions = new RuntimeConnectionDefinitionManager({
|
|
76
|
+
manifestConnections: this.manifest.connections,
|
|
77
|
+
config: this.connectionsConfig,
|
|
78
|
+
store: this.connectionDefinitionStore,
|
|
79
|
+
grantStore: this.connectionGrantStore,
|
|
80
|
+
defaultScope: () => this.connectionScope(),
|
|
81
|
+
loadCompiledDefinition: async (connection) => {
|
|
82
|
+
const module = await this.sourceLoader.load(connection.source);
|
|
83
|
+
return module.default;
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
this.runtimeAutomations = new RuntimeAutomationManager(this.scheduleStore, this.schedulesConfig, (value) => normalizeScheduleTriggerDefinitionImpl(this.scheduleExecutionHost(), value));
|
|
87
|
+
this.schedulerEnabled = options.schedulerEnabled;
|
|
88
|
+
this.schedulerTickMs = options.schedulerTickMs ?? 60_000;
|
|
89
|
+
this.scheduleMaxConsecutiveFailures = resolvePositiveIntegerEnv(this.env.ASSEMBLY_LINE_SCHEDULE_MAX_FAILURES, 5);
|
|
90
|
+
this.now = options.now ?? (() => new Date());
|
|
91
|
+
this.workspaceRuntime = new RuntimeWorkspaceManager({
|
|
92
|
+
state: this.state,
|
|
93
|
+
blob: this.blob,
|
|
94
|
+
agentScope: this.durableAgentScope(),
|
|
95
|
+
now: this.now,
|
|
96
|
+
env: this.env,
|
|
97
|
+
...(this.memoryEmbeddingProvider ? { embeddingProvider: this.memoryEmbeddingProvider } : {}),
|
|
98
|
+
sandboxSessionKey: (run) => this.sandboxSessionKey(run),
|
|
99
|
+
});
|
|
100
|
+
this.runtimeLearning = new RuntimeLearningManager({
|
|
101
|
+
state: this.state,
|
|
102
|
+
manifest: this.manifest,
|
|
103
|
+
env: this.env,
|
|
104
|
+
logger: this.logger,
|
|
105
|
+
learningStore: this.learningStore,
|
|
106
|
+
skillStore: this.skillStore,
|
|
107
|
+
memoryStore: this.memoryStore,
|
|
108
|
+
skillsConfigForSurface: (surfacePath) => this.skillsConfigForSurface(surfacePath),
|
|
109
|
+
skillScopeForSurface: (surfacePath) => this.skillScopeForSurface(surfacePath),
|
|
110
|
+
anySkillsEnabled: () => this.anySkillsEnabled(),
|
|
111
|
+
memoryScopeForRun: (run) => this.memoryScopeForRun(run),
|
|
112
|
+
resolveAgentHarness: (modelSpec) => this.resolveAgentHarness(modelSpec),
|
|
113
|
+
recordEvolution: (input) => this.runtimeEvolution.record(input),
|
|
114
|
+
now: () => this.now(),
|
|
115
|
+
});
|
|
116
|
+
this.sandboxSnapshotPolicy = resolveSandboxSnapshotPolicy(this.manifest, this.env, options.sandboxSnapshotPolicy);
|
|
117
|
+
this.sandboxSyncInline = options.sandboxSyncInline ?? resolveBooleanEnv(this.env.ASSEMBLY_LINE_SANDBOX_SYNC_INLINE, false);
|
|
118
|
+
this.sandboxSyncLeaseMs = options.sandboxSyncLeaseMs ?? resolvePositiveIntegerEnv(this.env.ASSEMBLY_LINE_SANDBOX_SYNC_LEASE_MS, 5 * 60_000);
|
|
119
|
+
this.sandboxSyncBatchSize = options.sandboxSyncBatchSize ?? resolvePositiveIntegerEnv(this.env.ASSEMBLY_LINE_SANDBOX_SYNC_BATCH_SIZE, 10);
|
|
120
|
+
this.sandboxSyncMaxAttempts = options.sandboxSyncMaxAttempts ?? resolvePositiveIntegerEnv(this.env.ASSEMBLY_LINE_SANDBOX_SYNC_MAX_ATTEMPTS, 5);
|
|
121
|
+
this.deliveryQueueLeaseMs = options.deliveryQueueLeaseMs ?? resolvePositiveIntegerEnv(this.env.ASSEMBLY_LINE_DELIVERY_QUEUE_LEASE_MS, 60_000);
|
|
122
|
+
this.toolOutputMaxChars = resolvePositiveIntegerEnv(this.env.ASSEMBLY_LINE_TOOL_OUTPUT_MAX_CHARS, DEFAULT_MODEL_OUTPUT_MAX_CHARS);
|
|
123
|
+
this.toolTimeoutMs = resolveNonNegativeIntegerEnv(this.env.ASSEMBLY_LINE_TOOL_TIMEOUT_MS, 600_000);
|
|
124
|
+
this.deliveryQueueBatchSize = options.deliveryQueueBatchSize ?? resolvePositiveIntegerEnv(this.env.ASSEMBLY_LINE_DELIVERY_QUEUE_BATCH_SIZE, 10);
|
|
125
|
+
this.deliveryQueueMaxAttempts = options.deliveryQueueMaxAttempts ?? resolvePositiveIntegerEnv(this.env.ASSEMBLY_LINE_DELIVERY_QUEUE_MAX_ATTEMPTS, 5);
|
|
126
|
+
this.deliveryQueueIntervalMs = options.deliveryQueueIntervalMs ?? resolvePositiveIntegerEnv(this.env.ASSEMBLY_LINE_DELIVERY_QUEUE_INTERVAL_MS, 15_000);
|
|
127
|
+
this.runHeartbeatMs = options.runHeartbeatMs ?? resolvePositiveIntegerEnv(this.env.ASSEMBLY_LINE_RUN_HEARTBEAT_MS, 30_000);
|
|
128
|
+
this.runStallTimeoutMs = options.runStallTimeoutMs ?? resolveNonNegativeIntegerEnv(this.env.ASSEMBLY_LINE_RUN_STALL_TIMEOUT_MS, 3_600_000);
|
|
129
|
+
this.runProgress = new RunProgressSupervisor({
|
|
130
|
+
state: this.state,
|
|
131
|
+
logger: this.logger,
|
|
132
|
+
runHeartbeatMs: this.runHeartbeatMs,
|
|
133
|
+
runStallTimeoutMs: this.runStallTimeoutMs,
|
|
134
|
+
runControlIntents: this.runControlIntents,
|
|
135
|
+
activeRuns: this.activeRunExecutions,
|
|
136
|
+
debugSwallow: (message, fields) => this.debugSwallow(message, fields),
|
|
137
|
+
});
|
|
138
|
+
this.runRecoveryIntervalMs = options.runRecoveryIntervalMs ?? resolvePositiveIntegerEnv(this.env.ASSEMBLY_LINE_RUN_RECOVERY_INTERVAL_MS, 60_000);
|
|
139
|
+
this.maxModelIterations = resolvePositiveIntegerEnv(this.env.ASSEMBLY_LINE_MAX_MODEL_ITERATIONS, DEFAULT_MAX_MODEL_ITERATIONS);
|
|
140
|
+
this.outputValidationMaxRetries = resolveNonNegativeIntegerEnv(this.env.ASSEMBLY_LINE_OUTPUT_VALIDATION_MAX_RETRIES, DEFAULT_OUTPUT_VALIDATION_MAX_RETRIES);
|
|
141
|
+
this.runSemaphore = new BoundedSemaphore({
|
|
142
|
+
maxConcurrent: options.maxConcurrentRuns ?? resolvePositiveIntegerEnv(this.env.ASSEMBLY_LINE_MAX_CONCURRENT_RUNS, Infinity),
|
|
143
|
+
maxQueued: options.maxQueuedRuns ?? resolvePositiveIntegerEnv(this.env.ASSEMBLY_LINE_MAX_QUEUED_RUNS, 0),
|
|
144
|
+
});
|
|
145
|
+
this.conversationTurnDispatcher = new ConversationTurnDispatcher({
|
|
146
|
+
state: this.state,
|
|
147
|
+
logger: this.logger,
|
|
148
|
+
agentScope: this.durableAgentScope(),
|
|
149
|
+
now: () => this.now(),
|
|
150
|
+
agentEnabled: () => this.agentEnabled(),
|
|
151
|
+
admitRunOrReject: () => this.admitRunOrReject(),
|
|
152
|
+
runTurn: (turn, admission, onRunCreated) => this.run({
|
|
153
|
+
message: turn.message,
|
|
154
|
+
channel: turn.channel,
|
|
155
|
+
turn,
|
|
156
|
+
admission,
|
|
157
|
+
startChannelTurnEarly: true,
|
|
158
|
+
onRunCreated,
|
|
159
|
+
}),
|
|
160
|
+
});
|
|
161
|
+
this.resourceProjectionPolicy = resolveResourceProjectionPolicy(options.resourceProjectionPolicy, this.env);
|
|
162
|
+
this.sourceLoader = new AgentSourceModuleLoader({
|
|
163
|
+
manifest: this.manifest,
|
|
164
|
+
sourceBundle: this.sourceBundle,
|
|
165
|
+
...(options.artifactRoot
|
|
166
|
+
? {
|
|
167
|
+
cacheRoot: join(resolve(options.artifactRoot), ARTIFACT_DIR_NAME, "module-cache"),
|
|
168
|
+
packageRoot: resolve(options.artifactRoot),
|
|
169
|
+
}
|
|
170
|
+
: {}),
|
|
171
|
+
});
|
|
172
|
+
this.sandboxAuthoredToolExecutor = new SandboxAuthoredToolExecutor(this.sourceLoader);
|
|
173
|
+
this.skillBundleIndex = createSkillBundleIndex(this.manifest);
|
|
174
|
+
this.skillResourceReader = createSkillResourceReader({
|
|
175
|
+
manifest: this.manifest,
|
|
176
|
+
...(options.resourcesRoot ? { resourcesRoot: options.resourcesRoot } : {}),
|
|
177
|
+
manifestRoot: this.manifest.root,
|
|
178
|
+
sourceBundle: this.sourceBundle,
|
|
179
|
+
});
|
|
180
|
+
this.backgroundSubagents = new BackgroundSubagentCoordinator({
|
|
181
|
+
state: this.state,
|
|
182
|
+
logger: this.logger,
|
|
183
|
+
withRunAdmission: (work) => this.withRunAdmission(work),
|
|
184
|
+
execute: (childRunId) => executeSubagentRunImpl(this.subagentExecutionHost(), childRunId),
|
|
185
|
+
finalize: (timeline) => finalizeSubagentHandoffImpl(this.subagentExecutionHost(), timeline),
|
|
186
|
+
replay: (runId) => this.replay(runId),
|
|
187
|
+
cancel: (runId) => this.cancelRun(runId),
|
|
188
|
+
enqueueConversationTurn: (input) => this.conversationTurnDispatcher.enqueue(input),
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=runtime-engine-base.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-engine-base.js","sourceRoot":"","sources":["../src/runtime-engine-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,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AAE,CAAC,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,KAAK,CAAC;SACnF,CAAC,CAAC;IACL,CAAC;CA4CF"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { type JsonObject, type SandboxSession } from "@assemblyline-agents/core";
|
|
2
|
+
import { type ResolvedSkillsConfig, type StoredConnectionProtocol } from "./self-improvement.js";
|
|
3
|
+
import { type RuntimeSkillWriteInput } from "./runtime-learning.js";
|
|
4
|
+
import type { RunRecord } from "./state.js";
|
|
5
|
+
import { type SandboxStateSyncHost } from "./sandbox-state-sync.js";
|
|
6
|
+
import type { DynamicConnectionGrantInput } from "./runtime-types.js";
|
|
7
|
+
import { RuntimeEngineFoundation } from "./runtime-engine-foundation.js";
|
|
8
|
+
export declare abstract class RuntimeEngineCapabilities extends RuntimeEngineFoundation {
|
|
9
|
+
protected skillsConfigForSurface(surfacePath: string): ResolvedSkillsConfig;
|
|
10
|
+
protected anySkillsEnabled(): boolean;
|
|
11
|
+
protected connectionScope(): string;
|
|
12
|
+
/** Seed the durable skill store from compiled manifest skills (idempotent). */
|
|
13
|
+
ensureSkillsSeeded(surfacePath?: string): Promise<void>;
|
|
14
|
+
/** Live skill catalog (durable store, post-seed) for context assembly and inspection. */
|
|
15
|
+
listSkills(surfacePath?: string): Promise<{
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
origin: string;
|
|
19
|
+
pending: boolean;
|
|
20
|
+
}[]>;
|
|
21
|
+
/** Persist an agent/user authored skill, honoring the write-approval gate. */
|
|
22
|
+
saveSkill(input: RuntimeSkillWriteInput, surfacePath?: string): Promise<{
|
|
23
|
+
name: string;
|
|
24
|
+
pending: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
deleteSkill(name: string, surfacePath?: string): Promise<void>;
|
|
27
|
+
listSkillRevisions(name: string, surfacePath?: string): Promise<import("./learning-store.js").SkillRevisionRecord[]>;
|
|
28
|
+
restoreSkillRevision(name: string, revision: number, surfacePath?: string): Promise<{
|
|
29
|
+
name: string;
|
|
30
|
+
pending: boolean;
|
|
31
|
+
}>;
|
|
32
|
+
listPendingSkillChanges(surfacePath?: string): Promise<import("./learning-store.js").PendingSkillChangeRecord[]>;
|
|
33
|
+
approveSkillChange(id: string, surfacePath?: string): Promise<{
|
|
34
|
+
name: string;
|
|
35
|
+
action: string;
|
|
36
|
+
}>;
|
|
37
|
+
rejectSkillChange(id: string, surfacePath?: string): Promise<void>;
|
|
38
|
+
recordRunFeedback(runId: string, feedback: {
|
|
39
|
+
rating: "positive" | "negative";
|
|
40
|
+
comment?: string;
|
|
41
|
+
}): Promise<{
|
|
42
|
+
jobId: string;
|
|
43
|
+
status: string;
|
|
44
|
+
}>;
|
|
45
|
+
listBackgroundReviews(surfacePath?: string): Promise<import("./learning-store.js").BackgroundReviewJobRecord[]>;
|
|
46
|
+
runDueBackgroundReviews(options?: {
|
|
47
|
+
now?: Date;
|
|
48
|
+
limit?: number;
|
|
49
|
+
leaseForMs?: number;
|
|
50
|
+
}): Promise<import("./background-review-types.js").BackgroundReviewExecutionResult[]>;
|
|
51
|
+
startBackgroundReviewWorker(options?: {
|
|
52
|
+
intervalMs?: number;
|
|
53
|
+
limit?: number;
|
|
54
|
+
leaseForMs?: number;
|
|
55
|
+
}): {
|
|
56
|
+
stop(): void;
|
|
57
|
+
} | undefined;
|
|
58
|
+
/** Persist a runtime-provided connection definition (gated). Credentials route to the grant store. */
|
|
59
|
+
saveConnectionDefinition(input: {
|
|
60
|
+
name: string;
|
|
61
|
+
protocol: StoredConnectionProtocol;
|
|
62
|
+
description: string;
|
|
63
|
+
definition: JsonObject;
|
|
64
|
+
grant?: DynamicConnectionGrantInput;
|
|
65
|
+
scope?: string;
|
|
66
|
+
}): Promise<{
|
|
67
|
+
name: string;
|
|
68
|
+
}>;
|
|
69
|
+
listConnectionDefinitions(scope?: string): Promise<JsonObject[]>;
|
|
70
|
+
deleteConnectionDefinition(name: string, scope?: string): Promise<void>;
|
|
71
|
+
protected sandboxStateSyncHost(): SandboxStateSyncHost;
|
|
72
|
+
protected acquireSandboxForRun(run: RunRecord): Promise<SandboxSession>;
|
|
73
|
+
/** True when a brand-new run would be admitted (or queued) instead of rejected. */
|
|
74
|
+
hasRunCapacity(): boolean;
|
|
75
|
+
/** Resolves once no runs (new or resumed) are executing or queued. Used by graceful shutdown. */
|
|
76
|
+
onIdle(): Promise<void>;
|
|
77
|
+
protected abstract projectLoadedSkillsIntoSandbox(run: RunRecord, sandbox: SandboxSession): Promise<void>;
|
|
78
|
+
protected abstract wrapSandbox(runId: string, session: SandboxSession): SandboxSession;
|
|
79
|
+
protected abstract disposeSandboxSession(runId: string, sandboxSession: SandboxSession): Promise<void>;
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=runtime-engine-capabilities.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-engine-capabilities.d.ts","sourceRoot":"","sources":["../src/runtime-engine-capabilities.ts"],"names":[],"mappings":"AAEA,OAAO,EAA2B,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG1G,OAAO,EAAuB,KAAK,oBAAoB,EAAE,KAAK,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACtH,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAgD,KAAK,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAGlH,OAAO,KAAK,EAAiB,2BAA2B,EAA0C,MAAM,oBAAoB,CAAC;AAC7H,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAGzE,8BAAsB,yBAA0B,SAAQ,uBAAuB;IAY7E,SAAS,CAAC,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,oBAAoB;IAiB3E,SAAS,CAAC,gBAAgB,IAAI,OAAO;IAMrC,SAAS,CA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C,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,UAAU,CAAC;QACvB,KAAK,CAAC,EAAE,2BAA2B,CAAC;QACpC,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAIvB,yBAAyB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAIhE,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAmB7E,SAAS,CAAC,oBAAoB,IAAI,oBAAoB;cAuCtC,oBAAoB,CAAC,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,cAAc,CAAC;IAwB7E,mFAAmF;IACnF,cAAc,IAAI,OAAO;IAIzB,iGAAiG;IACjG,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IA0BvB,SAAS,CAAC,QAAQ,CAAC,8BAA8B,CAAC,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAUzG,SAAS,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,cAAc;IAEtF,SAAS,CAAC,QAAQ,CAAC,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;CACvG"}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { audienceFromRun, audienceUserKey } from "./audience.js";
|
|
2
|
+
import { durableAgentSurfaceScope, flattenSubagents, surfaceForPath, surfaceForRun } from "./agent-surface.js";
|
|
3
|
+
import { sandboxSessionKeyForRun } from "./sandbox-session-key.js";
|
|
4
|
+
import { resolveSkillsConfig } from "./self-improvement.js";
|
|
5
|
+
import { createSandboxHandleImpl } from "./sandbox-handle.js";
|
|
6
|
+
import { RunCapacityError } from "./concurrency.js";
|
|
7
|
+
import { syncMemoryFromSandbox, syncSkillsFromSandbox } from "./sandbox-state-sync.js";
|
|
8
|
+
import { acquireSandboxForRun as acquireSandboxSessionForRun } from "./sandbox-session-lifecycle.js";
|
|
9
|
+
import { durableAgentScopeForManifest } from "./runtime-util.js";
|
|
10
|
+
import { RuntimeEngineFoundation } from "./runtime-engine-foundation.js";
|
|
11
|
+
export class RuntimeEngineCapabilities extends RuntimeEngineFoundation {
|
|
12
|
+
/** @internal */
|
|
13
|
+
skillScopeForSurface(surfacePath) {
|
|
14
|
+
surfaceForPath(this.manifest, surfacePath);
|
|
15
|
+
return durableAgentSurfaceScope(this.durableAgentScope(), surfacePath);
|
|
16
|
+
}
|
|
17
|
+
/** @internal */
|
|
18
|
+
skillScopeForRun(run) {
|
|
19
|
+
return this.skillScopeForSurface(surfaceForRun(this.manifest, run).path);
|
|
20
|
+
}
|
|
21
|
+
skillsConfigForSurface(surfacePath) {
|
|
22
|
+
if (surfacePath === "root")
|
|
23
|
+
return this.skillsConfig;
|
|
24
|
+
const surface = surfaceForPath(this.manifest, surfacePath);
|
|
25
|
+
return resolveSkillsConfig({
|
|
26
|
+
...(this.manifest.agent.selfImprovement ?? {}),
|
|
27
|
+
...(surface.selfImprovement ?? {}),
|
|
28
|
+
}, this.env);
|
|
29
|
+
}
|
|
30
|
+
/** @internal */
|
|
31
|
+
skillsConfigForRun(run) {
|
|
32
|
+
return this.skillsConfigForSurface(surfaceForRun(this.manifest, run).path);
|
|
33
|
+
}
|
|
34
|
+
anySkillsEnabled() {
|
|
35
|
+
return ["root", ...flattenSubagents(this.manifest.subagents).map((subagent) => subagent.path)].some((surfacePath) => this.skillsConfigForSurface(surfacePath).enabled);
|
|
36
|
+
}
|
|
37
|
+
connectionScope() {
|
|
38
|
+
return this.durableAgentScope();
|
|
39
|
+
}
|
|
40
|
+
/** @internal */
|
|
41
|
+
durableAgentScope() {
|
|
42
|
+
return durableAgentScopeForManifest(this.manifest);
|
|
43
|
+
}
|
|
44
|
+
/** @internal */
|
|
45
|
+
usesRevisionScopedDurableState() {
|
|
46
|
+
return this.durableAgentScope() === this.manifest.agentRevision;
|
|
47
|
+
}
|
|
48
|
+
/** @internal */
|
|
49
|
+
scheduleScopeForRun(run) {
|
|
50
|
+
const audience = audienceFromRun(run);
|
|
51
|
+
return audienceUserKey(audience) ?? (!audience.private ? audience.conversationId : undefined) ?? this.durableAgentScope();
|
|
52
|
+
}
|
|
53
|
+
/** Seed the durable skill store from compiled manifest skills (idempotent). */
|
|
54
|
+
async ensureSkillsSeeded(surfacePath = "root") {
|
|
55
|
+
return this.runtimeLearning.ensureSkillsSeeded(surfacePath);
|
|
56
|
+
}
|
|
57
|
+
/** Live skill catalog (durable store, post-seed) for context assembly and inspection. */
|
|
58
|
+
async listSkills(surfacePath = "root") {
|
|
59
|
+
return this.runtimeLearning.listSkills(surfacePath);
|
|
60
|
+
}
|
|
61
|
+
/** Persist an agent/user authored skill, honoring the write-approval gate. */
|
|
62
|
+
async saveSkill(input, surfacePath = "root") {
|
|
63
|
+
return this.runtimeLearning.saveSkill(input, surfacePath);
|
|
64
|
+
}
|
|
65
|
+
async deleteSkill(name, surfacePath = "root") {
|
|
66
|
+
return this.runtimeLearning.deleteSkill(name, surfacePath);
|
|
67
|
+
}
|
|
68
|
+
async listSkillRevisions(name, surfacePath = "root") {
|
|
69
|
+
return this.runtimeLearning.listSkillRevisions(name, surfacePath);
|
|
70
|
+
}
|
|
71
|
+
async restoreSkillRevision(name, revision, surfacePath = "root") {
|
|
72
|
+
return this.runtimeLearning.restoreSkillRevision(name, revision, surfacePath);
|
|
73
|
+
}
|
|
74
|
+
async listPendingSkillChanges(surfacePath = "root") {
|
|
75
|
+
return this.runtimeLearning.listPendingSkillChanges(surfacePath);
|
|
76
|
+
}
|
|
77
|
+
async approveSkillChange(id, surfacePath = "root") {
|
|
78
|
+
return this.runtimeLearning.approveSkillChange(id, surfacePath);
|
|
79
|
+
}
|
|
80
|
+
async rejectSkillChange(id, surfacePath = "root") {
|
|
81
|
+
return this.runtimeLearning.rejectSkillChange(id, surfacePath);
|
|
82
|
+
}
|
|
83
|
+
async recordRunFeedback(runId, feedback) {
|
|
84
|
+
return this.runtimeLearning.recordRunFeedback(runId, feedback);
|
|
85
|
+
}
|
|
86
|
+
async listBackgroundReviews(surfacePath = "root") {
|
|
87
|
+
return this.runtimeLearning.listBackgroundReviews(surfacePath);
|
|
88
|
+
}
|
|
89
|
+
async runDueBackgroundReviews(options = {}) {
|
|
90
|
+
return this.runtimeLearning.runDueBackgroundReviews(options);
|
|
91
|
+
}
|
|
92
|
+
/** @internal */
|
|
93
|
+
recordEvolution(input) {
|
|
94
|
+
return this.runtimeEvolution.record(input);
|
|
95
|
+
}
|
|
96
|
+
startBackgroundReviewWorker(options = {}) {
|
|
97
|
+
return this.runtimeLearning.startBackgroundReviewWorker(options);
|
|
98
|
+
}
|
|
99
|
+
/** Persist a runtime-provided connection definition (gated). Credentials route to the grant store. */
|
|
100
|
+
async saveConnectionDefinition(input) {
|
|
101
|
+
return this.runtimeConnectionDefinitions.save(input);
|
|
102
|
+
}
|
|
103
|
+
async listConnectionDefinitions(scope) {
|
|
104
|
+
return this.runtimeConnectionDefinitions.list(scope);
|
|
105
|
+
}
|
|
106
|
+
async deleteConnectionDefinition(name, scope) {
|
|
107
|
+
return this.runtimeConnectionDefinitions.delete(name, scope);
|
|
108
|
+
}
|
|
109
|
+
/** @internal */
|
|
110
|
+
async syncMemoryFromSandbox(run, sandboxSession, tombstones) {
|
|
111
|
+
return syncMemoryFromSandbox(this.sandboxStateSyncHost(), run, sandboxSession, tombstones);
|
|
112
|
+
}
|
|
113
|
+
/** Reconcile skill files the agent explicitly edited/deleted under `/skills`. */
|
|
114
|
+
/** @internal */
|
|
115
|
+
async syncSkillsFromSandbox(run, sandboxSession, tombstones) {
|
|
116
|
+
return syncSkillsFromSandbox(this.sandboxStateSyncHost(), run, sandboxSession, tombstones);
|
|
117
|
+
}
|
|
118
|
+
sandboxStateSyncHost() {
|
|
119
|
+
return {
|
|
120
|
+
state: this.state,
|
|
121
|
+
memoryStore: this.memoryStore,
|
|
122
|
+
skillStore: this.skillStore,
|
|
123
|
+
skillBundleIndex: this.skillBundleIndex,
|
|
124
|
+
learningStore: this.learningStore,
|
|
125
|
+
recordEvolution: (input) => this.recordEvolution(input),
|
|
126
|
+
skillsConfigForRun: (run) => this.skillsConfigForRun(run),
|
|
127
|
+
memoryScopeForRun: (candidate) => this.memoryScopeForRun(candidate),
|
|
128
|
+
skillScopeForRun: (run) => this.skillScopeForRun(run),
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/** @internal */
|
|
132
|
+
createSandboxHandle(getRun, setRun, getBundle) {
|
|
133
|
+
return createSandboxHandleImpl({
|
|
134
|
+
state: this.state,
|
|
135
|
+
acquireSandboxForRun: (run) => this.acquireSandboxForRun(run),
|
|
136
|
+
createCheckpoint: (input) => this.createCheckpoint(input),
|
|
137
|
+
hydrateWorkspace: (run, session) => this.workspaceRuntime.service.hydrate(run, session, this.sandboxSessionKey(run)),
|
|
138
|
+
projectLoadedSkills: (run, session) => this.projectLoadedSkillsIntoSandbox(run, session),
|
|
139
|
+
createConnectionRegistryForRun: (run, channel, selectedConnections) => this.createConnectionRegistryForRun(run, channel, undefined, selectedConnections),
|
|
140
|
+
wrapSandbox: (runId, session) => this.wrapSandbox(runId, session),
|
|
141
|
+
disposeSandboxSession: (runId, session) => this.disposeSandboxSession(runId, session),
|
|
142
|
+
}, getRun, setRun, getBundle);
|
|
143
|
+
}
|
|
144
|
+
/** @internal */
|
|
145
|
+
sandboxSessionKey(run) {
|
|
146
|
+
return sandboxSessionKeyForRun(this.durableAgentScope(), run);
|
|
147
|
+
}
|
|
148
|
+
async acquireSandboxForRun(run) {
|
|
149
|
+
return acquireSandboxSessionForRun({
|
|
150
|
+
manifest: this.manifest,
|
|
151
|
+
env: this.env,
|
|
152
|
+
state: this.state,
|
|
153
|
+
sandbox: this.sandbox,
|
|
154
|
+
sessionKey: (candidate) => this.sandboxSessionKey(candidate),
|
|
155
|
+
swallow: (message, fields) => this.debugSwallow(message, fields),
|
|
156
|
+
}, run);
|
|
157
|
+
}
|
|
158
|
+
/** @internal */
|
|
159
|
+
async ensureDynamicConnections() {
|
|
160
|
+
return this.runtimeConnectionDefinitions.ensureLoaded();
|
|
161
|
+
}
|
|
162
|
+
/** @internal */
|
|
163
|
+
mergedConnections() {
|
|
164
|
+
return this.runtimeConnectionDefinitions.mergedConnections();
|
|
165
|
+
}
|
|
166
|
+
/** True when a brand-new run would be admitted (or queued) instead of rejected. */
|
|
167
|
+
hasRunCapacity() {
|
|
168
|
+
return this.runSemaphore.hasCapacity();
|
|
169
|
+
}
|
|
170
|
+
/** Resolves once no runs (new or resumed) are executing or queued. Used by graceful shutdown. */
|
|
171
|
+
onIdle() {
|
|
172
|
+
return this.runSemaphore.onIdle();
|
|
173
|
+
}
|
|
174
|
+
/** Claim a new-run slot, returning the capacity error instead of throwing. */
|
|
175
|
+
/** @internal */
|
|
176
|
+
admitRunOrReject() {
|
|
177
|
+
try {
|
|
178
|
+
return this.runSemaphore.admit();
|
|
179
|
+
}
|
|
180
|
+
catch (error) {
|
|
181
|
+
if (error instanceof RunCapacityError)
|
|
182
|
+
return error;
|
|
183
|
+
throw error;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/** Count a resume/continuation entry point toward `onIdle()` without consuming run capacity. */
|
|
187
|
+
/** @internal */
|
|
188
|
+
async withRunAdmission(work) {
|
|
189
|
+
const admission = this.runSemaphore.enter();
|
|
190
|
+
try {
|
|
191
|
+
return await work();
|
|
192
|
+
}
|
|
193
|
+
finally {
|
|
194
|
+
admission.release();
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
//# sourceMappingURL=runtime-engine-capabilities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-engine-capabilities.js","sourceRoot":"","sources":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MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC;SACjE,EACD,GAAG,CACJ,CAAC;IACJ,CAAC;IAED,gBAAgB;IAChB,KAAK,CAAC,wBAAwB;QAC5B,OAAO,IAAI,CAAC,4BAA4B,CAAC,YAAY,EAAE,CAAC;IAC1D,CAAC;IAED,gBAAgB;IAChB,iBAAiB;QACf,OAAO,IAAI,CAAC,4BAA4B,CAAC,iBAAiB,EAAE,CAAC;IAC/D,CAAC;IAED,mFAAmF;IACnF,cAAc;QACZ,OAAO,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;IACzC,CAAC;IAED,iGAAiG;IACjG,MAAM;QACJ,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;IACpC,CAAC;IAED,8EAA8E;IAC9E,gBAAgB;IAChB,gBAAgB;QACd,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QACnC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,KAAK,YAAY,gBAAgB;gBAAE,OAAO,KAAK,CAAC;YACpD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;IAED,gGAAgG;IAChG,gBAAgB;IAChB,KAAK,CAAC,gBAAgB,CAAI,IAAsB;QAC9C,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QAC5C,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,EAAE,CAAC;QACtB,CAAC;gBAAS,CAAC;YACT,SAAS,CAAC,OAAO,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;CAeF"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { type EvalStubCursors } from "./eval-run-options.js";
|
|
2
|
+
import { AgentHookRunController } from "./agent-hook-evaluation.js";
|
|
3
|
+
import { RuntimeAgentStateHandle } from "./agent-state.js";
|
|
4
|
+
import { type ResolvedCoreToolPolicy } from "./security.js";
|
|
5
|
+
import { type AgentManifest } from "@assemblyline-agents/core";
|
|
6
|
+
import { type RunStreamEvent } from "./run-stream.js";
|
|
7
|
+
import { type ConnectionEventStore } from "./connection-event-store.js";
|
|
8
|
+
import { type ConnectionAuthorizationSessionStore, type ConnectionGrantStore } from "./connections.js";
|
|
9
|
+
import { type ConnectionDefinitionStore, type ResolvedSkillsConfig, type ResolvedSchedulesConfig, type ResolvedConnectionsConfig, type ScheduleStore, type SkillStore } from "./self-improvement.js";
|
|
10
|
+
import { type LearningStore } from "./learning-store.js";
|
|
11
|
+
import { type MediaProcessor } from "./turn-media.js";
|
|
12
|
+
import { type TelemetrySink } from "./telemetry.js";
|
|
13
|
+
import { type RuntimeLogger } from "./logging.js";
|
|
14
|
+
import { WorkspaceRuntimeMethods } from "./workspace-runtime.js";
|
|
15
|
+
import { type ResolvedCheckpointRetentionPolicy } from "./checkpoints.js";
|
|
16
|
+
import type { MemoryEmbeddingProvider, ResolvedStateAdapter } from "./state.js";
|
|
17
|
+
import type { BlobAdapter, MemoryStore, RuntimeOptions, AuthoredToolExecutionPolicy, SandboxAdapter } from "./runtime-types.js";
|
|
18
|
+
import { type EvolutionTracker } from "./evolution-tracker.js";
|
|
19
|
+
import { CredentialBroker } from "./credential-broker.js";
|
|
20
|
+
export declare abstract class RuntimeEngineConfig extends WorkspaceRuntimeMethods {
|
|
21
|
+
readonly manifest: AgentManifest;
|
|
22
|
+
readonly artifactRoot: string | undefined;
|
|
23
|
+
readonly authoredToolExecution: AuthoredToolExecutionPolicy;
|
|
24
|
+
readonly state: ResolvedStateAdapter;
|
|
25
|
+
protected readonly agentHookControllers: Map<string, AgentHookRunController>;
|
|
26
|
+
protected readonly agentStateHandles: Map<string, RuntimeAgentStateHandle>;
|
|
27
|
+
readonly blob: BlobAdapter;
|
|
28
|
+
readonly sandbox: SandboxAdapter;
|
|
29
|
+
readonly scheduleStore: ScheduleStore;
|
|
30
|
+
readonly schedulesConfig: ResolvedSchedulesConfig;
|
|
31
|
+
readonly mediaProcessors: MediaProcessor[];
|
|
32
|
+
readonly deliveryMode: "send" | "record-only";
|
|
33
|
+
protected readonly toolStubs: Record<string, (input: unknown) => unknown | Promise<unknown>>;
|
|
34
|
+
/** Per-run {results:[...]} stub cursors; in-memory by design (see eval-run-options.ts). */
|
|
35
|
+
protected readonly evalStubCursors: EvalStubCursors;
|
|
36
|
+
/** @deprecated See {@link RuntimeOptions.models}. */
|
|
37
|
+
readonly models: unknown;
|
|
38
|
+
readonly modelCredentialStore: import("@assemblyline-agents/core").ModelCredentialStore;
|
|
39
|
+
readonly checkpointRetention: ResolvedCheckpointRetentionPolicy;
|
|
40
|
+
protected readonly checkpointBlobStorageEnabled: boolean;
|
|
41
|
+
readonly devMode: boolean;
|
|
42
|
+
readonly sourceBundle: Record<string, string>;
|
|
43
|
+
readonly connections: Record<string, unknown>;
|
|
44
|
+
readonly env: Record<string, string | undefined>;
|
|
45
|
+
/** Fully resolved non-secret runtime configuration. */
|
|
46
|
+
readonly config: Readonly<Record<string, string>>;
|
|
47
|
+
readonly fetch: typeof fetch;
|
|
48
|
+
readonly attachmentHostResolver: import("./outbound-http-policy.js").AttachmentHostResolver | undefined;
|
|
49
|
+
readonly logger: RuntimeLogger;
|
|
50
|
+
readonly connectionGrantStore: ConnectionGrantStore;
|
|
51
|
+
readonly credentialBroker: CredentialBroker;
|
|
52
|
+
readonly gatewayCredentials: Readonly<Record<string, string>>;
|
|
53
|
+
/** Trusted model-provider-only view; never exposed to authored tools. */
|
|
54
|
+
readonly modelProviderEnv: Readonly<Record<string, string | undefined>>;
|
|
55
|
+
readonly connectionAuthorizationSessionStore: ConnectionAuthorizationSessionStore;
|
|
56
|
+
readonly connectionEventStore: ConnectionEventStore;
|
|
57
|
+
readonly connectionCallbackBaseUrl: string | undefined;
|
|
58
|
+
readonly skillStore: SkillStore;
|
|
59
|
+
readonly learningStore: LearningStore;
|
|
60
|
+
readonly memoryStore: MemoryStore;
|
|
61
|
+
readonly evolutionTracker: EvolutionTracker | undefined;
|
|
62
|
+
readonly connectionDefinitionStore: ConnectionDefinitionStore;
|
|
63
|
+
readonly skillsConfig: ResolvedSkillsConfig;
|
|
64
|
+
readonly connectionsConfig: ResolvedConnectionsConfig;
|
|
65
|
+
readonly memoryEmbeddingProvider: MemoryEmbeddingProvider | undefined;
|
|
66
|
+
readonly memoryEmbeddingsEnabled: boolean;
|
|
67
|
+
readonly coreToolPolicy: ResolvedCoreToolPolicy;
|
|
68
|
+
telemetry: TelemetrySink | undefined;
|
|
69
|
+
protected instrumentationLoaded: boolean;
|
|
70
|
+
protected providerIngressSecurityLogged: boolean;
|
|
71
|
+
protected readonly hostTelemetryProvided: boolean;
|
|
72
|
+
protected readonly hostInstrumentationProvided: boolean;
|
|
73
|
+
constructor(options: RuntimeOptions);
|
|
74
|
+
protected abstract handleRuntimeEvent(runId: string, event: RunStreamEvent): Promise<void>;
|
|
75
|
+
protected abstract agentName(): string;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=runtime-engine-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-engine-config.d.ts","sourceRoot":"","sources":["../src/runtime-engine-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAyB,KAAK,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAuC,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE3F,OAAO,EAAgC,KAAK,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACtG,OAAO,EAGL,KAAK,mCAAmC,EACxC,KAAK,oBAAoB,EAC1B,MAAM,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