@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,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discriminated `DataSource` helpers: type guards and per-kind parsers used by the catalog loader,
|
|
3
|
+
* the configuration store, and the run-mode loop.
|
|
4
|
+
*
|
|
5
|
+
* The shapes themselves live in {@link ./contracts.ts} so they can be exported alongside the rest
|
|
6
|
+
* of the public surface.
|
|
7
|
+
*/
|
|
8
|
+
import { type DataSource, type EligibilityPolicy, type SnapshotTransform } from './contracts.js';
|
|
9
|
+
export declare function isDataSource(v: unknown): v is DataSource;
|
|
10
|
+
export declare function isEventDataSource(v: unknown): v is Extract<DataSource, {
|
|
11
|
+
kind: 'event';
|
|
12
|
+
}>;
|
|
13
|
+
export declare function isStorageDataSource(v: unknown): v is Extract<DataSource, {
|
|
14
|
+
kind: 'storage';
|
|
15
|
+
}>;
|
|
16
|
+
export declare function isRecordDataSource(v: unknown): v is Extract<DataSource, {
|
|
17
|
+
kind: 'record';
|
|
18
|
+
}>;
|
|
19
|
+
export declare function isQuerySnapshotDataSource(v: unknown): v is Extract<DataSource, {
|
|
20
|
+
kind: 'query-snapshot';
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Resolve the effective empty-poll interval (seconds) for a data source.
|
|
24
|
+
*
|
|
25
|
+
* - `record` → {@link DEFAULT_RECORD_POLL_SECONDS} (60)
|
|
26
|
+
* - `query-snapshot` → {@link DEFAULT_QUERY_SNAPSHOT_POLL_SECONDS} (3600)
|
|
27
|
+
* - `storage` → {@link DEFAULT_STORAGE_POLL_SECONDS} (60)
|
|
28
|
+
* - `event` → 0 (the loop never polls; host drives via API)
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolvePollWhenEmptySeconds(dataSource: DataSource | undefined): number;
|
|
31
|
+
export type DataSourceValidationResult = {
|
|
32
|
+
dataSource: DataSource;
|
|
33
|
+
warnings: string[];
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Validate and normalize a `dataSource` block. Throws when the shape is invalid.
|
|
37
|
+
* Returns `{ dataSource, warnings }` so the caller (catalog parser / config store) can
|
|
38
|
+
* surface advisory issues without rejecting the configuration.
|
|
39
|
+
*/
|
|
40
|
+
export declare function parseDataSource(raw: unknown, issues: string[]): DataSourceValidationResult;
|
|
41
|
+
export declare function parseSnapshotTransform(raw: unknown, issues: string[]): SnapshotTransform;
|
|
42
|
+
export declare function parseEligibility(raw: unknown, issues: string[]): EligibilityPolicy;
|
|
43
|
+
//# sourceMappingURL=data-source.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-source.d.ts","sourceRoot":"","sources":["../../src/execution-matrix/data-source.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAOL,KAAK,UAAU,EAEf,KAAK,iBAAiB,EAEtB,KAAK,iBAAiB,EACvB,MAAM,gBAAgB,CAAC;AAqBxB,wBAAgB,YAAY,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,UAAU,CAGxD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,CAEzF;AAED,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC,CAE7F;AAED,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,CAAC,CAE3F;AAED,wBAAgB,yBAAyB,CACvC,CAAC,EAAE,OAAO,GACT,CAAC,IAAI,OAAO,CAAC,UAAU,EAAE;IAAE,IAAI,EAAE,gBAAgB,CAAA;CAAE,CAAC,CAEtD;AAMD;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,GAAG,MAAM,CAYtF;AAMD,MAAM,MAAM,0BAA0B,GAAG;IACvC,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,0BAA0B,CAqH1F;AA0BD,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,CAsCxF;AAED,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,CAkClF"}
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discriminated `DataSource` helpers: type guards and per-kind parsers used by the catalog loader,
|
|
3
|
+
* the configuration store, and the run-mode loop.
|
|
4
|
+
*
|
|
5
|
+
* The shapes themselves live in {@link ./contracts.ts} so they can be exported alongside the rest
|
|
6
|
+
* of the public surface.
|
|
7
|
+
*/
|
|
8
|
+
import { DEFAULT_QUERY_SNAPSHOT_POLL_SECONDS, DEFAULT_RECORD_POLL_SECONDS, DEFAULT_STORAGE_POLL_SECONDS, EXECUTION_MATRIX_STATUSES, MAX_RECORDS_PER_RUN, SNAPSHOT_TRANSFORM_TIMEOUT_HARD_CAP_MS, } from './contracts.js';
|
|
9
|
+
const DATA_SOURCE_KINDS = [
|
|
10
|
+
'event',
|
|
11
|
+
'storage',
|
|
12
|
+
'record',
|
|
13
|
+
'query-snapshot',
|
|
14
|
+
];
|
|
15
|
+
function isPlainObject(v) {
|
|
16
|
+
return v !== null && typeof v === 'object' && !Array.isArray(v);
|
|
17
|
+
}
|
|
18
|
+
function isPositiveInt(v) {
|
|
19
|
+
return typeof v === 'number' && Number.isFinite(v) && Number.isInteger(v) && v >= 1;
|
|
20
|
+
}
|
|
21
|
+
/* ----------------------------------------------------------------------------
|
|
22
|
+
* Type guards
|
|
23
|
+
* --------------------------------------------------------------------------*/
|
|
24
|
+
export function isDataSource(v) {
|
|
25
|
+
if (!isPlainObject(v))
|
|
26
|
+
return false;
|
|
27
|
+
return DATA_SOURCE_KINDS.includes(v.kind);
|
|
28
|
+
}
|
|
29
|
+
export function isEventDataSource(v) {
|
|
30
|
+
return isPlainObject(v) && v.kind === 'event';
|
|
31
|
+
}
|
|
32
|
+
export function isStorageDataSource(v) {
|
|
33
|
+
return isPlainObject(v) && v.kind === 'storage';
|
|
34
|
+
}
|
|
35
|
+
export function isRecordDataSource(v) {
|
|
36
|
+
return isPlainObject(v) && v.kind === 'record';
|
|
37
|
+
}
|
|
38
|
+
export function isQuerySnapshotDataSource(v) {
|
|
39
|
+
return isPlainObject(v) && v.kind === 'query-snapshot';
|
|
40
|
+
}
|
|
41
|
+
/* ----------------------------------------------------------------------------
|
|
42
|
+
* Defaults
|
|
43
|
+
* --------------------------------------------------------------------------*/
|
|
44
|
+
/**
|
|
45
|
+
* Resolve the effective empty-poll interval (seconds) for a data source.
|
|
46
|
+
*
|
|
47
|
+
* - `record` → {@link DEFAULT_RECORD_POLL_SECONDS} (60)
|
|
48
|
+
* - `query-snapshot` → {@link DEFAULT_QUERY_SNAPSHOT_POLL_SECONDS} (3600)
|
|
49
|
+
* - `storage` → {@link DEFAULT_STORAGE_POLL_SECONDS} (60)
|
|
50
|
+
* - `event` → 0 (the loop never polls; host drives via API)
|
|
51
|
+
*/
|
|
52
|
+
export function resolvePollWhenEmptySeconds(dataSource) {
|
|
53
|
+
if (!dataSource)
|
|
54
|
+
return DEFAULT_RECORD_POLL_SECONDS;
|
|
55
|
+
switch (dataSource.kind) {
|
|
56
|
+
case 'event':
|
|
57
|
+
return 0;
|
|
58
|
+
case 'storage':
|
|
59
|
+
return dataSource.pollWhenEmptySeconds ?? DEFAULT_STORAGE_POLL_SECONDS;
|
|
60
|
+
case 'record':
|
|
61
|
+
return dataSource.pollWhenEmptySeconds ?? DEFAULT_RECORD_POLL_SECONDS;
|
|
62
|
+
case 'query-snapshot':
|
|
63
|
+
return dataSource.pollWhenEmptySeconds ?? DEFAULT_QUERY_SNAPSHOT_POLL_SECONDS;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Validate and normalize a `dataSource` block. Throws when the shape is invalid.
|
|
68
|
+
* Returns `{ dataSource, warnings }` so the caller (catalog parser / config store) can
|
|
69
|
+
* surface advisory issues without rejecting the configuration.
|
|
70
|
+
*/
|
|
71
|
+
export function parseDataSource(raw, issues) {
|
|
72
|
+
const warnings = [];
|
|
73
|
+
if (!isPlainObject(raw)) {
|
|
74
|
+
issues.push('dataSource must be an object');
|
|
75
|
+
throw new Error('parseDataSource: invalid root');
|
|
76
|
+
}
|
|
77
|
+
const kind = raw.kind;
|
|
78
|
+
if (typeof kind !== 'string' || !DATA_SOURCE_KINDS.includes(kind)) {
|
|
79
|
+
issues.push(`dataSource.kind must be one of ${DATA_SOURCE_KINDS.join(', ')}`);
|
|
80
|
+
throw new Error('parseDataSource: invalid kind');
|
|
81
|
+
}
|
|
82
|
+
switch (kind) {
|
|
83
|
+
case 'event': {
|
|
84
|
+
const subKind = raw.subKind;
|
|
85
|
+
if (subKind !== undefined && !['api', 'on-demand', 'chat'].includes(String(subKind))) {
|
|
86
|
+
issues.push("dataSource.subKind must be one of 'api', 'on-demand', 'chat' when set");
|
|
87
|
+
throw new Error('parseDataSource: invalid subKind');
|
|
88
|
+
}
|
|
89
|
+
const correlationKey = raw.correlationKey;
|
|
90
|
+
if (correlationKey !== undefined && typeof correlationKey !== 'string') {
|
|
91
|
+
issues.push('dataSource.correlationKey must be a string when set');
|
|
92
|
+
throw new Error('parseDataSource: invalid correlationKey');
|
|
93
|
+
}
|
|
94
|
+
const ds = { kind: 'event' };
|
|
95
|
+
if (subKind !== undefined)
|
|
96
|
+
ds.subKind = subKind;
|
|
97
|
+
if (typeof correlationKey === 'string')
|
|
98
|
+
ds.correlationKey = correlationKey;
|
|
99
|
+
return { dataSource: ds, warnings };
|
|
100
|
+
}
|
|
101
|
+
case 'storage': {
|
|
102
|
+
const container = raw.container;
|
|
103
|
+
if (typeof container !== 'string' || !container.trim()) {
|
|
104
|
+
issues.push('dataSource.container must be a non-empty string');
|
|
105
|
+
throw new Error('parseDataSource: invalid container');
|
|
106
|
+
}
|
|
107
|
+
const path = raw.path;
|
|
108
|
+
if (path !== undefined && typeof path !== 'string') {
|
|
109
|
+
issues.push('dataSource.path must be a string when set');
|
|
110
|
+
throw new Error('parseDataSource: invalid path');
|
|
111
|
+
}
|
|
112
|
+
const selector = raw.selector;
|
|
113
|
+
if (selector !== undefined && !isPlainObject(selector)) {
|
|
114
|
+
issues.push('dataSource.selector must be an object when set');
|
|
115
|
+
throw new Error('parseDataSource: invalid selector');
|
|
116
|
+
}
|
|
117
|
+
const poll = parsePollWhenEmpty(raw.pollWhenEmptySeconds, issues, warnings, 'storage');
|
|
118
|
+
const eligibility = raw.eligibility !== undefined ? parseEligibility(raw.eligibility, issues) : undefined;
|
|
119
|
+
const ds = {
|
|
120
|
+
kind: 'storage',
|
|
121
|
+
container: container.trim(),
|
|
122
|
+
};
|
|
123
|
+
if (typeof path === 'string')
|
|
124
|
+
ds.path = path;
|
|
125
|
+
if (selector !== undefined)
|
|
126
|
+
ds.selector = selector;
|
|
127
|
+
if (poll !== undefined)
|
|
128
|
+
ds.pollWhenEmptySeconds = poll;
|
|
129
|
+
if (eligibility)
|
|
130
|
+
ds.eligibility = eligibility;
|
|
131
|
+
return { dataSource: ds, warnings };
|
|
132
|
+
}
|
|
133
|
+
case 'record': {
|
|
134
|
+
const collectionRef = raw.collectionRef;
|
|
135
|
+
if (typeof collectionRef !== 'string' || !collectionRef.trim()) {
|
|
136
|
+
issues.push('dataSource.collectionRef must be a non-empty string');
|
|
137
|
+
throw new Error('parseDataSource: invalid collectionRef');
|
|
138
|
+
}
|
|
139
|
+
const selection = raw.selection;
|
|
140
|
+
if (selection !== undefined && !isPlainObject(selection)) {
|
|
141
|
+
issues.push('dataSource.selection must be an object when set');
|
|
142
|
+
throw new Error('parseDataSource: invalid selection');
|
|
143
|
+
}
|
|
144
|
+
const recordsPerRun = raw.recordsPerRun;
|
|
145
|
+
if (recordsPerRun !== undefined) {
|
|
146
|
+
if (!isPositiveInt(recordsPerRun) || recordsPerRun > MAX_RECORDS_PER_RUN) {
|
|
147
|
+
issues.push(`dataSource.recordsPerRun must be an integer in [1..${MAX_RECORDS_PER_RUN}]`);
|
|
148
|
+
throw new Error('parseDataSource: invalid recordsPerRun');
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
const poll = parsePollWhenEmpty(raw.pollWhenEmptySeconds, issues, warnings, 'record');
|
|
152
|
+
const eligibility = raw.eligibility !== undefined ? parseEligibility(raw.eligibility, issues) : undefined;
|
|
153
|
+
const ds = {
|
|
154
|
+
kind: 'record',
|
|
155
|
+
collectionRef: collectionRef.trim(),
|
|
156
|
+
};
|
|
157
|
+
if (selection !== undefined)
|
|
158
|
+
ds.selection = selection;
|
|
159
|
+
if (typeof recordsPerRun === 'number')
|
|
160
|
+
ds.recordsPerRun = recordsPerRun;
|
|
161
|
+
if (poll !== undefined)
|
|
162
|
+
ds.pollWhenEmptySeconds = poll;
|
|
163
|
+
if (eligibility)
|
|
164
|
+
ds.eligibility = eligibility;
|
|
165
|
+
return { dataSource: ds, warnings };
|
|
166
|
+
}
|
|
167
|
+
case 'query-snapshot': {
|
|
168
|
+
const collectionRef = raw.collectionRef;
|
|
169
|
+
if (typeof collectionRef !== 'string' || !collectionRef.trim()) {
|
|
170
|
+
issues.push('dataSource.collectionRef must be a non-empty string');
|
|
171
|
+
throw new Error('parseDataSource: invalid collectionRef');
|
|
172
|
+
}
|
|
173
|
+
const selection = raw.selection;
|
|
174
|
+
if (selection !== undefined && !isPlainObject(selection)) {
|
|
175
|
+
issues.push('dataSource.selection must be an object when set');
|
|
176
|
+
throw new Error('parseDataSource: invalid selection');
|
|
177
|
+
}
|
|
178
|
+
const transform = parseSnapshotTransform(raw.transform, issues);
|
|
179
|
+
const materialize = raw.materialize;
|
|
180
|
+
if (materialize !== undefined && materialize !== 'one-row' && materialize !== 'expand') {
|
|
181
|
+
issues.push("dataSource.materialize must be 'one-row' or 'expand' when set");
|
|
182
|
+
throw new Error('parseDataSource: invalid materialize');
|
|
183
|
+
}
|
|
184
|
+
const poll = parsePollWhenEmpty(raw.pollWhenEmptySeconds, issues, warnings, 'query-snapshot');
|
|
185
|
+
const eligibility = raw.eligibility !== undefined ? parseEligibility(raw.eligibility, issues) : undefined;
|
|
186
|
+
const ds = {
|
|
187
|
+
kind: 'query-snapshot',
|
|
188
|
+
collectionRef: collectionRef.trim(),
|
|
189
|
+
transform,
|
|
190
|
+
};
|
|
191
|
+
if (selection !== undefined)
|
|
192
|
+
ds.selection = selection;
|
|
193
|
+
if (materialize === 'one-row' || materialize === 'expand')
|
|
194
|
+
ds.materialize = materialize;
|
|
195
|
+
if (poll !== undefined)
|
|
196
|
+
ds.pollWhenEmptySeconds = poll;
|
|
197
|
+
if (eligibility)
|
|
198
|
+
ds.eligibility = eligibility;
|
|
199
|
+
return { dataSource: ds, warnings };
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function parsePollWhenEmpty(raw, issues, warnings, kind) {
|
|
204
|
+
if (raw === undefined)
|
|
205
|
+
return undefined;
|
|
206
|
+
if (!isPositiveInt(raw)) {
|
|
207
|
+
issues.push(`dataSource.pollWhenEmptySeconds must be a positive integer when set`);
|
|
208
|
+
throw new Error('parsePollWhenEmpty: invalid value');
|
|
209
|
+
}
|
|
210
|
+
if (kind === 'query-snapshot' && raw < 60) {
|
|
211
|
+
warnings.push(`dataSource.pollWhenEmptySeconds=${raw} is unusually short for query-snapshot (recommended >= 60s)`);
|
|
212
|
+
}
|
|
213
|
+
if (kind === 'record' && raw > 24 * 60 * 60) {
|
|
214
|
+
warnings.push(`dataSource.pollWhenEmptySeconds=${raw} is unusually long for record (> 24h; consider executionMode='single-pass' instead)`);
|
|
215
|
+
}
|
|
216
|
+
return raw;
|
|
217
|
+
}
|
|
218
|
+
export function parseSnapshotTransform(raw, issues) {
|
|
219
|
+
if (!isPlainObject(raw)) {
|
|
220
|
+
issues.push('dataSource.transform must be an object');
|
|
221
|
+
throw new Error('parseSnapshotTransform: invalid root');
|
|
222
|
+
}
|
|
223
|
+
const language = raw.language;
|
|
224
|
+
if (language !== 'js') {
|
|
225
|
+
issues.push("dataSource.transform.language must be 'js'");
|
|
226
|
+
throw new Error('parseSnapshotTransform: invalid language');
|
|
227
|
+
}
|
|
228
|
+
const source = raw.source;
|
|
229
|
+
if (typeof source !== 'string' || !source.trim()) {
|
|
230
|
+
issues.push('dataSource.transform.source must be a non-empty string');
|
|
231
|
+
throw new Error('parseSnapshotTransform: invalid source');
|
|
232
|
+
}
|
|
233
|
+
const version = raw.version;
|
|
234
|
+
if (typeof version !== 'string' || !version.trim()) {
|
|
235
|
+
issues.push('dataSource.transform.version must be a non-empty string');
|
|
236
|
+
throw new Error('parseSnapshotTransform: invalid version');
|
|
237
|
+
}
|
|
238
|
+
const timeoutMs = raw.timeoutMs;
|
|
239
|
+
if (timeoutMs !== undefined) {
|
|
240
|
+
if (!isPositiveInt(timeoutMs) || timeoutMs > SNAPSHOT_TRANSFORM_TIMEOUT_HARD_CAP_MS) {
|
|
241
|
+
issues.push(`dataSource.transform.timeoutMs must be a positive integer <= ${SNAPSHOT_TRANSFORM_TIMEOUT_HARD_CAP_MS}`);
|
|
242
|
+
throw new Error('parseSnapshotTransform: invalid timeoutMs');
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
const memoryMb = raw.memoryMb;
|
|
246
|
+
if (memoryMb !== undefined && (!isPositiveInt(memoryMb) || memoryMb > 1024)) {
|
|
247
|
+
issues.push('dataSource.transform.memoryMb must be a positive integer (advisory, capped at 1024)');
|
|
248
|
+
throw new Error('parseSnapshotTransform: invalid memoryMb');
|
|
249
|
+
}
|
|
250
|
+
const out = { language: 'js', source, version: version.trim() };
|
|
251
|
+
if (typeof timeoutMs === 'number')
|
|
252
|
+
out.timeoutMs = timeoutMs;
|
|
253
|
+
if (typeof memoryMb === 'number')
|
|
254
|
+
out.memoryMb = memoryMb;
|
|
255
|
+
return out;
|
|
256
|
+
}
|
|
257
|
+
export function parseEligibility(raw, issues) {
|
|
258
|
+
if (!isPlainObject(raw)) {
|
|
259
|
+
issues.push('eligibility must be an object');
|
|
260
|
+
throw new Error('parseEligibility: invalid root');
|
|
261
|
+
}
|
|
262
|
+
const out = {};
|
|
263
|
+
if (raw.fromStatuses !== undefined) {
|
|
264
|
+
out.fromStatuses = parseStatusList(raw.fromStatuses, issues, 'eligibility.fromStatuses');
|
|
265
|
+
}
|
|
266
|
+
if (raw.excludeStatuses !== undefined) {
|
|
267
|
+
out.excludeStatuses = parseStatusList(raw.excludeStatuses, issues, 'eligibility.excludeStatuses');
|
|
268
|
+
}
|
|
269
|
+
if (raw.ageMinMinutes !== undefined) {
|
|
270
|
+
if (typeof raw.ageMinMinutes !== 'number' || !Number.isFinite(raw.ageMinMinutes) || raw.ageMinMinutes < 0) {
|
|
271
|
+
issues.push('eligibility.ageMinMinutes must be a non-negative number');
|
|
272
|
+
throw new Error('parseEligibility: invalid ageMinMinutes');
|
|
273
|
+
}
|
|
274
|
+
out.ageMinMinutes = raw.ageMinMinutes;
|
|
275
|
+
}
|
|
276
|
+
if (raw.modelProfileNotIn !== undefined) {
|
|
277
|
+
if (!Array.isArray(raw.modelProfileNotIn) || raw.modelProfileNotIn.some((v) => typeof v !== 'string')) {
|
|
278
|
+
issues.push('eligibility.modelProfileNotIn must be a string array');
|
|
279
|
+
throw new Error('parseEligibility: invalid modelProfileNotIn');
|
|
280
|
+
}
|
|
281
|
+
out.modelProfileNotIn = raw.modelProfileNotIn;
|
|
282
|
+
}
|
|
283
|
+
if (raw.extraFilter !== undefined) {
|
|
284
|
+
if (!isPlainObject(raw.extraFilter)) {
|
|
285
|
+
issues.push('eligibility.extraFilter must be an object');
|
|
286
|
+
throw new Error('parseEligibility: invalid extraFilter');
|
|
287
|
+
}
|
|
288
|
+
out.extraFilter = raw.extraFilter;
|
|
289
|
+
}
|
|
290
|
+
return out;
|
|
291
|
+
}
|
|
292
|
+
function parseStatusList(raw, issues, path) {
|
|
293
|
+
if (!Array.isArray(raw)) {
|
|
294
|
+
issues.push(`${path} must be an array`);
|
|
295
|
+
throw new Error('parseStatusList: not array');
|
|
296
|
+
}
|
|
297
|
+
const out = [];
|
|
298
|
+
for (const v of raw) {
|
|
299
|
+
if (typeof v !== 'string' || !EXECUTION_MATRIX_STATUSES.includes(v)) {
|
|
300
|
+
issues.push(`${path} contains invalid status ${JSON.stringify(v)}`);
|
|
301
|
+
throw new Error('parseStatusList: invalid status');
|
|
302
|
+
}
|
|
303
|
+
out.push(v);
|
|
304
|
+
}
|
|
305
|
+
return out;
|
|
306
|
+
}
|
|
307
|
+
//# sourceMappingURL=data-source.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-source.js","sourceRoot":"","sources":["../../src/execution-matrix/data-source.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,mCAAmC,EACnC,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,mBAAmB,EACnB,sCAAsC,GAMvC,MAAM,gBAAgB,CAAC;AAExB,MAAM,iBAAiB,GAA8B;IACnD,OAAO;IACP,SAAS;IACT,QAAQ;IACR,gBAAgB;CACR,CAAC;AAEX,SAAS,aAAa,CAAC,CAAU;IAC/B,OAAO,CAAC,KAAK,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC;AAED,SAAS,aAAa,CAAC,CAAU;IAC/B,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtF,CAAC;AAED;;+EAE+E;AAE/E,MAAM,UAAU,YAAY,CAAC,CAAU;IACrC,IAAI,CAAC,aA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|
+
* `ExecutionMatrixRuntime.claimNext` / `claimRecord`.
|
|
4
|
+
*
|
|
5
|
+
* Pure module — no IO, no logging — so the orchestrator and config-store can call it
|
|
6
|
+
* deterministically without side effects.
|
|
7
|
+
*/
|
|
8
|
+
import type { EligibilityPolicy, ExecutionMatrixStatus } from './contracts.js';
|
|
9
|
+
export type EligibilityClaimParams = {
|
|
10
|
+
/** Mapped 1:1 to `ClaimNextOptions.fromStatuses` (or default when `undefined`). */
|
|
11
|
+
fromStatuses?: ExecutionMatrixStatus[];
|
|
12
|
+
/** Merged into `ClaimNextOptions.extraFilter`. */
|
|
13
|
+
extraFilter?: Record<string, unknown>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Resolve effective claim parameters from an eligibility policy.
|
|
17
|
+
*
|
|
18
|
+
* Behavior:
|
|
19
|
+
* - `fromStatuses` defaults to `['not-started']` when omitted.
|
|
20
|
+
* - `excludeStatuses` (default `['in-progress']`) is subtracted from `fromStatuses`.
|
|
21
|
+
* - When `ageMinMinutes > 0`, an extra Mongo-style filter requires
|
|
22
|
+
* `execution.$elemMatch.lastAttempt.endedAt` to be missing OR `<= cutoff` ISO timestamp.
|
|
23
|
+
* The clause is added under key `__eligibilityAgeCutoff` so callers can debug-trace it;
|
|
24
|
+
* in practice it is consumed by orchestrator-level merging when host wires it in.
|
|
25
|
+
* - When `modelProfileNotIn` is non-empty, an analogous clause requires the prior
|
|
26
|
+
* `lastAttempt.modelProfile` to be absent or NOT in the list. This is also added under
|
|
27
|
+
* `__eligibilityModelProfileNotIn` for trace; orchestrator merges it into the actual claim filter.
|
|
28
|
+
* - `extraFilter` from the policy is merged in last (policy wins on collisions with derived clauses).
|
|
29
|
+
*
|
|
30
|
+
* Note: the runtime's claim path supports the simple key-value `extraFilter` form. Mongo-side it
|
|
31
|
+
* also accepts `$elemMatch`-style clauses. Hosts that need the age / modelProfile clauses applied
|
|
32
|
+
* to the actual claim should configure their store with Mongo and ensure the keys above are
|
|
33
|
+
* interpreted by their query layer; see {@link ExecutionMatrixRuntime} for how the in-memory
|
|
34
|
+
* matcher walks paths.
|
|
35
|
+
*/
|
|
36
|
+
export declare function eligibilityToClaim(policy: EligibilityPolicy | undefined, now?: Date): EligibilityClaimParams;
|
|
37
|
+
/**
|
|
38
|
+
* In-memory predicate variant of {@link eligibilityToClaim} for callers that walk rows
|
|
39
|
+
* client-side (memory store path). Returns a function that returns true when a runtime step
|
|
40
|
+
* matches the eligibility's age / modelProfile constraints.
|
|
41
|
+
*/
|
|
42
|
+
export declare function makeEligibilityStepPredicate(policy: EligibilityPolicy | undefined, now?: Date): (step: {
|
|
43
|
+
lastAttempt?: {
|
|
44
|
+
endedAt?: string;
|
|
45
|
+
modelProfile?: string;
|
|
46
|
+
};
|
|
47
|
+
}) => boolean;
|
|
48
|
+
//# sourceMappingURL=eligibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eligibility.d.ts","sourceRoot":"","sources":["../../src/execution-matrix/eligibility.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE/E,MAAM,MAAM,sBAAsB,GAAG;IACnC,mFAAmF;IACnF,YAAY,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACvC,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,CAAC;AAKF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,iBAAiB,GAAG,SAAS,EACrC,GAAG,GAAE,IAAiB,GACrB,sBAAsB,CA8BxB;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,iBAAiB,GAAG,SAAS,EACrC,GAAG,GAAE,IAAiB,GACrB,CAAC,IAAI,EAAE;IAAE,WAAW,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,KAAK,OAAO,CAuBlF"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert {@link EligibilityPolicy} into concrete claim parameters consumed by
|
|
3
|
+
* `ExecutionMatrixRuntime.claimNext` / `claimRecord`.
|
|
4
|
+
*
|
|
5
|
+
* Pure module — no IO, no logging — so the orchestrator and config-store can call it
|
|
6
|
+
* deterministically without side effects.
|
|
7
|
+
*/
|
|
8
|
+
const DEFAULT_FROM_STATUSES = ['not-started'];
|
|
9
|
+
const DEFAULT_EXCLUDE_STATUSES = ['in-progress'];
|
|
10
|
+
/**
|
|
11
|
+
* Resolve effective claim parameters from an eligibility policy.
|
|
12
|
+
*
|
|
13
|
+
* Behavior:
|
|
14
|
+
* - `fromStatuses` defaults to `['not-started']` when omitted.
|
|
15
|
+
* - `excludeStatuses` (default `['in-progress']`) is subtracted from `fromStatuses`.
|
|
16
|
+
* - When `ageMinMinutes > 0`, an extra Mongo-style filter requires
|
|
17
|
+
* `execution.$elemMatch.lastAttempt.endedAt` to be missing OR `<= cutoff` ISO timestamp.
|
|
18
|
+
* The clause is added under key `__eligibilityAgeCutoff` so callers can debug-trace it;
|
|
19
|
+
* in practice it is consumed by orchestrator-level merging when host wires it in.
|
|
20
|
+
* - When `modelProfileNotIn` is non-empty, an analogous clause requires the prior
|
|
21
|
+
* `lastAttempt.modelProfile` to be absent or NOT in the list. This is also added under
|
|
22
|
+
* `__eligibilityModelProfileNotIn` for trace; orchestrator merges it into the actual claim filter.
|
|
23
|
+
* - `extraFilter` from the policy is merged in last (policy wins on collisions with derived clauses).
|
|
24
|
+
*
|
|
25
|
+
* Note: the runtime's claim path supports the simple key-value `extraFilter` form. Mongo-side it
|
|
26
|
+
* also accepts `$elemMatch`-style clauses. Hosts that need the age / modelProfile clauses applied
|
|
27
|
+
* to the actual claim should configure their store with Mongo and ensure the keys above are
|
|
28
|
+
* interpreted by their query layer; see {@link ExecutionMatrixRuntime} for how the in-memory
|
|
29
|
+
* matcher walks paths.
|
|
30
|
+
*/
|
|
31
|
+
export function eligibilityToClaim(policy, now = new Date()) {
|
|
32
|
+
if (!policy) {
|
|
33
|
+
return { fromStatuses: [...DEFAULT_FROM_STATUSES] };
|
|
34
|
+
}
|
|
35
|
+
const include = policy.fromStatuses && policy.fromStatuses.length > 0
|
|
36
|
+
? [...policy.fromStatuses]
|
|
37
|
+
: [...DEFAULT_FROM_STATUSES];
|
|
38
|
+
const exclude = policy.excludeStatuses && policy.excludeStatuses.length > 0
|
|
39
|
+
? policy.excludeStatuses
|
|
40
|
+
: DEFAULT_EXCLUDE_STATUSES;
|
|
41
|
+
const fromStatuses = include.filter((s) => !exclude.includes(s));
|
|
42
|
+
const extraFilter = {};
|
|
43
|
+
if (typeof policy.ageMinMinutes === 'number' && policy.ageMinMinutes > 0) {
|
|
44
|
+
const cutoff = new Date(now.getTime() - policy.ageMinMinutes * 60_000).toISOString();
|
|
45
|
+
extraFilter['execution.lastAttempt.endedAt.$lte'] = cutoff;
|
|
46
|
+
}
|
|
47
|
+
if (policy.modelProfileNotIn && policy.modelProfileNotIn.length > 0) {
|
|
48
|
+
extraFilter['execution.lastAttempt.modelProfile.$nin'] = [...policy.modelProfileNotIn];
|
|
49
|
+
}
|
|
50
|
+
if (policy.extraFilter && Object.keys(policy.extraFilter).length > 0) {
|
|
51
|
+
Object.assign(extraFilter, policy.extraFilter);
|
|
52
|
+
}
|
|
53
|
+
const out = { fromStatuses };
|
|
54
|
+
if (Object.keys(extraFilter).length > 0)
|
|
55
|
+
out.extraFilter = extraFilter;
|
|
56
|
+
return out;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* In-memory predicate variant of {@link eligibilityToClaim} for callers that walk rows
|
|
60
|
+
* client-side (memory store path). Returns a function that returns true when a runtime step
|
|
61
|
+
* matches the eligibility's age / modelProfile constraints.
|
|
62
|
+
*/
|
|
63
|
+
export function makeEligibilityStepPredicate(policy, now = new Date()) {
|
|
64
|
+
if (!policy)
|
|
65
|
+
return () => true;
|
|
66
|
+
const cutoffMs = typeof policy.ageMinMinutes === 'number' && policy.ageMinMinutes > 0
|
|
67
|
+
? now.getTime() - policy.ageMinMinutes * 60_000
|
|
68
|
+
: null;
|
|
69
|
+
const blockedProfiles = policy.modelProfileNotIn && policy.modelProfileNotIn.length > 0
|
|
70
|
+
? new Set(policy.modelProfileNotIn)
|
|
71
|
+
: null;
|
|
72
|
+
return (step) => {
|
|
73
|
+
if (cutoffMs !== null) {
|
|
74
|
+
const endedAt = step.lastAttempt?.endedAt;
|
|
75
|
+
if (endedAt) {
|
|
76
|
+
const t = Date.parse(endedAt);
|
|
77
|
+
if (Number.isFinite(t) && t > cutoffMs)
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (blockedProfiles) {
|
|
82
|
+
const profile = step.lastAttempt?.modelProfile;
|
|
83
|
+
if (profile && blockedProfiles.has(profile))
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
return true;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=eligibility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eligibility.js","sourceRoot":"","sources":["../../src/execution-matrix/eligibility.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAWH,MAAM,qBAAqB,GAAqC,CAAC,aAAa,CAAC,CAAC;AAChF,MAAM,wBAAwB,GAAqC,CAAC,aAAa,CAAC,CAAC;AAEnF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAqC,EACrC,MAAY,IAAI,IAAI,EAAE;IAEtB,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,EAAE,YAAY,EAAE,CAAC,GAAG,qBAAqB,CAAC,EAAE,CAAC;IACtD,CAAC;IACD,MAAM,OAAO,GAA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KAAK,CAAC;QAC5D,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-process pause / resume for matrix workers using {@link ProcessMatrixClaimDeps.shouldClaimNext}.
|
|
3
|
+
*
|
|
4
|
+
* Use one controller per worker (or share across workers only if you intend coordinated pause).
|
|
5
|
+
*/
|
|
6
|
+
export type ExecutionMatrixClaimPauseController = {
|
|
7
|
+
/** After this, {@link shouldClaimNext} returns false until {@link resume}. */
|
|
8
|
+
pause: () => void;
|
|
9
|
+
/** Allow new claims again. */
|
|
10
|
+
resume: () => void;
|
|
11
|
+
isPaused: () => boolean;
|
|
12
|
+
/** Pass to {@link ProcessMatrixClaimDeps.shouldClaimNext}. */
|
|
13
|
+
shouldClaimNext: () => boolean;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Creates a simple pause gate: **`shouldClaimNext`** is **`true`** while not paused.
|
|
17
|
+
* Pausing does not interrupt **`executeGraph`** for a claim already taken; it only blocks the next claim.
|
|
18
|
+
*/
|
|
19
|
+
export declare function createExecutionMatrixClaimPauseController(initialPaused?: boolean): ExecutionMatrixClaimPauseController;
|
|
20
|
+
//# sourceMappingURL=execution-matrix-claim-pause.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-matrix-claim-pause.d.ts","sourceRoot":"","sources":["../../src/execution-matrix/execution-matrix-claim-pause.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,mCAAmC,GAAG;IAChD,8EAA8E;IAC9E,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,8BAA8B;IAC9B,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,8DAA8D;IAC9D,eAAe,EAAE,MAAM,OAAO,CAAC;CAChC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,yCAAyC,CACvD,aAAa,UAAQ,GACpB,mCAAmC,CAYrC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a simple pause gate: **`shouldClaimNext`** is **`true`** while not paused.
|
|
3
|
+
* Pausing does not interrupt **`executeGraph`** for a claim already taken; it only blocks the next claim.
|
|
4
|
+
*/
|
|
5
|
+
export function createExecutionMatrixClaimPauseController(initialPaused = false) {
|
|
6
|
+
let paused = initialPaused;
|
|
7
|
+
return {
|
|
8
|
+
pause: () => {
|
|
9
|
+
paused = true;
|
|
10
|
+
},
|
|
11
|
+
resume: () => {
|
|
12
|
+
paused = false;
|
|
13
|
+
},
|
|
14
|
+
isPaused: () => paused,
|
|
15
|
+
shouldClaimNext: () => !paused,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=execution-matrix-claim-pause.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-matrix-claim-pause.js","sourceRoot":"","sources":["../../src/execution-matrix/execution-matrix-claim-pause.ts"],"names":[],"mappings":"AAeA;;;GAGG;AACH,MAAM,UAAU,yCAAyC,CACvD,aAAa,GAAG,KAAK;IAErB,IAAI,MAAM,GAAG,aAAa,CAAC;IAC3B,OAAO;QACL,KAAK,EAAE,GAAG,EAAE;YACV,MAAM,GAAG,IAAI,CAAC;QAChB,CAAC;QACD,MAAM,EAAE,GAAG,EAAE;YACX,MAAM,GAAG,KAAK,CAAC;QACjB,CAAC;QACD,QAAQ,EAAE,GAAG,EAAE,CAAC,MAAM;QACtB,eAAe,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM;KAC/B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-matrix-claim-pause.spec.d.ts","sourceRoot":"","sources":["../../src/execution-matrix/execution-matrix-claim-pause.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { createExecutionMatrixClaimPauseController } from './execution-matrix-claim-pause.js';
|
|
3
|
+
describe('createExecutionMatrixClaimPauseController', () => {
|
|
4
|
+
it('exposes pause, resume, and shouldClaimNext', () => {
|
|
5
|
+
const c = createExecutionMatrixClaimPauseController();
|
|
6
|
+
expect(c.isPaused()).toBe(false);
|
|
7
|
+
expect(c.shouldClaimNext()).toBe(true);
|
|
8
|
+
c.pause();
|
|
9
|
+
expect(c.isPaused()).toBe(true);
|
|
10
|
+
expect(c.shouldClaimNext()).toBe(false);
|
|
11
|
+
c.resume();
|
|
12
|
+
expect(c.isPaused()).toBe(false);
|
|
13
|
+
expect(c.shouldClaimNext()).toBe(true);
|
|
14
|
+
});
|
|
15
|
+
it('honors initialPaused', () => {
|
|
16
|
+
const c = createExecutionMatrixClaimPauseController(true);
|
|
17
|
+
expect(c.isPaused()).toBe(true);
|
|
18
|
+
expect(c.shouldClaimNext()).toBe(false);
|
|
19
|
+
c.resume();
|
|
20
|
+
expect(c.shouldClaimNext()).toBe(true);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=execution-matrix-claim-pause.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution-matrix-claim-pause.spec.js","sourceRoot":"","sources":["../../src/execution-matrix/execution-matrix-claim-pause.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,yCAAyC,EAAE,MAAM,mCAAmC,CAAC;AAE9F,QAAQ,CAAC,2CAA2C,EAAE,GAAG,EAAE;IACzD,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACpD,MAAM,CAAC,GAAG,yCAAyC,EAAE,CAAC;QACtD,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACjC,MAA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