@cortexkit/opencode-magic-context 0.49.48 → 0.49.49

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 (153) hide show
  1. package/dist/{announcement-g789dmt6.js → announcement-9pr71hd5.js} +3 -2
  2. package/dist/auto-search-worker.js +5 -5
  3. package/dist/chunk-embedding-write-worker.js +14 -15
  4. package/dist/{compaction-marker-candidates-dkfp1q9j.js → compaction-marker-candidates-8hazqfvj.js} +2 -3
  5. package/dist/compaction-marker-candidates-worker.js +1 -1
  6. package/dist/{compartment-chunk-embedding-snj51nmg.js → compartment-chunk-embedding-gfd093f8.js} +7 -8
  7. package/dist/{conflict-warning-hook-w1aw6w5t.js → conflict-warning-hook-56qpq7ws.js} +7 -8
  8. package/dist/{context-8r125qv3.js → context-bwf57gnh.js} +41 -43
  9. package/dist/{derive-budgets-nkw09vq7.js → derive-budgets-z53424qx.js} +2 -3
  10. package/dist/{embedding-backfill-kpy5shsa.js → embedding-backfill-d9x9q2e2.js} +12 -13
  11. package/dist/embedding-worker-process.js +2 -3
  12. package/dist/embedding-worker.js +5 -6
  13. package/dist/features/magic-context/dreamer/docs-proposals.d.ts.map +1 -1
  14. package/dist/{history-owner-0z620wgz.js → history-owner-n50e0e8y.js} +2 -3
  15. package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
  16. package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -1
  17. package/dist/hooks/magic-context/protected-tail-boundary.d.ts +5 -3
  18. package/dist/hooks/magic-context/protected-tail-boundary.d.ts.map +1 -1
  19. package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
  20. package/dist/hooks/magic-context/transform.d.ts.map +1 -1
  21. package/dist/{index-txs8tce6.js → index-0k283v27.js} +2 -4
  22. package/dist/{index-s79g172v.js → index-0mdh2cke.js} +10 -10
  23. package/dist/{index-ak11t3gm.js → index-0tz2fzpq.js} +1 -1
  24. package/dist/{index-2qbtqg1w.js → index-25tm250q.js} +1 -1
  25. package/dist/{index-h9m41624.js → index-2ny9xwdn.js} +2 -2
  26. package/dist/{index-xa9mmq6c.js → index-36wseasx.js} +1 -1
  27. package/dist/{index-sd2s4t4p.js → index-3n9ee4jh.js} +2 -2
  28. package/dist/{index-vk6srk5r.js → index-5850zme4.js} +3 -3
  29. package/dist/{index-qsyx931k.js → index-5bksfv58.js} +13 -15
  30. package/dist/{index-cgzpbz78.js → index-7n2n3v92.js} +5 -5
  31. package/dist/{index-jrfre9ah.js → index-82dfe8en.js} +146 -5
  32. package/dist/{index-gn6gfz4y.js → index-90z05d0p.js} +1 -1
  33. package/dist/{index-9wnbnx8f.js → index-a6aqpfp6.js} +1 -1
  34. package/dist/{index-q6pjqm49.js → index-agfh931z.js} +11 -13
  35. package/dist/{index-d4qw2h43.js → index-arxg51bj.js} +4 -4
  36. package/dist/{index-4wpfbzks.js → index-bkg4hdyh.js} +3 -3
  37. package/dist/{index-gp3kcpc4.js → index-cd3vp8xa.js} +1 -1
  38. package/dist/{index-cgsmttyj.js → index-cs7pmwt6.js} +4 -4
  39. package/dist/{index-brj6was5.js → index-em92bp7f.js} +2 -2
  40. package/dist/{index-2p37txes.js → index-ga5q492k.js} +1 -1
  41. package/dist/{index-8cfnaagj.js → index-gapnh6tk.js} +2 -4
  42. package/dist/{index-fw42ms3m.js → index-gz001bx7.js} +1 -1
  43. package/dist/{index-t6s0tsp7.js → index-h3p558ec.js} +3 -3
  44. package/dist/{index-qcz1fy7h.js → index-hexdee98.js} +4 -4
  45. package/dist/{index-smtbdmc3.js → index-hsv31e69.js} +2 -2
  46. package/dist/{index-dj2p8653.js → index-hsyczpn7.js} +2 -2
  47. package/dist/{index-q41sm60t.js → index-j7verehm.js} +71 -54
  48. package/dist/{index-fgft4qjn.js → index-jedbxq6n.js} +4 -4
  49. package/dist/{index-xh3jyejb.js → index-k47v0tmk.js} +16 -18
  50. package/dist/{index-1hwn96x1.js → index-kn1bx21r.js} +3 -3
  51. package/dist/{index-nj360hcs.js → index-pb8ysnq2.js} +4 -4
  52. package/dist/{index-rvmhyk89.js → index-qb75tv9j.js} +8 -8
  53. package/dist/{index-jz5bk7xd.js → index-qperbvjn.js} +2 -2
  54. package/dist/{index-25ka1jza.js → index-r9agn061.js} +4 -4
  55. package/dist/{index-hacf2tyx.js → index-reyws9fy.js} +1 -1
  56. package/dist/{index-fxbk7gk3.js → index-tad3can2.js} +1 -1
  57. package/dist/{index-hkh8x221.js → index-tj5gz396.js} +3 -5
  58. package/dist/{index-zetm0ayn.js → index-va9x7y48.js} +35 -31
  59. package/dist/{index-8ka0ne8t.js → index-vbmh68fb.js} +6 -6
  60. package/dist/{index-ta87fpfs.js → index-vyv4tame.js} +12 -14
  61. package/dist/{index-trkxkgmd.js → index-wdmfnmv1.js} +5 -5
  62. package/dist/index.js +53 -55
  63. package/dist/{logger-qwnbcfj9.js → logger-sw7z6sjz.js} +1 -2
  64. package/dist/{message-fts-rowid-map-msffhkve.js → message-fts-rowid-map-kx1bsdyg.js} +4 -5
  65. package/dist/{message-index-bounded-0q7sy04w.js → message-index-bounded-2shxmht9.js} +11 -12
  66. package/dist/{message-time-backfill-39bm498k.js → message-time-backfill-hp2jgn49.js} +2 -3
  67. package/dist/migration-worker.js +12 -13
  68. package/dist/{project-embedding-registry-r6xfsrbe.js → project-embedding-registry-nzgkq61z.js} +11 -12
  69. package/dist/raw-ordinal-warmup-worker.js +8 -8
  70. package/dist/{read-session-chunk-7fmg9p5m.js → read-session-chunk-c15y8yg6.js} +9 -10
  71. package/dist/{read-session-raw-x7a9b3jm.js → read-session-raw-04ger9zt.js} +2 -3
  72. package/dist/{recomp-orchestrator-jqa5z4ar.js → recomp-orchestrator-gfxqqpph.js} +30 -31
  73. package/dist/{render-mnqc74ar.js → render-5tx8r0me.js} +20 -21
  74. package/dist/{safe-notification-target-wztd7bgk.js → safe-notification-target-mx5khyxf.js} +2 -3
  75. package/dist/{search-archive-df09r8qn.js → search-archive-6tgh88xp.js} +11 -12
  76. package/dist/{search-kt764afk.js → search-k2n5bvsk.js} +23 -24
  77. package/dist/{send-session-notification-j93pn2hn.js → send-session-notification-gamjee2f.js} +5 -6
  78. package/dist/shared/data-path.d.ts +7 -13
  79. package/dist/shared/data-path.d.ts.map +1 -1
  80. package/dist/{storage-tags-96vyd6ra.js → storage-tags-kdb4qsyq.js} +4 -5
  81. package/dist/{transform-postprocess-phase-a7ety10n.js → transform-postprocess-phase-36dw4kxb.js} +31 -32
  82. package/dist/v2/auto-search-worker.js +5 -5
  83. package/dist/v2/chunk-embedding-write-worker.js +14 -14
  84. package/dist/v2/{compaction-marker-candidates-y737qb1v.js → compaction-marker-candidates-re14353a.js} +2 -2
  85. package/dist/v2/compaction-marker-candidates-worker.js +1 -1
  86. package/dist/v2/{compartment-chunk-embedding-nj5nrnbj.js → compartment-chunk-embedding-0pxsrzrt.js} +7 -7
  87. package/dist/v2/{context-9x7mnb7x.js → context-td3jyze3.js} +68 -49
  88. package/dist/v2/{derive-budgets-b5cgrtp8.js → derive-budgets-w0815q82.js} +3 -3
  89. package/dist/v2/{embedding-backfill-360efh1t.js → embedding-backfill-5dqdm3ff.js} +12 -12
  90. package/dist/v2/embedding-worker-process.js +1 -1
  91. package/dist/v2/embedding-worker.js +4 -4
  92. package/dist/v2/{history-owner-fpka43cn.js → history-owner-ep91wgqj.js} +2 -2
  93. package/dist/v2/{logger-4cj6d03m.js → logger-xnscpj6w.js} +1 -1
  94. package/dist/v2/{message-fts-rowid-map-qe7cpksd.js → message-fts-rowid-map-57jh6xpb.js} +4 -4
  95. package/dist/v2/{message-index-bounded-hctgp22r.js → message-index-bounded-j1jskn8a.js} +11 -11
  96. package/dist/v2/{message-time-backfill-0c4h7sg6.js → message-time-backfill-baxebka0.js} +2 -2
  97. package/dist/v2/migration-worker.js +11 -11
  98. package/dist/v2/{project-embedding-registry-ek0cy0d5.js → project-embedding-registry-swm4mw1t.js} +11 -11
  99. package/dist/v2/raw-ordinal-warmup-worker.js +8 -8
  100. package/dist/v2/{read-session-chunk-zknadvjr.js → read-session-chunk-carzw3m8.js} +9 -9
  101. package/dist/v2/{read-session-raw-yss2ev98.js → read-session-raw-3e482h3c.js} +2 -2
  102. package/dist/v2/{recomp-orchestrator-m5w0eqke.js → recomp-orchestrator-e7vrs932.js} +31 -31
  103. package/dist/v2/{render-89asy54r.js → render-e9mh9y1d.js} +20 -20
  104. package/dist/v2/{safe-notification-target-gphhast7.js → safe-notification-target-9r79xnbt.js} +2 -2
  105. package/dist/v2/{search-archive-axz2gbdb.js → search-archive-j3kb9ggd.js} +11 -11
  106. package/dist/v2/{search-kdtja5rx.js → search-sr23g316.js} +22 -22
  107. package/dist/v2/{send-session-notification-na3q825m.js → send-session-notification-95p89k7q.js} +5 -5
  108. package/dist/v2/{server-pej5rnye.js → server-0qxb8r8q.js} +2 -2
  109. package/dist/v2/{server-sg2qjkrb.js → server-1ppcpsdw.js} +2 -2
  110. package/dist/v2/{server-nn4hbymt.js → server-2qxt6qv0.js} +8 -8
  111. package/dist/v2/{server-7vb38e51.js → server-3jc6qmdz.js} +1 -1
  112. package/dist/v2/{server-69m30b21.js → server-3yk44ddz.js} +1 -1
  113. package/dist/v2/{server-z3tyd1mx.js → server-4y2pcckw.js} +3 -3
  114. package/dist/v2/{server-3schkz95.js → server-58h6rrnx.js} +4 -4
  115. package/dist/v2/{server-af1rmkyn.js → server-5kgesxck.js} +2 -2
  116. package/dist/v2/{server-mfn1yf9d.js → server-7vrtk78d.js} +1 -1
  117. package/dist/v2/{server-f0j864ma.js → server-91gb0vh8.js} +1 -1
  118. package/dist/v2/{server-131h608x.js → server-966dq3pd.js} +2 -2
  119. package/dist/v2/{server-jb6tjyeb.js → server-bb6kf05j.js} +23 -20
  120. package/dist/v2/{server-e3m10ds0.js → server-c5kq8d5n.js} +4 -4
  121. package/dist/v2/{server-gwxys0d0.js → server-c8z2grq0.js} +1 -1
  122. package/dist/v2/{server-4x7n5qz7.js → server-e14c3hd6.js} +10 -10
  123. package/dist/v2/{server-jra7awr5.js → server-e20kfytm.js} +11 -11
  124. package/dist/v2/{server-2gjqhmn9.js → server-fw49gc57.js} +8 -8
  125. package/dist/v2/{server-y8n33d9j.js → server-g61hgy1y.js} +4 -4
  126. package/dist/v2/{server-2j87594q.js → server-kgq2e2hh.js} +2 -2
  127. package/dist/v2/{server-ddw42d76.js → server-mxsy9h1d.js} +2 -2
  128. package/dist/v2/{server-qmmkhz2z.js → server-np27dgyt.js} +1 -1
  129. package/dist/v2/{server-dcws5831.js → server-qp5sj6n5.js} +2 -2
  130. package/dist/v2/{server-sr8tf5dt.js → server-r7y35vm9.js} +4 -4
  131. package/dist/v2/{server-7be0ersd.js → server-rcchadw0.js} +3 -3
  132. package/dist/v2/{server-b3r080cm.js → server-rz5jnhnv.js} +1 -1
  133. package/dist/v2/{server-zt1m5rwj.js → server-sa1fdt41.js} +1 -1
  134. package/dist/v2/{server-jqn7q7tm.js → server-t5cgb15n.js} +5 -5
  135. package/dist/v2/{server-ypf1ap0v.js → server-t8n27rbt.js} +1 -1
  136. package/dist/v2/{server-sefxj8k1.js → server-tmf0ayqp.js} +1 -1
  137. package/dist/v2/{server-wa4qhryh.js → server-ttrrh27h.js} +2 -2
  138. package/dist/v2/{server-bez34e60.js → server-vqq3g1t7.js} +4 -4
  139. package/dist/v2/{server-tpt7bwq8.js → server-ww7xbxxf.js} +1 -1
  140. package/dist/v2/{server-zahgxer8.js → server-y7q8cds3.js} +3 -3
  141. package/dist/v2/{server-27kccwe7.js → server-yxe0gh3v.js} +11 -11
  142. package/dist/v2/{server-yyqmvbvv.js → server-z7n3n1ra.js} +34 -28
  143. package/dist/v2/server.js +5 -5
  144. package/dist/v2/{storage-tags-xq8hjqkf.js → storage-tags-rzv7y0n3.js} +4 -4
  145. package/dist/v2/{v2-archive-reader-ky1wqcws.js → v2-archive-reader-jnzjavzr.js} +1 -1
  146. package/dist/v2/{wrapup-orchestrator-6wt67saz.js → wrapup-orchestrator-jw4nre49.js} +31 -31
  147. package/dist/{v2-archive-reader-665x2x4d.js → v2-archive-reader-b76tfeje.js} +1 -1
  148. package/dist/wrapup-orchestrator-fhfazjkq.js +55 -0
  149. package/package.json +1 -1
  150. package/src/shared/data-path.test.ts +104 -56
  151. package/src/shared/data-path.ts +30 -30
  152. package/dist/index-g2q4htwp.js +0 -146
  153. package/dist/wrapup-orchestrator-7kmb3jf9.js +0 -56
