@nicia-ai/typegraph 0.68.0 → 0.68.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/backend/postgres/pglite-store.cjs +1 -1
  3. package/dist/backend/postgres/pglite-store.js +1 -1
  4. package/dist/backend/sqlite/local-store.cjs +1 -1
  5. package/dist/backend/sqlite/local-store.js +1 -1
  6. package/dist/{chunk-T3VU3YRQ.cjs → chunk-6GUBF5TF.cjs} +24 -18
  7. package/dist/chunk-6GUBF5TF.cjs.map +1 -0
  8. package/dist/{chunk-55DGFZYC.js → chunk-EJYBHBIB.js} +3 -3
  9. package/dist/{chunk-55DGFZYC.js.map → chunk-EJYBHBIB.js.map} +1 -1
  10. package/dist/{chunk-WY3IFEKV.cjs → chunk-IFTYHOEE.cjs} +13 -5
  11. package/dist/chunk-IFTYHOEE.cjs.map +1 -0
  12. package/dist/{chunk-RTPMG6LQ.js → chunk-JVKHJQ6Q.js} +13 -5
  13. package/dist/chunk-JVKHJQ6Q.js.map +1 -0
  14. package/dist/{chunk-FS2GVO2T.cjs → chunk-OBEYH22Q.cjs} +159 -159
  15. package/dist/{chunk-FS2GVO2T.cjs.map → chunk-OBEYH22Q.cjs.map} +1 -1
  16. package/dist/{chunk-7YJHUY4T.js → chunk-VUYODTHL.js} +10 -5
  17. package/dist/chunk-VUYODTHL.js.map +1 -0
  18. package/dist/graph-merge/index.cjs +20 -20
  19. package/dist/graph-merge/index.cjs.map +1 -1
  20. package/dist/graph-merge/index.d.cts +19 -8
  21. package/dist/graph-merge/index.d.ts +19 -8
  22. package/dist/graph-merge/index.js +5 -5
  23. package/dist/graph-merge/index.js.map +1 -1
  24. package/dist/index.cjs +43 -43
  25. package/dist/index.js +2 -2
  26. package/dist/interchange/index.cjs +25 -25
  27. package/dist/interchange/index.js +2 -2
  28. package/dist/{local-store-impl-GI6S4J6B.cjs → local-store-impl-INNRHDK3.cjs} +5 -5
  29. package/dist/{local-store-impl-GI6S4J6B.cjs.map → local-store-impl-INNRHDK3.cjs.map} +1 -1
  30. package/dist/{local-store-impl-CCMWTLGY.js → local-store-impl-VGC3OKCA.js} +4 -4
  31. package/dist/{local-store-impl-CCMWTLGY.js.map → local-store-impl-VGC3OKCA.js.map} +1 -1
  32. package/dist/{pglite-store-impl-HAPAJUIO.cjs → pglite-store-impl-KDS4NRMC.cjs} +5 -5
  33. package/dist/{pglite-store-impl-HAPAJUIO.cjs.map → pglite-store-impl-KDS4NRMC.cjs.map} +1 -1
  34. package/dist/{pglite-store-impl-HDLFOZWS.js → pglite-store-impl-LJDF2EUF.js} +4 -4
  35. package/dist/{pglite-store-impl-HDLFOZWS.js.map → pglite-store-impl-LJDF2EUF.js.map} +1 -1
  36. package/package.json +1 -1
  37. package/dist/chunk-7YJHUY4T.js.map +0 -1
  38. package/dist/chunk-RTPMG6LQ.js.map +0 -1
  39. package/dist/chunk-T3VU3YRQ.cjs.map +0 -1
  40. package/dist/chunk-WY3IFEKV.cjs.map +0 -1
