@remnic/core 9.3.710 → 9.3.711

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 (53) hide show
  1. package/dist/access-boundary.js +4 -4
  2. package/dist/access-cli.js +7 -7
  3. package/dist/access-http.js +8 -8
  4. package/dist/access-mcp.js +7 -7
  5. package/dist/access-operations-batch.js +5 -5
  6. package/dist/access-operations.js +6 -6
  7. package/dist/access-service.js +3 -3
  8. package/dist/{chunk-OK7FUX6R.js → chunk-4P5UAL3C.js} +46 -1
  9. package/dist/chunk-4P5UAL3C.js.map +1 -0
  10. package/dist/{chunk-NK3SPJLM.js → chunk-5KQCOIPW.js} +7 -7
  11. package/dist/{chunk-Y6PIFKXX.js → chunk-5QUS24F7.js} +22 -2
  12. package/dist/chunk-5QUS24F7.js.map +1 -0
  13. package/dist/{chunk-VWB3HDY6.js → chunk-A2R5NV6O.js} +4 -4
  14. package/dist/{chunk-XD33EX2F.js → chunk-AMXOCZHE.js} +3 -3
  15. package/dist/{chunk-2T4TDXPC.js → chunk-GKPIY7EQ.js} +13 -3
  16. package/dist/chunk-GKPIY7EQ.js.map +1 -0
  17. package/dist/{chunk-KOEKDZ6A.js → chunk-I3BT2IDW.js} +3 -3
  18. package/dist/{chunk-AZVHBFI3.js → chunk-OWOKOFXK.js} +9 -1
  19. package/dist/chunk-OWOKOFXK.js.map +1 -0
  20. package/dist/{chunk-EVX52NCY.js → chunk-YVWZW37D.js} +3 -3
  21. package/dist/{chunk-P6PRSI3W.js → chunk-Z3B2YW56.js} +3 -3
  22. package/dist/{chunk-JQ7XVM4V.js → chunk-ZBG4K36I.js} +2 -2
  23. package/dist/{chunk-PKE7EJMX.js → chunk-ZVDRL6SK.js} +2 -2
  24. package/dist/cli.js +11 -11
  25. package/dist/index.js +12 -12
  26. package/dist/operator-toolkit.d.ts +19 -1
  27. package/dist/operator-toolkit.js +3 -1
  28. package/dist/orchestrator.js +2 -2
  29. package/dist/recall-explain-renderer.js +2 -2
  30. package/dist/recall-xray-cli.js +3 -3
  31. package/dist/recall-xray-renderer.js +2 -2
  32. package/dist/recall-xray.d.ts +14 -0
  33. package/dist/recall-xray.js +1 -1
  34. package/dist/schemas.d.ts +22 -22
  35. package/dist/transfer/types.d.ts +12 -12
  36. package/package.json +2 -2
  37. package/src/operator-toolkit.ts +80 -0
  38. package/src/orchestrator.ts +13 -0
  39. package/src/provenance-surfaces.test.ts +254 -0
  40. package/src/recall-xray-renderer.ts +28 -0
  41. package/src/recall-xray.ts +32 -0
  42. package/dist/chunk-2T4TDXPC.js.map +0 -1
  43. package/dist/chunk-AZVHBFI3.js.map +0 -1
  44. package/dist/chunk-OK7FUX6R.js.map +0 -1
  45. package/dist/chunk-Y6PIFKXX.js.map +0 -1
  46. /package/dist/{chunk-NK3SPJLM.js.map → chunk-5KQCOIPW.js.map} +0 -0
  47. /package/dist/{chunk-VWB3HDY6.js.map → chunk-A2R5NV6O.js.map} +0 -0
  48. /package/dist/{chunk-XD33EX2F.js.map → chunk-AMXOCZHE.js.map} +0 -0
  49. /package/dist/{chunk-KOEKDZ6A.js.map → chunk-I3BT2IDW.js.map} +0 -0
  50. /package/dist/{chunk-EVX52NCY.js.map → chunk-YVWZW37D.js.map} +0 -0
  51. /package/dist/{chunk-P6PRSI3W.js.map → chunk-Z3B2YW56.js.map} +0 -0
  52. /package/dist/{chunk-JQ7XVM4V.js.map → chunk-ZBG4K36I.js.map} +0 -0
  53. /package/dist/{chunk-PKE7EJMX.js.map → chunk-ZVDRL6SK.js.map} +0 -0
