@remnic/core 10.0.187 → 10.0.189

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 (193) hide show
  1. package/dist/access-admin-ops-surface.js +39 -39
  2. package/dist/access-cli.js +39 -39
  3. package/dist/access-extraction-force-flush-preempt.js +39 -39
  4. package/dist/access-extraction-force-flush.d.ts.map +1 -1
  5. package/dist/access-extraction-force-flush.js +39 -39
  6. package/dist/access-http-briefing.js +39 -39
  7. package/dist/access-http-query.js +39 -39
  8. package/dist/access-http.js +39 -39
  9. package/dist/access-identity-continuity-surface.js +39 -39
  10. package/dist/access-lcm-surface.js +39 -39
  11. package/dist/access-mcp.js +39 -39
  12. package/dist/access-observe-helpers.d.ts +1 -4
  13. package/dist/access-observe-helpers.d.ts.map +1 -1
  14. package/dist/access-observe-helpers.js +1 -1
  15. package/dist/access-observe-write-surface.d.ts +0 -4
  16. package/dist/access-observe-write-surface.d.ts.map +1 -1
  17. package/dist/access-observe-write-surface.js +39 -39
  18. package/dist/access-operations-batch.js +39 -39
  19. package/dist/access-operations.js +39 -39
  20. package/dist/access-recall-concurrency.js +39 -39
  21. package/dist/access-recall-response.js +39 -39
  22. package/dist/access-recall-surface.js +39 -39
  23. package/dist/access-service.d.ts +0 -2
  24. package/dist/access-service.d.ts.map +1 -1
  25. package/dist/access-service.js +39 -39
  26. package/dist/active-recall.js +1 -1
  27. package/dist/briefing.js +2 -2
  28. package/dist/buffer-add-turns-bounded.js +2 -2
  29. package/dist/buffer-admission-idempotency.d.ts.map +1 -1
  30. package/dist/buffer-admission-idempotency.js +1 -1
  31. package/dist/buffer-persistence.d.ts +14 -0
  32. package/dist/buffer-persistence.d.ts.map +1 -1
  33. package/dist/buffer-persistence.js +3 -1
  34. package/dist/buffer.js +4 -4
  35. package/dist/calibration.js +3 -3
  36. package/dist/causal-consolidation.js +3 -3
  37. package/dist/{chunk-2ZS7CB5H.js → chunk-2I3ETW3G.js} +2 -2
  38. package/dist/{chunk-PSUSA5SM.js → chunk-2VNMSEZR.js} +2 -2
  39. package/dist/{chunk-LANV6I63.js → chunk-56BNHKZM.js} +7 -7
  40. package/dist/{chunk-3FEQNKMB.js → chunk-5WDUY2ZZ.js} +2 -2
  41. package/dist/{chunk-BANMPRSC.js → chunk-65DWWJKI.js} +2 -2
  42. package/dist/{chunk-O5ZCDK32.js → chunk-6AMFGXG2.js} +39 -11
  43. package/dist/chunk-6AMFGXG2.js.map +1 -0
  44. package/dist/{chunk-VZBKCRU7.js → chunk-6MDHK6NO.js} +2 -2
  45. package/dist/{chunk-2RAVHJCD.js → chunk-6OHCNTKU.js} +2 -2
  46. package/dist/{chunk-P5FF44G3.js → chunk-7X6EZ2QB.js} +4 -4
  47. package/dist/{chunk-K5RGHUX7.js → chunk-A32EBVCZ.js} +2 -2
  48. package/dist/{chunk-L2DYRQQH.js → chunk-ABPOW3SX.js} +73 -103
  49. package/dist/chunk-ABPOW3SX.js.map +1 -0
  50. package/dist/{chunk-KVM3BS5K.js → chunk-ATPY63F5.js} +2 -2
  51. package/dist/chunk-B256MMS7.js +205 -0
  52. package/dist/chunk-B256MMS7.js.map +1 -0
  53. package/dist/{chunk-MOWLANEJ.js → chunk-C6Y2YHJL.js} +2 -2
  54. package/dist/{chunk-IMT7NTFV.js → chunk-CIAQK2OU.js} +6 -1
  55. package/dist/{chunk-IMT7NTFV.js.map → chunk-CIAQK2OU.js.map} +1 -1
  56. package/dist/{chunk-AJVCM2E3.js → chunk-CYX7JI4O.js} +2 -2
  57. package/dist/{chunk-76KL37ON.js → chunk-D3FP4JQI.js} +2 -2
  58. package/dist/{chunk-TQXKUQFX.js → chunk-FZU62GIV.js} +7 -6
  59. package/dist/chunk-FZU62GIV.js.map +1 -0
  60. package/dist/{chunk-YDGQYG4L.js → chunk-H442UKDV.js} +8 -8
  61. package/dist/{chunk-FXDQO7VX.js → chunk-HL53XYHC.js} +3 -3
  62. package/dist/{chunk-4VFEN3WT.js → chunk-IMSLPQJB.js} +2 -2
  63. package/dist/{chunk-FKLSIQBF.js → chunk-K3JGILZC.js} +3 -3
  64. package/dist/{chunk-JRHOL6B5.js → chunk-K6BS5RB4.js} +2 -2
  65. package/dist/{chunk-HHCLV572.js → chunk-KVTUUU7H.js} +2 -2
  66. package/dist/{chunk-TRFSTCQK.js → chunk-LL6WEMTC.js} +34 -6
  67. package/dist/chunk-LL6WEMTC.js.map +1 -0
  68. package/dist/{chunk-2WITFW6F.js → chunk-NKHRIDYP.js} +2 -2
  69. package/dist/{chunk-KYZMCH4I.js → chunk-NN3LMWKA.js} +12 -4
  70. package/dist/chunk-NN3LMWKA.js.map +1 -0
  71. package/dist/{chunk-CYTTY4M2.js → chunk-OPXK5IQU.js} +47 -47
  72. package/dist/chunk-OPXK5IQU.js.map +1 -0
  73. package/dist/{chunk-CTWWMEGR.js → chunk-PCGBESAN.js} +2 -2
  74. package/dist/{chunk-MDXZIU5X.js → chunk-QGT5KNQT.js} +2 -2
  75. package/dist/{chunk-YJZDRM33.js → chunk-QXHWOUS6.js} +3 -3
  76. package/dist/{chunk-OVJAQWHO.js → chunk-RPOG6HLI.js} +2 -2
  77. package/dist/{chunk-2QQCCUXF.js → chunk-RVODERA5.js} +2 -2
  78. package/dist/{chunk-FQE5QN5Q.js → chunk-TAPF7T26.js} +2 -2
  79. package/dist/{chunk-7UTCETGK.js → chunk-TQODBIMW.js} +2 -2
  80. package/dist/{chunk-KZJEKKK6.js → chunk-VQQZJ6KJ.js} +3 -3
  81. package/dist/{chunk-I233SAGS.js → chunk-X3ERYOLO.js} +2 -2
  82. package/dist/{chunk-UCCXPMTP.js → chunk-XQF2KLV5.js} +2 -2
  83. package/dist/{chunk-LPYGM6RE.js → chunk-XWPYK5T4.js} +2 -2
  84. package/dist/{chunk-7EPEZYX3.js → chunk-YVXR7CPS.js} +2 -2
  85. package/dist/cli.js +39 -39
  86. package/dist/coding/export-okf-codegraph.js +1 -1
  87. package/dist/compounding/engine.js +3 -3
  88. package/dist/config.js +1 -1
  89. package/dist/connectors/codex-materialize-runner.js +2 -2
  90. package/dist/connectors/index.js +2 -2
  91. package/dist/convergence-refresh.js +4 -4
  92. package/dist/corpus-watermark.js +4 -4
  93. package/dist/entity-retrieval.js +2 -2
  94. package/dist/explicit-capture.js +39 -39
  95. package/dist/extraction.js +6 -6
  96. package/dist/harmonic-retrieval.js +2 -2
  97. package/dist/index.js +39 -39
  98. package/dist/local-llm-helpers.d.ts.map +1 -1
  99. package/dist/local-llm-helpers.js +2 -2
  100. package/dist/local-llm-transport.d.ts +82 -9
  101. package/dist/local-llm-transport.d.ts.map +1 -1
  102. package/dist/local-llm-transport.js +11 -3
  103. package/dist/local-llm.d.ts.map +1 -1
  104. package/dist/local-llm.js +3 -3
  105. package/dist/location/index.js +3 -3
  106. package/dist/maintenance/memory-governance.js +2 -2
  107. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +2 -2
  108. package/dist/maintenance/rebuild-memory-projection-runner.js +4 -4
  109. package/dist/maintenance/rebuild-memory-projection.js +3 -3
  110. package/dist/namespaces/migrate.js +3 -3
  111. package/dist/namespaces/storage.js +2 -2
  112. package/dist/operator-doctor-corpus.js +5 -5
  113. package/dist/operator-toolkit.js +8 -8
  114. package/dist/orchestration/backlog-scheduler.js +40 -40
  115. package/dist/orchestration/buffer-drain-runner.js +40 -40
  116. package/dist/orchestration/extraction-queue-coordinator.d.ts +14 -1
  117. package/dist/orchestration/extraction-queue-coordinator.d.ts.map +1 -1
  118. package/dist/orchestration/maintenance.js +13 -13
  119. package/dist/orchestrator.js +39 -39
  120. package/dist/recall-navigation.js +39 -39
  121. package/dist/resume-bundles.js +1 -1
  122. package/dist/semantic-consolidation.js +3 -3
  123. package/dist/semantic-rule-promotion.js +2 -2
  124. package/dist/semantic-rule-verifier.js +2 -2
  125. package/dist/source-agent-qualifier.js +2 -2
  126. package/dist/standup/build.js +2 -2
  127. package/dist/storage/entity-canonical-id-migration-runner.d.ts.map +1 -1
  128. package/dist/storage.js +1 -1
  129. package/dist/summarizer.js +4 -4
  130. package/dist/support-passport/index.js +4 -4
  131. package/dist/transfer/export-okf.js +2 -2
  132. package/dist/verified-recall.js +2 -2
  133. package/dist/who-knows-cli.js +3 -3
  134. package/dist/who-knows.js +2 -2
  135. package/package.json +2 -2
  136. package/src/access-extraction-force-flush-preempt-coordinator.test.ts +71 -0
  137. package/src/access-extraction-force-flush.ts +20 -56
  138. package/src/access-observe-helpers.test.ts +71 -88
  139. package/src/access-observe-helpers.ts +60 -73
  140. package/src/access-observe-write-surface.ts +1 -22
  141. package/src/access-service-observe-lcm-parity.test.ts +176 -89
  142. package/src/access-service-observe-scope.test.ts +18 -86
  143. package/src/access-service.ts +0 -13
  144. package/src/buffer-admission-idempotency.test.ts +115 -0
  145. package/src/buffer-admission-idempotency.ts +67 -11
  146. package/src/buffer-persistence.ts +46 -5
  147. package/src/local-llm-headers-timeout.test.ts +246 -16
  148. package/src/local-llm-helpers.ts +14 -4
  149. package/src/local-llm-transport.ts +253 -16
  150. package/src/local-llm.ts +7 -8
  151. package/src/orchestration/extraction-queue-coordinator.ts +34 -3
  152. package/src/storage/entity-canonical-id-migration-runner.test.ts +90 -0
  153. package/src/storage/entity-canonical-id-migration-runner.ts +10 -0
  154. package/dist/chunk-5YQXWVCP.js +0 -74
  155. package/dist/chunk-5YQXWVCP.js.map +0 -1
  156. package/dist/chunk-CYTTY4M2.js.map +0 -1
  157. package/dist/chunk-KYZMCH4I.js.map +0 -1
  158. package/dist/chunk-L2DYRQQH.js.map +0 -1
  159. package/dist/chunk-O5ZCDK32.js.map +0 -1
  160. package/dist/chunk-TQXKUQFX.js.map +0 -1
  161. package/dist/chunk-TRFSTCQK.js.map +0 -1
  162. /package/dist/{chunk-2ZS7CB5H.js.map → chunk-2I3ETW3G.js.map} +0 -0
  163. /package/dist/{chunk-PSUSA5SM.js.map → chunk-2VNMSEZR.js.map} +0 -0
  164. /package/dist/{chunk-LANV6I63.js.map → chunk-56BNHKZM.js.map} +0 -0
  165. /package/dist/{chunk-3FEQNKMB.js.map → chunk-5WDUY2ZZ.js.map} +0 -0
  166. /package/dist/{chunk-BANMPRSC.js.map → chunk-65DWWJKI.js.map} +0 -0
  167. /package/dist/{chunk-VZBKCRU7.js.map → chunk-6MDHK6NO.js.map} +0 -0
  168. /package/dist/{chunk-2RAVHJCD.js.map → chunk-6OHCNTKU.js.map} +0 -0
  169. /package/dist/{chunk-P5FF44G3.js.map → chunk-7X6EZ2QB.js.map} +0 -0
  170. /package/dist/{chunk-K5RGHUX7.js.map → chunk-A32EBVCZ.js.map} +0 -0
  171. /package/dist/{chunk-KVM3BS5K.js.map → chunk-ATPY63F5.js.map} +0 -0
  172. /package/dist/{chunk-MOWLANEJ.js.map → chunk-C6Y2YHJL.js.map} +0 -0
  173. /package/dist/{chunk-AJVCM2E3.js.map → chunk-CYX7JI4O.js.map} +0 -0
  174. /package/dist/{chunk-76KL37ON.js.map → chunk-D3FP4JQI.js.map} +0 -0
  175. /package/dist/{chunk-YDGQYG4L.js.map → chunk-H442UKDV.js.map} +0 -0
  176. /package/dist/{chunk-FXDQO7VX.js.map → chunk-HL53XYHC.js.map} +0 -0
  177. /package/dist/{chunk-4VFEN3WT.js.map → chunk-IMSLPQJB.js.map} +0 -0
  178. /package/dist/{chunk-FKLSIQBF.js.map → chunk-K3JGILZC.js.map} +0 -0
  179. /package/dist/{chunk-JRHOL6B5.js.map → chunk-K6BS5RB4.js.map} +0 -0
  180. /package/dist/{chunk-HHCLV572.js.map → chunk-KVTUUU7H.js.map} +0 -0
  181. /package/dist/{chunk-2WITFW6F.js.map → chunk-NKHRIDYP.js.map} +0 -0
  182. /package/dist/{chunk-CTWWMEGR.js.map → chunk-PCGBESAN.js.map} +0 -0
  183. /package/dist/{chunk-MDXZIU5X.js.map → chunk-QGT5KNQT.js.map} +0 -0
  184. /package/dist/{chunk-YJZDRM33.js.map → chunk-QXHWOUS6.js.map} +0 -0
  185. /package/dist/{chunk-OVJAQWHO.js.map → chunk-RPOG6HLI.js.map} +0 -0
  186. /package/dist/{chunk-2QQCCUXF.js.map → chunk-RVODERA5.js.map} +0 -0
  187. /package/dist/{chunk-FQE5QN5Q.js.map → chunk-TAPF7T26.js.map} +0 -0
  188. /package/dist/{chunk-7UTCETGK.js.map → chunk-TQODBIMW.js.map} +0 -0
  189. /package/dist/{chunk-KZJEKKK6.js.map → chunk-VQQZJ6KJ.js.map} +0 -0
  190. /package/dist/{chunk-I233SAGS.js.map → chunk-X3ERYOLO.js.map} +0 -0
  191. /package/dist/{chunk-UCCXPMTP.js.map → chunk-XQF2KLV5.js.map} +0 -0
  192. /package/dist/{chunk-LPYGM6RE.js.map → chunk-XWPYK5T4.js.map} +0 -0
  193. /package/dist/{chunk-7EPEZYX3.js.map → chunk-YVXR7CPS.js.map} +0 -0
