@cortexkit/opencode-magic-context 0.49.42 → 0.49.44
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 +1 -1
- package/dist/{compaction-marker-candidates-5c44h1m9.js → compaction-marker-candidates-dkfp1q9j.js} +12 -2
- package/dist/compaction-marker-candidates-worker.js +5 -2
- package/dist/{context-zf1yj1g0.js → context-ws6gbyrr.js} +19 -19
- package/dist/{embedding-backfill-rma0v2ct.js → embedding-backfill-zxj35jkq.js} +4 -4
- package/dist/embedding-worker.js +2 -2
- package/dist/features/magic-context/compaction-marker-candidates.d.ts +57 -4
- package/dist/features/magic-context/compaction-marker-candidates.d.ts.map +1 -1
- package/dist/features/magic-context/compaction-marker.d.ts +18 -3
- package/dist/features/magic-context/compaction-marker.d.ts.map +1 -1
- package/dist/features/magic-context/scheduler.d.ts.map +1 -1
- package/dist/hooks/magic-context/apply-operations.d.ts +5 -4
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/cache-busting-signals.d.ts +4 -4
- package/dist/hooks/magic-context/cache-busting-signals.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts +7 -1
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-marker-publication.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts +7 -2
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/local-wire-reading.d.ts +54 -0
- package/dist/hooks/magic-context/local-wire-reading.d.ts.map +1 -0
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-date-refresh.d.ts +1 -2
- package/dist/hooks/magic-context/system-date-refresh.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-context-state.d.ts +38 -6
- package/dist/hooks/magic-context/transform-context-state.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +5 -2
- 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-zqsp3z0d.js → index-1j8m4ad0.js} +1 -1
- package/dist/{index-5m2azs6v.js → index-24y47287.js} +4 -4
- package/dist/{index-c5dzns43.js → index-4dpvnp8k.js} +1 -1
- package/dist/{index-ty4vhe4n.js → index-66qexmjw.js} +3 -3
- package/dist/{index-kfsqk1q7.js → index-6qnhaaa0.js} +1 -1
- package/dist/{index-n8bsqg7b.js → index-7y8c2n52.js} +3 -3
- package/dist/{index-ayk4we2k.js → index-8w3y6pxc.js} +36 -26
- package/dist/{index-p2e7j9p1.js → index-91y4xvx6.js} +1 -1
- package/dist/{index-rdx17j04.js → index-dasvhxwg.js} +1 -1
- package/dist/{index-z6v8086q.js → index-g0mjm7e4.js} +2 -2
- package/dist/{index-1zv08avf.js → index-g7rrfjkq.js} +4 -4
- package/dist/{index-3w1pbn85.js → index-gn6gfz4y.js} +64 -12
- package/dist/{index-xnm0wq1r.js → index-kgk64zyx.js} +1 -1
- package/dist/{index-xjw9rres.js → index-knnscj54.js} +1 -1
- package/dist/{index-gsqz39wk.js → index-m1mttf6y.js} +1 -1
- package/dist/{index-adt3jghq.js → index-ntssp0dt.js} +159 -49
- package/dist/{index-xd2p95m7.js → index-p6gs3xpx.js} +1 -1
- package/dist/{index-21fgrfrf.js → index-rhcwddn9.js} +2 -2
- package/dist/{index-fas76dft.js → index-v64se1t6.js} +5 -5
- package/dist/{index-xmqj3cf5.js → index-wapyeb06.js} +129 -56
- package/dist/index.js +23 -23
- package/dist/{message-index-bounded-5mj8p6nq.js → message-index-bounded-dmq6ne7d.js} +3 -3
- package/dist/migration-worker.js +1 -1
- package/dist/{project-embedding-registry-3yyegjma.js → project-embedding-registry-m47vg1ce.js} +3 -3
- package/dist/raw-ordinal-warmup-worker.js +3 -3
- package/dist/{read-session-chunk-k70bhfjm.js → read-session-chunk-3m7z9v3t.js} +2 -2
- package/dist/{recomp-orchestrator-2q4rmerf.js → recomp-orchestrator-9wtcpd7d.js} +12 -12
- package/dist/{render-36fvvwz6.js → render-esw55s0k.js} +6 -6
- package/dist/{search-6v2na3af.js → search-3b4kbhtw.js} +9 -9
- package/dist/{search-archive-jwb2ctnq.js → search-archive-wna5basn.js} +4 -4
- package/dist/shared/status-view.d.ts.map +1 -1
- package/dist/{transform-postprocess-phase-0ms3ga4h.js → transform-postprocess-phase-1y6p9ccc.js} +13 -13
- package/dist/v2/auto-search-worker.js +3 -3
- package/dist/v2/chunk-embedding-write-worker.js +1 -1
- package/dist/v2/compaction-marker-candidates-worker.js +5 -2
- package/dist/v2/{compaction-marker-candidates-jy65jt49.js → compaction-marker-candidates-y737qb1v.js} +12 -2
- package/dist/v2/{context-2xr6vbt2.js → context-sfgk72cj.js} +184 -64
- package/dist/v2/{embedding-backfill-00tw59rx.js → embedding-backfill-ahwzfc7v.js} +4 -4
- package/dist/v2/embedding-worker.js +2 -2
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/{message-index-bounded-5341qsqd.js → message-index-bounded-mapha2ag.js} +3 -3
- package/dist/v2/migration-worker.js +1 -1
- package/dist/v2/{project-embedding-registry-jqq2qeqb.js → project-embedding-registry-mn403rp5.js} +3 -3
- package/dist/v2/raw-ordinal-warmup-worker.js +3 -3
- package/dist/v2/{read-session-chunk-dgmq3ntm.js → read-session-chunk-svcthp0n.js} +2 -2
- package/dist/v2/{recomp-orchestrator-2vmyhtst.js → recomp-orchestrator-2bkv46am.js} +12 -12
- package/dist/v2/{render-kz0f40ws.js → render-315tv10c.js} +6 -6
- package/dist/v2/{search-archive-wajxd01m.js → search-archive-hnx40ts0.js} +4 -4
- package/dist/v2/{search-a9hwy1sw.js → search-bhrr075t.js} +8 -8
- package/dist/v2/{server-7qc9tk6z.js → server-1c720m9s.js} +1 -1
- package/dist/v2/{server-qehn6btp.js → server-1yx5455s.js} +2 -2
- package/dist/v2/{server-p78wdf43.js → server-63cz4w5t.js} +1 -1
- package/dist/v2/{server-kqrpt2ht.js → server-78mc9sxx.js} +1 -1
- package/dist/v2/{server-7acq7815.js → server-86sk7h34.js} +2 -2
- package/dist/v2/{server-6vzh6wej.js → server-8xdnk7vz.js} +1 -1
- package/dist/v2/{server-gkse1wyz.js → server-aqgg41wb.js} +3 -3
- package/dist/v2/{server-3m7p4g9w.js → server-g8xvnxcf.js} +1 -1
- package/dist/v2/{server-dwpgzm0t.js → server-gwxys0d0.js} +64 -12
- package/dist/v2/{server-5ydn39x3.js → server-ngdrh7rv.js} +130 -57
- package/dist/v2/{server-7zacmty5.js → server-p9s40wfa.js} +1 -1
- package/dist/v2/{server-dqs8e4yt.js → server-qs0mdpc1.js} +4 -4
- package/dist/v2/{server-sfcp13bn.js → server-rqypazrp.js} +3 -3
- package/dist/v2/{server-09td1wgc.js → server-t5gxvcc3.js} +1 -1
- package/dist/v2/{server-avdveykk.js → server-vjhk8v41.js} +1 -1
- package/dist/v2/{server-nq3cb7be.js → server-xnz3nrt2.js} +1 -1
- package/dist/v2/server.js +4 -4
- package/dist/v2/{v2-archive-reader-ag6sk771.js → v2-archive-reader-qwn0me88.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-2a077zew.js → wrapup-orchestrator-ts0sqwp3.js} +12 -12
- package/dist/{v2-archive-reader-chk95syc.js → v2-archive-reader-vqqjkeaq.js} +1 -1
- package/dist/{wrapup-orchestrator-rhs675kj.js → wrapup-orchestrator-qxvbvr4r.js} +13 -13
- package/package.json +1 -1
- package/src/config/schema/magic-context.ts +1 -1
- package/src/shared/status-view.ts +3 -5
- package/src/tui/dialogs/status-dialog-render.test.ts +1 -1
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
getRawSessionTagKeysThrough2,
|
|
73
73
|
getLegacyProtectedTailStartOrdinal2,
|
|
74
74
|
readSessionChunk2
|
|
75
|
-
} from "./index-
|
|
75
|
+
} from "./index-1j8m4ad0.js";
|
|
76
76
|
import {
|
|
77
77
|
getHarness2,
|
|
78
78
|
harnessOwnsOpenCodeStore2
|
|
@@ -123,7 +123,7 @@ import {
|
|
|
123
123
|
ConfigProfilesSchema,
|
|
124
124
|
MagicContextConfigSchema,
|
|
125
125
|
LIVE_RELOAD_CONFIG_PATHS
|
|
126
|
-
} from "./index-
|
|
126
|
+
} from "./index-4dpvnp8k.js";
|
|
127
127
|
import {
|
|
128
128
|
providerMass,
|
|
129
129
|
calibrationForModelKey,
|
|
@@ -153,7 +153,7 @@ import {
|
|
|
153
153
|
LATEST_SUPPORTED_VERSION,
|
|
154
154
|
getPersistedSchemaVersion,
|
|
155
155
|
openDatabase
|
|
156
|
-
} from "./index-
|
|
156
|
+
} from "./index-6qnhaaa0.js";
|
|
157
157
|
import {
|
|
158
158
|
areRustHistorianSyntheticParts2,
|
|
159
159
|
isStrictGapHealingMessage2,
|
|
@@ -239,14 +239,14 @@ import {
|
|
|
239
239
|
getProjectState,
|
|
240
240
|
recordSubagentInvocation,
|
|
241
241
|
getLatestHistorianInvocationId
|
|
242
|
-
} from "./index-
|
|
242
|
+
} from "./index-dasvhxwg.js";
|
|
243
243
|
import {
|
|
244
244
|
clearCompressionDepth,
|
|
245
245
|
clearCompressionDepthRange,
|
|
246
246
|
toMessageIndexSource,
|
|
247
247
|
clearIndexedMessagesInTransaction,
|
|
248
248
|
indexSourcesAfterOrdinal
|
|
249
|
-
} from "./index-
|
|
249
|
+
} from "./index-m1mttf6y.js";
|
|
250
250
|
import {
|
|
251
251
|
stripWellFormedLeadingTagPrefix,
|
|
252
252
|
peelLeadingMcTagNotation,
|
|
@@ -285,19 +285,24 @@ import {
|
|
|
285
285
|
getProjectChunkEmbeddingModelId2,
|
|
286
286
|
getProjectEmbeddingMaxInputTokens2,
|
|
287
287
|
embedItemsForProject2
|
|
288
|
-
} from "./index-
|
|
288
|
+
} from "./index-rhcwddn9.js";
|
|
289
289
|
import {
|
|
290
290
|
renderUserFacingFailure,
|
|
291
291
|
userFacingFailureCode,
|
|
292
292
|
promoteSessionFactsDurable,
|
|
293
293
|
embedPromotedFacts
|
|
294
|
-
} from "./index-
|
|
294
|
+
} from "./index-kgk64zyx.js";
|
|
295
295
|
import {
|
|
296
296
|
isMarkerCandidateBasisCurrent2,
|
|
297
297
|
invalidateMarkerCandidateBasis2,
|
|
298
|
+
discardMarkerCandidateBasis2,
|
|
298
299
|
readMarkerCandidateBasis2,
|
|
299
|
-
prepareMarkerCandidateBasis2
|
|
300
|
-
|
|
300
|
+
prepareMarkerCandidateBasis2,
|
|
301
|
+
readMarkerFrontiers2,
|
|
302
|
+
certifiedMarkerReferenceFloor2,
|
|
303
|
+
readMarkerReferenceRows2,
|
|
304
|
+
readKnownMarkerReferenceRows2
|
|
305
|
+
} from "./index-gn6gfz4y.js";
|
|
301
306
|
import {
|
|
302
307
|
sendStatusNotification2
|
|
303
308
|
} from "./index-ae1ar4v1.js";
|
|
@@ -8269,18 +8274,27 @@ function isCompactionMarkerIntentAbsent(marker, targetEndMessageId) {
|
|
|
8269
8274
|
return !db.prepare(`SELECT 1 FROM message WHERE id IN (?, ?)
|
|
8270
8275
|
UNION ALL SELECT 1 FROM part WHERE id IN (?, ?) LIMIT 1`).get(targetEndMessageId, marker.summaryMessageId, marker.compactionPartId, marker.summaryPartId);
|
|
8271
8276
|
}
|
|
8272
|
-
function withCompactionMarkerPublicationLock(operation, sessionId) {
|
|
8277
|
+
function withCompactionMarkerPublicationLock(operation, sessionId, onReferencesMissing) {
|
|
8273
8278
|
const db = getWritableOpenCodeDb();
|
|
8274
8279
|
const snapshot = prepareMarkerReplacementSnapshot(db, sessionId);
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
|
|
8280
|
+
if (snapshot === "references-missing" && onReferencesMissing) {
|
|
8281
|
+
startCompactionMarkerCandidatePreparation(sessionId);
|
|
8282
|
+
return onReferencesMissing();
|
|
8283
|
+
}
|
|
8284
|
+
try {
|
|
8285
|
+
return runMarkerWriteTransaction(db, "compaction-marker-replace", () => {
|
|
8286
|
+
if (typeof snapshot === "object")
|
|
8287
|
+
activeMarkerReplacementSnapshots.set(db, snapshot);
|
|
8288
|
+
try {
|
|
8289
|
+
return operation();
|
|
8290
|
+
} finally {
|
|
8291
|
+
activeMarkerReplacementSnapshots.delete(db);
|
|
8292
|
+
}
|
|
8293
|
+
});
|
|
8294
|
+
} finally {
|
|
8295
|
+
if (warmAfterCommit.delete(sessionId) && !db.inTransaction)
|
|
8296
|
+
startCompactionMarkerCandidatePreparation(sessionId);
|
|
8297
|
+
}
|
|
8284
8298
|
}
|
|
8285
8299
|
function inspectCompactionMarkerPublication(sessionId, recognized, summaryText, targetBoundaryMessageId, preferred) {
|
|
8286
8300
|
const db = getWritableOpenCodeDb();
|
|
@@ -8388,12 +8402,37 @@ async function prepareCompactionMarkerCandidates(sessionId, options = {}) {
|
|
|
8388
8402
|
if (!harnessOwnsOpenCodeStore2())
|
|
8389
8403
|
return true;
|
|
8390
8404
|
try {
|
|
8391
|
-
|
|
8405
|
+
const db = getWritableOpenCodeDb();
|
|
8406
|
+
if (markerDiscoveryReady(db, sessionId))
|
|
8407
|
+
return true;
|
|
8408
|
+
discardMarkerCandidateBasis2(db, sessionId);
|
|
8409
|
+
const prepared = await prepareMarkerCandidateBasis2(db, sessionId, {
|
|
8410
|
+
references: !markerReplacementSnapshots.get(db)?.has(sessionId),
|
|
8411
|
+
...options
|
|
8412
|
+
});
|
|
8413
|
+
return prepared && markerDiscoveryReady(db, sessionId);
|
|
8392
8414
|
} catch (error) {
|
|
8393
8415
|
log2(`[magic-context] compaction-marker: deferred candidate preparation for ${sessionId}: ${error instanceof Error ? error.message : String(error)}; marker unchanged`);
|
|
8394
8416
|
return false;
|
|
8395
8417
|
}
|
|
8396
8418
|
}
|
|
8419
|
+
function startCompactionMarkerCandidatePreparation(sessionId) {
|
|
8420
|
+
if (!harnessOwnsOpenCodeStore2())
|
|
8421
|
+
return "ready";
|
|
8422
|
+
try {
|
|
8423
|
+
if (markerDiscoveryReady(getWritableOpenCodeDb(), sessionId))
|
|
8424
|
+
return "ready";
|
|
8425
|
+
} catch (error) {
|
|
8426
|
+
log2(`[magic-context] compaction-marker: deferred candidate preparation for ${sessionId}: ${error instanceof Error ? error.message : String(error)}; marker unchanged`);
|
|
8427
|
+
return "unavailable";
|
|
8428
|
+
}
|
|
8429
|
+
prepareCompactionMarkerCandidates(sessionId);
|
|
8430
|
+
return "preparing";
|
|
8431
|
+
}
|
|
8432
|
+
function markerDiscoveryReady(db, sessionId) {
|
|
8433
|
+
const basis = readMarkerCandidateBasis2(db, sessionId);
|
|
8434
|
+
return basis !== undefined && (basis.references !== undefined || markerReplacementSnapshots.get(db)?.has(sessionId) === true);
|
|
8435
|
+
}
|
|
8397
8436
|
function injectCompactionMarkerFromBasis(args, validatedBasis, preserveExistingLineages = false) {
|
|
8398
8437
|
const db = getWritableOpenCodeDb();
|
|
8399
8438
|
if (!isOpenCodeSchemaCompatible(db, getOpenCodeDbPath())) {
|
|
@@ -8488,18 +8527,7 @@ class MarkerCandidateUnavailableError extends Error {
|
|
|
8488
8527
|
}
|
|
8489
8528
|
var activeMarkerReplacementSnapshots = new WeakMap;
|
|
8490
8529
|
var markerReplacementSnapshots = new WeakMap;
|
|
8491
|
-
var
|
|
8492
|
-
CASE WHEN data LIKE '%tail_start_id%' THEN json_extract(data, '$.tail_start_id') END AS direct,
|
|
8493
|
-
CASE WHEN data LIKE '%tail_start_id%' THEN json_extract(data, '$.compaction.tail_start_id') END AS nested`;
|
|
8494
|
-
function readMarkerReferenceRows(db, sessionId, table, highestId) {
|
|
8495
|
-
return db.prepare(`SELECT ${MARKER_TAIL_REFERENCE_COLUMNS} FROM ${table}
|
|
8496
|
-
WHERE ${highestId === undefined ? "session_id = ?" : "id > ? AND +session_id = ?"}
|
|
8497
|
-
AND ${table === "part" ? "data LIKE '%compaction%' AND json_valid(data) AND json_extract(data, '$.type') = 'compaction'" : "(data LIKE '%compaction%' OR data LIKE '%tail_start_id%') AND json_valid(data) AND (json_type(data, '$.compaction') IS NOT NULL OR json_type(data, '$.tail_start_id') IS NOT NULL)"}`).all(...highestId === undefined ? [sessionId] : [highestId, sessionId]);
|
|
8498
|
-
}
|
|
8499
|
-
function readKnownMarkerReferenceRows(db, sessionId, table, ids) {
|
|
8500
|
-
const byId = db.prepare(`SELECT ${MARKER_TAIL_REFERENCE_COLUMNS} FROM ${table} WHERE id = ? AND session_id = ?`);
|
|
8501
|
-
return ids.flatMap((id) => byId.all(id, sessionId));
|
|
8502
|
-
}
|
|
8530
|
+
var warmAfterCommit = new Set;
|
|
8503
8531
|
function prepareMarkerReplacementSnapshot(db, sessionId) {
|
|
8504
8532
|
const sessions = markerReplacementSnapshots.get(db) ?? new Map;
|
|
8505
8533
|
markerReplacementSnapshots.set(db, sessions);
|
|
@@ -8527,23 +8555,37 @@ function prepareMarkerReplacementSnapshot(db, sessionId) {
|
|
|
8527
8555
|
sessions.delete(sessionId);
|
|
8528
8556
|
return;
|
|
8529
8557
|
}
|
|
8530
|
-
const
|
|
8531
|
-
|
|
8532
|
-
const
|
|
8558
|
+
const cached = sessions.get(sessionId);
|
|
8559
|
+
let knownParts;
|
|
8560
|
+
for (const seed of [cached, basis.references]) {
|
|
8561
|
+
const floor = seed ? certifiedMarkerReferenceFloor2(reader, "part", seed.partFrontiers) : undefined;
|
|
8562
|
+
if (seed && floor !== undefined) {
|
|
8563
|
+
knownParts = { seed, floor };
|
|
8564
|
+
break;
|
|
8565
|
+
}
|
|
8566
|
+
}
|
|
8567
|
+
if (!knownParts) {
|
|
8568
|
+
sessions.delete(sessionId);
|
|
8569
|
+
discardMarkerCandidateBasis2(db, sessionId);
|
|
8570
|
+
log2(`[magic-context] compaction-marker: deferred replacement for ${sessionId}: part reference discovery is missing or its frontier changed; marker unchanged`);
|
|
8571
|
+
return "references-missing";
|
|
8572
|
+
}
|
|
8573
|
+
const discover = (table, ids, floor) => [
|
|
8533
8574
|
...new Map([
|
|
8534
|
-
...
|
|
8535
|
-
...
|
|
8575
|
+
...readKnownMarkerReferenceRows2(reader, sessionId, table, ids),
|
|
8576
|
+
...readMarkerReferenceRows2(reader, sessionId, table, floor)
|
|
8536
8577
|
].map((row) => [row.id, row])).values()
|
|
8537
|
-
]
|
|
8538
|
-
const parts = discover("part",
|
|
8539
|
-
const
|
|
8578
|
+
];
|
|
8579
|
+
const parts = discover("part", knownParts.seed.partIds, knownParts.floor);
|
|
8580
|
+
const messageFloor = cached ? certifiedMarkerReferenceFloor2(reader, "message", cached.messageFrontiers) : undefined;
|
|
8581
|
+
const messages = cached && messageFloor !== undefined ? discover("message", cached.messageIds, messageFloor) : readMarkerReferenceRows2(reader, sessionId, "message");
|
|
8540
8582
|
snapshot = {
|
|
8541
8583
|
sessionId,
|
|
8542
8584
|
basis,
|
|
8543
8585
|
partIds: parts.map((row) => row.id),
|
|
8544
8586
|
messageIds: messages.map((row) => row.id),
|
|
8545
|
-
|
|
8546
|
-
|
|
8587
|
+
partFrontiers: readMarkerFrontiers2(reader, "part"),
|
|
8588
|
+
messageFrontiers: readMarkerFrontiers2(reader, "message"),
|
|
8547
8589
|
references: [...parts, ...messages]
|
|
8548
8590
|
};
|
|
8549
8591
|
} finally {
|
|
@@ -8560,7 +8602,7 @@ function prepareMarkerReplacementSnapshot(db, sessionId) {
|
|
|
8560
8602
|
throw error;
|
|
8561
8603
|
}
|
|
8562
8604
|
}
|
|
8563
|
-
function markerRowsAreReferenced(db, snapshot, existing) {
|
|
8605
|
+
function markerRowsAreReferenced(db, snapshot, existing, seen) {
|
|
8564
8606
|
const deleted = new Set([
|
|
8565
8607
|
existing.summaryMessageId,
|
|
8566
8608
|
existing.summaryPartId,
|
|
@@ -8569,13 +8611,18 @@ function markerRowsAreReferenced(db, snapshot, existing) {
|
|
|
8569
8611
|
const referencesDeleted = (row) => !deleted.has(row.id) && [row.direct, row.nested].some((id) => typeof id === "string" && deleted.has(id));
|
|
8570
8612
|
if (snapshot.references.some(referencesDeleted))
|
|
8571
8613
|
throw new Error("a surviving tail_start_id references a recorded marker row; marker unchanged");
|
|
8572
|
-
for (const [table, ids,
|
|
8573
|
-
["part", snapshot.partIds, snapshot.
|
|
8574
|
-
["message", snapshot.messageIds, snapshot.
|
|
8614
|
+
for (const [table, ids, frontiers] of [
|
|
8615
|
+
["part", snapshot.partIds, snapshot.partFrontiers],
|
|
8616
|
+
["message", snapshot.messageIds, snapshot.messageFrontiers]
|
|
8575
8617
|
]) {
|
|
8576
|
-
|
|
8618
|
+
const floor = certifiedMarkerReferenceFloor2(db, table, frontiers);
|
|
8619
|
+
if (floor === undefined)
|
|
8620
|
+
throw new MarkerCandidateUnavailableError(`host ${table} frontier changed after marker reference discovery; marker unchanged`);
|
|
8621
|
+
if (readKnownMarkerReferenceRows2(db, snapshot.sessionId, table, ids).some(referencesDeleted))
|
|
8577
8622
|
return true;
|
|
8578
|
-
|
|
8623
|
+
const suffix = readMarkerReferenceRows2(db, snapshot.sessionId, table, floor);
|
|
8624
|
+
seen[table].push(...suffix.map((row) => row.id));
|
|
8625
|
+
if (suffix.some(referencesDeleted))
|
|
8579
8626
|
return true;
|
|
8580
8627
|
}
|
|
8581
8628
|
return false;
|
|
@@ -8588,19 +8635,21 @@ function replaceCompactionMarker(existing, args, preserveExistingLineages = fals
|
|
|
8588
8635
|
const db = getWritableOpenCodeDb();
|
|
8589
8636
|
connection = db;
|
|
8590
8637
|
const snapshot = activeMarkerReplacementSnapshots.get(db) ?? prepareMarkerReplacementSnapshot(db, args.sessionId);
|
|
8591
|
-
if (
|
|
8638
|
+
if (typeof snapshot !== "object" || snapshot.sessionId !== args.sessionId) {
|
|
8592
8639
|
return {
|
|
8593
8640
|
kind: "deferred",
|
|
8594
8641
|
error: new Error("marker candidate preparation pending; marker unchanged")
|
|
8595
8642
|
};
|
|
8596
8643
|
}
|
|
8597
8644
|
const { basis } = snapshot;
|
|
8645
|
+
let advanceFrontiers;
|
|
8598
8646
|
const marker = runMarkerWriteTransaction(db, "compaction-marker-replace", () => {
|
|
8599
8647
|
entered = true;
|
|
8600
8648
|
if (!isMarkerCandidateBasisCurrent2(db, basis))
|
|
8601
8649
|
throw new MarkerCandidateUnavailableError("host store changed after marker candidate preparation; marker unchanged");
|
|
8650
|
+
const seen = { part: [], message: [] };
|
|
8602
8651
|
if (existing) {
|
|
8603
|
-
if (markerRowsAreReferenced(db, snapshot, existing))
|
|
8652
|
+
if (markerRowsAreReferenced(db, snapshot, existing, seen))
|
|
8604
8653
|
throw new MarkerCandidateUnavailableError("a surviving tail_start_id references a recorded marker row; marker unchanged");
|
|
8605
8654
|
db.prepare("DELETE FROM part WHERE id = ?").run(existing.summaryPartId);
|
|
8606
8655
|
db.prepare("DELETE FROM message WHERE id = ?").run(existing.summaryMessageId);
|
|
@@ -8610,9 +8659,28 @@ function replaceCompactionMarker(existing, args, preserveExistingLineages = fals
|
|
|
8610
8659
|
if (!replacement) {
|
|
8611
8660
|
throw new Error(`failed to inject replacement marker at ordinal ${args.endOrdinal}`);
|
|
8612
8661
|
}
|
|
8662
|
+
if (existing) {
|
|
8663
|
+
try {
|
|
8664
|
+
const partFrontiers = readMarkerFrontiers2(db, "part");
|
|
8665
|
+
const messageFrontiers = readMarkerFrontiers2(db, "message");
|
|
8666
|
+
advanceFrontiers = () => {
|
|
8667
|
+
snapshot.partIds = [...new Set([...snapshot.partIds, ...seen.part])];
|
|
8668
|
+
snapshot.messageIds = [
|
|
8669
|
+
...new Set([...snapshot.messageIds, ...seen.message])
|
|
8670
|
+
];
|
|
8671
|
+
snapshot.partFrontiers = partFrontiers;
|
|
8672
|
+
snapshot.messageFrontiers = messageFrontiers;
|
|
8673
|
+
};
|
|
8674
|
+
} catch {}
|
|
8675
|
+
}
|
|
8613
8676
|
readyToCommit = true;
|
|
8614
8677
|
return replacement;
|
|
8615
8678
|
});
|
|
8679
|
+
advanceFrontiers?.();
|
|
8680
|
+
if (db.inTransaction)
|
|
8681
|
+
warmAfterCommit.add(args.sessionId);
|
|
8682
|
+
else
|
|
8683
|
+
startCompactionMarkerCandidatePreparation(args.sessionId);
|
|
8616
8684
|
return { kind: "committed", marker };
|
|
8617
8685
|
} catch (error) {
|
|
8618
8686
|
if (error instanceof MarkerCandidateUnavailableError)
|
|
@@ -8977,7 +9045,13 @@ function publishRecoverableCompactionMarker(db, args, targetIsCurrent) {
|
|
|
8977
9045
|
if (replacement.kind !== "committed")
|
|
8978
9046
|
cut = replacement.kind === "uncertain" ? "uncertain" : "definitely-no-cut";
|
|
8979
9047
|
return replacement;
|
|
8980
|
-
}, sessionId)
|
|
9048
|
+
}, sessionId, () => {
|
|
9049
|
+
reason = "candidate-preparation";
|
|
9050
|
+
return {
|
|
9051
|
+
kind: "deferred",
|
|
9052
|
+
error: new Error("marker reference discovery pending; marker unchanged")
|
|
9053
|
+
};
|
|
9054
|
+
});
|
|
8981
9055
|
if (result.kind === "committed") {
|
|
8982
9056
|
if (!intended)
|
|
8983
9057
|
throw new Error("committed marker has no publication intent");
|
|
@@ -9063,7 +9137,7 @@ function boundaryWouldDiscardUncoveredMessage(db, sessionId, ordinal, boundaryMe
|
|
|
9063
9137
|
}
|
|
9064
9138
|
return false;
|
|
9065
9139
|
}
|
|
9066
|
-
function applyDeferredCompactionMarker(db, sessionId, pending, directory, trustedBoundary) {
|
|
9140
|
+
function applyDeferredCompactionMarker(db, sessionId, pending, directory, trustedBoundary, options = {}) {
|
|
9067
9141
|
let cut = "uncertain";
|
|
9068
9142
|
let stepStartedAt = performance.now();
|
|
9069
9143
|
const stepMs = [];
|
|
@@ -9119,6 +9193,8 @@ function applyDeferredCompactionMarker(db, sessionId, pending, directory, truste
|
|
|
9119
9193
|
return { kind: "stale-skip", reason: "partial-message-boundary" };
|
|
9120
9194
|
}
|
|
9121
9195
|
endStep("discardCheck");
|
|
9196
|
+
if (options.validateOnly)
|
|
9197
|
+
return { kind: "deferred", reason: "candidate-preparation" };
|
|
9122
9198
|
cut = "uncertain";
|
|
9123
9199
|
const replacement = publishRecoverableCompactionMarker(db, {
|
|
9124
9200
|
sessionId,
|
|
@@ -10653,9 +10729,6 @@ function mustMaterialize(args) {
|
|
|
10653
10729
|
m0ToolSetHashNew: liveToolSetHash
|
|
10654
10730
|
} : null;
|
|
10655
10731
|
const withToolSetHashComparison = (decision) => toolSetHashComparison ? { ...decision, ...toolSetHashComparison } : decision;
|
|
10656
|
-
if (hard.cacheExpired && hard.lastResponseTime > 0 && hard.lastResponseTime > (args.state.cachedM0MaterializedAt ?? 0)) {
|
|
10657
|
-
return withToolSetHashComparison({ value: true, reason: "ttl_idle" });
|
|
10658
|
-
}
|
|
10659
10732
|
const hostCompaction = hard.hostCompaction;
|
|
10660
10733
|
if (hostCompaction !== undefined && hostCompaction.completedAt > (args.state.cachedM0MaterializedAt ?? 0)) {
|
|
10661
10734
|
return withToolSetHashComparison({ value: true, reason: "host_compaction" });
|
|
@@ -18700,4 +18773,4 @@ async function executeContextRecomp(deps, options = {}) {
|
|
|
18700
18773
|
return (await executeContextRecompWithResult(deps, options)).message;
|
|
18701
18774
|
}
|
|
18702
18775
|
|
|
18703
|
-
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, withDreamerModelCooldown, 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, 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, USER_MEMORY_CANDIDATE_TTL_MS, insertUserMemoryCandidates, getUserMemoryCandidates, deleteUserMemoryCandidates, pruneExpiredUserMemoryCandidates, insertUserMemory, getActiveUserMemories, updateUserMemoryContent, dismissUserMemory, getOpenCodeDbPath, compareOpenCodeMessagesByCanonicalOrder,
|
|
18776
|
+
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, withDreamerModelCooldown, 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, 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, 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, materializeM0, hydrateCachedM0Mural, resetPrefixTrimFallbackState, findHostCompactionWindow, capturePrefixTrimSourceOrder, prepareCachedM0M1Replay, 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 };
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
detectOverflow,
|
|
29
29
|
isAnthropicFamilyRoute,
|
|
30
30
|
readRawSessionMessages2
|
|
31
|
-
} from "./index-
|
|
31
|
+
} from "./index-1j8m4ad0.js";
|
|
32
32
|
import {
|
|
33
33
|
setHarness2
|
|
34
34
|
} from "./index-pavzsdc6.js";
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
record,
|
|
58
58
|
DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE,
|
|
59
59
|
DEFAULT_HISTORIAN_TIMEOUT_MS
|
|
60
|
-
} from "./index-
|
|
60
|
+
} from "./index-4dpvnp8k.js";
|
|
61
61
|
import {
|
|
62
62
|
denyTaskRoutingToCallerAgents,
|
|
63
63
|
buildHiddenAgentRegistrations,
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
checkCompactionMarkerConsistency,
|
|
85
85
|
clearInjectionCache,
|
|
86
86
|
clearNoteNudgeTriggerOnly
|
|
87
|
-
} from "./index-
|
|
87
|
+
} from "./index-wapyeb06.js";
|
|
88
88
|
import"./index-sd3egckz.js";
|
|
89
89
|
import {
|
|
90
90
|
hasTrustedAbsoluteWall,
|
|
@@ -171,7 +171,7 @@ import {
|
|
|
171
171
|
parameterDescriptionsFor,
|
|
172
172
|
MagicContextRpcServer,
|
|
173
173
|
applyHiddenSubagentTemperature
|
|
174
|
-
} from "./index-
|
|
174
|
+
} from "./index-ntssp0dt.js";
|
|
175
175
|
import {
|
|
176
176
|
resolveOpenCodeDbPath,
|
|
177
177
|
openCodeDbPathExists,
|
|
@@ -219,7 +219,7 @@ import {
|
|
|
219
219
|
createDbLkgPersistence,
|
|
220
220
|
registerLkgPersistence,
|
|
221
221
|
dropSlot
|
|
222
|
-
} from "./index-
|
|
222
|
+
} from "./index-dasvhxwg.js";
|
|
223
223
|
import {
|
|
224
224
|
recordSessionProjectIdentity
|
|
225
225
|
} from "./index-jz5bk7xd.js";
|
|
@@ -234,7 +234,7 @@ import {
|
|
|
234
234
|
openDatabaseAsync,
|
|
235
235
|
isDatabasePersisted,
|
|
236
236
|
getDatabasePersistenceError
|
|
237
|
-
} from "./index-
|
|
237
|
+
} from "./index-6qnhaaa0.js";
|
|
238
238
|
import {
|
|
239
239
|
registerExitAbort,
|
|
240
240
|
unregisterExitAbort
|
|
@@ -259,7 +259,7 @@ import"./index-g4t7850m.js";
|
|
|
259
259
|
import {
|
|
260
260
|
getDefaultSubcConnectionFile,
|
|
261
261
|
SubcModuleTransport
|
|
262
|
-
} from "./index-
|
|
262
|
+
} from "./index-v64se1t6.js";
|
|
263
263
|
import"./index-qt1qqasc.js";
|
|
264
264
|
import"./index-fw42ms3m.js";
|
|
265
265
|
import {
|
|
@@ -297,21 +297,21 @@ import {
|
|
|
297
297
|
import"./index-dcjkw41m.js";
|
|
298
298
|
import {
|
|
299
299
|
deleteIndexedMessage
|
|
300
|
-
} from "./index-
|
|
300
|
+
} from "./index-m1mttf6y.js";
|
|
301
301
|
import"./index-66a50f3e.js";
|
|
302
302
|
import"./index-2qbtqg1w.js";
|
|
303
303
|
import {
|
|
304
304
|
pushNotification2
|
|
305
305
|
} from "./index-x8a7jmkh.js";
|
|
306
|
-
import"./index-
|
|
306
|
+
import"./index-p6gs3xpx.js";
|
|
307
307
|
import {
|
|
308
308
|
getEmbeddingCoverageStatus2
|
|
309
|
-
} from "./index-
|
|
309
|
+
} from "./index-rhcwddn9.js";
|
|
310
310
|
import"./index-4dhv7mqz.js";
|
|
311
|
-
import"./index-
|
|
311
|
+
import"./index-66qexmjw.js";
|
|
312
312
|
import"./index-jjvbk92s.js";
|
|
313
|
-
import"./index-
|
|
314
|
-
import"./index-
|
|
313
|
+
import"./index-kgk64zyx.js";
|
|
314
|
+
import"./index-gn6gfz4y.js";
|
|
315
315
|
import {
|
|
316
316
|
createTagger,
|
|
317
317
|
cavemanWordRulesForLanguage,
|
|
@@ -319,13 +319,13 @@ import {
|
|
|
319
319
|
clearToolPermissionDenied,
|
|
320
320
|
collectForeignTextParts,
|
|
321
321
|
resetDegradedCacheCount2
|
|
322
|
-
} from "./index-
|
|
322
|
+
} from "./index-8w3y6pxc.js";
|
|
323
323
|
import {
|
|
324
324
|
scheduleClearAndReindex
|
|
325
|
-
} from "./index-
|
|
325
|
+
} from "./index-91y4xvx6.js";
|
|
326
326
|
import {
|
|
327
327
|
runManagedRecomp2
|
|
328
|
-
} from "./index-
|
|
328
|
+
} from "./index-24y47287.js";
|
|
329
329
|
import {
|
|
330
330
|
isValidSemver,
|
|
331
331
|
compareSemverCore
|
|
@@ -333,11 +333,11 @@ import {
|
|
|
333
333
|
import"./index-fmsr7v69.js";
|
|
334
334
|
import {
|
|
335
335
|
runManagedWrapup2
|
|
336
|
-
} from "./index-
|
|
337
|
-
import"./index-
|
|
336
|
+
} from "./index-g7rrfjkq.js";
|
|
337
|
+
import"./index-knnscj54.js";
|
|
338
338
|
import"./index-kaqs6h31.js";
|
|
339
|
-
import"./index-
|
|
340
|
-
import"./index-
|
|
339
|
+
import"./index-7y8c2n52.js";
|
|
340
|
+
import"./index-g0mjm7e4.js";
|
|
341
341
|
import {
|
|
342
342
|
isDreamerRunnable,
|
|
343
343
|
isSmartNoteSurfaceAvailable,
|
|
@@ -8205,7 +8205,7 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
8205
8205
|
// package.json
|
|
8206
8206
|
var package_default = {
|
|
8207
8207
|
name: "@cortexkit/opencode-magic-context",
|
|
8208
|
-
version: "0.49.
|
|
8208
|
+
version: "0.49.44",
|
|
8209
8209
|
type: "module",
|
|
8210
8210
|
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
8211
8211
|
main: "dist/index.js",
|
|
@@ -12059,7 +12059,7 @@ async function setup(context) {
|
|
|
12059
12059
|
if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
|
|
12060
12060
|
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.`);
|
|
12061
12061
|
}
|
|
12062
|
-
const { registerContext } = await import("./context-
|
|
12062
|
+
const { registerContext } = await import("./context-ws6gbyrr.js");
|
|
12063
12063
|
setHarness2("opencode2");
|
|
12064
12064
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
12065
12065
|
const duties = await registerContext(context);
|
|
@@ -12532,7 +12532,7 @@ var server = async (ctx) => {
|
|
|
12532
12532
|
rustReplayParticipant: () => magicContextRuntime.magicContext?.getRustReplayParticipant?.() ?? null,
|
|
12533
12533
|
onStorageBusyRefusal: async (sessionId, message) => {
|
|
12534
12534
|
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-14p3yje4.js"));
|
|
12535
|
-
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-
|
|
12535
|
+
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-1y6p9ccc.js"));
|
|
12536
12536
|
await sendStatusNotification(ctx.client, sessionId, message, {
|
|
12537
12537
|
toastDurationMs: 15000
|
|
12538
12538
|
});
|
|
@@ -11,14 +11,14 @@ import"./index-g2q4htwp.js";
|
|
|
11
11
|
import"./index-z4p0ry94.js";
|
|
12
12
|
import"./index-jrfre9ah.js";
|
|
13
13
|
import"./index-9wnbnx8f.js";
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-4dpvnp8k.js";
|
|
15
15
|
import"./index-v0p37hm2.js";
|
|
16
16
|
import"./index-96ztjvkn.js";
|
|
17
17
|
import"./index-1d042x6w.js";
|
|
18
18
|
import"./index-r2epb000.js";
|
|
19
19
|
import"./index-58e3y90n.js";
|
|
20
20
|
import"./index-vd2ywmfe.js";
|
|
21
|
-
import"./index-
|
|
21
|
+
import"./index-1j8m4ad0.js";
|
|
22
22
|
import"./index-jkanybgq.js";
|
|
23
23
|
import {
|
|
24
24
|
MESSAGE_INDEX_MAX_FTS_BYTES,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
markMessageIndexDirty,
|
|
28
28
|
getIndexableContent,
|
|
29
29
|
indexSingleMessage
|
|
30
|
-
} from "./index-
|
|
30
|
+
} from "./index-m1mttf6y.js";
|
|
31
31
|
import"./index-b1ydbp95.js";
|
|
32
32
|
import"./index-fxbk7gk3.js";
|
|
33
33
|
|
package/dist/migration-worker.js
CHANGED
package/dist/{project-embedding-registry-3yyegjma.js → project-embedding-registry-m47vg1ce.js}
RENAMED
|
@@ -35,12 +35,12 @@ import {
|
|
|
35
35
|
sweepAllRegisteredProjects2,
|
|
36
36
|
_setTestProviderFactoryForProject2,
|
|
37
37
|
_resetProjectEmbeddingRegistryForTests2
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-rhcwddn9.js";
|
|
39
39
|
import"./index-4dhv7mqz.js";
|
|
40
40
|
import"./index-2amn2s73.js";
|
|
41
41
|
import"./index-qt1qqasc.js";
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-
|
|
42
|
+
import"./index-p6gs3xpx.js";
|
|
43
|
+
import"./index-4dpvnp8k.js";
|
|
44
44
|
import"./index-jz5bk7xd.js";
|
|
45
45
|
import"./index-dcjkw41m.js";
|
|
46
46
|
import"./index-g4t7850m.js";
|
|
@@ -19,7 +19,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
19
19
|
await main();
|
|
20
20
|
async function main() {
|
|
21
21
|
if (input.v2ArchiveReader) {
|
|
22
|
-
const { serveV2ArchiveReads } = await import("./v2-archive-reader-
|
|
22
|
+
const { serveV2ArchiveReads } = await import("./v2-archive-reader-vqqjkeaq.js");
|
|
23
23
|
await serveV2ArchiveReads(port, openConnections);
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
@@ -51,7 +51,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
51
51
|
await runMessageFtsRowidMapBackfill(db);
|
|
52
52
|
reply = { kind: "fts-rowid-backfill" };
|
|
53
53
|
} else if (input.searchArchive) {
|
|
54
|
-
const { renderSearchArchive } = await import("./search-archive-
|
|
54
|
+
const { renderSearchArchive } = await import("./search-archive-wna5basn.js");
|
|
55
55
|
const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-j7c9w57v.js");
|
|
56
56
|
const archive = input.searchArchive;
|
|
57
57
|
let raw;
|
|
@@ -81,7 +81,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
81
81
|
const { setHarness } = await import("./harness-e4avh192.js");
|
|
82
82
|
setHarness(input.harness ?? "opencode");
|
|
83
83
|
const [{ indexMessageInShortChunks }, { configureContextDatabasePragmas }] = await Promise.all([
|
|
84
|
-
import("./message-index-bounded-
|
|
84
|
+
import("./message-index-bounded-dmq6ne7d.js"),
|
|
85
85
|
import("./sqlite-context-pragmas-mv9jqwjh.js")
|
|
86
86
|
]);
|
|
87
87
|
configureContextDatabasePragmas(db);
|
|
@@ -38,11 +38,11 @@ import {
|
|
|
38
38
|
readSessionChunk2,
|
|
39
39
|
getRawSessionMessageIdsThrough2,
|
|
40
40
|
readRawSessionSeedTail2
|
|
41
|
-
} from "./index-
|
|
41
|
+
} from "./index-1j8m4ad0.js";
|
|
42
42
|
import"./index-8jjjmhab.js";
|
|
43
43
|
import"./index-1zx87sdm.js";
|
|
44
44
|
import"./index-vd2ywmfe.js";
|
|
45
|
-
import"./index-
|
|
45
|
+
import"./index-4dpvnp8k.js";
|
|
46
46
|
import"./index-jkanybgq.js";
|
|
47
47
|
import"./index-9wnbnx8f.js";
|
|
48
48
|
import"./index-r2epb000.js";
|
|
@@ -7,35 +7,35 @@ import {
|
|
|
7
7
|
setRecompTerminal2,
|
|
8
8
|
buildRecompDeps2,
|
|
9
9
|
runManagedRecomp2
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
10
|
+
} from "./index-24y47287.js";
|
|
11
|
+
import"./index-wapyeb06.js";
|
|
12
|
+
import"./index-gn6gfz4y.js";
|
|
13
13
|
import"./index-sd3egckz.js";
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
14
|
+
import"./index-kgk64zyx.js";
|
|
15
|
+
import"./index-66qexmjw.js";
|
|
16
16
|
import"./index-jjvbk92s.js";
|
|
17
|
-
import"./index-
|
|
17
|
+
import"./index-rhcwddn9.js";
|
|
18
18
|
import"./index-4dhv7mqz.js";
|
|
19
|
-
import"./index-
|
|
19
|
+
import"./index-dasvhxwg.js";
|
|
20
20
|
import"./index-2qbtqg1w.js";
|
|
21
|
-
import"./index-
|
|
21
|
+
import"./index-m1mttf6y.js";
|
|
22
22
|
import"./index-2amn2s73.js";
|
|
23
23
|
import"./index-66a50f3e.js";
|
|
24
24
|
import"./index-dnqqqc5f.js";
|
|
25
25
|
import"./index-ae1ar4v1.js";
|
|
26
26
|
import"./index-qt1qqasc.js";
|
|
27
|
-
import"./index-
|
|
27
|
+
import"./index-1j8m4ad0.js";
|
|
28
28
|
import"./index-8jjjmhab.js";
|
|
29
29
|
import"./index-1zx87sdm.js";
|
|
30
30
|
import"./index-vd2ywmfe.js";
|
|
31
31
|
import"./index-x8a7jmkh.js";
|
|
32
32
|
import"./index-fw42ms3m.js";
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
33
|
+
import"./index-p6gs3xpx.js";
|
|
34
|
+
import"./index-4dpvnp8k.js";
|
|
35
35
|
import"./index-jz5bk7xd.js";
|
|
36
36
|
import"./index-dcjkw41m.js";
|
|
37
37
|
import"./index-g4t7850m.js";
|
|
38
|
-
import"./index-
|
|
38
|
+
import"./index-6qnhaaa0.js";
|
|
39
39
|
import"./index-fb3zxn06.js";
|
|
40
40
|
import"./index-nj360hcs.js";
|
|
41
41
|
import"./index-fr0wbhdn.js";
|