@@ -1170,6 +1170,14 @@ declare class DurableEvidenceUndeliveredError extends BranchError {
1170
1170
  * identical reads on the base for any instant between the row's real
1171
1171
  * creation and the clone.
1172
1172
  *
1173
+ * Undeclared properties are the same class of stored live state.
1174
+ * `validateStore()` treats them as healthy semi-structured data. The clone
1175
+ * therefore imports with `onUnknownProperty: "allow"` — interchange's
1176
+ * fidelity-preserving strategy — so those keys survive the round trip.
1177
+ * `"error"` would refuse to branch a graph analysis already reports as clean.
1178
+ * `"strip"` would drop the keys on the fork, and the merge diff against the
1179
+ * original base would invent deletions the caller never made.
1180
+ *
1173
1181
  * Logical-namespace (copy-on-write within one backend, no full data copy) is a
1174
1182
  * future strategy slot — see the `WorkingCopyStrategy` interface — deferred past
1175
1183
  * P0.
@@ -1235,14 +1243,17 @@ type MakeBackend = () => Promise<GraphBackend>;
1235
1243
  * base's live state.
1236
1244
  * 2. Create a fresh store over the caller-provided backend with the SAME graph
1237
1245
  * definition via `createStoreWithSchema`.
1238
- * 3. `importGraphStream(freshStore, data, { onConflict: "error", ... })` — ids are
1239
- * preserved so the diff engine can key on them. `onConflict: "error"`
1240
- * requires the backend to be EMPTY: a pre-existing row is a contract
1241
- * violation that must surface loudly, never be silently skipped (a skipped
1242
- * row would leave the clone diverging from the base, so the fork's diff would
1243
- * report phantom modifications/deletions). `importGraphStream` RETURNS
1244
- * `{ success, errors }` rather than throwing on a per-row rejection, so its
1245
- * result is checked and any failure fails the branch.
1246
+ * 3. `importGraphStream(freshStore, data, { onConflict: "error",
1247
+ * onUnknownProperty: "allow", ... })` — ids are preserved so the diff
1248
+ * engine can key on them. `onConflict: "error"` requires the backend to be
1249
+ * EMPTY: a pre-existing row is a contract violation that must surface
1250
+ * loudly, never be silently skipped (a skipped row would leave the clone
1251
+ * diverging from the base, so the fork's diff would report phantom
1252
+ * modifications/deletions). `onUnknownProperty: "allow"` carries undeclared
1253
+ * properties through (see the fidelity note above). A streamed chunk that
1254
+ * reports per-row errors throws (default `onStreamChunkError: "abort"`); a
1255
+ * materialized import returns `{ success, errors }`. Either failure fails
1256
+ * the branch.
1246
1257
  *
1247
1258
  * The backend `makeBackend()` returns is opened here, so any failure AFTER it is
1248
1259
  * created closes it before rethrowing — only the success path hands the backend
@@ -1170,6 +1170,14 @@ declare class DurableEvidenceUndeliveredError extends BranchError {
1170
1170
  * identical reads on the base for any instant between the row's real
1171
1171
  * creation and the clone.
1172
1172
  *
1173
+ * Undeclared properties are the same class of stored live state.
1174
+ * `validateStore()` treats them as healthy semi-structured data. The clone
1175
+ * therefore imports with `onUnknownProperty: "allow"` — interchange's
1176
+ * fidelity-preserving strategy — so those keys survive the round trip.
1177
+ * `"error"` would refuse to branch a graph analysis already reports as clean.
1178
+ * `"strip"` would drop the keys on the fork, and the merge diff against the
1179
+ * original base would invent deletions the caller never made.
1180
+ *
1173
1181
  * Logical-namespace (copy-on-write within one backend, no full data copy) is a
1174
1182
  * future strategy slot — see the `WorkingCopyStrategy` interface — deferred past
1175
1183
  * P0.
@@ -1235,14 +1243,17 @@ type MakeBackend = () => Promise<GraphBackend>;
1235
1243
  * base's live state.
1236
1244
  * 2. Create a fresh store over the caller-provided backend with the SAME graph
1237
1245
  * definition via `createStoreWithSchema`.
1238
- * 3. `importGraphStream(freshStore, data, { onConflict: "error", ... })` — ids are
1239
- * preserved so the diff engine can key on them. `onConflict: "error"`
1240
- * requires the backend to be EMPTY: a pre-existing row is a contract
1241
- * violation that must surface loudly, never be silently skipped (a skipped
1242
- * row would leave the clone diverging from the base, so the fork's diff would
1243
- * report phantom modifications/deletions). `importGraphStream` RETURNS
1244
- * `{ success, errors }` rather than throwing on a per-row rejection, so its
1245
- * result is checked and any failure fails the branch.
1246
+ * 3. `importGraphStream(freshStore, data, { onConflict: "error",
1247
+ * onUnknownProperty: "allow", ... })` — ids are preserved so the diff
1248
+ * engine can key on them. `onConflict: "error"` requires the backend to be
1249
+ * EMPTY: a pre-existing row is a contract violation that must surface
1250
+ * loudly, never be silently skipped (a skipped row would leave the clone
1251
+ * diverging from the base, so the fork's diff would report phantom
1252
+ * modifications/deletions). `onUnknownProperty: "allow"` carries undeclared
1253
+ * properties through (see the fidelity note above). A streamed chunk that
1254
+ * reports per-row errors throws (default `onStreamChunkError: "abort"`); a
1255
+ * materialized import returns `{ success, errors }`. Either failure fails
1256
+ * the branch.
1246
1257
  *
1247
1258
  * The backend `makeBackend()` returns is opened here, so any failure AFTER it is
1248
1259
  * created closes it before rethrowing — only the success path hands the backend
@@ -1,9 +1,9 @@
1
- import { NODE_TEMPORAL_READ_NAMES, CURRENT_ONLY_READ_NAMES, createStoreWithSchema, createStore, IDENTITY_READ_NAMES, EDGE_TEMPORAL_READ_NAMES } from '../chunk-55DGFZYC.js';
1
+ import { NODE_TEMPORAL_READ_NAMES, CURRENT_ONLY_READ_NAMES, createStoreWithSchema, createStore, IDENTITY_READ_NAMES, EDGE_TEMPORAL_READ_NAMES } from '../chunk-EJYBHBIB.js';
2
2
  import '../chunk-OF63ZHSD.js';
3
3
  import { requireLineage } from '../chunk-NSOGBYYS.js';
4
4
  import '../chunk-XELE7ZOX.js';
5
- import { InterchangeIdentitySchema, importGraphStream, exportGraphStream, importGraph, exportGraph, registerIngestionImportTarget } from '../chunk-7YJHUY4T.js';
6
- import '../chunk-RTPMG6LQ.js';
5
+ import { InterchangeIdentitySchema, importGraphStream, exportGraphStream, importGraph, exportGraph, summarizeImportErrors, registerIngestionImportTarget } from '../chunk-VUYODTHL.js';
6
+ import '../chunk-JVKHJQ6Q.js';
7
7
  import '../chunk-FXOFJ4FS.js';
8
8
  import '../chunk-6ECNYQDW.js';
9
9
  import '../chunk-CDKNGCE7.js';
@@ -2190,7 +2190,7 @@ function cloneWorkingCopyWithGraphStrategy(makeBackend, graphForClone) {
2190
2190
  };
2191
2191
  const importOptions = {
2192
2192
  onConflict: "error",
2193
- onUnknownProperty: "error",
2193
+ onUnknownProperty: "allow",
2194
2194
  validateReferences: true,
2195
2195
  batchSize: CLONE_IMPORT_BATCH_SIZE
2196
2196
  };
@@ -2208,7 +2208,7 @@ function cloneWorkingCopyWithGraphStrategy(makeBackend, graphForClone) {
2208
2208
  );
2209
2209
  if (!result.success) {
2210
2210
  throw new BranchError(
2211
- "Clone import failed: the working copy could not be seeded from the base store. The backend returned by makeBackend() must be empty.",
2211
+ `Clone import failed: the working copy could not be seeded from the base store. ${summarizeImportErrors(result.errors)}`,
2212
2212
  { details: { errors: result.errors } }
2213
2213
  );
2214
2214
  }