@@ -36,7 +36,7 @@ import {
36
36
  import {
37
37
  exportOkfBundle,
38
38
  parseIncludeStatus
39
- } from "./chunk-FQE5QN5Q.js";
39
+ } from "./chunk-TAPF7T26.js";
40
40
  import {
41
41
  exportSqlite
42
42
  } from "./chunk-BV2TIZ4F.js";
@@ -71,12 +71,12 @@ import {
71
71
  import {
72
72
  buildStandup,
73
73
  parseStandupDate
74
- } from "./chunk-7UTCETGK.js";
74
+ } from "./chunk-TQODBIMW.js";
75
75
  import {
76
76
  SupportPassportAccessSurface,
77
77
  createSupportPassportModelAdapter,
78
78
  supportsSupportPassportPrivateFiles
79
- } from "./chunk-2WITFW6F.js";
79
+ } from "./chunk-NKHRIDYP.js";
80
80
  import {
81
81
  RoutingRulesStore
82
82
  } from "./chunk-TBUEE7XF.js";
@@ -86,7 +86,7 @@ import {
86
86
  import {
87
87
  ActivityStore,
88
88
  MaintenanceScheduler
89
- } from "./chunk-YDGQYG4L.js";
89
+ } from "./chunk-H442UKDV.js";
90
90
  import {
91
91
  runPeerProfileReasoner
92
92
  } from "./chunk-WTXUUZYI.js";