@@ -7,7 +7,7 @@ import {
7
7
  getTemporalDecisions,
8
8
  freezeTemporalDecisions,
9
9
  stableStringify
10
- } from "./index-9wnbnx8f.js";
10
+ } from "./index-a6aqpfp6.js";
11
11
  import {
12
12
  protectedToolTagNumbers,
13
13
  stripPersistedAssistantText,
@@ -74,19 +74,17 @@ import {
74
74
  adoptNullOwnerToolTag2,
75
75
  getCandidateToolOwners2,
76
76
  pickNearestPriorOwner2
77
- } from "./index-4wpfbzks.js";
77
+ } from "./index-bkg4hdyh.js";
78
78
  import {
79
79
  textMentionsRecentCommit,
80
80
  hasMeaningfulUserText2,
81
81
  estimateTokens
82
- } from "./index-ak11t3gm.js";
83
- import {
84
- getMagicContextStorageDir
85
- } from "./index-g2q4htwp.js";
82
+ } from "./index-0tz2fzpq.js";
86
83
  import {
84
+ getMagicContextStorageDir,
87
85
  log2,
88
86
  sessionLog2
89
- } from "./index-jrfre9ah.js";
87
+ } from "./index-82dfe8en.js";
90
88
  import {
91
89
  inRootAsyncContext2,
92
90
  getTagIdentityWriteGeneration2,
@@ -102,7 +100,7 @@ import {
102
100
  } from "./index-1d042x6w.js";
103
101
  import {
104
102
  runSessionWarmupWorker
105
- } from "./index-xa9mmq6c.js";
103
+ } from "./index-36wseasx.js";
106
104
  import {
107
105
  getMaxM0MutationId,
108
106
  getLastCompartmentEndMessage,
@@ -121,11 +119,11 @@ import {
121
119
  saveSourceContent,
122
120
  replaceSourceContent,
123
121
  getSourceContents
124
- } from "./index-ta87fpfs.js";
122
+ } from "./index-vyv4tame.js";
125
123
  import {
126
124
  cleanSearchText,
127
125
  matchedSearchSnippet
128
- } from "./index-fgft4qjn.js";
126
+ } from "./index-jedbxq6n.js";
129
127
  import {
130
128
  stripSystemInjection,
131
129
  isTextPart,
@@ -223,7 +221,7 @@ import {
223
221
  extractToolCallObservation,
224
222
  ToolMutationBatch,
225
223
  createToolDropTarget
226
- } from "./index-rvmhyk89.js";
224
+ } from "./index-qb75tv9j.js";
227
225
  import {
228
226
  isValidLanguageCode
229
227
  } from "./index-4dpvnp8k.js";
