@cortexkit/opencode-magic-context 0.49.52 → 0.49.54
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.
- package/dist/auto-search-worker.js +3 -3
- package/dist/chunk-embedding-write-worker.js +3 -4
- package/dist/{context-bkkd7br4.js → context-vx5gw5h2.js} +117 -80
- package/dist/{embedding-backfill-3wdjzrvs.js → embedding-backfill-2dvf3rcn.js} +4 -4
- package/dist/embedding-worker.js +2 -2
- package/dist/features/magic-context/compartment-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/message-fts-session-filter.d.ts +1 -1
- package/dist/features/magic-context/message-fts-session-filter.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts +8 -0
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/features/magic-context/storage-host-instruction-retention.d.ts +10 -3
- package/dist/features/magic-context/storage-host-instruction-retention.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +19 -0
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta.d.ts +1 -1
- package/dist/features/magic-context/storage-meta.d.ts.map +1 -1
- package/dist/features/magic-context/storage.d.ts +1 -1
- package/dist/features/magic-context/storage.d.ts.map +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/hooks/magic-context/active-anthropic-turn.d.ts +6 -0
- package/dist/hooks/magic-context/active-anthropic-turn.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts +2 -1
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -1
- package/dist/hooks/magic-context/emergency-drop.d.ts +75 -2
- package/dist/hooks/magic-context/emergency-drop.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts +14 -0
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -1
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts +12 -0
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/host-served-rows.d.ts +12 -2
- package/dist/hooks/magic-context/host-served-rows.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts +10 -0
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/latest-assistant-turn.d.ts +43 -0
- package/dist/hooks/magic-context/latest-assistant-turn.d.ts.map +1 -1
- package/dist/hooks/magic-context/latest-thinking-recovery.d.ts +102 -26
- package/dist/hooks/magic-context/latest-thinking-recovery.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-recovery-prefix.d.ts +18 -2
- package/dist/hooks/magic-context/lkg-recovery-prefix.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-slot.d.ts.map +1 -1
- package/dist/hooks/magic-context/pass-outcome.d.ts.map +1 -1
- package/dist/hooks/magic-context/pending-marker-rearm.d.ts +20 -0
- package/dist/hooks/magic-context/pending-marker-rearm.d.ts.map +1 -0
- package/dist/hooks/magic-context/priced-pass-sizing.d.ts +7 -0
- package/dist/hooks/magic-context/priced-pass-sizing.d.ts.map +1 -1
- package/dist/hooks/magic-context/routine-cleanup-decision.d.ts +11 -1
- package/dist/hooks/magic-context/routine-cleanup-decision.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/served-check.d.ts +127 -0
- package/dist/hooks/magic-context/served-check.d.ts.map +1 -0
- package/dist/hooks/magic-context/signed-thinking-hold.d.ts +32 -4
- package/dist/hooks/magic-context/signed-thinking-hold.d.ts.map +1 -1
- package/dist/hooks/magic-context/tool-drop-target.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +35 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/index-29ff546v.js +2747 -0
- package/dist/{index-8d7gkgjs.js → index-2vsd5064.js} +3 -3
- package/dist/{index-kaqs6h31.js → index-52x68mj4.js} +1 -1
- package/dist/{index-k2efzh9r.js → index-567xsm72.js} +7 -5
- package/dist/{index-q9m97m5g.js → index-5gqszjq9.js} +4 -4
- package/dist/{index-a4zmmhxs.js → index-5ptp2de1.js} +6 -8
- package/dist/{index-jjy5a5w0.js → index-6nqz8hsz.js} +16 -5
- package/dist/{index-a6aqpfp6.js → index-9mggb1nv.js} +403 -1
- package/dist/{index-kanfby7e.js → index-9n6mdfqy.js} +452 -442
- package/dist/{index-fxgaaptn.js → index-a3n2dczz.js} +8 -7
- package/dist/{index-g3j49m95.js → index-b6rdv8re.js} +1 -1
- package/dist/{index-qbda6a8k.js → index-by14cr73.js} +30 -19
- package/dist/{index-25tm250q.js → index-dhdv88e5.js} +1 -1
- package/dist/{index-4xpff2m1.js → index-eyr425dx.js} +820 -179
- package/dist/{index-x4h461yf.js → index-h62j8z2r.js} +1 -1
- package/dist/{index-xqhejxmd.js → index-pdh4tdcq.js} +1 -1
- package/dist/{index-9gs34125.js → index-sk6p6esd.js} +3777 -2544
- package/dist/{index-pb8ysnq2.js → index-sv5tn72j.js} +1 -1
- package/dist/{index-bamnjp2t.js → index-sx1sppd6.js} +11 -7
- package/dist/{index-x7jcqpy6.js → index-tx8nfw85.js} +539 -29
- package/dist/{index-42n4fhxy.js → index-xj5bap1r.js} +61 -54
- package/dist/{index-rbs27k1d.js → index-xstbytjn.js} +1 -1
- package/dist/{index-0jc25yjf.js → index-xvtjwhm6.js} +3 -3
- package/dist/{index-qtpkkzan.js → index-yamsmkmh.js} +4 -4
- package/dist/index.js +87 -68
- package/dist/{message-index-bounded-71b75npz.js → message-index-bounded-xav3h8qe.js} +5 -6
- package/dist/migration-worker.js +3 -4
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/messages-transform.d.ts +6 -0
- package/dist/plugin/messages-transform.d.ts.map +1 -1
- package/dist/{project-embedding-registry-5dwh5zfn.js → project-embedding-registry-f2azrq24.js} +5 -3
- package/dist/raw-ordinal-warmup-worker.js +4 -4
- package/dist/{read-session-chunk-bfv831yx.js → read-session-chunk-70aam2c1.js} +4 -5
- package/dist/{recomp-orchestrator-8gj1b7pz.js → recomp-orchestrator-wbm4kpq9.js} +15 -16
- package/dist/{render-b3zcz9x4.js → render-73vrt30h.js} +10 -11
- package/dist/{search-archive-dp9afcv1.js → search-archive-ew4c3bsw.js} +7 -8
- package/dist/{search-y3w590tn.js → search-jfwb4ms3.js} +14 -15
- package/dist/shared/test-open-files.d.ts +17 -0
- package/dist/shared/test-open-files.d.ts.map +1 -0
- package/dist/{storage-tags-kdb4qsyq.js → storage-tags-arnkn5t1.js} +4 -2
- package/dist/tools/ctx-expand/search-archive.d.ts.map +1 -1
- package/dist/{transform-postprocess-phase-8awze16a.js → transform-postprocess-phase-mt4dcbhd.js} +16 -17
- package/dist/v2/auto-search-worker.js +3 -3
- package/dist/v2/chunk-embedding-write-worker.js +3 -4
- package/dist/v2/{context-99v7x7fm.js → context-13er940g.js} +1147 -467
- package/dist/v2/{embedding-backfill-x1zpc04f.js → embedding-backfill-48qbnh7p.js} +4 -4
- package/dist/v2/embedding-worker.js +2 -2
- package/dist/v2/fold/instruction-supersession.d.ts.map +1 -1
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/{message-index-bounded-2pev910h.js → message-index-bounded-sw8hyqw1.js} +5 -6
- package/dist/v2/migration-worker.js +3 -4
- package/dist/v2/{project-embedding-registry-v2fxrs8b.js → project-embedding-registry-kwahtjgg.js} +5 -3
- package/dist/v2/raw-ordinal-warmup-worker.js +4 -4
- package/dist/v2/{read-session-chunk-a454a4d2.js → read-session-chunk-nqkn0yb4.js} +4 -5
- package/dist/v2/{recomp-orchestrator-03fskpsa.js → recomp-orchestrator-cdkfynz4.js} +15 -16
- package/dist/v2/{render-cryx4xsj.js → render-a7j6fqbd.js} +10 -11
- package/dist/v2/{search-2qj4w7rw.js → search-8dc9ex0a.js} +13 -14
- package/dist/v2/{search-archive-xw2rsq81.js → search-archive-3a36887a.js} +7 -8
- package/dist/v2/{server-kreheyw5.js → server-0ayyh3mx.js} +5 -7
- package/dist/v2/{server-t8n27rbt.js → server-4x0xq8a1.js} +1 -1
- package/dist/v2/{server-kaqs6h31.js → server-52x68mj4.js} +1 -1
- package/dist/v2/{server-cpstyzvy.js → server-578pc4tf.js} +3 -3
- package/dist/v2/{server-sb55ddgn.js → server-5p0bjk3y.js} +1 -1
- package/dist/v2/{server-58h6rrnx.js → server-6k0rnwbd.js} +1 -1
- package/dist/v2/{server-y5cma2j1.js → server-79tbtk5w.js} +8 -7
- package/dist/v2/{server-b3h8vqa6.js → server-7rmf6a57.js} +538 -28
- package/dist/v2/{server-xjzx27w2.js → server-7waad75d.js} +29 -18
- package/dist/v2/{server-wq9y9a03.js → server-96g41nad.js} +61 -54
- package/dist/v2/{server-txdsx71h.js → server-avfc9ezb.js} +4 -4
- package/dist/v2/{server-ww7xbxxf.js → server-b0357as4.js} +357 -1
- package/dist/v2/{server-qsvm6w79.js → server-beydmd68.js} +3763 -2484
- package/dist/v2/server-gge95a03.js +2687 -0
- package/dist/v2/{server-kfw4m268.js → server-jwydbwcx.js} +1 -1
- package/dist/v2/{server-brsx45r6.js → server-kwtnrhv3.js} +1 -1
- package/dist/v2/{server-4h4acntc.js → server-rpmkz5ta.js} +11 -7
- package/dist/v2/{server-0ms13pc8.js → server-rz6g5xne.js} +16 -5
- package/dist/v2/{server-dkfs58nq.js → server-v817sf79.js} +1 -1
- package/dist/v2/{server-vjadwb3j.js → server-ycvqg2s3.js} +3 -3
- package/dist/v2/server.js +4 -4
- package/dist/v2/{storage-tags-rzv7y0n3.js → storage-tags-19da4c0m.js} +4 -2
- package/dist/v2/{v2-archive-reader-3575hw8s.js → v2-archive-reader-jm3d7ccj.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-shzv6t4v.js → wrapup-orchestrator-xnqq81c4.js} +18 -18
- package/dist/{v2-archive-reader-75fdm0te.js → v2-archive-reader-9bbfh131.js} +1 -1
- package/dist/{wrapup-orchestrator-e0z7nvnx.js → wrapup-orchestrator-svhee0fn.js} +16 -17
- package/package.json +1 -1
- package/src/shared/escalation-bands.test.ts +16 -1
- package/src/shared/sqlite-placeholders.test.ts +103 -0
- package/src/shared/storage-file-mutex-review.test.ts +5 -7
- package/src/shared/test-open-files.test.ts +194 -0
- package/src/shared/test-open-files.ts +71 -0
- package/dist/index-bkg4hdyh.js +0 -3865
- package/dist/index-d9vfe7xq.js +0 -16
- package/dist/index-hsv31e69.js +0 -405
- package/dist/v2/server-d9vfe7xq.js +0 -16
- package/dist/v2/server-kgq2e2hh.js +0 -361
- package/dist/v2/server-rcchadw0.js +0 -3865
|
@@ -18,43 +18,6 @@ import {
|
|
|
18
18
|
registerBudgetFinalizeChild,
|
|
19
19
|
releaseBudgetFinalizeChild,
|
|
20
20
|
createDreamTokenBudget,
|
|
21
|
-
escalationBands,
|
|
22
|
-
sessionDecisionCalibration,
|
|
23
|
-
ensureSessionMetaRow,
|
|
24
|
-
persistCachedM0,
|
|
25
|
-
clearCachedM0M1,
|
|
26
|
-
describeProtectedTailDrainBudgetSkip,
|
|
27
|
-
loadProtectedTailMeta,
|
|
28
|
-
markProtectedTailPolicyV3Seeded,
|
|
29
|
-
recordProtectedTailPublicationFloor,
|
|
30
|
-
recordProtectedTailNoEligibleHead,
|
|
31
|
-
isWrapupInProgress,
|
|
32
|
-
reserveProtectedTailDrainTokens,
|
|
33
|
-
clearEmergencyDrainLatch,
|
|
34
|
-
recordHistorianDrainFailure,
|
|
35
|
-
clearHistorianDrainFailure,
|
|
36
|
-
rollbackProtectedTailDrainReservation,
|
|
37
|
-
getPersistedNoteNudge,
|
|
38
|
-
setPersistedNoteNudgeTrigger,
|
|
39
|
-
setPersistedNoteNudgeTriggerMessageId,
|
|
40
|
-
getNoteNudgeAnchors,
|
|
41
|
-
deliverNoteNudgeAtomic,
|
|
42
|
-
queueAutoSearchHintDecisionRetirement,
|
|
43
|
-
getNoteLastReadAt,
|
|
44
|
-
getHistorianFailureState,
|
|
45
|
-
incrementHistorianFailure,
|
|
46
|
-
clearHistorianFailureState,
|
|
47
|
-
getOverflowState,
|
|
48
|
-
clearEmergencyRecovery,
|
|
49
|
-
getPersistedCompactionMarkerState,
|
|
50
|
-
getCompactionMarkerPublicationState,
|
|
51
|
-
compareAndSetCompactionMarkerPublicationState,
|
|
52
|
-
setPersistedCompactionMarkerState,
|
|
53
|
-
getDeferredClearedCompactionMarkerState,
|
|
54
|
-
getPendingCompactionMarkerState,
|
|
55
|
-
setPendingCompactionMarkerState,
|
|
56
|
-
clearPendingCompactionMarkerStateIf,
|
|
57
|
-
detectOverflow,
|
|
58
21
|
resolveHostServedBoundaryId2,
|
|
59
22
|
hasRawMessageProvider2,
|
|
60
23
|
withRawSessionMessageCache2,
|
|
@@ -72,7 +35,7 @@ import {
|
|
|
72
35
|
getRawSessionTagKeysThrough2,
|
|
73
36
|
getLegacyProtectedTailStartOrdinal2,
|
|
74
37
|
readSessionChunk2
|
|
75
|
-
} from "./index-
|
|
38
|
+
} from "./index-29ff546v.js";
|
|
76
39
|
import {
|
|
77
40
|
getHarness2,
|
|
78
41
|
harnessOwnsOpenCodeStore2
|
|
@@ -121,7 +84,7 @@ import {
|
|
|
121
84
|
ConfigProfilesSchema,
|
|
122
85
|
MagicContextConfigSchema,
|
|
123
86
|
LIVE_RELOAD_CONFIG_PATHS
|
|
124
|
-
} from "./index-
|
|
87
|
+
} from "./index-6nqz8hsz.js";
|
|
125
88
|
import {
|
|
126
89
|
providerMass,
|
|
127
90
|
calibrationForModelKey,
|
|
@@ -151,7 +114,7 @@ import {
|
|
|
151
114
|
LATEST_SUPPORTED_VERSION,
|
|
152
115
|
getPersistedSchemaVersion,
|
|
153
116
|
openDatabase
|
|
154
|
-
} from "./index-
|
|
117
|
+
} from "./index-5ptp2de1.js";
|
|
155
118
|
import {
|
|
156
119
|
areRustHistorianSyntheticParts2,
|
|
157
120
|
isStrictGapHealingMessage2,
|
|
@@ -168,7 +131,10 @@ import {
|
|
|
168
131
|
resolveStoredPathWorkspaceIdentity,
|
|
169
132
|
sourceNameForMemory,
|
|
170
133
|
computeWorkspaceEpochFingerprint
|
|
171
|
-
} from "./index-
|
|
134
|
+
} from "./index-sv5tn72j.js";
|
|
135
|
+
import {
|
|
136
|
+
BoundedSessionMap
|
|
137
|
+
} from "./index-9mggb1nv.js";
|
|
172
138
|
import {
|
|
173
139
|
V2_MEMORY_CATEGORIES,
|
|
174
140
|
CATEGORY_PRIORITY,
|
|
@@ -180,9 +146,6 @@ import {
|
|
|
180
146
|
openCodeDbPathExists,
|
|
181
147
|
claimOpenCodeDbDiagnosticOnce
|
|
182
148
|
} from "./index-58e3y90n.js";
|
|
183
|
-
import {
|
|
184
|
-
BoundedSessionMap
|
|
185
|
-
} from "./index-hsv31e69.js";
|
|
186
149
|
import {
|
|
187
150
|
invalidateAutoEmbedSession
|
|
188
151
|
} from "./index-2amn2s73.js";
|
|
@@ -237,25 +200,62 @@ import {
|
|
|
237
200
|
getProjectState,
|
|
238
201
|
recordSubagentInvocation,
|
|
239
202
|
getLatestHistorianInvocationId
|
|
240
|
-
} from "./index-
|
|
203
|
+
} from "./index-tx8nfw85.js";
|
|
241
204
|
import {
|
|
242
205
|
clearCompressionDepth,
|
|
243
206
|
clearCompressionDepthRange,
|
|
244
207
|
toMessageIndexSource,
|
|
245
208
|
clearIndexedMessagesInTransaction,
|
|
246
209
|
indexSourcesAfterOrdinal
|
|
247
|
-
} from "./index-
|
|
210
|
+
} from "./index-h62j8z2r.js";
|
|
248
211
|
import {
|
|
249
212
|
stripWellFormedLeadingTagPrefix,
|
|
250
213
|
peelLeadingMcTagNotation,
|
|
251
214
|
isRecord,
|
|
215
|
+
escalationBands,
|
|
216
|
+
sessionDecisionCalibration,
|
|
217
|
+
ensureSessionMetaRow,
|
|
218
|
+
persistCachedM0,
|
|
219
|
+
clearCachedM0M1,
|
|
220
|
+
describeProtectedTailDrainBudgetSkip,
|
|
221
|
+
loadProtectedTailMeta,
|
|
222
|
+
markProtectedTailPolicyV3Seeded,
|
|
223
|
+
recordProtectedTailPublicationFloor,
|
|
224
|
+
recordProtectedTailNoEligibleHead,
|
|
225
|
+
isWrapupInProgress,
|
|
226
|
+
reserveProtectedTailDrainTokens,
|
|
227
|
+
clearEmergencyDrainLatch,
|
|
228
|
+
recordHistorianDrainFailure,
|
|
229
|
+
clearHistorianDrainFailure,
|
|
230
|
+
rollbackProtectedTailDrainReservation,
|
|
231
|
+
getPersistedNoteNudge,
|
|
232
|
+
setPersistedNoteNudgeTrigger,
|
|
233
|
+
setPersistedNoteNudgeTriggerMessageId,
|
|
234
|
+
getNoteNudgeAnchors,
|
|
235
|
+
deliverNoteNudgeAtomic,
|
|
236
|
+
queueAutoSearchHintDecisionRetirement,
|
|
237
|
+
getNoteLastReadAt,
|
|
238
|
+
getHistorianFailureState,
|
|
239
|
+
incrementHistorianFailure,
|
|
240
|
+
clearHistorianFailureState,
|
|
241
|
+
getOverflowState,
|
|
242
|
+
clearEmergencyRecovery,
|
|
243
|
+
getPersistedCompactionMarkerState,
|
|
244
|
+
getCompactionMarkerPublicationState,
|
|
245
|
+
compareAndSetCompactionMarkerPublicationState,
|
|
246
|
+
setPersistedCompactionMarkerState,
|
|
247
|
+
getDeferredClearedCompactionMarkerState,
|
|
248
|
+
getPendingCompactionMarkerState,
|
|
249
|
+
setPendingCompactionMarkerState,
|
|
250
|
+
clearPendingCompactionMarkerStateIf,
|
|
251
|
+
detectOverflow,
|
|
252
252
|
queuePendingDropForUnchangedTag,
|
|
253
253
|
getAllStatusTagTokenTotalsFlat2,
|
|
254
254
|
updateTagStatus2,
|
|
255
255
|
foldShrunkPartTags2,
|
|
256
256
|
getTagNumberByMessageId2,
|
|
257
257
|
getActiveTagsBySession2
|
|
258
|
-
} from "./index-
|
|
258
|
+
} from "./index-sk6p6esd.js";
|
|
259
259
|
import {
|
|
260
260
|
openCodeDbExists,
|
|
261
261
|
withReadOnlySessionDb,
|
|
@@ -265,7 +265,7 @@ import {
|
|
|
265
265
|
getSessionNotes,
|
|
266
266
|
getReadySmartNotes,
|
|
267
267
|
insertPrimerCandidates
|
|
268
|
-
} from "./index-
|
|
268
|
+
} from "./index-dhdv88e5.js";
|
|
269
269
|
import {
|
|
270
270
|
pushNotification2
|
|
271
271
|
} from "./index-x8a7jmkh.js";
|
|
@@ -282,14 +282,14 @@ import {
|
|
|
282
282
|
enqueueShadowEmbeddingItems2,
|
|
283
283
|
getProjectChunkEmbeddingModelId2,
|
|
284
284
|
getProjectEmbeddingMaxInputTokens2,
|
|
285
|
-
|
|
286
|
-
} from "./index-
|
|
285
|
+
embedItemsWindowBounded2
|
|
286
|
+
} from "./index-sx1sppd6.js";
|
|
287
287
|
import {
|
|
288
288
|
renderUserFacingFailure,
|
|
289
289
|
userFacingFailureCode,
|
|
290
290
|
promoteSessionFactsDurable,
|
|
291
291
|
embedPromotedFacts
|
|
292
|
-
} from "./index-
|
|
292
|
+
} from "./index-pdh4tdcq.js";
|
|
293
293
|
import {
|
|
294
294
|
isMarkerCandidateBasisCurrent2,
|
|
295
295
|
invalidateMarkerCandidateBasis2,
|
|
@@ -11206,6 +11206,13 @@ function stripMemoryMuralBlock(m0Text) {
|
|
|
11206
11206
|
|
|
11207
11207
|
`).trim();
|
|
11208
11208
|
}
|
|
11209
|
+
function servedHeadTexts(state) {
|
|
11210
|
+
const m0Text = decodeM0Bytes(state.cachedM0Bytes);
|
|
11211
|
+
return {
|
|
11212
|
+
m0Text: m0Text !== null && !state.cachedM0MuralDataUrl ? stripMemoryMuralBlock(m0Text) : m0Text,
|
|
11213
|
+
m1Text: decodeM0Bytes(state.cachedM1Bytes)
|
|
11214
|
+
};
|
|
11215
|
+
}
|
|
11209
11216
|
function renderM0(args) {
|
|
11210
11217
|
const sections = [];
|
|
11211
11218
|
if (args.projectDocs.length > 0)
|
|
@@ -15148,11 +15155,11 @@ async function embedAndStoreCompartmentChunks(db, sessionId, projectPath, compar
|
|
|
15148
15155
|
if (currentModelId !== "off" && chunkEmbeddingWindowsAreCurrent2(db, compartment.id, currentModelId, windows, projectPath)) {
|
|
15149
15156
|
continue;
|
|
15150
15157
|
}
|
|
15151
|
-
const result = await
|
|
15158
|
+
const result = await embedItemsWindowBounded2(projectPath, windows.map((window) => ({
|
|
15152
15159
|
id: `chunk:${compartment.id}:${window.windowIndex}`,
|
|
15153
15160
|
text: window.text,
|
|
15154
15161
|
contentSha256: contentSha2562(window.text)
|
|
15155
|
-
})), undefined, db, sessionId);
|
|
15162
|
+
})), undefined, db, sessionId, { stopOnIncompleteSlice: true });
|
|
15156
15163
|
if (!result)
|
|
15157
15164
|
continue;
|
|
15158
15165
|
if (chunkEmbeddingWindowsAreCurrent2(db, compartment.id, currentModelId, windows, projectPath)) {
|
|
@@ -19030,4 +19037,4 @@ async function executeContextRecomp(deps, options = {}) {
|
|
|
19030
19037
|
return (await executeContextRecompWithResult(deps, options)).message;
|
|
19031
19038
|
}
|
|
19032
19039
|
|
|
19033
|
-
export { denyTaskRoutingToCallerAgents, buildHiddenAgentRegistrations, buildZenReadAgentRegistrations, buildHiddenAgentConfig, getMagicContextBuiltinCommands, formatConfigParseStatusLine, claimConfigParseFailuresOnce, isCommitRetentionPaused, cortexKitUserConfigBasePath, cortexKitProjectConfigBasePath, resolveLegacyConfigSources, migrateMagicContextConfigLocations, getProtectedTokensTierOverrides, loadPluginConfigDetailed, historianRunConfig, dreamerRunConfig, pluginConfigReader, currentPluginConfigReader, withLiveDreamerOutputCap, createDreamerOutputCapSampler, COMPARTMENT_AGENT_SYSTEM_PROMPT, HISTORIAN_EDITOR_SYSTEM_PROMPT, COMPARTMENT_STRUCTURAL_SYSTEM_PROMPT, clampProducerAtomChars, producerInputTokenLimit, historianProducerReserve, producerPromptFailureReason, DREAMER_AGENT, DREAMER_RETROSPECTIVE_AGENT, DREAMER_PRIMER_INVESTIGATOR_AGENT, DREAMER_MEMORY_MAPPER_AGENT, DREAMER_CLASSIFIER_AGENT, DREAMER_DOCS_AGENT, DREAMER_REVIEWER_AGENT, createChildSessionWithFence, HiddenCompletionRefusal, DreamerProviderOutputFailureError, providerOutputFailureFromInvalidManifest, HIDDEN_HISTORIAN_AGENT, HIDDEN_DREAMER_AGENT, HIDDEN_CURATE_AGENT, hiddenAgentFor, hiddenToolLoop, HIDDEN_RUN_DISPOSED_REASON, noteChildOfDisposedInstance, hiddenChildPermissions, registerHiddenChildAgents, hiddenToolCallRefusal, HiddenAgentStepLimit, HiddenChildHook, extractLatestAssistantText, hasLengthCappedOutput, parseProviderModel, modelBodyField, toModelEntry, hiddenModelCooldowns, ModelProducedNoOutputError, noteModelActivityMonitored, noteModelOutputReceived, isPromptTimeoutError, getPromptFailureDetail, raceWithSignal, promptSyncWithValidatedOutputRetry, normalizeSDKResponse, annotateSubagentInvocationError, failedInvocationStatus, emptyTokenTotals, sumTokensFromChildMessages, recordChildInvocation, recordPromptSessionError, createPromptAsyncTransport, CTX_NOTE_LIGHT_DESCRIPTION, ACTIVE_TOOL_IDS, systemPromptFingerprint, createPromptSurfaceRuntime, createPromptSurfaceGuidanceEpochCache, setKeepSubagents, teardownChildSession, getCompartmentEvents, runTokenLog, formatRunTokenLog, buildMagicContextSection, getMuralIdentity, getMural, modelKeyAcceptsImages, resolveMuralWire, v2ToolDefinitionsHash, v2RequestToolsFingerprint, classifyRequestToolsChange, USER_MEMORY_CANDIDATE_TTL_MS, insertUserMemoryCandidates, getUserMemoryCandidates, deleteUserMemoryCandidates, pruneExpiredUserMemoryCandidates, insertUserMemory, getActiveUserMemories, updateUserMemoryContent, dismissUserMemory, getOpenCodeDbPath, compareOpenCodeMessagesByCanonicalOrder, startCompactionMarkerCandidatePreparation, removeMcOwnedCompactionMarkers, MARKER_SUMMARY_TEXT, markerUpdateDefinitelyDidNotCut, applyDeferredCompactionMarker, removeCompactionMarkerForSession, checkCompactionMarkerConsistency, extractM0Block, formatDate, TEMPORAL_MARKER_REPLAY_PATTERN, collectTemporalCandidates, injectTemporalMarkers, clearInjectionCache, getVisibleMemoryIds, selectHiddenMessagesAtCompactionSeam, prepareCompartmentInjection, renderCompartmentInjection, MaterializeContentionError, mustMaterialize, trimMemoriesToBudgetV2, renderMemoryBlockV2, stripMemoryMuralBlock, materializeM0, hydrateCachedM0Mural, resetPrefixTrimFallbackState, findHostCompactionWindow, capturePrefixTrimSourceOrder, prepareCachedM0M1Replay, headMessagesForSizing, rawTailAfterNewestCompartment, hasCompleteCachedM0M1, injectM0M1, resolveHiddenCompletionExecutor, createV1HiddenCompletionExecutor, readCoordinateGeneration, readCoordinateRebaseNotice, formatCoordinateRebaseNotice, rebaseSessionCoordinatesAsync, shouldWaitForNewHistorianHistory, EMPTY_READ_REPLY, noteTouchedAt, renderGlance, renderNotesById, formatWriteReply, observeNoteNudgeServe, onNoteTrigger, peekNoteNudgeText, markNoteNudgeDelivered, clearNoteNudgeTriggerAndCooldown, resetNoteNudgeCooldownOnly, clearNoteNudgeTriggerOnly, omitIncompleteFileTokenTotals, describeBoundaryDiagnostics, RECOVERY_NO_HEAD_LIMIT, deriveProtectedTailTokenTarget, selectPerRunCap, resolveOpenCodeProtectedTailBoundary, resolveWrapupProtectedTailBoundary, getRawHistoryEligibility, hasRunnableCompartmentWindow, recordHighPressureNoEligibleHead, noteTransformPassForExactOrdinalReads, runCompartmentAgent, snapRangeToCompartments, getActiveCompartmentRun, markActiveCompartmentRunPublished, registerActiveCompartmentRun, startCompartmentAgent, executeContextRecomp };
|
|
19040
|
+
export { denyTaskRoutingToCallerAgents, buildHiddenAgentRegistrations, buildZenReadAgentRegistrations, buildHiddenAgentConfig, getMagicContextBuiltinCommands, formatConfigParseStatusLine, claimConfigParseFailuresOnce, isCommitRetentionPaused, cortexKitUserConfigBasePath, cortexKitProjectConfigBasePath, resolveLegacyConfigSources, migrateMagicContextConfigLocations, getProtectedTokensTierOverrides, loadPluginConfigDetailed, historianRunConfig, dreamerRunConfig, pluginConfigReader, currentPluginConfigReader, withLiveDreamerOutputCap, createDreamerOutputCapSampler, COMPARTMENT_AGENT_SYSTEM_PROMPT, HISTORIAN_EDITOR_SYSTEM_PROMPT, COMPARTMENT_STRUCTURAL_SYSTEM_PROMPT, clampProducerAtomChars, producerInputTokenLimit, historianProducerReserve, producerPromptFailureReason, DREAMER_AGENT, DREAMER_RETROSPECTIVE_AGENT, DREAMER_PRIMER_INVESTIGATOR_AGENT, DREAMER_MEMORY_MAPPER_AGENT, DREAMER_CLASSIFIER_AGENT, DREAMER_DOCS_AGENT, DREAMER_REVIEWER_AGENT, createChildSessionWithFence, HiddenCompletionRefusal, DreamerProviderOutputFailureError, providerOutputFailureFromInvalidManifest, HIDDEN_HISTORIAN_AGENT, HIDDEN_DREAMER_AGENT, HIDDEN_CURATE_AGENT, hiddenAgentFor, hiddenToolLoop, HIDDEN_RUN_DISPOSED_REASON, noteChildOfDisposedInstance, hiddenChildPermissions, registerHiddenChildAgents, hiddenToolCallRefusal, HiddenAgentStepLimit, HiddenChildHook, extractLatestAssistantText, hasLengthCappedOutput, parseProviderModel, modelBodyField, toModelEntry, hiddenModelCooldowns, ModelProducedNoOutputError, noteModelActivityMonitored, noteModelOutputReceived, isPromptTimeoutError, getPromptFailureDetail, raceWithSignal, promptSyncWithValidatedOutputRetry, normalizeSDKResponse, annotateSubagentInvocationError, failedInvocationStatus, emptyTokenTotals, sumTokensFromChildMessages, recordChildInvocation, recordPromptSessionError, createPromptAsyncTransport, CTX_NOTE_LIGHT_DESCRIPTION, ACTIVE_TOOL_IDS, systemPromptFingerprint, createPromptSurfaceRuntime, createPromptSurfaceGuidanceEpochCache, setKeepSubagents, teardownChildSession, getCompartmentEvents, runTokenLog, formatRunTokenLog, buildMagicContextSection, getMuralIdentity, getMural, modelKeyAcceptsImages, resolveMuralWire, v2ToolDefinitionsHash, v2RequestToolsFingerprint, classifyRequestToolsChange, USER_MEMORY_CANDIDATE_TTL_MS, insertUserMemoryCandidates, getUserMemoryCandidates, deleteUserMemoryCandidates, pruneExpiredUserMemoryCandidates, insertUserMemory, getActiveUserMemories, updateUserMemoryContent, dismissUserMemory, getOpenCodeDbPath, compareOpenCodeMessagesByCanonicalOrder, startCompactionMarkerCandidatePreparation, removeMcOwnedCompactionMarkers, MARKER_SUMMARY_TEXT, markerUpdateDefinitelyDidNotCut, applyDeferredCompactionMarker, removeCompactionMarkerForSession, checkCompactionMarkerConsistency, extractM0Block, formatDate, TEMPORAL_MARKER_REPLAY_PATTERN, collectTemporalCandidates, injectTemporalMarkers, clearInjectionCache, getVisibleMemoryIds, selectHiddenMessagesAtCompactionSeam, prepareCompartmentInjection, renderCompartmentInjection, MaterializeContentionError, mustMaterialize, trimMemoriesToBudgetV2, renderMemoryBlockV2, stripMemoryMuralBlock, servedHeadTexts, materializeM0, hydrateCachedM0Mural, resetPrefixTrimFallbackState, findHostCompactionWindow, capturePrefixTrimSourceOrder, prepareCachedM0M1Replay, headMessagesForSizing, rawTailAfterNewestCompartment, hasCompleteCachedM0M1, injectM0M1, resolveHiddenCompletionExecutor, createV1HiddenCompletionExecutor, readCoordinateGeneration, readCoordinateRebaseNotice, formatCoordinateRebaseNotice, rebaseSessionCoordinatesAsync, shouldWaitForNewHistorianHistory, EMPTY_READ_REPLY, noteTouchedAt, renderGlance, renderNotesById, formatWriteReply, observeNoteNudgeServe, onNoteTrigger, peekNoteNudgeText, markNoteNudgeDelivered, clearNoteNudgeTriggerAndCooldown, resetNoteNudgeCooldownOnly, clearNoteNudgeTriggerOnly, omitIncompleteFileTokenTotals, describeBoundaryDiagnostics, RECOVERY_NO_HEAD_LIMIT, deriveProtectedTailTokenTarget, selectPerRunCap, resolveOpenCodeProtectedTailBoundary, resolveWrapupProtectedTailBoundary, getRawHistoryEligibility, hasRunnableCompartmentWindow, recordHighPressureNoEligibleHead, noteTransformPassForExactOrdinalReads, runCompartmentAgent, snapRangeToCompartments, getActiveCompartmentRun, markActiveCompartmentRunPublished, registerActiveCompartmentRun, startCompartmentAgent, executeContextRecomp };
|
|
@@ -139,9 +139,9 @@ async function serveV2ArchiveReads2(port, openConnections) {
|
|
|
139
139
|
import("./sqlite-zdgm52sv.js"),
|
|
140
140
|
import("./store-reader-3eh1s1m8.js"),
|
|
141
141
|
import("./store-h20ny8b8.js"),
|
|
142
|
-
import("./read-session-chunk-
|
|
143
|
-
import("./render-
|
|
144
|
-
import("./search-archive-
|
|
142
|
+
import("./read-session-chunk-70aam2c1.js"),
|
|
143
|
+
import("./render-73vrt30h.js"),
|
|
144
|
+
import("./search-archive-ew4c3bsw.js"),
|
|
145
145
|
import("./expand-attachments-h33jbgyz.js")
|
|
146
146
|
]);
|
|
147
147
|
const pool = new V2StoreReaderPool;
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
} from "./index-82dfe8en.js";
|
|
4
4
|
import {
|
|
5
5
|
clearEmergencyRecovery
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-sk6p6esd.js";
|
|
7
7
|
import {
|
|
8
8
|
requestPendingMaterialization,
|
|
9
9
|
dropSlot
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-tx8nfw85.js";
|
|
11
11
|
import {
|
|
12
12
|
executeContextRecomp
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-xj5bap1r.js";
|
|
14
14
|
import {
|
|
15
15
|
renderUserFacingFailure,
|
|
16
16
|
userFacingFailureCode
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-pdh4tdcq.js";
|
|
18
18
|
|
|
19
19
|
// src/hooks/magic-context/recomp-orchestrator.ts
|
|
20
20
|
function resolveLiveModelKey(liveSessionState, sessionId) {
|
package/dist/index.js
CHANGED
|
@@ -3,32 +3,8 @@ import {
|
|
|
3
3
|
invalidateTrueRawTokenCache,
|
|
4
4
|
recordToolParameters,
|
|
5
5
|
createDroppedInputToolExecuteBeforeHook,
|
|
6
|
-
getProtectionWindowForSession,
|
|
7
|
-
getPersistedReasoningWatermark,
|
|
8
|
-
setPersistedReasoningWatermark,
|
|
9
|
-
getChannel2NudgeState,
|
|
10
|
-
getPersistedNoteNudge,
|
|
11
|
-
removeNoteNudgeAnchorByMessageId,
|
|
12
|
-
removeAutoSearchHintDecisionByMessageId,
|
|
13
|
-
getHistorianFailureState,
|
|
14
|
-
clearHistorianFailureState,
|
|
15
|
-
getOverflowState,
|
|
16
|
-
recordOverflowDetected,
|
|
17
|
-
recordDetectedContextLimit,
|
|
18
|
-
clearDetectedContextLimit,
|
|
19
|
-
getPersistedCompactionMarkerState,
|
|
20
|
-
removeStrippedPlaceholderId,
|
|
21
|
-
getPendingCompactionMarkerState,
|
|
22
|
-
clearPendingCompactionMarkerStateIf,
|
|
23
|
-
getSessionsWithPendingMarker,
|
|
24
|
-
getObservedEpochFloor,
|
|
25
|
-
detectThinkingBindingMismatch,
|
|
26
|
-
detectLatestTurnThinkingMismatch,
|
|
27
|
-
isPrefixBoundThinkingModel,
|
|
28
|
-
detectOverflow,
|
|
29
|
-
isAnthropicFamilyRoute,
|
|
30
6
|
readRawSessionMessages2
|
|
31
|
-
} from "./index-
|
|
7
|
+
} from "./index-29ff546v.js";
|
|
32
8
|
import {
|
|
33
9
|
setHarness2
|
|
34
10
|
} from "./index-pavzsdc6.js";
|
|
@@ -55,7 +31,7 @@ import {
|
|
|
55
31
|
record,
|
|
56
32
|
DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE,
|
|
57
33
|
DEFAULT_HISTORIAN_TIMEOUT_MS
|
|
58
|
-
} from "./index-
|
|
34
|
+
} from "./index-6nqz8hsz.js";
|
|
59
35
|
import {
|
|
60
36
|
denyTaskRoutingToCallerAgents,
|
|
61
37
|
buildHiddenAgentRegistrations,
|
|
@@ -82,7 +58,7 @@ import {
|
|
|
82
58
|
checkCompactionMarkerConsistency,
|
|
83
59
|
clearInjectionCache,
|
|
84
60
|
clearNoteNudgeTriggerOnly
|
|
85
|
-
} from "./index-
|
|
61
|
+
} from "./index-xj5bap1r.js";
|
|
86
62
|
import"./index-sd3egckz.js";
|
|
87
63
|
import {
|
|
88
64
|
hasTrustedAbsoluteWall,
|
|
@@ -145,8 +121,6 @@ import {
|
|
|
145
121
|
clearTransformDecisionSession,
|
|
146
122
|
scheduleOpenCodeTransformDecisionWrite,
|
|
147
123
|
maybeDeliverChannel2,
|
|
148
|
-
armLatestThinkingRecovery,
|
|
149
|
-
armBindingRecoverySafely,
|
|
150
124
|
rustWrapupHistorianFields,
|
|
151
125
|
clearMessageTokensCache,
|
|
152
126
|
createTransform,
|
|
@@ -169,7 +143,7 @@ import {
|
|
|
169
143
|
parameterDescriptionsFor,
|
|
170
144
|
MagicContextRpcServer,
|
|
171
145
|
applyHiddenSubagentTemperature
|
|
172
|
-
} from "./index-
|
|
146
|
+
} from "./index-9n6mdfqy.js";
|
|
173
147
|
import {
|
|
174
148
|
resolveOpenCodeDbPath,
|
|
175
149
|
openCodeDbPathExists,
|
|
@@ -198,8 +172,11 @@ import {
|
|
|
198
172
|
scheduleAfterBootQuiet
|
|
199
173
|
} from "./index-0k283v27.js";
|
|
200
174
|
import {
|
|
201
|
-
|
|
202
|
-
|
|
175
|
+
BoundedSessionMap,
|
|
176
|
+
deleteTemporalDecision,
|
|
177
|
+
recordToolDefinition,
|
|
178
|
+
getCurrentToolSetHash
|
|
179
|
+
} from "./index-9mggb1nv.js";
|
|
203
180
|
import {
|
|
204
181
|
observeSessionActivity,
|
|
205
182
|
backfillSessionActivity,
|
|
@@ -215,9 +192,10 @@ import {
|
|
|
215
192
|
noteLkgProviderResponse,
|
|
216
193
|
clearLkgMeasuredRequest,
|
|
217
194
|
createDbLkgPersistence,
|
|
195
|
+
dropServedRecord,
|
|
218
196
|
registerLkgPersistence,
|
|
219
197
|
dropSlot
|
|
220
|
-
} from "./index-
|
|
198
|
+
} from "./index-tx8nfw85.js";
|
|
221
199
|
import {
|
|
222
200
|
recordSessionProjectIdentity
|
|
223
201
|
} from "./index-qperbvjn.js";
|
|
@@ -232,7 +210,7 @@ import {
|
|
|
232
210
|
openDatabaseAsync,
|
|
233
211
|
isDatabasePersisted,
|
|
234
212
|
getDatabasePersistenceError
|
|
235
|
-
} from "./index-
|
|
213
|
+
} from "./index-5ptp2de1.js";
|
|
236
214
|
import {
|
|
237
215
|
registerExitAbort,
|
|
238
216
|
unregisterExitAbort
|
|
@@ -243,21 +221,16 @@ import {
|
|
|
243
221
|
forgetRawSessionOrdinalWatermark2
|
|
244
222
|
} from "./index-36wseasx.js";
|
|
245
223
|
import"./index-2ny9xwdn.js";
|
|
246
|
-
import"./index-
|
|
224
|
+
import"./index-sv5tn72j.js";
|
|
247
225
|
import"./index-fr0wbhdn.js";
|
|
248
226
|
import {
|
|
249
227
|
preloadTokenizer
|
|
250
228
|
} from "./index-0tz2fzpq.js";
|
|
251
|
-
import {
|
|
252
|
-
BoundedSessionMap,
|
|
253
|
-
recordToolDefinition,
|
|
254
|
-
getCurrentToolSetHash
|
|
255
|
-
} from "./index-hsv31e69.js";
|
|
256
229
|
import"./index-hsyczpn7.js";
|
|
257
230
|
import {
|
|
258
231
|
getDefaultSubcConnectionFile,
|
|
259
232
|
SubcModuleTransport
|
|
260
|
-
} from "./index-
|
|
233
|
+
} from "./index-by14cr73.js";
|
|
261
234
|
import"./index-qt1qqasc.js";
|
|
262
235
|
import"./index-gz001bx7.js";
|
|
263
236
|
import {
|
|
@@ -280,9 +253,34 @@ import {
|
|
|
280
253
|
import"./index-1zx87sdm.js";
|
|
281
254
|
import {
|
|
282
255
|
stripPersistedAssistantText,
|
|
256
|
+
getProtectionWindowForSession,
|
|
257
|
+
getPersistedReasoningWatermark,
|
|
258
|
+
setPersistedReasoningWatermark,
|
|
259
|
+
getChannel2NudgeState,
|
|
260
|
+
getPersistedNoteNudge,
|
|
261
|
+
removeNoteNudgeAnchorByMessageId,
|
|
262
|
+
removeAutoSearchHintDecisionByMessageId,
|
|
263
|
+
getHistorianFailureState,
|
|
264
|
+
clearHistorianFailureState,
|
|
265
|
+
getOverflowState,
|
|
266
|
+
recordOverflowDetected,
|
|
267
|
+
recordDetectedContextLimit,
|
|
268
|
+
clearDetectedContextLimit,
|
|
269
|
+
getPersistedCompactionMarkerState,
|
|
270
|
+
removeStrippedPlaceholderId,
|
|
271
|
+
getPendingCompactionMarkerState,
|
|
272
|
+
clearPendingCompactionMarkerStateIf,
|
|
273
|
+
getSessionsWithPendingMarker,
|
|
274
|
+
cachedHeadCoversPendingCompactionMarker,
|
|
275
|
+
getObservedEpochFloor,
|
|
276
|
+
detectThinkingBindingMismatch,
|
|
277
|
+
detectLatestTurnThinkingMismatch,
|
|
278
|
+
isPrefixBoundThinkingModel,
|
|
279
|
+
detectOverflow,
|
|
280
|
+
isAnthropicFamilyRoute,
|
|
283
281
|
deleteTagsByMessageId2,
|
|
284
282
|
getMaxTagNumberBySession2
|
|
285
|
-
} from "./index-
|
|
283
|
+
} from "./index-sk6p6esd.js";
|
|
286
284
|
import {
|
|
287
285
|
resolveHistorianModel2,
|
|
288
286
|
resolveOpenCodeAgentOverrides2,
|
|
@@ -295,35 +293,37 @@ import {
|
|
|
295
293
|
import"./index-hexdee98.js";
|
|
296
294
|
import {
|
|
297
295
|
deleteIndexedMessage
|
|
298
|
-
} from "./index-
|
|
296
|
+
} from "./index-h62j8z2r.js";
|
|
299
297
|
import"./index-6athgjba.js";
|
|
300
|
-
import"./index-
|
|
298
|
+
import"./index-dhdv88e5.js";
|
|
301
299
|
import {
|
|
302
300
|
pushNotification2
|
|
303
301
|
} from "./index-x8a7jmkh.js";
|
|
304
|
-
import"./index-
|
|
302
|
+
import"./index-xstbytjn.js";
|
|
305
303
|
import {
|
|
306
304
|
getEmbeddingCoverageStatus2
|
|
307
|
-
} from "./index-
|
|
305
|
+
} from "./index-sx1sppd6.js";
|
|
308
306
|
import"./index-4dhv7mqz.js";
|
|
309
|
-
import"./index-
|
|
307
|
+
import"./index-2vsd5064.js";
|
|
310
308
|
import"./index-jjvbk92s.js";
|
|
311
|
-
import"./index-
|
|
309
|
+
import"./index-pdh4tdcq.js";
|
|
312
310
|
import"./index-90z05d0p.js";
|
|
313
311
|
import {
|
|
314
312
|
createTagger,
|
|
315
313
|
cavemanWordRulesForLanguage,
|
|
316
314
|
setCtxReduceRegisteredGlobally,
|
|
317
315
|
clearToolPermissionDenied,
|
|
316
|
+
armLatestThinkingRecovery,
|
|
317
|
+
armBindingRecoverySafely,
|
|
318
318
|
collectForeignTextParts,
|
|
319
319
|
resetDegradedCacheCount2
|
|
320
|
-
} from "./index-
|
|
320
|
+
} from "./index-eyr425dx.js";
|
|
321
321
|
import {
|
|
322
322
|
scheduleClearAndReindex
|
|
323
|
-
} from "./index-
|
|
323
|
+
} from "./index-b6rdv8re.js";
|
|
324
324
|
import {
|
|
325
325
|
runManagedRecomp2
|
|
326
|
-
} from "./index-
|
|
326
|
+
} from "./index-yamsmkmh.js";
|
|
327
327
|
import {
|
|
328
328
|
isValidSemver,
|
|
329
329
|
compareSemverCore
|
|
@@ -331,11 +331,11 @@ import {
|
|
|
331
331
|
import"./index-fmsr7v69.js";
|
|
332
332
|
import {
|
|
333
333
|
runManagedWrapup2
|
|
334
|
-
} from "./index-
|
|
335
|
-
import"./index-
|
|
336
|
-
import"./index-
|
|
337
|
-
import"./index-
|
|
338
|
-
import"./index-
|
|
334
|
+
} from "./index-567xsm72.js";
|
|
335
|
+
import"./index-5gqszjq9.js";
|
|
336
|
+
import"./index-52x68mj4.js";
|
|
337
|
+
import"./index-xvtjwhm6.js";
|
|
338
|
+
import"./index-a3n2dczz.js";
|
|
339
339
|
import {
|
|
340
340
|
isDreamerRunnable,
|
|
341
341
|
isSmartNoteSurfaceAvailable,
|
|
@@ -8203,7 +8203,7 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
8203
8203
|
// package.json
|
|
8204
8204
|
var package_default = {
|
|
8205
8205
|
name: "@cortexkit/opencode-magic-context",
|
|
8206
|
-
version: "0.49.
|
|
8206
|
+
version: "0.49.54",
|
|
8207
8207
|
type: "module",
|
|
8208
8208
|
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
8209
8209
|
main: "dist/index.js",
|
|
@@ -9729,7 +9729,7 @@ function createEventHandler2(deps) {
|
|
|
9729
9729
|
if (detectLatestTurnThinkingMismatch(errInfo.error)) {
|
|
9730
9730
|
const model = findLastAssistantModelFromOpenCodeDb(errInfo.sessionID);
|
|
9731
9731
|
if (!deps.compactionOff && isAnthropicFamilyRoute(model?.providerID, model?.modelID)) {
|
|
9732
|
-
armLatestThinkingRecovery(deps.db, errInfo.sessionID);
|
|
9732
|
+
armLatestThinkingRecovery(deps.db, errInfo.sessionID, model?.modelID);
|
|
9733
9733
|
dropSlot(errInfo.sessionID, "latest-thinking-recovery-arm");
|
|
9734
9734
|
deps.onSessionCacheInvalidated?.(errInfo.sessionID);
|
|
9735
9735
|
}
|
|
@@ -9847,7 +9847,7 @@ function createEventHandler2(deps) {
|
|
|
9847
9847
|
let messageHadOverflowError = false;
|
|
9848
9848
|
if (info.error !== undefined && info.error !== null) {
|
|
9849
9849
|
if (detectLatestTurnThinkingMismatch(info.error) && !deps.compactionOff && isAnthropicFamilyRoute(info.providerID, info.modelID)) {
|
|
9850
|
-
armLatestThinkingRecovery(deps.db, info.sessionID);
|
|
9850
|
+
armLatestThinkingRecovery(deps.db, info.sessionID, info.modelID);
|
|
9851
9851
|
dropSlot(info.sessionID, "latest-thinking-recovery-arm");
|
|
9852
9852
|
deps.onSessionCacheInvalidated?.(info.sessionID);
|
|
9853
9853
|
return;
|
|
@@ -10137,6 +10137,7 @@ function createEventHandler2(deps) {
|
|
|
10137
10137
|
reason: "message.removed"
|
|
10138
10138
|
});
|
|
10139
10139
|
deps.onSessionCacheInvalidated?.(info.sessionID);
|
|
10140
|
+
dropServedRecord(info.sessionID, "host_edit");
|
|
10140
10141
|
sessionLog2(info.sessionID, "event message.removed: cleared session injection cache");
|
|
10141
10142
|
} catch (error) {
|
|
10142
10143
|
sessionLog2(info.sessionID, "event message.removed cleanup failed:", error);
|
|
@@ -10149,6 +10150,7 @@ function createEventHandler2(deps) {
|
|
|
10149
10150
|
return;
|
|
10150
10151
|
}
|
|
10151
10152
|
dropSlot(sessionId, "session.compacted");
|
|
10153
|
+
dropServedRecord(sessionId, "native_compaction");
|
|
10152
10154
|
try {
|
|
10153
10155
|
deps.compactionHandler.onCompacted(sessionId, deps.db);
|
|
10154
10156
|
} catch (error) {
|
|
@@ -10179,6 +10181,7 @@ function createEventHandler2(deps) {
|
|
|
10179
10181
|
return;
|
|
10180
10182
|
}
|
|
10181
10183
|
dropSlot(sessionId, "session.deleted");
|
|
10184
|
+
dropServedRecord(sessionId, "session_deleted");
|
|
10182
10185
|
clearLkgMeasuredRequest(sessionId);
|
|
10183
10186
|
clearTrackedOpenCodeSession(sessionId);
|
|
10184
10187
|
try {
|
|
@@ -10204,6 +10207,22 @@ function createEventHandler2(deps) {
|
|
|
10204
10207
|
};
|
|
10205
10208
|
}
|
|
10206
10209
|
|
|
10210
|
+
// src/hooks/magic-context/pending-marker-rearm.ts
|
|
10211
|
+
function rearmPendingCompactionMarkerSignals(db, deferredHistoryRefreshSessions, deferredMaterializationSessions) {
|
|
10212
|
+
let historyRearmed = 0;
|
|
10213
|
+
let markerOnly = 0;
|
|
10214
|
+
for (const sessionId of getSessionsWithPendingMarker(db)) {
|
|
10215
|
+
if (cachedHeadCoversPendingCompactionMarker(db, sessionId)) {
|
|
10216
|
+
markerOnly++;
|
|
10217
|
+
continue;
|
|
10218
|
+
}
|
|
10219
|
+
deferredHistoryRefreshSessions.add(sessionId);
|
|
10220
|
+
deferredMaterializationSessions.add(sessionId);
|
|
10221
|
+
historyRearmed++;
|
|
10222
|
+
}
|
|
10223
|
+
return { historyRearmed, markerOnly };
|
|
10224
|
+
}
|
|
10225
|
+
|
|
10207
10226
|
// src/hooks/magic-context/text-complete.ts
|
|
10208
10227
|
function createTextCompleteHandler(providerForSession) {
|
|
10209
10228
|
return async (_input, output) => {
|
|
@@ -10328,13 +10347,12 @@ function createMagicContextHook(deps) {
|
|
|
10328
10347
|
const pendingMaterializationSessions = deps.liveSessionState?.pendingMaterializationSessions ?? new Set;
|
|
10329
10348
|
const deferredMaterializationSessions = deps.liveSessionState?.deferredMaterializationSessions ?? new Set;
|
|
10330
10349
|
try {
|
|
10331
|
-
const
|
|
10332
|
-
if (
|
|
10333
|
-
|
|
10334
|
-
|
|
10335
|
-
|
|
10336
|
-
}
|
|
10337
|
-
log2(`[magic-context] rehydrated ${sessionsWithPending.length} session(s) with pending compaction-marker drain at hook init`);
|
|
10350
|
+
const { historyRearmed, markerOnly } = rearmPendingCompactionMarkerSignals(db, deferredHistoryRefreshSessions, deferredMaterializationSessions);
|
|
10351
|
+
if (historyRearmed > 0) {
|
|
10352
|
+
log2(`[magic-context] rehydrated ${historyRearmed} session(s) with pending compaction-marker drain at hook init`);
|
|
10353
|
+
}
|
|
10354
|
+
if (markerOnly > 0) {
|
|
10355
|
+
log2(`[magic-context] ${markerOnly} session(s) with a pending compaction-marker move already serve its history; the move waits for a pass with rewrite permission`);
|
|
10338
10356
|
}
|
|
10339
10357
|
} catch (error) {
|
|
10340
10358
|
log2("[magic-context] hook init: pending-marker rehydration failed:", error);
|
|
@@ -10627,6 +10645,7 @@ function createMagicContextHook(deps) {
|
|
|
10627
10645
|
onSessionDeleted: async (sessionId) => {
|
|
10628
10646
|
rustRefusalRecovery?.forget(sessionId);
|
|
10629
10647
|
dropSlot(sessionId, "session-deleted");
|
|
10648
|
+
dropServedRecord(sessionId, "session_deleted");
|
|
10630
10649
|
try {
|
|
10631
10650
|
await transform.clearRustSession(sessionId);
|
|
10632
10651
|
} finally {
|
|
@@ -12061,7 +12080,7 @@ async function setup(context) {
|
|
|
12061
12080
|
if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
|
|
12062
12081
|
log2(`[magic-context] Magic Context storage is at ${storageDir}, outside the folder Engram backs up (~/.local/share/cortexkit/magic-context). It is not included in CortexKit backups.`);
|
|
12063
12082
|
}
|
|
12064
|
-
const { registerContext } = await import("./context-
|
|
12083
|
+
const { registerContext } = await import("./context-vx5gw5h2.js");
|
|
12065
12084
|
setHarness2("opencode2");
|
|
12066
12085
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
12067
12086
|
const duties = await registerContext(context);
|
|
@@ -12534,7 +12553,7 @@ var server = async (ctx) => {
|
|
|
12534
12553
|
rustReplayParticipant: () => magicContextRuntime.magicContext?.getRustReplayParticipant?.() ?? null,
|
|
12535
12554
|
onStorageBusyRefusal: async (sessionId, message) => {
|
|
12536
12555
|
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-gamjee2f.js"));
|
|
12537
|
-
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-
|
|
12556
|
+
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-mt4dcbhd.js"));
|
|
12538
12557
|
await sendStatusNotification(ctx.client, sessionId, message, {
|
|
12539
12558
|
toastDurationMs: 15000
|
|
12540
12559
|
});
|
|
@@ -4,21 +4,20 @@ import {
|
|
|
4
4
|
yieldIndexChunk2
|
|
5
5
|
} from "./index-gzy5w8ya.js";
|
|
6
6
|
import"./index-1zx87sdm.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-sk6p6esd.js";
|
|
8
8
|
import"./index-0tz2fzpq.js";
|
|
9
9
|
import"./index-pavzsdc6.js";
|
|
10
10
|
import"./index-82dfe8en.js";
|
|
11
11
|
import"./index-z4p0ry94.js";
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
import"./index-9mggb1nv.js";
|
|
13
|
+
import"./index-6nqz8hsz.js";
|
|
14
14
|
import"./index-v0p37hm2.js";
|
|
15
15
|
import"./index-96ztjvkn.js";
|
|
16
16
|
import"./index-1d042x6w.js";
|
|
17
17
|
import"./index-36wseasx.js";
|
|
18
18
|
import"./index-58e3y90n.js";
|
|
19
19
|
import"./index-em92bp7f.js";
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-hsv31e69.js";
|
|
20
|
+
import"./index-29ff546v.js";
|
|
22
21
|
import {
|
|
23
22
|
MESSAGE_INDEX_MAX_FTS_BYTES,
|
|
24
23
|
messageIndexSkipKey,
|
|
@@ -26,7 +25,7 @@ import {
|
|
|
26
25
|
markMessageIndexDirty,
|
|
27
26
|
getIndexableContent,
|
|
28
27
|
indexSingleMessage
|
|
29
|
-
} from "./index-
|
|
28
|
+
} from "./index-h62j8z2r.js";
|
|
30
29
|
import"./index-2ny9xwdn.js";
|
|
31
30
|
import"./index-tad3can2.js";
|
|
32
31
|
|
package/dist/migration-worker.js
CHANGED
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
import"./index-fr0wbhdn.js";
|
|
11
11
|
import {
|
|
12
12
|
runMigrationsWithRetry
|
|
13
|
-
} from "./index-
|
|
14
|
-
import"./index-
|
|
13
|
+
} from "./index-sv5tn72j.js";
|
|
14
|
+
import"./index-9mggb1nv.js";
|
|
15
15
|
import"./index-58e3y90n.js";
|
|
16
16
|
import"./index-0k283v27.js";
|
|
17
17
|
import"./index-ga5q492k.js";
|
|
@@ -19,7 +19,7 @@ import"./index-fb3zxn06.js";
|
|
|
19
19
|
import {
|
|
20
20
|
setSqlitePragmaConfig,
|
|
21
21
|
initializeDatabase
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-5ptp2de1.js";
|
|
23
23
|
import"./index-wh9fxds5.js";
|
|
24
24
|
import"./index-v0p37hm2.js";
|
|
25
25
|
import"./index-96ztjvkn.js";
|
|
@@ -27,7 +27,6 @@ import"./index-1d042x6w.js";
|
|
|
27
27
|
import"./index-36wseasx.js";
|
|
28
28
|
import"./index-2ny9xwdn.js";
|
|
29
29
|
import"./index-0tz2fzpq.js";
|
|
30
|
-
import"./index-hsv31e69.js";
|
|
31
30
|
import {
|
|
32
31
|
closeQuietly
|
|
33
32
|
} from "./index-8ajstryz.js";
|