@x12i/memorix-writer 1.3.0 → 1.3.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 CHANGED
@@ -70,7 +70,7 @@ Override defaults only when you need to:
70
70
 
71
71
  ## Collection resolution
72
72
 
73
- Writes target **`memorix-entities`** or **`memorix-events`** based on the write descriptor (`target.kind`, defaulting from `identity.idField`). Database names follow [Memorix Database Conventions](./docs/MEMORIX-DATABASE-CONVENTIONS.md) (`MEMORIX_ENTITIES_DB`, `MEMORIX_EVENTS_DB`, …).
73
+ Writes target **`memorix-entities`**, **`memorix-events`**, or **`memorix-knowledge`** based on the write descriptor (`target.kind`, defaulting from `identity.idField`). Database names follow [Memorix Database Conventions](./docs/MEMORIX-DATABASE-CONVENTIONS.md) (`MEMORIX_ENTITIES_DB`, `MEMORIX_EVENTS_DB`, `MEMORIX_KNOWLEDGE_DB`, …).
74
74
 
75
75
  Collection name resolution order:
76
76
 
@@ -105,6 +105,8 @@ npm run catalox:seed:write-descriptors:validate
105
105
 
106
106
  Seed file: [`catalox-seeds/memorix-write-descriptors.manifest.json`](catalox-seeds/memorix-write-descriptors.manifest.json)
107
107
 
108
+ Shipped write descriptors include `asset-analysis-write` (entity) and corpus helpers `content-documents-snapshot-write` / `content-documents-chunk-write` (`knowledge` target). Record builders: [`@x12i/memorix-corpus`](../memorix-corpus/README.md).
109
+
108
110
  ## Acceptance criteria
109
111
 
110
112
  | ID | Status |
@@ -158,6 +158,181 @@
158
158
  "defaultMode": "summary"
159
159
  }
160
160
  }