@@ -110,7 +110,7 @@ import {
110
110
  } from "./chunk-6PEEZSGL.js";
111
111
  import {
112
112
  rebuildMemoryLifecycleLedger
113
- } from "./chunk-CTWWMEGR.js";
113
+ } from "./chunk-PCGBESAN.js";
114
114
  import {
115
115
  rebuildObservations
116
116
  } from "./chunk-2X4WP4GD.js";
@@ -124,7 +124,7 @@ import {
124
124
  runLocationDay,
125
125
  runLocationStatus,
126
126
  runLocationSync
127
- } from "./chunk-YJZDRM33.js";
127
+ } from "./chunk-QXHWOUS6.js";
128
128
  import {
129
129
  archiveObservations
130
130
  } from "./chunk-SBQOBY3S.js";
@@ -140,7 +140,7 @@ import {
140
140
  import {
141
141
  CompoundingEngine,
142
142
  defaultTierMigrationCycleBudget
143
- } from "./chunk-FKLSIQBF.js";
143
+ } from "./chunk-K3JGILZC.js";
144
144
  import {
145
145
  SharedContextManager,
146
146
  UNATTRIBUTED_ACCESS_WRITE_ORIGIN
@@ -199,7 +199,7 @@ import {
199
199
  handleWhoKnowsHttpQuery,
200
200
  loadWhoKnowsEntities,
201
201
  validateWhoKnowsInput
202
- } from "./chunk-7EPEZYX3.js";
202
+ } from "./chunk-YVXR7CPS.js";
203
203
  import {
204
204
  WriteQuarantineStore
205
205
  } from "./chunk-BANSBRNX.js";
