@x12i/memorix-descriptors 1.3.1 → 1.4.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 +181 -20
- package/dist/admin/control-plane.d.ts +14 -0
- package/dist/admin/control-plane.d.ts.map +1 -0
- package/dist/admin/control-plane.js +22 -0
- package/dist/admin/control-plane.js.map +1 -0
- package/dist/admin/create-admin.d.ts +3 -2
- package/dist/admin/create-admin.d.ts.map +1 -1
- package/dist/admin/create-admin.js +2 -1
- package/dist/admin/create-admin.js.map +1 -1
- package/dist/admin/execute-mutation.d.ts +9 -0
- package/dist/admin/execute-mutation.d.ts.map +1 -0
- package/dist/admin/execute-mutation.js +85 -0
- package/dist/admin/execute-mutation.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/reconcile/apply.d.ts +4 -0
- package/dist/reconcile/apply.d.ts.map +1 -0
- package/dist/reconcile/apply.js +123 -0
- package/dist/reconcile/apply.js.map +1 -0
- package/dist/reconcile/index.d.ts +10 -24
- package/dist/reconcile/index.d.ts.map +1 -1
- package/dist/reconcile/index.js +54 -63
- package/dist/reconcile/index.js.map +1 -1
- package/dist/reconcile/suggestions.d.ts +4 -0
- package/dist/reconcile/suggestions.d.ts.map +1 -0
- package/dist/reconcile/suggestions.js +90 -0
- package/dist/reconcile/suggestions.js.map +1 -0
- package/dist/reconcile/types.d.ts +45 -0
- package/dist/reconcile/types.d.ts.map +1 -0
- package/dist/reconcile/types.js +2 -0
- package/dist/reconcile/types.js.map +1 -0
- package/dist/tests/execute-mutation.test.d.ts +2 -0
- package/dist/tests/execute-mutation.test.d.ts.map +1 -0
- package/dist/tests/execute-mutation.test.js +57 -0
- package/dist/tests/execute-mutation.test.js.map +1 -0
- package/dist/tests/live/catalox.live.test.js +3 -2
- package/dist/tests/live/catalox.live.test.js.map +1 -1
- package/dist/tests/reconcile-unified.test.d.ts +2 -0
- package/dist/tests/reconcile-unified.test.d.ts.map +1 -0
- package/dist/tests/reconcile-unified.test.js +214 -0
- package/dist/tests/reconcile-unified.test.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,6 +35,32 @@ npm install @x12i/xronox
|
|
|
35
35
|
|
|
36
36
|
Peer dependencies: `@x12i/catalox` ≥5, `@x12i/memorix-retrieval` ≥1.6, `@x12i/xronox` ≥3.9 (optional).
|
|
37
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).
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Package exports
|
|
43
|
+
|
|
44
|
+
The main entry re-exports the full write-side surface (mutations, seeds, reconcile, CLI helpers).
|
|
45
|
+
|
|
46
|
+
**Retrieval-safe subpaths** (module graph never imports `@x12i/memorix-retrieval`) — for `@x12i/memorix-retrieval` and other read-side consumers:
|
|
47
|
+
|
|
48
|
+
| Subpath | Symbols | Use |
|
|
49
|
+
|---------|---------|-----|
|
|
50
|
+
| `@x12i/memorix-descriptors/types` | `MemorixSliceDescriptor`, `MemorixTarget`, `MemorixInventoryPolicy`, … | Type-only imports |
|
|
51
|
+
| `@x12i/memorix-descriptors/catalog` | `defaultIdFieldForTarget`, `MEMORIX_INVENTORY_POLICIES_CATALOG`, … | Catalog ids |
|
|
52
|
+
| `@x12i/memorix-descriptors/collections/parse` | `parseMemorixCollectionName` | Last-dash collection naming |
|
|
53
|
+
| `@x12i/memorix-descriptors/validation/slice-shape` | `isMemorixSliceDescriptor`, `validateMemorixSliceDescriptorShape` | Slice shape validation |
|
|
54
|
+
| `@x12i/memorix-descriptors/validation/inventory-policy` | `DEFAULT_INVENTORY_POLICY`, `isCollectionIgnored`, … | Inventory ignore policy |
|
|
55
|
+
|
|
56
|
+
```typescript
|
|
57
|
+
import type { MemorixSliceDescriptor } from "@x12i/memorix-descriptors/types";
|
|
58
|
+
import { defaultIdFieldForTarget } from "@x12i/memorix-descriptors/catalog";
|
|
59
|
+
import { parseMemorixCollectionName } from "@x12i/memorix-descriptors/collections/parse";
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Write-side / CLI / Metadata Studio hosts should import from `"."` or use `MemorixDescriptorAdmin`.
|
|
63
|
+
|
|
38
64
|
---
|
|
39
65
|
|
|
40
66
|
## Bootstrap
|
|
@@ -71,6 +97,20 @@ const admin = await createMemorixDescriptorAdminFromEnv();
|
|
|
71
97
|
// Uses MONGO_URI + Xronox when set (for reconcile / ensureCollection)
|
|
72
98
|
```
|
|
73
99
|
|
|
100
|
+
### Control plane (retrieval + descriptors)
|
|
101
|
+
|
|
102
|
+
For Explorer-like hosts that need both read and write stacks with shared `catalox`, `xronox`, and `appId`:
|
|
103
|
+
|
|
104
|
+
```typescript
|
|
105
|
+
import { createMemorixControlPlaneFromEnv } from "@x12i/memorix-descriptors";
|
|
106
|
+
|
|
107
|
+
const { retrieval, descriptors } = await createMemorixControlPlaneFromEnv();
|
|
108
|
+
// retrieval.client — MemorixRetrievalClient (buildMemorixUnifiedInventory, fetchList, …)
|
|
109
|
+
// descriptors — MemorixDescriptorAdmin (mutations, reconcile, applyReconcileDraft)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Uses `createMemorixRetrievalStackFromEnv` from `@x12i/memorix-retrieval` internally.
|
|
113
|
+
|
|
74
114
|
---
|
|
75
115
|
|
|
76
116
|
## Memorix targets
|
|
@@ -214,6 +254,37 @@ Content types live under `entityDescriptor.contentTypes` (each resolves to a Mon
|
|
|
214
254
|
|
|
215
255
|
---
|
|
216
256
|
|
|
257
|
+
### Slice descriptors
|
|
258
|
+
|
|
259
|
+
Slice descriptors are list-catalog items with `kind: "slice"` (inventory-driven list views).
|
|
260
|
+
|
|
261
|
+
| Method | Description |
|
|
262
|
+
|--------|-------------|
|
|
263
|
+
| `createSliceDescriptor(input)` | Validate shape + snapshot refs; write to list catalog |
|
|
264
|
+
| `updateSliceDescriptor(sliceId, patch)` | |
|
|
265
|
+
| `removeSliceDescriptor(sliceId)` | |
|
|
266
|
+
| `validateSliceDescriptor(sliceId)` | Shape + entity/field/content-type checks |
|
|
267
|
+
| `previewSliceDescriptor(sliceId)` | Dry-run preview payload |
|
|
268
|
+
|
|
269
|
+
Also exported: `validateMemorixSliceDescriptorShape`, `validateSliceDescriptorAgainstSnapshot`, `buildSlicePreview` (main entry and `./validation/slice-shape` for shape-only helpers).
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
### Inventory policy
|
|
274
|
+
|
|
275
|
+
Ignored collections are stored in Catalox catalog `memorix-inventory-policies` (item id `default`).
|
|
276
|
+
|
|
277
|
+
| Method | Description |
|
|
278
|
+
|--------|-------------|
|
|
279
|
+
| `getInventoryPolicy()` | Load current policy |
|
|
280
|
+
| `updateInventoryPolicy(patch)` | Replace `ignoredCollections` |
|
|
281
|
+
| `ignoreCollection(input)` | Append ignored entry |
|
|
282
|
+
| `unignoreCollection(input)` | Remove ignored entry |
|
|
283
|
+
|
|
284
|
+
Also exported from `./validation/inventory-policy`: `DEFAULT_INVENTORY_POLICY`, `validateMemorixInventoryPolicy`, `isCollectionIgnored`, `ignoredCollectionKey`.
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
217
288
|
### Relations
|
|
218
289
|
|
|
219
290
|
Relations live on the **source** entity descriptor under `relations`.
|
|
@@ -267,19 +338,90 @@ Uses `mergeSeedItemScopeIntoUpsertData` from `@x12i/memorix-retrieval` for apply
|
|
|
267
338
|
|
|
268
339
|
### Mongo reconciliation
|
|
269
340
|
|
|
341
|
+
Uses **`buildMemorixUnifiedInventory`** from `@x12i/memorix-retrieval` (same shape as the Inventory UI). Legacy `buildMemorixCollectionInventory` is no longer used.
|
|
342
|
+
|
|
343
|
+
```typescript
|
|
344
|
+
const result = await admin.reconcileDescriptorsWithMongo({
|
|
345
|
+
inventory: unifiedFromRetrieval, // optional — pass what Inventory already loaded
|
|
346
|
+
inventoryOptions: { sourceLens: "catalox-first", includeExactCounts: true },
|
|
347
|
+
allowCreateCollection: true, // create missing Mongo collections (native driver)
|
|
348
|
+
autoRegisterOrphans: true, // apply register-entity drafts for parseable orphans
|
|
349
|
+
skipMongo: true, // suggestions only, no Mongo side effects
|
|
350
|
+
});
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
**Returns:**
|
|
354
|
+
|
|
355
|
+
```typescript
|
|
356
|
+
{
|
|
357
|
+
inventory: MemorixUnifiedInventory;
|
|
358
|
+
issues: MemorixInventoryIssue[]; // same as inventory.issues
|
|
359
|
+
suggestions: ReconcileSuggestion[];
|
|
360
|
+
applied: Array<{ kind: string; detail: string }>;
|
|
361
|
+
}
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
**Suggestion kinds** (aligned with unified inventory issues):
|
|
365
|
+
|
|
366
|
+
| Kind | Typical issue | Action |
|
|
367
|
+
|------|---------------|--------|
|
|
368
|
+
| `ensure-collection` | `missing-collection` | Create Mongo collection for declared content type |
|
|
369
|
+
| `empty-declared-collection` | `empty-declared-collection` | Informational |
|
|
370
|
+
| `create-descriptor-for-orphan` | `orphan-collection`, `object-missing` | Register new entity descriptor |
|
|
371
|
+
| `add-content-type-for-orphan` | `content-type-missing` | Add content type to existing entity |
|
|
372
|
+
| `fix-collection-binding` | `collection-mismatch` | Patch content type `collection` binding |
|
|
373
|
+
| `ignore-collection` | `unparseable-collection` | Add to inventory ignore policy |
|
|
374
|
+
| `unparseable-collection` | `unparseable-collection` | Informational / manual review |
|
|
375
|
+
|
|
376
|
+
Requires `MONGO_URI` and Xronox when building inventory internally (via `createMemorixDescriptorAdminFromEnv` or `createMemorixControlPlaneFromEnv`).
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
### Reconcile drafts & apply
|
|
381
|
+
|
|
382
|
+
Draft builders produce a **`ReconcileDescriptorDraft`** (`suggestedAction` + `draft` payload + `warnings`). Metadata Studio flow: **build draft → dry-run preview → apply**.
|
|
383
|
+
|
|
384
|
+
| Builder | `suggestedAction` |
|
|
385
|
+
|---------|-------------------|
|
|
386
|
+
| `buildDescriptorDraftFromOrphanCollection(input)` | `registerEntityDescriptor` |
|
|
387
|
+
| `buildAddContentTypeDraftFromCollection(input, snapshot?)` | `addContentType` |
|
|
388
|
+
| `buildFixCollectionBindingDraft(input, snapshot?, env?)` | `updateContentType` |
|
|
389
|
+
| `buildIgnoreCollectionDraft(input)` | `ignoreCollection` |
|
|
390
|
+
|
|
270
391
|
| Method | Description |
|
|
271
392
|
|--------|-------------|
|
|
272
|
-
| `
|
|
393
|
+
| `buildReconcileDraftForSuggestion(suggestion, snapshot?, env?)` | Map a `ReconcileSuggestion` to a draft (uses builders above) |
|
|
394
|
+
| `applyReconcileDraft(ctx, draft, options?)` | Low-level apply (also `admin.applyReconcileDraft(draft, options?)`) |
|
|
273
395
|
|
|
274
|
-
|
|
396
|
+
Supported apply actions: `registerEntityDescriptor`, `addContentType`, `updateContentType`, `ignoreCollection`. `manualReview` drafts return `MANUAL_REVIEW_REQUIRED`.
|
|
275
397
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
398
|
+
```typescript
|
|
399
|
+
const { suggestions } = await admin.reconcileDescriptorsWithMongo({ skipMongo: true });
|
|
400
|
+
const snapshot = await admin.loadSnapshot();
|
|
401
|
+
const draft = buildReconcileDraftForSuggestion(suggestions[0]!, snapshot);
|
|
402
|
+
const preview = await admin.applyReconcileDraft(draft!, { dryRun: true });
|
|
403
|
+
const applied = await admin.applyReconcileDraft(draft!, { dryRun: false });
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
Also on admin (with snapshot-aware validation): `buildDescriptorDraftFromOrphanCollection`, `buildAddContentTypeDraftFromCollection`, `buildFixCollectionBindingDraft`, `buildIgnoreCollectionDraft`.
|
|
407
|
+
|
|
408
|
+
---
|
|
279
409
|
|
|
280
|
-
|
|
410
|
+
### Typed mutation dispatcher (optional)
|
|
281
411
|
|
|
282
|
-
|
|
412
|
+
Single entry for hosts that route mutation requests by operation name (Explorer `POST /metadata/mutations`, CLI, CI):
|
|
413
|
+
|
|
414
|
+
```typescript
|
|
415
|
+
import { executeDescriptorMutation } from "@x12i/memorix-descriptors";
|
|
416
|
+
|
|
417
|
+
const result = await executeDescriptorMutation(admin, {
|
|
418
|
+
operation: "addContentType",
|
|
419
|
+
input: { entityName: "assets", contentType: { key: "enrichment", postfix: "enrichment", collection: "assets-enrichment" } },
|
|
420
|
+
options: { dryRun: true },
|
|
421
|
+
});
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
Dispatches to `MemorixDescriptorAdmin` methods including `applyReconcileDraft`. Unknown operations return `UNKNOWN_OPERATION`.
|
|
283
425
|
|
|
284
426
|
---
|
|
285
427
|
|
|
@@ -290,7 +432,7 @@ Binary: `memorix-descriptors` (after `npm run build`).
|
|
|
290
432
|
| Command | Status |
|
|
291
433
|
|---------|--------|
|
|
292
434
|
| `validate` | ✅ |
|
|
293
|
-
| `reconcile` | ✅ (needs Xronox / `MONGO_URI`) |
|
|
435
|
+
| `reconcile` | ✅ (needs Xronox / `MONGO_URI`; JSON includes `inventory`, `issues`, `suggestions`, `applied`) |
|
|
294
436
|
| `graph [--format mermaid]` | ✅ |
|
|
295
437
|
| `entity register --file <json> [--dry-run]` | ✅ |
|
|
296
438
|
| `content-type add <entity> <key> --postfix <p> [--dry-run]` | ✅ |
|
|
@@ -301,16 +443,17 @@ Binary: `memorix-descriptors` (after `npm run build`).
|
|
|
301
443
|
| `seed export <dir>` | ✅ |
|
|
302
444
|
| `seed import <dir> [--dry-run]` | ✅ |
|
|
303
445
|
|
|
304
|
-
**Library-only today** (use `MemorixDescriptorAdmin` directly): entity update/remove, property CRUD, content-type update/remove, list/item create/remove, relation CRUD, mapping update/remove, `ensureCollection`, etc.
|
|
305
|
-
|
|
306
446
|
```bash
|
|
307
447
|
npx memorix-descriptors validate
|
|
448
|
+
npx memorix-descriptors reconcile --allow-create-collection --auto-register-orphans
|
|
308
449
|
npx memorix-descriptors graph --format mermaid
|
|
309
450
|
npx memorix-descriptors entity register --file ./new-entity.json --dry-run
|
|
310
451
|
npx memorix-descriptors seed export ./catalox-seeds/inputs
|
|
311
452
|
npx memorix-descriptors seed import ./catalox-seeds/inputs --dry-run
|
|
312
453
|
```
|
|
313
454
|
|
|
455
|
+
**Library-only today** (use `MemorixDescriptorAdmin` directly): entity update/remove, property CRUD, content-type update/remove, list/item/slice create/remove, relation CRUD, mapping update/remove, inventory policy, `ensureCollection`, reconcile draft builders, `applyReconcileDraft`, `executeDescriptorMutation`, etc.
|
|
456
|
+
|
|
314
457
|
---
|
|
315
458
|
|
|
316
459
|
## Explorer / host integration
|
|
@@ -318,27 +461,38 @@ npx memorix-descriptors seed import ./catalox-seeds/inputs --dry-run
|
|
|
318
461
|
| UI surface | API |
|
|
319
462
|
|------------|-----|
|
|
320
463
|
| Entity graph canvas | `getDescriptorGraph`, `reconcileDescriptorsWithMongo` |
|
|
464
|
+
| Inventory / Metadata Studio reconcile | `buildMemorixUnifiedInventory` (retrieval) + `reconcileDescriptorsWithMongo`, `buildReconcileDraftForSuggestion`, `applyReconcileDraft` |
|
|
321
465
|
| Add entity wizard | `registerEntityDescriptor` |
|
|
322
466
|
| Column / field editor | `addProperty`, `updateListDescriptor` |
|
|
323
467
|
| Detail layout editor | `updateItemDescriptor` |
|
|
468
|
+
| Slice editor | `createSliceDescriptor`, `validateSliceDescriptor`, `previewSliceDescriptor` |
|
|
324
469
|
| Collection health | `reconcileDescriptorsWithMongo` |
|
|
470
|
+
| Ignore collection | `ignoreCollection`, `buildIgnoreCollectionDraft` |
|
|
325
471
|
| Mapping editor | `registerMapping` |
|
|
326
472
|
| Knowledge tab | Filter entities where `target === "knowledge"` |
|
|
473
|
+
| Generic mutation HTTP | `executeDescriptorMutation` (optional) |
|
|
327
474
|
|
|
328
|
-
Hosts should **read** via `@x12i/memorix-retrieval` and **write** only through this package.
|
|
475
|
+
Hosts should **read** via `@x12i/memorix-retrieval` and **write** only through this package. Pass pre-built `MemorixUnifiedInventory` into reconcile when the Inventory UI already loaded it.
|
|
329
476
|
|
|
330
477
|
---
|
|
331
478
|
|
|
332
479
|
## Validation utilities (exported)
|
|
333
480
|
|
|
481
|
+
### Main entry (`"."`)
|
|
482
|
+
|
|
334
483
|
Re-exported / extended validators (aligned with retrieval rules, plus `knowledge` target):
|
|
335
484
|
|
|
336
485
|
- `validateMemorixEntityDescriptor`, `validateMemorixListDescriptor`, `validateMemorixEntityListDescriptor`, `validateMemorixItemDescriptor`
|
|
486
|
+
- `validateMemorixSliceDescriptorShape`, `validateSliceDescriptorAgainstSnapshot`, `buildSlicePreview`, `isMemorixSliceDescriptor`
|
|
487
|
+
- `validateMemorixInventoryPolicy`, `validateIgnoredCollectionEntry`, `isCollectionIgnored`, `DEFAULT_INVENTORY_POLICY`
|
|
337
488
|
- `validatePropertyDescriptor`, `assertListFieldsHumanReadable`
|
|
338
489
|
- `defaultListDescriptorId`, `defaultItemDescriptorId`, `singularizeEntityName`, `isKebabCase`
|
|
490
|
+
- `parseMemorixCollectionName`, `defaultIdFieldForTarget`
|
|
339
491
|
- `DescriptorValidationError`
|
|
340
492
|
|
|
341
|
-
|
|
493
|
+
### Retrieval-safe subpaths
|
|
494
|
+
|
|
495
|
+
See [Package exports](#package-exports). Subpath entry modules do not import `@x12i/memorix-retrieval` (avoids TS5055 cycles when retrieval depends on descriptors).
|
|
342
496
|
|
|
343
497
|
## Environment variables
|
|
344
498
|
|
|
@@ -352,6 +506,7 @@ See [`.env.example`](.env.example).
|
|
|
352
506
|
| `MONGO_URI` | Xronox for reconcile / `ensureCollection` |
|
|
353
507
|
| `MEMORIX_ENTITIES_DB`, `MEMORIX_EVENTS_DB`, `MEMORIX_KNOWLEDGE_DB` | DB names |
|
|
354
508
|
| `MEMORIX_*_COLLECTION_<ENTITY>` | Per-entity collection overrides |
|
|
509
|
+
| `MEMORIX_ENSURE_DESCRIPTOR_CATALOGS=1` | Auto-create descriptor catalogs on `createMemorixDescriptorAdminFromEnv` / control plane bootstrap |
|
|
355
510
|
| `FIRESTORE_LIVE_TESTS=1` | Enable live integration tests |
|
|
356
511
|
|
|
357
512
|
---
|
|
@@ -364,7 +519,9 @@ npm run test:live # integration tests (reads .env, needs FIRESTORE_LIVE_TESTS=1)
|
|
|
364
519
|
npm run test:all # both
|
|
365
520
|
```
|
|
366
521
|
|
|
367
|
-
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
|
|
522
|
+
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
|
+
|
|
524
|
+
CI (`validate-descriptor-seeds` workflow) runs `npm ci`, installs `@x12i/memorix-retrieval` from npm for the peer dependency, then `npm run build`.
|
|
368
525
|
|
|
369
526
|
---
|
|
370
527
|
|
|
@@ -374,19 +531,23 @@ Live tests: Firestore connectivity, validate deployed graph, load smoke entity (
|
|
|
374
531
|
|
|
375
532
|
| Area | Coverage |
|
|
376
533
|
|------|----------|
|
|
377
|
-
| Bootstrap | `createMemorixDescriptorAdmin`, `createMemorixDescriptorAdminFromEnv` |
|
|
534
|
+
| Bootstrap | `createMemorixDescriptorAdmin`, `createMemorixDescriptorAdminFromEnv`, `createMemorixControlPlaneFromEnv` |
|
|
535
|
+
| Package exports | Retrieval-safe subpaths (`/types`, `/catalog`, `/collections/parse`, `/validation/slice-shape`, `/validation/inventory-policy`) |
|
|
378
536
|
| Entity lifecycle | Register (atomic list+item), update, soft/hard remove |
|
|
379
537
|
| Content types | Add, update, remove with referential guards |
|
|
380
538
|
| Collections | Resolve, ensure (inventory), rename **plan** |
|
|
381
539
|
| Properties | Add, update, remove with list/item cascade |
|
|
382
540
|
| List / item descriptors | Full CRUD + set default list/item |
|
|
541
|
+
| Slice descriptors | CRUD, validate, preview |
|
|
542
|
+
| Inventory policy | Ignore / unignore collections in Catalox |
|
|
383
543
|
| Relations | Add, update, remove with list/item cascade |
|
|
384
544
|
| Mappings | CRUD + cross-validation (`memorix-completion-mappings`) |
|
|
385
545
|
| Integrity engine | Full-graph validation, dangling refs, forbidden patterns |
|
|
386
546
|
| Descriptor graph | Build + Mermaid export |
|
|
387
547
|
| Seeds | Export/import/manifest; compatible with retrieval inputs layout |
|
|
388
|
-
| Reconcile |
|
|
389
|
-
|
|
|
548
|
+
| Reconcile | Unified inventory + issues + extended suggestions; `applyReconcileDraft`; `autoRegisterOrphans`, `allowCreateCollection` |
|
|
549
|
+
| Mutation dispatcher | `executeDescriptorMutation` (optional) |
|
|
550
|
+
| Dry-run | All mutations + reconcile apply |
|
|
390
551
|
| Targets | `entity`, `event`, `knowledge` in types and entity validation |
|
|
391
552
|
| Transactions | `executeCataloxWrites` — compensating rollback on mid-batch Catalox failure; `rollbackPlan` on success |
|
|
392
553
|
| Audit | JSONL via `MEMORIX_DESCRIPTORS_AUDIT_LOG` or per-mutation `reason` |
|
|
@@ -427,15 +588,15 @@ Live tests: Firestore connectivity, validate deployed graph, load smoke entity (
|
|
|
427
588
|
|-------|--------|--------|
|
|
428
589
|
| **1** | Bootstrap, validation, entity/content/property CRUD, seeds, dry-run | ✅ Done |
|
|
429
590
|
| **2** | List/item/relation CRUD, cascades, graph | ✅ Done |
|
|
430
|
-
| **3** | Mappings catalog, Mongo reconcile | ✅ Done |
|
|
431
|
-
| **4** | Knowledge target
|
|
432
|
-
| **5** | Rename/migrate, audit, rollback, CLI parity, CI seeds | ✅ Done (impact-report CLI optional) |
|
|
591
|
+
| **3** | Mappings catalog, Mongo reconcile (unified inventory) | ✅ Done |
|
|
592
|
+
| **4** | Knowledge target, slice descriptors, inventory policy, subpath exports | ✅ Done |
|
|
593
|
+
| **5** | Rename/migrate, audit, rollback, CLI parity, CI seeds, reconcile apply | ✅ Done (impact-report CLI optional) |
|
|
433
594
|
|
|
434
595
|
---
|
|
435
596
|
|
|
436
597
|
## Related packages
|
|
437
598
|
|
|
438
|
-
- **@x12i/memorix-retrieval** — read/composition layer (discover, fetchList, fetchItem,
|
|
599
|
+
- **@x12i/memorix-retrieval** — read/composition layer (discover, fetchList, fetchItem, **`buildMemorixUnifiedInventory`**)
|
|
439
600
|
- **@x12i/catalox** — descriptor storage and native catalog APIs
|
|
440
601
|
- **@x12i/memorix-completion** — Memorix payload document writes (not descriptors)
|
|
441
602
|
- **@x12i/xronox** — optional Mongo inventory for reconcile and `ensureCollection`
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { MemorixRetrievalStack } from "@x12i/memorix-retrieval";
|
|
2
|
+
import { type CreateMemorixDescriptorAdminOptions, type MemorixDescriptorAdmin } from "./create-admin.js";
|
|
3
|
+
export type CreateMemorixControlPlaneFromEnvOptions = {
|
|
4
|
+
appId?: string;
|
|
5
|
+
processEnv?: NodeJS.ProcessEnv;
|
|
6
|
+
descriptorAdmin?: Omit<CreateMemorixDescriptorAdminOptions, "catalox" | "appId" | "processEnv">;
|
|
7
|
+
retrievalStack?: Omit<import("@x12i/memorix-retrieval").CreateMemorixRetrievalStackFromEnvOptions, "processEnv" | "appId">;
|
|
8
|
+
};
|
|
9
|
+
export type MemorixControlPlane = {
|
|
10
|
+
retrieval: MemorixRetrievalStack;
|
|
11
|
+
descriptors: MemorixDescriptorAdmin;
|
|
12
|
+
};
|
|
13
|
+
export declare function createMemorixControlPlaneFromEnv(options?: CreateMemorixControlPlaneFromEnvOptions): Promise<MemorixControlPlane>;
|
|
14
|
+
//# sourceMappingURL=control-plane.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-plane.d.ts","sourceRoot":"","sources":["../../src/admin/control-plane.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAEL,KAAK,mCAAmC,EACxC,KAAK,sBAAsB,EAC5B,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,uCAAuC,GAAG;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IAC/B,eAAe,CAAC,EAAE,IAAI,CAAC,mCAAmC,EAAE,SAAS,GAAG,OAAO,GAAG,YAAY,CAAC,CAAC;IAChG,cAAc,CAAC,EAAE,IAAI,CACnB,OAAO,yBAAyB,EAAE,yCAAyC,EAC3E,YAAY,GAAG,OAAO,CACvB,CAAC;CACH,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,CAuB9B"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createMemorixDescriptorAdmin, } from "./create-admin.js";
|
|
2
|
+
export async function createMemorixControlPlaneFromEnv(options = {}) {
|
|
3
|
+
const processEnv = options.processEnv ?? process.env;
|
|
4
|
+
const { createMemorixRetrievalStackFromEnv } = await import("@x12i/memorix-retrieval");
|
|
5
|
+
const retrieval = await createMemorixRetrievalStackFromEnv({
|
|
6
|
+
appId: options.appId,
|
|
7
|
+
processEnv,
|
|
8
|
+
...options.retrievalStack,
|
|
9
|
+
});
|
|
10
|
+
const descriptors = createMemorixDescriptorAdmin({
|
|
11
|
+
catalox: retrieval.cataloxBound,
|
|
12
|
+
appId: retrieval.appId,
|
|
13
|
+
processEnv,
|
|
14
|
+
xronox: retrieval.client.xronox,
|
|
15
|
+
...options.descriptorAdmin,
|
|
16
|
+
});
|
|
17
|
+
if (processEnv.MEMORIX_ENSURE_DESCRIPTOR_CATALOGS === "1") {
|
|
18
|
+
await descriptors.ensureMemorixDescriptorCatalogs();
|
|
19
|
+
}
|
|
20
|
+
return { retrieval, descriptors };
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=control-plane.js.map
|
|
@@ -0,0 +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;AAiB3B,MAAM,CAAC,KAAK,UAAU,gCAAgC,CACpD,UAAmD,EAAE;IAErD,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,GAAG,CAAC;IACrD,MAAM,EAAE,kCAAkC,EAAE,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAC;IAEvF,MAAM,SAAS,GAAG,MAAM,kCAAkC,CAAC;QACzD,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,UAAU;QACV,GAAG,OAAO,CAAC,cAAc;KAC1B,CAAC,CAAC;IAEH,MAAM,WAAW,GAAG,4BAA4B,CAAC;QAC/C,OAAO,EAAE,SAAS,CAAC,YAAY;QAC/B,KAAK,EAAE,SAAS,CAAC,KAAK;QACtB,UAAU;QACV,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,MAAM;QAC/B,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,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;AACpC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { XronoxLike } from "@x12i/memorix-retrieval";
|
|
2
2
|
import type { CataloxBoundClient } from "../catalox/client.js";
|
|
3
|
-
import type { ContentTypeInput, DescriptorMutationOptions, MemorixCompletionMapping, PropertyInput, RegisterEntityDescriptorInput } from "../types/index.js";
|
|
3
|
+
import type { ContentTypeInput, DescriptorMutationOptions, MemorixCompletionMapping, PropertyInput, ReconcileDescriptorDraft, RegisterEntityDescriptorInput } from "../types/index.js";
|
|
4
4
|
import { registerEntityDescriptor, removeEntityDescriptor, updateEntityDescriptor } from "../mutations/entity.js";
|
|
5
5
|
import { renameEntityDescriptor } from "../mutations/rename-entity.js";
|
|
6
6
|
import { addContentType, ensureCollection, planCollectionRename, removeContentType, resolveCollection, updateContentType } from "../mutations/content-type.js";
|
|
@@ -12,7 +12,7 @@ import { createItemDescriptor, removeItemDescriptor, setEntityDefaultItem, updat
|
|
|
12
12
|
import { addRelation, removeRelation, updateRelation, type RelationInput } from "../mutations/relation.js";
|
|
13
13
|
import { registerMapping, removeMapping, updateMapping } from "../mutations/mapping.js";
|
|
14
14
|
import { applyDescriptorSeedManifest, importDescriptorSeedInputs, type DescriptorSeedManifest } from "../seeds/index.js";
|
|
15
|
-
import { type ReconcileDescriptorsOptions, type ReconcileDescriptorsResult } from "../reconcile/index.js";
|
|
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
17
|
export type CreateMemorixDescriptorAdminOptions = {
|
|
18
18
|
catalox: CataloxBoundClient;
|
|
@@ -59,6 +59,7 @@ export type MemorixDescriptorAdmin = {
|
|
|
59
59
|
buildAddContentTypeDraftFromCollection(input: AddContentTypeDraftInput): ReturnType<typeof buildAddContentTypeDraftFromCollectionWithSnapshot>;
|
|
60
60
|
buildFixCollectionBindingDraft(input: FixCollectionBindingDraftInput): ReturnType<typeof buildFixCollectionBindingDraftWithSnapshot>;
|
|
61
61
|
buildIgnoreCollectionDraft(input: IgnoreCollectionDraftInput): ReturnType<typeof buildIgnoreCollectionDraft>;
|
|
62
|
+
applyReconcileDraft(draft: ReconcileDescriptorDraft, options?: DescriptorMutationOptions): ReturnType<typeof applyReconcileDraft>;
|
|
62
63
|
createItemDescriptor(input: Record<string, unknown>, options?: DescriptorMutationOptions): ReturnType<typeof createItemDescriptor>;
|
|
63
64
|
updateItemDescriptor(id: string, patch: Record<string, unknown>, options?: DescriptorMutationOptions): ReturnType<typeof updateItemDescriptor>;
|
|
64
65
|
removeItemDescriptor(id: string, options?: DescriptorMutationOptions): ReturnType<typeof removeItemDescriptor>;
|
|
@@ -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,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,KAAK,EACV,gBAAgB,EAChB,yBAAyB,EACzB,wBAAwB,EACxB,aAAa,EACb,6BAA6B,EAC9B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,EACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB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AO,CAAC,EAAE,yBAAyB,GAClC,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAEzC,wCAAwC,CACtC,KAAK,EAAE,0BAA0B,GAChC,UAAU,CAAC,OAAO,wCAAwC,CAAC,CAAC;IAC/D,sCAAsC,CACpC,KAAK,EAAE,wBAAwB,GAC9B,UAAU,CAAC,OAAO,kDAAkD,CAAC,CAAC;IACzE,8BAA8B,CAC5B,KAAK,EAAE,8BAA8B,GACpC,UAAU,CAAC,OAAO,0CAA0C,CAAC,CAAC;IACjE,0BAA0B,CACxB,KAAK,EAAE,0BAA0B,GAChC,UAAU,CAAC,OAAO,0BAA0B,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"create-admin.d.ts","sourceRoot":"","sources":["../../src/admin/create-admin.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,KAAK,EACV,gBAAgB,EAChB,yBAAyB,EACzB,wBAAwB,EACxB,aAAa,EACb,wBAAwB,EACxB,6BAA6B,EAC9B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,EACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACpB,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,qBAA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E,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GAC9C,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC;IAElD,6BAA6B,CAC3B,OAAO,CAAC,EAAE,IAAI,CACZ,2BAA2B,EAC3B,SAAS,GAAG,OAAO,GAAG,YAAY,GAAG,QAAQ,CAC9C,GACA,OAAO,CAAC,0BAA0B,CAAC,CAAC;IACvC,+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,CA2IxB;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,CAgCjC"}
|
|
@@ -14,7 +14,7 @@ import { registerMapping, removeMapping, updateMapping, } from "../mutations/map
|
|
|
14
14
|
import { validateMemorixDescriptors } from "../integrity/validate.js";
|
|
15
15
|
import { buildDescriptorGraph, descriptorGraphToMermaid } from "../integrity/graph.js";
|
|
16
16
|
import { applyDescriptorSeedManifest, buildDescriptorSeedManifest, exportDescriptorSeedInputsFromCatalox, importDescriptorSeedInputs, } from "../seeds/index.js";
|
|
17
|
-
import { reconcileDescriptorsWithMongo, } from "../reconcile/index.js";
|
|
17
|
+
import { reconcileDescriptorsWithMongo, applyReconcileDraft, } from "../reconcile/index.js";
|
|
18
18
|
import { buildAddContentTypeDraftFromCollectionWithSnapshot, buildDescriptorDraftFromOrphanCollection, buildFixCollectionBindingDraftWithSnapshot, buildIgnoreCollectionDraft, } from "../reconcile/drafts.js";
|
|
19
19
|
import { validateMemorixEntityDescriptor } from "../validation/descriptor-validation.js";
|
|
20
20
|
export function createMemorixDescriptorAdmin(options) {
|
|
@@ -74,6 +74,7 @@ export function createMemorixDescriptorAdmin(options) {
|
|
|
74
74
|
buildAddContentTypeDraftFromCollection: (input) => buildAddContentTypeDraftFromCollectionWithSnapshot(ctx, input),
|
|
75
75
|
buildFixCollectionBindingDraft: (input) => buildFixCollectionBindingDraftWithSnapshot(ctx, input),
|
|
76
76
|
buildIgnoreCollectionDraft: (input) => buildIgnoreCollectionDraft(input),
|
|
77
|
+
applyReconcileDraft: (draft, mutationOptions) => applyReconcileDraft(ctx, draft, mutationOptions),
|
|
77
78
|
createItemDescriptor: (input, mutationOptions) => createItemDescriptor(ctx, input, mutationOptions),
|
|
78
79
|
updateItemDescriptor: (id, patch, mutationOptions) => updateItemDescriptor(ctx, id, patch, mutationOptions),
|
|
79
80
|
removeItemDescriptor: (id, mutationOptions) => removeItemDescriptor(ctx, id, mutationOptions),
|
|
@@ -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;
|
|
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;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;IAC5B,MAAM,QAAQ,GAAG,UAAU,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC;IAC9C,IAAI,CAAC,MAAM,IAAI,QAAQ,EAAE,CAAC;QACxB,IAAI,CAAC;YACH,MAAM,EAAE,0BAA0B,EAAE,GAAG,MAAM,MAAM,CAAC,yBAAyB,CAAC,CAAC;YAC/E,MAAM,GAAG,MAAM,0BAA0B,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;QAC5D,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,GAAG,SAAS,CAAC;QACrB,CAAC;IACH,CAAC;IAED,MAAM,KAAK,GAAG,4BAA4B,CAAC;QACzC,OAAO,EAAE,KAAK;QACd,MAAM;QACN,KAAK;QACL,UAAU;KACX,CAAC,CAAC;IACH,IAAI,UAAU,CAAC,kCAAkC,KAAK,GAAG,EAAE,CAAC;QAC1D,MAAM,KAAK,CAAC,+BAA+B,EAAE,CAAC;IAChD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DescriptorMutationOptions, DescriptorMutationResult } from "../types/index.js";
|
|
2
|
+
import type { MemorixDescriptorAdmin } from "./create-admin.js";
|
|
3
|
+
export type ExecuteDescriptorMutationRequest = {
|
|
4
|
+
operation: string;
|
|
5
|
+
input: Record<string, unknown>;
|
|
6
|
+
options?: DescriptorMutationOptions;
|
|
7
|
+
};
|
|
8
|
+
export declare function executeDescriptorMutation(admin: MemorixDescriptorAdmin, request: ExecuteDescriptorMutationRequest): Promise<DescriptorMutationResult>;
|
|
9
|
+
//# sourceMappingURL=execute-mutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-mutation.d.ts","sourceRoot":"","sources":["../../src/admin/execute-mutation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,yBAAyB,EACzB,wBAAwB,EAKzB,MAAM,mBAAmB,CAAC;AAK3B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,MAAM,MAAM,gCAAgC,GAAG;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,yBAAyB,CAAC;CACrC,CAAC;AAEF,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,wBAAwB,CAAC,CA6KnC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { mutationFailure } from "../mutations/common.js";
|
|
2
|
+
export async function executeDescriptorMutation(admin, request) {
|
|
3
|
+
const { operation, input, options } = request;
|
|
4
|
+
switch (operation) {
|
|
5
|
+
case "registerEntityDescriptor":
|
|
6
|
+
return admin.registerEntityDescriptor(input, options);
|
|
7
|
+
case "updateEntityDescriptor":
|
|
8
|
+
return admin.updateEntityDescriptor(String(input.entityName), input.patch, options);
|
|
9
|
+
case "removeEntityDescriptor":
|
|
10
|
+
return admin.removeEntityDescriptor(String(input.entityName), options);
|
|
11
|
+
case "renameEntityDescriptor":
|
|
12
|
+
return admin.renameEntityDescriptor(String(input.from), String(input.to), input);
|
|
13
|
+
case "addContentType":
|
|
14
|
+
return admin.addContentType(String(input.entityName), input.contentType, options);
|
|
15
|
+
case "updateContentType":
|
|
16
|
+
return admin.updateContentType(String(input.entityName), String(input.contentTypeKey ?? input.key), input.patch, options);
|
|
17
|
+
case "removeContentType":
|
|
18
|
+
return admin.removeContentType(String(input.entityName), String(input.contentTypeKey ?? input.key), options);
|
|
19
|
+
case "ensureCollection":
|
|
20
|
+
return admin.ensureCollection(String(input.entityName), String(input.contentTypeKey), options);
|
|
21
|
+
case "addProperty":
|
|
22
|
+
return admin.addProperty(String(input.entityName), String(input.propertyKey ?? input.key), input.property, options);
|
|
23
|
+
case "updateProperty":
|
|
24
|
+
return admin.updateProperty(String(input.entityName), String(input.propertyKey ?? input.key), input.patch, options);
|
|
25
|
+
case "removeProperty":
|
|
26
|
+
return admin.removeProperty(String(input.entityName), String(input.propertyKey ?? input.key), options);
|
|
27
|
+
case "createListDescriptor":
|
|
28
|
+
return admin.createListDescriptor(input, options);
|
|
29
|
+
case "updateListDescriptor":
|
|
30
|
+
return admin.updateListDescriptor(String(input.id), (input.patch ?? input), options);
|
|
31
|
+
case "removeListDescriptor":
|
|
32
|
+
return admin.removeListDescriptor(String(input.id), options);
|
|
33
|
+
case "setEntityDefaultList":
|
|
34
|
+
return admin.setEntityDefaultList(String(input.entityName), String(input.listDescriptorId), options);
|
|
35
|
+
case "createSliceDescriptor":
|
|
36
|
+
return admin.createSliceDescriptor(input, options);
|
|
37
|
+
case "updateSliceDescriptor":
|
|
38
|
+
return admin.updateSliceDescriptor(String(input.sliceId ?? input.id), (input.patch ?? input), options);
|
|
39
|
+
case "removeSliceDescriptor":
|
|
40
|
+
return admin.removeSliceDescriptor(String(input.sliceId ?? input.id), options);
|
|
41
|
+
case "createItemDescriptor":
|
|
42
|
+
return admin.createItemDescriptor(input, options);
|
|
43
|
+
case "updateItemDescriptor":
|
|
44
|
+
return admin.updateItemDescriptor(String(input.id), (input.patch ?? input), options);
|
|
45
|
+
case "removeItemDescriptor":
|
|
46
|
+
return admin.removeItemDescriptor(String(input.id), options);
|
|
47
|
+
case "setEntityDefaultItem":
|
|
48
|
+
return admin.setEntityDefaultItem(String(input.entityName), String(input.itemDescriptorId), options);
|
|
49
|
+
case "addRelation":
|
|
50
|
+
return admin.addRelation(String(input.sourceEntity ?? input.entityName), String(input.relationKey), input.descriptor, options);
|
|
51
|
+
case "updateRelation":
|
|
52
|
+
return admin.updateRelation(String(input.sourceEntity ?? input.entityName), String(input.relationKey), input.patch, options);
|
|
53
|
+
case "removeRelation":
|
|
54
|
+
return admin.removeRelation(String(input.sourceEntity ?? input.entityName), String(input.relationKey), options);
|
|
55
|
+
case "registerMapping":
|
|
56
|
+
return admin.registerMapping(input, options);
|
|
57
|
+
case "updateMapping":
|
|
58
|
+
return admin.updateMapping(String(input.id), input.patch, options);
|
|
59
|
+
case "removeMapping":
|
|
60
|
+
return admin.removeMapping(String(input.id), options);
|
|
61
|
+
case "updateInventoryPolicy":
|
|
62
|
+
return admin.updateInventoryPolicy(input.patch, options);
|
|
63
|
+
case "ignoreCollection":
|
|
64
|
+
return admin.ignoreCollection(input, options);
|
|
65
|
+
case "unignoreCollection":
|
|
66
|
+
return admin.unignoreCollection(input, options);
|
|
67
|
+
case "applyReconcileDraft":
|
|
68
|
+
return admin.applyReconcileDraft(input.draft, options);
|
|
69
|
+
case "reconcileDescriptorsWithMongo":
|
|
70
|
+
return mutationFailure([
|
|
71
|
+
{
|
|
72
|
+
code: "USE_RECONCILE_API",
|
|
73
|
+
message: "reconcileDescriptorsWithMongo is not a mutation; call admin.reconcileDescriptorsWithMongo() directly",
|
|
74
|
+
},
|
|
75
|
+
], options);
|
|
76
|
+
default:
|
|
77
|
+
return mutationFailure([
|
|
78
|
+
{
|
|
79
|
+
code: "UNKNOWN_OPERATION",
|
|
80
|
+
message: `Unknown descriptor mutation operation "${operation}"`,
|
|
81
|
+
},
|
|
82
|
+
], options);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=execute-mutation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-mutation.js","sourceRoot":"","sources":["../../src/admin/execute-mutation.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAYzD,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,KAA6B,EAC7B,OAAyC;IAEzC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;IAE9C,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,0BAA0B;YAC7B,OAAO,KAAK,CAAC,wBAAwB,CACnC,KAAsC,EACtC,OAAO,CACR,CAAC;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emorixDescriptorAdmin, createMemorixDescriptorAdminFromEnv, type CreateMemorixDescriptorAdminOptions, type CreateMemorixDescriptorAdminFromEnvOptions, type MemorixDescriptorAdmin, } from "./admin/create-admin.js";
|
|
2
|
+
export { createMemorixControlPlaneFromEnv, type CreateMemorixControlPlaneFromEnvOptions, type MemorixControlPlane, } from "./admin/control-plane.js";
|
|
3
|
+
export { executeDescriptorMutation, type ExecuteDescriptorMutationRequest, } from "./admin/execute-mutation.js";
|
|
2
4
|
export { MEMORIX_APP_ID, MEMORIX_COMPLETION_MAPPINGS_CATALOG, MEMORIX_DESCRIPTOR_CATALOG_IDS, MEMORIX_ENTITY_DESCRIPTORS_CATALOG, MEMORIX_INVENTORY_POLICIES_CATALOG, MEMORIX_INVENTORY_POLICY_ITEM_ID, MEMORIX_ITEM_DESCRIPTORS_CATALOG, MEMORIX_LIST_DESCRIPTORS_CATALOG, MEMORIX_SYSTEM_CATALOG_IDS, allowedIdFieldsForTarget, defaultIdFieldForTarget, resolveMemorixAppId, } from "./catalog/ids.js";
|
|
3
5
|
export type { CataloxWriteAction, ContentTypeInput, DescriptorIntegrityReport, DescriptorMutationOptions, DescriptorMutationResult, DescriptorSnapshot, IgnoredCollectionEntry, IgnoredCollectionReason, IntegrityIssue, MemorixCompletionMapping, MemorixIdField, MemorixInventoryPolicy, MemorixSeedScope, MemorixSliceDescriptor, MemorixSliceFilter, MemorixSliceFilterRule, MemorixTarget, MongoAction, PropertyInput, ReconcileDescriptorDraft, RegisterEntityDescriptorInput, SliceValidationIssue, SliceValidationReport, } from "./types/index.js";
|
|
4
6
|
export { validateMemorixDescriptors, validateDescriptorSnapshot, } from "./integrity/validate.js";
|
|
5
7
|
export { buildDescriptorGraph, descriptorGraphToMermaid, type DescriptorGraph, type DescriptorGraphEdge, type DescriptorGraphNode, } from "./integrity/graph.js";
|
|
6
8
|
export { assertListFieldsHumanReadable, defaultItemDescriptorId, defaultListDescriptorId, isKebabCase, parseDescriptorData, singularizeEntityName, validateMemorixEntityDescriptor, validateMemorixEntityListDescriptor, validateMemorixItemDescriptor, validateMemorixListDescriptor, validatePropertyDescriptor, DescriptorValidationError, } from "./validation/descriptor-validation.js";
|
|
7
9
|
export { applyDescriptorSeedManifest, buildDescriptorSeedManifest, exportDescriptorSeedInputs, exportDescriptorSeedInputsFromCatalox, importDescriptorSeedInputs, type DescriptorSeedManifest, } from "./seeds/index.js";
|
|
8
|
-
export { reconcileDescriptorsWithMongo, type ReconcileDescriptorsResult, type ReconcileSuggestion, } from "./reconcile/index.js";
|
|
10
|
+
export { reconcileDescriptorsWithMongo, applyReconcileDraft, buildReconcileDraftForSuggestion, buildReconcileSuggestionsFromUnifiedInventory, type ReconcileDescriptorsResult, type ReconcileSuggestion, type MemorixUnifiedInventory, type MemorixInventoryIssue, } from "./reconcile/index.js";
|
|
9
11
|
export { buildAddContentTypeDraftFromCollection, buildDescriptorDraftFromOrphanCollection, buildFixCollectionBindingDraft, buildIgnoreCollectionDraft, type AddContentTypeDraftInput, type FixCollectionBindingDraftInput, type IgnoreCollectionDraftInput, type OrphanCollectionDraftInput, } from "./reconcile/drafts.js";
|
|
10
12
|
export { parseMemorixCollectionName, type MemorixCollectionNameParseResult, } from "./collections/parse.js";
|
|
11
13
|
export { validateMemorixSliceDescriptorShape, validateSliceDescriptorAgainstSnapshot, buildSlicePreview, isMemorixSliceDescriptor, } from "./validation/slice-validation.js";
|