@x12i/memorix-retrieval 1.5.1 → 1.6.2

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.
Files changed (44) hide show
  1. package/dist/client/create-client.d.ts.map +1 -1
  2. package/dist/client/create-client.js +4 -4
  3. package/dist/client/create-client.js.map +1 -1
  4. package/dist/client/xronox-adapter.d.ts.map +1 -1
  5. package/dist/client/xronox-adapter.js +7 -0
  6. package/dist/client/xronox-adapter.js.map +1 -1
  7. package/dist/client/xronox-like.d.ts +22 -0
  8. package/dist/client/xronox-like.d.ts.map +1 -1
  9. package/dist/data/memorix-count.d.ts +1 -0
  10. package/dist/data/memorix-count.d.ts.map +1 -1
  11. package/dist/data/memorix-count.js +1 -0
  12. package/dist/data/memorix-count.js.map +1 -1
  13. package/dist/data/memorix-read.d.ts.map +1 -1
  14. package/dist/data/memorix-read.js +5 -0
  15. package/dist/data/memorix-read.js.map +1 -1
  16. package/dist/explorer/collection-inventory.d.ts +77 -0
  17. package/dist/explorer/collection-inventory.d.ts.map +1 -0
  18. package/dist/explorer/collection-inventory.js +302 -0
  19. package/dist/explorer/collection-inventory.js.map +1 -0
  20. package/dist/explorer/entity-graph.d.ts +35 -12
  21. package/dist/explorer/entity-graph.d.ts.map +1 -1
  22. package/dist/explorer/entity-graph.js +117 -55
  23. package/dist/explorer/entity-graph.js.map +1 -1
  24. package/dist/index.d.ts +2 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +1 -0
  27. package/dist/index.js.map +1 -1
  28. package/dist/tests/collection-inventory.test.d.ts +2 -0
  29. package/dist/tests/collection-inventory.test.d.ts.map +1 -0
  30. package/dist/tests/collection-inventory.test.js +207 -0
  31. package/dist/tests/collection-inventory.test.js.map +1 -0
  32. package/dist/tests/entity-graph.test.d.ts +2 -0
  33. package/dist/tests/entity-graph.test.d.ts.map +1 -0
  34. package/dist/tests/entity-graph.test.js +148 -0
  35. package/dist/tests/entity-graph.test.js.map +1 -0
  36. package/docs/DATA-TIER-CONTRACT.md +6 -3
  37. package/docs/EXPLORER-HOST-APIS.md +16 -2
  38. package/docs/MEMORIX-CATALOX-CONTRACTS.md +8 -4
  39. package/docs/XRONOX-DATA-TIER-REQUIREMENTS.md +46 -349
  40. package/docs/fr/README.md +15 -0
  41. package/docs/fr/xronox-fr-list-collections.md +196 -0
  42. package/docs/fr/xronox-fr-memorix-env-preset.md +69 -0
  43. package/docs/fr/xronox-fr-per-role-selftest.md +60 -0
  44. package/package.json +2 -2