@@ -231,7 +229,7 @@ import {
231
229
  getProjectEmbeddingSnapshot2,
232
230
  embedTextForProject2,
233
231
  embedBatchForProject2
234
- } from "./index-s79g172v.js";
232
+ } from "./index-0mdh2cke.js";
235
233
  import {
236
234
  isEmbeddingHostBusy2
237
235
  } from "./index-qt1qqasc.js";
@@ -239,15 +237,15 @@ import {
239
237
  getMessageIndexEpoch,
240
238
  isMessageIndexSearchable,
241
239
  createAutoSearchDiagnostics
242
- } from "./index-cgsmttyj.js";
240
+ } from "./index-cs7pmwt6.js";
243
241
  import {
244
242
  openCodeDbExists,
245
243
  withReadOnlySessionDb,
246
244
  getMessageTimesFromOpenCodeDb
247
- } from "./index-brj6was5.js";
245
+ } from "./index-em92bp7f.js";
248
246
  import {
249
247
  BoundedSessionMap
250
- } from "./index-smtbdmc3.js";
248
+ } from "./index-hsv31e69.js";
251
249
  import {
252
250
  compareOpenCodeMessagesByCanonicalOrder,
253
251
  startCompactionMarkerCandidatePreparation,
@@ -268,10 +266,10 @@ import {
268
266
  peekNoteNudgeText,
269
267
  markNoteNudgeDelivered,
270
268
  getActiveCompartmentRun
271
- } from "./index-zetm0ayn.js";
269
+ } from "./index-va9x7y48.js";
272
270
  import {
273
271
  userFacingFailureCode
274
- } from "./index-sd2s4t4p.js";
272
+ } from "./index-3n9ee4jh.js";
275
273
  import {
276
274
  normalizeProtectedToolName,
277
275
  mergeProtectedTools
@@ -281,7 +279,7 @@ import {
281
279
  } from "./index-y8v6yerm.js";
282
280
  import {
283
281
  logSlowWriteTransaction
284
- } from "./index-fxbk7gk3.js";
282
+ } from "./index-tad3can2.js";
285
283
 
