@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,339 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read helpers for the XMemory **operational** Mongo tier (`tier.env.opDb`, typically **`xmemory-op`**
|
|
3
|
+
* — align with deployment **`XMEMORY_OP_DB`** and `@x12i/xmemory-store` tier defaults).
|
|
4
|
+
*
|
|
5
|
+
* `@x12i/xmemory-store` registers {@link tier.opStore} with **scoped views** (`tier.env.viewsCollection`,
|
|
6
|
+
* default `scoped_views`). Use {@link listXmemoryOpScopedViews} for xronox-shaped reads (visibility / cache merge)
|
|
7
|
+
* and {@link listXmemoryOpScopedViewsPaged} when you need **`skip` / offset** paging via the tier
|
|
8
|
+
* {@link XmemoryMongoClient}.
|
|
9
|
+
*
|
|
10
|
+
* **Scoped data / snapshots** live in the same op DB but are **not** first-class xronox collections on the tier
|
|
11
|
+
* adapter — reads use {@link tier.mongoClient} (`findMany` / `countMany`), typically with **`fallbackMongoClient`**
|
|
12
|
+
* wired at tier creation. Collection names come from {@link MemorixRuntimeTier.env} (`scopedDataCollection` default
|
|
13
|
+
* **`x-scoped-data`**, `snapshotsCollection` default **`x-snapshots`**), overridable via **`SCOPED_DATA_COLLECTION`**
|
|
14
|
+
* / **`SNAPSHOTS_COLLECTION`** (see {@link resolveMemorixRuntimeTierEnv}).
|
|
15
|
+
*/
|
|
16
|
+
import { FIND_MANY_DEFAULT_LIMIT_WITH_SKIP, FIND_MANY_MAX_SKIP, FIND_MANY_MAX_WINDOW, } from './memorix-runtime-tier.js';
|
|
17
|
+
export { COLLECTION_DEFAULTS, DEFAULT_SCOPED_DATA_COLLECTION, DEFAULT_SNAPSHOTS_COLLECTION, FIND_MANY_DEFAULT_LIMIT_WITH_SKIP, FIND_MANY_MAX_SKIP, FIND_MANY_MAX_WINDOW, } from './memorix-runtime-tier.js';
|
|
18
|
+
/** xronox collection handle for scoped view rows on {@link XmemoryDataTier.opStore}. */
|
|
19
|
+
export function getXmemoryOpScopedViewsCollection(tier) {
|
|
20
|
+
return tier.opStore.collection(tier.env.viewsCollection);
|
|
21
|
+
}
|
|
22
|
+
/** xronox collection handle for **things** on {@link XmemoryDataTier.corpusStore} (`tier.env.thingsCollection`). */
|
|
23
|
+
export function getXmemoryTierThingsCollection(tier) {
|
|
24
|
+
return tier.corpusStore.collection(tier.env.thingsCollection);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Recommended **`groupByPaths.scoped_data`** for {@link getXmemoryTierStatistics} so entity-type buckets align with
|
|
28
|
+
* {@link buildXScopedDataEntityTypeFilter} (camelCase and snake_case documents).
|
|
29
|
+
*/
|
|
30
|
+
export const RECOMMENDED_TIER_STATS_SCOPED_DATA_GROUP_PATHS = ['$entityType', '$entity_type'];
|
|
31
|
+
/**
|
|
32
|
+
* List thing documents via xronox {@link XronoxCollection.readMany} on the corpus store.
|
|
33
|
+
* No `skip` — use {@link listXmemoryTierThingsPaged} for offset paging.
|
|
34
|
+
*/
|
|
35
|
+
export async function listXmemoryTierThings(tier, options) {
|
|
36
|
+
const coll = getXmemoryTierThingsCollection(tier);
|
|
37
|
+
const readOpts = {
|
|
38
|
+
limit: options?.limit,
|
|
39
|
+
sort: options?.sort,
|
|
40
|
+
mergeCache: options?.mergeCache ?? true,
|
|
41
|
+
includeHidden: options?.includeHidden,
|
|
42
|
+
};
|
|
43
|
+
return coll.readMany(options?.filter ?? {}, readOpts);
|
|
44
|
+
}
|
|
45
|
+
export async function countXmemoryTierThings(tier, filter, includeHidden) {
|
|
46
|
+
const coll = getXmemoryTierThingsCollection(tier);
|
|
47
|
+
return coll.countMatching(filter ?? {}, includeHidden !== undefined ? { includeHidden } : undefined);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Paged things read via {@link XmemoryMongoClient.findMany} on **`thingsDb`** / **`thingsCollection`**.
|
|
51
|
+
*/
|
|
52
|
+
export async function listXmemoryTierThingsPaged(tier, query) {
|
|
53
|
+
assertSkipPolicy(query?.skip);
|
|
54
|
+
assertWindowPolicy(query?.skip, query?.limit);
|
|
55
|
+
const rows = await tier.mongoClient.findMany({
|
|
56
|
+
database: tier.env.thingsDb,
|
|
57
|
+
collection: tier.env.thingsCollection,
|
|
58
|
+
filter: query?.filter,
|
|
59
|
+
limit: query?.limit,
|
|
60
|
+
skip: query?.skip,
|
|
61
|
+
projection: query?.projection,
|
|
62
|
+
});
|
|
63
|
+
return rows;
|
|
64
|
+
}
|
|
65
|
+
export async function countXmemoryTierThingsMongo(tier, filter) {
|
|
66
|
+
const cm = tier.mongoClient.countMany;
|
|
67
|
+
if (!cm) {
|
|
68
|
+
throw new Error('countXmemoryTierThingsMongo: mongoClient.countMany is required for things collection counts');
|
|
69
|
+
}
|
|
70
|
+
return cm({
|
|
71
|
+
database: tier.env.thingsDb,
|
|
72
|
+
collection: tier.env.thingsCollection,
|
|
73
|
+
filter: filter ?? {},
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Walk things with repeated paged reads until empty or limits hit.
|
|
78
|
+
*/
|
|
79
|
+
export async function fetchAllXmemoryTierThings(tier, options) {
|
|
80
|
+
const pageSize = Math.min(options?.pageSize ?? FIND_MANY_DEFAULT_LIMIT_WITH_SKIP, FIND_MANY_MAX_WINDOW);
|
|
81
|
+
const maxRows = Math.min(options?.maxRows ?? FIND_MANY_MAX_WINDOW, FIND_MANY_MAX_WINDOW);
|
|
82
|
+
const out = [];
|
|
83
|
+
let skip = 0;
|
|
84
|
+
while (out.length < maxRows) {
|
|
85
|
+
const take = Math.min(pageSize, maxRows - out.length);
|
|
86
|
+
assertSkipPolicy(skip);
|
|
87
|
+
assertWindowPolicy(skip, take);
|
|
88
|
+
const batch = await listXmemoryTierThingsPaged(tier, {
|
|
89
|
+
filter: options?.filter,
|
|
90
|
+
limit: take,
|
|
91
|
+
skip,
|
|
92
|
+
});
|
|
93
|
+
if (batch.length === 0)
|
|
94
|
+
break;
|
|
95
|
+
out.push(...batch);
|
|
96
|
+
skip += batch.length;
|
|
97
|
+
if (skip > FIND_MANY_MAX_SKIP)
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
return out;
|
|
101
|
+
}
|
|
102
|
+
function assertSkipPolicy(skip) {
|
|
103
|
+
if (skip !== undefined && skip > FIND_MANY_MAX_SKIP) {
|
|
104
|
+
throw new Error(`xmemory-op read: skip (${skip}) exceeds @x12i/xmemory-store FIND_MANY_MAX_SKIP (${FIND_MANY_MAX_SKIP})`);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function assertWindowPolicy(skip, limit) {
|
|
108
|
+
const s = skip ?? 0;
|
|
109
|
+
const lim = limit ?? FIND_MANY_DEFAULT_LIMIT_WITH_SKIP;
|
|
110
|
+
if (s + lim > FIND_MANY_MAX_WINDOW) {
|
|
111
|
+
throw new Error(`xmemory-op read: skip+limit (${s}+${lim}) exceeds FIND_MANY_MAX_WINDOW (${FIND_MANY_MAX_WINDOW})`);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* List scoped view documents via xronox {@link XronoxCollection.readMany} (same path as scoper tier wiring).
|
|
116
|
+
* Does **not** support `skip`; use {@link listXmemoryOpScopedViewsPaged} for offset paging.
|
|
117
|
+
*/
|
|
118
|
+
export async function listXmemoryOpScopedViews(tier, options) {
|
|
119
|
+
const coll = getXmemoryOpScopedViewsCollection(tier);
|
|
120
|
+
const readOpts = {
|
|
121
|
+
limit: options?.limit,
|
|
122
|
+
sort: options?.sort,
|
|
123
|
+
mergeCache: options?.mergeCache ?? true,
|
|
124
|
+
includeHidden: options?.includeHidden,
|
|
125
|
+
};
|
|
126
|
+
return coll.readMany(options?.filter ?? {}, readOpts);
|
|
127
|
+
}
|
|
128
|
+
/** Match semantics align with {@link listXmemoryOpScopedViews} / xronox visibility rules on scoped views. */
|
|
129
|
+
export async function countXmemoryOpScopedViews(tier, filter, includeHidden) {
|
|
130
|
+
const coll = getXmemoryOpScopedViewsCollection(tier);
|
|
131
|
+
return coll.countMatching(filter ?? {}, includeHidden !== undefined ? { includeHidden } : undefined);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Paged read using {@link XmemoryMongoClient.findMany} — supports **`skip`** for walking large corpora.
|
|
135
|
+
* Prefer {@link listXmemoryOpScopedViews} when you only need the first `limit` rows and want cache-merged reads.
|
|
136
|
+
*/
|
|
137
|
+
export async function listXmemoryOpScopedViewsPaged(tier, query) {
|
|
138
|
+
assertSkipPolicy(query?.skip);
|
|
139
|
+
assertWindowPolicy(query?.skip, query?.limit);
|
|
140
|
+
return listXmemoryOpCollectionDocumentsPaged(tier, tier.env.viewsCollection, query);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Document count for scoped views using {@link XmemoryMongoClient.countMany} when present; otherwise falls back
|
|
144
|
+
* to {@link countXmemoryOpScopedViews} (xronox path).
|
|
145
|
+
*/
|
|
146
|
+
export async function countXmemoryOpScopedViewsMongo(tier, filter) {
|
|
147
|
+
const cm = tier.mongoClient.countMany;
|
|
148
|
+
if (cm) {
|
|
149
|
+
return cm({
|
|
150
|
+
database: tier.env.opDb,
|
|
151
|
+
collection: tier.env.viewsCollection,
|
|
152
|
+
filter: filter ?? {},
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
return countXmemoryOpScopedViews(tier, filter);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Walk scoped views with repeated paged reads until a batch is empty or limits hit.
|
|
159
|
+
* Intended for exports / batch jobs — prefer bounded filters in production.
|
|
160
|
+
*/
|
|
161
|
+
export async function fetchAllXmemoryOpScopedViews(tier, options) {
|
|
162
|
+
const pageSize = Math.min(options?.pageSize ?? FIND_MANY_DEFAULT_LIMIT_WITH_SKIP, FIND_MANY_MAX_WINDOW);
|
|
163
|
+
const maxRows = Math.min(options?.maxRows ?? FIND_MANY_MAX_WINDOW, FIND_MANY_MAX_WINDOW);
|
|
164
|
+
const out = [];
|
|
165
|
+
let skip = 0;
|
|
166
|
+
while (out.length < maxRows) {
|
|
167
|
+
const take = Math.min(pageSize, maxRows - out.length);
|
|
168
|
+
assertSkipPolicy(skip);
|
|
169
|
+
assertWindowPolicy(skip, take);
|
|
170
|
+
const batch = await listXmemoryOpScopedViewsPaged(tier, {
|
|
171
|
+
filter: options?.filter,
|
|
172
|
+
limit: take,
|
|
173
|
+
skip,
|
|
174
|
+
});
|
|
175
|
+
if (batch.length === 0)
|
|
176
|
+
break;
|
|
177
|
+
out.push(...batch);
|
|
178
|
+
skip += batch.length;
|
|
179
|
+
if (skip > FIND_MANY_MAX_SKIP)
|
|
180
|
+
break;
|
|
181
|
+
}
|
|
182
|
+
return out;
|
|
183
|
+
}
|
|
184
|
+
/* --- Generic operational DB reads (same Mongo database as {@link XmemoryDataTier.opStore}) --- */
|
|
185
|
+
/**
|
|
186
|
+
* Count documents in any collection under {@link XmemoryDataTier.env.opDb}.
|
|
187
|
+
* Uses xronox {@link XronoxCollection.countMatching} when `collectionName` is the scoped-views collection.
|
|
188
|
+
*/
|
|
189
|
+
export async function countXmemoryOpCollectionDocuments(tier, collectionName, filter, includeHidden) {
|
|
190
|
+
if (collectionName === tier.env.viewsCollection) {
|
|
191
|
+
return tier.opStore.collection(collectionName).countMatching(filter ?? {}, includeHidden !== undefined ? { includeHidden } : undefined);
|
|
192
|
+
}
|
|
193
|
+
const cm = tier.mongoClient.countMany;
|
|
194
|
+
if (!cm) {
|
|
195
|
+
throw new Error(`countXmemoryOpCollectionDocuments: mongoClient.countMany is required for collection '${collectionName}' (not registered on opStore)`);
|
|
196
|
+
}
|
|
197
|
+
return cm({
|
|
198
|
+
database: tier.env.opDb,
|
|
199
|
+
collection: collectionName,
|
|
200
|
+
filter: filter ?? {},
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* List documents from any collection in `tier.env.opDb` via {@link XmemoryMongoClient.findMany} (`skip` / `limit` / `projection`).
|
|
205
|
+
*/
|
|
206
|
+
export async function listXmemoryOpCollectionDocumentsPaged(tier, collectionName, query) {
|
|
207
|
+
assertSkipPolicy(query?.skip);
|
|
208
|
+
assertWindowPolicy(query?.skip, query?.limit);
|
|
209
|
+
const rows = await tier.mongoClient.findMany({
|
|
210
|
+
database: tier.env.opDb,
|
|
211
|
+
collection: collectionName,
|
|
212
|
+
filter: query?.filter,
|
|
213
|
+
limit: query?.limit,
|
|
214
|
+
skip: query?.skip,
|
|
215
|
+
projection: query?.projection,
|
|
216
|
+
});
|
|
217
|
+
return rows;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Same as {@link fetchAllXmemoryOpScopedViews} but for an arbitrary collection name in the op database.
|
|
221
|
+
*/
|
|
222
|
+
export async function fetchAllXmemoryOpCollectionDocuments(tier, collectionName, options) {
|
|
223
|
+
const pageSize = Math.min(options?.pageSize ?? FIND_MANY_DEFAULT_LIMIT_WITH_SKIP, FIND_MANY_MAX_WINDOW);
|
|
224
|
+
const maxRows = Math.min(options?.maxRows ?? FIND_MANY_MAX_WINDOW, FIND_MANY_MAX_WINDOW);
|
|
225
|
+
const out = [];
|
|
226
|
+
let skip = 0;
|
|
227
|
+
while (out.length < maxRows) {
|
|
228
|
+
const take = Math.min(pageSize, maxRows - out.length);
|
|
229
|
+
assertSkipPolicy(skip);
|
|
230
|
+
assertWindowPolicy(skip, take);
|
|
231
|
+
const batch = await listXmemoryOpCollectionDocumentsPaged(tier, collectionName, {
|
|
232
|
+
filter: options?.filter,
|
|
233
|
+
limit: take,
|
|
234
|
+
skip,
|
|
235
|
+
});
|
|
236
|
+
if (batch.length === 0)
|
|
237
|
+
break;
|
|
238
|
+
out.push(...batch);
|
|
239
|
+
skip += batch.length;
|
|
240
|
+
if (skip > FIND_MANY_MAX_SKIP)
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
return out;
|
|
244
|
+
}
|
|
245
|
+
/** Resolved scoped-data collection on the op DB ({@link XmemoryDataTier.env.scopedDataCollection}). */
|
|
246
|
+
export function getXmemoryTierScopedDataCollectionName(tier) {
|
|
247
|
+
return tier.env.scopedDataCollection;
|
|
248
|
+
}
|
|
249
|
+
/** Resolved Memorix snapshots collection on the op DB ({@link XmemoryDataTier.env.snapshotsCollection}). */
|
|
250
|
+
export function getXmemoryTierSnapshotsCollectionName(tier) {
|
|
251
|
+
return tier.env.snapshotsCollection;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* {@link countXmemoryOpCollectionDocuments} for {@link XmemoryDataTier.env.scopedDataCollection}.
|
|
255
|
+
*/
|
|
256
|
+
export async function countXmemoryTierScopedDataDocuments(tier, filter, includeHidden) {
|
|
257
|
+
return countXmemoryOpCollectionDocuments(tier, tier.env.scopedDataCollection, filter, includeHidden);
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* {@link listXmemoryOpCollectionDocumentsPaged} for {@link XmemoryDataTier.env.scopedDataCollection}.
|
|
261
|
+
*/
|
|
262
|
+
export async function listXmemoryTierScopedDataPaged(tier, query) {
|
|
263
|
+
return listXmemoryOpCollectionDocumentsPaged(tier, tier.env.scopedDataCollection, query);
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* {@link fetchAllXmemoryOpCollectionDocuments} for {@link XmemoryDataTier.env.scopedDataCollection}.
|
|
267
|
+
*/
|
|
268
|
+
export async function fetchAllXmemoryTierScopedDataDocuments(tier, options) {
|
|
269
|
+
return fetchAllXmemoryOpCollectionDocuments(tier, tier.env.scopedDataCollection, options);
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* {@link countXmemoryOpCollectionDocuments} for {@link XmemoryDataTier.env.snapshotsCollection}.
|
|
273
|
+
*/
|
|
274
|
+
export async function countXmemoryTierSnapshotDocuments(tier, filter, includeHidden) {
|
|
275
|
+
return countXmemoryOpCollectionDocuments(tier, tier.env.snapshotsCollection, filter, includeHidden);
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* {@link listXmemoryOpCollectionDocumentsPaged} for {@link XmemoryDataTier.env.snapshotsCollection}.
|
|
279
|
+
*/
|
|
280
|
+
export async function listXmemoryTierSnapshotsPaged(tier, query) {
|
|
281
|
+
return listXmemoryOpCollectionDocumentsPaged(tier, tier.env.snapshotsCollection, query);
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* {@link fetchAllXmemoryOpCollectionDocuments} for {@link XmemoryDataTier.env.snapshotsCollection}.
|
|
285
|
+
*/
|
|
286
|
+
export async function fetchAllXmemoryTierSnapshotDocuments(tier, options) {
|
|
287
|
+
return fetchAllXmemoryOpCollectionDocuments(tier, tier.env.snapshotsCollection, options);
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Thin delegate for {@link XmemoryDataTier.runMongoAggregate} — native aggregation on **`mapsDb`**, **`thingsDb`**, or **`opDb`**.
|
|
291
|
+
*/
|
|
292
|
+
export async function runXmemoryTierMongoAggregate(tier, params) {
|
|
293
|
+
if (!tier.runMongoAggregate) {
|
|
294
|
+
throw new Error('runXmemoryTierMongoAggregate: tier.runMongoAggregate is not available');
|
|
295
|
+
}
|
|
296
|
+
return tier.runMongoAggregate(params);
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Canonical Mongo filter for Memorix **scoped data** (`tier.env.scopedDataCollection`, default **`x-scoped-data`**;
|
|
300
|
+
* legacy deployments often use **`x_scoped_data`** via **`SCOPED_DATA_COLLECTION`**) keyed by entity discriminator.
|
|
301
|
+
* Matches either camelCase or snake_case field names used across pipelines.
|
|
302
|
+
*
|
|
303
|
+
* Pair with {@link countXmemoryTierScopedDataDocuments}, {@link countXmemoryOpCollectionDocuments}, {@link runXmemoryTierMongoAggregate},
|
|
304
|
+
* or your host’s direct Mongo count — keep **`database`** aligned with {@link XmemoryDataTier.env.opDb}. When the tier path fails,
|
|
305
|
+
* **surface** errors instead of silently falling back (hosts such as Graphs Studio should not swallow {@link countXmemoryOpCollectionDocuments}
|
|
306
|
+
* failures — it throws if `mongoClient.countMany` is missing for non–views collections).
|
|
307
|
+
*/
|
|
308
|
+
export function buildXScopedDataEntityTypeFilter(catalogId) {
|
|
309
|
+
return {
|
|
310
|
+
$or: [{ entityType: catalogId }, { entity_type: catalogId }],
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Mongo filter for Memorix **scoped views** (`tier.env.viewsCollection`) by entity / thing type.
|
|
315
|
+
* Aligns with default {@link getXmemoryTierStatistics} paths for **`scoped_views`** (`aboutThingType`, nested metadata).
|
|
316
|
+
*/
|
|
317
|
+
export function buildXScopedViewEntityTypeFilter(entityType) {
|
|
318
|
+
return {
|
|
319
|
+
$or: [{ aboutThingType: entityType }, { 'metadata.aboutThingType': entityType }],
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Mongo filter for Memorix **x-snapshots** (`tier.env.snapshotsCollection`) by embedded snapshot entity type.
|
|
324
|
+
* Aligns with default tier statistics path `$_snapshot.entityType`; includes snake_case variant when present on docs.
|
|
325
|
+
*/
|
|
326
|
+
export function buildXMemorixSnapshotEntityTypeFilter(entityType) {
|
|
327
|
+
return {
|
|
328
|
+
$or: [{ '_snapshot.entityType': entityType }, { '_snapshot.entity_type': entityType }],
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Mongo filter for **things** matching tier statistics default buckets (`thingType` / header layout).
|
|
333
|
+
*/
|
|
334
|
+
export function buildXThingEntityTypeFilter(entityType) {
|
|
335
|
+
return {
|
|
336
|
+
$or: [{ thingType: entityType }, { '_header.thingType': entityType }],
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
//# sourceMappingURL=xmemory-op-tier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xmemory-op-tier.js","sourceRoot":"","sources":["../../src/execution-matrix/xmemory-op-tier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACL,iCAAiC,EACjC,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AAInC,OAAO,EACL,mBAAmB,EACnB,8BAA8B,EAC9B,4BAA4B,EAC5B,iCAAiC,EACjC,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AAEnC,wFAAwF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KAAK,UAAU,4BAA4B,CAChD,IAAqB,EACrB,MAIC;IAED,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;IAC3F,CAAC;IACD,OAAO,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;AACxC,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gCAAgC,CAAC,SAAiB;IAChE,OAAO;QACL,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC;KAC7D,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,gCAAgC,CAAC,UAAkB;IACjE,OAAO;QACL,GAAG,EAAE,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,EAAE,EAAE,yBAAyB,EAAE,UAAU,EAAE,CAAC;KACjF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qCAAqC,CAAC,UAAkB;IACtE,OAAO;QACL,GAAG,EAAE,CAAC,EAAE,sBAAsB,EAAE,UAAU,EAAE,EAAE,EAAE,uBAAuB,EAAE,UAAU,EAAE,CAAC;KACvF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,2BAA2B,CAAC,UAAkB;IAC5D,OAAO;QACL,GAAG,EAAE,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,EAAE,mBAAmB,EAAE,UAAU,EAAE,CAAC;KACtE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xmemory-op-tier.spec.d.ts","sourceRoot":"","sources":["../../src/execution-matrix/xmemory-op-tier.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
2
|
+
import { FIND_MANY_MAX_SKIP, buildXMemorixSnapshotEntityTypeFilter, buildXScopedDataEntityTypeFilter, buildXScopedViewEntityTypeFilter, buildXThingEntityTypeFilter, countXmemoryOpCollectionDocuments, countXmemoryOpScopedViews, countXmemoryTierScopedDataDocuments, fetchAllXmemoryOpScopedViews, getXmemoryOpScopedViewsCollection, getXmemoryTierScopedDataCollectionName, listXmemoryOpCollectionDocumentsPaged, listXmemoryOpScopedViews, listXmemoryOpScopedViewsPaged, listXmemoryTierScopedDataPaged, listXmemoryTierThingsPaged, runXmemoryTierMongoAggregate, } from './xmemory-op-tier.js';
|
|
3
|
+
function mockTier(overrides) {
|
|
4
|
+
const readMany = overrides?.readMany ?? vi.fn().mockResolvedValue([]);
|
|
5
|
+
const countMatching = overrides?.countMatching ?? vi.fn().mockResolvedValue(0);
|
|
6
|
+
const findMany = overrides?.findMany ?? vi.fn().mockResolvedValue([]);
|
|
7
|
+
const countMany = overrides?.countMany ?? vi.fn().mockResolvedValue(0);
|
|
8
|
+
return {
|
|
9
|
+
env: {
|
|
10
|
+
opDb: 'xmemory_op',
|
|
11
|
+
viewsCollection: 'scoped_views',
|
|
12
|
+
scopedDataCollection: 'x-scoped-data',
|
|
13
|
+
snapshotsCollection: 'x-snapshots',
|
|
14
|
+
mapsDb: 'm',
|
|
15
|
+
thingsDb: 't',
|
|
16
|
+
mapsCollection: 'maps',
|
|
17
|
+
mappedQuestionsCollection: 'mq',
|
|
18
|
+
thingsCollection: 'things',
|
|
19
|
+
mongoUri: 'mongodb://',
|
|
20
|
+
metaDb: 'm',
|
|
21
|
+
},
|
|
22
|
+
opStore: {
|
|
23
|
+
collection: (name) => {
|
|
24
|
+
expect(name).toBe('scoped_views');
|
|
25
|
+
return { readMany, countMatching };
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
mongoClient: { findMany, countMany },
|
|
29
|
+
runMongoAggregate: vi.fn().mockResolvedValue([]),
|
|
30
|
+
mapsStore: {},
|
|
31
|
+
corpusStore: {},
|
|
32
|
+
metaStore: {},
|
|
33
|
+
storeBindings: {},
|
|
34
|
+
init: vi.fn(),
|
|
35
|
+
close: vi.fn(),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
describe('buildXScopedDataEntityTypeFilter', () => {
|
|
39
|
+
it('matches entityType or entity_type', () => {
|
|
40
|
+
expect(buildXScopedDataEntityTypeFilter('subnets-enriched')).toEqual({
|
|
41
|
+
$or: [{ entityType: 'subnets-enriched' }, { entity_type: 'subnets-enriched' }],
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
describe('buildXScopedViewEntityTypeFilter', () => {
|
|
46
|
+
it('matches aboutThingType paths', () => {
|
|
47
|
+
expect(buildXScopedViewEntityTypeFilter('t1')).toEqual({
|
|
48
|
+
$or: [{ aboutThingType: 't1' }, { 'metadata.aboutThingType': 't1' }],
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
describe('buildXMemorixSnapshotEntityTypeFilter', () => {
|
|
53
|
+
it('matches _snapshot entity type paths', () => {
|
|
54
|
+
expect(buildXMemorixSnapshotEntityTypeFilter('t1')).toEqual({
|
|
55
|
+
$or: [{ '_snapshot.entityType': 't1' }, { '_snapshot.entity_type': 't1' }],
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
describe('buildXThingEntityTypeFilter', () => {
|
|
60
|
+
it('matches thingType paths', () => {
|
|
61
|
+
expect(buildXThingEntityTypeFilter('t1')).toEqual({
|
|
62
|
+
$or: [{ thingType: 't1' }, { '_header.thingType': 't1' }],
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
describe('getXmemoryOpScopedViewsCollection', () => {
|
|
67
|
+
it('returns opStore collection for views', () => {
|
|
68
|
+
const tier = mockTier();
|
|
69
|
+
const coll = getXmemoryOpScopedViewsCollection(tier);
|
|
70
|
+
expect(coll.readMany).toBeDefined();
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
describe('listXmemoryOpScopedViews / countXmemoryOpScopedViews', () => {
|
|
74
|
+
it('delegates to xronox collection', async () => {
|
|
75
|
+
const readMany = vi.fn().mockResolvedValue([{ scopedViewKey: 'a' }]);
|
|
76
|
+
const countMatching = vi.fn().mockResolvedValue(7);
|
|
77
|
+
const tier = mockTier({ readMany, countMatching });
|
|
78
|
+
await expect(listXmemoryOpScopedViews(tier, { filter: { status: 'ok' }, limit: 5 })).resolves.toHaveLength(1);
|
|
79
|
+
expect(readMany).toHaveBeenCalledWith({ status: 'ok' }, { limit: 5, mergeCache: true, sort: undefined });
|
|
80
|
+
await expect(countXmemoryOpScopedViews(tier, { x: 1 })).resolves.toBe(7);
|
|
81
|
+
expect(countMatching).toHaveBeenCalledWith({ x: 1 }, undefined);
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
describe('listXmemoryOpScopedViewsPaged', () => {
|
|
85
|
+
it('uses mongoClient.findMany on op db', async () => {
|
|
86
|
+
const findMany = vi.fn().mockResolvedValue([{ _id: '1' }]);
|
|
87
|
+
const tier = mockTier({ findMany });
|
|
88
|
+
const rows = await listXmemoryOpScopedViewsPaged(tier, { skip: 10, limit: 20, filter: { z: 2 } });
|
|
89
|
+
expect(rows).toHaveLength(1);
|
|
90
|
+
expect(findMany).toHaveBeenCalledWith({
|
|
91
|
+
database: 'xmemory_op',
|
|
92
|
+
collection: 'scoped_views',
|
|
93
|
+
filter: { z: 2 },
|
|
94
|
+
limit: 20,
|
|
95
|
+
skip: 10,
|
|
96
|
+
projection: undefined,
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
it('rejects skip beyond policy', async () => {
|
|
100
|
+
const tier = mockTier();
|
|
101
|
+
await expect(listXmemoryOpScopedViewsPaged(tier, { skip: FIND_MANY_MAX_SKIP + 1, limit: 1 })).rejects.toThrow(/FIND_MANY_MAX_SKIP/);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
describe('countXmemoryOpCollectionDocuments', () => {
|
|
105
|
+
it('uses countMany for non-views collection names', async () => {
|
|
106
|
+
const countMany = vi.fn().mockResolvedValue(3);
|
|
107
|
+
const tier = mockTier({ countMany });
|
|
108
|
+
await expect(countXmemoryOpCollectionDocuments(tier, 'other_coll', { a: 1 })).resolves.toBe(3);
|
|
109
|
+
expect(countMany).toHaveBeenCalledWith({
|
|
110
|
+
database: 'xmemory_op',
|
|
111
|
+
collection: 'other_coll',
|
|
112
|
+
filter: { a: 1 },
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
it('uses xronox countMatching for scoped_views', async () => {
|
|
116
|
+
const countMatching = vi.fn().mockResolvedValue(9);
|
|
117
|
+
const tier = mockTier({ countMatching });
|
|
118
|
+
await expect(countXmemoryOpCollectionDocuments(tier, 'scoped_views')).resolves.toBe(9);
|
|
119
|
+
expect(countMatching).toHaveBeenCalled();
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
describe('fetchAllXmemoryOpScopedViews', () => {
|
|
123
|
+
it('pages until empty', async () => {
|
|
124
|
+
const findMany = vi
|
|
125
|
+
.fn()
|
|
126
|
+
.mockResolvedValueOnce([{ k: 1 }, { k: 2 }])
|
|
127
|
+
.mockResolvedValueOnce([{ k: 3 }])
|
|
128
|
+
.mockResolvedValueOnce([]);
|
|
129
|
+
const tier = mockTier({ findMany });
|
|
130
|
+
const all = await fetchAllXmemoryOpScopedViews(tier, { pageSize: 2, maxRows: 100 });
|
|
131
|
+
expect(all).toHaveLength(3);
|
|
132
|
+
expect(findMany).toHaveBeenCalledTimes(3);
|
|
133
|
+
expect(findMany.mock.calls[1][0].skip).toBe(2);
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
describe('listXmemoryOpCollectionDocumentsPaged', () => {
|
|
137
|
+
it('targets op db and collection', async () => {
|
|
138
|
+
const findMany = vi.fn().mockResolvedValue([]);
|
|
139
|
+
const tier = mockTier({ findMany });
|
|
140
|
+
await listXmemoryOpCollectionDocumentsPaged(tier, 'custom', { limit: 1, skip: 0 });
|
|
141
|
+
expect(findMany).toHaveBeenCalledWith(expect.objectContaining({
|
|
142
|
+
database: 'xmemory_op',
|
|
143
|
+
collection: 'custom',
|
|
144
|
+
}));
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
describe('tier scoped-data helpers', () => {
|
|
148
|
+
it('uses env.scopedDataCollection for count + paged reads', async () => {
|
|
149
|
+
const countMany = vi.fn().mockResolvedValue(4);
|
|
150
|
+
const findMany = vi.fn().mockResolvedValue([{ _id: 'a' }]);
|
|
151
|
+
const tier = mockTier({ countMany, findMany });
|
|
152
|
+
expect(getXmemoryTierScopedDataCollectionName(tier)).toBe('x-scoped-data');
|
|
153
|
+
await expect(countXmemoryTierScopedDataDocuments(tier, { k: 1 })).resolves.toBe(4);
|
|
154
|
+
expect(countMany).toHaveBeenCalledWith({
|
|
155
|
+
database: 'xmemory_op',
|
|
156
|
+
collection: 'x-scoped-data',
|
|
157
|
+
filter: { k: 1 },
|
|
158
|
+
});
|
|
159
|
+
await listXmemoryTierScopedDataPaged(tier, { skip: 2, limit: 10 });
|
|
160
|
+
expect(findMany).toHaveBeenCalledWith(expect.objectContaining({
|
|
161
|
+
database: 'xmemory_op',
|
|
162
|
+
collection: 'x-scoped-data',
|
|
163
|
+
skip: 2,
|
|
164
|
+
limit: 10,
|
|
165
|
+
}));
|
|
166
|
+
});
|
|
167
|
+
it('delegates runXmemoryTierMongoAggregate', async () => {
|
|
168
|
+
const aggMock = vi.fn().mockResolvedValue([{ n: 1 }]);
|
|
169
|
+
const tier = { ...mockTier(), runMongoAggregate: aggMock };
|
|
170
|
+
await expect(runXmemoryTierMongoAggregate(tier, {
|
|
171
|
+
database: 'xmemory_op',
|
|
172
|
+
collection: 'x-scoped-data',
|
|
173
|
+
pipeline: [{ $limit: 1 }],
|
|
174
|
+
})).resolves.toEqual([{ n: 1 }]);
|
|
175
|
+
expect(aggMock).toHaveBeenCalledWith({
|
|
176
|
+
database: 'xmemory_op',
|
|
177
|
+
collection: 'x-scoped-data',
|
|
178
|
+
pipeline: [{ $limit: 1 }],
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
describe('listXmemoryTierThingsPaged', () => {
|
|
183
|
+
it('uses mongoClient.findMany on things db', async () => {
|
|
184
|
+
const findMany = vi.fn().mockResolvedValue([{ id: '1' }]);
|
|
185
|
+
const tier = mockTier({ findMany });
|
|
186
|
+
const rows = await listXmemoryTierThingsPaged(tier, { skip: 1, limit: 5, filter: { x: 1 } });
|
|
187
|
+
expect(rows).toHaveLength(1);
|
|
188
|
+
expect(findMany).toHaveBeenCalledWith({
|
|
189
|
+
database: 't',
|
|
190
|
+
collection: 'things',
|
|
191
|
+
filter: { x: 1 },
|
|
192
|
+
limit: 5,
|
|
193
|
+
skip: 1,
|
|
194
|
+
projection: undefined,
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
//# sourceMappingURL=xmemory-op-tier.spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xmemory-op-tier.spec.js","sourceRoot":"","sources":["../../src/execution-matrix/xmemory-op-tier.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAElD,OAAO,EACL,kBAAkB,EAClB,qCAAqC,EACrC,gCAAgC,EAChC,gCAAgC,EAChC,2BAA2B,EAC3B,iCAAiC,EACjC,yBAAyB,EACzB,mCAAmC,EACnC,4BAA4B,EAC5B,iCAAiC,EACjC,sCAAsC,EACtC,qCAAqC,EACrC,wBAAwB,EACxB,6BAA6B,EAC7B,8BAA8B,EAC9B,0BAA0B,EAC1B,4BAA4B,GAC7B,MAAM,sBAAsB,CAAC;AAE9B,SAAS,QAAQ,CAAC,SAKjB;IACC,MAAM,QAAQ,GAAG,SAAS,EAAE,QAAQ,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC;IACtE,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C,oBAAoB,CAAC;YACpC,QAAQ,EAAE,GAAG;YACb,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE;YAChB,KAAK,EAAE,CAAC;YACR,IAAI,EAAE,CAAC;YACP,UAAU,EAAE,SAAS;SACtB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **Internal** — Mongo + `@x12i/xronox-store` wiring for execution-matrix operational DB and config DB.
|
|
3
|
+
*
|
|
4
|
+
* Hosts should use **`createExellixMatrixDataTier`** from the package root, not this module.
|
|
5
|
+
* This file remains for advanced callers and the **`./internal/xronox-matrix`** export subpath.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
import { XronoxStore } from '@x12i/xronox-store';
|
|
10
|
+
import { type ExecutionMatrixRuntime } from './runtime-store.js';
|
|
11
|
+
import { type ExellixConfigStore } from './config-store.js';
|
|
12
|
+
export type XronoxMongoDriverPassThroughOption = {
|
|
13
|
+
mongoDriverPassThrough?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export type CreateExecutionMatrixRuntimeFromXronoxOptions = XronoxMongoDriverPassThroughOption & {
|
|
16
|
+
mongoUri?: string;
|
|
17
|
+
mongoDb?: string;
|
|
18
|
+
mongoRole?: string;
|
|
19
|
+
serializeClaims?: boolean;
|
|
20
|
+
};
|
|
21
|
+
export type CreateExecutionMatrixRuntimeFromXronoxResult = {
|
|
22
|
+
store: XronoxStore;
|
|
23
|
+
runtime: ExecutionMatrixRuntime;
|
|
24
|
+
closeMongoDriverPassThrough?: () => Promise<void>;
|
|
25
|
+
};
|
|
26
|
+
export declare function createExecutionMatrixRuntimeFromXronox(options: CreateExecutionMatrixRuntimeFromXronoxOptions): Promise<CreateExecutionMatrixRuntimeFromXronoxResult>;
|
|
27
|
+
export type CreateExellixConfigStoreFromXronoxOptions = XronoxMongoDriverPassThroughOption & {
|
|
28
|
+
mongoUri?: string;
|
|
29
|
+
mongoDb?: string;
|
|
30
|
+
mongoRole?: string;
|
|
31
|
+
};
|
|
32
|
+
export type CreateExellixConfigStoreFromXronoxResult = {
|
|
33
|
+
store: XronoxStore;
|
|
34
|
+
configStore: ExellixConfigStore;
|
|
35
|
+
closeMongoDriverPassThrough?: () => Promise<void>;
|
|
36
|
+
};
|
|
37
|
+
export declare function createExellixConfigStoreFromXronox(options: CreateExellixConfigStoreFromXronoxOptions): Promise<CreateExellixConfigStoreFromXronoxResult>;
|
|
38
|
+
//# sourceMappingURL=xronox-matrix-factory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xronox-matrix-factory.d.ts","sourceRoot":"","sources":["../../src/execution-matrix/xronox-matrix-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAUjD,OAAO,EAAgC,KAAK,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC/F,OAAO,EAA4B,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGtF,MAAM,MAAM,kCAAkC,GAAG;IAC/C,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,6CAA6C,GAAG,kCAAkC,GAAG;IAC/F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,4CAA4C,GAAG;IACzD,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,sBAAsB,CAAC;IAChC,2BAA2B,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACnD,CAAC;AAEF,wBAAsB,sCAAsC,CAC1D,OAAO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