package/dist/schemas.d.ts CHANGED
@@ -290,12 +290,12 @@ declare const EntityMentionSchema: z.ZodObject<{
290
290
  title: z.ZodString;
291
291
  facts: z.ZodArray<z.ZodString, "many">;
292
292
  }, "strip", z.ZodTypeAny, {
293
- title: string;
294
293
  key: string;
294
+ title: string;
295
295
  facts: string[];
296
296
  }, {
297
- title: string;
298
297
  key: string;
298
+ title: string;
299
299
  facts: string[];
300
300
  }>, "many">>>;
301
301
  }, "strip", z.ZodTypeAny, {
@@ -303,8 +303,8 @@ declare const EntityMentionSchema: z.ZodObject<{
303
303
  name: string;
304
304
  facts: string[];
305
305
  structuredSections?: {
306
- title: string;
307
306
  key: string;
307
+ title: string;
308
308
  facts: string[];
309
309
  }[] | null | undefined;
310
310
  promptedByQuestion?: string | null | undefined;
@@ -313,8 +313,8 @@ declare const EntityMentionSchema: z.ZodObject<{
313
313
  name: string;
314
314
  facts: string[];
315
315
  structuredSections?: {
316
- title: string;
317
316
  key: string;
317
+ title: string;
318
318
  facts: string[];
319
319
  }[] | null | undefined;
320
320
  promptedByQuestion?: string | null | undefined;
@@ -614,12 +614,12 @@ declare const ProactiveExtractionResultSchema: z.ZodObject<{
614
614
  title: z.ZodString;
615
615
  facts: z.ZodArray<z.ZodString, "many">;
616
616
  }, "strip", z.ZodTypeAny, {
617
- title: string;
618
617
  key: string;
618
+ title: string;
619
619
  facts: string[];
620
620
  }, {
621
- title: string;
622
621
  key: string;
622
+ title: string;
623
623
  facts: string[];
624
624
  }>, "many">>>;
625
625
  }, "strip", z.ZodTypeAny, {
@@ -627,8 +627,8 @@ declare const ProactiveExtractionResultSchema: z.ZodObject<{
627
627
  name: string;
628
628
  facts: string[];
629
629
  structuredSections?: {
630
- title: string;
631
630
  key: string;
631
+ title: string;
632
632
  facts: string[];
633
633
  }[] | null | undefined;
634
634
  promptedByQuestion?: string | null | undefined;
@@ -637,8 +637,8 @@ declare const ProactiveExtractionResultSchema: z.ZodObject<{
637
637
  name: string;
638
638
  facts: string[];
639
639
  structuredSections?: {
640
- title: string;
641
640
  key: string;
641
+ title: string;
642
642
  facts: string[];
643
643
  }[] | null | undefined;
644
644
  promptedByQuestion?: string | null | undefined;
@@ -698,8 +698,8 @@ declare const ProactiveExtractionResultSchema: z.ZodObject<{
698
698
  name: string;
699
699
  facts: string[];
700
700
  structuredSections?: {
701
- title: string;
702
701
  key: string;
702
+ title: string;
703
703
  facts: string[];
704
704
  }[] | null | undefined;
705
705
  promptedByQuestion?: string | null | undefined;
@@ -750,8 +750,8 @@ declare const ProactiveExtractionResultSchema: z.ZodObject<{
750
750
  name: string;
751
751
  facts: string[];
752
752
  structuredSections?: {
753
- title: string;
754
753
  key: string;
754
+ title: string;
755
755
  facts: string[];
756
756
  }[] | null | undefined;
757
757
  promptedByQuestion?: string | null | undefined;
@@ -1003,12 +1003,12 @@ declare const ExtractionResultSchema: z.ZodObject<{
1003
1003
  title: z.ZodString;
1004
1004
  facts: z.ZodArray<z.ZodString, "many">;
1005
1005
  }, "strip", z.ZodTypeAny, {
1006
- title: string;
1007
1006
  key: string;
1007
+ title: string;
1008
1008
  facts: string[];
1009
1009
  }, {
1010
- title: string;
1011
1010
  key: string;
1011
+ title: string;
1012
1012
  facts: string[];
1013
1013
  }>, "many">>>;
1014
1014
  }, "strip", z.ZodTypeAny, {
@@ -1016,8 +1016,8 @@ declare const ExtractionResultSchema: z.ZodObject<{
1016
1016
  name: string;
1017
1017
  facts: string[];
1018
1018
  structuredSections?: {
1019
- title: string;
1020
1019
  key: string;
1020
+ title: string;
1021
1021
  facts: string[];
1022
1022
  }[] | null | undefined;
1023
1023
  promptedByQuestion?: string | null | undefined;
@@ -1026,8 +1026,8 @@ declare const ExtractionResultSchema: z.ZodObject<{
1026
1026
  name: string;
1027
1027
  facts: string[];
1028
1028
  structuredSections?: {
1029
- title: string;
1030
1029
  key: string;
1030
+ title: string;
1031
1031
  facts: string[];
1032
1032
  }[] | null | undefined;
1033
1033
  promptedByQuestion?: string | null | undefined;
@@ -1106,8 +1106,8 @@ declare const ExtractionResultSchema: z.ZodObject<{
1106
1106
  name: string;
1107
1107
  facts: string[];
1108
1108
  structuredSections?: {
1109
- title: string;
1110
1109
  key: string;
1110
+ title: string;
1111
1111
  facts: string[];
1112
1112
  }[] | null | undefined;
1113
1113
  promptedByQuestion?: string | null | undefined;
@@ -1164,8 +1164,8 @@ declare const ExtractionResultSchema: z.ZodObject<{
1164
1164
  name: string;
1165
1165
  facts: string[];
1166
1166
  structuredSections?: {
1167
- title: string;
1168
1167
  key: string;
1168
+ title: string;
1169
1169
  facts: string[];
1170
1170
  }[] | null | undefined;
1171
1171
  promptedByQuestion?: string | null | undefined;
@@ -1229,12 +1229,12 @@ declare const ConsolidationResultSchema: z.ZodObject<{
1229
1229
  title: z.ZodString;
1230
1230
  facts: z.ZodArray<z.ZodString, "many">;
1231
1231
  }, "strip", z.ZodTypeAny, {
1232
- title: string;
1233
1232
  key: string;
1233
+ title: string;
1234
1234
  facts: string[];
1235
1235
  }, {
1236
- title: string;
1237
1236
  key: string;
1237
+ title: string;
1238
1238
  facts: string[];
1239
1239
  }>, "many">>>;
1240
1240
  }, "strip", z.ZodTypeAny, {
@@ -1242,8 +1242,8 @@ declare const ConsolidationResultSchema: z.ZodObject<{
1242
1242
  name: string;
1243
1243
  facts: string[];
1244
1244
  structuredSections?: {
1245
- title: string;
1246
1245
  key: string;
1246
+ title: string;
1247
1247
  facts: string[];
1248
1248
  }[] | null | undefined;
1249
1249
  promptedByQuestion?: string | null | undefined;
@@ -1252,8 +1252,8 @@ declare const ConsolidationResultSchema: z.ZodObject<{
1252
1252
  name: string;
1253
1253
  facts: string[];
1254
1254
  structuredSections?: {
1255
- title: string;
1256
1255
  key: string;
1256
+ title: string;
1257
1257
  facts: string[];
1258
1258
  }[] | null | undefined;
1259
1259
  promptedByQuestion?: string | null | undefined;
@@ -1272,8 +1272,8 @@ declare const ConsolidationResultSchema: z.ZodObject<{
1272
1272
  name: string;
1273
1273
  facts: string[];
1274
1274
  structuredSections?: {
1275
- title: string;
1276
1275
  key: string;
1276
+ title: string;
1277
1277
  facts: string[];
1278
1278
  }[] | null | undefined;
1279
1279
  promptedByQuestion?: string | null | undefined;
@@ -1292,8 +1292,8 @@ declare const ConsolidationResultSchema: z.ZodObject<{
1292
1292
  name: string;
1293
1293
  facts: string[];
1294
1294
  structuredSections?: {
1295
- title: string;
1296
1295
  key: string;
1296
+ title: string;
1297
1297
  facts: string[];
1298
1298
  }[] | null | undefined;
1299
1299
  promptedByQuestion?: string | null | undefined;
@@ -313,13 +313,13 @@ declare const CapsuleBlockSchema: z.ZodObject<{
313
313
  peerProfiles: boolean;
314
314
  }>;
315
315
  }, "strip", z.ZodTypeAny, {
316
- schemaVersion: string;
317
316
  includes: {
318
317
  procedural: boolean;
319
318
  taxonomy: boolean;
320
319
  identityAnchors: boolean;
321
320
  peerProfiles: boolean;
322
321
  };
322
+ schemaVersion: string;
323
323
  id: string;
324
324
  version: string;
325
325
  description: string;
@@ -334,13 +334,13 @@ declare const CapsuleBlockSchema: z.ZodObject<{
334
334
  directAnswerEnabled: boolean;
335
335
  };
336
336
  }, {
337
- schemaVersion: string;
338
337
  includes: {
339
338
  procedural: boolean;
340
339
  taxonomy: boolean;
341
340
  identityAnchors: boolean;
342
341
  peerProfiles: boolean;
343
342
  };
343
+ schemaVersion: string;
344
344
  id: string;
345
345
  version: string;
346
346
  description: string;
@@ -464,13 +464,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
464
464
  peerProfiles: boolean;
465
465
  }>;
466
466
  }, "strip", z.ZodTypeAny, {
467
- schemaVersion: string;
468
467
  includes: {
469
468
  procedural: boolean;
470
469
  taxonomy: boolean;
471
470
  identityAnchors: boolean;
472
471
  peerProfiles: boolean;
473
472
  };
473
+ schemaVersion: string;
474
474
  id: string;
475
475
  version: string;
476
476
  description: string;
@@ -485,13 +485,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
485
485
  directAnswerEnabled: boolean;
486
486
  };
487
487
  }, {
488
- schemaVersion: string;
489
488
  includes: {
490
489
  procedural: boolean;
491
490
  taxonomy: boolean;
492
491
  identityAnchors: boolean;
493
492
  peerProfiles: boolean;
494
493
  };
494
+ schemaVersion: string;
495
495
  id: string;
496
496
  version: string;
497
497
  description: string;
@@ -518,13 +518,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
518
518
  pluginVersion: string;
519
519
  includesTranscripts: boolean;
520
520
  capsule: {
521
- schemaVersion: string;
522
521
  includes: {
523
522
  procedural: boolean;
524
523
  taxonomy: boolean;
525
524
  identityAnchors: boolean;
526
525
  peerProfiles: boolean;
527
526
  };
527
+ schemaVersion: string;
528
528
  id: string;
529
529
  version: string;
530
530
  description: string;
@@ -551,13 +551,13 @@ declare const ExportManifestV2Schema: z.ZodObject<{
551
551
  pluginVersion: string;
552
552
  includesTranscripts: boolean;
553
553
  capsule: {
554
- schemaVersion: string;
555
554
  includes: {
556
555
  procedural: boolean;
557
556
  taxonomy: boolean;
558
557
  identityAnchors: boolean;
559
558
  peerProfiles: boolean;
560
559
  };
560
+ schemaVersion: string;
561
561
  id: string;
562
562
  version: string;
563
563
  description: string;
@@ -683,13 +683,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
683
683
  peerProfiles: boolean;
684
684
  }>;
685
685
  }, "strip", z.ZodTypeAny, {
686
- schemaVersion: string;
687
686
  includes: {
688
687
  procedural: boolean;
689
688
  taxonomy: boolean;
690
689
  identityAnchors: boolean;
691
690
  peerProfiles: boolean;
692
691
  };
692
+ schemaVersion: string;
693
693
  id: string;
694
694
  version: string;
695
695
  description: string;
@@ -704,13 +704,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
704
704
  directAnswerEnabled: boolean;
705
705
  };
706
706
  }, {
707
- schemaVersion: string;
708
707
  includes: {
709
708
  procedural: boolean;
710
709
  taxonomy: boolean;
711
710
  identityAnchors: boolean;
712
711
  peerProfiles: boolean;
713
712
  };
713
+ schemaVersion: string;
714
714
  id: string;
715
715
  version: string;
716
716
  description: string;
@@ -737,13 +737,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
737
737
  pluginVersion: string;
738
738
  includesTranscripts: boolean;
739
739
  capsule: {
740
- schemaVersion: string;
741
740
  includes: {
742
741
  procedural: boolean;
743
742
  taxonomy: boolean;
744
743
  identityAnchors: boolean;
745
744
  peerProfiles: boolean;
746
745
  };
746
+ schemaVersion: string;
747
747
  id: string;
748
748
  version: string;
749
749
  description: string;
@@ -770,13 +770,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
770
770
  pluginVersion: string;
771
771
  includesTranscripts: boolean;
772
772
  capsule: {
773
- schemaVersion: string;
774
773
  includes: {
775
774
  procedural: boolean;
776
775
  taxonomy: boolean;
777
776
  identityAnchors: boolean;
778
777
  peerProfiles: boolean;
779
778
  };
779
+ schemaVersion: string;
780
780
  id: string;
781
781
  version: string;
782
782
  description: string;
@@ -819,13 +819,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
819
819
  pluginVersion: string;
820
820
  includesTranscripts: boolean;
821
821
  capsule: {
822
- schemaVersion: string;
823
822
  includes: {
824
823
  procedural: boolean;
825
824
  taxonomy: boolean;
826
825
  identityAnchors: boolean;
827
826
  peerProfiles: boolean;
828
827
  };
828
+ schemaVersion: string;
829
829
  id: string;
830
830
  version: string;
831
831
  description: string;
@@ -858,13 +858,13 @@ declare const ExportBundleV2Schema: z.ZodObject<{
858
858
  pluginVersion: string;
859
859
  includesTranscripts: boolean;
860
860
  capsule: {
861
- schemaVersion: string;
862
861
  includes: {
863
862
  procedural: boolean;
864
863
  taxonomy: boolean;
865
864
  identityAnchors: boolean;
866
865
  peerProfiles: boolean;
867
866
  };
867
+ schemaVersion: string;
868
868
  id: string;
869
869
  version: string;
870
870
  description: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/core",
3
- "version": "9.3.710",
3
+ "version": "9.3.711",
4
4
  "description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -2966,7 +2966,7 @@
2966
2966
  "core"
2967
2967
  ],
2968
2968
  "peerDependencies": {
2969
- "@remnic/coding-graph": "^9.3.710"
2969
+ "@remnic/coding-graph": "^9.3.711"
2970
2970
  },
2971
2971
  "peerDependenciesMeta": {
2972
2972
  "@remnic/coding-graph": {
@@ -1060,6 +1060,25 @@ async function buildOperatorConfigReviewReport(input: {
1060
1060
  };
1061
1061
  }
1062
1062
 
1063
+ /**
1064
+ * Summarize the provenance coverage of a set of memories (issue #1575 PR 3).
1065
+ * Pure function — counts the verified/unverified/none distribution so the
1066
+ * doctor check and any future surface can consume it without coupling to the
1067
+ * orchestrator. Legacy memories (no `provenance` field) count as `"none"`.
1068
+ */
1069
+ export function summarizeProvenanceCoverage(
1070
+ memories: ReadonlyArray<{ frontmatter: { provenance?: string } }>,
1071
+ ): { counts: { verified: number; unverified: number; none: number }; total: number } {
1072
+ const counts = { verified: 0, unverified: 0, none: 0 };
1073
+ for (const mem of memories) {
1074
+ const tag = mem.frontmatter.provenance ?? "none";
1075
+ if (tag === "verified") counts.verified += 1;
1076
+ else if (tag === "unverified") counts.unverified += 1;
1077
+ else counts.none += 1;
1078
+ }
1079
+ return { counts, total: memories.length };
1080
+ }
1081
+
1063
1082
  export async function runOperatorDoctor(options: OperatorDoctorOptions): Promise<OperatorDoctorReport> {
1064
1083
  const now = options.now ?? new Date();
1065
1084
  const configStatus = await loadCliPluginConfig(options.configPath);
@@ -1177,6 +1196,67 @@ export async function runOperatorDoctor(options: OperatorDoctorOptions): Promise
1177
1196
  details: meta,
1178
1197
  });
1179
1198
 
1199
+ // Provenance coverage (issue #1575 PR 3). Operators need to see the
1200
+ // verified/unverified/none distribution grow as extraction backfills.
1201
+ // Best-effort: a read failure surfaces as a warn, not an error.
1202
+ let provenanceCoverage: ReturnType<typeof summarizeProvenanceCoverage> = {
1203
+ counts: { verified: 0, unverified: 0, none: 0 },
1204
+ total: 0,
1205
+ };
1206
+ let provenanceReadOk = true;
1207
+ let provenancePartialTiers: string[] = [];
1208
+ try {
1209
+ // Include all tiers so cold-migrated and archived memories are counted
1210
+ // (codex thread PRRT_kwDORJXyws6Ojqz8 — readAllMemories is hot-only).
1211
+ // Use allSettled so a real read failure (e.g. locked encrypted store)
1212
+ // is surfaced as a partial-read warning, not silently swallowed
1213
+ // (codex thread PRRT_kwDORJXyws6OjygQ).
1214
+ const [hot, archived, cold] = await Promise.allSettled([
1215
+ storage.readAllMemories(),
1216
+ storage.readArchivedMemories(),
1217
+ storage.readAllColdMemories(),
1218
+ ]);
1219
+ const all: { frontmatter: { provenance?: string } }[] = [];
1220
+ if (hot.status === "fulfilled") all.push(...hot.value);
1221
+ else provenancePartialTiers.push("hot");
1222
+ if (archived.status === "fulfilled") all.push(...archived.value);
1223
+ else provenancePartialTiers.push("archived");
1224
+ if (cold.status === "fulfilled") all.push(...cold.value);
1225
+ else provenancePartialTiers.push("cold");
1226
+ provenanceCoverage = summarizeProvenanceCoverage(all);
1227
+ } catch {
1228
+ provenanceReadOk = false;
1229
+ }
1230
+ const pc = provenanceCoverage.counts;
1231
+ const totalProvenance = provenanceCoverage.total;
1232
+ const provenanceCovered = pc.verified + pc.unverified;
1233
+ const partialSuffix = provenancePartialTiers.length > 0
1234
+ ? ` (partial: ${provenancePartialTiers.join("/")} tier unreadable)`
1235
+ : "";
1236
+ checks.push({
1237
+ key: "provenance_coverage",
1238
+ status: !provenanceReadOk || provenancePartialTiers.length > 0
1239
+ ? "warn"
1240
+ : totalProvenance === 0
1241
+ ? "warn"
1242
+ : provenanceCovered === 0
1243
+ ? "warn"
1244
+ : "ok",
1245
+ summary: !provenanceReadOk
1246
+ ? "Could not read memories for provenance coverage."
1247
+ : totalProvenance === 0
1248
+ ? "No memories found yet — provenance coverage is empty."
1249
+ : `Provenance coverage: ${pc.verified} verified, ${pc.unverified} unverified, ${pc.none} none (${totalProvenance} total).${partialSuffix}`,
1250
+ remediation: !provenanceReadOk
1251
+ ? undefined
1252
+ : provenancePartialTiers.length > 0
1253
+ ? `Some tiers could not be read (${provenancePartialTiers.join(", ")}). Check storage health and re-run.`
1254
+ : provenanceCovered === 0 && totalProvenance > 0
1255
+ ? "New extractions will carry source spans. Existing legacy memories remain `none` until re-extracted."
1256
+ : undefined,
1257
+ details: { provenanceCounts: pc, total: totalProvenance, partialTiers: provenancePartialTiers.length > 0 ? provenancePartialTiers : undefined },
1258
+ });
1259
+
1180
1260
  const syncedChunkCount =
1181
1261
  nativeKnowledgeStatus.curatedIncludeSync.activeChunkCount +
1182
1262
  nativeKnowledgeStatus.obsidianSync.activeChunkCount +
@@ -11918,6 +11918,7 @@ export class Orchestrator {
11918
11918
  }
11919
11919
  const resultNamespace = this.namespaceFromPath(recalledPath);
11920
11920
  let provenance: RecallXrayResult["provenance"] | undefined;
11921
+ let sourceSpan: RecallXrayResult["sourceSpan"] | undefined;
11921
11922
  try {
11922
11923
  const resultStorage =
11923
11924
  await this.storageRouter.storageFor(resultNamespace);
@@ -11928,6 +11929,17 @@ export class Orchestrator {
11928
11929
  retrievalReason: `served-by=${servedBy}`,
11929
11930
  currentContextScopes: options.currentContextScopes,
11930
11931
  });
11932
+ // Claim-level provenance span (#1575 PR 3): surface the first
11933
+ // source excerpt so the X-ray shows the literal utterance this
11934
+ // fact derives from. Thin read from already-loaded frontmatter.
11935
+ const fm = memory.frontmatter;
11936
+ if (fm.sources && fm.sources.length > 0) {
11937
+ sourceSpan = {
11938
+ quote: fm.sources[0]!.quote,
11939
+ observedAt: fm.sources[0]!.observedAt,
11940
+ provenance: fm.provenance ?? "none",
11941
+ };
11942
+ }
11931
11943
  }
11932
11944
  } catch {
11933
11945
  // X-ray capture is best-effort; missing provenance must not
@@ -11940,6 +11952,7 @@ export class Orchestrator {
11940
11952
  scoreDecomposition,
11941
11953
  admittedBy: [],
11942
11954
  ...(provenance ? { provenance } : {}),
11955
+ ...(sourceSpan ? { sourceSpan } : {}),
11943
11956
  });
11944
11957
  }
11945
11958
  // `considered` must reflect the pool size of the branch that