@remnic/core 10.0.126 → 10.0.128

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 (178) hide show
  1. package/dist/access-admin-ops-surface.js +38 -38
  2. package/dist/access-cli.js +38 -38
  3. package/dist/access-extraction-force-flush.js +38 -38
  4. package/dist/access-http-briefing.js +38 -38
  5. package/dist/access-http-query.js +38 -38
  6. package/dist/access-http.js +38 -38
  7. package/dist/access-identity-continuity-surface.js +38 -38
  8. package/dist/access-lcm-surface.js +38 -38
  9. package/dist/access-mcp.js +38 -38
  10. package/dist/access-observe-write-surface.js +38 -38
  11. package/dist/access-operations-batch.js +38 -38
  12. package/dist/access-operations.js +38 -38
  13. package/dist/access-recall-concurrency.js +38 -38
  14. package/dist/access-recall-response.js +38 -38
  15. package/dist/access-recall-surface.js +38 -38
  16. package/dist/access-service.d.ts.map +1 -1
  17. package/dist/access-service.js +38 -38
  18. package/dist/active-recall.js +6 -6
  19. package/dist/briefing.js +4 -4
  20. package/dist/buffer-turn-helpers.d.ts +7 -0
  21. package/dist/buffer-turn-helpers.d.ts.map +1 -1
  22. package/dist/buffer-turn-helpers.js +3 -1
  23. package/dist/buffer-turn.d.ts +10 -0
  24. package/dist/buffer-turn.d.ts.map +1 -1
  25. package/dist/buffer.js +3 -3
  26. package/dist/causal-consolidation.js +5 -5
  27. package/dist/{chunk-BNRKSJMO.js → chunk-2BBCM2PX.js} +2 -2
  28. package/dist/{chunk-2GSPNTOU.js → chunk-2G72JBQB.js} +2 -2
  29. package/dist/{chunk-IDCZEKK6.js → chunk-34YQ7CVE.js} +3 -3
  30. package/dist/{chunk-AYWW6JEH.js → chunk-3OLHDECL.js} +115 -41
  31. package/dist/chunk-3OLHDECL.js.map +1 -0
  32. package/dist/{chunk-4VWZ4HPL.js → chunk-4DJSDH2M.js} +6 -6
  33. package/dist/{chunk-YJEOQ72B.js → chunk-6FPJPSQK.js} +2 -2
  34. package/dist/{chunk-YKUW2EZF.js → chunk-7T7I5D3F.js} +2 -2
  35. package/dist/{chunk-ERR7ZFPJ.js → chunk-7TC2PWKH.js} +2 -2
  36. package/dist/{chunk-DH2CDGAE.js → chunk-ALLI23GW.js} +2 -2
  37. package/dist/{chunk-RTIHO7AJ.js → chunk-AYBRQJXP.js} +2 -2
  38. package/dist/{chunk-UXXK523X.js → chunk-BR7CZVMO.js} +20 -16
  39. package/dist/chunk-BR7CZVMO.js.map +1 -0
  40. package/dist/{chunk-AWD36R4D.js → chunk-DURQZFVJ.js} +36 -6
  41. package/dist/chunk-DURQZFVJ.js.map +1 -0
  42. package/dist/{chunk-C7BTGSCY.js → chunk-FPBFDQZZ.js} +9 -9
  43. package/dist/{chunk-5DCCVEKT.js → chunk-GWFL6LUU.js} +2 -2
  44. package/dist/{chunk-JTY3NA3I.js → chunk-HJ7M322C.js} +2 -2
  45. package/dist/{chunk-HURBXNNB.js → chunk-JCPEXUNP.js} +2 -2
  46. package/dist/{chunk-LKGTTX74.js → chunk-JK2IVISS.js} +2 -2
  47. package/dist/{chunk-7XG7KMIW.js → chunk-LNQQEFKH.js} +2 -2
  48. package/dist/{chunk-IB4TDPCC.js → chunk-LR2X3FJM.js} +2 -2
  49. package/dist/{chunk-6IRJWKR5.js → chunk-LU2GQ4Q4.js} +2 -2
  50. package/dist/{chunk-4VCASS3Q.js → chunk-MCTGYIYN.js} +2 -2
  51. package/dist/{chunk-XN43HAIV.js → chunk-MGCV3VGC.js} +2 -2
  52. package/dist/{chunk-KWVGRNKL.js → chunk-NYZ6ZNFO.js} +2 -2
  53. package/dist/{chunk-6VAN7VZR.js → chunk-ORMJT23N.js} +7 -7
  54. package/dist/{chunk-DL7K5PMQ.js → chunk-PPPY2PCU.js} +2 -2
  55. package/dist/{chunk-5DP4GVKR.js → chunk-PXZLVFNC.js} +2 -2
  56. package/dist/{chunk-GSCIRMPR.js → chunk-QKYOMKRG.js} +2 -2
  57. package/dist/{chunk-QF64W4YM.js → chunk-QRZNVNNS.js} +2 -2
  58. package/dist/{chunk-CQMH65IP.js → chunk-TJJPT2OV.js} +2 -2
  59. package/dist/{chunk-2AVPRUML.js → chunk-TJY6AKWV.js} +2 -2
  60. package/dist/{chunk-RRHLI6VU.js → chunk-TQ5NOVMT.js} +2 -2
  61. package/dist/{chunk-KNT3BZZH.js → chunk-UWU6KEZU.js} +185 -59
  62. package/dist/chunk-UWU6KEZU.js.map +1 -0
  63. package/dist/{chunk-PUKLCFCU.js → chunk-VY3DHUL7.js} +2 -2
  64. package/dist/chunk-VY3DHUL7.js.map +1 -0
  65. package/dist/{chunk-47W3ALIS.js → chunk-XMKUABIG.js} +3 -3
  66. package/dist/{chunk-UGCLNASV.js → chunk-XUWDB53W.js} +3 -3
  67. package/dist/{chunk-XLHLZALR.js → chunk-YCJRYM3Q.js} +3 -3
  68. package/dist/{chunk-DB4THCGN.js → chunk-YFUHFPV6.js} +2 -2
  69. package/dist/{chunk-42JE2CF4.js → chunk-YPE3O5VH.js} +2 -2
  70. package/dist/{chunk-7TJMXZPO.js → chunk-ZO377APE.js} +2 -2
  71. package/dist/cli.js +38 -38
  72. package/dist/coding/export-okf-codegraph.js +3 -3
  73. package/dist/compounding/engine.js +5 -5
  74. package/dist/config.js +6 -6
  75. package/dist/connectors/codex-materialize-runner.js +4 -4
  76. package/dist/connectors/index.js +4 -4
  77. package/dist/convergence-refresh.js +6 -6
  78. package/dist/corpus-watermark.js +6 -6
  79. package/dist/entity-retrieval.js +4 -4
  80. package/dist/explicit-capture.js +38 -38
  81. package/dist/extraction-liveness.d.ts +54 -5
  82. package/dist/extraction-liveness.d.ts.map +1 -1
  83. package/dist/extraction-liveness.js +1 -1
  84. package/dist/extraction-span-config.js +2 -2
  85. package/dist/extraction.js +7 -7
  86. package/dist/harmonic-retrieval.js +4 -4
  87. package/dist/index.js +38 -38
  88. package/dist/location/index.js +5 -5
  89. package/dist/maintenance/memory-governance.js +4 -4
  90. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +4 -4
  91. package/dist/maintenance/rebuild-memory-projection-runner.js +6 -6
  92. package/dist/maintenance/rebuild-memory-projection.js +5 -5
  93. package/dist/namespaces/migrate.js +5 -5
  94. package/dist/namespaces/storage.js +4 -4
  95. package/dist/operator-doctor-corpus.js +7 -7
  96. package/dist/operator-toolkit.js +13 -13
  97. package/dist/orchestration/backlog-scheduler.js +39 -39
  98. package/dist/orchestration/buffer-drain-runner.js +39 -39
  99. package/dist/orchestration/extraction-dedupe.d.ts +46 -0
  100. package/dist/orchestration/extraction-dedupe.d.ts.map +1 -0
  101. package/dist/orchestration/extraction-drain.d.ts +12 -1
  102. package/dist/orchestration/extraction-drain.d.ts.map +1 -1
  103. package/dist/orchestration/extraction-run.d.ts.map +1 -1
  104. package/dist/orchestration/maintenance.js +12 -12
  105. package/dist/orchestrator.js +38 -38
  106. package/dist/recall-navigation.js +38 -38
  107. package/dist/resume-bundles.js +7 -7
  108. package/dist/semantic-consolidation.js +5 -5
  109. package/dist/semantic-rule-promotion.js +4 -4
  110. package/dist/semantic-rule-verifier.js +4 -4
  111. package/dist/source-agent-qualifier.js +6 -6
  112. package/dist/standup/build.js +4 -4
  113. package/dist/storage/buffer-drain-claims.d.ts +19 -4
  114. package/dist/storage/buffer-drain-claims.d.ts.map +1 -1
  115. package/dist/storage/buffer-drain-claims.js +2 -2
  116. package/dist/storage/buffer-session-files.js +2 -2
  117. package/dist/storage/drain-claim-totals.d.ts +54 -0
  118. package/dist/storage/drain-claim-totals.d.ts.map +1 -0
  119. package/dist/storage.js +3 -3
  120. package/dist/transfer/export-okf.js +4 -4
  121. package/dist/verified-recall.js +4 -4
  122. package/dist/who-knows-cli.js +5 -5
  123. package/dist/who-knows.js +4 -4
  124. package/package.json +2 -2
  125. package/src/access-service-health.test.ts +102 -1
  126. package/src/access-service.ts +10 -1
  127. package/src/buffer-turn-helpers.ts +25 -15
  128. package/src/buffer-turn.ts +10 -0
  129. package/src/extraction-liveness.test.ts +229 -0
  130. package/src/extraction-liveness.ts +89 -6
  131. package/src/orchestration/extraction-dedupe.test.ts +101 -0
  132. package/src/orchestration/extraction-dedupe.ts +80 -0
  133. package/src/orchestration/extraction-drain-dedupe.test.ts +477 -0
  134. package/src/orchestration/extraction-drain.ts +69 -9
  135. package/src/orchestration/extraction-run.ts +2 -0
  136. package/src/storage/buffer-drain-claims.test.ts +66 -0
  137. package/src/storage/buffer-drain-claims.ts +49 -4
  138. package/src/storage/drain-claim-totals.test.ts +356 -0
  139. package/src/storage/drain-claim-totals.ts +175 -0
  140. package/dist/chunk-AWD36R4D.js.map +0 -1
  141. package/dist/chunk-AYWW6JEH.js.map +0 -1
  142. package/dist/chunk-KNT3BZZH.js.map +0 -1
  143. package/dist/chunk-PUKLCFCU.js.map +0 -1
  144. package/dist/chunk-UXXK523X.js.map +0 -1
  145. /package/dist/{chunk-BNRKSJMO.js.map → chunk-2BBCM2PX.js.map} +0 -0
  146. /package/dist/{chunk-2GSPNTOU.js.map → chunk-2G72JBQB.js.map} +0 -0
  147. /package/dist/{chunk-IDCZEKK6.js.map → chunk-34YQ7CVE.js.map} +0 -0
  148. /package/dist/{chunk-4VWZ4HPL.js.map → chunk-4DJSDH2M.js.map} +0 -0
  149. /package/dist/{chunk-YJEOQ72B.js.map → chunk-6FPJPSQK.js.map} +0 -0
  150. /package/dist/{chunk-YKUW2EZF.js.map → chunk-7T7I5D3F.js.map} +0 -0
  151. /package/dist/{chunk-ERR7ZFPJ.js.map → chunk-7TC2PWKH.js.map} +0 -0
  152. /package/dist/{chunk-DH2CDGAE.js.map → chunk-ALLI23GW.js.map} +0 -0
  153. /package/dist/{chunk-RTIHO7AJ.js.map → chunk-AYBRQJXP.js.map} +0 -0
  154. /package/dist/{chunk-C7BTGSCY.js.map → chunk-FPBFDQZZ.js.map} +0 -0
  155. /package/dist/{chunk-5DCCVEKT.js.map → chunk-GWFL6LUU.js.map} +0 -0
  156. /package/dist/{chunk-JTY3NA3I.js.map → chunk-HJ7M322C.js.map} +0 -0
  157. /package/dist/{chunk-HURBXNNB.js.map → chunk-JCPEXUNP.js.map} +0 -0
  158. /package/dist/{chunk-LKGTTX74.js.map → chunk-JK2IVISS.js.map} +0 -0
  159. /package/dist/{chunk-7XG7KMIW.js.map → chunk-LNQQEFKH.js.map} +0 -0
  160. /package/dist/{chunk-IB4TDPCC.js.map → chunk-LR2X3FJM.js.map} +0 -0
  161. /package/dist/{chunk-6IRJWKR5.js.map → chunk-LU2GQ4Q4.js.map} +0 -0
  162. /package/dist/{chunk-4VCASS3Q.js.map → chunk-MCTGYIYN.js.map} +0 -0
  163. /package/dist/{chunk-XN43HAIV.js.map → chunk-MGCV3VGC.js.map} +0 -0
  164. /package/dist/{chunk-KWVGRNKL.js.map → chunk-NYZ6ZNFO.js.map} +0 -0
  165. /package/dist/{chunk-6VAN7VZR.js.map → chunk-ORMJT23N.js.map} +0 -0
  166. /package/dist/{chunk-DL7K5PMQ.js.map → chunk-PPPY2PCU.js.map} +0 -0
  167. /package/dist/{chunk-5DP4GVKR.js.map → chunk-PXZLVFNC.js.map} +0 -0
  168. /package/dist/{chunk-GSCIRMPR.js.map → chunk-QKYOMKRG.js.map} +0 -0
  169. /package/dist/{chunk-QF64W4YM.js.map → chunk-QRZNVNNS.js.map} +0 -0
  170. /package/dist/{chunk-CQMH65IP.js.map → chunk-TJJPT2OV.js.map} +0 -0
  171. /package/dist/{chunk-2AVPRUML.js.map → chunk-TJY6AKWV.js.map} +0 -0
  172. /package/dist/{chunk-RRHLI6VU.js.map → chunk-TQ5NOVMT.js.map} +0 -0
  173. /package/dist/{chunk-47W3ALIS.js.map → chunk-XMKUABIG.js.map} +0 -0
  174. /package/dist/{chunk-UGCLNASV.js.map → chunk-XUWDB53W.js.map} +0 -0
  175. /package/dist/{chunk-XLHLZALR.js.map → chunk-YCJRYM3Q.js.map} +0 -0
  176. /package/dist/{chunk-DB4THCGN.js.map → chunk-YFUHFPV6.js.map} +0 -0
  177. /package/dist/{chunk-42JE2CF4.js.map → chunk-YPE3O5VH.js.map} +0 -0
  178. /package/dist/{chunk-7TJMXZPO.js.map → chunk-ZO377APE.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  StorageManager
3
- } from "./chunk-IB4TDPCC.js";
3
+ } from "./chunk-LR2X3FJM.js";
4
4
  import {
5
5
  composeMemoryEnvelope
6
6
  } from "./chunk-X26YOFGS.js";