286
284
  // src/features/magic-context/tagger.ts
287
285
  var TOOL_COMPOSITE_KEY_SEP = "\x00";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  importPluginModule,
3
3
  log2
4
- } from "./index-jrfre9ah.js";
4
+ } from "./index-82dfe8en.js";
5
5
  import {
6
6
  sendStatusNotification2
7
- } from "./index-25ka1jza.js";
7
+ } from "./index-r9agn061.js";
8
8
  import {
9
9
  formatConflictShort
10
- } from "./index-hacf2tyx.js";
10
+ } from "./index-reyws9fy.js";
11
11
 
12
12
  // src/plugin/conflict-warning-hook.ts
13
13
  import { existsSync, readFileSync } from "node:fs";
@@ -3,12 +3,12 @@ import {
3
3
  } from "./index-fr0wbhdn.js";
4
4
  import {
5
5
  log2
6
- } from "./index-jrfre9ah.js";
6
+ } from "./index-82dfe8en.js";
7
7
  import {
8
8
  ensureColumn,
9
9
  healAllNullColumns,
10
10
  installV95PerfSchema
11
- } from "./index-9wnbnx8f.js";
11
+ } from "./index-a6aqpfp6.js";
12
12
  import {
13
13
  resolveOpenCodeDbPath,
14
14
  openCodeDbPathExists,
@@ -20,10 +20,10 @@ import {
20
20
  import {
21
21
  normalizeStoredProjectPath,
22
22
  storedPathBelongsToIdentity
23
- } from "./index-txs8tce6.js";
23
+ } from "./index-0k283v27.js";
24
24
  import {
25
25
  logSlowWriteTransaction
26
- } from "./index-fxbk7gk3.js";
26
+ } from "./index-tad3can2.js";
27
27
 
28
28
  // src/features/magic-context/lkg-prefix-chunks.ts
29
29
  import { createHash } from "node:crypto";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./index-pavzsdc6.js";
4
4
  import {
5
5
  sessionLog2
6
- } from "./index-jrfre9ah.js";
6
+ } from "./index-82dfe8en.js";
7
7
  import {
8
8
  UNKNOWN_FIT_RATIO,
9
9
  resolveDecisionCalibration,
@@ -24,7 +24,7 @@ import {
24
24
  TAG_SELECT_COLUMNS2,
25
25
  getCandidateToolOwners2,
26
26
  pickNearestPriorOwner2
27
- } from "./index-4wpfbzks.js";
27
+ } from "./index-bkg4hdyh.js";
28
28
  import {
29
29
  OMO_INTERNAL_INITIATOR_MARKER,
30
30
  isSystemDirective,
@@ -42,13 +42,13 @@ import {
42
42
  formatBlock,
43
43
  compactTextForSummary,
44
44
  mergeCommitHashes
45
- } from "./index-ak11t3gm.js";
45
+ } from "./index-0tz2fzpq.js";
46
46
  import {
47
47
  prepareCachedStatement2
48
48
  } from "./index-gzy5w8ya.js";
