@cortexkit/opencode-magic-context 0.49.38 → 0.49.40
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 +1 -1
- package/dist/{context-3vgc2dmf.js → context-8ktz4j2b.js} +35 -30
- package/dist/features/magic-context/auto-search-diagnostics.d.ts +3 -1
- package/dist/features/magic-context/auto-search-diagnostics.d.ts.map +1 -1
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/{index-2rs7912w.js → index-9z4d2ha0.js} +34 -1
- package/dist/{index-7rn2x4gq.js → index-gfd41hm4.js} +10 -10
- package/dist/{index-dz48h1wx.js → index-hb76vdmm.js} +11 -5
- package/dist/{index-dfdg2cgg.js → index-hf771sk4.js} +7 -7
- package/dist/{index-8wztpf82.js → index-j5qma52p.js} +10 -9
- package/dist/{index-ys7j6679.js → index-m8v7nqgp.js} +1 -1
- package/dist/{index-4ks89h5a.js → index-ryz4pdvf.js} +1 -1
- package/dist/{index-9tdvbdv1.js → index-tr6vcwt0.js} +1 -1
- package/dist/{index-pp8vdn01.js → index-wk7x13qv.js} +2 -2
- package/dist/{index-prw8apnc.js → index-z7etaphs.js} +2 -2
- package/dist/index.js +13 -13
- package/dist/{message-index-bounded-wfk6aqxk.js → message-index-bounded-jqm3ezva.js} +1 -1
- package/dist/raw-ordinal-warmup-worker.js +3 -3
- package/dist/{recomp-orchestrator-wk509qkp.js → recomp-orchestrator-34mh19vm.js} +3 -3
- package/dist/{render-h1qarr8a.js → render-gqdq6t7f.js} +1 -1
- package/dist/{search-archive-q79hyqxs.js → search-archive-kfwpk73t.js} +2 -2
- package/dist/{search-v2twazx5.js → search-vqkmmy9c.js} +3 -3
- package/dist/shared/search-text.d.ts +2 -0
- package/dist/shared/search-text.d.ts.map +1 -1
- package/dist/{transform-postprocess-phase-4gj0mtcg.js → transform-postprocess-phase-61f7t9xq.js} +4 -4
- package/dist/v2/auto-search-worker.js +1 -1
- package/dist/v2/{context-m1te41ec.js → context-rdch08me.js} +33 -28
- package/dist/v2/fold/native-replay.d.ts.map +1 -1
- package/dist/v2/{message-index-bounded-w14496s9.js → message-index-bounded-dgd8a2x1.js} +1 -1
- package/dist/v2/raw-ordinal-warmup-worker.js +3 -3
- package/dist/v2/{recomp-orchestrator-9cjk6aej.js → recomp-orchestrator-x0r6sy3a.js} +2 -2
- package/dist/v2/{render-5dz1knf2.js → render-yyv8nv4p.js} +1 -1
- package/dist/v2/{search-archive-z6z9jqwf.js → search-archive-gagdnrb3.js} +2 -2
- package/dist/v2/{search-2n9zsqrm.js → search-cb1kdgqw.js} +2 -2
- package/dist/v2/{server-a9w5f0yw.js → server-2d01821b.js} +1 -1
- package/dist/v2/{server-e51xmr4d.js → server-2tp6y1qs.js} +2 -2
- package/dist/v2/{server-5by3vdzs.js → server-405ap0b0.js} +1 -1
- package/dist/v2/{server-dfq5vb8j.js → server-dt9b00ja.js} +34 -1
- package/dist/v2/{server-r0gdhz69.js → server-r4mmc670.js} +12 -6
- package/dist/v2/server.js +2 -2
- package/dist/v2/{v2-archive-reader-z7wr42ry.js → v2-archive-reader-2rv5dz7k.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-j1v62bkj.js → wrapup-orchestrator-f8w3kcjf.js} +2 -2
- package/dist/{v2-archive-reader-028z6kck.js → v2-archive-reader-4hz9pnmy.js} +1 -1
- package/dist/{wrapup-orchestrator-xg9avt2p.js → wrapup-orchestrator-7dxwer1p.js} +4 -4
- package/package.json +1 -1
- package/src/shared/search-text.test.ts +36 -1
- package/src/shared/search-text.ts +48 -0
|
@@ -31,7 +31,7 @@ serveWorkerJobs(async (initial, port) => {
|
|
|
31
31
|
import("./embedding-cache-mgyr73ef.js"),
|
|
32
32
|
import("./storage-memory-e6a7mb0k.js"),
|
|
33
33
|
import("./project-embedding-registry-3yyegjma.js"),
|
|
34
|
-
import("./search-
|
|
34
|
+
import("./search-vqkmmy9c.js"),
|
|
35
35
|
import("./compartment-chunk-embedding-ypktm0tk.js"),
|
|
36
36
|
import("./embedding-activity-g1dhes6g.js"),
|
|
37
37
|
import("./harness-e4avh192.js"),
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
rebaseSessionCoordinatesAsync,
|
|
38
38
|
resolveOpenCodeProtectedTailBoundary,
|
|
39
39
|
getActiveCompartmentRun
|
|
40
|
-
} from "./index-
|
|
40
|
+
} from "./index-tr6vcwt0.js";
|
|
41
41
|
import"./index-sd3egckz.js";
|
|
42
42
|
import {
|
|
43
43
|
getHarness2
|
|
@@ -131,7 +131,7 @@ import {
|
|
|
131
131
|
applyJsonSchemaParameterDescriptions,
|
|
132
132
|
MagicContextRpcServer,
|
|
133
133
|
subagentTemperature
|
|
134
|
-
} from "./index-
|
|
134
|
+
} from "./index-gfd41hm4.js";
|
|
135
135
|
import {
|
|
136
136
|
resolveHistorianModel2
|
|
137
137
|
} from "./index-5kym00ag.js";
|
|
@@ -214,11 +214,11 @@ import {
|
|
|
214
214
|
recordToolDefinitionSet,
|
|
215
215
|
getCurrentToolSetHash
|
|
216
216
|
} from "./index-jkanybgq.js";
|
|
217
|
-
import"./index-
|
|
217
|
+
import"./index-9z4d2ha0.js";
|
|
218
218
|
import"./index-b1ydbp95.js";
|
|
219
219
|
import {
|
|
220
220
|
scheduleClearAndReindex
|
|
221
|
-
} from "./index-
|
|
221
|
+
} from "./index-hb76vdmm.js";
|
|
222
222
|
import {
|
|
223
223
|
invalidateAutoEmbedSession,
|
|
224
224
|
clearEmbedSessionState
|
|
@@ -282,7 +282,7 @@ import {
|
|
|
282
282
|
EmergencyFailClosedError,
|
|
283
283
|
DegradedPassRefusalError,
|
|
284
284
|
isSyntheticHeadMessage2
|
|
285
|
-
} from "./index-
|
|
285
|
+
} from "./index-hf771sk4.js";
|
|
286
286
|
import"./index-850vthn3.js";
|
|
287
287
|
import"./index-qt1qqasc.js";
|
|
288
288
|
import {
|
|
@@ -303,8 +303,8 @@ import {
|
|
|
303
303
|
} from "./index-x8a7jmkh.js";
|
|
304
304
|
import"./index-fw42ms3m.js";
|
|
305
305
|
import"./index-ae1ar4v1.js";
|
|
306
|
-
import"./index-
|
|
307
|
-
import"./index-
|
|
306
|
+
import"./index-j5qma52p.js";
|
|
307
|
+
import"./index-m8v7nqgp.js";
|
|
308
308
|
import"./index-gp3kcpc4.js";
|
|
309
309
|
import {
|
|
310
310
|
detectConflicts
|
|
@@ -329,8 +329,8 @@ import {
|
|
|
329
329
|
import"./index-fmsr7v69.js";
|
|
330
330
|
import"./index-j105mf16.js";
|
|
331
331
|
import"./index-kaqs6h31.js";
|
|
332
|
-
import"./index-
|
|
333
|
-
import"./index-
|
|
332
|
+
import"./index-z7etaphs.js";
|
|
333
|
+
import"./index-ryz4pdvf.js";
|
|
334
334
|
import {
|
|
335
335
|
isDreamerRunnable,
|
|
336
336
|
isSmartNoteSurfaceAvailable,
|
|
@@ -2588,7 +2588,18 @@ ${cached}
|
|
|
2588
2588
|
const data = JSON.stringify(encodeNative(messages));
|
|
2589
2589
|
return { id: row.id, type: row.type, seq: row.seq, data, digest: foldDigest(data) };
|
|
2590
2590
|
}
|
|
2591
|
-
records(sessionID, native, reader,
|
|
2591
|
+
records(sessionID, native, reader, selection) {
|
|
2592
|
+
const after = selection?.floor.after;
|
|
2593
|
+
const candidates = native.flatMap((message) => {
|
|
2594
|
+
if (!selection)
|
|
2595
|
+
return [{ message, covered: false }];
|
|
2596
|
+
const id = nativeRowID(message);
|
|
2597
|
+
if (effortPart(message) || HEAD_IDS.some((head) => head === id) || !id && selection.baseline && message.role === "user" && message.content.some((part) => part.type === "text" && part.text === selection.baseline))
|
|
2598
|
+
return [];
|
|
2599
|
+
const seq = id && selection.floor.kind !== "start" ? reader.sequenceForId(sessionID, id) : undefined;
|
|
2600
|
+
return [{ message, covered: seq !== undefined && seq <= selection.floor.after }];
|
|
2601
|
+
});
|
|
2602
|
+
native = candidates.filter(({ covered }) => !covered).map(({ message }) => message);
|
|
2592
2603
|
const through = reader.latestSequence(sessionID);
|
|
2593
2604
|
const retained = this.stampMRU;
|
|
2594
2605
|
let metadata = this.metadata.get(sessionID);
|
|
@@ -2627,7 +2638,12 @@ ${cached}
|
|
|
2627
2638
|
const leadingIDs = new Map(leading.map((message, i) => [message, leadingRows[i]?.id]));
|
|
2628
2639
|
let cursor = -1;
|
|
2629
2640
|
let owner;
|
|
2630
|
-
for (const message of
|
|
2641
|
+
for (const { message, covered } of candidates) {
|
|
2642
|
+
if (covered) {
|
|
2643
|
+
if (message.role !== "tool")
|
|
2644
|
+
owner = undefined;
|
|
2645
|
+
continue;
|
|
2646
|
+
}
|
|
2631
2647
|
let id = nativeRowID(message);
|
|
2632
2648
|
if (this.options.protocol === 3 && !id && message.role === "system") {
|
|
2633
2649
|
const text = message.content.filter((part) => part.type === "text").map((part) => part.text).join(`
|
|
@@ -2645,8 +2661,11 @@ ${cached}
|
|
|
2645
2661
|
} else
|
|
2646
2662
|
id = metadata.find((row) => row.type === "system" && row.seq > cursor)?.id;
|
|
2647
2663
|
}
|
|
2648
|
-
if (!id && message.role === "tool")
|
|
2664
|
+
if (!id && message.role === "tool") {
|
|
2649
2665
|
id = owner;
|
|
2666
|
+
if (selection && !id)
|
|
2667
|
+
continue;
|
|
2668
|
+
}
|
|
2650
2669
|
const row = id ? byID.get(id) : undefined;
|
|
2651
2670
|
if (!row)
|
|
2652
2671
|
throw new NativeReplayUnavailable("Native carrier has no source row coordinate");
|
|
@@ -2668,30 +2687,16 @@ ${cached}
|
|
|
2668
2687
|
rememberHostMedia(native);
|
|
2669
2688
|
const reader = this.openReader(draft.sessionID);
|
|
2670
2689
|
try {
|
|
2671
|
-
let captured = native;
|
|
2672
2690
|
if (this.options.protocol === 3) {
|
|
2673
2691
|
replay = await this.floorState(draft.sessionID, reader, boundary, draft);
|
|
2674
2692
|
if (!replay)
|
|
2675
2693
|
throw new NativeReplayUnavailable("No usable host replay boundary");
|
|
2676
2694
|
replay = { ...replay, blocked: false };
|
|
2677
|
-
const replayAfter = replay.floor.after;
|
|
2678
|
-
const replayStart = replay.floor.kind === "start";
|
|
2679
|
-
const baseline = this.servedBaseline(draft);
|
|
2680
|
-
captured = native.filter((message) => {
|
|
2681
|
-
if (effortPart(message))
|
|
2682
|
-
return false;
|
|
2683
|
-
const id = nativeRowID(message);
|
|
2684
|
-
if (HEAD_IDS.some((head) => head === id))
|
|
2685
|
-
return false;
|
|
2686
|
-
if (!id)
|
|
2687
|
-
return !(baseline && message.role === "user" && message.content.some((part) => part.type === "text" && part.text === baseline));
|
|
2688
|
-
if (replayStart)
|
|
2689
|
-
return true;
|
|
2690
|
-
const seq = reader.sequenceForId(draft.sessionID, id);
|
|
2691
|
-
return seq === undefined || seq > replayAfter;
|
|
2692
|
-
});
|
|
2693
2695
|
}
|
|
2694
|
-
let rows = this.records(draft.sessionID,
|
|
2696
|
+
let rows = replay ? this.records(draft.sessionID, native, reader, {
|
|
2697
|
+
floor: replay.floor,
|
|
2698
|
+
baseline: this.servedBaseline(draft)
|
|
2699
|
+
}) : this.records(draft.sessionID, native, reader);
|
|
2695
2700
|
if (replay) {
|
|
2696
2701
|
const identities = new Map;
|
|
2697
2702
|
for (const row of rows.filter((row) => row.type === "system")) {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import type { UnifiedSearchResult } from "./search";
|
|
1
|
+
import type { MemorySearchResult, UnifiedSearchResult } from "./search";
|
|
2
|
+
/** Keep full memory text in a side map for hint scoring so tools still receive only the preview. */
|
|
3
|
+
export declare function withMemoryHintContent(result: MemorySearchResult, fullContent: string): MemorySearchResult;
|
|
2
4
|
export type AutoSearchLane = "memory" | "messages" | "summaries" | "git";
|
|
3
5
|
export type ChunkPoolPeek = "not-run" | "hit" | "missing" | "transaction" | "signature-changed" | "no-model";
|
|
4
6
|
/** Only numeric aggregates and enumerated state values cross the worker boundary. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-search-diagnostics.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/auto-search-diagnostics.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"auto-search-diagnostics.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/auto-search-diagnostics.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAIxE,oGAAoG;AACpG,wBAAgB,qBAAqB,CACjC,MAAM,EAAE,kBAAkB,EAC1B,WAAW,EAAE,MAAM,GACpB,kBAAkB,CAGpB;AAED,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,GAAG,KAAK,CAAC;AACzE,MAAM,MAAM,aAAa,GACnB,SAAS,GACT,KAAK,GACL,SAAS,GACT,aAAa,GACb,mBAAmB,GACnB,UAAU,CAAC;AAEjB,qFAAqF;AACrF,MAAM,WAAW,qBAAqB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE;QAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;IACnF,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,WAAW,CAAC;IACxD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;CACjC;AAED,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM,GAAG,qBAAqB,CASpF;AAED,oEAAoE;AACpE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,MAAM,CActF;AAED,uFAAuF;AACvF,wBAAgB,oBAAoB,CAChC,WAAW,EAAE,qBAAqB,GAAG,SAAS,EAC9C,IAAI,EAAE,cAAc,EACpB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,mBAAmB,EAAE,GAC/B,IAAI,CASN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/search.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAkC,MAAM,qBAAqB,CAAC;AACpF,OAAO,EACH,KAAK,qBAAqB,
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/search.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAkC,MAAM,qBAAqB,CAAC;AACpF,OAAO,EACH,KAAK,qBAAqB,EAI7B,MAAM,2BAA2B,CAAC;AAsBnC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AASpE,OAAO,EASH,KAAK,WAAW,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAY,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAYtD;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAqD3C,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEnF,MAAM,WAAW,sBAAsB;IACnC,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB;IACrC,0BAA0B,EAAE,MAAM,EAAE,CAAC;IACrC,4BAA4B,EAAE,MAAM,CAAC;IACrC,oBAAoB,EAAE,mBAAmB,GAAG,IAAI,CAAC;CACpD;AAED,wBAAgB,8BAA8B,IAAI,wBAAwB,CAMzE;AAED,MAAM,WAAW,oBAAoB;IACjC,oFAAoF;IACpF,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAC9C,u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AkChC,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAK5C,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAqBjE;AA4wDD;;gFAEgF;AAChF,wBAAgB,6BAA6B,CAAC,IAAI,EAAE;IAChD,EAAE,EAAE,QAAQ,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd;gFAC4E;IAC5E,gBAAgB,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,wBAAwB,CAAC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,kBAAkB,EAAE,GAAG,IAAI,CAwD9B;AAED,wBAAsB,aAAa,CAC/B,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,oBAAyB,GACnC,OAAO,CAAC,mBAAmB,EAAE,CAAC,CA4XhC;AAsGD;;qDAEqD;AACrD,wBAAgB,mBAAmB,CAC/B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,mBAAmB,EAAE,EAC9B,gBAAgB,EAAE,MAAM,EACxB,WAAW,CAAC,EAAE,wBAAwB,GACvC,MAAM,CA6BR"}
|
|
@@ -66,6 +66,39 @@ function keywordRelevance(query, content) {
|
|
|
66
66
|
const words = new Set(terms(cleanSearchText(content)));
|
|
67
67
|
return 0.8 * needles.filter((term) => words.has(term)).length / needles.length;
|
|
68
68
|
}
|
|
69
|
+
var CJK_RUN = /^[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]+$/u;
|
|
70
|
+
var CJK_RUN_SPLIT = /([\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]+)/u;
|
|
71
|
+
function hintTerms(text) {
|
|
72
|
+
return [
|
|
73
|
+
...new Set(terms(text).flatMap((term) => term.split(CJK_RUN_SPLIT)).filter((term) => term.length > 0 && !QUERY_STOP_WORDS.has(term)))
|
|
74
|
+
];
|
|
75
|
+
}
|
|
76
|
+
function characterBigrams(run) {
|
|
77
|
+
const characters = [...run];
|
|
78
|
+
return characters.length === 1 ? characters : characters.slice(1).map((character, index) => characters[index] + character);
|
|
79
|
+
}
|
|
80
|
+
function hintKeywordRelevance(query, content) {
|
|
81
|
+
const needles = hintTerms(query);
|
|
82
|
+
if (needles.length === 0)
|
|
83
|
+
return 0;
|
|
84
|
+
const words = new Set(hintTerms(cleanSearchText(content)));
|
|
85
|
+
const runs = [...words].filter((word) => CJK_RUN.test(word));
|
|
86
|
+
const bigrams = new Set(runs.flatMap(characterBigrams));
|
|
87
|
+
let matched = 0;
|
|
88
|
+
for (const needle of needles) {
|
|
89
|
+
if (!CJK_RUN.test(needle)) {
|
|
90
|
+
matched += Number(words.has(needle));
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
const grams = characterBigrams(needle);
|
|
94
|
+
if ([...needle].length === 1) {
|
|
95
|
+
matched += Number(runs.some((run) => run.includes(needle)));
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
matched += Math.min(1, grams.filter((gram) => bigrams.has(gram)).length / Math.ceil(grams.length / 2));
|
|
99
|
+
}
|
|
100
|
+
return 0.8 * matched / needles.length;
|
|
101
|
+
}
|
|
69
102
|
function matchedSearchSnippet(content, query, cap = 220) {
|
|
70
103
|
const text = cleanSearchText(content);
|
|
71
104
|
const needles = new Set(terms(query));
|
|
@@ -556,4 +589,4 @@ function indexItemsAfterOrdinal(db, sessionId, items, finalWatermark, toSource)
|
|
|
556
589
|
return inserted;
|
|
557
590
|
}
|
|
558
591
|
|
|
559
|
-
export { clearCompressionDepth, clearCompressionDepthRange, cleanSearchText,
|
|
592
|
+
export { clearCompressionDepth, clearCompressionDepthRange, cleanSearchText, hintKeywordRelevance, matchedSearchSnippet, MESSAGE_INDEX_MAX_FTS_BYTES, messageIndexSkipKey, toMessageIndexSource, getMessageIndexSourceIdentity, isMessageIndexSourceCurrent, getLastIndexedOrdinal, getIndexedMessageCorpusSize, markMessageIndexDirty, getMessageIndexReconciliationStartOrdinal, isMessageIndexReconciledThrough, deleteIndexedMessage, clearIndexedMessagesInTransaction, clearIndexedMessages, getIndexableContent, indexSingleMessage, indexMessagesAfterOrdinal, indexSourcesAfterOrdinal };
|
|
@@ -191,7 +191,7 @@ import {
|
|
|
191
191
|
snapRangeToCompartments,
|
|
192
192
|
getActiveCompartmentRun,
|
|
193
193
|
startCompartmentAgent
|
|
194
|
-
} from "./index-
|
|
194
|
+
} from "./index-tr6vcwt0.js";
|
|
195
195
|
import {
|
|
196
196
|
hasTrustedAbsoluteWall,
|
|
197
197
|
applyProvenInputFloor,
|
|
@@ -558,7 +558,7 @@ import {
|
|
|
558
558
|
} from "./index-72czy45z.js";
|
|
559
559
|
import {
|
|
560
560
|
getLastIndexedOrdinal
|
|
561
|
-
} from "./index-
|
|
561
|
+
} from "./index-9z4d2ha0.js";
|
|
562
562
|
import {
|
|
563
563
|
SESSION_NOTE_CONDITION_ERROR,
|
|
564
564
|
getNoteByIdInScope,
|
|
@@ -691,13 +691,13 @@ import {
|
|
|
691
691
|
resolveMemoriesByIdsForSearch2,
|
|
692
692
|
unifiedSearch2,
|
|
693
693
|
formatSearchResults2
|
|
694
|
-
} from "./index-
|
|
694
|
+
} from "./index-j5qma52p.js";
|
|
695
695
|
import {
|
|
696
696
|
scheduleReconciliation,
|
|
697
697
|
scheduleIncrementalIndex,
|
|
698
698
|
getMessageIndexQueueHeapStats,
|
|
699
699
|
clearSessionTracking
|
|
700
|
-
} from "./index-
|
|
700
|
+
} from "./index-hb76vdmm.js";
|
|
701
701
|
import {
|
|
702
702
|
flushIgnoredMessages2,
|
|
703
703
|
clearIgnoredMessages2,
|
|
@@ -707,7 +707,7 @@ import {
|
|
|
707
707
|
import {
|
|
708
708
|
setRecompStarting2,
|
|
709
709
|
setRecompTerminal2
|
|
710
|
-
} from "./index-
|
|
710
|
+
} from "./index-m8v7nqgp.js";
|
|
711
711
|
import {
|
|
712
712
|
makeToolCompositeKey,
|
|
713
713
|
searchMessageHistoryOffThread,
|
|
@@ -772,7 +772,7 @@ import {
|
|
|
772
772
|
abortSessionFailClosed2,
|
|
773
773
|
evaluateEmergencyFailClosed2,
|
|
774
774
|
runPostTransformPhase2
|
|
775
|
-
} from "./index-
|
|
775
|
+
} from "./index-hf771sk4.js";
|
|
776
776
|
import {
|
|
777
777
|
ANNOUNCEMENT_VERSION2,
|
|
778
778
|
ANNOUNCEMENT_FEATURES2,
|
|
@@ -790,10 +790,10 @@ import {
|
|
|
790
790
|
} from "./index-j105mf16.js";
|
|
791
791
|
import {
|
|
792
792
|
readV2ArchiveOffThread2
|
|
793
|
-
} from "./index-
|
|
793
|
+
} from "./index-z7etaphs.js";
|
|
794
794
|
import {
|
|
795
795
|
renderSearchArchiveOffThread2
|
|
796
|
-
} from "./index-
|
|
796
|
+
} from "./index-ryz4pdvf.js";
|
|
797
797
|
import {
|
|
798
798
|
COMPACTION_ENABLED_PATH,
|
|
799
799
|
isDreamerRunnable,
|
|
@@ -16418,7 +16418,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16418
16418
|
const db = readDatabase();
|
|
16419
16419
|
if (!db)
|
|
16420
16420
|
return { ok: false, error: "db unavailable" };
|
|
16421
|
-
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-
|
|
16421
|
+
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-34mh19vm.js"));
|
|
16422
16422
|
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-14p3yje4.js"));
|
|
16423
16423
|
log2(`[rpc] recomp requested for session ${sessionId}`);
|
|
16424
16424
|
if (!args.client && !args.hiddenCompletionExecutor) {
|
|
@@ -16503,7 +16503,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16503
16503
|
const db = readDatabase();
|
|
16504
16504
|
if (!db)
|
|
16505
16505
|
return { ok: false, error: "db unavailable" };
|
|
16506
|
-
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-
|
|
16506
|
+
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-7dxwer1p.js"));
|
|
16507
16507
|
const model = liveSessionState.liveModelBySession.get(sessionId);
|
|
16508
16508
|
const contextLimit = model ? resolveContextLimit(model.providerID, model.modelID, { db, sessionID: sessionId }) : 128000;
|
|
16509
16509
|
const ctx = {
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./index-txs8tce6.js";
|
|
20
20
|
import {
|
|
21
21
|
cleanSearchText,
|
|
22
|
-
|
|
22
|
+
hintKeywordRelevance,
|
|
23
23
|
getMessageIndexSourceIdentity,
|
|
24
24
|
isMessageIndexSourceCurrent,
|
|
25
25
|
getLastIndexedOrdinal,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
clearIndexedMessages,
|
|
29
29
|
indexSingleMessage,
|
|
30
30
|
indexMessagesAfterOrdinal
|
|
31
|
-
} from "./index-
|
|
31
|
+
} from "./index-9z4d2ha0.js";
|
|
32
32
|
|
|
33
33
|
// src/features/magic-context/message-index-async.ts
|
|
34
34
|
var indexCancellations = new Map;
|
|
@@ -429,6 +429,11 @@ function invalidateIncrementalWork(sessionId) {
|
|
|
429
429
|
}
|
|
430
430
|
|
|
431
431
|
// src/features/magic-context/auto-search-diagnostics.ts
|
|
432
|
+
var memoryHintContent = new WeakMap;
|
|
433
|
+
function withMemoryHintContent(result, fullContent) {
|
|
434
|
+
memoryHintContent.set(result, fullContent);
|
|
435
|
+
return result;
|
|
436
|
+
}
|
|
432
437
|
function createAutoSearchDiagnostics(threshold) {
|
|
433
438
|
return {
|
|
434
439
|
threshold,
|
|
@@ -440,9 +445,10 @@ function createAutoSearchDiagnostics(threshold) {
|
|
|
440
445
|
};
|
|
441
446
|
}
|
|
442
447
|
function autoSearchRelevance(query, result) {
|
|
443
|
-
|
|
448
|
+
const content = result.source === "memory" ? memoryHintContent.get(result) ?? result.content : result.source === "compartment" ? result.title : result.content;
|
|
449
|
+
if (cleanSearchText(content).length === 0)
|
|
444
450
|
return 0;
|
|
445
|
-
return result.source === "message" || "matchType" in result && result.source !== "compartment" && result.matchType !== "semantic" ?
|
|
451
|
+
return result.source === "message" || "matchType" in result && result.source !== "compartment" && result.matchType !== "semantic" ? hintKeywordRelevance(query, content) : result.score;
|
|
446
452
|
}
|
|
447
453
|
function recordAutoSearchLane(diagnostics, lane, query, results) {
|
|
448
454
|
if (!diagnostics)
|
|
@@ -454,4 +460,4 @@ function recordAutoSearchLane(diagnostics, lane, query, results) {
|
|
|
454
460
|
};
|
|
455
461
|
}
|
|
456
462
|
|
|
457
|
-
export { getMessageIndexEpoch, isMessageIndexSearchable, scheduleReconciliation, scheduleIncrementalIndex, scheduleClearAndReindex, getMessageIndexQueueHeapStats, clearSessionTracking, createAutoSearchDiagnostics, autoSearchRelevance, recordAutoSearchLane };
|
|
463
|
+
export { getMessageIndexEpoch, isMessageIndexSearchable, scheduleReconciliation, scheduleIncrementalIndex, scheduleClearAndReindex, getMessageIndexQueueHeapStats, clearSessionTracking, withMemoryHintContent, createAutoSearchDiagnostics, autoSearchRelevance, recordAutoSearchLane };
|
|
@@ -124,7 +124,7 @@ import {
|
|
|
124
124
|
import {
|
|
125
125
|
cleanSearchText,
|
|
126
126
|
matchedSearchSnippet
|
|
127
|
-
} from "./index-
|
|
127
|
+
} from "./index-9z4d2ha0.js";
|
|
128
128
|
import {
|
|
129
129
|
stripSystemInjection,
|
|
130
130
|
isTextPart,
|
|
@@ -234,6 +234,11 @@ import {
|
|
|
234
234
|
import {
|
|
235
235
|
isEmbeddingHostBusy2
|
|
236
236
|
} from "./index-qt1qqasc.js";
|
|
237
|
+
import {
|
|
238
|
+
getMessageIndexEpoch,
|
|
239
|
+
isMessageIndexSearchable,
|
|
240
|
+
createAutoSearchDiagnostics
|
|
241
|
+
} from "./index-hb76vdmm.js";
|
|
237
242
|
import {
|
|
238
243
|
openCodeDbExists,
|
|
239
244
|
withReadOnlySessionDb,
|
|
@@ -242,11 +247,6 @@ import {
|
|
|
242
247
|
import {
|
|
243
248
|
BoundedSessionMap
|
|
244
249
|
} from "./index-jkanybgq.js";
|
|
245
|
-
import {
|
|
246
|
-
getMessageIndexEpoch,
|
|
247
|
-
isMessageIndexSearchable,
|
|
248
|
-
createAutoSearchDiagnostics
|
|
249
|
-
} from "./index-dz48h1wx.js";
|
|
250
250
|
import {
|
|
251
251
|
compareOpenCodeMessagesByCanonicalOrder,
|
|
252
252
|
prepareCompactionMarkerCandidates,
|
|
@@ -266,7 +266,7 @@ import {
|
|
|
266
266
|
peekNoteNudgeText,
|
|
267
267
|
markNoteNudgeDelivered,
|
|
268
268
|
getActiveCompartmentRun
|
|
269
|
-
} from "./index-
|
|
269
|
+
} from "./index-tr6vcwt0.js";
|
|
270
270
|
import {
|
|
271
271
|
userFacingFailureCode
|
|
272
272
|
} from "./index-xnm0wq1r.js";
|
|
@@ -69,7 +69,14 @@ import {
|
|
|
69
69
|
import {
|
|
70
70
|
matchedSearchSnippet,
|
|
71
71
|
getIndexedMessageCorpusSize
|
|
72
|
-
} from "./index-
|
|
72
|
+
} from "./index-9z4d2ha0.js";
|
|
73
|
+
import {
|
|
74
|
+
getMessageIndexEpoch,
|
|
75
|
+
isMessageIndexSearchable,
|
|
76
|
+
withMemoryHintContent,
|
|
77
|
+
autoSearchRelevance,
|
|
78
|
+
recordAutoSearchLane
|
|
79
|
+
} from "./index-hb76vdmm.js";
|
|
73
80
|
import {
|
|
74
81
|
MESSAGE_FTS_SESSION_FILTER_SQL,
|
|
75
82
|
withMessageFtsSessionFilter
|
|
@@ -77,12 +84,6 @@ import {
|
|
|
77
84
|
import {
|
|
78
85
|
isRecord
|
|
79
86
|
} from "./index-8jjjmhab.js";
|
|
80
|
-
import {
|
|
81
|
-
getMessageIndexEpoch,
|
|
82
|
-
isMessageIndexSearchable,
|
|
83
|
-
autoSearchRelevance,
|
|
84
|
-
recordAutoSearchLane
|
|
85
|
-
} from "./index-dz48h1wx.js";
|
|
86
87
|
import {
|
|
87
88
|
resolveWorkspaceShareCategories,
|
|
88
89
|
resolveWorkspaceIdentitySet,
|
|
@@ -2230,7 +2231,7 @@ function mergeMemoryResults(args) {
|
|
|
2230
2231
|
suppressedVisibleIds.push(id);
|
|
2231
2232
|
continue;
|
|
2232
2233
|
}
|
|
2233
|
-
results.push({
|
|
2234
|
+
results.push(withMemoryHintContent({
|
|
2234
2235
|
source: "memory",
|
|
2235
2236
|
content: previewText(memory.content),
|
|
2236
2237
|
score,
|
|
@@ -2238,7 +2239,7 @@ function mergeMemoryResults(args) {
|
|
|
2238
2239
|
category: memory.category,
|
|
2239
2240
|
matchType,
|
|
2240
2241
|
sourceName: args.sourceNameByMemoryId?.get(memory.id)
|
|
2241
|
-
});
|
|
2242
|
+
}, memory.content));
|
|
2242
2243
|
}
|
|
2243
2244
|
return {
|
|
2244
2245
|
results: results.sort((left, right) => {
|
|
@@ -32,14 +32,14 @@ import {
|
|
|
32
32
|
getActiveCompartmentRun,
|
|
33
33
|
markActiveCompartmentRunPublished,
|
|
34
34
|
registerActiveCompartmentRun
|
|
35
|
-
} from "./index-
|
|
35
|
+
} from "./index-tr6vcwt0.js";
|
|
36
36
|
import {
|
|
37
37
|
sendStatusNotification2
|
|
38
38
|
} from "./index-ae1ar4v1.js";
|
|
39
39
|
import {
|
|
40
40
|
setRecompStarting2,
|
|
41
41
|
setRecompTerminal2
|
|
42
|
-
} from "./index-
|
|
42
|
+
} from "./index-m8v7nqgp.js";
|
|
43
43
|
|
|
44
44
|
// src/hooks/magic-context/wrapup-orchestrator.ts
|
|
45
45
|
import * as crypto from "node:crypto";
|
|
@@ -140,8 +140,8 @@ async function serveV2ArchiveReads2(port, openConnections) {
|
|
|
140
140
|
import("./store-reader-yh19h38c.js"),
|
|
141
141
|
import("./store-s3eykdjt.js"),
|
|
142
142
|
import("./read-session-chunk-26yrrhyz.js"),
|
|
143
|
-
import("./render-
|
|
144
|
-
import("./search-archive-
|
|
143
|
+
import("./render-gqdq6t7f.js"),
|
|
144
|
+
import("./search-archive-kfwpk73t.js"),
|
|
145
145
|
import("./expand-attachments-h33jbgyz.js")
|
|
146
146
|
]);
|
|
147
147
|
const pool = new V2StoreReaderPool;
|
package/dist/index.js
CHANGED
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
checkCompactionMarkerConsistency,
|
|
85
85
|
clearInjectionCache,
|
|
86
86
|
clearNoteNudgeTriggerOnly
|
|
87
|
-
} from "./index-
|
|
87
|
+
} from "./index-tr6vcwt0.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-gfd41hm4.js";
|
|
175
175
|
import {
|
|
176
176
|
resolveOpenCodeDbPath,
|
|
177
177
|
openCodeDbPathExists,
|
|
@@ -259,7 +259,7 @@ import"./index-g4t7850m.js";
|
|
|
259
259
|
import {
|
|
260
260
|
getDefaultSubcConnectionFile,
|
|
261
261
|
SubcModuleTransport
|
|
262
|
-
} from "./index-
|
|
262
|
+
} from "./index-j5qma52p.js";
|
|
263
263
|
import"./index-qt1qqasc.js";
|
|
264
264
|
import"./index-fw42ms3m.js";
|
|
265
265
|
import {
|
|
@@ -297,7 +297,7 @@ import {
|
|
|
297
297
|
import"./index-dcjkw41m.js";
|
|
298
298
|
import {
|
|
299
299
|
deleteIndexedMessage
|
|
300
|
-
} from "./index-
|
|
300
|
+
} from "./index-9z4d2ha0.js";
|
|
301
301
|
import"./index-66a50f3e.js";
|
|
302
302
|
import"./index-2qbtqg1w.js";
|
|
303
303
|
import {
|
|
@@ -319,13 +319,13 @@ import {
|
|
|
319
319
|
clearToolPermissionDenied,
|
|
320
320
|
collectForeignTextParts,
|
|
321
321
|
resetDegradedCacheCount2
|
|
322
|
-
} from "./index-
|
|
322
|
+
} from "./index-hf771sk4.js";
|
|
323
323
|
import {
|
|
324
324
|
scheduleClearAndReindex
|
|
325
|
-
} from "./index-
|
|
325
|
+
} from "./index-hb76vdmm.js";
|
|
326
326
|
import {
|
|
327
327
|
runManagedRecomp2
|
|
328
|
-
} from "./index-
|
|
328
|
+
} from "./index-m8v7nqgp.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-
|
|
336
|
+
} from "./index-wk7x13qv.js";
|
|
337
337
|
import"./index-j105mf16.js";
|
|
338
338
|
import"./index-kaqs6h31.js";
|
|
339
|
-
import"./index-
|
|
340
|
-
import"./index-
|
|
339
|
+
import"./index-z7etaphs.js";
|
|
340
|
+
import"./index-ryz4pdvf.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.40",
|
|
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-8ktz4j2b.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-61f7t9xq.js"));
|
|
12536
12536
|
await sendStatusNotification(ctx.client, sessionId, message, {
|
|
12537
12537
|
toastDurationMs: 15000
|
|
12538
12538
|
});
|
|
@@ -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-4hz9pnmy.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-kfwpk73t.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-jqm3ezva.js"),
|
|
85
85
|
import("./sqlite-context-pragmas-mv9jqwjh.js")
|
|
86
86
|
]);
|
|
87
87
|
configureContextDatabasePragmas(db);
|