@cortexkit/opencode-magic-context 0.49.103 → 0.49.104
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 +5 -5
- package/dist/{context-jk7bgc3s.js → context-7hbmnpe8.js} +11 -11
- package/dist/{embedding-backfill-anty7zdf.js → embedding-backfill-aratv25b.js} +4 -4
- package/dist/{v2/embedding-cache-dveynq4m.js → embedding-cache-fhdkn9nc.js} +3 -1
- package/dist/embedding-worker.js +1 -1
- package/dist/features/magic-context/memory/embedding-cache.d.ts +1 -0
- package/dist/features/magic-context/memory/embedding-cache.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-worker-client.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-worker-loop.d.ts +9 -1
- package/dist/features/magic-context/memory/embedding-worker-loop.d.ts.map +1 -1
- package/dist/{index-mes48s7a.js → index-3rp2b482.js} +11 -11
- package/dist/{index-vhx6yph7.js → index-4ba3zp54.js} +2 -2
- package/dist/{index-qbydvfev.js → index-6xg55350.js} +15 -11
- package/dist/{index-jyj9jg9f.js → index-8eke8yh2.js} +2 -2
- package/dist/{index-6t6v8prs.js → index-8gzmeyae.js} +2 -2
- package/dist/{index-42fg6tzz.js → index-8yj4vd7k.js} +4 -4
- package/dist/{index-jg5whyrd.js → index-a9wn0d9h.js} +2 -2
- package/dist/{index-9mxkvdtp.js → index-mwjvjn0p.js} +5 -5
- package/dist/{index-nyjztqyj.js → index-p5ey52j9.js} +32 -5
- package/dist/{index-7jvc0rhh.js → index-sqvkh5d0.js} +3 -3
- package/dist/{index-pw1f07vg.js → index-srpghrje.js} +1 -1
- package/dist/{index-t2h3484a.js → index-tvh3y650.js} +3 -3
- package/dist/index.js +15 -15
- package/dist/{project-embedding-registry-4cv7n37m.js → project-embedding-registry-1n4cexsv.js} +3 -3
- package/dist/{recomp-orchestrator-vg4cxyp7.js → recomp-orchestrator-16rs8aty.js} +8 -8
- package/dist/{search-ygtyb91s.js → search-v9ywqb4f.js} +7 -7
- package/dist/{storage-memory-p91f7b5h.js → storage-memory-24hsvzy8.js} +2 -2
- package/dist/{transform-postprocess-phase-958fmjs5.js → transform-postprocess-phase-yef4mxk3.js} +8 -8
- package/dist/v2/auto-search-worker.js +5 -5
- package/dist/v2/{context-3g3jvxg8.js → context-mk2h2ven.js} +10 -10
- package/dist/v2/{embedding-backfill-ra9gbbs4.js → embedding-backfill-kyn5sv0f.js} +4 -4
- package/dist/{embedding-cache-dveynq4m.js → v2/embedding-cache-fhdkn9nc.js} +3 -1
- package/dist/v2/embedding-worker.js +1 -1
- package/dist/v2/{project-embedding-registry-gdaqb7h0.js → project-embedding-registry-1jv2rxhb.js} +3 -3
- package/dist/v2/{recomp-orchestrator-29m3cc5b.js → recomp-orchestrator-5t2csd46.js} +7 -7
- package/dist/v2/{search-ybyc7vmx.js → search-w9m2fd5c.js} +7 -7
- package/dist/v2/{server-df5scn4q.js → server-3gnpqjez.js} +3 -3
- package/dist/v2/{server-kx5egpt7.js → server-47ajg9xc.js} +4 -4
- package/dist/v2/{server-qbydvfev.js → server-6xg55350.js} +15 -11
- package/dist/v2/{server-r851hxn5.js → server-af51b1zg.js} +5 -5
- package/dist/v2/{server-pqgnjf38.js → server-gkb0y83n.js} +32 -5
- package/dist/v2/{server-pw1f07vg.js → server-srpghrje.js} +1 -1
- package/dist/v2/{server-fagcnt6j.js → server-wmpgvvc4.js} +2 -2
- package/dist/v2/{server-1qxdyz4p.js → server-zsbc0n4v.js} +2 -2
- package/dist/v2/server.js +2 -2
- package/dist/v2/{storage-memory-p91f7b5h.js → storage-memory-24hsvzy8.js} +2 -2
- package/dist/v2/{wrapup-orchestrator-ahkq8a61.js → wrapup-orchestrator-ykgx8hw8.js} +7 -7
- package/dist/{wrapup-orchestrator-gjqaac65.js → wrapup-orchestrator-a9tshrp4.js} +9 -9
- package/package.json +1 -1
|
@@ -27,11 +27,11 @@ serveWorkerJobs(async (initial, port) => {
|
|
|
27
27
|
{ Database, registerSqliteDiagnosticSink },
|
|
28
28
|
{ log }
|
|
29
29
|
] = await Promise.all([
|
|
30
|
-
import("./embedding-backfill-
|
|
31
|
-
import("./embedding-cache-
|
|
32
|
-
import("./storage-memory-
|
|
33
|
-
import("./project-embedding-registry-
|
|
34
|
-
import("./search-
|
|
30
|
+
import("./embedding-backfill-aratv25b.js"),
|
|
31
|
+
import("./embedding-cache-fhdkn9nc.js"),
|
|
32
|
+
import("./storage-memory-24hsvzy8.js"),
|
|
33
|
+
import("./project-embedding-registry-1n4cexsv.js"),
|
|
34
|
+
import("./search-v9ywqb4f.js"),
|
|
35
35
|
import("./compartment-chunk-embedding-gnemmf79.js"),
|
|
36
36
|
import("./embedding-activity-g1dhes6g.js"),
|
|
37
37
|
import("./harness-e4avh192.js"),
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
clearNoteNudgeTriggerOnly,
|
|
55
55
|
nonNarrativeStoredGapRanges,
|
|
56
56
|
getActiveCompartmentRun
|
|
57
|
-
} from "./index-
|
|
57
|
+
} from "./index-sqvkh5d0.js";
|
|
58
58
|
import"./index-sd3egckz.js";
|
|
59
59
|
import {
|
|
60
60
|
getHarness2
|
|
@@ -153,7 +153,7 @@ import {
|
|
|
153
153
|
applyJsonSchemaParameterDescriptions,
|
|
154
154
|
MagicContextRpcServer,
|
|
155
155
|
subagentTemperature
|
|
156
|
-
} from "./index-
|
|
156
|
+
} from "./index-3rp2b482.js";
|
|
157
157
|
import {
|
|
158
158
|
invalidateAutoEmbedSession,
|
|
159
159
|
clearEmbedSessionState
|
|
@@ -356,21 +356,21 @@ import {
|
|
|
356
356
|
servedHeadChanged,
|
|
357
357
|
noteHostCheckpointCommit,
|
|
358
358
|
isSyntheticHeadMessage2
|
|
359
|
-
} from "./index-
|
|
359
|
+
} from "./index-tvh3y650.js";
|
|
360
360
|
import"./index-qxzk5s30.js";
|
|
361
361
|
import"./index-qt1qqasc.js";
|
|
362
362
|
import {
|
|
363
363
|
retainProjectEmbedding2
|
|
364
|
-
} from "./index-
|
|
364
|
+
} from "./index-4ba3zp54.js";
|
|
365
365
|
import"./index-fd3hkyk1.js";
|
|
366
|
-
import"./index-
|
|
367
|
-
import"./index-
|
|
366
|
+
import"./index-6xg55350.js";
|
|
367
|
+
import"./index-p5ey52j9.js";
|
|
368
368
|
import {
|
|
369
369
|
renderUserFacingFailure,
|
|
370
370
|
userFacingFailureCode
|
|
371
|
-
} from "./index-
|
|
372
|
-
import"./index-
|
|
373
|
-
import"./index-
|
|
371
|
+
} from "./index-8yj4vd7k.js";
|
|
372
|
+
import"./index-8eke8yh2.js";
|
|
373
|
+
import"./index-srpghrje.js";
|
|
374
374
|
import {
|
|
375
375
|
pushLiveNotification2,
|
|
376
376
|
pushNotification2,
|
|
@@ -378,8 +378,8 @@ import {
|
|
|
378
378
|
} from "./index-y14pawe1.js";
|
|
379
379
|
import"./index-y5f5yg5a.js";
|
|
380
380
|
import"./index-61a853ky.js";
|
|
381
|
-
import"./index-
|
|
382
|
-
import"./index-
|
|
381
|
+
import"./index-mwjvjn0p.js";
|
|
382
|
+
import"./index-a9wn0d9h.js";
|
|
383
383
|
import"./index-cayqdwf9.js";
|
|
384
384
|
import {
|
|
385
385
|
detectConflicts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureMemoryEmbeddings2
|
|
3
|
-
} from "./index-
|
|
4
|
-
import"./index-
|
|
5
|
-
import"./index-
|
|
3
|
+
} from "./index-8eke8yh2.js";
|
|
4
|
+
import"./index-4ba3zp54.js";
|
|
5
|
+
import"./index-6xg55350.js";
|
|
6
6
|
import"./index-2amn2s73.js";
|
|
7
7
|
import"./index-qt1qqasc.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-p5ey52j9.js";
|
|
9
9
|
import"./index-r3f85n7y.js";
|
|
10
10
|
import"./index-fd3hkyk1.js";
|
|
11
11
|
import"./index-1vv1ka4a.js";
|
|
@@ -6,9 +6,11 @@ import {
|
|
|
6
6
|
invalidateProject2,
|
|
7
7
|
invalidateMemory2,
|
|
8
8
|
resetEmbeddingCacheForTests2,
|
|
9
|
+
getEmbeddingCacheSizeForTests2,
|
|
9
10
|
setEmbeddingCacheTtlForTests2
|
|
10
|
-
} from "./
|
|
11
|
+
} from "./index-6xg55350.js";
|
|
11
12
|
export {
|
|
13
|
+
getEmbeddingCacheSizeForTests2 as getEmbeddingCacheSizeForTests,
|
|
12
14
|
getProjectEmbeddings2 as getProjectEmbeddings,
|
|
13
15
|
invalidateMemory2 as invalidateMemory,
|
|
14
16
|
invalidateProject2 as invalidateProject,
|
package/dist/embedding-worker.js
CHANGED
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
resolveLocalEmbeddingWorkerRuntime,
|
|
19
19
|
getLocalEmbeddingNativeMemoryStats,
|
|
20
20
|
LocalEmbeddingProvider
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-p5ey52j9.js";
|
|
22
22
|
|
|
23
23
|
// src/features/magic-context/memory/embedding-worker.ts
|
|
24
24
|
import { parentPort, workerData } from "node:worker_threads";
|
|
@@ -12,5 +12,6 @@ export declare function peekProjectEmbeddings(projectPath: string, modelId: stri
|
|
|
12
12
|
export declare function invalidateProject(projectPath: string): void;
|
|
13
13
|
export declare function invalidateMemory(projectPath: string, memoryId: number): void;
|
|
14
14
|
export declare function resetEmbeddingCacheForTests(): void;
|
|
15
|
+
export declare function getEmbeddingCacheSizeForTests(): number;
|
|
15
16
|
export declare function setEmbeddingCacheTtlForTests(ttlMs: number): void;
|
|
16
17
|
//# sourceMappingURL=embedding-cache.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedding-cache.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/memory/embedding-cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAa,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAqB,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AA2B5F;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAK7D;AA4BD,wBAAgB,kCAAkC,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAcrE;
|
|
1
|
+
{"version":3,"file":"embedding-cache.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/memory/embedding-cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAa,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAqB,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AA2B5F;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAK7D;AA4BD,wBAAgB,kCAAkC,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAcrE;AAoBD,wBAAgB,oBAAoB,CAChC,EAAE,EAAE,QAAQ,EACZ,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,GAChB,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAwBpC;AAED,wBAAgB,qBAAqB,CACjC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,GAChB,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,GAAG,IAAI,CAE3C;AAED,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAM3D;AAED,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAU5E;AAED,wBAAgB,2BAA2B,IAAI,IAAI,CAGlD;AAED,wBAAgB,6BAA6B,IAAI,MAAM,CAEtD;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAEhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedding-worker-client.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/memory/embedding-worker-client.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"embedding-worker-client.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/memory/embedding-worker-client.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AAMzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,YAAY,GAAG,IAAI,CAAC,EAAE,CAAC;IAClC,OAAO,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,+BAA+B,CAAC;CAC3C,CAAC;AAEF,qBAAa,4BAA6B,SAAQ,KAAK;;CAItD;AAGD,MAAM,MAAM,wBAAwB,GAAG,IAAI,CAAC,oBAAoB,EAAE,SAAS,CAAC,GAAG;IAC3E,OAAO,CAAC,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;CAC/B,CAAC;AAIF;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,OAAQ,CAAC;AAEpD;;;;GAIG;AACH,eAAO,MAAM,oCAAoC,OAAQ,CAAC;AAG1D,+EAA+E;AAC/E,eAAO,MAAM,4BAA4B,QAGL,CAAC;AAiBrC,MAAM,MAAM,4BAA4B,GAAG;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,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Request = {
|
|
5
5
|
stop: true;
|
|
6
6
|
};
|
|
7
|
+
/**
|
|
8
|
+
* Sent by the client when a caller gave up on request `cancel`. The worker skips
|
|
9
|
+
* that request if it has not started, and starts no further batch of it if it is
|
|
10
|
+
* running. It never stops the worker, and an id the worker does not hold is ignored.
|
|
11
|
+
*/
|
|
12
|
+
export type EmbeddingWorkerCancelRequest = {
|
|
13
|
+
cancel: number;
|
|
14
|
+
};
|
|
7
15
|
/**
|
|
8
16
|
* Sent by the worker while it stops. `stopping` answers the stop request as soon
|
|
9
17
|
* as the worker's JavaScript runs again; `stopped` follows once the model is
|
|
@@ -35,7 +43,7 @@ export interface EmbeddingWorkerPort {
|
|
|
35
43
|
postMessage(message: unknown, transfer?: ArrayBuffer[]): void;
|
|
36
44
|
}
|
|
37
45
|
export interface EmbeddingWorkerLoopOptions {
|
|
38
|
-
/** Texts per inference call;
|
|
46
|
+
/** Texts per inference call; stopping and cancellation are honoured between calls. */
|
|
39
47
|
batchSize: number;
|
|
40
48
|
stats?: () => LocalEmbeddingNativeMemoryStats | undefined;
|
|
41
49
|
/** Ends the worker once the model is released and `stopped` is posted. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedding-worker-loop.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/memory/embedding-worker-loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mBAAmB,CAAC;AAEzE,qFAAqF;AACrF,MAAM,MAAM,0BAA0B,GAAG;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"embedding-worker-loop.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/memory/embedding-worker-loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK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AC;IAClB,KAAK,CAAC,EAAE,MAAM,+BAA+B,GAAG,SAAS,CAAC;IAC1D,0EAA0E;IAC1E,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACtB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAChC,IAAI,EAAE,mBAAmB,EACzB,KAAK,EAAE,oBAAoB,EAC3B,OAAO,EAAE,0BAA0B,GACpC,IAAI,CAoGN"}
|
|
@@ -219,7 +219,7 @@ import {
|
|
|
219
219
|
snapRangeToCompartments,
|
|
220
220
|
getActiveCompartmentRun,
|
|
221
221
|
startCompartmentAgent
|
|
222
|
-
} from "./index-
|
|
222
|
+
} from "./index-sqvkh5d0.js";
|
|
223
223
|
import {
|
|
224
224
|
formatWindowDerivationLine,
|
|
225
225
|
getSdkWindowGeometry,
|
|
@@ -635,7 +635,7 @@ import {
|
|
|
635
635
|
getCachedLocalEmbeddingPooling,
|
|
636
636
|
preflightLocalEmbeddingPooling,
|
|
637
637
|
getLocalEmbeddingNativeMemoryStats
|
|
638
|
-
} from "./index-
|
|
638
|
+
} from "./index-p5ey52j9.js";
|
|
639
639
|
import {
|
|
640
640
|
withQueryEmbeddingDeadline,
|
|
641
641
|
describeShadowBackfillWriteRefusal2,
|
|
@@ -656,12 +656,12 @@ import {
|
|
|
656
656
|
embedSessionCompartmentChunks2,
|
|
657
657
|
getEmbeddingCoverageStatus2,
|
|
658
658
|
getAutoEmbeddingSessionCoverage2
|
|
659
|
-
} from "./index-
|
|
659
|
+
} from "./index-4ba3zp54.js";
|
|
660
660
|
import {
|
|
661
661
|
saveEmbeddingIfHashMatches,
|
|
662
662
|
invalidateProject2,
|
|
663
663
|
invalidateMemory2
|
|
664
|
-
} from "./index-
|
|
664
|
+
} from "./index-6xg55350.js";
|
|
665
665
|
import {
|
|
666
666
|
renderUserFacingFailure,
|
|
667
667
|
userFacingFailureCode,
|
|
@@ -682,7 +682,7 @@ import {
|
|
|
682
682
|
readGitFileChangeTimesSince,
|
|
683
683
|
verificationFileExists,
|
|
684
684
|
normalizeVerificationFiles
|
|
685
|
-
} from "./index-
|
|
685
|
+
} from "./index-8yj4vd7k.js";
|
|
686
686
|
import {
|
|
687
687
|
computeCueContentHash,
|
|
688
688
|
hasMuralCueColumns,
|
|
@@ -709,7 +709,7 @@ import {
|
|
|
709
709
|
archiveMemory2,
|
|
710
710
|
getMemoryCount2,
|
|
711
711
|
getMemoryCountsByStatus2
|
|
712
|
-
} from "./index-
|
|
712
|
+
} from "./index-srpghrje.js";
|
|
713
713
|
import {
|
|
714
714
|
renderSingleStoreMigrationRequiredRefusal,
|
|
715
715
|
SingleStoreMigrationRequiredError,
|
|
@@ -730,7 +730,7 @@ import {
|
|
|
730
730
|
resolveMemoriesByIdsForSearch2,
|
|
731
731
|
unifiedSearch2,
|
|
732
732
|
formatSearchResults2
|
|
733
|
-
} from "./index-
|
|
733
|
+
} from "./index-mwjvjn0p.js";
|
|
734
734
|
import {
|
|
735
735
|
scheduleReconciliation,
|
|
736
736
|
scheduleIncrementalIndex,
|
|
@@ -835,7 +835,7 @@ import {
|
|
|
835
835
|
abortSessionFailClosed2,
|
|
836
836
|
evaluateEmergencyFailClosed2,
|
|
837
837
|
runPostTransformPhase2
|
|
838
|
-
} from "./index-
|
|
838
|
+
} from "./index-tvh3y650.js";
|
|
839
839
|
import {
|
|
840
840
|
flushIgnoredMessages2,
|
|
841
841
|
clearIgnoredMessages2,
|
|
@@ -845,7 +845,7 @@ import {
|
|
|
845
845
|
import {
|
|
846
846
|
setRecompStarting2,
|
|
847
847
|
setRecompTerminal2
|
|
848
|
-
} from "./index-
|
|
848
|
+
} from "./index-a9wn0d9h.js";
|
|
849
849
|
import {
|
|
850
850
|
ANNOUNCEMENT_VERSION2,
|
|
851
851
|
ANNOUNCEMENT_FEATURES2,
|
|
@@ -16524,7 +16524,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16524
16524
|
const db = readDatabase();
|
|
16525
16525
|
if (!db)
|
|
16526
16526
|
return { ok: false, error: "db unavailable" };
|
|
16527
|
-
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-
|
|
16527
|
+
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-16rs8aty.js"));
|
|
16528
16528
|
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-tfhs4dbc.js"));
|
|
16529
16529
|
log2(`[rpc] recomp requested for session ${sessionId}`);
|
|
16530
16530
|
if (!args.client && !args.hiddenCompletionExecutor) {
|
|
@@ -16609,7 +16609,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16609
16609
|
const db = readDatabase();
|
|
16610
16610
|
if (!db)
|
|
16611
16611
|
return { ok: false, error: "db unavailable" };
|
|
16612
|
-
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-
|
|
16612
|
+
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-a9tshrp4.js"));
|
|
16613
16613
|
const model = await args.readSelectedSessionModel?.(sessionId) ?? liveSessionState.liveModelBySession.get(sessionId);
|
|
16614
16614
|
const window = resolveOpenCodeWrapupWindow(db, sessionId, model);
|
|
16615
16615
|
if (!window)
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
getEmbeddingProviderIdentity,
|
|
55
55
|
dominantEmbeddingFailure,
|
|
56
56
|
LocalEmbeddingProvider
|
|
57
|
-
} from "./index-
|
|
57
|
+
} from "./index-p5ey52j9.js";
|
|
58
58
|
import {
|
|
59
59
|
embedPauseBySession,
|
|
60
60
|
activeEmbeddingSessions,
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
EMBEDDABLE_MEMORIES_FOR_PROJECT,
|
|
83
83
|
getMemoryEmbedCoverage,
|
|
84
84
|
invalidateProject2
|
|
85
|
-
} from "./index-
|
|
85
|
+
} from "./index-6xg55350.js";
|
|
86
86
|
import {
|
|
87
87
|
isKnownAutocommit
|
|
88
88
|
} from "./index-8ajstryz.js";
|
|
@@ -111,16 +111,15 @@ function maintainKeptWorkerMemoryEmbeddings2(db) {
|
|
|
111
111
|
function cacheKey(projectPath, modelId) {
|
|
112
112
|
return `${projectPath}\x00${modelId}`;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
const entry
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
119
|
-
if (entry.expiresAt <= Date.now()) {
|
|
120
|
-
projectEmbeddingCache.delete(cacheKey(projectPath, modelId));
|
|
121
|
-
return null;
|
|
114
|
+
function pruneExpiredProjectEmbeddings(now) {
|
|
115
|
+
for (const [key, entry] of projectEmbeddingCache) {
|
|
116
|
+
if (entry.expiresAt <= now)
|
|
117
|
+
projectEmbeddingCache.delete(key);
|
|
122
118
|
}
|
|
123
|
-
|
|
119
|
+
}
|
|
120
|
+
function getValidCacheEntry(projectPath, modelId) {
|
|
121
|
+
pruneExpiredProjectEmbeddings(Date.now());
|
|
122
|
+
return projectEmbeddingCache.get(cacheKey(projectPath, modelId)) ?? null;
|
|
124
123
|
}
|
|
125
124
|
function getProjectEmbeddings2(db, projectPath, modelId) {
|
|
126
125
|
const kept = keptWorkerCaches.get(db);
|
|
@@ -140,9 +139,11 @@ function getProjectEmbeddings2(db, projectPath, modelId) {
|
|
|
140
139
|
return cached.embeddings;
|
|
141
140
|
}
|
|
142
141
|
const embeddings = loadAllEmbeddings(db, projectPath, modelId);
|
|
142
|
+
const now = Date.now();
|
|
143
|
+
pruneExpiredProjectEmbeddings(now);
|
|
143
144
|
projectEmbeddingCache.set(cacheKey(projectPath, modelId), {
|
|
144
145
|
embeddings,
|
|
145
|
-
expiresAt:
|
|
146
|
+
expiresAt: now + embeddingCacheTtlMs
|
|
146
147
|
});
|
|
147
148
|
return embeddings;
|
|
148
149
|
}
|
|
@@ -172,8 +173,11 @@ function resetEmbeddingCacheForTests2() {
|
|
|
172
173
|
projectEmbeddingCache.clear();
|
|
173
174
|
embeddingCacheTtlMs = DEFAULT_EMBEDDING_CACHE_TTL_MS;
|
|
174
175
|
}
|
|
176
|
+
function getEmbeddingCacheSizeForTests2() {
|
|
177
|
+
return projectEmbeddingCache.size;
|
|
178
|
+
}
|
|
175
179
|
function setEmbeddingCacheTtlForTests2(ttlMs) {
|
|
176
180
|
embeddingCacheTtlMs = Math.max(0, Math.floor(ttlMs));
|
|
177
181
|
}
|
|
178
182
|
|
|
179
|
-
export { saveEmbeddingIfHashMatches, EMBEDDABLE_MEMORIES_FOR_PROJECT, getMemoryEmbedCoverage, keepWorkerMemoryEmbeddings2, maintainKeptWorkerMemoryEmbeddings2, getProjectEmbeddings2, peekProjectEmbeddings2, invalidateProject2, invalidateMemory2, resetEmbeddingCacheForTests2, setEmbeddingCacheTtlForTests2 };
|
|
183
|
+
export { saveEmbeddingIfHashMatches, EMBEDDABLE_MEMORIES_FOR_PROJECT, getMemoryEmbedCoverage, keepWorkerMemoryEmbeddings2, maintainKeptWorkerMemoryEmbeddings2, getProjectEmbeddings2, peekProjectEmbeddings2, invalidateProject2, invalidateMemory2, resetEmbeddingCacheForTests2, getEmbeddingCacheSizeForTests2, setEmbeddingCacheTtlForTests2 };
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
readSearchBackfillCursor2,
|
|
11
11
|
writeSearchBackfillCursor2,
|
|
12
12
|
embedItemsWindowBounded2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-4ba3zp54.js";
|
|
14
14
|
import {
|
|
15
15
|
saveEmbeddingIfHashMatches
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-6xg55350.js";
|
|
17
17
|
|
|
18
18
|
// src/features/magic-context/memory/embedding-backfill.ts
|
|
19
19
|
var SEARCH_BACKFILL_LIMIT = 50;
|
|
@@ -35,14 +35,14 @@ import {
|
|
|
35
35
|
getActiveCompartmentRun,
|
|
36
36
|
markActiveCompartmentRunPublished,
|
|
37
37
|
registerActiveCompartmentRun
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-sqvkh5d0.js";
|
|
39
39
|
import {
|
|
40
40
|
sendStatusNotification2
|
|
41
41
|
} from "./index-61a853ky.js";
|
|
42
42
|
import {
|
|
43
43
|
setRecompStarting2,
|
|
44
44
|
setRecompTerminal2
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-a9wn0d9h.js";
|
|
46
46
|
|
|
47
47
|
// src/hooks/magic-context/wrapup-orchestrator.ts
|
|
48
48
|
import * as crypto from "node:crypto";
|
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
} from "./index-gcf2x04k.js";
|
|
16
16
|
import {
|
|
17
17
|
LocalEmbeddingProvider
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-p5ey52j9.js";
|
|
19
19
|
import {
|
|
20
20
|
OpenAICompatibleEmbeddingProvider,
|
|
21
21
|
embedTextForProject2
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-4ba3zp54.js";
|
|
23
23
|
import {
|
|
24
24
|
saveEmbeddingIfHashMatches
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-6xg55350.js";
|
|
26
26
|
import {
|
|
27
27
|
getMemorySelectColumns2,
|
|
28
28
|
isMemoryRow2,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
buildWorkspaceMemorySqlFilter2,
|
|
33
33
|
getMemoryById2,
|
|
34
34
|
updateMemorySeenCount2
|
|
35
|
-
} from "./index-
|
|
35
|
+
} from "./index-srpghrje.js";
|
|
36
36
|
import {
|
|
37
37
|
computeNormalizedHash
|
|
38
38
|
} from "./index-2bvekkfy.js";
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
pausedRecompReason,
|
|
13
13
|
executeContextRecomp
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-sqvkh5d0.js";
|
|
15
15
|
import {
|
|
16
16
|
renderUserFacingFailure,
|
|
17
17
|
userFacingFailureCode
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-8yj4vd7k.js";
|
|
19
19
|
|
|
20
20
|
// src/hooks/magic-context/recomp-orchestrator.ts
|
|
21
21
|
function resolveLiveModelKey(liveSessionState, sessionId) {
|
|
@@ -39,13 +39,13 @@ import {
|
|
|
39
39
|
enqueueShadowEmbeddingItems2,
|
|
40
40
|
getProjectEmbeddingSnapshot2,
|
|
41
41
|
embedItemsForProject2
|
|
42
|
-
} from "./index-
|
|
42
|
+
} from "./index-4ba3zp54.js";
|
|
43
43
|
import {
|
|
44
44
|
recordEmbeddingMeasurement
|
|
45
45
|
} from "./index-2amn2s73.js";
|
|
46
46
|
import {
|
|
47
47
|
getProjectEmbeddings2
|
|
48
|
-
} from "./index-
|
|
48
|
+
} from "./index-6xg55350.js";
|
|
49
49
|
import {
|
|
50
50
|
USER_FACING_FAILURES,
|
|
51
51
|
cosineSimilarity,
|
|
@@ -55,13 +55,13 @@ import {
|
|
|
55
55
|
sanitizeFtsQuery,
|
|
56
56
|
searchMemoriesFTS,
|
|
57
57
|
searchMemoriesFTSUnion
|
|
58
|
-
} from "./index-
|
|
58
|
+
} from "./index-8yj4vd7k.js";
|
|
59
59
|
import {
|
|
60
60
|
ModuleMemoryAuthorityError2,
|
|
61
61
|
getMemoriesByProject2,
|
|
62
62
|
getMemoriesByProjects2,
|
|
63
63
|
updateMemoryRetrievalCount2
|
|
64
|
-
} from "./index-
|
|
64
|
+
} from "./index-srpghrje.js";
|
|
65
65
|
import {
|
|
66
66
|
matchedSearchSnippet,
|
|
67
67
|
getIndexedMessageCorpusSize
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
} from "./index-4v50y0jr.js";
|
|
76
76
|
import {
|
|
77
77
|
ensureMemoryEmbeddings2
|
|
78
|
-
} from "./index-
|
|
78
|
+
} from "./index-8eke8yh2.js";
|
|
79
79
|
import {
|
|
80
80
|
MESSAGE_FTS_SESSION_FILTER_SQL,
|
|
81
81
|
withMessageFtsSessionFilter,
|
|
@@ -684,14 +684,20 @@ function isEmbeddingWorkerStopNotice(message) {
|
|
|
684
684
|
function serveEmbeddingWorker(port, model, options) {
|
|
685
685
|
const now = options.now ?? (() => performance.now());
|
|
686
686
|
let queue = Promise.resolve();
|
|
687
|
+
const requests = new Map;
|
|
687
688
|
let stopping = false;
|
|
688
689
|
let busySince = null;
|
|
689
690
|
const refuse = (id) => port.postMessage({ id, loaded: false, error: EMBEDDING_WORKER_STOPPING_ERROR });
|
|
691
|
+
const acknowledgeCancel = (id) => port.postMessage({ id, loaded: false });
|
|
690
692
|
const handle = async (request) => {
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
busySince = now();
|
|
693
|
+
const { id } = request;
|
|
694
|
+
const cancelled = () => requests.get(id) === true;
|
|
694
695
|
try {
|
|
696
|
+
if (stopping)
|
|
697
|
+
return refuse(id);
|
|
698
|
+
if (cancelled())
|
|
699
|
+
return acknowledgeCancel(id);
|
|
700
|
+
busySince = now();
|
|
695
701
|
const loaded = await model.initialize();
|
|
696
702
|
let vectors;
|
|
697
703
|
if (loaded && request.texts) {
|
|
@@ -701,19 +707,26 @@ function serveEmbeddingWorker(port, model, options) {
|
|
|
701
707
|
await new Promise((resolve) => setImmediate(resolve));
|
|
702
708
|
if (stopping)
|
|
703
709
|
throw new Error(EMBEDDING_WORKER_STOPPING_ERROR);
|
|
710
|
+
if (cancelled())
|
|
711
|
+
return acknowledgeCancel(id);
|
|
704
712
|
vectors.push(...await model.embedBatch(request.texts.slice(offset, offset + options.batchSize)));
|
|
705
713
|
}
|
|
706
714
|
}
|
|
715
|
+
if (cancelled())
|
|
716
|
+
return acknowledgeCancel(id);
|
|
707
717
|
port.postMessage({
|
|
708
|
-
id
|
|
718
|
+
id,
|
|
709
719
|
loaded,
|
|
710
720
|
vectors,
|
|
711
721
|
failure: model.getLastFailureReason(),
|
|
712
722
|
stats: options.stats?.()
|
|
713
723
|
}, vectors?.flatMap((vector) => vector ? [vector.buffer] : []) ?? []);
|
|
714
724
|
} catch (error) {
|
|
715
|
-
|
|
725
|
+
if (cancelled())
|
|
726
|
+
return acknowledgeCancel(id);
|
|
727
|
+
port.postMessage({ id, loaded: false, error: String(error) });
|
|
716
728
|
} finally {
|
|
729
|
+
requests.delete(id);
|
|
717
730
|
busySince = null;
|
|
718
731
|
}
|
|
719
732
|
};
|
|
@@ -743,9 +756,16 @@ function serveEmbeddingWorker(port, model, options) {
|
|
|
743
756
|
stop();
|
|
744
757
|
return;
|
|
745
758
|
}
|
|
759
|
+
const cancel = message?.cancel;
|
|
760
|
+
if (typeof cancel === "number") {
|
|
761
|
+
if (requests.has(cancel))
|
|
762
|
+
requests.set(cancel, true);
|
|
763
|
+
return;
|
|
764
|
+
}
|
|
746
765
|
const request = message;
|
|
747
766
|
if (stopping)
|
|
748
767
|
return refuse(request.id);
|
|
768
|
+
requests.set(request.id, false);
|
|
749
769
|
queue = queue.then(() => handle(request));
|
|
750
770
|
});
|
|
751
771
|
}
|
|
@@ -1014,6 +1034,13 @@ class EmbeddingWorkerClient {
|
|
|
1014
1034
|
this.pending.delete(id);
|
|
1015
1035
|
signal?.removeEventListener("abort", abort);
|
|
1016
1036
|
reject(new EmbeddingRequestAbortedError);
|
|
1037
|
+
const request = { cancel: id };
|
|
1038
|
+
try {
|
|
1039
|
+
if (worker instanceof Worker)
|
|
1040
|
+
worker.postMessage(request);
|
|
1041
|
+
else if (worker.connected)
|
|
1042
|
+
worker.send(request, () => {});
|
|
1043
|
+
} catch {}
|
|
1017
1044
|
if (this.pending.size === 0) {
|
|
1018
1045
|
worker.unref();
|
|
1019
1046
|
if (!(worker instanceof Worker))
|
|
@@ -293,20 +293,20 @@ import {
|
|
|
293
293
|
getMemoriesByProject2,
|
|
294
294
|
getMemoriesByProjects2,
|
|
295
295
|
getMaxMemoryIdForProjects2
|
|
296
|
-
} from "./index-
|
|
296
|
+
} from "./index-srpghrje.js";
|
|
297
297
|
import {
|
|
298
298
|
contentSha2562,
|
|
299
299
|
enqueueShadowEmbeddingItems2,
|
|
300
300
|
getProjectChunkEmbeddingModelId2,
|
|
301
301
|
getProjectEmbeddingMaxInputTokens2,
|
|
302
302
|
embedItemsWindowBounded2
|
|
303
|
-
} from "./index-
|
|
303
|
+
} from "./index-4ba3zp54.js";
|
|
304
304
|
import {
|
|
305
305
|
renderUserFacingFailure,
|
|
306
306
|
userFacingFailureCode,
|
|
307
307
|
promoteSessionFactsDurable,
|
|
308
308
|
embedPromotedFacts
|
|
309
|
-
} from "./index-
|
|
309
|
+
} from "./index-8yj4vd7k.js";
|
|
310
310
|
import {
|
|
311
311
|
isMarkerCandidateBasisCurrent2,
|
|
312
312
|
invalidateMarkerCandidateBasis2,
|
|
@@ -268,13 +268,13 @@ import {
|
|
|
268
268
|
getProjectEmbeddingSnapshot2,
|
|
269
269
|
embedTextForProject2,
|
|
270
270
|
embedBatchForProject2
|
|
271
|
-
} from "./index-
|
|
271
|
+
} from "./index-4ba3zp54.js";
|
|
272
272
|
import {
|
|
273
273
|
isEmbeddingHostBusy2
|
|
274
274
|
} from "./index-qt1qqasc.js";
|
|
275
275
|
import {
|
|
276
276
|
userFacingFailureCode
|
|
277
|
-
} from "./index-
|
|
277
|
+
} from "./index-8yj4vd7k.js";
|
|
278
278
|
import {
|
|
279
279
|
getMessageIndexEpoch,
|
|
280
280
|
isMessageIndexSearchable,
|
|
@@ -301,7 +301,7 @@ import {
|
|
|
301
301
|
peekNoteNudgeText,
|
|
302
302
|
markNoteNudgeDelivered,
|
|
303
303
|
getActiveCompartmentRun
|
|
304
|
-
} from "./index-
|
|
304
|
+
} from "./index-sqvkh5d0.js";
|
|
305
305
|
import {
|
|
306
306
|
canonicalModelIdentity,
|
|
307
307
|
piModelRefToCanonical,
|