49
49
  import {
50
50
  stableStringify
51
- } from "./index-9wnbnx8f.js";
51
+ } from "./index-a6aqpfp6.js";
52
52
  import {
53
53
  renderToolTemplate,
54
54
  resolveModelConfigValue,
@@ -70,18 +70,18 @@ import {
70
70
  readRawSeedTailFromDb2,
71
71
  readRawSessionBoundaryEndpointsFromDb2,
72
72
  prewarmRawSessionOrdinalsForDb
73
- } from "./index-xa9mmq6c.js";
73
+ } from "./index-36wseasx.js";
74
74
  import {
75
75
  openCodeDbExists,
76
76
  withReadOnlySessionDb,
77
77
  getRawSessionMessageCountFromDb,
78
78
  getMessageTimesFromOpenCodeDb
79
- } from "./index-brj6was5.js";
79
+ } from "./index-em92bp7f.js";
80
80
  import {
81
81
  getToolDefinitionMeasurementSignature,
82
82
  getMeasuredToolDefinitionTokens,
83
83
  getSessionToolDefinitionTokens
84
- } from "./index-smtbdmc3.js";
84
+ } from "./index-hsv31e69.js";
85
85
  import {
86
86
  markHostUnservedRow,
87
87
  isHostUnservedRow
@@ -92,7 +92,7 @@ import {
92
92
  } from "./index-avwt563y.js";
93
93
  import {
94
94
  logSlowWriteTransaction
95
- } from "./index-fxbk7gk3.js";
95
+ } from "./index-tad3can2.js";
96
96
 
97
97
  // src/shared/hidden-zen-read.ts
98
98
  function isToolFreeHiddenAgent(agent) {
@@ -3,10 +3,10 @@ import {
3
3
  } from "./index-pavzsdc6.js";
4
4
  import {
5
5
  isUserHomeDirectory
6
- } from "./index-txs8tce6.js";
6
+ } from "./index-0k283v27.js";
7
7
  import {
8
8
  logSlowWriteTransaction
9
- } from "./index-fxbk7gk3.js";
9
+ } from "./index-tad3can2.js";
10
10
 
11
11
  // src/features/magic-context/session-project-storage.ts
12
12
  var SESSION_CHUNK_REPAIR_BATCH_SIZE = 100;
@@ -4,13 +4,13 @@ import {
4
4
  import {
5
5
  importPluginModule,
6
6
  sessionLog2
7
- } from "./index-jrfre9ah.js";
7
+ } from "./index-82dfe8en.js";
8
8
  import {
9
9
  isDefaultSessionTitle2
10
- } from "./index-fw42ms3m.js";
10
+ } from "./index-gz001bx7.js";
11
11
  import {
12
12
  shouldHoldIgnoredNotification
13
- } from "./index-brj6was5.js";
13
+ } from "./index-em92bp7f.js";
14
14
  import {
15
15
  getErrorMessage
16
16
  } from "./index-y8v6yerm.js";
@@ -142,7 +142,7 @@ async function sendIgnoredMessageNow(client, sessionId, text, params, forcePersi
142
142
  holdIgnoredNotification({ client, sessionId, text, params, forcePersist }, "during target checks");
143
143
  return "queued";
144
144
  }
145
- const { waitForSafeNotificationTarget } = await importPluginModule(() => import("./safe-notification-target-wztd7bgk.js"));
145
+ const { waitForSafeNotificationTarget } = await importPluginModule(() => import("./safe-notification-target-mx5khyxf.js"));
146
146
  if (await waitForSafeNotificationTarget(client, sessionId) === "skip") {
147
147
  sessionLog2(sessionId, "notification skipped (session not titled yet)");
148
148
  return "skipped";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./index-sd3egckz.js";
4
4
  import {
5
5
  log2
6
- } from "./index-jrfre9ah.js";
6
+ } from "./index-82dfe8en.js";
7
7
 
8
8
  // src/shared/conflict-detector.ts
9
9
  import { homedir as homedir2 } from "node:os";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  log2
3
- } from "./index-jrfre9ah.js";
3
+ } from "./index-82dfe8en.js";
4
4
 
5
5
  // src/shared/write-transaction-timing.ts
6
6
  var SLOW_WRITE_TRANSACTION_THRESHOLD_MS = 1000;
@@ -3,17 +3,15 @@ import {
3
3
  } from "./index-4dpvnp8k.js";
4
4
  import {
5
5
  getSynapseLaneIdentity
6
- } from "./index-dj2p8653.js";
6
+ } from "./index-hsyczpn7.js";
7
7
  import {
8
8
  getHarness2
9
9
  } from "./index-pavzsdc6.js";
10
10
  import {
11
- getMagicContextStorageDir
12
- } from "./index-g2q4htwp.js";
13
- import {
11
+ getMagicContextStorageDir,
14
12
  importPluginModule,
15
13
  log2
16
- } from "./index-jrfre9ah.js";
14
+ } from "./index-82dfe8en.js";
17
15
  import {
18
16
  inRootAsyncContext2
19
17
  } from "./index-gzy5w8ya.js";
@@ -72,22 +72,20 @@ import {
72
72
  getRawSessionTagKeysThrough2,
73
73
  getLegacyProtectedTailStartOrdinal2,
74
74
  readSessionChunk2
75
- } from "./index-rvmhyk89.js";
75
+ } from "./index-qb75tv9j.js";
76
76
  import {
77
77
  getHarness2,
78
78
  harnessOwnsOpenCodeStore2
79
79
  } from "./index-pavzsdc6.js";
80
80
  import {
81
81
  ensureCortexKitArtifactGitignore,
82
- getProjectMagicContextHistorianDir
83
- } from "./index-g2q4htwp.js";
82
+ getProjectMagicContextHistorianDir,
83
+ log2,
84
+ sessionLog2
85
+ } from "./index-82dfe8en.js";
84
86
  import {
85
87
  sanitizeDiagnosticText
86
88
  } from "./index-z4p0ry94.js";
