@cortexkit/opencode-magic-context 0.49.6 → 0.49.8
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 +10 -7
- package/dist/compaction-marker-candidates-worker.js +2 -2
- package/dist/{compaction-marker-candidates-cz72pm1t.js → compaction-marker-candidates-xxz35vwp.js} +3 -3
- package/dist/{conflict-warning-hook-1jq1rxx7.js → conflict-warning-hook-w3crzrar.js} +8 -8
- package/dist/{context-ae3gxdye.js → context-x0ccfv0f.js} +88 -53
- package/dist/{derive-budgets-j4ry8j8n.js → derive-budgets-3nbxsyss.js} +2 -2
- package/dist/embedding-backfill-3h2m5n0q.js +21 -0
- package/dist/embedding-worker-process.js +6 -2
- package/dist/embedding-worker.js +6 -5
- package/dist/features/magic-context/compaction-marker-candidates.d.ts.map +1 -1
- package/dist/features/magic-context/compaction-marker.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/cron.d.ts +2 -0
- package/dist/features/magic-context/dreamer/cron.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/hidden-single-shot.d.ts +6 -3
- package/dist/features/magic-context/dreamer/hidden-single-shot.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/map-memories-prompt.d.ts +7 -1
- package/dist/features/magic-context/dreamer/map-memories-prompt.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/map-memories.d.ts +2 -2
- package/dist/features/magic-context/dreamer/map-memories.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/primer-seed.d.ts +2 -0
- package/dist/features/magic-context/dreamer/primer-seed.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/provider-output-failure.d.ts +1 -0
- package/dist/features/magic-context/dreamer/provider-output-failure.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/refresh-primers.d.ts +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.map +1 -1
- package/dist/features/magic-context/message-index-async.d.ts.map +1 -1
- package/dist/features/magic-context/migration-worker-client.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/wake-plane.d.ts.map +1 -1
- package/dist/features/magic-context/storage-clone.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +10 -3
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts.map +1 -1
- package/dist/features/magic-context/storage-replay-document.d.ts +4 -0
- package/dist/features/magic-context/storage-replay-document.d.ts.map +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/history-owner-ty29fz0f.js +244 -0
- package/dist/hooks/auto-update-checker/checker.d.ts.map +1 -1
- package/dist/hooks/magic-context/apply-operations.d.ts +7 -0
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-worker-client.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/edit-marker.d.ts +2 -0
- package/dist/hooks/magic-context/edit-marker.d.ts.map +1 -1
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts.map +1 -1
- package/dist/hooks/magic-context/history-boundary-repair.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-persist.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-transport.d.ts +1 -0
- package/dist/hooks/magic-context/module-transport.d.ts.map +1 -1
- package/dist/hooks/magic-context/note-nudger.d.ts +5 -3
- package/dist/hooks/magic-context/note-nudger.d.ts.map +1 -1
- package/dist/hooks/magic-context/postprocess-read-cache.d.ts.map +1 -1
- package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts +15 -4
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/replay-committed-drops.d.ts +9 -0
- package/dist/hooks/magic-context/replay-committed-drops.d.ts.map +1 -0
- package/dist/hooks/magic-context/rust-lkg-freeze-registry.d.ts +2 -2
- package/dist/hooks/magic-context/rust-lkg-freeze-registry.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-mode-transform.d.ts +4 -0
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-refusal-recovery.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-served-raw.d.ts +29 -0
- package/dist/hooks/magic-context/rust-served-raw.d.ts.map +1 -0
- package/dist/hooks/magic-context/strip-content.d.ts +23 -24
- package/dist/hooks/magic-context/strip-content.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts +2 -0
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/tool-drop-target.d.ts +2 -0
- package/dist/hooks/magic-context/tool-drop-target.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/unresolved-history-boundary.d.ts +5 -1
- package/dist/hooks/magic-context/unresolved-history-boundary.d.ts.map +1 -1
- package/dist/hooks/magic-context/wrapup-orchestrator.d.ts.map +1 -1
- package/dist/{index-g9exahnx.js → index-0jz47061.js} +6 -3
- package/dist/{index-4mjhqadz.js → index-150zz6fh.js} +1 -1
- package/dist/{index-ch08qwgd.js → index-2rw244rh.js} +88 -81
- package/dist/{index-6q5h70h2.js → index-4hb8nt93.js} +3 -3
- package/dist/{index-j55vn694.js → index-7bjgyaj1.js} +4 -4
- package/dist/{index-h2wc01qk.js → index-8kk7yh6m.js} +2 -2
- package/dist/{index-vztbgcdk.js → index-9g1c4bt9.js} +304 -92
- package/dist/{index-7q1m1qjk.js → index-a43xq1pg.js} +5 -5
- package/dist/{index-tqf7yg27.js → index-a4b0gbyg.js} +1 -1
- package/dist/{index-vnjhmkwk.js → index-angx1s0k.js} +4 -3
- package/dist/{index-1xaw2pq8.js → index-b4gcb3rk.js} +8 -8
- package/dist/{index-z1tjp257.js → index-b64n4d0h.js} +1 -1
- package/dist/{index-1bt88epp.js → index-bd9cjab3.js} +1 -1
- package/dist/{index-gbmqa9x9.js → index-bmwfzz28.js} +9 -6
- package/dist/{index-qx53vezw.js → index-gjvjh960.js} +1 -1
- package/dist/{index-zgzdm6dg.js → index-gzg9ekc1.js} +155 -103
- package/dist/{index-vh3e2mvr.js → index-hxrvx6cy.js} +121 -51
- package/dist/{index-w23dh319.js → index-jw4gbfkv.js} +1 -1
- package/dist/index-knvkbfvh.js +25 -0
- package/dist/{index-vkbqdnkj.js → index-kvw6xew3.js} +6 -3
- package/dist/{index-bg5qqene.js → index-mp2kghkv.js} +3 -27
- package/dist/{index-nsjyysj0.js → index-mvvephtj.js} +5 -1
- package/dist/{index-cm4hmxyk.js → index-n78avt2p.js} +1 -1
- package/dist/{index-hr64sth2.js → index-pgy3h49n.js} +4 -4
- package/dist/{index-a796ct3s.js → index-pjgzdezw.js} +13 -9
- package/dist/{index-9m7bn21d.js → index-q28hsbpg.js} +15 -3
- package/dist/{index-ab3bgm2m.js → index-q76br5zn.js} +3 -3
- package/dist/{index-xqyj5c85.js → index-qgp5vnt4.js} +5 -5
- package/dist/{index-9s58tq95.js → index-rg1cezmj.js} +22 -22
- package/dist/{index-f3dnvnw6.js → index-s178h9z8.js} +4 -3
- package/dist/{index-mj1fgfrk.js → index-w1ejb9qr.js} +939 -160
- package/dist/{index-k6xvbj2e.js → index-w28y7d0z.js} +2 -0
- package/dist/{index-0nnd4bry.js → index-wafzvyhg.js} +63 -19
- package/dist/{index-ck6y3td2.js → index-xf6k8szp.js} +4 -4
- package/dist/{index-1j8jcjpa.js → index-xpn05jxq.js} +4 -4
- package/dist/{index-s0gsmthp.js → index-ydjgz36f.js} +7 -7
- package/dist/{index-besxhcsh.js → index-zf9nydbd.js} +50 -39
- package/dist/index.js +53 -52
- package/dist/{logger-ewak5q1s.js → logger-wn328tfg.js} +1 -1
- package/dist/{message-index-bounded-630j53ps.js → message-index-bounded-hxjp56qk.js} +16 -16
- package/dist/{message-index-c84wm2g0.js → message-index-zs882h8e.js} +16 -16
- package/dist/{message-time-backfill-8kj57qe3.js → message-time-backfill-nb5hhnrt.js} +3 -3
- package/dist/migration-worker.js +11 -11
- package/dist/plugin/boot-quiet.d.ts.map +1 -1
- package/dist/plugin/dream-timer.d.ts.map +1 -1
- package/dist/plugin/messages-transform.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts +2 -0
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/{project-embedding-registry-vv59t7ah.js → project-embedding-registry-vy7sv9jt.js} +11 -11
- package/dist/raw-ordinal-warmup-worker.js +17 -15
- package/dist/{read-session-chunk-t3vjd0h0.js → read-session-chunk-t9r7r0sg.js} +13 -11
- package/dist/{read-session-raw-gf7eytnm.js → read-session-raw-gm6xj30v.js} +3 -3
- package/dist/recomp-orchestrator-gr36zvd2.js +60 -0
- package/dist/{safe-notification-target-q0cyrx3x.js → safe-notification-target-jdynm677.js} +2 -2
- package/dist/{search-kth2p6cc.js → search-qjen1pmz.js} +24 -24
- package/dist/{send-session-notification-3j6krd4w.js → send-session-notification-q8ngbap3.js} +6 -6
- package/dist/shared/history-owner.d.ts +12 -0
- package/dist/shared/history-owner.d.ts.map +1 -0
- package/dist/shared/off-thread-migration-clock.d.ts +8 -1
- package/dist/shared/off-thread-migration-clock.d.ts.map +1 -1
- package/dist/shared/processed-image-eligibility.d.ts +22 -0
- package/dist/shared/processed-image-eligibility.d.ts.map +1 -0
- package/dist/shared/recovery-reasoning-prefix.d.ts +9 -0
- package/dist/shared/recovery-reasoning-prefix.d.ts.map +1 -0
- package/dist/shared/redaction.d.ts.map +1 -1
- package/dist/shared/rpc-server.d.ts.map +1 -1
- package/dist/shared/sqlite.d.ts +3 -1
- package/dist/shared/sqlite.d.ts.map +1 -1
- package/dist/shared/tag-transcript.d.ts +9 -0
- package/dist/shared/tag-transcript.d.ts.map +1 -1
- package/dist/shared/user-facing-codes.d.ts +2 -2
- package/dist/{sqlite-d7edbk1s.js → sqlite-4pqyynrs.js} +3 -1
- package/dist/{storage-memory-af5zdz98.js → storage-memory-j3v3hc83.js} +2 -2
- package/dist/{storage-tags-dyj7mmbq.js → storage-tags-a513rkj3.js} +5 -5
- package/dist/tools/ctx-expand/search-archive.d.ts +4 -0
- package/dist/tools/ctx-expand/search-archive.d.ts.map +1 -0
- package/dist/tools/ctx-expand/tools.d.ts.map +1 -1
- package/dist/{transform-postprocess-phase-bv3kb5s1.js → transform-postprocess-phase-yv463b7y.js} +30 -30
- package/dist/v2/auto-search-worker.js +10 -7
- package/dist/v2/{compaction-marker-candidates-6gqp5wrc.js → compaction-marker-candidates-a15w3mqh.js} +3 -3
- package/dist/v2/compaction-marker-candidates-worker.js +2 -2
- package/dist/v2/{context-p8f2shp1.js → context-wd82v9z6.js} +1133 -278
- package/dist/v2/{derive-budgets-enckmg7y.js → derive-budgets-0rmpmxjw.js} +3 -3
- package/dist/v2/embedding-backfill-vr7wdtrf.js +20 -0
- package/dist/v2/embedding-worker-process.js +6 -2
- package/dist/v2/embedding-worker.js +6 -5
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/history-owner-2cr9py37.js +243 -0
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/payload.d.ts.map +1 -1
- package/dist/v2/hooks/store.d.ts +1 -0
- package/dist/v2/hooks/store.d.ts.map +1 -1
- package/dist/v2/{logger-pj02s7sr.js → logger-te6e1j72.js} +1 -1
- package/dist/v2/{message-index-bounded-yzxmf6vp.js → message-index-bounded-madg2kfr.js} +16 -16
- package/dist/v2/{message-index-3ws17x1g.js → message-index-yd94vt9n.js} +16 -16
- package/dist/v2/{message-time-backfill-5nf10c65.js → message-time-backfill-rz1pnpaj.js} +3 -3
- package/dist/v2/migration-worker.js +11 -11
- package/dist/v2/{project-embedding-registry-rsnf2263.js → project-embedding-registry-ja23aygk.js} +11 -11
- package/dist/v2/raw-ordinal-warmup-worker.js +17 -15
- package/dist/v2/{read-session-chunk-vtb0w2kd.js → read-session-chunk-7qs791f3.js} +13 -11
- package/dist/v2/{read-session-raw-gpcddemt.js → read-session-raw-h4azh85b.js} +3 -3
- package/dist/v2/recomp-orchestrator-ee91r9s6.js +59 -0
- package/dist/v2/{safe-notification-target-y3p1hce9.js → safe-notification-target-936374xx.js} +2 -2
- package/dist/v2/search-pn15rr52.js +46 -0
- package/dist/v2/{send-session-notification-5aj2j7vf.js → send-session-notification-6n7chhyp.js} +6 -6
- package/dist/v2/{server-09g9pkvx.js → server-08k4zkfk.js} +50 -39
- package/dist/v2/{server-ras2sxnc.js → server-44ryn9rb.js} +9 -6
- package/dist/v2/{server-158ehmk2.js → server-4easnf78.js} +19 -19
- package/dist/v2/{server-ww9nr8pe.js → server-4gz0xkrc.js} +5 -5
- package/dist/v2/{server-d6g4whc2.js → server-4qr18rfg.js} +3 -3
- package/dist/v2/{server-f9py7s7a.js → server-4rs8sm06.js} +5 -5
- package/dist/v2/{server-yezz0cp2.js → server-63ha7f0f.js} +3 -27
- package/dist/v2/{server-3t0q2cqx.js → server-7dv9wt9r.js} +1 -1
- package/dist/v2/{server-cw6521wn.js → server-7e087rvk.js} +2 -0
- package/dist/v2/{server-hb6xhh9q.js → server-988cqjme.js} +6 -3
- package/dist/v2/{server-keswwkvv.js → server-9a6bwc12.js} +4 -4
- package/dist/v2/{server-t4k4qexw.js → server-9e5r8y60.js} +5 -1
- package/dist/v2/{server-7ekna9zs.js → server-adfte03x.js} +2 -2
- package/dist/v2/{server-9zqewm6g.js → server-ak7w74j9.js} +4 -4
- package/dist/v2/{server-387vkhjq.js → server-bx59ezg6.js} +4 -3
- package/dist/v2/{server-676xw7at.js → server-ckrb5rm8.js} +1 -1
- package/dist/v2/{server-wrem2nmz.js → server-cxsr0ng6.js} +15 -3
- package/dist/v2/{server-t528t8qm.js → server-hn9fb3v0.js} +2 -2
- package/dist/v2/{server-qn23p4h7.js → server-j3dm74ey.js} +9 -9
- package/dist/v2/{server-yd01snxq.js → server-jjsf29aq.js} +4 -4
- package/dist/v2/server-knvkbfvh.js +25 -0
- package/dist/v2/{server-cm4hmxyk.js → server-n78avt2p.js} +1 -1
- package/dist/v2/{server-btgnsv7w.js → server-njnx39q2.js} +6 -3
- package/dist/v2/{server-6a9mxnb2.js → server-npm52h2q.js} +4 -3
- package/dist/v2/{server-vb7pbd9p.js → server-nveratm5.js} +1 -1
- package/dist/v2/{server-7skbfb81.js → server-q360kdb8.js} +121 -51
- package/dist/v2/{server-kzns2hbz.js → server-s6jqh8bj.js} +1 -1
- package/dist/v2/{server-6byqfbqf.js → server-shme41gj.js} +1 -1
- package/dist/v2/{server-0nnd4bry.js → server-wafzvyhg.js} +63 -19
- package/dist/v2/{server-fby0cxbq.js → server-xj4mewze.js} +304 -92
- package/dist/v2/{server-aa9w15cs.js → server-y5g32dhq.js} +88 -81
- package/dist/v2/{server-x2r63c0x.js → server-yak3sxya.js} +7 -7
- package/dist/v2/{server-4tn95znb.js → server-zrwaj29a.js} +2 -2
- package/dist/v2/server.js +9 -8
- package/dist/v2/{sqlite-d7edbk1s.js → sqlite-4pqyynrs.js} +3 -1
- package/dist/v2/{storage-memory-af5zdz98.js → storage-memory-j3v3hc83.js} +2 -2
- package/dist/v2/{storage-tags-d47bpaqa.js → storage-tags-spa92sgj.js} +5 -5
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/{wrapup-orchestrator-cahk37n7.js → wrapup-orchestrator-5wxy1ggv.js} +38 -35
- package/dist/wrapup-orchestrator-gv08c6f9.js +47 -0
- package/package.json +3 -3
- package/src/config/compaction-accessor-guard.test.ts +3 -0
- package/src/features/magic-context/dreamer/cron.ts +8 -0
- package/src/shared/history-owner.test.ts +60 -0
- package/src/shared/history-owner.ts +43 -0
- package/src/shared/host-stall-profiler-node.ts +3 -1
- package/src/shared/host-stall-profiler.ts +3 -1
- package/src/shared/off-thread-migration-clock.test.ts +80 -10
- package/src/shared/off-thread-migration-clock.ts +37 -13
- package/src/shared/processed-image-eligibility.test.ts +68 -0
- package/src/shared/processed-image-eligibility.ts +41 -0
- package/src/shared/processed-image-position-review.json +20 -0
- package/src/shared/processed-image-position-review.test.ts +19 -0
- package/src/shared/recovery-reasoning-prefix.test.ts +34 -0
- package/src/shared/recovery-reasoning-prefix.ts +35 -0
- package/src/shared/redaction.test.ts +16 -0
- package/src/shared/redaction.ts +8 -1
- package/src/shared/root-async-context.probe.mjs +36 -0
- package/src/shared/root-async-context.test.ts +49 -0
- package/src/shared/rpc-server.ts +27 -23
- package/src/shared/sqlite-busy-budget-review.test.ts +291 -0
- package/src/shared/sqlite-foreground-wait.test.ts +253 -1
- package/src/shared/sqlite-writer-diagnostics.test.ts +31 -0
- package/src/shared/sqlite.ts +112 -30
- package/src/shared/tag-transcript.ts +118 -0
- package/src/shared/user-facing-codes.ts +2 -2
- package/dist/embedding-backfill-dtjmyktb.js +0 -21
- package/dist/recomp-orchestrator-1d08g57a.js +0 -60
- package/dist/v2/embedding-backfill-cg4rv90f.js +0 -20
- package/dist/v2/recomp-orchestrator-v64r4s4r.js +0 -59
- package/dist/v2/search-bpa4fxq1.js +0 -46
- package/dist/wrapup-orchestrator-mqp0v195.js +0 -47
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
StaleRouteHandleError,
|
|
7
7
|
SubcClient,
|
|
8
8
|
isConsumerReconnectTransient
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-kvw6xew3.js";
|
|
10
10
|
import {
|
|
11
11
|
getHarness2
|
|
12
12
|
} from "./index-pavzsdc6.js";
|
|
@@ -15,11 +15,14 @@ import {
|
|
|
15
15
|
} from "./index-0sahzkwr.js";
|
|
16
16
|
import {
|
|
17
17
|
log2
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-mvvephtj.js";
|
|
19
|
+
import {
|
|
20
|
+
inRootAsyncContext2
|
|
21
|
+
} from "./index-wafzvyhg.js";
|
|
19
22
|
import {
|
|
20
23
|
buildCanonicalChunkTextFromFts,
|
|
21
24
|
loadCompartmentChunkEmbeddingsForSearch
|
|
22
|
-
} from "./index-
|
|
25
|
+
} from "./index-7bjgyaj1.js";
|
|
23
26
|
import {
|
|
24
27
|
recordEmbeddingMeasurement,
|
|
25
28
|
saveCommitEmbedding,
|
|
@@ -36,7 +39,7 @@ import {
|
|
|
36
39
|
enqueueShadowEmbeddingItems2,
|
|
37
40
|
getProjectEmbeddingSnapshot2,
|
|
38
41
|
embedItemsForProject2
|
|
39
|
-
} from "./index-
|
|
42
|
+
} from "./index-rg1cezmj.js";
|
|
40
43
|
import {
|
|
41
44
|
getProjectEmbeddings2
|
|
42
45
|
} from "./index-4dhv7mqz.js";
|
|
@@ -45,13 +48,13 @@ import {
|
|
|
45
48
|
isEmbeddingEnabled,
|
|
46
49
|
embedText,
|
|
47
50
|
ensureMemoryEmbeddings2
|
|
48
|
-
} from "./index-
|
|
51
|
+
} from "./index-a43xq1pg.js";
|
|
49
52
|
import {
|
|
50
53
|
ModuleMemoryAuthorityError2,
|
|
51
54
|
getMemoriesByProject2,
|
|
52
55
|
getMemoriesByProjects2,
|
|
53
56
|
updateMemoryRetrievalCount2
|
|
54
|
-
} from "./index-
|
|
57
|
+
} from "./index-n78avt2p.js";
|
|
55
58
|
import {
|
|
56
59
|
USER_FACING_FAILURES,
|
|
57
60
|
getNotes,
|
|
@@ -60,20 +63,20 @@ import {
|
|
|
60
63
|
sanitizeFtsQuery,
|
|
61
64
|
searchMemoriesFTS,
|
|
62
65
|
searchMemoriesFTSUnion
|
|
63
|
-
} from "./index-
|
|
66
|
+
} from "./index-ydjgz36f.js";
|
|
64
67
|
import {
|
|
65
68
|
isRecord
|
|
66
|
-
} from "./index-
|
|
69
|
+
} from "./index-xpn05jxq.js";
|
|
67
70
|
import {
|
|
68
71
|
getIndexedMessageCorpusSize2
|
|
69
|
-
} from "./index-
|
|
72
|
+
} from "./index-b4gcb3rk.js";
|
|
70
73
|
import {
|
|
71
74
|
resolveWorkspaceShareCategories,
|
|
72
75
|
resolveWorkspaceIdentitySet,
|
|
73
76
|
expandWorkspaceIdentitySetWithAliases,
|
|
74
77
|
resolveStoredPathWorkspaceIdentity,
|
|
75
78
|
sourceNameForMemory
|
|
76
|
-
} from "./index-
|
|
79
|
+
} from "./index-qgp5vnt4.js";
|
|
77
80
|
import {
|
|
78
81
|
isKnownAutocommit
|
|
79
82
|
} from "./index-8ajstryz.js";
|
|
@@ -234,6 +237,10 @@ var SERIAL_LANE_MAX_WAITERS = 16;
|
|
|
234
237
|
var SERIAL_LANE_MAX_WAITERS_PER_SESSION = 8;
|
|
235
238
|
var SERIAL_LANE_MIN_REMAINING_MS = 25;
|
|
236
239
|
var CANONICAL_ROOT_CACHE_MAX_ENTRIES = 256;
|
|
240
|
+
var monotonicClockForTests;
|
|
241
|
+
function monotonicNow() {
|
|
242
|
+
return monotonicClockForTests?.() ?? performance.now();
|
|
243
|
+
}
|
|
237
244
|
function getDefaultSubcConnectionFile() {
|
|
238
245
|
return join(getDataDir(), "cortexkit", "run", "subc-connection.json");
|
|
239
246
|
}
|
|
@@ -481,7 +488,7 @@ class SubcModuleTransport {
|
|
|
481
488
|
});
|
|
482
489
|
}
|
|
483
490
|
async call(args) {
|
|
484
|
-
const callStartedAt =
|
|
491
|
+
const callStartedAt = monotonicNow();
|
|
485
492
|
const timings = {
|
|
486
493
|
lane: 0,
|
|
487
494
|
route: 0,
|
|
@@ -527,7 +534,7 @@ class SubcModuleTransport {
|
|
|
527
534
|
}
|
|
528
535
|
throw error;
|
|
529
536
|
}
|
|
530
|
-
timings.lane =
|
|
537
|
+
timings.lane = monotonicNow() - callStartedAt;
|
|
531
538
|
let rejectAbort;
|
|
532
539
|
const aborted = new Promise((_resolve, reject) => {
|
|
533
540
|
rejectAbort = reject;
|
|
@@ -544,25 +551,25 @@ class SubcModuleTransport {
|
|
|
544
551
|
throw args.signal.reason ?? new Error("module transport call aborted");
|
|
545
552
|
}
|
|
546
553
|
const attemptDeadlineMs = Date.now() + attemptTimeoutMs;
|
|
547
|
-
const routeStartedAt =
|
|
554
|
+
const routeStartedAt = monotonicNow();
|
|
548
555
|
ensuredRoute = await this.ensureRoute(args.sessionId, args.projectRoot, attemptDeadlineMs, args.signal);
|
|
549
556
|
if (args.signal?.aborted) {
|
|
550
557
|
throw args.signal.reason ?? new Error("module transport call aborted");
|
|
551
558
|
}
|
|
552
|
-
timings.route +=
|
|
553
|
-
const encodeStartedAt =
|
|
559
|
+
timings.route += monotonicNow() - routeStartedAt;
|
|
560
|
+
const encodeStartedAt = monotonicNow();
|
|
554
561
|
const body = args.body instanceof Uint8Array ? args.body : Buffer.from(JSON.stringify(moduleRequestBody(args.body, args.method)));
|
|
555
|
-
timings.encode +=
|
|
556
|
-
const issueStartedAt =
|
|
562
|
+
timings.encode += monotonicNow() - encodeStartedAt;
|
|
563
|
+
const issueStartedAt = monotonicNow();
|
|
557
564
|
const request = ensuredRoute.client.request(ensuredRoute.route, body, {
|
|
558
565
|
priority: Priority.Background,
|
|
559
566
|
admissionClass: AdmissionClass.Normal,
|
|
560
567
|
timeoutMs: Math.max(1, attemptDeadlineMs - Date.now())
|
|
561
568
|
});
|
|
562
|
-
timings.issue +=
|
|
563
|
-
const waitStartedAt =
|
|
569
|
+
timings.issue += monotonicNow() - issueStartedAt;
|
|
570
|
+
const waitStartedAt = monotonicNow();
|
|
564
571
|
const response = await this.beforeDeadline(Promise.race([request, aborted]), attemptDeadlineMs, "waiting for the module response");
|
|
565
|
-
timings.responseWait +=
|
|
572
|
+
timings.responseWait += monotonicNow() - waitStartedAt;
|
|
566
573
|
initialResponseReceived = true;
|
|
567
574
|
if (this.client !== ensuredRoute.client || this.connectionGeneration !== ensuredRoute.generation) {
|
|
568
575
|
throw this.connectionChangedError("subc connection changed while awaiting the module response");
|
|
@@ -647,7 +654,7 @@ class SubcModuleTransport {
|
|
|
647
654
|
args.signal?.removeEventListener("abort", onAbort);
|
|
648
655
|
finishWrapupTracking();
|
|
649
656
|
releaseLane();
|
|
650
|
-
timings.settle = Math.max(0,
|
|
657
|
+
timings.settle = Math.max(0, monotonicNow() - callStartedAt - timings.lane - timings.route - timings.encode - timings.issue - timings.responseWait);
|
|
651
658
|
args.onTimings?.(timings);
|
|
652
659
|
}
|
|
653
660
|
}
|
|
@@ -746,10 +753,10 @@ class SubcModuleTransport {
|
|
|
746
753
|
return resolved;
|
|
747
754
|
}
|
|
748
755
|
connectClient() {
|
|
749
|
-
return SubcClient.connect({
|
|
756
|
+
return inRootAsyncContext2(() => SubcClient.connect({
|
|
750
757
|
connectionFile: this.connectionFile,
|
|
751
758
|
handshakeTimeoutMs: HANDSHAKE_TIMEOUT_MS
|
|
752
|
-
});
|
|
759
|
+
}));
|
|
753
760
|
}
|
|
754
761
|
backoffActiveError() {
|
|
755
762
|
const error = new Error(`subc connection backoff active until ${this.nextProbeMs}`);
|
|
@@ -1257,6 +1264,61 @@ function searchGitCommitsSync(db, projectPath, query, options) {
|
|
|
1257
1264
|
});
|
|
1258
1265
|
return results.slice(0, options.limit);
|
|
1259
1266
|
}
|
|
1267
|
+
// src/features/magic-context/message-fts-session-filter.ts
|
|
1268
|
+
var MESSAGE_FTS_SESSION_FILTER_SQL = `+message_history_fts.rowid IN (
|
|
1269
|
+
SELECT fts_rowid FROM message_fts_rowid_map WHERE session_id = ?1
|
|
1270
|
+
) AND `;
|
|
1271
|
+
var coverageCaches = new WeakMap;
|
|
1272
|
+
function getCoverageCache(db) {
|
|
1273
|
+
let cache = coverageCaches.get(db);
|
|
1274
|
+
if (!cache) {
|
|
1275
|
+
cache = {
|
|
1276
|
+
pin: db.prepare("SELECT fts_rowid FROM message_fts_rowid_map LIMIT 1"),
|
|
1277
|
+
stamp: db.prepare("SELECT total_changes() AS changes, data_version AS version FROM pragma_data_version"),
|
|
1278
|
+
missing: db.prepare(`SELECT DISTINCT session_id AS sessionId
|
|
1279
|
+
FROM message_history_fts WHERE rowid IN (
|
|
1280
|
+
SELECT id FROM message_history_fts_docsize
|
|
1281
|
+
EXCEPT SELECT fts_rowid FROM message_fts_rowid_map
|
|
1282
|
+
)`)
|
|
1283
|
+
};
|
|
1284
|
+
coverageCaches.set(db, cache);
|
|
1285
|
+
}
|
|
1286
|
+
return cache;
|
|
1287
|
+
}
|
|
1288
|
+
function withMessageFtsSessionFilter(db, sessionId, read) {
|
|
1289
|
+
let cacheable = false;
|
|
1290
|
+
try {
|
|
1291
|
+
const transaction = db;
|
|
1292
|
+
cacheable = transaction.inTransaction === false || transaction.isTransaction === false;
|
|
1293
|
+
if (!cacheable)
|
|
1294
|
+
coverageCaches.delete(db);
|
|
1295
|
+
} catch {
|
|
1296
|
+
coverageCaches.delete(db);
|
|
1297
|
+
}
|
|
1298
|
+
return db.transaction(() => {
|
|
1299
|
+
let sessionFirst = false;
|
|
1300
|
+
try {
|
|
1301
|
+
const cache = getCoverageCache(db);
|
|
1302
|
+
cache.pin.get();
|
|
1303
|
+
const stamp = cache.stamp.get();
|
|
1304
|
+
let incomplete = cache.incompleteSessions;
|
|
1305
|
+
if (!cacheable || !incomplete || cache.version !== stamp.version || cache.changes !== stamp.changes) {
|
|
1306
|
+
const rows = cache.missing.all();
|
|
1307
|
+
incomplete = new Set(rows.map((row) => row.sessionId));
|
|
1308
|
+
if (cacheable) {
|
|
1309
|
+
cache.version = stamp.version;
|
|
1310
|
+
cache.changes = stamp.changes;
|
|
1311
|
+
cache.incompleteSessions = incomplete;
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
sessionFirst = !incomplete.has(sessionId);
|
|
1315
|
+
} catch {
|
|
1316
|
+
coverageCaches.delete(db);
|
|
1317
|
+
}
|
|
1318
|
+
return read(sessionFirst);
|
|
1319
|
+
}).deferred();
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1260
1322
|
// src/features/magic-context/literal-probes.ts
|
|
1261
1323
|
var MAX_PROBES = 5;
|
|
1262
1324
|
var MIN_PROBE_LENGTH = 3;
|
|
@@ -1313,61 +1375,6 @@ function containsProbeVerbatim(text, probes) {
|
|
|
1313
1375
|
return probes.some((probe) => haystack.includes(probe.toLowerCase()));
|
|
1314
1376
|
}
|
|
1315
1377
|
|
|
1316
|
-
// src/features/magic-context/message-fts-session-filter.ts
|
|
1317
|
-
var MESSAGE_FTS_SESSION_FILTER_SQL = `+message_history_fts.rowid IN (
|
|
1318
|
-
SELECT fts_rowid FROM message_fts_rowid_map WHERE session_id = ?1
|
|
1319
|
-
) AND `;
|
|
1320
|
-
var coverageCaches = new WeakMap;
|
|
1321
|
-
function getCoverageCache(db) {
|
|
1322
|
-
let cache = coverageCaches.get(db);
|
|
1323
|
-
if (!cache) {
|
|
1324
|
-
cache = {
|
|
1325
|
-
pin: db.prepare("SELECT fts_rowid FROM message_fts_rowid_map LIMIT 1"),
|
|
1326
|
-
stamp: db.prepare("SELECT total_changes() AS changes, data_version AS version FROM pragma_data_version"),
|
|
1327
|
-
missing: db.prepare(`SELECT DISTINCT session_id AS sessionId
|
|
1328
|
-
FROM message_history_fts WHERE rowid IN (
|
|
1329
|
-
SELECT id FROM message_history_fts_docsize
|
|
1330
|
-
EXCEPT SELECT fts_rowid FROM message_fts_rowid_map
|
|
1331
|
-
)`)
|
|
1332
|
-
};
|
|
1333
|
-
coverageCaches.set(db, cache);
|
|
1334
|
-
}
|
|
1335
|
-
return cache;
|
|
1336
|
-
}
|
|
1337
|
-
function withMessageFtsSessionFilter(db, sessionId, read) {
|
|
1338
|
-
let cacheable = false;
|
|
1339
|
-
try {
|
|
1340
|
-
const transaction = db;
|
|
1341
|
-
cacheable = transaction.inTransaction === false || transaction.isTransaction === false;
|
|
1342
|
-
if (!cacheable)
|
|
1343
|
-
coverageCaches.delete(db);
|
|
1344
|
-
} catch {
|
|
1345
|
-
coverageCaches.delete(db);
|
|
1346
|
-
}
|
|
1347
|
-
return db.transaction(() => {
|
|
1348
|
-
let sessionFirst = false;
|
|
1349
|
-
try {
|
|
1350
|
-
const cache = getCoverageCache(db);
|
|
1351
|
-
cache.pin.get();
|
|
1352
|
-
const stamp = cache.stamp.get();
|
|
1353
|
-
let incomplete = cache.incompleteSessions;
|
|
1354
|
-
if (!cacheable || !incomplete || cache.version !== stamp.version || cache.changes !== stamp.changes) {
|
|
1355
|
-
const rows = cache.missing.all();
|
|
1356
|
-
incomplete = new Set(rows.map((row) => row.sessionId));
|
|
1357
|
-
if (cacheable) {
|
|
1358
|
-
cache.version = stamp.version;
|
|
1359
|
-
cache.changes = stamp.changes;
|
|
1360
|
-
cache.incompleteSessions = incomplete;
|
|
1361
|
-
}
|
|
1362
|
-
}
|
|
1363
|
-
sessionFirst = !incomplete.has(sessionId);
|
|
1364
|
-
} catch {
|
|
1365
|
-
coverageCaches.delete(db);
|
|
1366
|
-
}
|
|
1367
|
-
return read(sessionFirst);
|
|
1368
|
-
}).deferred();
|
|
1369
|
-
}
|
|
1370
|
-
|
|
1371
1378
|
// src/features/magic-context/search-measurement.ts
|
|
1372
1379
|
import { createHash as createHash2 } from "node:crypto";
|
|
1373
1380
|
function resultId(result) {
|
|
@@ -1606,7 +1613,7 @@ var connections = new Map;
|
|
|
1606
1613
|
async function connect(connectionFile) {
|
|
1607
1614
|
let connection = connections.get(connectionFile);
|
|
1608
1615
|
if (!connection) {
|
|
1609
|
-
connection = SubcClient.connect({ connectionFile });
|
|
1616
|
+
connection = inRootAsyncContext2(() => SubcClient.connect({ connectionFile }));
|
|
1610
1617
|
connections.set(connectionFile, connection);
|
|
1611
1618
|
connection.catch(() => connections.delete(connectionFile));
|
|
1612
1619
|
}
|
|
@@ -3242,7 +3249,7 @@ ${diagnosticLines.join(`
|
|
|
3242
3249
|
bodyParts.push(diagnosticLines.join(`
|
|
3243
3250
|
`));
|
|
3244
3251
|
if (results.some((result) => result.source === "message" || result.source === "compartment")) {
|
|
3245
|
-
bodyParts.push("Use ctx_expand(start, end) with the range from any message result above to read the
|
|
3252
|
+
bodyParts.push("Use ctx_expand(start, end) with the range from any message result above to read the conversation context. If the host no longer holds those messages, ctx_expand returns indexed text from the search archive only, with no surrounding messages or tool output.");
|
|
3246
3253
|
}
|
|
3247
3254
|
if (results.some((result) => result.source === "note" && result.anchorOrdinal !== null && result.sourceSessionId === currentSessionId)) {
|
|
3248
3255
|
bodyParts.push(SEARCH_NOTE_EXPAND_HINT);
|
|
@@ -3254,4 +3261,4 @@ ${bodyParts.join(`
|
|
|
3254
3261
|
`)}`;
|
|
3255
3262
|
}
|
|
3256
3263
|
|
|
3257
|
-
export { renderSingleStoreMigrationRequiredRefusal, SingleStoreMigrationRequiredError, singleStoreMigrationRequiredFailure, projectNeedsSingleStoreMigration, STORE_AHEAD_OF_BINARY_CODE, storeAheadOfBinaryFailure, TRANSFORM_PAGE_UPLOAD_TIMEOUT_MS, transformColdStartExecuteTimeoutMs, MAX_WRAPUP_REQUEST_BUDGET_MS, getDefaultSubcConnectionFile, isModuleTransportGenerationChangedResult, SubcModuleTransport, indexCommitsForProject, embedUnembeddedCommits, createUnifiedSearchDiagnostics2, searchMessageHistory2, parseIdShapedQuery2, resolveMemoriesByIdsForSearch2, unifiedSearch2, formatSearchResults2 };
|
|
3264
|
+
export { renderSingleStoreMigrationRequiredRefusal, SingleStoreMigrationRequiredError, singleStoreMigrationRequiredFailure, projectNeedsSingleStoreMigration, STORE_AHEAD_OF_BINARY_CODE, storeAheadOfBinaryFailure, TRANSFORM_PAGE_UPLOAD_TIMEOUT_MS, transformColdStartExecuteTimeoutMs, MAX_WRAPUP_REQUEST_BUDGET_MS, getDefaultSubcConnectionFile, isModuleTransportGenerationChangedResult, SubcModuleTransport, indexCommitsForProject, embedUnembeddedCommits, withMessageFtsSessionFilter, createUnifiedSearchDiagnostics2, searchMessageHistory2, parseIdShapedQuery2, resolveMemoriesByIdsForSearch2, unifiedSearch2, formatSearchResults2 };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
importPluginModule,
|
|
3
3
|
log2
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-mvvephtj.js";
|
|
5
5
|
import {
|
|
6
6
|
sendStatusNotification2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-pgy3h49n.js";
|
|
8
8
|
import {
|
|
9
9
|
formatConflictShort
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-b64n4d0h.js";
|
|
11
11
|
|
|
12
12
|
// src/plugin/conflict-warning-hook.ts
|
|
13
13
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getTokenEstimatorFingerprint,
|
|
3
3
|
estimateTokens
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-gjvjh960.js";
|
|
5
5
|
import {
|
|
6
6
|
getHarness2
|
|
7
7
|
} from "./index-pavzsdc6.js";
|
|
8
8
|
import {
|
|
9
9
|
log2
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-mvvephtj.js";
|
|
11
11
|
import {
|
|
12
12
|
isSynapseEmbeddingTruncated
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-kvw6xew3.js";
|
|
14
14
|
import {
|
|
15
15
|
messageFtsOrdinalRangeIsMapped
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-mp2kghkv.js";
|
|
17
17
|
|
|
18
18
|
// src/features/magic-context/compartment-chunk-embedding.ts
|
|
19
19
|
import { createHash } from "node:crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
estimateTokens
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-gjvjh960.js";
|
|
4
4
|
import {
|
|
5
5
|
stableStringify
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-bd9cjab3.js";
|
|
7
7
|
|
|
8
8
|
// src/features/magic-context/tool-definition-tokens.ts
|
|
9
9
|
import { createHash } from "node:crypto";
|