@@ -546,4 +546,4 @@ export {
546
546
  setSemanticRulePromotionTestHooks,
547
547
  promoteSemanticRuleFromMemory
548
548
  };
549
- //# sourceMappingURL=chunk-BNRKSJMO.js.map
549
+ //# sourceMappingURL=chunk-2BBCM2PX.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  rebuildMemoryProjection
3
- } from "./chunk-47W3ALIS.js";
3
+ } from "./chunk-XMKUABIG.js";
4
4
 
5
5
  // src/convergence-refresh.ts
6
6
  async function refreshConvergedNamespaces(namespaces, namespaceSearchRouter, getStorage, searchEnabled) {
@@ -32,4 +32,4 @@ async function refreshConvergedNamespaces(namespaces, namespaceSearchRouter, get
32
32
  export {
33
33
  refreshConvergedNamespaces
34
34
  };
35
- //# sourceMappingURL=chunk-2GSPNTOU.js.map
35
+ //# sourceMappingURL=chunk-2G72JBQB.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ExtractionDeadlineError
3
- } from "./chunk-PUKLCFCU.js";
3
+ } from "./chunk-VY3DHUL7.js";
4
4
  import {
5
5
  BufferAdmissionRefusedError,
6
6
  BufferSessionTurnRefusedError,
@@ -38,7 +38,7 @@ import {
38
38
  scopeProfilePlanIdentity,
39
39
  selectRetainedDeferredTurns,
40
40
  subtractBufferTurns
41
- } from "./chunk-UXXK523X.js";
41
+ } from "./chunk-BR7CZVMO.js";
42
42
  import {
43
43
  resolvePrincipal
44
44
  } from "./chunk-ESG6ITGP.js";