87
- import {
88
- log2,
89
- sessionLog2
90
- } from "./index-jrfre9ah.js";
91
89
  import {
92
90
  createScanner,
93
91
  parseTree,
@@ -110,7 +108,7 @@ import {
110
108
  deriveTriggerBudget2,
111
109
  resolveHistorianProducerLimits2,
112
110
  producerSourceLocalBudget2
113
- } from "./index-8cfnaagj.js";
111
+ } from "./index-gapnh6tk.js";
114
112
  import {
115
113
  withContentLanguageDirective,
116
114
  buildPrimaryLanguageDirective,
@@ -133,7 +131,7 @@ import {
133
131
  hasMeaningfulUserText2,
134
132
  estimateTokens,
135
133
  estimateFixedPromptTokens
136
- } from "./index-ak11t3gm.js";
134
+ } from "./index-0tz2fzpq.js";
137
135
  import {
138
136
  FAIL_CLOSED_DOCTOR_COMMAND
139
137
  } from "./index-wh9fxds5.js";
@@ -147,13 +145,13 @@ import {
147
145
  import {
148
146
  shouldSkipHomeProjectMemory,
149
147
  resolveProjectIdentity
150
- } from "./index-txs8tce6.js";
148
+ } from "./index-0k283v27.js";
151
149
  import {
152
150
  getSchemaFenceRejection,
153
151
  LATEST_SUPPORTED_VERSION,
154
152
  getPersistedSchemaVersion,
155
153
  openDatabase
156
- } from "./index-q6pjqm49.js";
154
+ } from "./index-agfh931z.js";
157
155
  import {
158
156
  areRustHistorianSyntheticParts2,
159
157
  isStrictGapHealingMessage2,
@@ -161,7 +159,7 @@ import {
161
159
  RawOrdinalsNotReady2,
162
160
  dropRawSessionOrdinalCheckpoints2,
163
161
  runSessionWarmupWorker
164
- } from "./index-xa9mmq6c.js";
162
+ } from "./index-36wseasx.js";
165
163
  import {
166
164
  parseCompartmentOutput,
167
165
  resolveWorkspaceShareCategories,
@@ -170,7 +168,7 @@ import {
170
168
  resolveStoredPathWorkspaceIdentity,
171
169
  sourceNameForMemory,
172
170
  computeWorkspaceEpochFingerprint
173
- } from "./index-nj360hcs.js";
171
+ } from "./index-pb8ysnq2.js";
174
172
  import {
175
173
  V2_MEMORY_CATEGORIES,
176
174
  CATEGORY_PRIORITY,
@@ -184,7 +182,7 @@ import {
184
182
  } from "./index-58e3y90n.js";
185
183
  import {
186
184
  BoundedSessionMap
187
- } from "./index-smtbdmc3.js";
185
+ } from "./index-hsv31e69.js";
188
186
  import {
189
187
  invalidateAutoEmbedSession
190
188
  } from "./index-2amn2s73.js";
@@ -197,7 +195,7 @@ import {
197
195
  replaceCompartmentChunkEmbeddings2,
198
196
  deleteChunkEmbedBackoffForSession2,
199
197
  chunkWindowSourceKey2
200
- } from "./index-qcz1fy7h.js";
198
+ } from "./index-hexdee98.js";
201
199
  import {
202
200
  COMPARTMENT_LEASE_RENEWAL_MS,
203
201
  getCompartmentLeaseBlocker,
@@ -239,14 +237,14 @@ import {
239
237
  getProjectState,
240
238
  recordSubagentInvocation,
241
239
  getLatestHistorianInvocationId
242
- } from "./index-ta87fpfs.js";
240
+ } from "./index-vyv4tame.js";
243
241
  import {
244
242
  clearCompressionDepth,
245
243
  clearCompressionDepthRange,
246
244
  toMessageIndexSource,
247
245
  clearIndexedMessagesInTransaction,
248
246
  indexSourcesAfterOrdinal
249
- } from "./index-fgft4qjn.js";
247
+ } from "./index-jedbxq6n.js";
250
248
  import {
251
249
  stripWellFormedLeadingTagPrefix,
252
250
  peelLeadingMcTagNotation,
@@ -257,17 +255,17 @@ import {
257
255
  foldShrunkPartTags2,
258
256
  getTagNumberByMessageId2,
259
257
  getActiveTagsBySession2
260
- } from "./index-4wpfbzks.js";
258
+ } from "./index-bkg4hdyh.js";
261
259
  import {
262
260
  openCodeDbExists,
263
261
  withReadOnlySessionDb,
264
262
  getMessageTimesFromOpenCodeDb
265
- } from "./index-brj6was5.js";
263
+ } from "./index-em92bp7f.js";
266
264
  import {
267
265
  getSessionNotes,
268
266
  getReadySmartNotes,
269
267
  insertPrimerCandidates
270
- } from "./index-2qbtqg1w.js";
268
+ } from "./index-25tm250q.js";
271
269
  import {
272
270
  pushNotification2
273
271
  } from "./index-x8a7jmkh.js";