@@ -225,7 +225,7 @@ import {
225
225
  import {
226
226
  compareVerifiedEpisodeResults,
227
227
  searchVerifiedEpisodes
228
- } from "./chunk-2RAVHJCD.js";
228
+ } from "./chunk-6OHCNTKU.js";
229
229
  import {
230
230
  applyTrustScoreStage,
231
231
  buildTrustSignalsForRerank,
@@ -270,7 +270,7 @@ import {
270
270
  import {
271
271
  HourlySummarizer,
272
272
  summarizeHourlyStatus
273
- } from "./chunk-3FEQNKMB.js";
273
+ } from "./chunk-5WDUY2ZZ.js";
274
274
  import {
275
275
  buildTargetedFactRecallSection,
276
276
  shouldRecallTargetedFactEvidence
@@ -289,11 +289,11 @@ import {
289
289
  } from "./chunk-WWDO7ZWM.js";
290
290
  import {
291
291
  promoteSemanticRuleFromMemory
292
- } from "./chunk-MOWLANEJ.js";
292
+ } from "./chunk-C6Y2YHJL.js";
293
293
  import {
294
294
  compareVerifiedSemanticRuleResults,
295
295
  searchVerifiedSemanticRules
296
- } from "./chunk-LPYGM6RE.js";
296
+ } from "./chunk-XWPYK5T4.js";
297
297
  import {
298
298
  buildResponseGuidanceRecallSection,
299
299
  shouldRecallResponseGuidance
@@ -461,12 +461,12 @@ import {
461
461
  runOperatorRepair,
462
462
  runOperatorSetup,
463
463
  summarizeNamespaceMaintenanceHealth
464
- } from "./chunk-LANV6I63.js";
464
+ } from "./chunk-56BNHKZM.js";
465
465
  import {
466
466
  NamespaceCatalog,
467
467
  isNamespaceKind,
468
468
  planNamespaceMaintenance
469
- } from "./chunk-I233SAGS.js";
469
+ } from "./chunk-X3ERYOLO.js";
470
470
  import {
471
471
  analyzeSessionIntegrity,
472
472
  applySessionRepair,
@@ -577,7 +577,7 @@ import {
577
577
  import {
578
578
  readProjectedHarmonicGraph,
579
579
  searchHarmonicRetrieval
580
- } from "./chunk-BANMPRSC.js";
580
+ } from "./chunk-65DWWJKI.js";
581
581
  import {
582
582
  removeNodeEdgesForRewrite,
583
583
  rollbackNodeEdgeRewrite
@@ -587,7 +587,7 @@ import {
587
587
  } from "./chunk-XXSOVESA.js";
588
588
  import {
589
589
  ExtractionEngine
590
- } from "./chunk-4VFEN3WT.js";
590
+ } from "./chunk-IMSLPQJB.js";
591
591
  import {
592
592
  wrapWorkLayerContext
593
593
  } from "./chunk-EI6V5UXY.js";
@@ -673,7 +673,7 @@ import {
673
673
  buildEntityRecallSection,
674
674
  entityRecentTranscriptLookbackHours,
675
675
  readRecentEntityTranscriptEntries
676
- } from "./chunk-JRHOL6B5.js";
676
+ } from "./chunk-K6BS5RB4.js";
677
677
  import {
678
678
  boundRecallContextComposition,
679
679
  composeMissingMemoryContext,
@@ -716,15 +716,15 @@ import {
716
716
  import {
717
717
  CorpusWatermarkCache,
718
718
  computeServiceCorpusCensus
719
- } from "./chunk-OVJAQWHO.js";
719
+ } from "./chunk-RPOG6HLI.js";
720
720
  import {
721
721
  listNamespaces,
722
722
  runNamespaceMigration,
723
723
  verifyNamespaces
724
- } from "./chunk-PSUSA5SM.js";
724
+ } from "./chunk-2VNMSEZR.js";
725
725
  import {
726
726
  NamespaceStorageRouter
727
- } from "./chunk-KVM3BS5K.js";
727
+ } from "./chunk-ATPY63F5.js";
728
728
  import {
729
729
  CrossNamespaceBudget,
730
730
  toBudgetWarning
@@ -738,12 +738,12 @@ import {
738
738
  } from "./chunk-EZ25VE3G.js";
739
739
  import {
740
740
  refreshConvergedNamespaces
741
- } from "./chunk-HHCLV572.js";
741
+ } from "./chunk-KVTUUU7H.js";
742
742
  import {
743
743
  rebuildMemoryProjection,
744
744
  repairMemoryProjection,
745
745
  verifyMemoryProjection
746
- } from "./chunk-KZJEKKK6.js";
746
+ } from "./chunk-VQQZJ6KJ.js";
747
747
  import {
748
748
  buildProposedActions,
749
749
  buildQualityScore,
@@ -752,7 +752,7 @@ import {
752
752
  readMemoryGovernanceRunArtifact,
753
753
  restoreMemoryGovernanceRun,
754
754
  runMemoryGovernance
755
- } from "./chunk-76KL37ON.js";
755
+ } from "./chunk-D3FP4JQI.js";
756
756
  import {
757
757
  collectNativeKnowledgeChunks,
758
758
  formatNativeKnowledgeSection,
@@ -785,7 +785,7 @@ import {
785
785
  materializeAfterSemanticConsolidation,
786
786
  parseConsolidationResponse,
787
787
  parseOperatorAwareConsolidationResponse
788
- } from "./chunk-2ZS7CB5H.js";
788
+ } from "./chunk-2I3ETW3G.js";
789
789
  import {
790
790
  resolveNamespaceChildRoot
791
791
  } from "./chunk-3UXOZBHV.js";
