@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.
- package/dist/client/create-client.d.ts.map +1 -1
- package/dist/client/create-client.js +4 -4
- package/dist/client/create-client.js.map +1 -1
- package/dist/client/xronox-adapter.d.ts.map +1 -1
- package/dist/client/xronox-adapter.js +7 -0
- package/dist/client/xronox-adapter.js.map +1 -1
- package/dist/client/xronox-like.d.ts +22 -0
- package/dist/client/xronox-like.d.ts.map +1 -1
- package/dist/data/memorix-count.d.ts +1 -0
- package/dist/data/memorix-count.d.ts.map +1 -1
- package/dist/data/memorix-count.js +1 -0
- package/dist/data/memorix-count.js.map +1 -1
- package/dist/data/memorix-read.d.ts.map +1 -1
- package/dist/data/memorix-read.js +5 -0
- package/dist/data/memorix-read.js.map +1 -1
- package/dist/explorer/collection-inventory.d.ts +77 -0
- package/dist/explorer/collection-inventory.d.ts.map +1 -0
- package/dist/explorer/collection-inventory.js +302 -0
- package/dist/explorer/collection-inventory.js.map +1 -0
- package/dist/explorer/entity-graph.d.ts +35 -12
- package/dist/explorer/entity-graph.d.ts.map +1 -1
- package/dist/explorer/entity-graph.js +117 -55
- package/dist/explorer/entity-graph.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/tests/collection-inventory.test.d.ts +2 -0
- package/dist/tests/collection-inventory.test.d.ts.map +1 -0
- package/dist/tests/collection-inventory.test.js +207 -0
- package/dist/tests/collection-inventory.test.js.map +1 -0
- package/dist/tests/entity-graph.test.d.ts +2 -0
- package/dist/tests/entity-graph.test.d.ts.map +1 -0
- package/dist/tests/entity-graph.test.js +148 -0
- package/dist/tests/entity-graph.test.js.map +1 -0
- package/docs/DATA-TIER-CONTRACT.md +6 -3
- package/docs/EXPLORER-HOST-APIS.md +16 -2
- package/docs/MEMORIX-CATALOX-CONTRACTS.md +8 -4
- package/docs/XRONOX-DATA-TIER-REQUIREMENTS.md +46 -349
- package/docs/fr/README.md +15 -0
- package/docs/fr/xronox-fr-list-collections.md +196 -0
- package/docs/fr/xronox-fr-memorix-env-preset.md +69 -0
- package/docs/fr/xronox-fr-per-role-selftest.md +60 -0
- 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.
|
|
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.
|
|
35
|
+
"@x12i/xronox": "^3.9.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^20.14.0",
|