@@ -937,4 +937,4 @@ var SmartBuffer = class {
937
937
  export {
938
938
  SmartBuffer
939
939
  };
940
- //# sourceMappingURL=chunk-IDCZEKK6.js.map
940
+ //# sourceMappingURL=chunk-34YQ7CVE.js.map
@@ -63,7 +63,7 @@ import {
63
63
  import {
64
64
  exportOkfBundle,
65
65
  parseIncludeStatus
66
- } from "./chunk-5DCCVEKT.js";
66
+ } from "./chunk-GWFL6LUU.js";
67
67
  import {
68
68
  isSharedContextWriteInputError,
69
69
  parseSharedWriteOutputControls
@@ -71,7 +71,7 @@ import {
71
71
  import {
72
72
  buildStandup,
73
73
  parseStandupDate
74
- } from "./chunk-RRHLI6VU.js";
74
+ } from "./chunk-TQ5NOVMT.js";
75
75
  import {
76
76
  SupportPassportAccessSurface,
77
77
  createSupportPassportModelAdapter,
@@ -104,10 +104,10 @@ import {
104
104
  import {
105
105
  ActivityStore,
106
106
  MaintenanceScheduler
107
- } from "./chunk-6VAN7VZR.js";
107
+ } from "./chunk-ORMJT23N.js";
108
108
  import {
109
109
  rebuildMemoryLifecycleLedger
110
- } from "./chunk-RTIHO7AJ.js";
110
+ } from "./chunk-AYBRQJXP.js";
111
111
  import {
112
112
  rebuildObservations
113
113
  } from "./chunk-WHCD4Z3D.js";
@@ -121,7 +121,7 @@ import {
121
121
  runLocationDay,
122
122
  runLocationStatus,
123
123
  runLocationSync
124
- } from "./chunk-XLHLZALR.js";
124
+ } from "./chunk-YCJRYM3Q.js";
125
125
  import {
126
126
  archiveObservations
127
127
  } from "./chunk-7IGMKQWK.js";
@@ -137,7 +137,7 @@ import {
137
137
  import {
138
138
  CompoundingEngine,
139
139
  defaultTierMigrationCycleBudget
140
- } from "./chunk-UGCLNASV.js";
140
+ } from "./chunk-XUWDB53W.js";
141
141
  import {
142
142
  SharedContextManager,
143
143
  UNATTRIBUTED_ACCESS_WRITE_ORIGIN
@@ -193,7 +193,7 @@ import {
193
193
  handleWhoKnowsHttpQuery,
194
194
  loadWhoKnowsEntities,
195
195
  validateWhoKnowsInput
196
- } from "./chunk-JTY3NA3I.js";
196
+ } from "./chunk-HJ7M322C.js";
197
197
  import {
198
198
  WriteQuarantineStore
199
199
  } from "./chunk-BANSBRNX.js";
@@ -219,7 +219,7 @@ import {
219
219
  import {
220
220
  compareVerifiedEpisodeResults,
221
221
  searchVerifiedEpisodes
222
- } from "./chunk-5DP4GVKR.js";
222
+ } from "./chunk-PXZLVFNC.js";
223
223
  import {
224
224
  applyTrustScoreStage,
225
225
  buildTrustSignalsForRerank,
@@ -283,11 +283,11 @@ import {
283
283
  } from "./chunk-WWDO7ZWM.js";
284
284
  import {
285
285
  promoteSemanticRuleFromMemory
286
- } from "./chunk-BNRKSJMO.js";
286
+ } from "./chunk-2BBCM2PX.js";
287
287
  import {
288
288
  compareVerifiedSemanticRuleResults,
289
289
  searchVerifiedSemanticRules
290
- } from "./chunk-DH2CDGAE.js";
290
+ } from "./chunk-ALLI23GW.js";
291
291
  import {
292
292
  buildResponseGuidanceRecallSection,
293
293
  shouldRecallResponseGuidance
@@ -296,7 +296,7 @@ import {
296
296
  buildResumeBundleFromState,
297
297
  getResumeBundleStatus,
298
298
  recordResumeBundle
299
- } from "./chunk-7TJMXZPO.js";
299
+ } from "./chunk-ZO377APE.js";
300
300
  import {
301
301
  getWorkProductLedgerStatus,
302
302
  recordWorkProductLedgerEntry,
@@ -453,12 +453,12 @@ import {
453
453
  runOperatorRepair,
454
454
  runOperatorSetup,
455
455
  summarizeNamespaceMaintenanceHealth
456
- } from "./chunk-C7BTGSCY.js";
456
+ } from "./chunk-FPBFDQZZ.js";
457
457
  import {
458
458
  NamespaceCatalog,
459
459
  isNamespaceKind,
460
460
  planNamespaceMaintenance
461
- } from "./chunk-LKGTTX74.js";
461
+ } from "./chunk-JK2IVISS.js";
462
462
  import {
463
463
  analyzeSessionIntegrity,
464
464
  applySessionRepair,
@@ -551,7 +551,7 @@ import {
551
551
  import {
552
552
  readProjectedHarmonicGraph,
553
553
  searchHarmonicRetrieval
554
- } from "./chunk-CQMH65IP.js";
554
+ } from "./chunk-TJJPT2OV.js";
555
555
  import {
556
556
  classifyMemoryKind
557
557
  } from "./chunk-YAZNBMNF.js";
@@ -577,13 +577,13 @@ import {
577
577
  } from "./chunk-LZIOY7ZU.js";
578
578
  import {
579
579
  ExtractionEngine
580
- } from "./chunk-YKUW2EZF.js";
580
+ } from "./chunk-7T7I5D3F.js";
581
581
  import {
582
582
  wrapWorkLayerContext
583
583
  } from "./chunk-EI6V5UXY.js";