@@ -801,7 +801,7 @@ import {
801
801
  } from "./chunk-GKCXTSFF.js";
802
802
  import {
803
803
  SmartBuffer
804
- } from "./chunk-FXDQO7VX.js";
804
+ } from "./chunk-HL53XYHC.js";
805
805
  import {
806
806
  ExtractionDeadlineError,
807
807
  ExtractionRunCoordinator,
@@ -856,7 +856,7 @@ import {
856
856
  } from "./chunk-CSAKJVXW.js";
857
857
  import {
858
858
  LocalLlmClient
859
- } from "./chunk-TQXKUQFX.js";
859
+ } from "./chunk-FZU62GIV.js";
860
860
  import {
861
861
  isCapsuleImportArchiveInputError,
862
862
  validateCapsuleImportArchive
@@ -885,14 +885,14 @@ import {
885
885
  parseBriefingFocus,
886
886
  parseBriefingWindow,
887
887
  validateBriefingFormat
888
- } from "./chunk-MDXZIU5X.js";
888
+ } from "./chunk-QGT5KNQT.js";
889
889
  import {
890
890
  BriefingTimeoutError,
891
891
  withBriefingDeadline
892
892
  } from "./chunk-FNFURZBZ.js";
893
893
  import {
894
894
  scopeObserveBufferAdmissionIdempotencyKey
895
- } from "./chunk-O5ZCDK32.js";
895
+ } from "./chunk-6AMFGXG2.js";
896
896
  import {
897
897
  AMBIENT_CAPTURE_PROMPT_RULE,
898
898
  isHighImpactPersonalFact
@@ -1070,7 +1070,7 @@ import {
1070
1070
  reconstructFusionInputs,
1071
1071
  selfDeps,
1072
1072
  serializeFusionDay
1073
- } from "./chunk-IMT7NTFV.js";
1073
+ } from "./chunk-CIAQK2OU.js";
1074
1074
  import {
1075
1075
  buildRetiredFactTombstoneInputs
1076
1076
  } from "./chunk-QGVCFVX6.js";
