@medicine-wheel/storage-provider 0.15.9 → 0.16.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.
@@ -27,6 +27,7 @@ export interface EdgePatch {
27
27
  strength?: number;
28
28
  ceremony_honored?: boolean;
29
29
  obligations?: string[];
30
+ description?: string;
30
31
  }
31
32
  export declare class NodeNotFoundError extends Error {
32
33
  readonly nodeId: string;
package/dist/jsonl.js CHANGED
@@ -158,6 +158,7 @@ export class JsonlProvider {
158
158
  ? { ceremony_honored: patch.ceremony_honored }
159
159
  : {}),
160
160
  ...(patch.obligations !== undefined ? { obligations: patch.obligations } : {}),
161
+ ...(patch.description !== undefined ? { description: patch.description } : {}),
161
162
  };
162
163
  edges[index] = next;
163
164
  writeJsonl(this.edgesFile, edges);
@@ -346,6 +347,7 @@ export class JsonlProvider {
346
347
  ceremony_honored: Boolean(edge.ceremony_honored),
347
348
  last_ceremony: edge.last_ceremony ?? edge.ceremony_id,
348
349
  obligations: Array.isArray(edge.obligations) ? edge.obligations : [],
350
+ ...(typeof edge.description === 'string' && edge.description ? { description: edge.description } : {}),
349
351
  created_at: edge.created_at,
350
352
  };
351
353
  }
package/dist/neon.js CHANGED
@@ -122,15 +122,17 @@ export class NeonProvider {
122
122
  // ── Edge Operations ──
123
123
  async createEdge(edge) {
124
124
  await this.db `
125
- INSERT INTO edges (from_id, to_id, relationship_type, strength, ceremony_honored, last_ceremony, obligations, created_at)
125
+ INSERT INTO edges (from_id, to_id, relationship_type, strength, ceremony_honored, last_ceremony, obligations, description, created_at)
126
126
  VALUES (${edge.from_id}, ${edge.to_id}, ${edge.relationship_type}, ${edge.strength},
127
- ${edge.ceremony_honored}, ${edge.last_ceremony || null}, ${JSON.stringify(edge.obligations)}, ${edge.created_at})
127
+ ${edge.ceremony_honored}, ${edge.last_ceremony || null}, ${JSON.stringify(edge.obligations)},
128
+ ${edge.description || null}, ${edge.created_at})
128
129
  ON CONFLICT (from_id, to_id) DO UPDATE SET
129
130
  relationship_type = EXCLUDED.relationship_type,
130
131
  strength = EXCLUDED.strength,
131
132
  ceremony_honored = EXCLUDED.ceremony_honored,
132
133
  last_ceremony = EXCLUDED.last_ceremony,
133
- obligations = EXCLUDED.obligations
134
+ obligations = EXCLUDED.obligations,
135
+ description = EXCLUDED.description
134
136
  `;
135
137
  }
136
138
  async getEdge(fromId, toId) {
@@ -180,13 +182,15 @@ export class NeonProvider {
180
182
  ? { ceremony_honored: patch.ceremony_honored }
181
183
  : {}),
182
184
  ...(patch.obligations !== undefined ? { obligations: patch.obligations } : {}),
185
+ ...(patch.description !== undefined ? { description: patch.description } : {}),
183
186
  };
184
187
  await this.db `
185
188
  UPDATE edges SET
186
189
  relationship_type = ${next.relationship_type},
187
190
  strength = ${next.strength},
188
191
  ceremony_honored = ${next.ceremony_honored},
189
- obligations = ${JSON.stringify(next.obligations)}
192
+ obligations = ${JSON.stringify(next.obligations)},
193
+ description = ${next.description || null}
190
194
  WHERE from_id = ${fromId} AND to_id = ${toId}
191
195
  `;
192
196
  return next;
@@ -208,6 +212,7 @@ export class NeonProvider {
208
212
  ceremony_honored: row.ceremony_honored,
209
213
  last_ceremony: row.last_ceremony || undefined,
210
214
  obligations: parseJsonValue(row.obligations, []),
215
+ ...(typeof row.description === 'string' && row.description ? { description: row.description } : {}),
211
216
  created_at: toIsoString(row.created_at),
212
217
  };
213
218
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medicine-wheel/storage-provider",
3
- "version": "0.15.9",
3
+ "version": "0.16.1",
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.15.9"
19
+ "@medicine-wheel/ontology-core": "^0.16.1"
20
20
  },
21
21
  "devDependencies": {
22
22
  "typescript": "^5.7.0"