@cortexkit/opencode-magic-context 0.49.92 → 0.49.93
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/{context-e8qd2v00.js → context-jpxthqxg.js} +34 -25
- package/dist/{embedding-backfill-w0yq71q2.js → embedding-backfill-6wzc4p2n.js} +4 -4
- package/dist/embedding-worker.js +2 -2
- package/dist/features/magic-context/memory/embedding-local.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-worker-client.d.ts +3 -0
- package/dist/features/magic-context/memory/embedding-worker-client.d.ts.map +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-measured-request.d.ts +1 -0
- package/dist/hooks/magic-context/lkg-measured-request.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-persist.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-replay.d.ts +1 -0
- package/dist/hooks/magic-context/lkg-replay.d.ts.map +1 -1
- package/dist/{index-5a9kwapd.js → index-1kem0xxx.js} +4 -4
- package/dist/{index-f25ha337.js → index-5zrzg8r1.js} +1 -1
- package/dist/{index-5y9w2ax7.js → index-dr6bd4c8.js} +2 -2
- package/dist/{index-41bma6qs.js → index-fpjnjxyx.js} +2 -2
- package/dist/{index-zzhcshdk.js → index-g5c67kay.js} +9 -9
- package/dist/{index-xg1zjht5.js → index-g6y2wk32.js} +3 -3
- package/dist/{index-5pmf4jpj.js → index-g9qtxv87.js} +6 -6
- package/dist/{index-6rk44cer.js → index-gqfy38m9.js} +1 -1
- package/dist/{index-n71006wq.js → index-hee64h6k.js} +5 -5
- package/dist/{index-xn9efn18.js → index-hes3k87g.js} +12 -5
- package/dist/{index-hbn5g7rt.js → index-kty5k23y.js} +1 -1
- package/dist/{index-3n376ann.js → index-n9kd68vc.js} +2 -2
- package/dist/{index-hre29c1a.js → index-pnawfv4e.js} +1 -1
- package/dist/{index-wvbg9m0h.js → index-rz47hf2m.js} +2 -2
- package/dist/{index-ydhymf0b.js → index-ttdk2w0z.js} +3 -3
- package/dist/{index-901exj0f.js → index-xr1t0fxb.js} +1 -1
- package/dist/{index-r3tdqqtq.js → index-y2vshk67.js} +21 -23
- package/dist/{index-6nqz8hsz.js → index-y915t3ey.js} +1 -1
- package/dist/{index-anwy2mfb.js → index-yqha238s.js} +44 -23
- package/dist/{index-3f3d548g.js → index-za1yx1m4.js} +8 -8
- package/dist/index.js +23 -23
- package/dist/{message-index-bounded-f6fc00ze.js → message-index-bounded-vjrnptar.js} +4 -4
- package/dist/migration-worker.js +1 -1
- package/dist/{project-embedding-registry-8je0xg18.js → project-embedding-registry-m8zcmrsg.js} +3 -3
- package/dist/raw-ordinal-warmup-worker.js +4 -4
- package/dist/{read-session-chunk-y2ew3630.js → read-session-chunk-zkzdc0e5.js} +3 -3
- package/dist/{recomp-orchestrator-ggtcvb9g.js → recomp-orchestrator-qb2hymj5.js} +12 -12
- package/dist/{render-q8c6wrq9.js → render-34p0kek8.js} +7 -7
- package/dist/{search-archive-pz1jf655.js → search-archive-08ppk0q5.js} +5 -5
- package/dist/{search-gjyrwapc.js → search-e9bb9hpx.js} +10 -10
- package/dist/{storage-tags-7raphcw6.js → storage-tags-gk7gjkqt.js} +2 -2
- package/dist/{transform-postprocess-phase-pmzdd3s2.js → transform-postprocess-phase-neds90e3.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/{context-qqbpzk1q.js → context-ctsd80vc.js} +35 -28
- package/dist/v2/{embedding-backfill-95m72gxa.js → embedding-backfill-40g0anxh.js} +4 -4
- package/dist/v2/embedding-worker.js +2 -2
- package/dist/v2/fold/native-replay.d.ts.map +1 -1
- package/dist/v2/{message-index-bounded-70g28hyg.js → message-index-bounded-1vew9c37.js} +4 -4
- package/dist/v2/migration-worker.js +1 -1
- package/dist/v2/{project-embedding-registry-fcxf4qht.js → project-embedding-registry-je5jam7y.js} +3 -3
- package/dist/v2/raw-ordinal-warmup-worker.js +4 -4
- package/dist/v2/{read-session-chunk-9rf0n9e6.js → read-session-chunk-09sre4xv.js} +3 -3
- package/dist/v2/{recomp-orchestrator-cwghhjc9.js → recomp-orchestrator-mgcty3we.js} +12 -12
- package/dist/v2/{render-e852zmxz.js → render-ygcmyn9x.js} +7 -7
- package/dist/v2/{search-archive-tmn6b5w8.js → search-archive-nrsqqmk5.js} +5 -5
- package/dist/v2/{search-jd3vczhn.js → search-gmye6n25.js} +9 -9
- package/dist/v2/{server-vsqmkvxc.js → server-00adcfjd.js} +1 -1
- package/dist/v2/{server-mgxqfprb.js → server-2xm0gxke.js} +1 -1
- package/dist/v2/{server-6t3asmx8.js → server-4ecpanyn.js} +44 -23
- package/dist/v2/{server-7e89a2kf.js → server-6chcnnhq.js} +12 -5
- package/dist/v2/{server-ysjjcatk.js → server-6x40bnb7.js} +2 -2
- package/dist/v2/{server-bvr9xs8h.js → server-bnkc9kph.js} +3 -3
- package/dist/v2/{server-fj3pekz2.js → server-btgnkr9z.js} +1 -1
- package/dist/v2/{server-7x5a46hf.js → server-cvp9w5gs.js} +9 -9
- package/dist/v2/{server-9011eteb.js → server-dgsjamm4.js} +2 -2
- package/dist/v2/{server-rz6g5xne.js → server-e6xneh68.js} +1 -1
- package/dist/v2/{server-p4g021y5.js → server-g53asaqt.js} +2 -2
- package/dist/v2/{server-b4efn08m.js → server-k1xc2bw1.js} +1 -1
- package/dist/v2/{server-js2v309w.js → server-myp4pc6x.js} +5 -5
- package/dist/v2/{server-72k2r3kt.js → server-pcarsvj2.js} +2 -2
- package/dist/v2/{server-8ps3717t.js → server-vc5fta6s.js} +3 -3
- package/dist/v2/{server-d4trxrj3.js → server-z9czv2vb.js} +1 -1
- package/dist/v2/server.js +4 -4
- package/dist/v2/{storage-tags-wgsemtw1.js → storage-tags-nccqr0kr.js} +2 -2
- package/dist/v2/{v2-archive-reader-dm1aeqk2.js → v2-archive-reader-7vmng8q7.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-cke368np.js → wrapup-orchestrator-7r4y0bf6.js} +12 -12
- package/dist/{v2-archive-reader-39ye0d3b.js → v2-archive-reader-7s90gfax.js} +1 -1
- package/dist/{wrapup-orchestrator-ggnk0r4r.js → wrapup-orchestrator-m2p89973.js} +13 -13
- package/package.json +1 -1
- package/src/config/schema/magic-context.ts +1 -1
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
getPendingPiCompactionMarkerState,
|
|
59
59
|
logPiCompactionMarkerClear,
|
|
60
60
|
isPrefixBoundThinkingModel
|
|
61
|
-
} from "./server-
|
|
61
|
+
} from "./server-z9czv2vb.js";
|
|
62
62
|
import {
|
|
63
63
|
BoundedSessionMap,
|
|
64
64
|
getTableColumnNames,
|
|
@@ -1805,7 +1805,7 @@ function noteCapturedLkgRequest(args) {
|
|
|
1805
1805
|
captures.set(args.sessionId, {
|
|
1806
1806
|
request,
|
|
1807
1807
|
slot: identity(args.slot),
|
|
1808
|
-
prefixCount: JSON.parse(args.slot.jsonPrefix).length,
|
|
1808
|
+
prefixCount: args.prefixCount ?? JSON.parse(args.slot.jsonPrefix).length,
|
|
1809
1809
|
envelope: envelope(request.modelKey, args.systemPromptTokens, args.agentName, args.sessionId)
|
|
1810
1810
|
});
|
|
1811
1811
|
}
|
|
@@ -1967,22 +1967,32 @@ function rememberFingerprint(db, sessionId, fingerprint) {
|
|
|
1967
1967
|
}
|
|
1968
1968
|
saved.set(sessionId, fingerprint);
|
|
1969
1969
|
}
|
|
1970
|
-
function
|
|
1971
|
-
return
|
|
1972
|
-
slot.
|
|
1973
|
-
slot.
|
|
1974
|
-
slot.
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1970
|
+
function serializeSlotMetadata(slot) {
|
|
1971
|
+
return {
|
|
1972
|
+
inputIdSeq: JSON.stringify(slot.piOutputEntryIds ? { version: 1, inputIds: slot.inputIdSeq, piOutputEntryIds: slot.piOutputEntryIds } : slot.inputIdSeq),
|
|
1973
|
+
inputContentDigests: JSON.stringify(slot.inputContentDigests),
|
|
1974
|
+
inputContentSignatures: slot.inputContentSignatures ? JSON.stringify(slot.inputContentSignatures) : null
|
|
1975
|
+
};
|
|
1976
|
+
}
|
|
1977
|
+
function slotFingerprint(slot, metadata = serializeSlotMetadata(slot)) {
|
|
1978
|
+
return createHash5("sha256").update([
|
|
1979
|
+
JSON.stringify([
|
|
1980
|
+
slot.jsonPrefix,
|
|
1981
|
+
slot.lastInputMessageId,
|
|
1982
|
+
slot.modelKey,
|
|
1983
|
+
slot.providerKey,
|
|
1984
|
+
slot.rowVersion,
|
|
1985
|
+
slot.captureSequence
|
|
1986
|
+
]),
|
|
1987
|
+
metadata.inputIdSeq,
|
|
1988
|
+
metadata.inputContentDigests,
|
|
1989
|
+
metadata.inputContentSignatures ?? "null"
|
|
1990
|
+
].join(`
|
|
1991
|
+
`)).digest("hex");
|
|
1983
1992
|
}
|
|
1984
1993
|
function persistLkgSlot(db, sessionId, slot, publishMetadata) {
|
|
1985
|
-
const
|
|
1994
|
+
const metadata = serializeSlotMetadata(slot);
|
|
1995
|
+
const fingerprint = slotFingerprint(slot, metadata);
|
|
1986
1996
|
if (!publishMetadata && persistedFingerprints.get(db)?.get(sessionId) === fingerprint) {
|
|
1987
1997
|
const durable = loadPersistedLkgSlot(db, sessionId);
|
|
1988
1998
|
if (durable && slotFingerprint(durable) === fingerprint)
|
|
@@ -1990,9 +2000,6 @@ function persistLkgSlot(db, sessionId, slot, publishMetadata) {
|
|
|
1990
2000
|
}
|
|
1991
2001
|
const layout = layoutLkgPrefix(slot.jsonPrefix);
|
|
1992
2002
|
try {
|
|
1993
|
-
const inputIdSeq = JSON.stringify(slot.piOutputEntryIds ? { version: 1, inputIds: slot.inputIdSeq, piOutputEntryIds: slot.piOutputEntryIds } : slot.inputIdSeq);
|
|
1994
|
-
const inputContentDigests = JSON.stringify(slot.inputContentDigests);
|
|
1995
|
-
const inputContentSignatures = slot.inputContentSignatures ? JSON.stringify(slot.inputContentSignatures) : null;
|
|
1996
2003
|
db.transaction(() => {
|
|
1997
2004
|
const storedHashes = new Map;
|
|
1998
2005
|
for (const row of db.prepare("SELECT chunk, hash FROM lkg_slot_chunks WHERE session_id = ?").all(sessionId)) {
|
|
@@ -2024,7 +2031,7 @@ function persistLkgSlot(db, sessionId, slot, publishMetadata) {
|
|
|
2024
2031
|
provider_key = excluded.provider_key,
|
|
2025
2032
|
captured_at = excluded.captured_at,
|
|
2026
2033
|
row_version = excluded.row_version,
|
|
2027
|
-
capture_sequence = excluded.capture_sequence`).run(sessionId, layout.chars, layout.chunks.length, layout.hash, inputIdSeq, inputContentDigests, inputContentSignatures, slot.lastInputMessageId, slot.modelKey, slot.providerKey, slot.capturedAt, slot.rowVersion ?? null, slot.captureSequence ?? null);
|
|
2034
|
+
capture_sequence = excluded.capture_sequence`).run(sessionId, layout.chars, layout.chunks.length, layout.hash, metadata.inputIdSeq, metadata.inputContentDigests, metadata.inputContentSignatures, slot.lastInputMessageId, slot.modelKey, slot.providerKey, slot.capturedAt, slot.rowVersion ?? null, slot.captureSequence ?? null);
|
|
2028
2035
|
publishMetadata?.();
|
|
2029
2036
|
}).immediate();
|
|
2030
2037
|
rememberFingerprint(db, sessionId, fingerprint);
|
|
@@ -2431,6 +2438,13 @@ function outputMessageIsPostAnchor(message, inputIndexById, anchorIndex, systemI
|
|
|
2431
2438
|
const linkedIndex = inputIndexById.get(linked);
|
|
2432
2439
|
return linkedIndex === undefined ? null : linkedIndex > anchorIndex;
|
|
2433
2440
|
}
|
|
2441
|
+
function canCountWithoutToJSON(value) {
|
|
2442
|
+
try {
|
|
2443
|
+
return !("toJSON" in value);
|
|
2444
|
+
} catch {
|
|
2445
|
+
return false;
|
|
2446
|
+
}
|
|
2447
|
+
}
|
|
2434
2448
|
function buildLkgPrefix(input, output, completeOutput = false) {
|
|
2435
2449
|
const projected = asEntryProjection(input);
|
|
2436
2450
|
let anchorIndex = completeOutput && projected.length > 0 ? projected.length - 1 : findLkgAnchor(projected);
|
|
@@ -2480,14 +2494,18 @@ function buildLkgPrefix(input, output, completeOutput = false) {
|
|
|
2480
2494
|
if (inputContentDigests.some((digest) => digest === null))
|
|
2481
2495
|
return null;
|
|
2482
2496
|
const prefix = [];
|
|
2497
|
+
let canCountFromArray = canCountWithoutToJSON(prefix);
|
|
2483
2498
|
for (const message of output) {
|
|
2484
2499
|
const postAnchor = completeOutput ? false : outputMessageIsPostAnchor(message, inputIndexById, anchorIndex, systemIndices);
|
|
2485
2500
|
if (postAnchor === null)
|
|
2486
2501
|
return null;
|
|
2487
2502
|
if (isRetiredInstructionRow(message.info) && messageRole(message) === "system" && messageParts(message).length === 0)
|
|
2488
2503
|
continue;
|
|
2489
|
-
if (!postAnchor)
|
|
2490
|
-
|
|
2504
|
+
if (!postAnchor) {
|
|
2505
|
+
const visible = providerVisibleMessage(message);
|
|
2506
|
+
canCountFromArray &&= canCountWithoutToJSON(visible);
|
|
2507
|
+
prefix.push(visible);
|
|
2508
|
+
}
|
|
2491
2509
|
}
|
|
2492
2510
|
let jsonPrefix;
|
|
2493
2511
|
try {
|
|
@@ -2497,12 +2515,14 @@ function buildLkgPrefix(input, output, completeOutput = false) {
|
|
|
2497
2515
|
} catch {
|
|
2498
2516
|
return null;
|
|
2499
2517
|
}
|
|
2518
|
+
canCountFromArray &&= canCountWithoutToJSON(prefix);
|
|
2500
2519
|
return {
|
|
2501
2520
|
anchorIndex,
|
|
2502
2521
|
anchorMessageId,
|
|
2503
2522
|
inputIdSeq: validIds.slice(0, anchorIndex + 1),
|
|
2504
2523
|
inputContentDigests,
|
|
2505
|
-
jsonPrefix
|
|
2524
|
+
jsonPrefix,
|
|
2525
|
+
prefixCount: canCountFromArray ? prefix.length : undefined
|
|
2506
2526
|
};
|
|
2507
2527
|
}
|
|
2508
2528
|
function captureLkgSlot(args) {
|
|
@@ -2524,6 +2544,7 @@ function captureLkgSlot(args) {
|
|
|
2524
2544
|
noteCapturedLkgRequest({
|
|
2525
2545
|
sessionId: args.sessionId,
|
|
2526
2546
|
slot,
|
|
2547
|
+
prefixCount: built.prefixCount,
|
|
2527
2548
|
request: built.anchorIndex === args.input.length - 1 ? claimLkgRequestIdentity(args.sessionId) : undefined,
|
|
2528
2549
|
systemPromptTokens: args.systemPromptTokens ?? 0,
|
|
2529
2550
|
agentName: args.agentName
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_LOCAL_EMBEDDING_MODEL
|
|
3
|
-
} from "./server-
|
|
3
|
+
} from "./server-e6xneh68.js";
|
|
4
4
|
import {
|
|
5
5
|
getHarness2
|
|
6
6
|
} from "./server-pavzsdc6.js";
|
|
@@ -795,6 +795,11 @@ async function prepareNativeOnnxTelemetry() {
|
|
|
795
795
|
}
|
|
796
796
|
|
|
797
797
|
// src/features/magic-context/memory/embedding-worker-client.ts
|
|
798
|
+
class EmbeddingRequestAbortedError extends Error {
|
|
799
|
+
constructor() {
|
|
800
|
+
super("embedding request aborted");
|
|
801
|
+
}
|
|
802
|
+
}
|
|
798
803
|
var warnedWindowsTelemetry = false;
|
|
799
804
|
var EMBEDDING_WORKER_STOP_GRACE_MS = 5000;
|
|
800
805
|
var EMBEDDING_WORKER_FORCED_EXIT_WAIT_MS = 2000;
|
|
@@ -968,7 +973,7 @@ class EmbeddingWorkerClient {
|
|
|
968
973
|
}
|
|
969
974
|
async request(texts, signal) {
|
|
970
975
|
if (signal?.aborted)
|
|
971
|
-
|
|
976
|
+
throw new EmbeddingRequestAbortedError;
|
|
972
977
|
this.activeRequests++;
|
|
973
978
|
this.clearIdleTimer();
|
|
974
979
|
try {
|
|
@@ -998,7 +1003,7 @@ class EmbeddingWorkerClient {
|
|
|
998
1003
|
if (this.disposed)
|
|
999
1004
|
throw new Error("embedding worker disposed");
|
|
1000
1005
|
if (signal?.aborted)
|
|
1001
|
-
throw new
|
|
1006
|
+
throw new EmbeddingRequestAbortedError;
|
|
1002
1007
|
return new Promise((resolve, reject) => {
|
|
1003
1008
|
const id = this.nextId++;
|
|
1004
1009
|
const timer = setTimeout(() => {
|
|
@@ -1008,7 +1013,7 @@ class EmbeddingWorkerClient {
|
|
|
1008
1013
|
clearTimeout(timer);
|
|
1009
1014
|
this.pending.delete(id);
|
|
1010
1015
|
signal?.removeEventListener("abort", abort);
|
|
1011
|
-
reject(new
|
|
1016
|
+
reject(new EmbeddingRequestAbortedError);
|
|
1012
1017
|
if (this.pending.size === 0) {
|
|
1013
1018
|
worker.unref();
|
|
1014
1019
|
if (!(worker instanceof Worker))
|
|
@@ -1729,7 +1734,9 @@ class LocalEmbeddingProvider {
|
|
|
1729
1734
|
this.recordWorkerReply(reply);
|
|
1730
1735
|
return reply.vectors ?? texts.map(() => null);
|
|
1731
1736
|
} catch (error) {
|
|
1732
|
-
|
|
1737
|
+
if (!(signal?.aborted && error instanceof EmbeddingRequestAbortedError)) {
|
|
1738
|
+
this.recordWorkerFailure(error);
|
|
1739
|
+
}
|
|
1733
1740
|
return texts.map(() => null);
|
|
1734
1741
|
}
|
|
1735
1742
|
}
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
} from "./server-qb3s0mnc.js";
|
|
4
4
|
import {
|
|
5
5
|
getTagById2
|
|
6
|
-
} from "./server-
|
|
6
|
+
} from "./server-z9czv2vb.js";
|
|
7
7
|
import {
|
|
8
8
|
expandToolPart,
|
|
9
9
|
visitRawSessionMessages2,
|
|
10
10
|
readRawSessionMessageById2
|
|
11
|
-
} from "./server-
|
|
11
|
+
} from "./server-dgsjamm4.js";
|
|
12
12
|
|
|
13
13
|
// src/tools/ctx-expand/render.ts
|
|
14
14
|
import { createHash } from "node:crypto";
|
|
@@ -139,9 +139,9 @@ async function serveV2ArchiveReads2(port, openConnections) {
|
|
|
139
139
|
import("./sqlite-zdgm52sv.js"),
|
|
140
140
|
import("./store-reader-jbaqv1yp.js"),
|
|
141
141
|
import("./store-enef5jcn.js"),
|
|
142
|
-
import("./read-session-chunk-
|
|
143
|
-
import("./render-
|
|
144
|
-
import("./search-archive-
|
|
142
|
+
import("./read-session-chunk-09sre4xv.js"),
|
|
143
|
+
import("./render-ygcmyn9x.js"),
|
|
144
|
+
import("./search-archive-nrsqqmk5.js"),
|
|
145
145
|
import("./expand-attachments-h33jbgyz.js")
|
|
146
146
|
]);
|
|
147
147
|
const pool = new V2StoreReaderPool;
|
|
@@ -1084,7 +1084,7 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
|
|
|
1084
1084
|
state.running = startMessageFtsRowidMapBackfill2(db, signal).then(async () => {
|
|
1085
1085
|
if (signal.aborted || !readsOpenCodeStore)
|
|
1086
1086
|
return;
|
|
1087
|
-
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-
|
|
1087
|
+
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-09sre4xv.js"));
|
|
1088
1088
|
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-ynb3vg6r.js"));
|
|
1089
1089
|
if (signal.aborted)
|
|
1090
1090
|
return;
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
cortexKitProjectConfigBasePath,
|
|
20
20
|
resolveLegacyConfigSourcesForHarness,
|
|
21
21
|
loadPluginConfigDetailed
|
|
22
|
-
} from "./server-
|
|
22
|
+
} from "./server-00adcfjd.js";
|
|
23
23
|
import {
|
|
24
24
|
catalogOutputReserve,
|
|
25
25
|
getSdkContextLimit,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
resolvePromptSurface,
|
|
33
33
|
DEFAULT_HISTORIAN_TIMEOUT_MS,
|
|
34
34
|
LIVE_RELOAD_CONFIG_PATHS
|
|
35
|
-
} from "./server-
|
|
35
|
+
} from "./server-e6xneh68.js";
|
|
36
36
|
import {
|
|
37
37
|
inRootAsyncContext2,
|
|
38
38
|
Database2,
|
|
@@ -102,7 +102,7 @@ import {
|
|
|
102
102
|
foldShrunkPartTags2,
|
|
103
103
|
getTagNumberByMessageId2,
|
|
104
104
|
getActiveTagsBySession2
|
|
105
|
-
} from "./server-
|
|
105
|
+
} from "./server-z9czv2vb.js";
|
|
106
106
|
import {
|
|
107
107
|
hasMeaningfulUserText2,
|
|
108
108
|
estimateTokens,
|
|
@@ -157,14 +157,14 @@ import {
|
|
|
157
157
|
getRawSessionTagKeysThrough2,
|
|
158
158
|
getLegacyProtectedTailStartOrdinal2,
|
|
159
159
|
readSessionChunk2
|
|
160
|
-
} from "./server-
|
|
160
|
+
} from "./server-dgsjamm4.js";
|
|
161
161
|
import {
|
|
162
162
|
clearCompressionDepth,
|
|
163
163
|
clearCompressionDepthRange,
|
|
164
164
|
toMessageIndexSource,
|
|
165
165
|
clearIndexedMessagesInTransaction,
|
|
166
166
|
indexSourcesAfterOrdinal
|
|
167
|
-
} from "./server-
|
|
167
|
+
} from "./server-2xm0gxke.js";
|
|
168
168
|
import {
|
|
169
169
|
COMPARTMENT_LEASE_RENEWAL_MS,
|
|
170
170
|
getCompartmentLeaseBlocker,
|
|
@@ -211,7 +211,7 @@ import {
|
|
|
211
211
|
getProjectState,
|
|
212
212
|
recordSubagentInvocation,
|
|
213
213
|
getLatestHistorianInvocationId
|
|
214
|
-
} from "./server-
|
|
214
|
+
} from "./server-4ecpanyn.js";
|
|
215
215
|
import {
|
|
216
216
|
invalidateAutoEmbedSession
|
|
217
217
|
} from "./server-2amn2s73.js";
|
|
@@ -246,7 +246,7 @@ import {
|
|
|
246
246
|
getProjectChunkEmbeddingModelId2,
|
|
247
247
|
getProjectEmbeddingMaxInputTokens2,
|
|
248
248
|
embedItemsWindowBounded2
|
|
249
|
-
} from "./server-
|
|
249
|
+
} from "./server-pcarsvj2.js";
|
|
250
250
|
import {
|
|
251
251
|
V2_MEMORY_CATEGORIES,
|
|
252
252
|
CATEGORY_PRIORITY,
|
|
@@ -257,7 +257,7 @@ import {
|
|
|
257
257
|
userFacingFailureCode,
|
|
258
258
|
promoteSessionFactsDurable,
|
|
259
259
|
embedPromotedFacts
|
|
260
|
-
} from "./server-
|
|
260
|
+
} from "./server-vc5fta6s.js";
|
|
261
261
|
import {
|
|
262
262
|
computeCueContentHash,
|
|
263
263
|
getMuralCueState,
|
|
@@ -271,7 +271,7 @@ import {
|
|
|
271
271
|
LATEST_SUPPORTED_VERSION,
|
|
272
272
|
getPersistedSchemaVersion,
|
|
273
273
|
openDatabase
|
|
274
|
-
} from "./server-
|
|
274
|
+
} from "./server-btgnkr9z.js";
|
|
275
275
|
import {
|
|
276
276
|
parseCompartmentOutput,
|
|
277
277
|
resolveWorkspaceShareCategories,
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
estimateMessageTokens,
|
|
7
7
|
getCandidateToolOwners2,
|
|
8
8
|
pickNearestPriorOwner2
|
|
9
|
-
} from "./server-
|
|
9
|
+
} from "./server-z9czv2vb.js";
|
|
10
10
|
import {
|
|
11
11
|
OMO_INTERNAL_INITIATOR_MARKER,
|
|
12
12
|
isSystemDirective,
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./server-qntmqaca.js";
|
|
31
31
|
import {
|
|
32
32
|
renderToolTemplate
|
|
33
|
-
} from "./server-
|
|
33
|
+
} from "./server-e6xneh68.js";
|
|
34
34
|
import {
|
|
35
35
|
readRawSessionMessagesFromDb2,
|
|
36
36
|
readRawSessionMessagePageFromDb2,
|
|
@@ -7029,7 +7029,7 @@ var MagicContextConfigSchema = object({
|
|
|
7029
7029
|
execute_threshold_percentage: union([
|
|
7030
7030
|
number().min(20).max(90, EXECUTE_THRESHOLD_CAP_MESSAGE),
|
|
7031
7031
|
object({ default: number().min(20).max(90, EXECUTE_THRESHOLD_CAP_MESSAGE) }).catchall(number().min(20).max(90, EXECUTE_THRESHOLD_CAP_MESSAGE))
|
|
7032
|
-
]).default(DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE).describe('Context
|
|
7032
|
+
]).default(DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE).describe('Context usage above which a pass counts as an execute pass. Queued drops and cleanup then apply on the next rewrite of the cached prompt (a new summary, a fold, /ctx-flush, or high pressure); the threshold does not start a rewrite for every queued drop. Number or per-model object ({ default: 65, "provider/model": 45 }). Values above 90 are rejected because the runtime caps at 90% of the output-reserved safe window (MAX_EXECUTE_THRESHOLD). Default: DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE'),
|
|
7033
7033
|
execute_threshold_tokens: object({
|
|
7034
7034
|
default: number().min(5000).max(2000000).optional()
|
|
7035
7035
|
}).catchall(number().min(5000).max(2000000)).optional().describe("Absolute token thresholds per model. When matched, overrides execute_threshold_percentage for that model. Accepts `default` for all models or per-model keys. Values above 90% × context_limit are clamped with a warning log. Min 5_000, max 2_000_000."),
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
rawMessageWorkerSource2,
|
|
20
20
|
rawMessageOffThreadRangeReader2,
|
|
21
21
|
readRawSessionMessageIdOrdinalsForRange2
|
|
22
|
-
} from "./server-
|
|
22
|
+
} from "./server-dgsjamm4.js";
|
|
23
23
|
import {
|
|
24
24
|
readV2ArchiveOffThread2
|
|
25
|
-
} from "./server-
|
|
25
|
+
} from "./server-bnkc9kph.js";
|
|
26
26
|
|
|
27
27
|
// src/tools/ctx-expand/search-archive.ts
|
|
28
28
|
var archiveReadsOnThisThread = 0;
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./server-1rrmxhd1.js";
|
|
16
16
|
import {
|
|
17
17
|
isRecord
|
|
18
|
-
} from "./server-
|
|
18
|
+
} from "./server-z9czv2vb.js";
|
|
19
19
|
import {
|
|
20
20
|
cleanSearchText,
|
|
21
21
|
hintKeywordRelevance,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
isMessageIndexReconciledThrough,
|
|
26
26
|
clearIndexedMessages,
|
|
27
27
|
indexMessagesAfterOrdinal
|
|
28
|
-
} from "./server-
|
|
28
|
+
} from "./server-2xm0gxke.js";
|
|
29
29
|
import {
|
|
30
30
|
Priority,
|
|
31
31
|
AdmissionClass,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
enqueueShadowEmbeddingItems2,
|
|
58
58
|
getProjectEmbeddingSnapshot2,
|
|
59
59
|
embedItemsForProject2
|
|
60
|
-
} from "./server-
|
|
60
|
+
} from "./server-pcarsvj2.js";
|
|
61
61
|
import {
|
|
62
62
|
recordEmbeddingMeasurement
|
|
63
63
|
} from "./server-2amn2s73.js";
|
|
@@ -73,7 +73,7 @@ import {
|
|
|
73
73
|
sanitizeFtsQuery,
|
|
74
74
|
searchMemoriesFTS,
|
|
75
75
|
searchMemoriesFTSUnion
|
|
76
|
-
} from "./server-
|
|
76
|
+
} from "./server-vc5fta6s.js";
|
|
77
77
|
import {
|
|
78
78
|
ModuleMemoryAuthorityError2,
|
|
79
79
|
getMemoriesByProject2,
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
} from "./server-9emdjcb5.js";
|
|
83
83
|
import {
|
|
84
84
|
ensureMemoryEmbeddings2
|
|
85
|
-
} from "./server-
|
|
85
|
+
} from "./server-k1xc2bw1.js";
|
|
86
86
|
import {
|
|
87
87
|
MESSAGE_FTS_SESSION_FILTER_SQL,
|
|
88
88
|
withMessageFtsSessionFilter
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_LOCAL_EMBEDDING_MODEL
|
|
3
|
-
} from "./server-
|
|
3
|
+
} from "./server-e6xneh68.js";
|
|
4
4
|
import {
|
|
5
5
|
embedPauseBySession,
|
|
6
6
|
activeEmbeddingSessions,
|
|
@@ -83,7 +83,7 @@ import {
|
|
|
83
83
|
logLocalEmbeddingPoolingUnavailableOnce,
|
|
84
84
|
getEmbeddingProviderIdentity,
|
|
85
85
|
LocalEmbeddingProvider
|
|
86
|
-
} from "./server-
|
|
86
|
+
} from "./server-6chcnnhq.js";
|
|
87
87
|
import {
|
|
88
88
|
isKnownAutocommit
|
|
89
89
|
} from "./server-8ajstryz.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./server-fr0wbhdn.js";
|
|
8
8
|
import {
|
|
9
9
|
DEFAULT_LOCAL_EMBEDDING_MODEL
|
|
10
|
-
} from "./server-
|
|
10
|
+
} from "./server-e6xneh68.js";
|
|
11
11
|
import {
|
|
12
12
|
sessionLog2
|
|
13
13
|
} from "./server-j8376q08.js";
|
|
@@ -17,11 +17,11 @@ import {
|
|
|
17
17
|
} from "./server-ps6zrzwj.js";
|
|
18
18
|
import {
|
|
19
19
|
LocalEmbeddingProvider
|
|
20
|
-
} from "./server-
|
|
20
|
+
} from "./server-6chcnnhq.js";
|
|
21
21
|
import {
|
|
22
22
|
OpenAICompatibleEmbeddingProvider,
|
|
23
23
|
embedTextForProject2
|
|
24
|
-
} from "./server-
|
|
24
|
+
} from "./server-pcarsvj2.js";
|
|
25
25
|
import {
|
|
26
26
|
saveEmbeddingIfHashMatches
|
|
27
27
|
} from "./server-qjwpqvnf.js";
|
package/dist/v2/server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadPluginConfigDetailed
|
|
3
|
-
} from "./server-
|
|
3
|
+
} from "./server-00adcfjd.js";
|
|
4
4
|
import {
|
|
5
5
|
setHarness2
|
|
6
6
|
} from "./server-pavzsdc6.js";
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
union,
|
|
26
26
|
tuple,
|
|
27
27
|
record
|
|
28
|
-
} from "./server-
|
|
28
|
+
} from "./server-e6xneh68.js";
|
|
29
29
|
import {
|
|
30
30
|
pushNotification2
|
|
31
31
|
} from "./server-y14pawe1.js";
|
|
@@ -7878,7 +7878,7 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
7878
7878
|
// package.json
|
|
7879
7879
|
var package_default = {
|
|
7880
7880
|
name: "@cortexkit/opencode-magic-context",
|
|
7881
|
-
version: "0.49.
|
|
7881
|
+
version: "0.49.93",
|
|
7882
7882
|
type: "module",
|
|
7883
7883
|
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
7884
7884
|
main: "dist/index.js",
|
|
@@ -8199,7 +8199,7 @@ async function setup(context) {
|
|
|
8199
8199
|
if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
|
|
8200
8200
|
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.`);
|
|
8201
8201
|
}
|
|
8202
|
-
const { registerContext } = await import("./context-
|
|
8202
|
+
const { registerContext } = await import("./context-ctsd80vc.js");
|
|
8203
8203
|
setHarness2("opencode2");
|
|
8204
8204
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
8205
8205
|
const duties = await registerContext(context);
|
|
@@ -64,9 +64,9 @@ import {
|
|
|
64
64
|
adoptNullOwnerToolTag2,
|
|
65
65
|
getCandidateToolOwners2,
|
|
66
66
|
pickNearestPriorOwner2
|
|
67
|
-
} from "./server-
|
|
67
|
+
} from "./server-z9czv2vb.js";
|
|
68
68
|
import"./server-1zx87sdm.js";
|
|
69
|
-
import"./server-
|
|
69
|
+
import"./server-e6xneh68.js";
|
|
70
70
|
import"./server-qntmqaca.js";
|
|
71
71
|
import"./server-5sbsnpkn.js";
|
|
72
72
|
import"./server-qb3s0mnc.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getCompartments,
|
|
13
13
|
getLastCompartmentEndMessage,
|
|
14
14
|
requestPendingMaterialization
|
|
15
|
-
} from "./server-
|
|
15
|
+
} from "./server-4ecpanyn.js";
|
|
16
16
|
import"./server-2amn2s73.js";
|
|
17
17
|
import"./server-qb3s0mnc.js";
|
|
18
18
|
import"./server-ps6zrzwj.js";
|
|
@@ -25,7 +25,7 @@ import"./server-1d042x6w.js";
|
|
|
25
25
|
import"./server-6ash6z8z.js";
|
|
26
26
|
import"./server-ds8vpfkr.js";
|
|
27
27
|
import"./server-barj0mjz.js";
|
|
28
|
-
import"./server-
|
|
28
|
+
import"./server-2xm0gxke.js";
|
|
29
29
|
import {
|
|
30
30
|
getWrapupInProgressState,
|
|
31
31
|
acquireWrapupInProgress,
|
|
@@ -33,16 +33,16 @@ import {
|
|
|
33
33
|
releaseWrapupInProgress,
|
|
34
34
|
getHistorianFailureState,
|
|
35
35
|
clearEmergencyRecovery
|
|
36
|
-
} from "./server-
|
|
36
|
+
} from "./server-z9czv2vb.js";
|
|
37
37
|
import"./server-qntmqaca.js";
|
|
38
|
-
import"./server-
|
|
38
|
+
import"./server-btgnkr9z.js";
|
|
39
39
|
import"./server-1zx87sdm.js";
|
|
40
|
-
import"./server-
|
|
40
|
+
import"./server-e6xneh68.js";
|
|
41
41
|
import"./server-2ra6pwf3.js";
|
|
42
42
|
import"./server-5hwf5c7r.js";
|
|
43
43
|
import {
|
|
44
44
|
prepareRawSessionOrdinals2
|
|
45
|
-
} from "./server-
|
|
45
|
+
} from "./server-dgsjamm4.js";
|
|
46
46
|
import"./server-fr0wbhdn.js";
|
|
47
47
|
import"./server-jkj1dq6j.js";
|
|
48
48
|
import"./server-0tv6kytx.js";
|
|
@@ -65,16 +65,16 @@ import {
|
|
|
65
65
|
registerActiveCompartmentRun,
|
|
66
66
|
setRecompStarting2,
|
|
67
67
|
setRecompTerminal2
|
|
68
|
-
} from "./server-
|
|
68
|
+
} from "./server-cvp9w5gs.js";
|
|
69
69
|
import"./server-qt1qqasc.js";
|
|
70
|
-
import"./server-
|
|
70
|
+
import"./server-pcarsvj2.js";
|
|
71
71
|
import"./server-gqkdfdvw.js";
|
|
72
72
|
import"./server-qjwpqvnf.js";
|
|
73
|
-
import"./server-
|
|
74
|
-
import"./server-
|
|
75
|
-
import"./server-
|
|
73
|
+
import"./server-6chcnnhq.js";
|
|
74
|
+
import"./server-vc5fta6s.js";
|
|
75
|
+
import"./server-k1xc2bw1.js";
|
|
76
76
|
import"./server-9emdjcb5.js";
|
|
77
|
-
import"./server-
|
|
77
|
+
import"./server-00adcfjd.js";
|
|
78
78
|
import"./server-96nm9vk4.js";
|
|
79
79
|
import"./server-n5wn7d9b.js";
|
|
80
80
|
import"./server-j4jjtdc5.js";
|
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runManagedWrapup2
|
|
3
|
-
} from "./index-
|
|
4
|
-
import"./index-
|
|
5
|
-
import"./index-
|
|
3
|
+
} from "./index-hee64h6k.js";
|
|
4
|
+
import"./index-1kem0xxx.js";
|
|
5
|
+
import"./index-za1yx1m4.js";
|
|
6
6
|
import"./index-832w615x.js";
|
|
7
7
|
import"./index-sd3egckz.js";
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
8
|
+
import"./index-ttdk2w0z.js";
|
|
9
|
+
import"./index-5zrzg8r1.js";
|
|
10
10
|
import"./index-9emdjcb5.js";
|
|
11
|
-
import"./index-
|
|
11
|
+
import"./index-n9kd68vc.js";
|
|
12
12
|
import"./index-qjwpqvnf.js";
|
|
13
|
-
import"./index-
|
|
13
|
+
import"./index-yqha238s.js";
|
|
14
14
|
import"./index-mjy2k9jr.js";
|
|
15
|
-
import"./index-
|
|
15
|
+
import"./index-pnawfv4e.js";
|
|
16
16
|
import"./index-2amn2s73.js";
|
|
17
17
|
import"./index-01h7tqe3.js";
|
|
18
18
|
import"./index-xsqw8kbd.js";
|
|
19
19
|
import"./index-fqth7850.js";
|
|
20
20
|
import"./index-9ffntwyr.js";
|
|
21
21
|
import"./index-qt1qqasc.js";
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
22
|
+
import"./index-dr6bd4c8.js";
|
|
23
|
+
import"./index-xr1t0fxb.js";
|
|
24
24
|
import"./index-1zx87sdm.js";
|
|
25
25
|
import"./index-sp5pvs95.js";
|
|
26
26
|
import"./index-y14pawe1.js";
|
|
27
27
|
import"./index-e6ncz7a6.js";
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
28
|
+
import"./index-hes3k87g.js";
|
|
29
|
+
import"./index-y915t3ey.js";
|
|
30
30
|
import"./index-r4y0dczp.js";
|
|
31
31
|
import"./index-0twg41mh.js";
|
|
32
32
|
import"./index-6r99v53h.js";
|
|
33
|
-
import"./index-
|
|
33
|
+
import"./index-gqfy38m9.js";
|
|
34
34
|
import"./index-fb3zxn06.js";
|
|
35
35
|
import"./index-jba6ny4m.js";
|
|
36
36
|
import"./index-fr0wbhdn.js";
|
package/package.json
CHANGED