@@ -1399,7 +1399,7 @@ import {
1399
1399
  import {
1400
1400
  PendingObserveExtractionTracker,
1401
1401
  pendingObserveScopeHint
1402
- } from "./chunk-CYTTY4M2.js";
1402
+ } from "./chunk-OPXK5IQU.js";
1403
1403
  import {
1404
1404
  archiveObservedTurns
1405
1405
  } from "./chunk-L3E7MLMK.js";
@@ -4886,6 +4886,16 @@ var ExtractionQueueCoordinator = class _ExtractionQueueCoordinator {
4886
4886
  /** Preempt slots of the currently running tasks, keyed by slot identity. */
4887
4887
  preemptSlots = /* @__PURE__ */ new Map();
4888
4888
  preemptSeq = 0;
4889
+ /**
4890
+ * COS-825: keys whose running task was already preempted for a force-flush
4891
+ * once. A flush preempts a session's extraction at most once per episode:
4892
+ * the retried generation (the turns the preempted task left buffered) is
4893
+ * waited for, never killed again, until some task for the key succeeds.
4894
+ * This stops the livelock where every flush call killed the extraction that
4895
+ * was about to finish and then died on its own deadline, so nothing ever
4896
+ * completed.
4897
+ */
4898
+ preemptedKeys = /* @__PURE__ */ new Set();
4889
4899
  /** Running tasks per lane — the backlog share and the foreground floor. */
4890
4900
  activeBacklog = 0;
4891
4901
  activeForeground = 0;
@@ -4980,11 +4990,15 @@ var ExtractionQueueCoordinator = class _ExtractionQueueCoordinator {
4980
4990
  preemptRunning(preferredKey) {
4981
4991
  const armed = Array.from(this.preemptSlots.values()).filter((slot) => slot.armed !== void 0);
4982
4992
  if (armed.length === 0) return;
4983
- const preferred = preferredKey !== void 0 ? armed.find((slot) => slot.key === preferredKey) : void 0;
4984
- const victims = armed.some((slot) => slot.backlog !== true) ? armed.filter((slot) => slot.backlog !== true) : armed;
4993
+ const latched = preferredKey !== void 0 && this.preemptedKeys.has(preferredKey);
4994
+ const preferred = latched ? void 0 : preferredKey !== void 0 ? armed.find((slot) => slot.key === preferredKey) : void 0;
4995
+ let victims = armed.some((slot) => slot.backlog !== true) ? armed.filter((slot) => slot.backlog !== true) : armed;
4996
+ if (latched) victims = victims.filter((slot) => slot.key !== preferredKey);
4997
+ if (victims.length === 0 && !preferred) return;
4985
4998
  const chosen = preferred ?? victims.reduce((a, b) => (b.armed?.seq ?? -1) > (a.armed?.seq ?? -1) ? b : a);
4986
4999
  const abort = chosen.armed?.abort;
4987
5000
  chosen.armed = void 0;
5001
+ if (chosen.key !== void 0) this.preemptedKeys.add(chosen.key);
4988
5002
  abort?.();
4989
5003
  }
4990
5004
  runPreemptable(preempt, preemptable, parent, run) {
@@ -5101,6 +5115,7 @@ var ExtractionQueueCoordinator = class _ExtractionQueueCoordinator {
5101
5115
  this.preemptSlots.set(slot, { key: entry.key, backlog: entry.backlog });
5102
5116
  try {
5103
5117
  await entry.run(this.createPreemptHandle(slot));
5118
+ if (entry.key !== void 0) this.preemptedKeys.delete(entry.key);
5104
5119
  } catch (err) {
5105
5120
  this.logExtractionQueueFailure(err, "task");
5106
5121
  } finally {
@@ -5122,14 +5137,21 @@ var ExtractionQueueCoordinator = class _ExtractionQueueCoordinator {
5122
5137
  * `key` and abort nothing when none does. Unlike `preemptRunning` there is
5123
5138
  * deliberately no newest-slot fallback - a keyed caller (force-flush on
5124
5139
  * session K) must never take out an unrelated background task just
5125
- * because K's own extraction is not (yet) armed. */
5140
+ * because K's own extraction is not (yet) armed.
5141
+ * COS-825: at most one preemption per key episode — once K's task has
5142
+ * been preempted, later flushes wait for the retried work; the latch
5143
+ * clears when a task for K succeeds. */
5126
5144
  preemptKeyed(key) {
5145
+ if (this.preemptedKeys.has(key)) return;
5146
+ let preempted = false;
5127
5147
  for (const state of this.preemptSlots.values()) {
5128
5148
  if (state.key !== key || state.armed === void 0) continue;
5129
5149
  const abort = state.armed.abort;
5130
5150
  state.armed = void 0;
5151
+ preempted = true;
5131
5152
  abort();
5132
5153
  }
5154
+ if (preempted) this.preemptedKeys.add(key);
5133
5155
  }
5134
5156
  createPreemptHandle(slot) {
5135
5157
  return {
@@ -61322,70 +61344,31 @@ async function extractionForceFlush(deps, request, waitForPendingObserveExtracti
61322
61344
  committed = true;
61323
61345
  request.onCommitted?.();
61324
61346
  };
61325
- let abortHandler;
61326
61347
  const reservationScopeHint = pendingObserveScopeHint(request);
61327
- const cancelBeforeScopeResolution = () => {
61328
- const explicitNamespace = request.namespace?.trim();
61329
- if (explicitNamespace) {
61330
- deps.cancelPendingObserveExtractions?.(
61331
- request.sessionKey,
61332
- authenticatedPrincipal ?? sessionPrincipal,
61333
- explicitNamespace,
61334
- reservationScopeHint
61335
- );
61336
- return;
61337
- }
61338
- if (reservationScopeHint !== void 0) {
61339
- deps.cancelPendingObservePreparations?.(request.sessionKey, reservationScopeHint);
61340
- return;
61341
- }
61342
- if (!namespacesEnabled) {
61343
- deps.cancelPendingObserveExtractions?.(request.sessionKey);
61344
- }
61345
- };
61346
61348
  try {
61347
- let scope;
61348
- try {
61349
- scope = await awaitSessionFlushPhase(
61350
- () => deps.resolveMemoryScopePlan(request),
61351
- {
61352
- abortSignal: request.abortSignal,
61353
- extractionDeadlineMs: deadlineAt,
61354
- reason: "access_force_flush",
61355
- deadlineStage: "scope_resolution",
61356
- onDeadline: cancelBeforeScopeResolution
61357
- }
61358
- );
61359
- } catch (error) {
61360
- if (request.abortSignal?.aborted) cancelBeforeScopeResolution();
61361
- throw error;
61362
- }
61363
- const cancelScopedPendingObserveExtractions = () => {
61364
- deps.cancelPendingObserveExtractions?.(
61365
- request.sessionKey,
61366
- scope.principal,
61367
- scope.writeNamespace,
61368
- reservationScopeHint
61369
- );
61370
- };
61371
- if (request.abortSignal?.aborted) cancelScopedPendingObserveExtractions();
61349
+ const scope = await awaitSessionFlushPhase(
61350
+ () => deps.resolveMemoryScopePlan(request),
61351
+ {
61352
+ abortSignal: request.abortSignal,
61353
+ extractionDeadlineMs: deadlineAt,
61354
+ reason: "access_force_flush",
61355
+ deadlineStage: "scope_resolution"
61356
+ }
61357
+ );
61372
61358
  throwIfAborted(request.abortSignal, "extraction force-flush aborted");
61373
61359
  if (deadlineAt !== void 0 && deadlineAt <= Date.now()) {
61374
- cancelScopedPendingObserveExtractions();
61375
61360
  throw new EngramAccessInputError("extraction force-flush deadline exceeded before buffer drain");
61376
61361
  }
61377
- abortHandler = cancelScopedPendingObserveExtractions;
61378
- request.abortSignal?.addEventListener("abort", abortHandler, { once: true });
61379
61362
  if (waitForPendingObserveExtraction) {
61380
- let cancelPendingObserveExtraction;
61363
+ let stopWaitingForPending;
61381
61364
  await awaitSessionFlushPhase(
61382
61365
  () => waitForPendingObserveExtraction(
61383
61366
  request.sessionKey,
61384
61367
  scope.principal,
61385
61368
  scope.writeNamespace,
61386
61369
  request.abortSignal,
61387
- (cancel) => {
61388
- cancelPendingObserveExtraction = cancel;
61370
+ (stop) => {
61371
+ stopWaitingForPending = stop;
61389
61372
  },
61390
61373
  reservationScopeHint
61391
61374
  ),
@@ -61394,9 +61377,9 @@ async function extractionForceFlush(deps, request, waitForPendingObserveExtracti
61394
61377
  extractionDeadlineMs: deadlineAt,
61395
61378
  reason: "access_force_flush",
61396
61379
  deadlineStage: "pending_observe_extraction",
61380
+ // The flush budget stops the WAIT; the queued extractions continue.
61397
61381
  onDeadline: () => {
61398
- cancelScopedPendingObserveExtractions();
61399
- cancelPendingObserveExtraction?.();
61382
+ stopWaitingForPending?.();
61400
61383
  }
61401
61384
  }
61402
61385
  );
@@ -61420,9 +61403,10 @@ async function extractionForceFlush(deps, request, waitForPendingObserveExtracti
61420
61403
  extractionDeadlineMs: deadlineAt,
61421
61404
  reason: "access_force_flush",
61422
61405
  deadlineStage: "buffer_drain",
61406
+ // The flush budget aborts its OWN drain; queued observe extractions
61407
+ // keep running (COS-825).
61423
61408
  onDeadline: () => {
61424
61409
  drainAbort.abort();
61425
- cancelScopedPendingObserveExtractions();
61426
61410
  }
61427
61411
  }
61428
61412
  );
@@ -61470,8 +61454,6 @@ async function extractionForceFlush(deps, request, waitForPendingObserveExtracti
61470
61454
  throw new EngramAccessInputError(error.message);
61471
61455
  }
61472
61456
  throw error;
61473
- } finally {
61474
- if (abortHandler) request.abortSignal?.removeEventListener("abort", abortHandler);
61475
61457
  }
61476
61458
  }
61477
61459
 
@@ -61510,12 +61492,6 @@ var AccessObserveWriteSurface = class {
61510
61492
  quarantineStoreInstance;
61511
61493
  pendingObserveExtractions = new PendingObserveExtractionTracker();
61512
61494
  observeTranscriptPersister = new ObserveTranscriptPersister();
61513
- cancelPendingObservePreparations(sessionKey, scopeHint) {
61514
- this.pendingObserveExtractions.cancelPreparations(sessionKey, scopeHint);
61515
- }
61516
- cancelPendingObserveExtractions(sessionKey, principal, namespace, scopeHint, reason) {
61517
- this.pendingObserveExtractions.cancel(sessionKey, principal, namespace, scopeHint, reason);
61518
- }
61519
61495
  quarantineStore() {
61520
61496
  if (!this.quarantineStoreInstance) {
61521
61497
  this.quarantineStoreInstance = new WriteQuarantineStore(this.deps.orchestrator.config.memoryDir);
@@ -62039,7 +62015,7 @@ var AccessObserveWriteSurface = class {
62039
62015
  extraction.catch((err) => {
62040
62016
  log.error(`access-observe background extraction failed: ${err}`);
62041
62017
  });
62042
- this.pendingObserveExtractions.track(trackedExtractionKey, extraction, observeAbortController);
62018
+ this.pendingObserveExtractions.track(trackedExtractionKey, extraction);
62043
62019
  extractionQueued = true;
62044
62020
  };
62045
62021
  }
@@ -66233,12 +66209,6 @@ var EngramAccessService = class extends SupportPassportAccessServiceBase {
66233
66209
  async extractionForceFlush(request) {
66234
66210
  return delegateExtractionForceFlush(this.accessObserveWriteSurface, request);
66235
66211
  }
66236
- cancelPendingObservePreparations(sessionKey, scopeHint) {
66237
- this.accessObserveWriteSurface.cancelPendingObservePreparations(sessionKey, scopeHint);
66238
- }
66239
- cancelPendingObserveExtractions(sessionKey, principal, namespace, scopeHint, reason) {
66240
- this.accessObserveWriteSurface.cancelPendingObserveExtractions(sessionKey, principal, namespace, scopeHint, reason);
66241
- }
66242
66212
  async lcmCompactionRecord(request) {
66243
66213
  if (!request.sessionKey || typeof request.sessionKey !== "string" || request.sessionKey.trim().length === 0) {
66244
66214
  throw new EngramAccessInputError("sessionKey is required and must be a non-empty string");
@@ -68085,4 +68055,4 @@ export {
68085
68055
  EngramAccessService,
68086
68056
  AccessAdminOpsSurface
68087
68057
  };
68088
- //# sourceMappingURL=chunk-L2DYRQQH.js.map
68058
+ //# sourceMappingURL=chunk-ABPOW3SX.js.map