@@ -285,13 +283,13 @@ import {
285
283
  getProjectChunkEmbeddingModelId2,
286
284
  getProjectEmbeddingMaxInputTokens2,
287
285
  embedItemsForProject2
288
- } from "./index-s79g172v.js";
286
+ } from "./index-0mdh2cke.js";
289
287
  import {
290
288
  renderUserFacingFailure,
291
289
  userFacingFailureCode,
292
290
  promoteSessionFactsDurable,
293
291
  embedPromotedFacts
294
- } from "./index-sd2s4t4p.js";
292
+ } from "./index-3n9ee4jh.js";
295
293
  import {
296
294
  isMarkerCandidateBasisCurrent2,
297
295
  invalidateMarkerCandidateBasis2,
@@ -302,10 +300,10 @@ import {
302
300
  certifiedMarkerReferenceFloor2,
303
301
  readMarkerReferenceRows2,
304
302
  readKnownMarkerReferenceRows2
305
- } from "./index-gn6gfz4y.js";
303
+ } from "./index-90z05d0p.js";
306
304
  import {
307
305
  sendStatusNotification2
308
- } from "./index-25ka1jza.js";
306
+ } from "./index-r9agn061.js";
309
307
  import {
310
308
  isCompactionEnabled,
311
309
  migrateLegacyAgentEnabledInMemory
@@ -329,7 +327,7 @@ import {
329
327
  import {
330
328
  logSlowWriteTransaction,
331
329
  WriteTransactionSteps
332
- } from "./index-fxbk7gk3.js";
330
+ } from "./index-tad3can2.js";
333
331
  import {
334
332
  ensureStorageDirectorySync,
335
333
  writeStorageFileAtomicSync
@@ -16302,10 +16300,6 @@ var FORCE80_MAX_CAP = 500000;
16302
16300
  var FORCE95_MAX_CAP = 750000;
16303
16301
  var NORMAL_HYSTERESIS_TOKENS = 256;
16304
16302
  var RECOVERY_NO_HEAD_LIMIT = 2;
16305
- var MIN_FORCE_ELIGIBLE_TOKENS_CAP = 1000;
16306
- function deriveMinForceEligibleTokens(scaledN) {
16307
- return Math.min(MIN_FORCE_ELIGIBLE_TOKENS_CAP, Math.max(1, Math.floor(scaledN / 8)));
16308
- }
16309
16303
  function clampPercentage(value) {
16310
16304
  if (!Number.isFinite(value))
16311
16305
  return 0;
@@ -16550,6 +16544,7 @@ function resolveProtectedTailBoundary(ctx) {
16550
16544
  priorBoundaryOrdinal: ctx.priorBoundaryOrdinal,
16551
16545
  migrationFloorActive: ctx.migrationFloorActive,
16552
16546
  emergencyTailScale: ctx.emergencyTailScale,
16547
+ recovery: ctx.recovery,
16553
16548
  providerShapeVersion: ctx.providerShapeVersion,
16554
16549
  cacheNamespace: ctx.cacheNamespace,
16555
16550
  createdAt,
@@ -16594,6 +16589,7 @@ function resolveProtectedTailBoundary(ctx) {
16594
16589
  priorBoundaryOrdinal: ctx.priorBoundaryOrdinal,
16595
16590
  migrationFloorActive: false,
16596
16591
  emergencyTailScale: ctx.emergencyTailScale,
16592
+ recovery: ctx.recovery,
16597
16593
  providerShapeVersion: ctx.providerShapeVersion,
16598
16594
  cacheNamespace: ctx.cacheNamespace,
16599
16595
  createdAt,
@@ -16709,6 +16705,7 @@ function resolveProtectedTailBoundary(ctx) {
16709
16705
  priorBoundaryOrdinal: ctx.priorBoundaryOrdinal,
16710
16706
  migrationFloorActive: ctx.migrationFloorActive,
16711
16707
  emergencyTailScale: ctx.emergencyTailScale,
16708
+ recovery: ctx.recovery,
16712
16709
  liftLivePromptFloor: ctx.liftLivePromptFloor === true ? true : undefined,
16713
16710
  providerShapeVersion: ctx.providerShapeVersion,
16714
16711
  cacheNamespace: ctx.cacheNamespace,
@@ -16787,6 +16784,7 @@ function resolveBoundaryContext(args) {
16787
16784
  protectedTailPolicyVersion: meta.protectedTailPolicyVersion,
16788
16785
  migrationFloorActive,
16789
16786
  emergencyTailScale: args.emergencyTailScale,
16787
+ recovery: args.recovery,
16790
16788
  liftLivePromptFloor: args.liftLivePromptFloor,
16791
16789
  providerShapeVersion: args.providerShapeVersion ?? "opencode-v1",
16792
16790
  cacheNamespace: args.cacheNamespace ?? `opencode:${args.sessionId}`,
@@ -16967,9 +16965,11 @@ function hasRunnableCompartmentWindow(snapshot) {
16967
16965
  return false;
16968
16966
  if (snapshot.eligibleEndOrdinal <= snapshot.offset)
16969
16967
  return false;
16968
+ if (snapshot.recovery || snapshot.usagePercentage >= 95 || snapshot.mode === "manual-wrapup" || snapshot.mode === "manual-full-recomp")
16969
+ return true;
16970
16970
  const forceMaterializationPercentage = escalationBands(snapshot.executeThresholdPercentage).forceMaterializationPercentage;
16971
16971
  if (snapshot.usagePercentage >= forceMaterializationPercentage || snapshot.emergencyTailScale) {
16972
- return snapshot.trueRawEligibleTokens >= deriveMinForceEligibleTokens(snapshot.N) || snapshot.eligibleEndOrdinal > snapshot.offset;
16972
+ return snapshot.summaryRemovedEligibleTokens >= snapshot.contextLimit * 0.02;
16973
16973
  }
16974
16974
  return snapshot.eligibleEndOrdinal > snapshot.offset;
16975
16975
  }
@@ -17431,7 +17431,7 @@ async function runCompartmentAgent(deps) {
17431
17431
  return;
17432
17432
  }
17433
17433
  if (!validation.ok && validation.reason === "stale_snapshot") {
17434
- const refreshed = deps.refreshBoundarySnapshot ? deps.refreshBoundarySnapshot(boundarySnapshot, validation) : resolveOpenCodeProtectedTailBoundary({
17434
+ const refreshedBoundary = deps.refreshBoundarySnapshot ? deps.refreshBoundarySnapshot(boundarySnapshot, validation) : resolveOpenCodeProtectedTailBoundary({
17435
17435
  db,
17436
17436
  sessionId,
17437
17437
  mode: "incremental-runner",
@@ -17445,6 +17445,10 @@ async function runCompartmentAgent(deps) {
17445
17445
  emergencyTailScale: boundarySnapshot.emergencyTailScale,
17446
17446
  liftLivePromptFloor: boundarySnapshot.liftLivePromptFloor === true
17447
17447
  });
17448
+ const refreshed = refreshedBoundary ? {
17449
+ ...refreshedBoundary,
17450
+ recovery: boundarySnapshot.recovery || deps.forceDrainQuota
17451
+ } : null;
17448
17452
  if (refreshed && hasRunnableCompartmentWindow(refreshed)) {
17449
17453
  sessionLog2(sessionId, `historian: refreshed stale protected-tail snapshot at run time (was: ${validation.detail ?? "stale"}) — eligible head ${refreshed.offset}-${refreshed.eligibleEndOrdinal - 1}`);
17450
17454
  boundarySnapshot = refreshed;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sessionLog2
3
- } from "./index-jrfre9ah.js";
3
+ } from "./index-82dfe8en.js";
4
4
  import {
5
5
  COMPARTMENT_LEASE_RENEWAL_MS,
6
6
  acquireCompartmentLease,
@@ -8,7 +8,7 @@ import {
8
8
  releaseCompartmentLeaseBestEffort,
9
9
  getCompartments,
10
10
  getLastCompartmentEndMessage
11
- } from "./index-ta87fpfs.js";
11
+ } from "./index-vyv4tame.js";
12
12
  import {
13
13
  inRootAsyncContext2
14
14
  } from "./index-gzy5w8ya.js";
@@ -20,7 +20,7 @@ import {
20
20
  getHistorianFailureState,
21
21
  clearEmergencyRecovery,
22
22
  prepareRawSessionOrdinals2
23
- } from "./index-rvmhyk89.js";
23
+ } from "./index-qb75tv9j.js";
24
24
  import {
25
25
  pushNotification2
26
26
  } from "./index-x8a7jmkh.js";
@@ -32,14 +32,14 @@ import {
32
32
  getActiveCompartmentRun,
33
33
  markActiveCompartmentRunPublished,
34
34
  registerActiveCompartmentRun
35
- } from "./index-zetm0ayn.js";
35
+ } from "./index-va9x7y48.js";
36
36
  import {
37
37
  sendStatusNotification2
38
- } from "./index-25ka1jza.js";
38
+ } from "./index-r9agn061.js";
39
39
  import {
40
40
  setRecompStarting2,
41
41
  setRecompTerminal2
42
- } from "./index-trkxkgmd.js";
42
+ } from "./index-wdmfnmv1.js";
43
43
 
44
44
  // src/hooks/magic-context/wrapup-orchestrator.ts
45
45
  import * as crypto from "node:crypto";
@@ -5,7 +5,7 @@ import {
5
5
  tagIdentityRevisionKey,
6
6
  deleteTagIdentityRevisions,
7
7
  getTableColumnNames
8
- } from "./index-9wnbnx8f.js";
8
+ } from "./index-a6aqpfp6.js";
9
9
  import {
10
10
  invalidateAutoEmbedSession,
11
11
  drainBackgroundBatches
@@ -15,12 +15,10 @@ import {
15
15
  } from "./index-pavzsdc6.js";
16
16
  import {
17
17
  getDataDir,
18
- getMagicContextStorageDir
19
- } from "./index-g2q4htwp.js";
20
- import {
18
+ getMagicContextStorageDir,
21
19
  log2,
22
20
  sessionLog2
23
- } from "./index-jrfre9ah.js";
21
+ } from "./index-82dfe8en.js";
24
22
  import {
25
23
  prepareCachedStatement2,
26
24
  withSqliteBackgroundWriter2,
@@ -28,14 +26,14 @@ import {
28
26
  } from "./index-gzy5w8ya.js";
29
27
  import {
30
28
  deleteUnmappedMessageFtsRows2
31
- } from "./index-h9m41624.js";
29
+ } from "./index-2ny9xwdn.js";
32
30
  import {
33
31
  deleteChunkEmbedBackoffForSession2
34
- } from "./index-qcz1fy7h.js";
32
+ } from "./index-hexdee98.js";
35
33
  import {
36
34
  isPidAlive,
37
35
  readProcessStartTime
38
- } from "./index-2p37txes.js";
36
+ } from "./index-ga5q492k.js";
39
37
  import {
40
38
  MERGED_REASONING_PARTS_PREFIX,
41
39
  decodeMergedReasoningParts,
@@ -63,23 +61,23 @@ import {
63
61
  serializeProcessedImageMarkers,
64
62
  getPendingPiCompactionMarkerState,
65
63
  logPiCompactionMarkerClear
66
- } from "./index-rvmhyk89.js";
64
+ } from "./index-qb75tv9j.js";
67
65
  import {
68
66
  stripTagPrefix,
69
67
  isRecord,
70
68
  providerVisibleMessage
71
- } from "./index-4wpfbzks.js";
69
+ } from "./index-bkg4hdyh.js";
72
70
  import {
73
71
  withReadOnlySessionDb
74
- } from "./index-brj6was5.js";
72
+ } from "./index-em92bp7f.js";
75
73
  import {
76
74
  BoundedSessionMap,
77
75
  getMeasuredToolDefinitionTokens
78
- } from "./index-smtbdmc3.js";
76
+ } from "./index-hsv31e69.js";
79
77
  import {
80
78
  layoutLkgPrefix,
81
79
  assembleLkgPrefix
82
- } from "./index-nj360hcs.js";
80
+ } from "./index-pb8ysnq2.js";
83
81
  import {
84
82
  gaDatabasePath2,
85
83
  V2StoreReader2
@@ -96,7 +94,7 @@ import {
96
94
  } from "./index-avwt563y.js";
97
95
  import {
98
96
  logSlowWriteTransaction
99
- } from "./index-fxbk7gk3.js";
97
+ } from "./index-tad3can2.js";
100
98
  import {
101
99
  ensurePrivateStorageDirectorySync,
102
100
  writeStorageFileSync,