584
584
  import {
585
585
  CONNECTOR_LABEL_MAX_LENGTH
586
- } from "./chunk-QF64W4YM.js";
586
+ } from "./chunk-QRZNVNNS.js";
587
587
  import {
588
588
  isValidConnectorId
589
589
  } from "./chunk-UA2NDTIU.js";
@@ -652,7 +652,7 @@ import {
652
652
  buildEntityRecallSection,
653
653
  entityRecentTranscriptLookbackHours,
654
654
  readRecentEntityTranscriptEntries
655
- } from "./chunk-DB4THCGN.js";
655
+ } from "./chunk-YFUHFPV6.js";
656
656
  import {
657
657
  boundRecallContextComposition,
658
658
  composeMissingMemoryContext,
@@ -695,15 +695,15 @@ import {
695
695
  import {
696
696
  CorpusWatermarkCache,
697
697
  computeServiceCorpusCensus
698
- } from "./chunk-XN43HAIV.js";
698
+ } from "./chunk-MGCV3VGC.js";
699
699
  import {
700
700
  listNamespaces,
701
701
  runNamespaceMigration,
702
702
  verifyNamespaces
703
- } from "./chunk-4VCASS3Q.js";
703
+ } from "./chunk-MCTGYIYN.js";
704
704
  import {
705
705
  NamespaceStorageRouter
706
- } from "./chunk-42JE2CF4.js";
706
+ } from "./chunk-YPE3O5VH.js";
707
707
  import {
708
708
  CrossNamespaceBudget,
709
709
  toBudgetWarning
@@ -717,12 +717,12 @@ import {
717
717
  } from "./chunk-YNDLCWXS.js";
718
718
  import {
719
719
  refreshConvergedNamespaces
720
- } from "./chunk-2GSPNTOU.js";
720
+ } from "./chunk-2G72JBQB.js";
721
721
  import {
722
722
  rebuildMemoryProjection,
723
723
  repairMemoryProjection,
724
724
  verifyMemoryProjection
725
- } from "./chunk-47W3ALIS.js";
725
+ } from "./chunk-XMKUABIG.js";
726
726
  import {
727
727
  buildProposedActions,
728
728
  buildQualityScore,
@@ -731,7 +731,7 @@ import {
731
731
  readMemoryGovernanceRunArtifact,
732
732
  restoreMemoryGovernanceRun,
733
733
  runMemoryGovernance
734
- } from "./chunk-DL7K5PMQ.js";
734
+ } from "./chunk-PPPY2PCU.js";
735
735
  import {
736
736
  collectNativeKnowledgeChunks,
737
737
  formatNativeKnowledgeSection,
@@ -764,7 +764,7 @@ import {
764
764
  materializeAfterSemanticConsolidation,
765
765
  parseConsolidationResponse,
766
766
  parseOperatorAwareConsolidationResponse
767
- } from "./chunk-GSCIRMPR.js";
767
+ } from "./chunk-QKYOMKRG.js";
768
768
  import {
769
769
  resolveNamespaceChildRoot
770
770
  } from "./chunk-3UXOZBHV.js";