@@ -0,0 +1,69 @@
1
+ # Feature request — Memorix deployment preset / env aliases (`@x12i/xronox`)
2
+
3
+ **Date:** 2026-05-22
4
+ **Status:** **Open**
5
+ **Requested by:** `@x12i/memorix-retrieval`, Memorix Explorer smoke scripts
6
+ **Target package:** `@x12i/xronox`
7
+ **Priority:** P1 (ergonomics — not blocking inventory if roles + DB vars are set explicitly)
8
+
9
+ ---
10
+
11
+ ## Summary
12
+
13
+ Memorix documents **`MEMORIX_ENTITIES_DB`** and **`MEMORIX_EVENTS_DB`**. Xronox zero-config resolves databases via **`MONGO_OPERATIONAL_DB`**, **`MONGO_LOGS_DB`**, and role maps (`memorix_entities`, `memorix_events`). Deployments must duplicate env vars today.
14
+
15
+ This FR aligns Xronox zero-config with Memorix conventions so smoke and Explorer work with **`MONGO_URI` + `MEMORIX_*_DB` only**.
16
+
17
+ ---
18
+
19
+ ## Product requirement
20
+
21
+ When resolving Mongo database names for roles:
22
+
23
+ | Xronox role | Memorix target | Fallback chain should include |
24
+ |-------------|----------------|------------------------------|
25
+ | `memorix_entities` / `memory.entities` / `operational` | `entity` | `MEMORIX_ENTITIES_DB` → `memorix-entities` |
26
+ | `memorix_events` / `memory.events` / `logs` | `event` | `MEMORIX_EVENTS_DB` → `memorix-events` |
27
+
28
+ ---
29
+
30
+ ## Proposed options (pick one or both)
31
+
32
+ ### Option A — Env aliases in role resolution
33
+
34
+ In `resolveDatabaseNameFromRole` / `MONGO_ROLE_MAP` fallback chains:
35
+
36
+ ```
37
+ memorix_entities.database ← MEMORIX_ENTITIES_DB ← MONGO_OPERATIONAL_DB ← MONGO_DB
38
+ memorix_events.database ← MEMORIX_EVENTS_DB ← MONGO_LOGS_DB ← MONGO_DB
39
+ ```
40
+
41
+ ### Option B — Zero-config preset
42
+
43
+ ```ts
44
+ await xronox.init({ engine: "nxMongo", preset: "memorix", zeroConfig: true });
45
+ ```
46
+
47
+ Preset registers role map defaults and env aliases above. Document in Xronox README + `.env.example`.
48
+
49
+ ---
50
+
51
+ ## Acceptance criteria
52
+
53
+ - [ ] `npm run smoke:retrieval` in memorix-retrieval succeeds with only `MONGO_URI`, `MEMORIX_ENTITIES_DB`, `MEMORIX_EVENTS_DB`, Catalox creds
54
+ - [ ] No requirement to set `MONGO_OPERATIONAL_DB` / `MONGO_LOGS_DB` for Memorix deployments
55
+ - [ ] Existing non-Memorix zero-config behavior unchanged when preset not used
56
+
57
+ ---
58
+
59
+ ## Retrieval integration (after ship)
60
+
61
+ - Optionally simplify `createMemorixXronoxFromEnv` to pass `preset: "memorix"`.
62
+ - Update [MEMORIX-DATABASE-CONVENTIONS.md](../MEMORIX-DATABASE-CONVENTIONS.md) with single env table.
63
+
64
+ ---
65
+
66
+ ## Non-goals
67
+
68
+ - Catalox or descriptor env (stays in `@x12i/catalox`)
69
+ - Changing Memorix collection naming (retrieval + Catalox)
@@ -0,0 +1,60 @@
1
+ # Feature request — per-role `selfTest` detail (`@x12i/xronox`)
2
+
3
+ **Date:** 2026-05-22
4
+ **Status:** **Open**
5
+ **Requested by:** `@x12i/memorix-retrieval` (`getMemorixRetrievalHealth`)
6
+ **Target package:** `@x12i/xronox`
7
+ **Priority:** P2 (health UX — not blocking lists or inventory)
8
+
9
+ ---
10
+
11
+ ## Summary
12
+
13
+ Memorix runs **two** Mongo databases (entity + event). Health checks should report connectivity **per role**, not a single anonymous ping. Retrieval already passes `selfTestRoles: ["memorix_entities", "memorix_events"]` to the adapter when Xronox supports it.
14
+
15
+ ---
16
+
17
+ ## Product requirement
18
+
19
+ Extend `selfTest` result so hosts can show which Memorix store failed:
20
+
21
+ ```ts
22
+ type SelfTestResult = {
23
+ passed: boolean;
24
+ roles?: Array<{
25
+ role: string;
26
+ db: string;
27
+ ok: boolean;
28
+ latencyMs?: number;
29
+ error?: string;
30
+ }>;
31
+ };
32
+ ```
33
+
34
+ ```ts
35
+ await xronox.selfTest({
36
+ testConnectivity: true,
37
+ selfTestRoles: ["memorix_entities", "memorix_events"],
38
+ });
39
+ ```
40
+
41
+ ---
42
+
43
+ ## Acceptance criteria
44
+
45
+ - [ ] Each role resolves DB name and attempts connectivity (e.g. listCollections or count on a lightweight op)
46
+ - [ ] `passed: false` if any requested role fails
47
+ - [ ] Works with Memorix env vars when [memorix-env-preset FR](./xronox-fr-memorix-env-preset.md) is also applied (or explicit DB vars)
48
+
49
+ ---
50
+
51
+ ## Retrieval integration (after ship)
52
+
53
+ - `getMemorixRetrievalHealth` surfaces per-role results in response (optional field)
54
+ - Remove direct Mongo ping fallback from health when Xronox reports both roles
55
+
56
+ ---
57
+
58
+ ## Non-goals
59
+
60
+ - Descriptor / Catalox health (retrieval discovers Catalox separately)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x12i/memorix-retrieval",
3
- "version": "1.5.1",
3
+ "version": "1.6.2",
4
4
  "description": "Descriptor-driven Memorix retrieval layer for lists, items, and content objects",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -32,7 +32,7 @@
32
32
  "dependencies": {
33
33
  "@x12i/catalox": "^5.0.0",
34
34
  "@x12i/helpers": "^1.7.0",
35
- "@x12i/xronox": "^3.8.0"
35
+ "@x12i/xronox": "^3.9.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/node": "^20.14.0",