@medicine-wheel/storage-provider 0.12.0 → 0.14.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.
- package/dist/jsonl.js +27 -0
- package/dist/neon.js +19 -3
- package/package.json +2 -2
package/dist/jsonl.js
CHANGED
|
@@ -345,6 +345,7 @@ export class JsonlProvider {
|
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
347
|
parseCeremony(ceremony) {
|
|
348
|
+
const extra = ceremony;
|
|
348
349
|
return {
|
|
349
350
|
id: ceremony.id,
|
|
350
351
|
type: ceremony.type,
|
|
@@ -354,6 +355,32 @@ export class JsonlProvider {
|
|
|
354
355
|
intentions: Array.isArray(ceremony.intentions) ? ceremony.intentions : [],
|
|
355
356
|
timestamp: ceremony.timestamp,
|
|
356
357
|
research_context: ceremony.research_context,
|
|
358
|
+
// Fields added after the whitelist above was written (relations_honored,
|
|
359
|
+
// ocap; and in 0.14.0 the typed episode binding, closes, circle_id). A
|
|
360
|
+
// parser that rebuilds from a whitelist silently drops whatever the type
|
|
361
|
+
// learned later — measured 2026-09-18 when a ceremony written with
|
|
362
|
+
// episode_path read back without it.
|
|
363
|
+
...(Array.isArray(extra.relations_honored)
|
|
364
|
+
? { relations_honored: extra.relations_honored }
|
|
365
|
+
: {}),
|
|
366
|
+
...(extra.ocap && typeof extra.ocap === 'object'
|
|
367
|
+
? { ocap: extra.ocap }
|
|
368
|
+
: {}),
|
|
369
|
+
...(typeof extra.episode_path === 'string'
|
|
370
|
+
? { episode_path: extra.episode_path }
|
|
371
|
+
: {}),
|
|
372
|
+
...(typeof extra.episode_number === 'number'
|
|
373
|
+
? { episode_number: extra.episode_number }
|
|
374
|
+
: {}),
|
|
375
|
+
...(typeof extra.source === 'string'
|
|
376
|
+
? { source: extra.source }
|
|
377
|
+
: {}),
|
|
378
|
+
...(typeof extra.closes === 'string'
|
|
379
|
+
? { closes: extra.closes }
|
|
380
|
+
: {}),
|
|
381
|
+
...(typeof extra.circle_id === 'string'
|
|
382
|
+
? { circle_id: extra.circle_id }
|
|
383
|
+
: {}),
|
|
357
384
|
};
|
|
358
385
|
}
|
|
359
386
|
}
|
package/dist/neon.js
CHANGED
|
@@ -214,10 +214,14 @@ export class NeonProvider {
|
|
|
214
214
|
// ── Ceremony Operations ──
|
|
215
215
|
async logCeremony(ceremony) {
|
|
216
216
|
await this.db `
|
|
217
|
-
INSERT INTO ceremonies (id, type, direction, participants, medicines_used, intentions, timestamp, research_context
|
|
217
|
+
INSERT INTO ceremonies (id, type, direction, participants, medicines_used, intentions, timestamp, research_context,
|
|
218
|
+
relations_honored, episode_path, episode_number, source, closes, circle_id)
|
|
218
219
|
VALUES (${ceremony.id}, ${ceremony.type}, ${ceremony.direction},
|
|
219
220
|
${JSON.stringify(ceremony.participants)}, ${JSON.stringify(ceremony.medicines_used)},
|
|
220
|
-
${JSON.stringify(ceremony.intentions)}, ${ceremony.timestamp}, ${ceremony.research_context || null}
|
|
221
|
+
${JSON.stringify(ceremony.intentions)}, ${ceremony.timestamp}, ${ceremony.research_context || null},
|
|
222
|
+
${ceremony.relations_honored ? JSON.stringify(ceremony.relations_honored) : null},
|
|
223
|
+
${ceremony.episode_path ?? null}, ${ceremony.episode_number ?? null}, ${ceremony.source ?? null},
|
|
224
|
+
${ceremony.closes ?? null}, ${ceremony.circle_id ?? null})
|
|
221
225
|
ON CONFLICT (id) DO UPDATE SET
|
|
222
226
|
type = EXCLUDED.type,
|
|
223
227
|
direction = EXCLUDED.direction,
|
|
@@ -225,7 +229,13 @@ export class NeonProvider {
|
|
|
225
229
|
medicines_used = EXCLUDED.medicines_used,
|
|
226
230
|
intentions = EXCLUDED.intentions,
|
|
227
231
|
timestamp = EXCLUDED.timestamp,
|
|
228
|
-
research_context = EXCLUDED.research_context
|
|
232
|
+
research_context = EXCLUDED.research_context,
|
|
233
|
+
relations_honored = EXCLUDED.relations_honored,
|
|
234
|
+
episode_path = EXCLUDED.episode_path,
|
|
235
|
+
episode_number = EXCLUDED.episode_number,
|
|
236
|
+
source = EXCLUDED.source,
|
|
237
|
+
closes = EXCLUDED.closes,
|
|
238
|
+
circle_id = EXCLUDED.circle_id
|
|
229
239
|
`;
|
|
230
240
|
}
|
|
231
241
|
async getCeremony(id) {
|
|
@@ -263,6 +273,12 @@ export class NeonProvider {
|
|
|
263
273
|
intentions: parseJsonValue(row.intentions, []),
|
|
264
274
|
timestamp: toIsoString(row.timestamp),
|
|
265
275
|
research_context: row.research_context || undefined,
|
|
276
|
+
...(row.relations_honored ? { relations_honored: parseJsonValue(row.relations_honored, []) } : {}),
|
|
277
|
+
...(typeof row.episode_path === 'string' && row.episode_path ? { episode_path: row.episode_path } : {}),
|
|
278
|
+
...(typeof row.episode_number === 'number' ? { episode_number: row.episode_number } : {}),
|
|
279
|
+
...(typeof row.source === 'string' && row.source ? { source: row.source } : {}),
|
|
280
|
+
...(typeof row.closes === 'string' && row.closes ? { closes: row.closes } : {}),
|
|
281
|
+
...(typeof row.circle_id === 'string' && row.circle_id ? { circle_id: row.circle_id } : {}),
|
|
266
282
|
};
|
|
267
283
|
}
|
|
268
284
|
// ── Inquiry Weave Operations ──
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medicine-wheel/storage-provider",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@neondatabase/serverless": "^0.10.0",
|
|
18
18
|
"@upstash/redis": "^1.34.3",
|
|
19
|
-
"@medicine-wheel/ontology-core": "^0.
|
|
19
|
+
"@medicine-wheel/ontology-core": "^0.14.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"typescript": "^5.7.0"
|