@x12i/memorix-retrieval 1.9.2 → 1.11.0

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 (52) hide show
  1. package/README.md +53 -0
  2. package/dist/client/create-client.d.ts.map +1 -1
  3. package/dist/client/create-client.js +5 -0
  4. package/dist/client/create-client.js.map +1 -1
  5. package/dist/client/create-from-env.d.ts.map +1 -1
  6. package/dist/client/create-from-env.js +8 -1
  7. package/dist/client/create-from-env.js.map +1 -1
  8. package/dist/client/create-stack-from-env.d.ts +2 -1
  9. package/dist/client/create-stack-from-env.d.ts.map +1 -1
  10. package/dist/client/create-stack-from-env.js +6 -0
  11. package/dist/client/create-stack-from-env.js.map +1 -1
  12. package/dist/client/types.d.ts +3 -1
  13. package/dist/client/types.d.ts.map +1 -1
  14. package/dist/errors/errors.d.ts.map +1 -1
  15. package/dist/errors/errors.js +6 -0
  16. package/dist/errors/errors.js.map +1 -1
  17. package/dist/explorer/slice-index.d.ts +11 -0
  18. package/dist/explorer/slice-index.d.ts.map +1 -0
  19. package/dist/explorer/slice-index.js +59 -0
  20. package/dist/explorer/slice-index.js.map +1 -0
  21. package/dist/explorer/unified-inventory.d.ts +33 -1
  22. package/dist/explorer/unified-inventory.d.ts.map +1 -1
  23. package/dist/explorer/unified-inventory.js +151 -1
  24. package/dist/explorer/unified-inventory.js.map +1 -1
  25. package/dist/index.d.ts +3 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/index.js +2 -0
  28. package/dist/index.js.map +1 -1
  29. package/dist/logging/logger.d.ts +22 -0
  30. package/dist/logging/logger.d.ts.map +1 -0
  31. package/dist/logging/logger.js +80 -0
  32. package/dist/logging/logger.js.map +1 -0
  33. package/dist/logging/types.d.ts +18 -0
  34. package/dist/logging/types.d.ts.map +1 -0
  35. package/dist/logging/types.js +2 -0
  36. package/dist/logging/types.js.map +1 -0
  37. package/dist/mongo/connection.d.ts.map +1 -1
  38. package/dist/mongo/connection.js +26 -3
  39. package/dist/mongo/connection.js.map +1 -1
  40. package/dist/retrieval/fetch-slices.d.ts.map +1 -1
  41. package/dist/retrieval/fetch-slices.js +1 -21
  42. package/dist/retrieval/fetch-slices.js.map +1 -1
  43. package/dist/tests/logger.test.d.ts +2 -0
  44. package/dist/tests/logger.test.d.ts.map +1 -0
  45. package/dist/tests/logger.test.js +34 -0
  46. package/dist/tests/logger.test.js.map +1 -0
  47. package/dist/tests/unified-inventory.test.js +242 -25
  48. package/dist/tests/unified-inventory.test.js.map +1 -1
  49. package/docs/DATA-TIER-CONTRACT.md +3 -2
  50. package/docs/EXPLORER-HOST-APIS.md +4 -1
  51. package/metadata/log-diagnostics.json +182 -0
  52. package/package.json +5 -3
