@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,350 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Continuous run-mode loop and single-pass on-demand driver.
|
|
3
|
+
*
|
|
4
|
+
* Both share one cycle: fetch -> materialize -> claim/execute. The continuous variant sleeps
|
|
5
|
+
* `dataSource.pollWhenEmptySeconds` (resolved per kind) when a cycle produces no work and an
|
|
6
|
+
* `AbortSignal` is open; the single-pass variant runs exactly one cycle and returns.
|
|
7
|
+
*
|
|
8
|
+
* Event/API trigger flows continue to use the existing `executeGraph` / `processNextMatrixClaim`
|
|
9
|
+
* APIs and are not driven by this loop. See {@link ./execution-mode.ts} `shouldLoopDriveMatrix`.
|
|
10
|
+
*/
|
|
11
|
+
import { RUNTIME_ROW_INPUT_SOURCE_ID_KEY, RUNTIME_ROW_INPUT_SOURCE_IDS_KEY, } from './contracts.js';
|
|
12
|
+
import { resolvePollWhenEmptySeconds } from './data-source.js';
|
|
13
|
+
import { buildEffectiveMatrixConfig, shouldLoopDriveMatrix } from './execution-mode.js';
|
|
14
|
+
import { materializeBatchedRecordRows, materializeExecutionMatrixRuntimeRows, materializeFromSnapshot, } from './materializer.js';
|
|
15
|
+
import { processAllMatrixGraphExecutions, } from './orchestrator.js';
|
|
16
|
+
import { buildSnapshotRecord, runSnapshotTransform, } from './snapshot-runner.js';
|
|
17
|
+
import { diffSourceIdsAgainstMatrix } from './source-resolver.js';
|
|
18
|
+
/* ----------------------------------------------------------------------------
|
|
19
|
+
* Single cycle
|
|
20
|
+
* --------------------------------------------------------------------------*/
|
|
21
|
+
/**
|
|
22
|
+
* Runs exactly one fetch-materialize-execute pass.
|
|
23
|
+
*
|
|
24
|
+
* Behavior per `dataSource.kind`:
|
|
25
|
+
* - `event`: cycle is a no-op unless `inputRows` were supplied; counts as `emptyPass`.
|
|
26
|
+
* - `storage`: same as `record` (uses the resolver).
|
|
27
|
+
* - `record`: pulls source ids → diffs vs already-materialized rows → fetches new records →
|
|
28
|
+
* bundles by `recordsPerRun` → materializes → runs `processAllMatrixGraphExecutions`.
|
|
29
|
+
* - `query-snapshot`: pulls records → runs the transform under `node:vm` → persists snapshot →
|
|
30
|
+
* materializes from snapshot → runs `processAllMatrixGraphExecutions`.
|
|
31
|
+
*/
|
|
32
|
+
export async function runMatrixCycle(deps, opts) {
|
|
33
|
+
const dsKind = opts.payload.dataSource?.kind ?? 'event';
|
|
34
|
+
let fetched = 0;
|
|
35
|
+
let materialized = 0;
|
|
36
|
+
let snapshotId;
|
|
37
|
+
let inserted = false;
|
|
38
|
+
if (opts.snapshot) {
|
|
39
|
+
const rows = materializeFromSnapshot({
|
|
40
|
+
matrixCatalogId: opts.matrixCatalogId,
|
|
41
|
+
matrixItemId: opts.matrixItemId,
|
|
42
|
+
...(opts.matrixRunId !== undefined ? { matrixRunId: opts.matrixRunId } : {}),
|
|
43
|
+
payload: opts.payload,
|
|
44
|
+
graphRecords: opts.graphRecords,
|
|
45
|
+
snapshot: opts.snapshot,
|
|
46
|
+
...(opts.payload.dataSource?.kind === 'query-snapshot' && opts.payload.dataSource.materialize
|
|
47
|
+
? { materialize: opts.payload.dataSource.materialize }
|
|
48
|
+
: {}),
|
|
49
|
+
});
|
|
50
|
+
materialized += await insertRows(deps.runtime, rows);
|
|
51
|
+
snapshotId = opts.snapshot.snapshotId;
|
|
52
|
+
inserted = rows.length > 0;
|
|
53
|
+
}
|
|
54
|
+
else if (opts.inputRows && opts.inputRows.length > 0) {
|
|
55
|
+
const rows = await materializeForKind(opts, opts.inputRows);
|
|
56
|
+
materialized += await insertRows(deps.runtime, rows);
|
|
57
|
+
inserted = rows.length > 0;
|
|
58
|
+
fetched = opts.inputRows.length;
|
|
59
|
+
}
|
|
60
|
+
else if (dsKind === 'record' || dsKind === 'storage') {
|
|
61
|
+
const fetchedRecords = await fetchNewRecordsForKind(deps, opts);
|
|
62
|
+
fetched = fetchedRecords.length;
|
|
63
|
+
if (fetched > 0) {
|
|
64
|
+
const rows = await materializeForKind(opts, fetchedRecords);
|
|
65
|
+
materialized += await insertRows(deps.runtime, rows);
|
|
66
|
+
inserted = rows.length > 0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
else if (dsKind === 'query-snapshot') {
|
|
70
|
+
const result = await runQuerySnapshotCycle(deps, opts);
|
|
71
|
+
fetched = result.fetched;
|
|
72
|
+
snapshotId = result.snapshotId;
|
|
73
|
+
materialized += result.materialized;
|
|
74
|
+
inserted = result.materialized > 0;
|
|
75
|
+
}
|
|
76
|
+
// event kind with no inputRows -> nothing to do; just attempt to drain any existing
|
|
77
|
+
// claims (in case the host inserted rows out-of-band).
|
|
78
|
+
const outcomes = await processAllMatrixGraphExecutions(deps, {
|
|
79
|
+
matrixCatalogId: opts.matrixCatalogId,
|
|
80
|
+
...(opts.matrixRunId !== undefined ? { matrixRunId: opts.matrixRunId } : {}),
|
|
81
|
+
graphIds: opts.payload.graphs,
|
|
82
|
+
...(opts.executeOverrides ? { executeOverrides: opts.executeOverrides } : {}),
|
|
83
|
+
});
|
|
84
|
+
const executed = outcomes.filter((o) => 'jobId' in o).length;
|
|
85
|
+
const emptyPass = !inserted && executed === 0;
|
|
86
|
+
return {
|
|
87
|
+
fetched,
|
|
88
|
+
materialized,
|
|
89
|
+
executed,
|
|
90
|
+
emptyPass,
|
|
91
|
+
...(snapshotId ? { snapshotId } : {}),
|
|
92
|
+
outcomes,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
async function insertRows(runtime, rows) {
|
|
96
|
+
let count = 0;
|
|
97
|
+
for (const r of rows) {
|
|
98
|
+
await runtime.insertRuntimeRow(r);
|
|
99
|
+
count += 1;
|
|
100
|
+
}
|
|
101
|
+
return count;
|
|
102
|
+
}
|
|
103
|
+
async function materializeForKind(opts, inputRows) {
|
|
104
|
+
const ds = opts.payload.dataSource;
|
|
105
|
+
if (ds?.kind === 'record' && (ds.recordsPerRun ?? 1) > 1) {
|
|
106
|
+
return materializeBatchedRecordRows({
|
|
107
|
+
matrixCatalogId: opts.matrixCatalogId,
|
|
108
|
+
matrixItemId: opts.matrixItemId,
|
|
109
|
+
...(opts.matrixRunId !== undefined ? { matrixRunId: opts.matrixRunId } : {}),
|
|
110
|
+
payload: opts.payload,
|
|
111
|
+
graphRecords: opts.graphRecords,
|
|
112
|
+
inputRows,
|
|
113
|
+
recordsPerRun: ds.recordsPerRun,
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
return materializeExecutionMatrixRuntimeRows({
|
|
117
|
+
matrixCatalogId: opts.matrixCatalogId,
|
|
118
|
+
matrixItemId: opts.matrixItemId,
|
|
119
|
+
...(opts.matrixRunId !== undefined ? { matrixRunId: opts.matrixRunId } : {}),
|
|
120
|
+
payload: opts.payload,
|
|
121
|
+
graphRecords: opts.graphRecords,
|
|
122
|
+
inputRows,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
async function fetchNewRecordsForKind(deps, opts) {
|
|
126
|
+
if (!deps.sourceResolver)
|
|
127
|
+
return [];
|
|
128
|
+
const ds = opts.payload.dataSource;
|
|
129
|
+
if (!ds || (ds.kind !== 'record' && ds.kind !== 'storage'))
|
|
130
|
+
return [];
|
|
131
|
+
const selection = ds.selection;
|
|
132
|
+
const sourceIds = await deps.sourceResolver.listSourceIds(selection, deps.runtimeScope);
|
|
133
|
+
if (sourceIds.length === 0)
|
|
134
|
+
return [];
|
|
135
|
+
const known = await collectKnownSourceIds(deps.runtime, opts);
|
|
136
|
+
const fresh = diffSourceIdsAgainstMatrix(sourceIds, known);
|
|
137
|
+
if (fresh.length === 0)
|
|
138
|
+
return [];
|
|
139
|
+
return deps.sourceResolver.fetchRecordsByIds(fresh, deps.runtimeScope);
|
|
140
|
+
}
|
|
141
|
+
async function collectKnownSourceIds(runtime, opts) {
|
|
142
|
+
const rows = await runtime.listRecords({
|
|
143
|
+
matrixCatalogId: opts.matrixCatalogId,
|
|
144
|
+
...(opts.matrixRunId !== undefined ? { matrixRunId: opts.matrixRunId } : {}),
|
|
145
|
+
limit: 10_000,
|
|
146
|
+
});
|
|
147
|
+
const out = new Set();
|
|
148
|
+
for (const r of rows) {
|
|
149
|
+
const single = r.input[RUNTIME_ROW_INPUT_SOURCE_ID_KEY];
|
|
150
|
+
if (typeof single === 'string' && single.length > 0)
|
|
151
|
+
out.add(single);
|
|
152
|
+
const many = r.input[RUNTIME_ROW_INPUT_SOURCE_IDS_KEY];
|
|
153
|
+
if (Array.isArray(many)) {
|
|
154
|
+
for (const v of many)
|
|
155
|
+
if (typeof v === 'string' && v.length > 0)
|
|
156
|
+
out.add(v);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return [...out];
|
|
160
|
+
}
|
|
161
|
+
async function runQuerySnapshotCycle(deps, opts) {
|
|
162
|
+
if (!deps.sourceResolver)
|
|
163
|
+
return { fetched: 0, materialized: 0 };
|
|
164
|
+
const ds = opts.payload.dataSource;
|
|
165
|
+
if (!ds || ds.kind !== 'query-snapshot')
|
|
166
|
+
return { fetched: 0, materialized: 0 };
|
|
167
|
+
const selection = ds.selection;
|
|
168
|
+
const ids = await deps.sourceResolver.listSourceIds(selection, deps.runtimeScope);
|
|
169
|
+
if (ids.length === 0)
|
|
170
|
+
return { fetched: 0, materialized: 0 };
|
|
171
|
+
const records = await deps.sourceResolver.fetchRecordsByIds(ids, deps.runtimeScope);
|
|
172
|
+
if (records.length === 0)
|
|
173
|
+
return { fetched: 0, materialized: 0 };
|
|
174
|
+
const result = runSnapshotTransform(ds.transform, { records });
|
|
175
|
+
const snapshot = buildSnapshotRecord({
|
|
176
|
+
matrixCatalogId: opts.matrixCatalogId,
|
|
177
|
+
...(opts.matrixRunId !== undefined ? { matrixRunId: opts.matrixRunId } : {}),
|
|
178
|
+
...(selection !== undefined ? { selection } : {}),
|
|
179
|
+
sourceIds: ids,
|
|
180
|
+
transformResult: result,
|
|
181
|
+
});
|
|
182
|
+
await deps.runtime.insertSnapshot(snapshot);
|
|
183
|
+
const rows = materializeFromSnapshot({
|
|
184
|
+
matrixCatalogId: opts.matrixCatalogId,
|
|
185
|
+
matrixItemId: opts.matrixItemId,
|
|
186
|
+
...(opts.matrixRunId !== undefined ? { matrixRunId: opts.matrixRunId } : {}),
|
|
187
|
+
payload: opts.payload,
|
|
188
|
+
graphRecords: opts.graphRecords,
|
|
189
|
+
snapshot,
|
|
190
|
+
...(ds.materialize ? { materialize: ds.materialize } : {}),
|
|
191
|
+
});
|
|
192
|
+
const inserted = await insertRows(deps.runtime, rows);
|
|
193
|
+
return { fetched: records.length, materialized: inserted, snapshotId: snapshot.snapshotId };
|
|
194
|
+
}
|
|
195
|
+
/* ----------------------------------------------------------------------------
|
|
196
|
+
* Single-pass on-demand
|
|
197
|
+
* --------------------------------------------------------------------------*/
|
|
198
|
+
/**
|
|
199
|
+
* Run exactly one cycle and return. Equivalent to `runMatrixCycle` plus a tagged shape
|
|
200
|
+
* useful for tests / API responses.
|
|
201
|
+
*/
|
|
202
|
+
export async function runMatrixOncePass(deps, opts) {
|
|
203
|
+
return runMatrixCycle(deps, opts);
|
|
204
|
+
}
|
|
205
|
+
/* ----------------------------------------------------------------------------
|
|
206
|
+
* Continuous run-mode
|
|
207
|
+
* --------------------------------------------------------------------------*/
|
|
208
|
+
/**
|
|
209
|
+
* Loop until aborted. Sleeps `pollWhenEmptySeconds` (resolved per data source kind, or the override)
|
|
210
|
+
* after empty cycles. Returns immediately when the matrix's data source kind is `event` (the loop
|
|
211
|
+
* cannot drive event-driven matrices — host calls execute paths directly on incoming events).
|
|
212
|
+
*/
|
|
213
|
+
export async function runMatrixContinuously(deps, opts) {
|
|
214
|
+
if (!shouldLoopDriveMatrix(opts.payload)) {
|
|
215
|
+
return { cyclesRun: 0, reason: 'event-source' };
|
|
216
|
+
}
|
|
217
|
+
const sleepSeconds = opts.pollWhenEmptySecondsOverride ?? resolvePollWhenEmptySeconds(opts.payload.dataSource);
|
|
218
|
+
const maxCycles = opts.maxCycles ?? Number.POSITIVE_INFINITY;
|
|
219
|
+
let cyclesRun = 0;
|
|
220
|
+
while (!opts.signal.aborted) {
|
|
221
|
+
if (cyclesRun >= maxCycles) {
|
|
222
|
+
return { cyclesRun, reason: 'maxCycles' };
|
|
223
|
+
}
|
|
224
|
+
const cycle = await runMatrixCycle(deps, opts);
|
|
225
|
+
cyclesRun += 1;
|
|
226
|
+
if (opts.signal.aborted)
|
|
227
|
+
break;
|
|
228
|
+
if (cycle.emptyPass && sleepSeconds > 0) {
|
|
229
|
+
await sleepWithAbort(sleepSeconds * 1000, opts.signal);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
return { cyclesRun, reason: 'aborted' };
|
|
233
|
+
}
|
|
234
|
+
/** Promise sleep that resolves early when `signal` aborts. */
|
|
235
|
+
export function sleepWithAbort(ms, signal) {
|
|
236
|
+
if (signal.aborted)
|
|
237
|
+
return Promise.resolve();
|
|
238
|
+
return new Promise((resolve) => {
|
|
239
|
+
const timer = setTimeout(() => {
|
|
240
|
+
signal.removeEventListener('abort', onAbort);
|
|
241
|
+
resolve();
|
|
242
|
+
}, ms);
|
|
243
|
+
const onAbort = () => {
|
|
244
|
+
clearTimeout(timer);
|
|
245
|
+
signal.removeEventListener('abort', onAbort);
|
|
246
|
+
resolve();
|
|
247
|
+
};
|
|
248
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Resolve the merged effective configuration plus referenced graph records from the configuration
|
|
253
|
+
* store. Throws when the matrix is missing or any referenced graph id is missing from the
|
|
254
|
+
* graph configuration collection.
|
|
255
|
+
*/
|
|
256
|
+
export async function resolveMatrixExecutionConfig(configStore, matrixCatalogId) {
|
|
257
|
+
const effective = await configStore.matrices.getEffectiveConfig(matrixCatalogId);
|
|
258
|
+
if (!effective) {
|
|
259
|
+
throw new Error(`resolveMatrixExecutionConfig: matrix '${matrixCatalogId}' not found`);
|
|
260
|
+
}
|
|
261
|
+
const graphRecords = [];
|
|
262
|
+
for (const graphId of effective.payload.graphs) {
|
|
263
|
+
const gc = await configStore.graphs.get(graphId);
|
|
264
|
+
if (!gc) {
|
|
265
|
+
throw new Error(`resolveMatrixExecutionConfig: graph '${graphId}' referenced by matrix '${matrixCatalogId}' is missing`);
|
|
266
|
+
}
|
|
267
|
+
graphRecords.push(gc.payload);
|
|
268
|
+
}
|
|
269
|
+
return { effective, graphRecords };
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Config-driven single-pass entry point. Resolves the matrix and its graphs from
|
|
273
|
+
* {@link ExellixConfigStore} on every call, then invokes {@link runMatrixCycle}.
|
|
274
|
+
*
|
|
275
|
+
* Use the inline `runMatrixOncePass(deps, opts)` form when you already have payload + graphRecords
|
|
276
|
+
* in hand (event/API path); use this form when the host stores configuration centrally.
|
|
277
|
+
*/
|
|
278
|
+
export async function runMatrixOncePassByCatalogId(deps, opts) {
|
|
279
|
+
const { effective, graphRecords } = await resolveMatrixExecutionConfig(deps.configStore, opts.matrixCatalogId);
|
|
280
|
+
const cycleOpts = {
|
|
281
|
+
matrixCatalogId: opts.matrixCatalogId,
|
|
282
|
+
matrixItemId: opts.matrixItemId,
|
|
283
|
+
...(opts.matrixRunId !== undefined ? { matrixRunId: opts.matrixRunId } : {}),
|
|
284
|
+
payload: effective.payload,
|
|
285
|
+
graphRecords,
|
|
286
|
+
...(opts.inputRows ? { inputRows: opts.inputRows } : {}),
|
|
287
|
+
...(opts.snapshot ? { snapshot: opts.snapshot } : {}),
|
|
288
|
+
...(opts.jobId !== undefined ? { jobId: opts.jobId } : {}),
|
|
289
|
+
...(opts.debugMode !== undefined ? { debugMode: opts.debugMode } : {}),
|
|
290
|
+
...(opts.executeOverrides ? { executeOverrides: opts.executeOverrides } : {}),
|
|
291
|
+
};
|
|
292
|
+
const result = await runMatrixCycle(deps, cycleOpts);
|
|
293
|
+
return { ...result, effective };
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Config-driven continuous loop. Re-reads the configuration at the start of each cycle by
|
|
297
|
+
* default so config edits are picked up without restarting the loop. Pass
|
|
298
|
+
* `refreshConfigPerCycle: false` to lock in the configuration at startup.
|
|
299
|
+
*/
|
|
300
|
+
export async function runMatrixContinuouslyByCatalogId(deps, opts) {
|
|
301
|
+
const refresh = opts.refreshConfigPerCycle ?? true;
|
|
302
|
+
let { effective, graphRecords } = await resolveMatrixExecutionConfig(deps.configStore, opts.matrixCatalogId);
|
|
303
|
+
if (!shouldLoopDriveMatrix(effective.payload)) {
|
|
304
|
+
return { cyclesRun: 0, reason: 'event-source' };
|
|
305
|
+
}
|
|
306
|
+
const maxCycles = opts.maxCycles ?? Number.POSITIVE_INFINITY;
|
|
307
|
+
let cyclesRun = 0;
|
|
308
|
+
while (!opts.signal.aborted) {
|
|
309
|
+
if (cyclesRun >= maxCycles) {
|
|
310
|
+
return { cyclesRun, reason: 'maxCycles' };
|
|
311
|
+
}
|
|
312
|
+
if (refresh && cyclesRun > 0) {
|
|
313
|
+
({ effective, graphRecords } = await resolveMatrixExecutionConfig(deps.configStore, opts.matrixCatalogId));
|
|
314
|
+
if (!shouldLoopDriveMatrix(effective.payload)) {
|
|
315
|
+
return { cyclesRun, reason: 'event-source' };
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
const cycleOpts = {
|
|
319
|
+
matrixCatalogId: opts.matrixCatalogId,
|
|
320
|
+
matrixItemId: opts.matrixItemId,
|
|
321
|
+
...(opts.matrixRunId !== undefined ? { matrixRunId: opts.matrixRunId } : {}),
|
|
322
|
+
payload: effective.payload,
|
|
323
|
+
graphRecords,
|
|
324
|
+
...(opts.inputRows ? { inputRows: opts.inputRows } : {}),
|
|
325
|
+
...(opts.snapshot ? { snapshot: opts.snapshot } : {}),
|
|
326
|
+
...(opts.jobId !== undefined ? { jobId: opts.jobId } : {}),
|
|
327
|
+
...(opts.debugMode !== undefined ? { debugMode: opts.debugMode } : {}),
|
|
328
|
+
...(opts.executeOverrides ? { executeOverrides: opts.executeOverrides } : {}),
|
|
329
|
+
};
|
|
330
|
+
const cycle = await runMatrixCycle(deps, cycleOpts);
|
|
331
|
+
cyclesRun += 1;
|
|
332
|
+
if (opts.signal.aborted)
|
|
333
|
+
break;
|
|
334
|
+
if (cycle.emptyPass) {
|
|
335
|
+
const sleepSeconds = opts.pollWhenEmptySecondsOverride ?? resolvePollWhenEmptySeconds(effective.payload.dataSource);
|
|
336
|
+
if (sleepSeconds > 0) {
|
|
337
|
+
await sleepWithAbort(sleepSeconds * 1000, opts.signal);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return { cyclesRun, reason: 'aborted' };
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Convenience: build an effective config in-process from an inline payload (useful for tests
|
|
345
|
+
* and BFF code paths that don't go through the config store).
|
|
346
|
+
*/
|
|
347
|
+
export function buildEffectiveConfigInline(matrixCatalogId, payload) {
|
|
348
|
+
return buildEffectiveMatrixConfig(matrixCatalogId, payload);
|
|
349
|
+
}
|
|
350
|
+
//# sourceMappingURL=run-loop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-loop.js","sourceRoot":"","sources":["../../src/execution-matrix/run-loop.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,+BAA+B,EAC/B,gCAAgC,GAOjC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACxF,OAAO,EACL,4BAA4B,EAC5B,qCAAqC,EACrC,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,+BAA+B,GAGhC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,oBAAoB,GAErB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,0BAA0B,EAA6B,MAAM,sBAAsB,CAAC;AA6D7F;;+EAE+E;AAE/E;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,IAAwB,EACxB,IAA2B;IAE3B,MAAM,MAAM,GAAmB,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,IAAI,OAAO,C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 -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Operations / Studio: connectivity and identity payload for **`runtime-real`** style hosts.
|
|
3
|
+
* HTTP routes live in the product BFF; this module returns JSON-safe structures to serialize from
|
|
4
|
+
* `GET /api/runtime-real/health` (or `?probe=dependencies` on an existing status route).
|
|
5
|
+
*
|
|
6
|
+
* @see docs/execution-matrix-runtime.md — “Runtime-real health”
|
|
7
|
+
*/
|
|
8
|
+
import type { XronoxStore } from '@x12i/xronox-store';
|
|
9
|
+
/** Suggested Studio / BFF path (Graphs Studio `vite-plugin-runtime-real-api` convention). */
|
|
10
|
+
export declare const EXELLIX_RUNTIME_REAL_HEALTH_PATH: "/api/runtime-real/health";
|
|
11
|
+
export type ExellixRuntimeHealthLaneBase = {
|
|
12
|
+
ok: boolean;
|
|
13
|
+
reason?: string;
|
|
14
|
+
};
|
|
15
|
+
export type ExellixRuntimeHealthExecutionMongoLane = ExellixRuntimeHealthLaneBase & {
|
|
16
|
+
collection?: string;
|
|
17
|
+
/** Redacted URI fingerprint when {@link ExellixRuntimeConnectivityProbeOptions.executionMongoUri} was set. */
|
|
18
|
+
connectionFingerprint?: string;
|
|
19
|
+
readProbeMs?: number;
|
|
20
|
+
connected?: boolean;
|
|
21
|
+
/** Whether {@link XronoxStore} was constructed with **`mongoDriverCount`** (enables **`countMatching`**). */
|
|
22
|
+
mongoDriverCount?: 'available' | 'unavailable' | 'skipped';
|
|
23
|
+
};
|
|
24
|
+
export type ExellixRuntimeHealthConfigMongoLane = ExellixRuntimeHealthLaneBase & {
|
|
25
|
+
collection?: string;
|
|
26
|
+
connectionFingerprint?: string;
|
|
27
|
+
readProbeMs?: number;
|
|
28
|
+
connected?: boolean;
|
|
29
|
+
mongoDriverCount?: 'available' | 'unavailable' | 'skipped';
|
|
30
|
+
};
|
|
31
|
+
export type ExellixRuntimeHealthXmemoryLane = ExellixRuntimeHealthLaneBase & {
|
|
32
|
+
connectionFingerprint?: string;
|
|
33
|
+
mapsDb?: string;
|
|
34
|
+
opDb?: string;
|
|
35
|
+
thingsDb?: string;
|
|
36
|
+
};
|
|
37
|
+
export type ExellixRuntimeHealthSchedulerLane = ExellixRuntimeHealthLaneBase & {
|
|
38
|
+
mode: 'skipped' | 'activix-mongo';
|
|
39
|
+
/** When **`mode`** is **`activix-mongo`**: result of **`testActivixMongoConnection`**. */
|
|
40
|
+
mongoPingOk?: boolean;
|
|
41
|
+
/** Activities collection inspected (matrix-owned default unless overridden in env). */
|
|
42
|
+
collection?: string;
|
|
43
|
+
visibleActivityCount?: number;
|
|
44
|
+
/** Latest activity **`startTime`** from persistence snapshot (ISO string when present). */
|
|
45
|
+
lastActivityStartTime?: string;
|
|
46
|
+
/** Host-supplied worker id (e.g. **`MATRIX_WORKER_ID`**) — optional. */
|
|
47
|
+
workerIdentity?: string;
|
|
48
|
+
};
|
|
49
|
+
export type ExellixRuntimeHealthLanes = {
|
|
50
|
+
/** Process / API tier is up (always true when this function returns). */
|
|
51
|
+
runtime: ExellixRuntimeHealthLaneBase & {
|
|
52
|
+
uptimeSec?: number;
|
|
53
|
+
};
|
|
54
|
+
executionMongo?: ExellixRuntimeHealthExecutionMongoLane;
|
|
55
|
+
configMongo?: ExellixRuntimeHealthConfigMongoLane;
|
|
56
|
+
xmemory?: ExellixRuntimeHealthXmemoryLane;
|
|
57
|
+
scheduler?: ExellixRuntimeHealthSchedulerLane;
|
|
58
|
+
};
|
|
59
|
+
export type ExellixRuntimeHealthPackages = {
|
|
60
|
+
'@exellix/exellix-runtime': string;
|
|
61
|
+
'@exellix/graph-engine'?: string;
|
|
62
|
+
} & Record<`@x12i/${string}`, string | undefined>;
|
|
63
|
+
export type ExellixRuntimeHealthPayload = {
|
|
64
|
+
/**
|
|
65
|
+
* Overall readiness for “matrix execution infrastructure” probes requested in this call.
|
|
66
|
+
* When only liveness fields are implied (no store probes), this stays **`true`**.
|
|
67
|
+
*/
|
|
68
|
+
ok: boolean;
|
|
69
|
+
timestamp: string;
|
|
70
|
+
buildId: string;
|
|
71
|
+
packages: ExellixRuntimeHealthPackages;
|
|
72
|
+
lanes: ExellixRuntimeHealthLanes;
|
|
73
|
+
};
|
|
74
|
+
export type ExellixRuntimeConnectivityProbeOptions = {
|
|
75
|
+
/**
|
|
76
|
+
* Build / deploy identity. Falls back to **`EXELLIX_RUNTIME_BUILD_ID`**, **`GIT_SHA`**, then
|
|
77
|
+
* **`@exellix/exellix-runtime`** package version from **`package.json`**.
|
|
78
|
+
*/
|
|
79
|
+
buildId?: string;
|
|
80
|
+
/** Operational matrix **`XronoxStore`** ( **`exellix-runtime`** DB by convention). */
|
|
81
|
+
executionStore?: XronoxStore;
|
|
82
|
+
/**
|
|
83
|
+
* Used for **`connectionFingerprint`** on the execution lane only (never send raw URIs to clients).
|
|
84
|
+
*/
|
|
85
|
+
executionMongoUri?: string;
|
|
86
|
+
/** Defaults to matrix rows collection from {@link executionMatrixRowsCollectionDef}. */
|
|
87
|
+
executionPingCollection?: string;
|
|
88
|
+
/** Separate config DB store when the host splits operational vs config Mongo. */
|
|
89
|
+
configStore?: XronoxStore;
|
|
90
|
+
configMongoUri?: string;
|
|
91
|
+
/** Defaults to **`exellix_matrix_configs`** collection name from factory wiring. */
|
|
92
|
+
configPingCollection?: string;
|
|
93
|
+
/** When true, resolves **`resolveXmemoryStoreEnv`** and reports redacted **`mongoUri`** + DB names (no cluster I/O beyond env parse). */
|
|
94
|
+
includeXmemoryEnv?: boolean;
|
|
95
|
+
/**
|
|
96
|
+
* When true, runs Activix Mongo ping + a small read-only activity snapshot on the matrix-owned collection.
|
|
97
|
+
* Failures set **`lanes.scheduler.ok`** to false but do **not** flip top-level **`ok`** unless **`schedulerLaneCritical`** is true.
|
|
98
|
+
*/
|
|
99
|
+
includeActivixSchedulerProbe?: boolean;
|
|
100
|
+
/** When true, a failed Activix / scheduler lane also sets **`ok: false`**. Default false. */
|
|
101
|
+
schedulerLaneCritical?: boolean;
|
|
102
|
+
activixActivitiesCollection?: string;
|
|
103
|
+
workerIdentity?: string;
|
|
104
|
+
};
|
|
105
|
+
/**
|
|
106
|
+
* Strip credentials from a Mongo URI for operator dashboards (**host + path + protocol only**).
|
|
107
|
+
*/
|
|
108
|
+
export declare function redactMongoUriForDiagnostics(raw: string): string;
|
|
109
|
+
/**
|
|
110
|
+
* Package versions from this repo’s **`package.json`** (what support correlates with the published tarball / lockfile).
|
|
111
|
+
*/
|
|
112
|
+
export declare function readExellixRuntimeHealthPackageVersions(): ExellixRuntimeHealthPackages;
|
|
113
|
+
/**
|
|
114
|
+
* Full connectivity probe for BFF **`/api/runtime-real/health`** (or **`?probe=dependencies`**).
|
|
115
|
+
*
|
|
116
|
+
* - With **no** stores passed: **`ok: true`**, **`lanes.runtime`**, **`packages`**, **`buildId`** — no graph / Catalox required.
|
|
117
|
+
* - With **`executionStore`**: top-level **`ok`** follows execution Mongo read probe (matrix persistence lane).
|
|
118
|
+
*/
|
|
119
|
+
export declare function runExellixRuntimeConnectivityProbe(options?: ExellixRuntimeConnectivityProbeOptions): Promise<ExellixRuntimeHealthPayload>;
|
|
120
|
+
/**
|
|
121
|
+
* Minimal process liveness JSON (**no Mongo I/O**) — safe for the lightest **`GET …/health`** handler.
|
|
122
|
+
*/
|
|
123
|
+
export declare function buildExellixRuntimeRealLivenessPayload(options?: {
|
|
124
|
+
buildId?: string;
|
|
125
|
+
}): Pick<ExellixRuntimeHealthPayload, 'ok' | 'timestamp' | 'buildId' | 'packages'> & {
|
|
126
|
+
lanes: Pick<ExellixRuntimeHealthLanes, 'runtime'>;
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=runtime-connectivity-health.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-connectivity-health.d.ts","sourceRoot":"","sources":["../../src/execution-matrix/runtime-connectivity-health.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAoB,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAQxE,6FAA6F;AA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