@@ -780,13 +780,13 @@ import {
780
780
  } from "./chunk-GKCXTSFF.js";
781
781
  import {
782
782
  SmartBuffer
783
- } from "./chunk-IDCZEKK6.js";
783
+ } from "./chunk-34YQ7CVE.js";
784
784
  import {
785
785
  ExtractionDeadlineError,
786
786
  ExtractionRunCoordinator,
787
787
  ProviderCircuitBreaker,
788
788
  classifyExtractionOrigin
789
- } from "./chunk-PUKLCFCU.js";
789
+ } from "./chunk-VY3DHUL7.js";
790
790
  import {
791
791
  ARTIFACT_STATUS_CACHE_TTL_MS,
792
792
  BulkImportBatchPartialFailureError,
@@ -851,7 +851,7 @@ import {
851
851
  parseBriefingFocus,
852
852
  parseBriefingWindow,
853
853
  validateBriefingFormat
854
- } from "./chunk-YJEOQ72B.js";
854
+ } from "./chunk-6FPJPSQK.js";
855
855
  import {
856
856
  ReplayAdmissionRefusedError,
857
857
  StorageTargetRequiredError
@@ -912,7 +912,7 @@ import {
912
912
  validateCorrectionAction,
913
913
  validateCorrectionRequest,
914
914
  validateRedactionPattern
915
- } from "./chunk-KWVGRNKL.js";
915
+ } from "./chunk-NYZ6ZNFO.js";
916
916
  import {
917
917
  compileCorrectionRule,
918
918
  correctionsFilePath,
@@ -973,7 +973,7 @@ import {
973
973
  ExtractionLivenessWarnThrottle,
974
974
  computeExtractionLivenessStatus,
975
975
  renderExtractionLivenessStats
976
- } from "./chunk-AWD36R4D.js";
976
+ } from "./chunk-DURQZFVJ.js";
977
977
  import {
978
978
  assertExternalWikiRootOutsideMemoryDirCanonical
979
979
  } from "./chunk-JV3C2MNQ.js";