@@ -0,0 +1,182 @@
1
+ {
2
+ "MONGO_CONNECTION_FAILED": {
3
+ "defaultLevel": "error",
4
+ "title": "MongoDB connection failed",
5
+ "impact": "Retrieval reads cannot run until Mongo is reachable.",
6
+ "possibleCauses": [
7
+ "MONGO_URI or MONGO_CONNECTION_STRING is missing or invalid.",
8
+ "MongoDB is not running or not reachable from this host.",
9
+ "Network or TLS configuration blocks the connection."
10
+ ],
11
+ "remediation": [
12
+ "Verify MONGO_URI is set and points to a live cluster.",
13
+ "Check Mongo connectivity from this host.",
14
+ "Review TLS/auth settings on the connection string."
15
+ ],
16
+ "retryable": true,
17
+ "userActionRequired": true,
18
+ "confidence": "high"
19
+ },
20
+ "UNKNOWN_ENTITY_DESCRIPTOR": {
21
+ "defaultLevel": "error",
22
+ "title": "Entity descriptor not found in Catalox",
23
+ "impact": "Entity-scoped reads and composition cannot resolve schema or collection bindings.",
24
+ "possibleCauses": [
25
+ "The descriptor id is misspelled or not seeded in Catalox.",
26
+ "CATALOX_APP_ID or MEMORIX_APP_ID does not match the seeded app namespace.",
27
+ "Catalog permissions block read access to entity descriptors."
28
+ ],
29
+ "remediation": [
30
+ "Confirm the entity descriptor id exists in the entity-descriptors catalog.",
31
+ "Run catalox seed ensure/apply for memorix-retrieval descriptors.",
32
+ "Verify Catalox context appId and actor permissions."
33
+ ],
34
+ "retryable": false,
35
+ "userActionRequired": true,
36
+ "confidence": "high"
37
+ },
38
+ "UNKNOWN_LIST": {
39
+ "defaultLevel": "error",
40
+ "title": "List descriptor not found in Catalox",
41
+ "impact": "List fetch cannot resolve fields, filters, or pagination driver.",
42
+ "possibleCauses": [
43
+ "The listId is not present in the list-descriptors catalog.",
44
+ "Descriptor seed was not applied for this environment.",
45
+ "App namespace or catalog access does not match the request."
46
+ ],
47
+ "remediation": [
48
+ "Verify listId in Catalox list-descriptors catalog.",
49
+ "Apply memorix-retrieval Catalox seeds.",
50
+ "Check appId and Catalox read permissions."
51
+ ],
52
+ "retryable": false,
53
+ "userActionRequired": true,
54
+ "confidence": "high"
55
+ },
56
+ "UNKNOWN_ITEM": {
57
+ "defaultLevel": "error",
58
+ "title": "Item descriptor not found in Catalox",
59
+ "impact": "Item composition cannot resolve sections or field bindings.",
60
+ "possibleCauses": [
61
+ "The item descriptor id is missing from Catalox.",
62
+ "Seeds were not applied or target the wrong app namespace.",
63
+ "Catalog read is blocked by Catalox policy."
64
+ ],
65
+ "remediation": [
66
+ "Verify item descriptor id in Catalox item-descriptors catalog.",
67
+ "Run npm run catalox:seed:ensure.",
68
+ "Check MEMORIX_APP_ID / CATALOX_APP_ID alignment."
69
+ ],
70
+ "retryable": false,
71
+ "userActionRequired": true,
72
+ "confidence": "high"
73
+ },
74
+ "DESCRIPTOR_MAPPING_BLOCKED": {
75
+ "defaultLevel": "error",
76
+ "title": "Descriptor mapping blocked by Catalox",
77
+ "impact": "Retrieval cannot load the descriptor payload required for reads.",
78
+ "possibleCauses": [
79
+ "Catalox mapping policy blocks this descriptor for the current actor.",
80
+ "Descriptor bindings are incomplete or restricted.",
81
+ "Super-admin or service context is missing where required."
82
+ ],
83
+ "remediation": [
84
+ "Review Catalox mapping policy for the descriptor catalog item.",
85
+ "Use an actor/context with permission to read mapped descriptors.",
86
+ "Inspect Catalox seed bindings for the descriptor."
87
+ ],
88
+ "retryable": false,
89
+ "userActionRequired": true,
90
+ "confidence": "medium"
91
+ },
92
+ "INVALID_DESCRIPTOR": {
93
+ "defaultLevel": "error",
94
+ "title": "Descriptor payload failed validation",
95
+ "impact": "Retrieval refuses to use an invalid descriptor to avoid incorrect reads.",
96
+ "possibleCauses": [
97
+ "Descriptor JSON in Catalox is missing required fields.",
98
+ "Descriptor shape drifted from memorix-descriptors schema.",
99
+ "Catalog item data was corrupted or partially written."
100
+ ],
101
+ "remediation": [
102
+ "Validate the descriptor JSON against memorix-descriptors types.",
103
+ "Re-seed or fix the catalog item in Catalox.",
104
+ "Compare failing field paths in the error message."
105
+ ],
106
+ "retryable": false,
107
+ "userActionRequired": true,
108
+ "confidence": "high"
109
+ },
110
+ "INVALID_FILTER": {
111
+ "defaultLevel": "error",
112
+ "title": "Runtime or descriptor filter is invalid",
113
+ "impact": "The list or slice query cannot be compiled safely to Mongo.",
114
+ "possibleCauses": [
115
+ "An unsupported filter operator was supplied.",
116
+ "advancedMongo filter is missing a mongo object.",
117
+ "Filter references an unknown field or unsafe Mongo operator."
118
+ ],
119
+ "remediation": [
120
+ "Review filter operator and field names against the entity descriptor.",
121
+ "Ensure advancedMongo filters include a valid mongo clause.",
122
+ "Remove unsupported operators from the request."
123
+ ],
124
+ "retryable": false,
125
+ "userActionRequired": true,
126
+ "confidence": "high"
127
+ },
128
+ "MISSING_DESCRIPTOR": {
129
+ "defaultLevel": "warn",
130
+ "title": "Required descriptor reference is missing",
131
+ "impact": "Partial data may be returned or a field may be omitted from the composed view.",
132
+ "possibleCauses": [
133
+ "A relation or extension references a descriptor that is not loaded.",
134
+ "Default descriptor resolution failed for the entity.",
135
+ "Catalog item was deleted or not seeded."
136
+ ],
137
+ "remediation": [
138
+ "Verify related descriptor ids in Catalox catalogs.",
139
+ "Check entity default list/item descriptor configuration.",
140
+ "Re-run descriptor seed ensure."
141
+ ],
142
+ "retryable": false,
143
+ "userActionRequired": true,
144
+ "confidence": "medium"
145
+ },
146
+ "CONTENT_NOT_FOUND": {
147
+ "defaultLevel": "warn",
148
+ "title": "Content object could not be fetched from storage",
149
+ "impact": "Item or list output may omit content-backed fields.",
150
+ "possibleCauses": [
151
+ "The storage object key does not exist.",
152
+ "Content reader credentials or bucket configuration is wrong.",
153
+ "The record references a stale contentKey."
154
+ ],
155
+ "remediation": [
156
+ "Verify contentKey and storage provider configuration.",
157
+ "Check contentReaders on the retrieval client.",
158
+ "Confirm the object exists in the configured bucket."
159
+ ],
160
+ "retryable": true,
161
+ "userActionRequired": true,
162
+ "confidence": "medium"
163
+ },
164
+ "RELATION_FETCH_FAILED": {
165
+ "defaultLevel": "warn",
166
+ "title": "Related record fetch failed",
167
+ "impact": "Relation-expanded fields may be empty while core entity data still returns.",
168
+ "possibleCauses": [
169
+ "Related entity id does not exist in Mongo.",
170
+ "Relation target collection or descriptor is misconfigured.",
171
+ "Mongo read timed out or returned a transient error."
172
+ ],
173
+ "remediation": [
174
+ "Verify relation target ids and collection bindings.",
175
+ "Inspect relation descriptor include configuration.",
176
+ "Retry if Mongo errors were transient."
177
+ ],
178
+ "retryable": true,
179
+ "userActionRequired": false,
180
+ "confidence": "medium"
181
+ }
182
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x12i/memorix-retrieval",
3
- "version": "1.9.2",
3
+ "version": "1.11.0",
4
4
  "description": "Read-side runtime data tier for Memorix: inventory, lists, items, slices, graph, and health",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -14,7 +14,8 @@
14
14
  "files": [
15
15
  "dist",
16
16
  "catalox-seeds",
17
- "docs"
17
+ "docs",
18
+ "metadata"
18
19
  ],
19
20
  "scripts": {
20
21
  "build": "tsc",
@@ -33,7 +34,8 @@
33
34
  "dependencies": {
34
35
  "@x12i/catalox": "^5.0.0",
35
36
  "@x12i/helpers": "^1.7.0",
36
- "@x12i/memorix-descriptors": "^1.5.0",
37
+ "@x12i/logxer": "^4.5.0",
38
+ "@x12i/memorix-descriptors": "^1.6.0",
37
39
  "@x12i/xronox": "^3.9.0"
38
40
  },
39
41
  "devDependencies": {