@exellix/exellix-runtime 3.5.1
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 +422 -0
- package/dist/catalox-inventory/catalox-execution-matrix-inventory-cli.d.ts +4 -0
- package/dist/catalox-inventory/catalox-execution-matrix-inventory-cli.d.ts.map +1 -0
- package/dist/catalox-inventory/catalox-execution-matrix-inventory-cli.js +311 -0
- package/dist/catalox-inventory/catalox-execution-matrix-inventory-cli.js.map +1 -0
- package/dist/catalox-inventory/catalox-execution-matrix-inventory.d.ts +64 -0
- package/dist/catalox-inventory/catalox-execution-matrix-inventory.d.ts.map +1 -0
- package/dist/catalox-inventory/catalox-execution-matrix-inventory.js +226 -0
- package/dist/catalox-inventory/catalox-execution-matrix-inventory.js.map +1 -0
- package/dist/catalox-inventory/catalox-xmemory-entity-count-report.d.ts +145 -0
- package/dist/catalox-inventory/catalox-xmemory-entity-count-report.d.ts.map +1 -0
- package/dist/catalox-inventory/catalox-xmemory-entity-count-report.js +477 -0
- package/dist/catalox-inventory/catalox-xmemory-entity-count-report.js.map +1 -0
- package/dist/catalox-inventory/catalox-xmemory-entity-count-report.spec.d.ts +2 -0
- package/dist/catalox-inventory/catalox-xmemory-entity-count-report.spec.d.ts.map +1 -0
- package/dist/catalox-inventory/catalox-xmemory-entity-count-report.spec.js +34 -0
- package/dist/catalox-inventory/catalox-xmemory-entity-count-report.spec.js.map +1 -0
- package/dist/cli/argv.d.ts +5 -0
- package/dist/cli/argv.d.ts.map +1 -0
- package/dist/cli/argv.js +32 -0
- package/dist/cli/argv.js.map +1 -0
- package/dist/cli/commands/health.d.ts +2 -0
- package/dist/cli/commands/health.d.ts.map +1 -0
- package/dist/cli/commands/health.js +23 -0
- package/dist/cli/commands/health.js.map +1 -0
- package/dist/cli/commands/matrix-link.d.ts +2 -0
- package/dist/cli/commands/matrix-link.d.ts.map +1 -0
- package/dist/cli/commands/matrix-link.js +56 -0
- package/dist/cli/commands/matrix-link.js.map +1 -0
- package/dist/cli/commands/matrix-read.d.ts +2 -0
- package/dist/cli/commands/matrix-read.d.ts.map +1 -0
- package/dist/cli/commands/matrix-read.js +73 -0
- package/dist/cli/commands/matrix-read.js.map +1 -0
- package/dist/cli/env.d.ts +6 -0
- package/dist/cli/env.d.ts.map +1 -0
- package/dist/cli/env.js +39 -0
- package/dist/cli/env.js.map +1 -0
- package/dist/cli/exellix-runtime-cli.d.ts +3 -0
- package/dist/cli/exellix-runtime-cli.d.ts.map +1 -0
- package/dist/cli/exellix-runtime-cli.js +55 -0
- package/dist/cli/exellix-runtime-cli.js.map +1 -0
- package/dist/cli/help.d.ts +19 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +94 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/client-toolbox/bundle.d.ts +17 -0
- package/dist/client-toolbox/bundle.d.ts.map +1 -0
- package/dist/client-toolbox/bundle.js +17 -0
- package/dist/client-toolbox/bundle.js.map +1 -0
- package/dist/client-toolbox/client-toolbox.spec.d.ts +2 -0
- package/dist/client-toolbox/client-toolbox.spec.d.ts.map +1 -0
- package/dist/client-toolbox/client-toolbox.spec.js +145 -0
- package/dist/client-toolbox/client-toolbox.spec.js.map +1 -0
- package/dist/client-toolbox/index.d.ts +4 -0
- package/dist/client-toolbox/index.d.ts.map +1 -0
- package/dist/client-toolbox/index.js +4 -0
- package/dist/client-toolbox/index.js.map +1 -0
- package/dist/client-toolbox/matrix-config.d.ts +67 -0
- package/dist/client-toolbox/matrix-config.d.ts.map +1 -0
- package/dist/client-toolbox/matrix-config.js +140 -0
- package/dist/client-toolbox/matrix-config.js.map +1 -0
- package/dist/client-toolbox/matrix-materialize.d.ts +56 -0
- package/dist/client-toolbox/matrix-materialize.d.ts.map +1 -0
- package/dist/client-toolbox/matrix-materialize.js +130 -0
- package/dist/client-toolbox/matrix-materialize.js.map +1 -0
- package/dist/dev/matrix-read-dashboard-smoke.d.ts +2 -0
- package/dist/dev/matrix-read-dashboard-smoke.d.ts.map +1 -0
- package/dist/dev/matrix-read-dashboard-smoke.js +12 -0
- package/dist/dev/matrix-read-dashboard-smoke.js.map +1 -0
- package/dist/dev/runtime-real-dev-server.d.ts +2 -0
- package/dist/dev/runtime-real-dev-server.d.ts.map +1 -0
- package/dist/dev/runtime-real-dev-server.js +90 -0
- package/dist/dev/runtime-real-dev-server.js.map +1 -0
- package/dist/execution-matrix/catalox-loader.d.ts +55 -0
- package/dist/execution-matrix/catalox-loader.d.ts.map +1 -0
- package/dist/execution-matrix/catalox-loader.js +199 -0
- package/dist/execution-matrix/catalox-loader.js.map +1 -0
- package/dist/execution-matrix/catalox-matrix-host.d.ts +20 -0
- package/dist/execution-matrix/catalox-matrix-host.d.ts.map +1 -0
- package/dist/execution-matrix/catalox-matrix-host.js +19 -0
- package/dist/execution-matrix/catalox-matrix-host.js.map +1 -0
- package/dist/execution-matrix/collections.d.ts +16 -0
- package/dist/execution-matrix/collections.d.ts.map +1 -0
- package/dist/execution-matrix/collections.js +75 -0
- package/dist/execution-matrix/collections.js.map +1 -0
- package/dist/execution-matrix/config-store.d.ts +104 -0
- package/dist/execution-matrix/config-store.d.ts.map +1 -0
- package/dist/execution-matrix/config-store.js +273 -0
- package/dist/execution-matrix/config-store.js.map +1 -0
- package/dist/execution-matrix/constants.d.ts +19 -0
- package/dist/execution-matrix/constants.d.ts.map +1 -0
- package/dist/execution-matrix/constants.js +19 -0
- package/dist/execution-matrix/constants.js.map +1 -0
- package/dist/execution-matrix/contracts.d.ts +568 -0
- package/dist/execution-matrix/contracts.d.ts.map +1 -0
- package/dist/execution-matrix/contracts.js +44 -0
- package/dist/execution-matrix/contracts.js.map +1 -0
- package/dist/execution-matrix/data-source.d.ts +43 -0
- package/dist/execution-matrix/data-source.d.ts.map +1 -0
- package/dist/execution-matrix/data-source.js +307 -0
- package/dist/execution-matrix/data-source.js.map +1 -0
- package/dist/execution-matrix/eligibility.d.ts +48 -0
- package/dist/execution-matrix/eligibility.d.ts.map +1 -0
- package/dist/execution-matrix/eligibility.js +89 -0
- package/dist/execution-matrix/eligibility.js.map +1 -0
- package/dist/execution-matrix/execution-matrix-claim-pause.d.ts +20 -0
- package/dist/execution-matrix/execution-matrix-claim-pause.d.ts.map +1 -0
- package/dist/execution-matrix/execution-matrix-claim-pause.js +18 -0
- package/dist/execution-matrix/execution-matrix-claim-pause.js.map +1 -0
- package/dist/execution-matrix/execution-matrix-claim-pause.spec.d.ts +2 -0
- package/dist/execution-matrix/execution-matrix-claim-pause.spec.d.ts.map +1 -0
- package/dist/execution-matrix/execution-matrix-claim-pause.spec.js +23 -0
- package/dist/execution-matrix/execution-matrix-claim-pause.spec.js.map +1 -0
- package/dist/execution-matrix/execution-matrix.live.spec.d.ts +2 -0
- package/dist/execution-matrix/execution-matrix.live.spec.d.ts.map +1 -0
- package/dist/execution-matrix/execution-matrix.live.spec.js +152 -0
- package/dist/execution-matrix/execution-matrix.live.spec.js.map +1 -0
- package/dist/execution-matrix/execution-matrix.live.xmemory.spec.d.ts +2 -0
- package/dist/execution-matrix/execution-matrix.live.xmemory.spec.d.ts.map +1 -0
- package/dist/execution-matrix/execution-matrix.live.xmemory.spec.js +346 -0
- package/dist/execution-matrix/execution-matrix.live.xmemory.spec.js.map +1 -0
- package/dist/execution-matrix/execution-matrix.spec.d.ts +2 -0
- package/dist/execution-matrix/execution-matrix.spec.d.ts.map +1 -0
- package/dist/execution-matrix/execution-matrix.spec.js +1786 -0
- package/dist/execution-matrix/execution-matrix.spec.js.map +1 -0
- package/dist/execution-matrix/execution-mode.d.ts +34 -0
- package/dist/execution-matrix/execution-mode.d.ts.map +1 -0
- package/dist/execution-matrix/execution-mode.js +72 -0
- package/dist/execution-matrix/execution-mode.js.map +1 -0
- package/dist/execution-matrix/factory.d.ts +72 -0
- package/dist/execution-matrix/factory.d.ts.map +1 -0
- package/dist/execution-matrix/factory.js +77 -0
- package/dist/execution-matrix/factory.js.map +1 -0
- package/dist/execution-matrix/graph-engine-datafilters-reexport.spec.d.ts +2 -0
- package/dist/execution-matrix/graph-engine-datafilters-reexport.spec.d.ts.map +1 -0
- package/dist/execution-matrix/graph-engine-datafilters-reexport.spec.js +48 -0
- package/dist/execution-matrix/graph-engine-datafilters-reexport.spec.js.map +1 -0
- package/dist/execution-matrix/graph-entry-xmemory-load.d.ts +130 -0
- package/dist/execution-matrix/graph-entry-xmemory-load.d.ts.map +1 -0
- package/dist/execution-matrix/graph-entry-xmemory-load.js +146 -0
- package/dist/execution-matrix/graph-entry-xmemory-load.js.map +1 -0
- package/dist/execution-matrix/graph-entry-xmemory-load.spec.d.ts +2 -0
- package/dist/execution-matrix/graph-entry-xmemory-load.spec.d.ts.map +1 -0
- package/dist/execution-matrix/graph-entry-xmemory-load.spec.js +66 -0
- package/dist/execution-matrix/graph-entry-xmemory-load.spec.js.map +1 -0
- package/dist/execution-matrix/graph-operational-aggregates.d.ts +47 -0
- package/dist/execution-matrix/graph-operational-aggregates.d.ts.map +1 -0
- package/dist/execution-matrix/graph-operational-aggregates.js +137 -0
- package/dist/execution-matrix/graph-operational-aggregates.js.map +1 -0
- package/dist/execution-matrix/graph-operational-lifecycle.d.ts +43 -0
- package/dist/execution-matrix/graph-operational-lifecycle.d.ts.map +1 -0
- package/dist/execution-matrix/graph-operational-lifecycle.js +88 -0
- package/dist/execution-matrix/graph-operational-lifecycle.js.map +1 -0
- package/dist/execution-matrix/graph-operational.spec.d.ts +2 -0
- package/dist/execution-matrix/graph-operational.spec.d.ts.map +1 -0
- package/dist/execution-matrix/graph-operational.spec.js +203 -0
- package/dist/execution-matrix/graph-operational.spec.js.map +1 -0
- package/dist/execution-matrix/index.d.ts +73 -0
- package/dist/execution-matrix/index.d.ts.map +1 -0
- package/dist/execution-matrix/index.js +57 -0
- package/dist/execution-matrix/index.js.map +1 -0
- package/dist/execution-matrix/live-tier-open.d.ts +6 -0
- package/dist/execution-matrix/live-tier-open.d.ts.map +1 -0
- package/dist/execution-matrix/live-tier-open.js +6 -0
- package/dist/execution-matrix/live-tier-open.js.map +1 -0
- package/dist/execution-matrix/materializer.d.ts +99 -0
- package/dist/execution-matrix/materializer.d.ts.map +1 -0
- package/dist/execution-matrix/materializer.js +210 -0
- package/dist/execution-matrix/materializer.js.map +1 -0
- package/dist/execution-matrix/matrix-activix.d.ts +24 -0
- package/dist/execution-matrix/matrix-activix.d.ts.map +1 -0
- package/dist/execution-matrix/matrix-activix.js +34 -0
- package/dist/execution-matrix/matrix-activix.js.map +1 -0
- package/dist/execution-matrix/matrix-data-tier.d.ts +55 -0
- package/dist/execution-matrix/matrix-data-tier.d.ts.map +1 -0
- package/dist/execution-matrix/matrix-data-tier.js +74 -0
- package/dist/execution-matrix/matrix-data-tier.js.map +1 -0
- package/dist/execution-matrix/matrix-execute-graph-adapter.d.ts +43 -0
- package/dist/execution-matrix/matrix-execute-graph-adapter.d.ts.map +1 -0
- package/dist/execution-matrix/matrix-execute-graph-adapter.js +62 -0
- package/dist/execution-matrix/matrix-execute-graph-adapter.js.map +1 -0
- package/dist/execution-matrix/matrix-execute-graph-adapter.spec.d.ts +2 -0
- package/dist/execution-matrix/matrix-execute-graph-adapter.spec.d.ts.map +1 -0
- package/dist/execution-matrix/matrix-execute-graph-adapter.spec.js +60 -0
- package/dist/execution-matrix/matrix-execute-graph-adapter.spec.js.map +1 -0
- package/dist/execution-matrix/matrix-logxer.d.ts +15 -0
- package/dist/execution-matrix/matrix-logxer.d.ts.map +1 -0
- package/dist/execution-matrix/matrix-logxer.js +65 -0
- package/dist/execution-matrix/matrix-logxer.js.map +1 -0
- package/dist/execution-matrix/matrix-read-tier.d.ts +41 -0
- package/dist/execution-matrix/matrix-read-tier.d.ts.map +1 -0
- package/dist/execution-matrix/matrix-read-tier.js +41 -0
- package/dist/execution-matrix/matrix-read-tier.js.map +1 -0
- package/dist/execution-matrix/memorix-entity-type-helpers.d.ts +25 -0
- package/dist/execution-matrix/memorix-entity-type-helpers.d.ts.map +1 -0
- package/dist/execution-matrix/memorix-entity-type-helpers.js +32 -0
- package/dist/execution-matrix/memorix-entity-type-helpers.js.map +1 -0
- package/dist/execution-matrix/memorix-entity-type-helpers.spec.d.ts +2 -0
- package/dist/execution-matrix/memorix-entity-type-helpers.spec.d.ts.map +1 -0
- package/dist/execution-matrix/memorix-entity-type-helpers.spec.js +83 -0
- package/dist/execution-matrix/memorix-entity-type-helpers.spec.js.map +1 -0
- package/dist/execution-matrix/memorix-inference-persister.d.ts +73 -0
- package/dist/execution-matrix/memorix-inference-persister.d.ts.map +1 -0
- package/dist/execution-matrix/memorix-inference-persister.js +126 -0
- package/dist/execution-matrix/memorix-inference-persister.js.map +1 -0
- package/dist/execution-matrix/memorix-inference-persister.spec.d.ts +2 -0
- package/dist/execution-matrix/memorix-inference-persister.spec.d.ts.map +1 -0
- package/dist/execution-matrix/memorix-inference-persister.spec.js +117 -0
- package/dist/execution-matrix/memorix-inference-persister.spec.js.map +1 -0
- package/dist/execution-matrix/memorix-matrix-entity-facet.d.ts +71 -0
- package/dist/execution-matrix/memorix-matrix-entity-facet.d.ts.map +1 -0
- package/dist/execution-matrix/memorix-matrix-entity-facet.js +91 -0
- package/dist/execution-matrix/memorix-matrix-entity-facet.js.map +1 -0
- package/dist/execution-matrix/memorix-matrix-entity-facet.spec.d.ts +2 -0
- package/dist/execution-matrix/memorix-matrix-entity-facet.spec.d.ts.map +1 -0
- package/dist/execution-matrix/memorix-matrix-entity-facet.spec.js +151 -0
- package/dist/execution-matrix/memorix-matrix-entity-facet.spec.js.map +1 -0
- package/dist/execution-matrix/memorix-runtime-tier.d.ts +153 -0
- package/dist/execution-matrix/memorix-runtime-tier.d.ts.map +1 -0
- package/dist/execution-matrix/memorix-runtime-tier.js +185 -0
- package/dist/execution-matrix/memorix-runtime-tier.js.map +1 -0
- package/dist/execution-matrix/memorix-tier-statistics.d.ts +103 -0
- package/dist/execution-matrix/memorix-tier-statistics.d.ts.map +1 -0
- package/dist/execution-matrix/memorix-tier-statistics.js +164 -0
- package/dist/execution-matrix/memorix-tier-statistics.js.map +1 -0
- package/dist/execution-matrix/memory-store.d.ts +20 -0
- package/dist/execution-matrix/memory-store.d.ts.map +1 -0
- package/dist/execution-matrix/memory-store.js +185 -0
- package/dist/execution-matrix/memory-store.js.map +1 -0
- package/dist/execution-matrix/navigator.d.ts +97 -0
- package/dist/execution-matrix/navigator.d.ts.map +1 -0
- package/dist/execution-matrix/navigator.js +119 -0
- package/dist/execution-matrix/navigator.js.map +1 -0
- package/dist/execution-matrix/orchestrator.d.ts +204 -0
- package/dist/execution-matrix/orchestrator.d.ts.map +1 -0
- package/dist/execution-matrix/orchestrator.js +656 -0
- package/dist/execution-matrix/orchestrator.js.map +1 -0
- package/dist/execution-matrix/records-eligibility.d.ts +34 -0
- package/dist/execution-matrix/records-eligibility.d.ts.map +1 -0
- package/dist/execution-matrix/records-eligibility.js +110 -0
- package/dist/execution-matrix/records-eligibility.js.map +1 -0
- package/dist/execution-matrix/records-eligibility.spec.d.ts +2 -0
- package/dist/execution-matrix/records-eligibility.spec.d.ts.map +1 -0
- package/dist/execution-matrix/records-eligibility.spec.js +154 -0
- package/dist/execution-matrix/records-eligibility.spec.js.map +1 -0
- package/dist/execution-matrix/run-loop.d.ts +140 -0
- package/dist/execution-matrix/run-loop.d.ts.map +1 -0
- package/dist/execution-matrix/run-loop.js +350 -0
- package/dist/execution-matrix/run-loop.js.map +1 -0
- package/dist/execution-matrix/runtime-connectivity-health.d.ts +128 -0
- package/dist/execution-matrix/runtime-connectivity-health.d.ts.map +1 -0
- package/dist/execution-matrix/runtime-connectivity-health.js +253 -0
- package/dist/execution-matrix/runtime-connectivity-health.js.map +1 -0
- package/dist/execution-matrix/runtime-connectivity-health.spec.d.ts +2 -0
- package/dist/execution-matrix/runtime-connectivity-health.spec.d.ts.map +1 -0
- package/dist/execution-matrix/runtime-connectivity-health.spec.js +23 -0
- package/dist/execution-matrix/runtime-connectivity-health.spec.js.map +1 -0
- package/dist/execution-matrix/runtime-objects.d.ts +16 -0
- package/dist/execution-matrix/runtime-objects.d.ts.map +1 -0
- package/dist/execution-matrix/runtime-objects.js +20 -0
- package/dist/execution-matrix/runtime-objects.js.map +1 -0
- package/dist/execution-matrix/runtime-store.d.ts +114 -0
- package/dist/execution-matrix/runtime-store.d.ts.map +1 -0
- package/dist/execution-matrix/runtime-store.js +506 -0
- package/dist/execution-matrix/runtime-store.js.map +1 -0
- package/dist/execution-matrix/snapshot-runner.d.ts +50 -0
- package/dist/execution-matrix/snapshot-runner.d.ts.map +1 -0
- package/dist/execution-matrix/snapshot-runner.js +111 -0
- package/dist/execution-matrix/snapshot-runner.js.map +1 -0
- package/dist/execution-matrix/source-resolver-factories.d.ts +31 -0
- package/dist/execution-matrix/source-resolver-factories.d.ts.map +1 -0
- package/dist/execution-matrix/source-resolver-factories.js +71 -0
- package/dist/execution-matrix/source-resolver-factories.js.map +1 -0
- package/dist/execution-matrix/source-resolver-factories.spec.d.ts +2 -0
- package/dist/execution-matrix/source-resolver-factories.spec.d.ts.map +1 -0
- package/dist/execution-matrix/source-resolver-factories.spec.js +127 -0
- package/dist/execution-matrix/source-resolver-factories.spec.js.map +1 -0
- package/dist/execution-matrix/source-resolver.d.ts +31 -0
- package/dist/execution-matrix/source-resolver.d.ts.map +1 -0
- package/dist/execution-matrix/source-resolver.js +26 -0
- package/dist/execution-matrix/source-resolver.js.map +1 -0
- package/dist/execution-matrix/status.d.ts +7 -0
- package/dist/execution-matrix/status.d.ts.map +1 -0
- package/dist/execution-matrix/status.js +33 -0
- package/dist/execution-matrix/status.js.map +1 -0
- package/dist/execution-matrix/xmemory-entity-collections.d.ts +69 -0
- package/dist/execution-matrix/xmemory-entity-collections.d.ts.map +1 -0
- package/dist/execution-matrix/xmemory-entity-collections.js +120 -0
- package/dist/execution-matrix/xmemory-entity-collections.js.map +1 -0
- package/dist/execution-matrix/xmemory-entity-collections.spec.d.ts +2 -0
- package/dist/execution-matrix/xmemory-entity-collections.spec.d.ts.map +1 -0
- package/dist/execution-matrix/xmemory-entity-collections.spec.js +112 -0
- package/dist/execution-matrix/xmemory-entity-collections.spec.js.map +1 -0
- package/dist/execution-matrix/xmemory-op-tier.d.ts +172 -0
- package/dist/execution-matrix/xmemory-op-tier.d.ts.map +1 -0
- package/dist/execution-matrix/xmemory-op-tier.js +339 -0
- package/dist/execution-matrix/xmemory-op-tier.js.map +1 -0
- package/dist/execution-matrix/xmemory-op-tier.spec.d.ts +2 -0
- package/dist/execution-matrix/xmemory-op-tier.spec.d.ts.map +1 -0
- package/dist/execution-matrix/xmemory-op-tier.spec.js +198 -0
- package/dist/execution-matrix/xmemory-op-tier.spec.js.map +1 -0
- package/dist/execution-matrix/xronox-matrix-factory.d.ts +38 -0
- package/dist/execution-matrix/xronox-matrix-factory.d.ts.map +1 -0
- package/dist/execution-matrix/xronox-matrix-factory.js +77 -0
- package/dist/execution-matrix/xronox-matrix-factory.js.map +1 -0
- package/dist/execution-matrix/xronox-store-native-driver-hooks.d.ts +15 -0
- package/dist/execution-matrix/xronox-store-native-driver-hooks.d.ts.map +1 -0
- package/dist/execution-matrix/xronox-store-native-driver-hooks.js +41 -0
- package/dist/execution-matrix/xronox-store-native-driver-hooks.js.map +1 -0
- package/dist/test-fixtures/exellix-test-matrix-ids.d.ts +16 -0
- package/dist/test-fixtures/exellix-test-matrix-ids.d.ts.map +1 -0
- package/dist/test-fixtures/exellix-test-matrix-ids.js +16 -0
- package/dist/test-fixtures/exellix-test-matrix-ids.js.map +1 -0
- package/dist/test-fixtures/seed-exellix-test-matrix-config.d.ts +26 -0
- package/dist/test-fixtures/seed-exellix-test-matrix-config.d.ts.map +1 -0
- package/dist/test-fixtures/seed-exellix-test-matrix-config.js +82 -0
- package/dist/test-fixtures/seed-exellix-test-matrix-config.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,656 @@
|
|
|
1
|
+
import { activixActivityIo, activixOuterTier } from '@x12i/activix';
|
|
2
|
+
import { buildMatrixJobForGraphRun, resolveGraphEntryFromGraph, setRuntimeObjectsLastJobId, isEmptyConditionWhen, isModelConfigSelection, } from '@exellix/graph-engine';
|
|
3
|
+
import { DEFAULT_GRAPH_OPERATIONAL_STATE, DEFAULT_GRAPH_PUBLICATION_STATUS } from './contracts.js';
|
|
4
|
+
import { getExecutionMatrixLogxer } from './matrix-logxer.js';
|
|
5
|
+
import { buildExecutionSeedFromGraphEntry } from './materializer.js';
|
|
6
|
+
import { assertGraphSchedulable, GraphNotSchedulableError } from './graph-operational-lifecycle.js';
|
|
7
|
+
async function resolveShouldClaimNext(deps) {
|
|
8
|
+
if (!deps.shouldClaimNext)
|
|
9
|
+
return true;
|
|
10
|
+
return deps.shouldClaimNext();
|
|
11
|
+
}
|
|
12
|
+
async function assertGraphSchedulableForClaim(deps, graphId) {
|
|
13
|
+
if (!deps.resolveGraphSchedulability)
|
|
14
|
+
return;
|
|
15
|
+
const rec = await deps.resolveGraphSchedulability(graphId);
|
|
16
|
+
if (!rec) {
|
|
17
|
+
if (deps.graphSchedulabilityRequireConfig) {
|
|
18
|
+
throw new GraphNotSchedulableError(`Graph '${graphId}' has no configuration record (graphSchedulabilityRequireConfig is true)`, graphId, DEFAULT_GRAPH_PUBLICATION_STATUS, DEFAULT_GRAPH_OPERATIONAL_STATE);
|
|
19
|
+
}
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
assertGraphSchedulable(rec);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @returns whether this graph may be claimed (false = skip this graphId without throwing).
|
|
26
|
+
*/
|
|
27
|
+
async function isGraphSchedulableForClaim(deps, graphId) {
|
|
28
|
+
if (!deps.resolveGraphSchedulability)
|
|
29
|
+
return true;
|
|
30
|
+
const rec = await deps.resolveGraphSchedulability(graphId);
|
|
31
|
+
if (!rec) {
|
|
32
|
+
if (deps.graphSchedulabilityRequireConfig) {
|
|
33
|
+
throw new GraphNotSchedulableError(`Graph '${graphId}' has no configuration record (graphSchedulabilityRequireConfig is true)`, graphId, DEFAULT_GRAPH_PUBLICATION_STATUS, DEFAULT_GRAPH_OPERATIONAL_STATE);
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
try {
|
|
38
|
+
assertGraphSchedulable(rec);
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
catch (e) {
|
|
42
|
+
if (e instanceof GraphNotSchedulableError)
|
|
43
|
+
return false;
|
|
44
|
+
throw e;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function resolveGraphEntryForClaim(deps, ctx, graphModel) {
|
|
48
|
+
if (deps.resolveGraphEntry)
|
|
49
|
+
return deps.resolveGraphEntry(ctx);
|
|
50
|
+
return resolveGraphEntryFromGraph(graphModel);
|
|
51
|
+
}
|
|
52
|
+
async function resolveGraphModelForClaim(deps, ctx) {
|
|
53
|
+
const model = (await deps.resolveGraphModel?.(ctx)) ?? deps.graphModel;
|
|
54
|
+
if (!model) {
|
|
55
|
+
throw new Error(`executeMatrixGraphForClaim: graph model resolver returned no model for graphId '${ctx.graphId}'`);
|
|
56
|
+
}
|
|
57
|
+
if (model.id !== ctx.graphId) {
|
|
58
|
+
throw new Error(`executeMatrixGraphForClaim: resolved graph model id '${model.id}' does not match claimed graphId '${ctx.graphId}'`);
|
|
59
|
+
}
|
|
60
|
+
return model;
|
|
61
|
+
}
|
|
62
|
+
/** Merge per-call `extraFilter` with deps `runtimeScope`; `runtimeScope` wins on duplicate keys. */
|
|
63
|
+
export function mergeClaimExtraFilter(claimExtra, runtimeScope) {
|
|
64
|
+
const a = claimExtra && Object.keys(claimExtra).length ? claimExtra : undefined;
|
|
65
|
+
const b = runtimeScope && Object.keys(runtimeScope).length ? runtimeScope : undefined;
|
|
66
|
+
if (!a && !b)
|
|
67
|
+
return undefined;
|
|
68
|
+
return { ...a, ...b };
|
|
69
|
+
}
|
|
70
|
+
function mergeSkillKeyResolution(depsLevel, callLevel) {
|
|
71
|
+
if (!depsLevel && !callLevel)
|
|
72
|
+
return undefined;
|
|
73
|
+
const out = {};
|
|
74
|
+
if (callLevel?.allowFallbackToNodeId !== undefined) {
|
|
75
|
+
out.allowFallbackToNodeId = callLevel.allowFallbackToNodeId;
|
|
76
|
+
}
|
|
77
|
+
else if (depsLevel?.allowFallbackToNodeId !== undefined) {
|
|
78
|
+
out.allowFallbackToNodeId = depsLevel.allowFallbackToNodeId;
|
|
79
|
+
}
|
|
80
|
+
if (callLevel?.fallbackPrefix !== undefined) {
|
|
81
|
+
out.fallbackPrefix = callLevel.fallbackPrefix;
|
|
82
|
+
}
|
|
83
|
+
else if (depsLevel?.fallbackPrefix !== undefined) {
|
|
84
|
+
out.fallbackPrefix = depsLevel.fallbackPrefix;
|
|
85
|
+
}
|
|
86
|
+
const aliases = { ...(depsLevel?.aliases ?? {}), ...(callLevel?.aliases ?? {}) };
|
|
87
|
+
if (Object.keys(aliases).length > 0) {
|
|
88
|
+
out.aliases = aliases;
|
|
89
|
+
}
|
|
90
|
+
return Object.keys(out).length > 0 ? out : undefined;
|
|
91
|
+
}
|
|
92
|
+
function mergeRuntimeNodeConfig(depsLevel, callLevel) {
|
|
93
|
+
if (!depsLevel && !callLevel)
|
|
94
|
+
return undefined;
|
|
95
|
+
const out = {};
|
|
96
|
+
const modelConfig = {
|
|
97
|
+
...(depsLevel?.modelConfig ?? {}),
|
|
98
|
+
...(callLevel?.modelConfig ?? {}),
|
|
99
|
+
};
|
|
100
|
+
if (Object.keys(modelConfig).length > 0) {
|
|
101
|
+
out.modelConfig = modelConfig;
|
|
102
|
+
}
|
|
103
|
+
const aliasConfig = { ...(depsLevel?.aliasConfig ?? {}), ...(callLevel?.aliasConfig ?? {}) };
|
|
104
|
+
if (Object.keys(aliasConfig).length > 0) {
|
|
105
|
+
out.aliasConfig = aliasConfig;
|
|
106
|
+
}
|
|
107
|
+
return Object.keys(out).length > 0 ? out : undefined;
|
|
108
|
+
}
|
|
109
|
+
function mergeRuntimeNodes(depsLevel, callLevel) {
|
|
110
|
+
if (!depsLevel && !callLevel)
|
|
111
|
+
return undefined;
|
|
112
|
+
const out = {};
|
|
113
|
+
for (const nodeId of new Set([...Object.keys(depsLevel ?? {}), ...Object.keys(callLevel ?? {})])) {
|
|
114
|
+
const merged = mergeRuntimeNodeConfig(depsLevel?.[nodeId], callLevel?.[nodeId]);
|
|
115
|
+
if (merged)
|
|
116
|
+
out[nodeId] = merged;
|
|
117
|
+
}
|
|
118
|
+
return Object.keys(out).length > 0 ? out : undefined;
|
|
119
|
+
}
|
|
120
|
+
const DEFAULT_MATRIX_RUNTIME_AGENT_ID = 'exellix-runtime';
|
|
121
|
+
const DEFAULT_MATRIX_RUNTIME_JOB_TYPE_ID = 'execution-matrix-graph-run';
|
|
122
|
+
function mergeDefinedRecord(base, override) {
|
|
123
|
+
if (!override)
|
|
124
|
+
return base;
|
|
125
|
+
const out = { ...base };
|
|
126
|
+
for (const [key, value] of Object.entries(override)) {
|
|
127
|
+
if (value !== undefined)
|
|
128
|
+
out[key] = value;
|
|
129
|
+
}
|
|
130
|
+
return out;
|
|
131
|
+
}
|
|
132
|
+
function buildRuntimeJobForClaim(deps, record, graphId, jobId) {
|
|
133
|
+
const base = {
|
|
134
|
+
id: jobId,
|
|
135
|
+
jobId,
|
|
136
|
+
agentId: DEFAULT_MATRIX_RUNTIME_AGENT_ID,
|
|
137
|
+
jobTypeId: DEFAULT_MATRIX_RUNTIME_JOB_TYPE_ID,
|
|
138
|
+
matrixRowId: record.matrixRowId,
|
|
139
|
+
matrixCatalogId: record.matrixCatalogId,
|
|
140
|
+
...(record.matrixRunId ? { matrixRunId: record.matrixRunId } : {}),
|
|
141
|
+
graphId,
|
|
142
|
+
};
|
|
143
|
+
const hostJob = deps.buildJob?.({
|
|
144
|
+
matrixRowId: record.matrixRowId,
|
|
145
|
+
graphId,
|
|
146
|
+
jobId,
|
|
147
|
+
matrixCatalogId: record.matrixCatalogId,
|
|
148
|
+
...(record.matrixRunId ? { matrixRunId: record.matrixRunId } : {}),
|
|
149
|
+
});
|
|
150
|
+
return {
|
|
151
|
+
...mergeDefinedRecord(base, hostJob),
|
|
152
|
+
id: jobId,
|
|
153
|
+
jobId,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Merge matrix → graph-engine runtime overrides before building `GraphExecutionRequest.runtime`.
|
|
158
|
+
*
|
|
159
|
+
* Precedence:
|
|
160
|
+
* - Per-call (`callLevel`) wins over deps-level (`depsLevel`).
|
|
161
|
+
* - **Record fields** (`modelConfig`, `aliasConfig`, `llmCall`, `runTaskIdentity`,
|
|
162
|
+
* `runTaskDiagnostics`, `variables`, `initialVariables`, `playgroundMeta`):
|
|
163
|
+
* `{ ...depsLevel, ...callLevel }` per field.
|
|
164
|
+
* - **`nodes`**: node ids shallow-merge; per-node `aliasConfig` and `modelConfig` shallow-merge.
|
|
165
|
+
* - **`skillKeyResolution`**: top-level keys prefer call when set; `aliases` shallow-merge.
|
|
166
|
+
* - **Scalars** (`runTaskExecutionMode`, `runLogMode`, `maxRunLogEntries`, `maxRunLogDataJsonChars`,
|
|
167
|
+
* `mode`, `goalNodeId`, `dimension`, `failFast`, `nodeTimeoutMs`,
|
|
168
|
+
* `clearSynthesizedContextPerNode`, `debugMode`): per-call wins when `!== undefined`; otherwise deps.
|
|
169
|
+
* - **Replace blobs / arrays / handles** (`jobMemory`, `taskMemory`, `outputsMemory`, `initialState`,
|
|
170
|
+
* `executionPipeline`, `runtimeObjects`, `playgroundReporter`, `eventEmitter`, `stepRetryPolicy`):
|
|
171
|
+
* per-call wins when `!== undefined`; otherwise deps.
|
|
172
|
+
* - When the merged object would be empty, returns `undefined` (no extra keys on the executor call).
|
|
173
|
+
*/
|
|
174
|
+
export function mergeMatrixGraphExecuteOverrides(depsLevel, callLevel) {
|
|
175
|
+
if (!depsLevel && !callLevel)
|
|
176
|
+
return undefined;
|
|
177
|
+
const out = {};
|
|
178
|
+
const recordMergeKeys = [
|
|
179
|
+
'modelConfig',
|
|
180
|
+
'aliasConfig',
|
|
181
|
+
'llmCall',
|
|
182
|
+
'runTaskIdentity',
|
|
183
|
+
'runTaskDiagnostics',
|
|
184
|
+
'variables',
|
|
185
|
+
'initialVariables',
|
|
186
|
+
'playgroundMeta',
|
|
187
|
+
];
|
|
188
|
+
for (const key of recordMergeKeys) {
|
|
189
|
+
const d = depsLevel?.[key];
|
|
190
|
+
const c = callLevel?.[key];
|
|
191
|
+
if (d || c) {
|
|
192
|
+
out[key] = { ...(d ?? {}), ...(c ?? {}) };
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
const nodes = mergeRuntimeNodes(depsLevel?.nodes, callLevel?.nodes);
|
|
196
|
+
if (nodes) {
|
|
197
|
+
out.nodes = nodes;
|
|
198
|
+
}
|
|
199
|
+
const skill = mergeSkillKeyResolution(depsLevel?.skillKeyResolution, callLevel?.skillKeyResolution);
|
|
200
|
+
if (skill) {
|
|
201
|
+
out.skillKeyResolution = skill;
|
|
202
|
+
}
|
|
203
|
+
const replaceKeys = [
|
|
204
|
+
'runTaskExecutionMode',
|
|
205
|
+
'runLogMode',
|
|
206
|
+
'maxRunLogEntries',
|
|
207
|
+
'maxRunLogDataJsonChars',
|
|
208
|
+
'mode',
|
|
209
|
+
'goalNodeId',
|
|
210
|
+
'dimension',
|
|
211
|
+
'failFast',
|
|
212
|
+
'nodeTimeoutMs',
|
|
213
|
+
'clearSynthesizedContextPerNode',
|
|
214
|
+
'debugMode',
|
|
215
|
+
'jobMemory',
|
|
216
|
+
'taskMemory',
|
|
217
|
+
'outputsMemory',
|
|
218
|
+
'initialState',
|
|
219
|
+
'executionPipeline',
|
|
220
|
+
'runtimeObjects',
|
|
221
|
+
'playgroundReporter',
|
|
222
|
+
'eventEmitter',
|
|
223
|
+
'stepRetryPolicy',
|
|
224
|
+
];
|
|
225
|
+
for (const key of replaceKeys) {
|
|
226
|
+
const c = callLevel?.[key];
|
|
227
|
+
const d = depsLevel?.[key];
|
|
228
|
+
if (c !== undefined) {
|
|
229
|
+
out[key] = c;
|
|
230
|
+
}
|
|
231
|
+
else if (d !== undefined) {
|
|
232
|
+
out[key] = d;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
return Object.keys(out).length ? out : undefined;
|
|
236
|
+
}
|
|
237
|
+
/** Keys orchestrator supplies — strip if callers sneak them through untyped overrides at runtime. */
|
|
238
|
+
const BLOCKED_EXECUTE_OVERRIDE_KEYS = [
|
|
239
|
+
'jobId',
|
|
240
|
+
'job',
|
|
241
|
+
'graphId',
|
|
242
|
+
'input',
|
|
243
|
+
'execution',
|
|
244
|
+
'executionMemory',
|
|
245
|
+
'model',
|
|
246
|
+
'runtime',
|
|
247
|
+
'graph',
|
|
248
|
+
];
|
|
249
|
+
/**
|
|
250
|
+
* Removes {@link BLOCKED_EXECUTE_OVERRIDE_KEYS} from merged overrides so matrix correlation ids cannot be
|
|
251
|
+
* overridden via {@link MatrixGraphExecuteOverrides} (defense in depth for casts / dynamic payloads).
|
|
252
|
+
*/
|
|
253
|
+
export function sanitizeMatrixGraphExecuteOverrides(o) {
|
|
254
|
+
if (!o)
|
|
255
|
+
return undefined;
|
|
256
|
+
const raw = o;
|
|
257
|
+
let touched = false;
|
|
258
|
+
const next = { ...raw };
|
|
259
|
+
for (const k of BLOCKED_EXECUTE_OVERRIDE_KEYS) {
|
|
260
|
+
if (k in next) {
|
|
261
|
+
delete next[k];
|
|
262
|
+
touched = true;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
if (!touched)
|
|
266
|
+
return o;
|
|
267
|
+
return Object.keys(next).length ? next : undefined;
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Try {@link ExecutionMatrixRuntime.claimNext} for each `graphId` in order until one succeeds.
|
|
271
|
+
* Use for "execute next" across a matrix when multiple graphs share the same runtime rows.
|
|
272
|
+
*/
|
|
273
|
+
export async function claimNextAcrossGraphs(runtime, opts, runtimeScope) {
|
|
274
|
+
const extraFilter = mergeClaimExtraFilter(opts.extraFilter, runtimeScope);
|
|
275
|
+
for (const graphId of opts.graphIds) {
|
|
276
|
+
if (opts.beforeClaimGraph) {
|
|
277
|
+
const proceed = await opts.beforeClaimGraph(graphId);
|
|
278
|
+
if (!proceed)
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
281
|
+
const claim = await runtime.claimNext({
|
|
282
|
+
matrixCatalogId: opts.matrixCatalogId,
|
|
283
|
+
matrixRunId: opts.matrixRunId,
|
|
284
|
+
graphId,
|
|
285
|
+
fromStatuses: opts.fromStatuses,
|
|
286
|
+
workerId: opts.workerId,
|
|
287
|
+
extraFilter,
|
|
288
|
+
});
|
|
289
|
+
if (claim.ok)
|
|
290
|
+
return claim;
|
|
291
|
+
}
|
|
292
|
+
return { ok: false, reason: 'no_eligible_row' };
|
|
293
|
+
}
|
|
294
|
+
function isCompleted(result) {
|
|
295
|
+
return result.status === 'completed';
|
|
296
|
+
}
|
|
297
|
+
function getFinalOutput(result) {
|
|
298
|
+
return result.finalOutput;
|
|
299
|
+
}
|
|
300
|
+
function getRunLog(result) {
|
|
301
|
+
return result.runLog;
|
|
302
|
+
}
|
|
303
|
+
function getLogxerCorrelationId(result) {
|
|
304
|
+
return result.logxerCorrelationId;
|
|
305
|
+
}
|
|
306
|
+
function getExecutionSnapshot(result) {
|
|
307
|
+
return result.execution;
|
|
308
|
+
}
|
|
309
|
+
function getEngineSnapshot(result) {
|
|
310
|
+
return result.engineSnapshot;
|
|
311
|
+
}
|
|
312
|
+
function getFailureSummary(result) {
|
|
313
|
+
return result.errors;
|
|
314
|
+
}
|
|
315
|
+
function getGraphEngineTaskId(result) {
|
|
316
|
+
const t = result.taskId;
|
|
317
|
+
return typeof t === 'string' && t.length > 0 ? t : undefined;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Run graph-engine for an already-claimed slot (updates row status / inferences / failures).
|
|
321
|
+
*
|
|
322
|
+
* `runtime.executeOverrides` (per-call) is shallow-merged over `deps.executeOverrides`
|
|
323
|
+
* (orchestrator-level default) by {@link mergeMatrixGraphExecuteOverrides} and the result
|
|
324
|
+
* is merged into the single `executeGraph` call. When neither is set, no extra runtime
|
|
325
|
+
* override fields are added.
|
|
326
|
+
*
|
|
327
|
+
* Forwards graph-engine {@link ExecuteGraphInput}: `{ model, runtime }`, where `runtime` contains
|
|
328
|
+
* `jobId`, `job`, active row `input`, seeded `executionMemory`, optional `runtimeObjects`, plus merged
|
|
329
|
+
* overrides (`jobMemory`, `taskMemory`, `variables`, …). When `debugMode` is requested, it is forwarded as
|
|
330
|
+
* `runtime.debugMode` (graph-engine populates `ExecuteGraphResult.debug` only when it is true). Does not
|
|
331
|
+
* assemble ai-tasks run-task wire payloads —
|
|
332
|
+
* graph-engine owns that translation.
|
|
333
|
+
*/
|
|
334
|
+
export async function executeMatrixGraphForClaim(deps, claim, runtime) {
|
|
335
|
+
const { record, graphId } = claim;
|
|
336
|
+
const hasRuntimeJobId = typeof runtime?.jobId === 'string' && runtime.jobId.length > 0;
|
|
337
|
+
if (!hasRuntimeJobId && runtime?.debugMode) {
|
|
338
|
+
throw new Error('executeMatrixGraphForClaim: debugMode requires runtime jobId (runtime mode)');
|
|
339
|
+
}
|
|
340
|
+
const jobId = (hasRuntimeJobId ? runtime?.jobId : undefined) ??
|
|
341
|
+
deps.resolveJobId?.({
|
|
342
|
+
matrixRowId: record.matrixRowId,
|
|
343
|
+
graphId,
|
|
344
|
+
matrixCatalogId: record.matrixCatalogId,
|
|
345
|
+
matrixRunId: record.matrixRunId,
|
|
346
|
+
}) ??
|
|
347
|
+
buildMatrixJobForGraphRun({
|
|
348
|
+
matrixId: record.matrixCatalogId,
|
|
349
|
+
rowId: record.matrixRowId,
|
|
350
|
+
graphId,
|
|
351
|
+
attempt: 0,
|
|
352
|
+
}).jobId;
|
|
353
|
+
if (typeof jobId !== 'string' || jobId.length === 0) {
|
|
354
|
+
throw new Error('executeMatrixGraphForClaim: resolveJobId returned empty jobId');
|
|
355
|
+
}
|
|
356
|
+
const job = buildRuntimeJobForClaim(deps, record, graphId, jobId);
|
|
357
|
+
await deps.runtime.setExecutionStepJobId(record.matrixRowId, graphId, jobId);
|
|
358
|
+
const log = deps.matrixLogxer ?? getExecutionMatrixLogxer();
|
|
359
|
+
const logMeta = {
|
|
360
|
+
jobId,
|
|
361
|
+
graphId,
|
|
362
|
+
matrixRowId: record.matrixRowId,
|
|
363
|
+
matrixCatalogId: record.matrixCatalogId,
|
|
364
|
+
};
|
|
365
|
+
const ax = deps.matrixActivix;
|
|
366
|
+
let matrixActivityId;
|
|
367
|
+
let attemptMeta = { jobId };
|
|
368
|
+
try {
|
|
369
|
+
const graphModel = await resolveGraphModelForClaim(deps, {
|
|
370
|
+
graphId,
|
|
371
|
+
matrixRowId: record.matrixRowId,
|
|
372
|
+
matrixCatalogId: record.matrixCatalogId,
|
|
373
|
+
matrixRunId: record.matrixRunId,
|
|
374
|
+
});
|
|
375
|
+
const graphEntry = resolveGraphEntryForClaim(deps, { graphId, matrixRowId: record.matrixRowId }, graphModel);
|
|
376
|
+
const executionMemory = buildExecutionSeedFromGraphEntry(graphEntry, record.input);
|
|
377
|
+
const mergedOverrides = sanitizeMatrixGraphExecuteOverrides(mergeMatrixGraphExecuteOverrides(deps.executeOverrides, runtime?.executeOverrides));
|
|
378
|
+
const effectiveRuntimeObjects = mergedOverrides?.runtimeObjects ?? deps.runtimeObjects;
|
|
379
|
+
if (effectiveRuntimeObjects) {
|
|
380
|
+
setRuntimeObjectsLastJobId(effectiveRuntimeObjects, jobId);
|
|
381
|
+
}
|
|
382
|
+
if (ax) {
|
|
383
|
+
try {
|
|
384
|
+
const started = await ax.startRecord({
|
|
385
|
+
runContext: {
|
|
386
|
+
sessionId: jobId,
|
|
387
|
+
jobId,
|
|
388
|
+
graphId,
|
|
389
|
+
matrixRowId: record.matrixRowId,
|
|
390
|
+
matrixCatalogId: record.matrixCatalogId,
|
|
391
|
+
instance: '@exellix/exellix-runtime',
|
|
392
|
+
},
|
|
393
|
+
...activixActivityIo(activixOuterTier({ phase: 'matrix_graph_execute', matrixRowId: record.matrixRowId, graphId }, null, { graphId, matrixCatalogId: record.matrixCatalogId })),
|
|
394
|
+
});
|
|
395
|
+
matrixActivityId = started.activityId;
|
|
396
|
+
}
|
|
397
|
+
catch (e) {
|
|
398
|
+
log.warn('execution_matrix.activix.start_record_failed', { ...logMeta, data: { error: String(e) } });
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
log.info('execution_matrix.graph_execute.start', logMeta);
|
|
402
|
+
const modelProfile = extractModelProfile(mergedOverrides);
|
|
403
|
+
attemptMeta = { jobId, ...(modelProfile ? { modelProfile } : {}) };
|
|
404
|
+
const extras = mergedOverrides ?? {};
|
|
405
|
+
const debugRequested = hasRuntimeJobId && runtime?.debugMode === true;
|
|
406
|
+
const graphRuntime = {
|
|
407
|
+
jobId,
|
|
408
|
+
job,
|
|
409
|
+
input: record.input,
|
|
410
|
+
executionMemory,
|
|
411
|
+
...(effectiveRuntimeObjects != null ? { runtimeObjects: effectiveRuntimeObjects } : {}),
|
|
412
|
+
...(debugRequested ? { debugMode: true } : {}),
|
|
413
|
+
...extras,
|
|
414
|
+
};
|
|
415
|
+
const input = {
|
|
416
|
+
model: graphModel,
|
|
417
|
+
runtime: graphRuntime,
|
|
418
|
+
};
|
|
419
|
+
const result = await deps.executeGraph(input);
|
|
420
|
+
if (isCompleted(result)) {
|
|
421
|
+
log.info('execution_matrix.graph_execute.completed', logMeta);
|
|
422
|
+
if (ax && matrixActivityId) {
|
|
423
|
+
try {
|
|
424
|
+
await ax.completeRecord(matrixActivityId, {
|
|
425
|
+
outer: { output: { status: 'completed', graphId } },
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
catch (e) {
|
|
429
|
+
log.warn('execution_matrix.activix.complete_record_failed', { ...logMeta, data: { error: String(e) } });
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
await deps.runtime.markCompleted(record.matrixRowId, graphId, {
|
|
433
|
+
graphId,
|
|
434
|
+
knowledge: getFinalOutput(result),
|
|
435
|
+
metadata: {
|
|
436
|
+
matrixJobId: jobId,
|
|
437
|
+
runLog: getRunLog(result),
|
|
438
|
+
logxerCorrelationId: getLogxerCorrelationId(result),
|
|
439
|
+
engineSnapshot: getEngineSnapshot(result),
|
|
440
|
+
},
|
|
441
|
+
}, attemptMeta);
|
|
442
|
+
}
|
|
443
|
+
else {
|
|
444
|
+
log.warn('execution_matrix.graph_execute.graph_failed', {
|
|
445
|
+
...logMeta,
|
|
446
|
+
data: { errors: getFailureSummary(result) },
|
|
447
|
+
});
|
|
448
|
+
if (ax && matrixActivityId) {
|
|
449
|
+
try {
|
|
450
|
+
await ax.failRecord(matrixActivityId, 'graph_failed', {
|
|
451
|
+
outer: { output: { status: 'failed', graphId, errors: getFailureSummary(result) } },
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
catch (e) {
|
|
455
|
+
log.warn('execution_matrix.activix.fail_record_failed', { ...logMeta, data: { error: String(e) } });
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
const fail = getFailureSummary(result);
|
|
459
|
+
await deps.runtime.markFailed(record.matrixRowId, graphId, fail ?? 'graph_failed', {
|
|
460
|
+
jobId,
|
|
461
|
+
taskId: getGraphEngineTaskId(result),
|
|
462
|
+
errors: fail,
|
|
463
|
+
trace: getExecutionSnapshot(result),
|
|
464
|
+
runLog: getRunLog(result),
|
|
465
|
+
}, attemptMeta);
|
|
466
|
+
}
|
|
467
|
+
return { ok: true, graphResult: result, jobId };
|
|
468
|
+
}
|
|
469
|
+
catch (err) {
|
|
470
|
+
log.error('execution_matrix.graph_execute.threw', { ...logMeta, data: { error: String(err) } });
|
|
471
|
+
if (ax && matrixActivityId) {
|
|
472
|
+
try {
|
|
473
|
+
await ax.failRecord(matrixActivityId, err instanceof Error ? err : String(err), {
|
|
474
|
+
outer: { output: { status: 'executor_threw', graphId } },
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
catch (e) {
|
|
478
|
+
log.warn('execution_matrix.activix.fail_record_failed', { ...logMeta, data: { error: String(e) } });
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
await deps.runtime.markFailed(record.matrixRowId, graphId, err, {
|
|
482
|
+
jobId,
|
|
483
|
+
errors: err,
|
|
484
|
+
}, attemptMeta);
|
|
485
|
+
return {
|
|
486
|
+
ok: false,
|
|
487
|
+
reason: 'executor_threw',
|
|
488
|
+
error: err,
|
|
489
|
+
matrixRowId: record.matrixRowId,
|
|
490
|
+
graphId,
|
|
491
|
+
jobId,
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Best-effort extraction of a stable model profile string from merged overrides.
|
|
497
|
+
*
|
|
498
|
+
* Uses the graph-engine 5.1 model selector shape. Returns `undefined` when no
|
|
499
|
+
* non-empty model selector is set. Persisted on `lastAttempt.modelProfile` so
|
|
500
|
+
* eligibility filters can re-claim only when the profile differs.
|
|
501
|
+
*/
|
|
502
|
+
function profileFromGraphAiModelConfig(mc) {
|
|
503
|
+
const xynthesisModel = mc.xynthesisModel;
|
|
504
|
+
const skillModel = mc.skillModel;
|
|
505
|
+
if (typeof xynthesisModel === 'string' && xynthesisModel.length > 0) {
|
|
506
|
+
if (typeof skillModel === 'string' && skillModel.length > 0) {
|
|
507
|
+
return `${xynthesisModel}/${skillModel}`;
|
|
508
|
+
}
|
|
509
|
+
return xynthesisModel;
|
|
510
|
+
}
|
|
511
|
+
if (typeof skillModel === 'string' && skillModel.length > 0)
|
|
512
|
+
return skillModel;
|
|
513
|
+
return undefined;
|
|
514
|
+
}
|
|
515
|
+
function extractModelProfile(overrides) {
|
|
516
|
+
if (!overrides?.modelConfig)
|
|
517
|
+
return undefined;
|
|
518
|
+
const mc = overrides.modelConfig;
|
|
519
|
+
if (isModelConfigSelection(mc)) {
|
|
520
|
+
const selected = mc.cases.find((c) => isEmptyConditionWhen(c.when)) ?? mc.cases[0];
|
|
521
|
+
if (!selected?.modelConfig)
|
|
522
|
+
return undefined;
|
|
523
|
+
return profileFromGraphAiModelConfig(selected.modelConfig);
|
|
524
|
+
}
|
|
525
|
+
return profileFromGraphAiModelConfig(mc);
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Claim the next eligible row for `graphId`, run the graph, persist completion or failure.
|
|
529
|
+
*/
|
|
530
|
+
export async function processNextMatrixClaim(deps, claimOpts) {
|
|
531
|
+
if (claimOpts.debugMode && !claimOpts.jobId) {
|
|
532
|
+
throw new Error('processNextMatrixClaim: debugMode requires jobId (runtime mode)');
|
|
533
|
+
}
|
|
534
|
+
await assertGraphSchedulableForClaim(deps, claimOpts.graphId);
|
|
535
|
+
if (!(await resolveShouldClaimNext(deps))) {
|
|
536
|
+
return { ok: false, reason: 'claim_paused' };
|
|
537
|
+
}
|
|
538
|
+
const claim = await deps.runtime.claimNext({
|
|
539
|
+
...claimOpts,
|
|
540
|
+
extraFilter: mergeClaimExtraFilter(claimOpts.extraFilter, deps.runtimeScope),
|
|
541
|
+
});
|
|
542
|
+
if (!claim.ok)
|
|
543
|
+
return claim;
|
|
544
|
+
return executeMatrixGraphForClaim(deps, claim, {
|
|
545
|
+
jobId: claimOpts.jobId,
|
|
546
|
+
debugMode: claimOpts.debugMode,
|
|
547
|
+
executeOverrides: claimOpts.executeOverrides,
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Claim a specific row for `graphId`, run the graph, persist completion or failure.
|
|
552
|
+
*/
|
|
553
|
+
export async function processMatrixClaimForRow(deps, claimOpts) {
|
|
554
|
+
if (claimOpts.debugMode && !claimOpts.jobId) {
|
|
555
|
+
throw new Error('processMatrixClaimForRow: debugMode requires jobId (runtime mode)');
|
|
556
|
+
}
|
|
557
|
+
await assertGraphSchedulableForClaim(deps, claimOpts.graphId);
|
|
558
|
+
if (!(await resolveShouldClaimNext(deps))) {
|
|
559
|
+
return { ok: false, reason: 'claim_paused' };
|
|
560
|
+
}
|
|
561
|
+
const claim = await deps.runtime.claimRecord({
|
|
562
|
+
...claimOpts,
|
|
563
|
+
extraFilter: mergeClaimExtraFilter(claimOpts.extraFilter, deps.runtimeScope),
|
|
564
|
+
});
|
|
565
|
+
if (!claim.ok)
|
|
566
|
+
return claim;
|
|
567
|
+
return executeMatrixGraphForClaim(deps, claim, {
|
|
568
|
+
jobId: claimOpts.jobId,
|
|
569
|
+
debugMode: claimOpts.debugMode,
|
|
570
|
+
executeOverrides: claimOpts.executeOverrides,
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Execute up to `limit` graph runs (claim + execute). When `graphId` is set, only that graph is claimed;
|
|
575
|
+
* otherwise {@link claimNextAcrossGraphs} is used with `graphIds` (required in that mode).
|
|
576
|
+
*
|
|
577
|
+
* - **Execute next one**: `limit: 1`, omit `graphId`, pass `graphIds` in priority order.
|
|
578
|
+
* - **Execute specific graph**: set `graphId` (same as repeated {@link processNextMatrixClaim} up to `limit`).
|
|
579
|
+
* - **Execute all**: omit `limit` or set a high `maxIterations`.
|
|
580
|
+
*
|
|
581
|
+
* When {@link ProcessMatrixClaimDeps.shouldClaimNext} returns **`false`** at the start of an iteration,
|
|
582
|
+
* the loop exits without claiming; any **`executeGraph`** from the prior iteration has already completed.
|
|
583
|
+
*/
|
|
584
|
+
export async function processMatrixGraphBatch(deps, opts) {
|
|
585
|
+
if (opts.debugMode && !opts.jobId) {
|
|
586
|
+
throw new Error('processMatrixGraphBatch: debugMode requires jobId (runtime mode)');
|
|
587
|
+
}
|
|
588
|
+
if (opts.jobId && (opts.limit ?? Number.MAX_SAFE_INTEGER) !== 1) {
|
|
589
|
+
throw new Error('processMatrixGraphBatch: jobId is only supported when limit === 1 (single run)');
|
|
590
|
+
}
|
|
591
|
+
const maxIterations = opts.maxIterations ?? 10_000;
|
|
592
|
+
const targetCount = opts.limit ?? Number.MAX_SAFE_INTEGER;
|
|
593
|
+
const out = [];
|
|
594
|
+
let iterations = 0;
|
|
595
|
+
const batchExtra = mergeClaimExtraFilter(opts.extraFilter, deps.runtimeScope);
|
|
596
|
+
const schedGate = deps.resolveGraphSchedulability !== undefined;
|
|
597
|
+
while (iterations < maxIterations && out.length < targetCount) {
|
|
598
|
+
iterations += 1;
|
|
599
|
+
if (!(await resolveShouldClaimNext(deps))) {
|
|
600
|
+
break;
|
|
601
|
+
}
|
|
602
|
+
let claim;
|
|
603
|
+
if (opts.graphId) {
|
|
604
|
+
if (schedGate) {
|
|
605
|
+
const proceed = await isGraphSchedulableForClaim(deps, opts.graphId);
|
|
606
|
+
if (!proceed)
|
|
607
|
+
break;
|
|
608
|
+
}
|
|
609
|
+
claim = await deps.runtime.claimNext({
|
|
610
|
+
matrixCatalogId: opts.matrixCatalogId,
|
|
611
|
+
matrixRunId: opts.matrixRunId,
|
|
612
|
+
graphId: opts.graphId,
|
|
613
|
+
fromStatuses: opts.fromStatuses,
|
|
614
|
+
workerId: opts.workerId,
|
|
615
|
+
extraFilter: batchExtra,
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
else {
|
|
619
|
+
const graphIds = opts.graphIds;
|
|
620
|
+
if (!graphIds?.length) {
|
|
621
|
+
throw new Error('processMatrixGraphBatch: graphIds is required when graphId is omitted');
|
|
622
|
+
}
|
|
623
|
+
claim = await claimNextAcrossGraphs(deps.runtime, {
|
|
624
|
+
matrixCatalogId: opts.matrixCatalogId,
|
|
625
|
+
matrixRunId: opts.matrixRunId,
|
|
626
|
+
graphIds,
|
|
627
|
+
fromStatuses: opts.fromStatuses,
|
|
628
|
+
workerId: opts.workerId,
|
|
629
|
+
extraFilter: opts.extraFilter,
|
|
630
|
+
...(schedGate
|
|
631
|
+
? {
|
|
632
|
+
beforeClaimGraph: (gid) => isGraphSchedulableForClaim(deps, gid),
|
|
633
|
+
}
|
|
634
|
+
: {}),
|
|
635
|
+
}, deps.runtimeScope);
|
|
636
|
+
}
|
|
637
|
+
if (!claim.ok)
|
|
638
|
+
break;
|
|
639
|
+
const ran = await executeMatrixGraphForClaim(deps, claim, {
|
|
640
|
+
jobId: opts.jobId,
|
|
641
|
+
debugMode: opts.debugMode,
|
|
642
|
+
executeOverrides: opts.executeOverrides,
|
|
643
|
+
});
|
|
644
|
+
out.push(ran);
|
|
645
|
+
}
|
|
646
|
+
return out;
|
|
647
|
+
}
|
|
648
|
+
/** Convenience: run at most one eligible graph across `graphIds` (execute-next-one). */
|
|
649
|
+
export async function processNextMatrixGraphExecution(deps, opts) {
|
|
650
|
+
return processMatrixGraphBatch(deps, { ...opts, limit: 1 });
|
|
651
|
+
}
|
|
652
|
+
/** Convenience: run until no eligible claims remain (execute-all). */
|
|
653
|
+
export async function processAllMatrixGraphExecutions(deps, opts) {
|
|
654
|
+
return processMatrixGraphBatch(deps, { ...opts });
|
|
655
|
+
}
|
|
656
|
+
//# sourceMappingURL=orchestrator.js.map
|