@@ -1025,7 +1025,7 @@ import {
1025
1025
  reconstructFusionInputs,
1026
1026
  selfDeps,
1027
1027
  serializeFusionDay
1028
- } from "./chunk-IB4TDPCC.js";
1028
+ } from "./chunk-LR2X3FJM.js";
1029
1029
  import {
1030
1030
  buildRetiredFactTombstoneInputs
1031
1031
  } from "./chunk-QGVCFVX6.js";
@@ -1137,10 +1137,11 @@ import {
1137
1137
  import {
1138
1138
  bufferTurnsEqual,
1139
1139
  describeError,
1140
+ extractionScopeGroupKey,
1140
1141
  groupTurnsByExtractionScope,
1141
1142
  hasPinnedCaptureScope,
1142
1143
  scopeProfilePlanIdentity
1143
- } from "./chunk-UXXK523X.js";
1144
+ } from "./chunk-BR7CZVMO.js";
1144
1145
  import {
1145
1146
  FallbackLlmClient,
1146
1147
  gatewayTaskChainOptions
@@ -20635,6 +20636,37 @@ import { createHash as createHash10, randomBytes } from "crypto";
20635
20636
 
20636
20637
  // src/orchestration/extraction-drain.ts
20637
20638
  import { createHash as createHash9 } from "crypto";
20639
+
20640
+ // src/orchestration/extraction-dedupe.ts
20641
+ function collapseExactDuplicateTurns(turns) {
20642
+ const firstByKey = /* @__PURE__ */ new Map();
20643
+ const representatives = [];
20644
+ const representativePositions = [];
20645
+ const duplicateFlags = new Array(turns.length).fill(false);
20646
+ let duplicateCount = 0;
20647
+ for (const [position, turn] of turns.entries()) {
20648
+ const key = `${extractionScopeGroupKey(turn)}\0${turn.role}\0${turn.content}`;
20649
+ if (firstByKey.has(key)) {
20650
+ duplicateFlags[position] = true;
20651
+ duplicateCount += 1;
20652
+ continue;
20653
+ }
20654
+ firstByKey.set(key, position);
20655
+ representatives.push(turn);
20656
+ representativePositions.push(position);
20657
+ }
20658
+ return { representatives, representativePositions, duplicateFlags, duplicateCount };
20659
+ }
20660
+ function markDuplicateTurns(turns, collapsed, start = 0, end = turns.length) {
20661
+ const marked = [];
20662
+ for (let position = start; position < end; position += 1) {
20663
+ const turn = turns[position];
20664
+ marked.push(collapsed.duplicateFlags[position] === true ? { ...turn, extractionDuplicateOf: true } : turn);
20665
+ }
20666
+ return marked;
20667
+ }
20668
+
20669
+ // src/orchestration/extraction-drain.ts
20638
20670
  function chunkFingerprint(chunk) {
20639
20671
  const hash = createHash9("sha256");
20640
20672
  for (const turn of chunk) hash.update(`${turn.role}\0${turn.timestamp}\0${turn.content}`);
@@ -20698,19 +20730,54 @@ var ExtractionDrain = class {
20698
20730
  */
20699
20731
  async run(turns, runOptions, preemptable = false, preemptHandle) {
20700
20732
  const budgetChars = this.deps.extractionWindowBudgetChars?.() ?? Number.POSITIVE_INFINITY;
20701
- const plan = this.chunkPlan(turns, runOptions, budgetChars);
20702
- if (plan.singleRun) return await this.deps.runExtraction(turns, runOptions);
20733
+ const collapsed = collapseExactDuplicateTurns(turns);
20734
+ const window = collapsed.duplicateCount > 0 ? markDuplicateTurns(turns, collapsed) : turns;
20735
+ const plan = this.chunkPlan(turns, runOptions, budgetChars, collapsed);
20736
+ if (plan.singleRun) {
20737
+ if (collapsed.duplicateCount === 0) return await this.deps.runExtraction(turns, runOptions);
20738
+ if (this.windowBelowThreshold(turns, runOptions)) return await this.deps.runExtraction(turns, runOptions);
20739
+ return await this.deps.runExtraction(window, {
20740
+ ...runOptions,
20741
+ skipCharThreshold: true,
20742
+ skipUserTurnThreshold: true
20743
+ });
20744
+ }
20703
20745
  if (!plan.resumed && this.windowBelowThreshold(turns, runOptions)) {
20704
20746
  return await this.deps.runExtraction(turns, runOptions);
20705
20747
  }
20706
- return await this.runChunked(plan.chunks, runOptions, preemptable, preemptHandle);
20707
- }
20708
- /** Chunking plan for one trigger-drain window. Accepted-capture groups */
20709
- chunkPlan(turns, runOptions, budgetChars) {
20710
- const chunks = this.chunkable(runOptions, turns, budgetChars) ? this.deps.measureRenderedTurns !== void 0 ? this.chunkByRenderedSize(turns, budgetChars) : chunkExtractionWindow(turns, budgetChars) : [];
20711
- const resumed = chunks.length > 0 && this.qualified.get(runOptions.bufferKey) === chunkFingerprint(chunks[0].slice(0, 1));
20748
+ const options = collapsed.duplicateCount > 0 ? { ...runOptions, skipCharThreshold: true, skipUserTurnThreshold: true } : runOptions;
20749
+ return await this.runChunked(plan.chunks, options, preemptable, preemptHandle);
20750
+ }
20751
+ /** Chunking plan for one trigger-drain window. Accepted-capture groups
20752
+ * keep their pinned head; a window with duplicates is planned on its
20753
+ * representatives and each chunk is then expanded back to its contiguous
20754
+ * original span with the duplicates marked. */
20755
+ chunkPlan(turns, runOptions, budgetChars, collapsed) {
20756
+ const deduped = collapsed !== void 0 && collapsed.duplicateCount > 0;
20757
+ const planning = deduped ? collapsed.representatives : turns;
20758
+ const repChunks = this.chunkable(runOptions, turns, budgetChars) ? this.deps.measureRenderedTurns !== void 0 ? this.chunkByRenderedSize(planning, budgetChars) : chunkExtractionWindow(planning, budgetChars) : [];
20759
+ const resumed = repChunks.length > 0 && this.qualified.get(runOptions.bufferKey) === chunkFingerprint(repChunks[0].slice(0, 1));
20760
+ const chunks = deduped ? this.expandedChunks(turns, collapsed, repChunks) : repChunks;
20712
20761
  return { singleRun: chunks.length <= 1 && !resumed, chunks, resumed };
20713
20762
  }
20763
+ /** Each representative chunk expands to a PARTITION slice of the original window:
20764
+ * chunk k spans [start_k, start_k+1) where start_0 = 0 and start_k+1 is chunk
20765
+ * k+1's first representative's position; the last chunk runs to the window end.
20766
+ * A gap or trailing duplicate therefore rides with the chunk BEFORE which it
20767
+ * sits — whose representatives precede it (its own representative is in that
20768
+ * chunk or an earlier one) — so every identity is cleared or dropped exactly
20769
+ * once and nothing is left behind after a fully successful drain (#3443). */
20770
+ expandedChunks(turns, collapsed, repChunks) {
20771
+ const chunks = [];
20772
+ let repIndex = 0;
20773
+ for (let index = 0; index < repChunks.length; index += 1) {
20774
+ const start = index === 0 ? 0 : collapsed.representativePositions[repIndex];
20775
+ repIndex += repChunks[index].length;
20776
+ const end = index === repChunks.length - 1 ? turns.length : collapsed.representativePositions[repIndex];
20777
+ chunks.push(markDuplicateTurns(turns, collapsed, start, end));
20778
+ }
20779
+ return chunks;
20780
+ }
20714
20781
  /** Automatic chunking needs a clearable window, no fail-closed/forced
20715
20782
  * caller, and a real budget to chunk against. */
20716
20783
  chunkable(runOptions, turns, budgetChars) {
@@ -63944,7 +64011,12 @@ var EngramAccessService = class extends SupportPassportAccessServiceBase {
63944
64011
  const extraction = await computeExtractionLivenessStatus(
63945
64012
  this.orchestrator,
63946
64013
  extractionWatermark,
63947
- caps?.namespaces !== void 0 ? void 0 : this.extractionLivenessWarn
64014
+ caps?.namespaces !== void 0 ? void 0 : this.extractionLivenessWarn,
64015
+ void 0,
64016
+ // #3442: claimed drain backlog from the root storage's sidecar scan —
64017
+ // cheap by contract (no claim-body parse, TTL-cached). Throwing is
64018
+ // surfaced inside the reader as a distinct degradation, not swallowed.
64019
+ () => this.orchestrator.storage.bufferDrainClaims().claimTotals()
63948
64020
  );
63949
64021
  let scopedDegradedReason = null;
63950
64022
  if (extraction.degraded) {
@@ -63952,6 +64024,8 @@ var EngramAccessService = class extends SupportPassportAccessServiceBase {
63952
64024
  scopedDegradedReason = "daemon extraction pipeline degraded; extraction watermark unreadable";
63953
64025
  } else if (extraction.degradedReason?.includes("buffer unreadable")) {
63954
64026
  scopedDegradedReason = "daemon extraction pipeline degraded; extraction buffer unreadable";
64027
+ } else if (extraction.degradedReason?.includes("claimed drain backlog")) {
64028
+ scopedDegradedReason = `${extraction.claimedSessionCount ?? 0} claimed session(s), ${extraction.claimedPendingTurnCount ?? 0} claimed turn(s) pending extraction`;
63955
64029
  } else {
63956
64030
  scopedDegradedReason = `${extraction.bufferedSessionCount} buffered session(s), ${extraction.pendingTurnCount} turn(s) pending extraction`;
63957
64031
  }
@@ -67233,4 +67307,4 @@ export {
67233
67307
  EngramAccessService,
67234
67308
  AccessAdminOpsSurface
67235
67309
  };
67236
- //# sourceMappingURL=chunk-AYWW6JEH.js.map
67310
+ //# sourceMappingURL=chunk-3OLHDECL.js.map