@x12i/memorix-descriptors 1.4.1 → 1.4.5
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 +26 -21
- package/dist/admin/control-plane.d.ts +12 -3
- package/dist/admin/control-plane.d.ts.map +1 -1
- package/dist/admin/control-plane.js +25 -8
- package/dist/admin/control-plane.js.map +1 -1
- package/dist/admin/create-admin.d.ts +16 -1
- package/dist/admin/create-admin.d.ts.map +1 -1
- package/dist/admin/create-admin.js +29 -7
- package/dist/admin/create-admin.js.map +1 -1
- package/dist/cli/index.js +139 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/collections/collection-name.d.ts +16 -0
- package/dist/collections/collection-name.d.ts.map +1 -0
- package/dist/collections/collection-name.js +28 -0
- package/dist/collections/collection-name.js.map +1 -0
- package/dist/collections/create-xronox-from-env.d.ts +6 -0
- package/dist/collections/create-xronox-from-env.d.ts.map +1 -0
- package/dist/collections/create-xronox-from-env.js +23 -0
- package/dist/collections/create-xronox-from-env.js.map +1 -0
- package/dist/collections/env-bridge.d.ts +1 -2
- package/dist/collections/env-bridge.d.ts.map +1 -1
- package/dist/collections/env-bridge.js +1 -7
- package/dist/collections/env-bridge.js.map +1 -1
- package/dist/collections/mongo-create.js +1 -1
- package/dist/collections/mongo-create.js.map +1 -1
- package/dist/collections/mongo-env.d.ts +8 -0
- package/dist/collections/mongo-env.d.ts.map +1 -0
- package/dist/collections/mongo-env.js +79 -0
- package/dist/collections/mongo-env.js.map +1 -0
- package/dist/collections/resolve.d.ts +3 -2
- package/dist/collections/resolve.d.ts.map +1 -1
- package/dist/collections/resolve.js +2 -2
- package/dist/collections/resolve.js.map +1 -1
- package/dist/collections/xronox-like.d.ts +38 -0
- package/dist/collections/xronox-like.d.ts.map +1 -0
- package/dist/collections/xronox-like.js +2 -0
- package/dist/collections/xronox-like.js.map +1 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/mutations/common.d.ts +7 -4
- package/dist/mutations/common.d.ts.map +1 -1
- package/dist/mutations/common.js +54 -3
- package/dist/mutations/common.js.map +1 -1
- package/dist/mutations/entity.d.ts +1 -1
- package/dist/mutations/entity.d.ts.map +1 -1
- package/dist/mutations/entity.js +5 -1
- package/dist/mutations/entity.js.map +1 -1
- package/dist/mutations/execute.d.ts.map +1 -1
- package/dist/mutations/execute.js +9 -1
- package/dist/mutations/execute.js.map +1 -1
- package/dist/mutations/item.d.ts.map +1 -1
- package/dist/mutations/item.js +5 -1
- package/dist/mutations/item.js.map +1 -1
- package/dist/mutations/list.js +8 -1
- package/dist/mutations/list.js.map +1 -1
- package/dist/reconcile/index.d.ts +3 -3
- package/dist/reconcile/index.d.ts.map +1 -1
- package/dist/reconcile/index.js +8 -7
- package/dist/reconcile/index.js.map +1 -1
- package/dist/reconcile/inventory-types.d.ts +81 -0
- package/dist/reconcile/inventory-types.d.ts.map +1 -0
- package/dist/reconcile/inventory-types.js +6 -0
- package/dist/reconcile/inventory-types.js.map +1 -0
- package/dist/reconcile/suggestions.d.ts +1 -1
- package/dist/reconcile/suggestions.d.ts.map +1 -1
- package/dist/reconcile/types.d.ts +3 -1
- package/dist/reconcile/types.d.ts.map +1 -1
- package/dist/reconcile/unified-inventory.d.ts +15 -0
- package/dist/reconcile/unified-inventory.d.ts.map +1 -0
- package/dist/reconcile/unified-inventory.js +540 -0
- package/dist/reconcile/unified-inventory.js.map +1 -0
- package/dist/seeds/build-manifest.d.ts +8 -0
- package/dist/seeds/build-manifest.d.ts.map +1 -0
- package/dist/seeds/build-manifest.js +83 -0
- package/dist/seeds/build-manifest.js.map +1 -0
- package/dist/seeds/default-seed-spec.d.ts +12 -0
- package/dist/seeds/default-seed-spec.d.ts.map +1 -0
- package/dist/seeds/default-seed-spec.js +90 -0
- package/dist/seeds/default-seed-spec.js.map +1 -0
- package/dist/seeds/index.d.ts +5 -2
- package/dist/seeds/index.d.ts.map +1 -1
- package/dist/seeds/index.js +4 -1
- package/dist/seeds/index.js.map +1 -1
- package/dist/seeds/merge-for-apply.d.ts +28 -0
- package/dist/seeds/merge-for-apply.d.ts.map +1 -0
- package/dist/seeds/merge-for-apply.js +31 -0
- package/dist/seeds/merge-for-apply.js.map +1 -0
- package/dist/seeds/seed-types.d.ts +57 -0
- package/dist/seeds/seed-types.d.ts.map +1 -0
- package/dist/seeds/seed-types.js +2 -0
- package/dist/seeds/seed-types.js.map +1 -0
- package/dist/source/action-drafts.d.ts +17 -0
- package/dist/source/action-drafts.d.ts.map +1 -0
- package/dist/source/action-drafts.js +191 -0
- package/dist/source/action-drafts.js.map +1 -0
- package/dist/source/aliases.d.ts +23 -0
- package/dist/source/aliases.d.ts.map +1 -0
- package/dist/source/aliases.js +60 -0
- package/dist/source/aliases.js.map +1 -0
- package/dist/source/catalog-health.d.ts +17 -0
- package/dist/source/catalog-health.d.ts.map +1 -0
- package/dist/source/catalog-health.js +87 -0
- package/dist/source/catalog-health.js.map +1 -0
- package/dist/source/envelope.d.ts +29 -0
- package/dist/source/envelope.d.ts.map +1 -0
- package/dist/source/envelope.js +125 -0
- package/dist/source/envelope.js.map +1 -0
- package/dist/source/graph.d.ts +12 -0
- package/dist/source/graph.d.ts.map +1 -0
- package/dist/source/graph.js +148 -0
- package/dist/source/graph.js.map +1 -0
- package/dist/source/guards.d.ts +7 -0
- package/dist/source/guards.d.ts.map +1 -0
- package/dist/source/guards.js +74 -0
- package/dist/source/guards.js.map +1 -0
- package/dist/source/index.d.ts +14 -0
- package/dist/source/index.d.ts.map +1 -0
- package/dist/source/index.js +14 -0
- package/dist/source/index.js.map +1 -0
- package/dist/source/inspectable.d.ts +11 -0
- package/dist/source/inspectable.d.ts.map +1 -0
- package/dist/source/inspectable.js +167 -0
- package/dist/source/inspectable.js.map +1 -0
- package/dist/source/reconcile-source.d.ts +10 -0
- package/dist/source/reconcile-source.d.ts.map +1 -0
- package/dist/source/reconcile-source.js +40 -0
- package/dist/source/reconcile-source.js.map +1 -0
- package/dist/source/registry.d.ts +11 -0
- package/dist/source/registry.d.ts.map +1 -0
- package/dist/source/registry.js +114 -0
- package/dist/source/registry.js.map +1 -0
- package/dist/source/snapshot.d.ts +15 -0
- package/dist/source/snapshot.d.ts.map +1 -0
- package/dist/source/snapshot.js +160 -0
- package/dist/source/snapshot.js.map +1 -0
- package/dist/source/types.d.ts +222 -0
- package/dist/source/types.d.ts.map +1 -0
- package/dist/source/types.js +2 -0
- package/dist/source/types.js.map +1 -0
- package/dist/source/validation.d.ts +12 -0
- package/dist/source/validation.d.ts.map +1 -0
- package/dist/source/validation.js +229 -0
- package/dist/source/validation.js.map +1 -0
- package/dist/tests/retrieval-free-subpaths.test.js +4 -0
- package/dist/tests/retrieval-free-subpaths.test.js.map +1 -1
- package/dist/tests/seeds.test.js +4 -4
- package/dist/tests/seeds.test.js.map +1 -1
- package/dist/tests/source-aware.test.d.ts +2 -0
- package/dist/tests/source-aware.test.d.ts.map +1 -0
- package/dist/tests/source-aware.test.js +222 -0
- package/dist/tests/source-aware.test.js.map +1 -0
- package/dist/tests/unified-inventory.test.d.ts +2 -0
- package/dist/tests/unified-inventory.test.d.ts.map +1 -0
- package/dist/tests/unified-inventory.test.js +53 -0
- package/dist/tests/unified-inventory.test.js.map +1 -0
- package/dist/types/descriptors.d.ts +228 -0
- package/dist/types/descriptors.d.ts.map +1 -0
- package/dist/types/descriptors.js +2 -0
- package/dist/types/descriptors.js.map +1 -0
- package/dist/types/index.d.ts +26 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/validation/descriptor-validation.d.ts +1 -1
- package/docs/MEMORIX-CATALOX-CATALOG-MAP.md +589 -0
- package/docs/MEMORIX-CATALOX-CONTRACTS.md +17 -10
- package/docs/MEMORIX-DATABASE-CONVENTIONS.md +10 -7
- package/docs/MEMORIX-OBJECT-TYPES-AND-TARGETS.md +207 -0
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -21,21 +21,19 @@ Hosts (Explorer Admin, CI, CLI, internal tools)
|
|
|
21
21
|
| Create/update/delete descriptors and mappings in Catalox | `@x12i/memorix-descriptors` |
|
|
22
22
|
| Write Memorix payload documents to Mongo | `@x12i/memorix-completion` |
|
|
23
23
|
|
|
24
|
-
Canonical contracts: [`docs/MEMORIX-CATALOX-CONTRACTS.md`](docs/MEMORIX-CATALOX-CONTRACTS.md), [`docs/MEMORIX-DATABASE-CONVENTIONS.md`](docs/MEMORIX-DATABASE-CONVENTIONS.md).
|
|
24
|
+
Canonical contracts: [`docs/MEMORIX-CATALOX-CONTRACTS.md`](docs/MEMORIX-CATALOX-CONTRACTS.md), [`docs/MEMORIX-DATABASE-CONVENTIONS.md`](docs/MEMORIX-DATABASE-CONVENTIONS.md). **Object types vs storage targets** (naming cleanup): [`docs/MEMORIX-OBJECT-TYPES-AND-TARGETS.md`](docs/MEMORIX-OBJECT-TYPES-AND-TARGETS.md).
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
28
|
## Install
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
npm install @x12i/memorix-descriptors @x12i/catalox
|
|
31
|
+
npm install @x12i/memorix-descriptors @x12i/catalox
|
|
32
32
|
# Optional, for Mongo inventory / reconcile:
|
|
33
33
|
npm install @x12i/xronox
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
Install the retrieval peer from the **npm registry** in CI and monorepos — do not use `file:../memorix-retrieval` in `devDependencies` (causes TypeScript circular build errors with the main `"."` export).
|
|
36
|
+
Optional peer: `@x12i/xronox` ≥3.9 for Mongo inventory / reconcile. This package does **not** depend on `@x12i/memorix-retrieval`.
|
|
39
37
|
|
|
40
38
|
---
|
|
41
39
|
|
|
@@ -43,7 +41,7 @@ Install the retrieval peer from the **npm registry** in CI and monorepos — do
|
|
|
43
41
|
|
|
44
42
|
The main entry re-exports the full write-side surface (mutations, seeds, reconcile, CLI helpers).
|
|
45
43
|
|
|
46
|
-
**Retrieval-safe subpaths**
|
|
44
|
+
**Retrieval-safe subpaths** — for `@x12i/memorix-retrieval` and other read-side consumers that must not import the main `"."` entry (avoids TS5055 cycles):
|
|
47
45
|
|
|
48
46
|
| Subpath | Symbols | Use |
|
|
49
47
|
|---------|---------|-----|
|
|
@@ -109,21 +107,28 @@ const { retrieval, descriptors } = await createMemorixControlPlaneFromEnv();
|
|
|
109
107
|
// descriptors — MemorixDescriptorAdmin (mutations, reconcile, applyReconcileDraft)
|
|
110
108
|
```
|
|
111
109
|
|
|
112
|
-
Uses
|
|
110
|
+
Uses shared Catalox + optional Xronox from env — no `@x12i/memorix-retrieval` import. The `retrieval` key exposes a compatible `{ appId, cataloxBound, catalox, client }` stack for inventory/reconcile wiring; `client` is a `UnifiedInventoryContext` for `buildMemorixUnifiedInventory`.
|
|
113
111
|
|
|
114
112
|
---
|
|
115
113
|
|
|
116
|
-
##
|
|
114
|
+
## Catalog object types and storage targets
|
|
115
|
+
|
|
116
|
+
Memorix overloads the word **entity**. Use this split:
|
|
117
|
+
|
|
118
|
+
| Concept | Examples | Where |
|
|
119
|
+
|---------|----------|--------|
|
|
120
|
+
| **Catalog object type** | `assets`, `vulnerabilities`, `variabilities-groups` | Catalox `memorix-entity-descriptors` (field `entityName` today) |
|
|
121
|
+
| **Storage target** | `entity`, `event`, `knowledge` | Descriptor field `target` → Mongo DB |
|
|
117
122
|
|
|
118
|
-
|
|
123
|
+
| Target | Default DB | Identity field | Typical object types |
|
|
124
|
+
|--------|------------|----------------|----------------------|
|
|
125
|
+
| `entity` | `memorix-entities` | `entityId` | `assets`, `variabilities-groups` |
|
|
126
|
+
| `event` | `memorix-events` | `eventId` | `vulnerabilities` (findings / timeline) |
|
|
127
|
+
| `knowledge` | `memorix-knowledge` | `knowledgeId` | (ecosystem rollout) |
|
|
119
128
|
|
|
120
|
-
|
|
121
|
-
|--------|------------|----------------|-------------|
|
|
122
|
-
| `entity` | `memorix-entities` | `entityId` | Stable domain objects (assets, groups) |
|
|
123
|
-
| `event` | `memorix-events` | `eventId` | Detections, timeline (vulnerabilities) |
|
|
124
|
-
| `knowledge` | `memorix-knowledge` | `knowledgeId` | Narratives, playbooks, curated facts |
|
|
129
|
+
**Not the same:** Mongo DB `memorix-entities`, legacy Catalox catalog `memorix-entities`, and catalog `memorix-entity-descriptors` are three different things. Full glossary and rename roadmap: [`docs/MEMORIX-OBJECT-TYPES-AND-TARGETS.md`](docs/MEMORIX-OBJECT-TYPES-AND-TARGETS.md).
|
|
125
130
|
|
|
126
|
-
This package accepts `target: "knowledge"` on
|
|
131
|
+
This package accepts `target: "knowledge"` on object type descriptors and mappings. Full ecosystem support (retrieval discovery, Xronox presets, env keys) is coordinated via a separate contract bump across packages.
|
|
127
132
|
|
|
128
133
|
---
|
|
129
134
|
|
|
@@ -133,7 +138,7 @@ Do not introduce parallel catalog ids (per contracts).
|
|
|
133
138
|
|
|
134
139
|
| Catalog id | Descriptor type | Managed by |
|
|
135
140
|
|------------|-----------------|------------|
|
|
136
|
-
| `memorix-entity-descriptors` |
|
|
141
|
+
| `memorix-entity-descriptors` | Object type descriptor (legacy catalog id) | ✅ |
|
|
137
142
|
| `memorix-list-descriptors` | List descriptor (entity + workspace) | ✅ |
|
|
138
143
|
| `memorix-item-descriptors` | Item descriptor | ✅ |
|
|
139
144
|
| `memorix-completion-mappings` | Completion source → target maps | ✅ (optional catalog; missing catalog is treated as empty) |
|
|
@@ -313,7 +318,7 @@ Shape: `MemorixCompletionMapping` (see `src/types/index.ts` and `MEMORIX-DATABAS
|
|
|
313
318
|
|
|
314
319
|
### Seed import / export
|
|
315
320
|
|
|
316
|
-
Compatible with
|
|
321
|
+
Compatible with the standard Memorix `catalox-seeds/inputs/` layout (also used by `@x12i/memorix-retrieval`):
|
|
317
322
|
|
|
318
323
|
```
|
|
319
324
|
catalox-seeds/inputs/
|
|
@@ -332,13 +337,13 @@ catalox-seeds/inputs/
|
|
|
332
337
|
| `importDescriptorSeedInputs(dir, { dryRun?, scope? })` | Validate + upsert |
|
|
333
338
|
| `applyDescriptorSeedManifest(manifest, { dryRun?, force? })` | Upsert manifest items (scope merged into data) |
|
|
334
339
|
|
|
335
|
-
Uses `mergeSeedItemScopeIntoUpsertData`
|
|
340
|
+
Uses local `mergeSeedItemScopeIntoUpsertData` for apply shape.
|
|
336
341
|
|
|
337
342
|
---
|
|
338
343
|
|
|
339
344
|
### Mongo reconciliation
|
|
340
345
|
|
|
341
|
-
Uses **`buildMemorixUnifiedInventory`**
|
|
346
|
+
Uses **`buildMemorixUnifiedInventory`** implemented in this package (same shape as retrieval's Inventory UI). Legacy `buildMemorixCollectionInventory` is no longer used. Hosts may pass pre-built inventory from `@x12i/memorix-retrieval` or build via `admin.reconcileDescriptorsWithMongo()`.
|
|
342
347
|
|
|
343
348
|
```typescript
|
|
344
349
|
const result = await admin.reconcileDescriptorsWithMongo({
|
|
@@ -492,7 +497,7 @@ Re-exported / extended validators (aligned with retrieval rules, plus `knowledge
|
|
|
492
497
|
|
|
493
498
|
### Retrieval-safe subpaths
|
|
494
499
|
|
|
495
|
-
See [Package exports](#package-exports). Subpath entry modules
|
|
500
|
+
See [Package exports](#package-exports). Subpath entry modules avoid importing the main `"."` write-side graph.
|
|
496
501
|
|
|
497
502
|
## Environment variables
|
|
498
503
|
|
|
@@ -521,7 +526,7 @@ npm run test:all # both
|
|
|
521
526
|
|
|
522
527
|
Live tests: Firestore connectivity, validate deployed graph, load smoke entity (`MEMORIX_SMOKE_ENTITY`, default `assets`), catalog listing, graph, collection resolve, dry-run `addProperty`. Reconcile live test requires `MONGO_URI` and asserts `MemorixUnifiedInventory` shape (`rows`, `issues`, `generatedAt`).
|
|
523
528
|
|
|
524
|
-
CI (`validate-descriptor-seeds` workflow) runs `npm ci
|
|
529
|
+
CI (`validate-descriptor-seeds` workflow) runs `npm ci` and `npm run build` with no retrieval dependency.
|
|
525
530
|
|
|
526
531
|
---
|
|
527
532
|
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { XronoxLike } from "../collections/xronox-like.js";
|
|
2
|
+
import type { CataloxBoundClient } from "../catalox/client.js";
|
|
2
3
|
import { type CreateMemorixDescriptorAdminOptions, type MemorixDescriptorAdmin } from "./create-admin.js";
|
|
4
|
+
import type { UnifiedInventoryContext } from "../reconcile/unified-inventory.js";
|
|
3
5
|
export type CreateMemorixControlPlaneFromEnvOptions = {
|
|
4
6
|
appId?: string;
|
|
5
7
|
processEnv?: NodeJS.ProcessEnv;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
xronox?: XronoxLike;
|
|
9
|
+
descriptorAdmin?: Omit<CreateMemorixDescriptorAdminOptions, "catalox" | "appId" | "processEnv" | "xronox">;
|
|
10
|
+
};
|
|
11
|
+
/** Compatible stack shape for hosts that wire inventory + Catalox without @x12i/memorix-retrieval. */
|
|
12
|
+
export type MemorixRetrievalStack = {
|
|
13
|
+
appId: string;
|
|
14
|
+
cataloxBound: CataloxBoundClient;
|
|
15
|
+
catalox: CataloxBoundClient;
|
|
16
|
+
client: UnifiedInventoryContext;
|
|
8
17
|
};
|
|
9
18
|
export type MemorixControlPlane = {
|
|
10
19
|
retrieval: MemorixRetrievalStack;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-plane.d.ts","sourceRoot":"","sources":["../../src/admin/control-plane.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"control-plane.d.ts","sourceRoot":"","sources":["../../src/admin/control-plane.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAEL,KAAK,mCAAmC,EACxC,KAAK,sBAAsB,EAC5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAEjF,MAAM,MAAM,uCAAuC,GAAG;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IAC/B,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,eAAe,CAAC,EAAE,IAAI,CACpB,mCAAmC,EACnC,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,CAC9C,CAAC;CACH,CAAC;AAEF,sGAAsG;AACtG,MAAM,MAAM,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,kBAAkB,CAAC;IACjC,OAAO,EAAE,kBAAkB,CAAC;IAC5B,MAAM,EAAE,uBAAuB,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,qBAAqB,CAAC;IACjC,WAAW,EAAE,sBAAsB,CAAC;CACrC,CAAC;AAEF,wBAAsB,gCAAgC,CACpD,OAAO,GAAE,uCAA4C,GACpD,OAAO,CAAC,mBAAmB,CAAC,CAsC9B"}
|
|
@@ -1,22 +1,39 @@
|
|
|
1
|
+
import { createCataloxFromEnv } from "@x12i/catalox/firebase";
|
|
2
|
+
import { resolveMemorixAppId } from "../catalog/ids.js";
|
|
3
|
+
import { createXronoxFromEnv } from "../collections/create-xronox-from-env.js";
|
|
1
4
|
import { createMemorixDescriptorAdmin, } from "./create-admin.js";
|
|
2
5
|
export async function createMemorixControlPlaneFromEnv(options = {}) {
|
|
3
6
|
const processEnv = options.processEnv ?? process.env;
|
|
4
|
-
const {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const appId = resolveMemorixAppId({ appId: options.appId }, processEnv);
|
|
8
|
+
const { catalox } = createCataloxFromEnv();
|
|
9
|
+
const cataloxBound = catalox.withContext({
|
|
10
|
+
appId,
|
|
11
|
+
actor: { type: "service", id: "memorix-descriptors" },
|
|
12
|
+
superAdmin: true,
|
|
9
13
|
});
|
|
14
|
+
const xronox = options.xronox ?? (await createXronoxFromEnv({ processEnv }));
|
|
10
15
|
const descriptors = createMemorixDescriptorAdmin({
|
|
11
|
-
catalox:
|
|
12
|
-
appId
|
|
16
|
+
catalox: cataloxBound,
|
|
17
|
+
appId,
|
|
13
18
|
processEnv,
|
|
14
|
-
xronox
|
|
19
|
+
xronox,
|
|
15
20
|
...options.descriptorAdmin,
|
|
16
21
|
});
|
|
17
22
|
if (processEnv.MEMORIX_ENSURE_DESCRIPTOR_CATALOGS === "1") {
|
|
18
23
|
await descriptors.ensureMemorixDescriptorCatalogs();
|
|
19
24
|
}
|
|
25
|
+
const retrieval = {
|
|
26
|
+
appId,
|
|
27
|
+
cataloxBound,
|
|
28
|
+
catalox: cataloxBound,
|
|
29
|
+
client: {
|
|
30
|
+
appId,
|
|
31
|
+
processEnv,
|
|
32
|
+
xronox,
|
|
33
|
+
catalox: cataloxBound,
|
|
34
|
+
snapshot: await descriptors.loadSnapshot(),
|
|
35
|
+
},
|
|
36
|
+
};
|
|
20
37
|
return { retrieval, descriptors };
|
|
21
38
|
}
|
|
22
39
|
//# sourceMappingURL=control-plane.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-plane.js","sourceRoot":"","sources":["../../src/admin/control-plane.ts"],"names":[],"mappings":"AACA,OAAO,EACL,4BAA4B,GAG7B,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"control-plane.js","sourceRoot":"","sources":["../../src/admin/control-plane.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAG/E,OAAO,EACL,4BAA4B,GAG7B,MAAM,mBAAmB,CAAC;AA0B3B,MAAM,CAAC,KAAK,UAAU,gCAAgC,CACpD,UAAmD,EAAE;IAErD,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC;IACrD,MAAM,KAAK,GAAG,mBAAmB,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,EAAE,UAAU,CAAC,CAAC;IACxE,MAAM,EAAE,OAAO,EAAE,GAAG,oBAAoB,EAAE,CAAC;IAC3C,MAAM,YAAY,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,KAAK;QACL,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE,qBAAqB,EAAE;QACrD,UAAU,EAAE,IAAI;KACjB,CAAiB,CAAC;IAEnB,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,mBAAmB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;IAE7E,MAAM,WAAW,GAAG,4BAA4B,CAAC;QAC/C,OAAO,EAAE,YAAY;QACrB,KAAK;QACL,UAAU;QACV,MAAM;QACN,GAAG,OAAO,CAAC,eAAe;KAC3B,CAAC,CAAC;IAEH,IAAI,UAAU,CAAC,kCAAkC,KAAK,GAAG,EAAE,CAAC;QAC1D,MAAM,WAAW,CAAC,+BAA+B,EAAE,CAAC;IACtD,CAAC;IAED,MAAM,SAAS,GAA0B;QACvC,KAAK;QACL,YAAY;QACZ,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE;YACN,KAAK;YACL,UAAU;YACV,MAAM;YACN,OAAO,EAAE,YAAY;YACrB,QAAQ,EAAE,MAAM,WAAW,CAAC,YAAY,EAAE;SAC3C;KACF,CAAC;IAEF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;AACpC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { XronoxLike } from "
|
|
1
|
+
import type { XronoxLike } from "../collections/xronox-like.js";
|
|
2
2
|
import type { CataloxBoundClient } from "../catalox/client.js";
|
|
3
3
|
import type { ContentTypeInput, DescriptorMutationOptions, MemorixCompletionMapping, PropertyInput, ReconcileDescriptorDraft, RegisterEntityDescriptorInput } from "../types/index.js";
|
|
4
4
|
import { registerEntityDescriptor, removeEntityDescriptor, updateEntityDescriptor } from "../mutations/entity.js";
|
|
@@ -14,6 +14,7 @@ import { registerMapping, removeMapping, updateMapping } from "../mutations/mapp
|
|
|
14
14
|
import { applyDescriptorSeedManifest, importDescriptorSeedInputs, type DescriptorSeedManifest } from "../seeds/index.js";
|
|
15
15
|
import { applyReconcileDraft, type ReconcileDescriptorsOptions, type ReconcileDescriptorsResult } from "../reconcile/index.js";
|
|
16
16
|
import { buildAddContentTypeDraftFromCollectionWithSnapshot, buildDescriptorDraftFromOrphanCollection, buildFixCollectionBindingDraftWithSnapshot, buildIgnoreCollectionDraft, type AddContentTypeDraftInput, type FixCollectionBindingDraftInput, type IgnoreCollectionDraftInput, type OrphanCollectionDraftInput } from "../reconcile/drafts.js";
|
|
17
|
+
import { buildDescriptorActionDraftFromOrphanCollection as buildDescriptorActionDraftFromOrphanCollectionSource, applyDescriptorActionDraft } from "../source/index.js";
|
|
17
18
|
export type CreateMemorixDescriptorAdminOptions = {
|
|
18
19
|
catalox: CataloxBoundClient;
|
|
19
20
|
xronox?: XronoxLike;
|
|
@@ -81,6 +82,20 @@ export type MemorixDescriptorAdmin = {
|
|
|
81
82
|
force?: boolean;
|
|
82
83
|
}): ReturnType<typeof applyDescriptorSeedManifest>;
|
|
83
84
|
reconcileDescriptorsWithMongo(options?: Omit<ReconcileDescriptorsOptions, "catalox" | "appId" | "processEnv" | "xronox">): Promise<ReconcileDescriptorsResult>;
|
|
85
|
+
reconcileDescriptorsWithMongoSourceAware(options?: Omit<ReconcileDescriptorsOptions, "catalox" | "appId" | "processEnv" | "xronox">): Promise<import("../source/types.js").SourceAwareReconcileReport>;
|
|
86
|
+
loadSourceAwareDescriptorSnapshot(options?: import("../source/snapshot.js").LoadSourceAwareDescriptorSnapshotOptions): Promise<import("../source/types.js").SourceAwareDescriptorSnapshot>;
|
|
87
|
+
validateSourceAwareMemorixDescriptors(options?: import("../source/validation.js").ValidateSourceAwareMemorixDescriptorsOptions): Promise<import("../source/types.js").SourceAwareDescriptorValidationReport>;
|
|
88
|
+
getSourceAwareDescriptorGraph(options?: import("../source/graph.js").GetSourceAwareDescriptorGraphOptions): Promise<import("../source/types.js").SourceAwareDescriptorGraph>;
|
|
89
|
+
listInspectableMemorixSources(options?: import("../source/inspectable.js").ListInspectableMemorixSourcesOptions): Promise<import("../source/types.js").MemorixInspectableSources>;
|
|
90
|
+
listSliceDescriptors(filter?: {
|
|
91
|
+
objectType?: string;
|
|
92
|
+
contentType?: string;
|
|
93
|
+
}): Promise<import("../source/types.js").SourceAware<import("../types/index.js").MemorixSliceDescriptor>[]>;
|
|
94
|
+
buildDescriptorActionDraftFromOrphanCollection(input: OrphanCollectionDraftInput): ReturnType<typeof buildDescriptorActionDraftFromOrphanCollectionSource>;
|
|
95
|
+
buildAddContentTypeActionDraft(input: AddContentTypeDraftInput): Promise<import("../source/types.js").DescriptorActionDraft>;
|
|
96
|
+
buildFixCollectionBindingActionDraft(input: FixCollectionBindingDraftInput): Promise<import("../source/types.js").DescriptorActionDraft>;
|
|
97
|
+
buildIgnoreCollectionActionDraft(input: IgnoreCollectionDraftInput): import("../source/types.js").DescriptorActionDraft;
|
|
98
|
+
applyDescriptorActionDraft(draft: import("../source/types.js").DescriptorActionDraft, options?: DescriptorMutationOptions): ReturnType<typeof applyDescriptorActionDraft>;
|
|
84
99
|
ensureMemorixDescriptorCatalogs(): Promise<string[]>;
|
|
85
100
|
loadSnapshot(): Promise<import("../types/index.js").DescriptorSnapshot>;
|
|
86
101
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-admin.d.ts","sourceRoot":"","sources":["../../src/admin/create-admin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"create-admin.d.ts","sourceRoot":"","sources":["../../src/admin/create-admin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU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0BAA0B,CAAC,CAAC;IACjD,+BAA+B,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACrD,YAAY,IAAI,OAAO,CAAC,OAAO,mBAAmB,EAAE,kBAAkB,CAAC,CAAC;CACzE,CAAC;AAEF,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,mCAAmC,GAC3C,sBAAsB,CA4KxB;AAED,MAAM,MAAM,0CAA0C,GAAG;IACvD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IAC/B,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF,wBAAsB,mCAAmC,CACvD,OAAO,GAAE,0CAA+C,GACvD,OAAO,CAAC,sBAAsB,CAAC,CA2BjC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createXronoxFromEnv } from "../collections/create-xronox-from-env.js";
|
|
1
2
|
import { resolveMemorixAppId } from "../catalog/ids.js";
|
|
2
3
|
import { loadDescriptorSnapshot } from "../store/snapshot.js";
|
|
3
4
|
import { registerEntityDescriptor, removeEntityDescriptor, updateEntityDescriptor, } from "../mutations/entity.js";
|
|
@@ -17,6 +18,7 @@ import { applyDescriptorSeedManifest, buildDescriptorSeedManifest, exportDescrip
|
|
|
17
18
|
import { reconcileDescriptorsWithMongo, applyReconcileDraft, } from "../reconcile/index.js";
|
|
18
19
|
import { buildAddContentTypeDraftFromCollectionWithSnapshot, buildDescriptorDraftFromOrphanCollection, buildFixCollectionBindingDraftWithSnapshot, buildIgnoreCollectionDraft, } from "../reconcile/drafts.js";
|
|
19
20
|
import { validateMemorixEntityDescriptor } from "../validation/descriptor-validation.js";
|
|
21
|
+
import { getSourceAwareDescriptorGraph, listInspectableMemorixSources, loadSourceAwareDescriptorSnapshot, reconcileDescriptorsWithMongoSourceAware, validateSourceAwareMemorixDescriptors, listSliceDescriptors, buildDescriptorActionDraftFromOrphanCollection as buildDescriptorActionDraftFromOrphanCollectionSource, buildAddContentTypeActionDraft, buildFixCollectionBindingActionDraft, buildIgnoreCollectionActionDraft, applyDescriptorActionDraft, } from "../source/index.js";
|
|
20
22
|
export function createMemorixDescriptorAdmin(options) {
|
|
21
23
|
const processEnv = options.processEnv ?? process.env;
|
|
22
24
|
const appId = resolveMemorixAppId({ appId: options.appId }, processEnv);
|
|
@@ -96,6 +98,32 @@ export function createMemorixDescriptorAdmin(options) {
|
|
|
96
98
|
xronox: options.xronox,
|
|
97
99
|
...reconcileOptions,
|
|
98
100
|
}),
|
|
101
|
+
reconcileDescriptorsWithMongoSourceAware: (reconcileOptions) => reconcileDescriptorsWithMongoSourceAware({
|
|
102
|
+
catalox,
|
|
103
|
+
appId,
|
|
104
|
+
processEnv,
|
|
105
|
+
xronox: options.xronox,
|
|
106
|
+
...reconcileOptions,
|
|
107
|
+
}),
|
|
108
|
+
loadSourceAwareDescriptorSnapshot: (snapshotOptions) => loadSourceAwareDescriptorSnapshot(catalox, { appId, ...snapshotOptions }),
|
|
109
|
+
validateSourceAwareMemorixDescriptors: (validationOptions) => validateSourceAwareMemorixDescriptors(catalox, { appId, ...validationOptions }),
|
|
110
|
+
getSourceAwareDescriptorGraph: (graphOptions) => getSourceAwareDescriptorGraph(catalox, { appId, ...graphOptions }),
|
|
111
|
+
listInspectableMemorixSources: (inspectOptions) => listInspectableMemorixSources(catalox, { appId, ...inspectOptions }),
|
|
112
|
+
listSliceDescriptors: async (filter) => {
|
|
113
|
+
const snapshot = await loadSourceAwareDescriptorSnapshot(catalox, { appId });
|
|
114
|
+
return listSliceDescriptors(snapshot, filter);
|
|
115
|
+
},
|
|
116
|
+
buildDescriptorActionDraftFromOrphanCollection: (input) => buildDescriptorActionDraftFromOrphanCollectionSource(input),
|
|
117
|
+
buildAddContentTypeActionDraft: async (input) => {
|
|
118
|
+
const snapshot = await loadSnapshot();
|
|
119
|
+
return buildAddContentTypeActionDraft(input, snapshot);
|
|
120
|
+
},
|
|
121
|
+
buildFixCollectionBindingActionDraft: async (input) => {
|
|
122
|
+
const snapshot = await loadSnapshot();
|
|
123
|
+
return buildFixCollectionBindingActionDraft(input, snapshot, processEnv);
|
|
124
|
+
},
|
|
125
|
+
buildIgnoreCollectionActionDraft: (input) => buildIgnoreCollectionActionDraft(input),
|
|
126
|
+
applyDescriptorActionDraft: (draft, mutationOptions) => applyDescriptorActionDraft(ctx, draft, mutationOptions),
|
|
99
127
|
ensureMemorixDescriptorCatalogs: () => ensureMemorixDescriptorCatalogs(catalox),
|
|
100
128
|
};
|
|
101
129
|
}
|
|
@@ -112,13 +140,7 @@ export async function createMemorixDescriptorAdminFromEnv(options = {}) {
|
|
|
112
140
|
let xronox = options.xronox;
|
|
113
141
|
const mongoUri = processEnv.MONGO_URI?.trim();
|
|
114
142
|
if (!xronox && mongoUri) {
|
|
115
|
-
|
|
116
|
-
const { createMemorixXronoxFromEnv } = await import("@x12i/memorix-retrieval");
|
|
117
|
-
xronox = await createMemorixXronoxFromEnv({ processEnv });
|
|
118
|
-
}
|
|
119
|
-
catch {
|
|
120
|
-
xronox = undefined;
|
|
121
|
-
}
|
|
143
|
+
xronox = await createXronoxFromEnv({ processEnv });
|
|
122
144
|
}
|
|
123
145
|
const admin = createMemorixDescriptorAdmin({
|
|
124
146
|
catalox: bound,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-admin.js","sourceRoot":"","sources":["../../src/admin/create-admin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAU9D,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,GAGtB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,GAEf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,eAAe,EACf,aAAa,EACb,aAAa,GACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACvF,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,qCAAqC,EACrC,0BAA0B,GAE3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,6BAA6B,EAC7B,mBAAmB,GAGpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kDAAkD,EAClD,wCAAwC,EACxC,0CAA0C,EAC1C,0BAA0B,GAK3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,+BAA+B,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"create-admin.js","sourceRoot":"","sources":["../../src/admin/create-admin.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,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AC;AACf,CAAC"}
|
package/dist/cli/index.js
CHANGED
|
@@ -12,12 +12,51 @@ async function main() {
|
|
|
12
12
|
const mutationOptions = baseMutationOptions(flags);
|
|
13
13
|
switch (command) {
|
|
14
14
|
case "validate": {
|
|
15
|
+
if (flags.sourceAware) {
|
|
16
|
+
const report = await admin.validateSourceAwareMemorixDescriptors({
|
|
17
|
+
includeCatalogHealth: true,
|
|
18
|
+
includeLegacyWarnings: flags.legacy,
|
|
19
|
+
includeFixHints: true,
|
|
20
|
+
});
|
|
21
|
+
console.log(JSON.stringify(report, null, 2));
|
|
22
|
+
process.exitCode = report.ok ? 0 : 1;
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
15
25
|
const report = await admin.validateMemorixDescriptors();
|
|
16
26
|
console.log(JSON.stringify(report, null, 2));
|
|
17
27
|
process.exitCode = report.valid ? 0 : 1;
|
|
18
28
|
break;
|
|
19
29
|
}
|
|
30
|
+
case "snapshot": {
|
|
31
|
+
const result = await admin.loadSourceAwareDescriptorSnapshot({
|
|
32
|
+
includeControlPlane: true,
|
|
33
|
+
includeLegacyCatalogs: flags.legacy,
|
|
34
|
+
includeParallelCatalogs: flags.includeParallel,
|
|
35
|
+
includeCatalogHealth: true,
|
|
36
|
+
});
|
|
37
|
+
console.log(JSON.stringify(result, null, 2));
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
case "sources":
|
|
41
|
+
await handleSourcesCommand(admin, flags);
|
|
42
|
+
break;
|
|
43
|
+
case "policy":
|
|
44
|
+
await runMutation(admin, () => handlePolicyCommand(admin, flags, mutationOptions));
|
|
45
|
+
break;
|
|
20
46
|
case "reconcile": {
|
|
47
|
+
if (flags.positional[0] === "draft") {
|
|
48
|
+
await handleReconcileDraftCommand(admin, flags);
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
if (flags.sourceAware) {
|
|
52
|
+
const result = await admin.reconcileDescriptorsWithMongoSourceAware({
|
|
53
|
+
autoRegisterOrphans: flags.autoRegisterOrphans,
|
|
54
|
+
allowCreateCollection: flags.allowCreateCollection,
|
|
55
|
+
skipMongo: flags.skipMongo,
|
|
56
|
+
});
|
|
57
|
+
console.log(JSON.stringify(result, null, 2));
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
21
60
|
const result = await admin.reconcileDescriptorsWithMongo({
|
|
22
61
|
autoRegisterOrphans: flags.autoRegisterOrphans,
|
|
23
62
|
allowCreateCollection: flags.allowCreateCollection,
|
|
@@ -27,6 +66,14 @@ async function main() {
|
|
|
27
66
|
break;
|
|
28
67
|
}
|
|
29
68
|
case "graph": {
|
|
69
|
+
if (flags.sourceAware) {
|
|
70
|
+
const graph = await admin.getSourceAwareDescriptorGraph({
|
|
71
|
+
includeValidation: true,
|
|
72
|
+
includeSourceRefs: true,
|
|
73
|
+
});
|
|
74
|
+
console.log(JSON.stringify(graph, null, 2));
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
30
77
|
const graph = await admin.getDescriptorGraph();
|
|
31
78
|
if (flags.format === "mermaid") {
|
|
32
79
|
console.log(descriptorGraphToMermaid(graph));
|
|
@@ -207,6 +254,14 @@ async function handleListCommand(admin, flags, options) {
|
|
|
207
254
|
}
|
|
208
255
|
async function handleSliceCommand(admin, flags, options) {
|
|
209
256
|
const sub = flags.positional[0];
|
|
257
|
+
if (sub === "list") {
|
|
258
|
+
const slices = await admin.listSliceDescriptors({
|
|
259
|
+
objectType: flags.objectType,
|
|
260
|
+
contentType: flags.contentType,
|
|
261
|
+
});
|
|
262
|
+
console.log(JSON.stringify(slices, null, 2));
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
210
265
|
if (sub === "create") {
|
|
211
266
|
const input = await readJsonFile(flags.file, "slice create requires --file");
|
|
212
267
|
const result = await admin.createSliceDescriptor(input, options);
|
|
@@ -382,6 +437,63 @@ async function handleSeedCommand(admin, flags) {
|
|
|
382
437
|
}
|
|
383
438
|
throw new Error(`Unknown seed subcommand: ${sub ?? "(none)"}`);
|
|
384
439
|
}
|
|
440
|
+
async function handleSourcesCommand(admin, flags) {
|
|
441
|
+
const sub = flags.positional[0];
|
|
442
|
+
if (sub === "list" || !sub) {
|
|
443
|
+
const sources = await admin.listInspectableMemorixSources({
|
|
444
|
+
includeCanonical: true,
|
|
445
|
+
includeControlPlane: true,
|
|
446
|
+
includeLegacy: flags.legacy ?? true,
|
|
447
|
+
includeParallel: flags.includeParallel ?? true,
|
|
448
|
+
});
|
|
449
|
+
console.log(JSON.stringify(sources, null, 2));
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
if (sub === "inspect") {
|
|
453
|
+
const catalogId = flags.catalog;
|
|
454
|
+
if (!catalogId)
|
|
455
|
+
throw new Error("sources inspect requires --catalog <catalogId>");
|
|
456
|
+
const snapshot = await admin.loadSourceAwareDescriptorSnapshot({
|
|
457
|
+
includeLegacyCatalogs: flags.legacy ?? catalogId === "memorix-entities",
|
|
458
|
+
includeParallelCatalogs: flags.includeParallel ?? catalogId === "knowledge",
|
|
459
|
+
includeControlPlane: true,
|
|
460
|
+
includeCatalogHealth: true,
|
|
461
|
+
});
|
|
462
|
+
const catalogHealth = snapshot.catalogs.find((c) => c.catalogId === catalogId);
|
|
463
|
+
const items = catalogId === "memorix-entity-descriptors"
|
|
464
|
+
? snapshot.canonical.objectTypes
|
|
465
|
+
: catalogId === "memorix-list-descriptors"
|
|
466
|
+
? snapshot.canonical.lists
|
|
467
|
+
: catalogId === "memorix-item-descriptors"
|
|
468
|
+
? snapshot.canonical.items
|
|
469
|
+
: catalogId === "memorix-completion-mappings"
|
|
470
|
+
? snapshot.controlPlane.completionMappings
|
|
471
|
+
: catalogId === "memorix-inventory-policies"
|
|
472
|
+
? snapshot.controlPlane.inventoryPolicies
|
|
473
|
+
: snapshot.legacy?.schemaInferenceCatalog ??
|
|
474
|
+
snapshot.legacy?.globalContentTypeCatalog ??
|
|
475
|
+
snapshot.parallel?.knowledgeArtifacts ??
|
|
476
|
+
[];
|
|
477
|
+
console.log(JSON.stringify({ catalog: catalogHealth, items }, null, 2));
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
throw new Error(`Unknown sources subcommand: ${sub}`);
|
|
481
|
+
}
|
|
482
|
+
async function handlePolicyCommand(admin, flags, options) {
|
|
483
|
+
return handleInventoryPolicyCommand(admin, flags, options);
|
|
484
|
+
}
|
|
485
|
+
async function handleReconcileDraftCommand(admin, flags) {
|
|
486
|
+
const collection = flags.collection;
|
|
487
|
+
const target = flags.target;
|
|
488
|
+
if (!collection || !target) {
|
|
489
|
+
throw new Error("reconcile draft requires --target and --collection");
|
|
490
|
+
}
|
|
491
|
+
const draft = admin.buildDescriptorActionDraftFromOrphanCollection({
|
|
492
|
+
target,
|
|
493
|
+
collectionName: collection,
|
|
494
|
+
});
|
|
495
|
+
console.log(JSON.stringify(draft, null, 2));
|
|
496
|
+
}
|
|
385
497
|
function parseFlags(args) {
|
|
386
498
|
const positional = [];
|
|
387
499
|
const flags = {
|
|
@@ -395,6 +507,9 @@ function parseFlags(args) {
|
|
|
395
507
|
addToDefaultList: false,
|
|
396
508
|
addToDefaultItem: false,
|
|
397
509
|
cascade: true,
|
|
510
|
+
sourceAware: false,
|
|
511
|
+
legacy: false,
|
|
512
|
+
includeParallel: false,
|
|
398
513
|
};
|
|
399
514
|
for (let i = 0; i < args.length; i++) {
|
|
400
515
|
const arg = args[i];
|
|
@@ -434,6 +549,18 @@ function parseFlags(args) {
|
|
|
434
549
|
flags.database = args[++i];
|
|
435
550
|
else if (arg === "--note")
|
|
436
551
|
flags.note = args[++i];
|
|
552
|
+
else if (arg === "--source-aware")
|
|
553
|
+
flags.sourceAware = true;
|
|
554
|
+
else if (arg === "--legacy")
|
|
555
|
+
flags.legacy = true;
|
|
556
|
+
else if (arg === "--include-parallel")
|
|
557
|
+
flags.includeParallel = true;
|
|
558
|
+
else if (arg === "--catalog")
|
|
559
|
+
flags.catalog = args[++i];
|
|
560
|
+
else if (arg === "--object-type")
|
|
561
|
+
flags.objectType = args[++i];
|
|
562
|
+
else if (arg === "--content-type")
|
|
563
|
+
flags.contentType = args[++i];
|
|
437
564
|
else if (!arg.startsWith("-"))
|
|
438
565
|
positional.push(arg);
|
|
439
566
|
else
|
|
@@ -460,9 +587,13 @@ function printHelp() {
|
|
|
460
587
|
console.log(`memorix-descriptors — Memorix descriptor management in Catalox
|
|
461
588
|
|
|
462
589
|
Usage:
|
|
463
|
-
memorix-descriptors validate
|
|
464
|
-
memorix-descriptors
|
|
465
|
-
memorix-descriptors
|
|
590
|
+
memorix-descriptors validate [--source-aware] [--legacy]
|
|
591
|
+
memorix-descriptors snapshot [--legacy] [--include-parallel]
|
|
592
|
+
memorix-descriptors sources list [--legacy] [--include-parallel]
|
|
593
|
+
memorix-descriptors sources inspect --catalog <catalogId> [--legacy]
|
|
594
|
+
memorix-descriptors reconcile [--source-aware] [--auto-register-orphans] [--allow-create-collection] [--skip-mongo]
|
|
595
|
+
memorix-descriptors reconcile draft --target <target> --collection <collection>
|
|
596
|
+
memorix-descriptors graph [--source-aware] [--format mermaid|json]
|
|
466
597
|
|
|
467
598
|
memorix-descriptors entity register --file <json> [--dry-run] [--reason <text>]
|
|
468
599
|
memorix-descriptors entity update <entity> --file <json> [--dry-run]
|
|
@@ -481,11 +612,16 @@ Usage:
|
|
|
481
612
|
memorix-descriptors list update <id> --file <json> [--dry-run]
|
|
482
613
|
memorix-descriptors list remove <id> [--dry-run] [--force]
|
|
483
614
|
|
|
615
|
+
memorix-descriptors slice list [--object-type <name>] [--content-type <key>]
|
|
484
616
|
memorix-descriptors slice create --file <json> [--dry-run]
|
|
485
617
|
memorix-descriptors slice update <id> --file <json> [--dry-run]
|
|
486
618
|
memorix-descriptors slice remove <id> [--dry-run]
|
|
487
619
|
memorix-descriptors slice validate <id>
|
|
488
620
|
|
|
621
|
+
memorix-descriptors policy show
|
|
622
|
+
memorix-descriptors policy ignore --target <target> --collection <collection> --reason <reason> [--database <db>] [--note <text>] [--dry-run]
|
|
623
|
+
memorix-descriptors policy unignore --target <target> --collection <collection> [--database <db>] [--dry-run]
|
|
624
|
+
|
|
489
625
|
memorix-descriptors inventory-policy show
|
|
490
626
|
memorix-descriptors inventory-policy ignore --target <target> --collection <collection> --reason <reason> [--database <db>] [--note <text>] [--dry-run]
|
|
491
627
|
memorix-descriptors inventory-policy unignore --target <target> --collection <collection> [--database <db>] [--dry-run]
|