161
+ },
162
+ {
163
+ "catalogId": "memorix-write-descriptors",
164
+ "data": {
165
+ "id": "content-documents-snapshot-write",
166
+ "entity": "content-documents",
167
+ "title": "Write Content Document Snapshot",
168
+ "target": {
169
+ "kind": "knowledge",
170
+ "contentType": "snapshots"
171
+ },
172
+ "identity": {
173
+ "idField": "knowledgeId",
174
+ "requireExistingCanonical": false
175
+ },
176
+ "operations": {
177
+ "allowed": ["add", "upsert"],
178
+ "default": "upsert"
179
+ },
180
+ "fields": {
181
+ "title": {
182
+ "label": "Title",
183
+ "inputPath": "title",
184
+ "target": { "path": "data.title" },
185
+ "writable": true,
186
+ "valueType": "string"
187
+ },
188
+ "summary": {
189
+ "label": "Summary",
190
+ "inputPath": "summary",
191
+ "target": { "path": "data.summary" },
192
+ "writable": true,
193
+ "valueType": "string"
194
+ },
195
+ "language": {
196
+ "label": "Language",
197
+ "inputPath": "language",
198
+ "target": { "path": "data.language" },
199
+ "writable": true,
200
+ "valueType": "string"
201
+ },
202
+ "sourceKind": {
203
+ "label": "Source kind",
204
+ "inputPath": "sourceKind",
205
+ "target": { "path": "source.kind" },
206
+ "writable": true,
207
+ "valueType": "string"
208
+ },
209
+ "sourceUri": {
210
+ "label": "Source URI",
211
+ "inputPath": "sourceUri",
212
+ "target": { "path": "source.uri" },
213
+ "writable": true,
214
+ "valueType": "string"
215
+ },
216
+ "canonicalUri": {
217
+ "label": "Canonical URI",
218
+ "inputPath": "canonicalUri",
219
+ "target": { "path": "source.canonicalUri" },
220
+ "writable": true,
221
+ "valueType": "string"
222
+ },
223
+ "contentHash": {
224
+ "label": "Content hash",
225
+ "inputPath": "contentHash",
226
+ "target": { "path": "provenance.contentHash" },
227
+ "writable": true,
228
+ "valueType": "string"
229
+ },
230
+ "cleanMarkdown": {
231
+ "label": "Clean Markdown",
232
+ "inputPath": "cleanMarkdown",
233
+ "target": { "path": "content.cleanMarkdown" },
234
+ "writable": true,
235
+ "valueType": "content",
236
+ "content": {
237
+ "enabled": true,
238
+ "objectType": "memorix-content-object",
239
+ "acceptBody": true,
240
+ "acceptPointer": true,
241
+ "format": "markdown",
242
+ "maxBytes": 10485760,
243
+ "contentKeyTemplate": "content-documents/{{knowledgeId}}/{{contentHash}}/clean.md",
244
+ "generatePreview": true,
245
+ "previewMaxChars": 500,
246
+ "computeMetadata": true,
247
+ "storage": {
248
+ "provider": "gcs",
249
+ "bucket": "memorix-content",
250
+ "prefix": "content-documents"
251
+ }
252
+ }
253
+ }
254
+ },
255
+ "content": {
256
+ "allowed": true,
257
+ "allowedFields": ["cleanMarkdown"],
258
+ "generatePreview": true,
259
+ "previewMaxChars": 500,
260
+ "computeMetadata": true,
261
+ "maxBytes": 10485760
262
+ },
263
+ "validation": {
264
+ "rejectUnknownFields": true,
265
+ "requireAtLeastOneWritableField": true
266
+ },
267
+ "return": {
268
+ "defaultMode": "summary"
269
+ }
270
+ }
271
+ },
272
+ {
273
+ "catalogId": "memorix-write-descriptors",
274
+ "data": {
275
+ "id": "content-documents-chunk-write",
276
+ "entity": "content-documents",
277
+ "title": "Write Content Document Chunk",
278
+ "target": {
279
+ "kind": "knowledge",
280
+ "contentType": "chunks"
281
+ },
282
+ "identity": {
283
+ "idField": "knowledgeId",
284
+ "requireExistingCanonical": false
285
+ },
286
+ "operations": {
287
+ "allowed": ["add"],
288
+ "default": "add"
289
+ },
290
+ "fields": {
291
+ "text": {
292
+ "label": "Chunk text",
293
+ "inputPath": "text",
294
+ "target": { "path": "data.text" },
295
+ "required": true,
296
+ "writable": true,
297
+ "valueType": "string"
298
+ },
299
+ "sectionTitle": {
300
+ "label": "Section title",
301
+ "inputPath": "sectionTitle",
302
+ "target": { "path": "data.sectionTitle" },
303
+ "writable": true,
304
+ "valueType": "string"
305
+ },
306
+ "tokenCount": {
307
+ "label": "Token count",
308
+ "inputPath": "tokenCount",
309
+ "target": { "path": "data.tokenCount" },
310
+ "writable": true,
311
+ "valueType": "number"
312
+ },
313
+ "chunkIndex": {
314
+ "label": "Chunk index",
315
+ "inputPath": "chunkIndex",
316
+ "target": { "path": "provenance.chunkIndex" },
317
+ "writable": true,
318
+ "valueType": "number"
319
+ },
320
+ "contentHash": {
321
+ "label": "Parent content hash",
322
+ "inputPath": "contentHash",
323
+ "target": { "path": "parent.contentHash" },
324
+ "writable": true,
325
+ "valueType": "string"
326
+ }
327
+ },
328
+ "validation": {
329
+ "rejectUnknownFields": true,
330
+ "requireAtLeastOneWritableField": true
331
+ },
332
+ "return": {
333
+ "defaultMode": "summary"
334
+ }
335
+ }
161
336
  }
162
337
  ]
163
338
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x12i/memorix-writer",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Descriptor-driven write layer for Memorix entity/event records and content objects",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -26,9 +26,9 @@
26
26
  "node": ">=18.0.0"
27
27
  },
28
28
  "dependencies": {
29
- "@x12i/catalox": "^5.1.1",
30
- "@x12i/memorix-descriptors": "^1.10.0",
31
- "@x12i/memorix-retrieval": "^1.13.0",
29
+ "@x12i/catalox": "^5.9.8",
30
+ "@x12i/memorix-descriptors": "^1.11.0",
31
+ "@x12i/memorix-retrieval": "^1.15.0",
32
32
  "mongodb": "^6.21.0"
33
33
  },
34
34
  "devDependencies": {
@@ -44,5 +44,10 @@
44
44
  },
45
45
  "publishConfig": {
46
46
  "access": "public"
47
+ },
48
+ "repository": {
49
+ "type": "git",
50
+ "url": "git+ssh://git@github.com/x12i/memorix-mono-repo.git",
51
+ "directory": "memorix-writer"
47
52
  }
48
53
  }