@cortexkit/opencode-magic-context 0.49.33 → 0.49.35
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 +11 -6
- package/dist/chunk-embedding-write-worker.js +16 -14
- package/dist/{compaction-marker-candidates-31h86ph0.js → compaction-marker-candidates-g0p67ced.js} +3 -2
- package/dist/compaction-marker-candidates-worker.js +1 -1
- package/dist/{compartment-chunk-embedding-5q5gj67r.js → compartment-chunk-embedding-y4136are.js} +8 -7
- package/dist/{conflict-warning-hook-xgskea1v.js → conflict-warning-hook-hhw8z5ak.js} +9 -8
- package/dist/{context-jyzkstnr.js → context-fk8e3h9p.js} +1400 -701
- package/dist/{derive-budgets-pqybnx09.js → derive-budgets-htj16n4x.js} +3 -2
- package/dist/embedding-backfill-q6n72sy0.js +27 -0
- package/dist/embedding-worker-process.js +2 -1
- package/dist/embedding-worker.js +5 -4
- package/dist/expand-attachments-h33jbgyz.js +21 -0
- package/dist/features/magic-context/auto-search-diagnostics.d.ts +21 -0
- package/dist/features/magic-context/auto-search-diagnostics.d.ts.map +1 -0
- package/dist/features/magic-context/compaction-marker.d.ts +22 -6
- package/dist/features/magic-context/compaction-marker.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts +1 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/search.d.ts +4 -0
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +7 -0
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/store-generation-rebase-labels.d.ts +6 -0
- package/dist/features/magic-context/store-generation-rebase-labels.d.ts.map +1 -0
- package/dist/features/magic-context/store-generation-rebase.d.ts.map +1 -1
- package/dist/{history-owner-36wp3mkb.js → history-owner-0z620wgz.js} +3 -2
- package/dist/hooks/magic-context/apply-operations.d.ts +20 -3
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-observation.d.ts +13 -0
- package/dist/hooks/magic-context/auto-search-observation.d.ts.map +1 -0
- package/dist/hooks/magic-context/auto-search-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-worker-client.d.ts +5 -1
- package/dist/hooks/magic-context/auto-search-worker-client.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts +5 -5
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-marker-publication.d.ts +9 -0
- package/dist/hooks/magic-context/compaction-marker-publication.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-commit-hashes.d.ts +4 -0
- package/dist/hooks/magic-context/compartment-commit-hashes.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts +1 -0
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-resolvers.d.ts.map +1 -1
- package/dist/hooks/magic-context/final-wire-completeness.d.ts +15 -0
- package/dist/hooks/magic-context/final-wire-completeness.d.ts.map +1 -0
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts +1 -0
- package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts +11 -0
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-formatting.d.ts +2 -0
- package/dist/hooks/magic-context/read-session-formatting.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/{index-as2amvn3.js → index-0c7p8mq5.js} +6 -531
- package/dist/{index-51rdvtkz.js → index-1rhgxqs8.js} +2 -2
- package/dist/index-2amn2s73.js +123 -0
- package/dist/{index-c7phnbvk.js → index-2p37txes.js} +1 -1
- package/dist/index-2qbtqg1w.js +529 -0
- package/dist/{index-waktfbjy.js → index-2v6nvy3k.js} +4 -4
- package/dist/{index-dq5xzeb9.js → index-3d3872c6.js} +7 -5
- package/dist/{index-qr2mb02j.js → index-3j9t1v4n.js} +55 -21
- package/dist/{index-2xh37qn5.js → index-4bgk5ztz.js} +576 -5524
- package/dist/{index-b88dwwrh.js → index-4xyjr62e.js} +1 -1
- package/dist/index-66a50f3e.js +777 -0
- package/dist/{index-94ef0qe2.js → index-87ctnzz9.js} +33 -5
- package/dist/{index-xrnsygfq.js → index-9wnbnx8f.js} +1 -1
- package/dist/{index-3fkk2gwj.js → index-b6xz3qbe.js} +246 -420
- package/dist/{index-0fe4q77z.js → index-brg2w6qc.js} +146 -134
- package/dist/{index-spwjbkc7.js → index-dnqqqc5f.js} +1 -1
- package/dist/index-dy7w6wm4.js +194 -0
- package/dist/{index-3jmx3fae.js → index-ezv6dz3y.js} +37 -7
- package/dist/index-f297z1n8.js +4557 -0
- package/dist/{index-qgh1qwjj.js → index-f9b3vtt1.js} +1 -1
- package/dist/{index-v15ne3a3.js → index-faxb7mck.js} +2 -2
- package/dist/{index-rrv26qjz.js → index-fw42ms3m.js} +1 -1
- package/dist/{index-t5pck3ss.js → index-fxbk7gk3.js} +1 -1
- package/dist/{index-wfybj1dw.js → index-g4t7850m.js} +2 -2
- package/dist/{index-hbt0sbv2.js → index-gyaa159j.js} +18 -276
- package/dist/{index-4pnsgvfk.js → index-hacf2tyx.js} +1 -1
- package/dist/{index-s1n8dd2n.js → index-jkanybgq.js} +2 -2
- package/dist/{index-2743x98y.js → index-jn0ddrhp.js} +29 -138
- package/dist/{index-h7tgn49j.js → index-jrfre9ah.js} +5 -222
- package/dist/{index-kfyb3k6n.js → index-jz5bk7xd.js} +2 -2
- package/dist/{index-np3rgfw4.js → index-ksv0a31x.js} +3 -3
- package/dist/{index-7kkphb6c.js → index-nj360hcs.js} +4 -4
- package/dist/{index-gkee6p4g.js → index-p56dszfp.js} +3 -3
- package/dist/{index-4s4zq97n.js → index-pq0dpwrc.js} +4 -4
- package/dist/{index-rfxzazzy.js → index-pswsyf1w.js} +4 -4
- package/dist/{index-y1qwzvxn.js → index-pztqab6k.js} +2 -2
- package/dist/{index-rverk2vz.js → index-qncw9hey.js} +1 -1
- package/dist/index-qx8j6kds.js +270 -0
- package/dist/{index-kq5w68dp.js → index-txs8tce6.js} +1 -1
- package/dist/index-vzhhr1ht.js +532 -0
- package/dist/index-wh9fxds5.js +265 -0
- package/dist/{index-b7w46fp2.js → index-x2mrq5xv.js} +170 -48
- package/dist/{index-43vqx0za.js → index-xwwsbsd3.js} +15 -13
- package/dist/index-z4p0ry94.js +222 -0
- package/dist/index-z9zygwse.js +89 -0
- package/dist/{index-v7287tzq.js → index-zhqwda72.js} +19 -8
- package/dist/index.js +83 -72
- package/dist/{logger-94kew5wm.js → logger-qwnbcfj9.js} +2 -1
- package/dist/{message-fts-rowid-map-va36knh4.js → message-fts-rowid-map-xg7hr0mk.js} +5 -4
- package/dist/{message-index-bounded-zq7a5nm6.js → message-index-bounded-narw7bnz.js} +12 -11
- package/dist/{message-time-backfill-4qva0b4f.js → message-time-backfill-39bm498k.js} +3 -2
- package/dist/migration-worker.js +13 -11
- package/dist/{project-embedding-registry-6yex0r9f.js → project-embedding-registry-tdz7985n.js} +13 -11
- package/dist/raw-ordinal-warmup-worker.js +12 -7
- package/dist/{read-session-chunk-1ndphmb8.js → read-session-chunk-vmg1zjg0.js} +15 -10
- package/dist/{read-session-raw-b2sd67v4.js → read-session-raw-mncmzbm9.js} +3 -2
- package/dist/recomp-orchestrator-qyyhnc9b.js +68 -0
- package/dist/render-c5p0k846.js +43 -0
- package/dist/{safe-notification-target-mkr9yzvr.js → safe-notification-target-wztd7bgk.js} +3 -2
- package/dist/{search-archive-sr07c6aj.js → search-archive-0ny7p3bw.js} +13 -11
- package/dist/{search-040pac3a.js → search-f6hwvcxk.js} +26 -23
- package/dist/{send-session-notification-vz86nt79.js → send-session-notification-0gwcz3fw.js} +7 -6
- package/dist/{storage-tags-6hvkk01c.js → storage-tags-zx1023km.js} +5 -4
- package/dist/store-620rjzt9.js +21 -0
- package/dist/store-reader-yh19h38c.js +14 -0
- package/dist/tools/ctx-expand/render.d.ts +5 -3
- package/dist/tools/ctx-expand/render.d.ts.map +1 -1
- package/dist/tools/ctx-expand/search-archive.d.ts.map +1 -1
- package/dist/tools/ctx-expand/tools.d.ts +2 -0
- package/dist/tools/ctx-expand/tools.d.ts.map +1 -1
- package/dist/tools/ctx-expand/v2-archive-reader.d.ts +33 -0
- package/dist/tools/ctx-expand/v2-archive-reader.d.ts.map +1 -0
- package/dist/{transform-postprocess-phase-zx1peqma.js → transform-postprocess-phase-807ff6t2.js} +36 -30
- package/dist/v2/auto-search-worker.js +11 -6
- package/dist/v2/chunk-embedding-write-worker.js +16 -14
- package/dist/v2/{compaction-marker-candidates-m4vmye3w.js → compaction-marker-candidates-t1aq6gsj.js} +3 -2
- package/dist/v2/compaction-marker-candidates-worker.js +1 -1
- package/dist/v2/{compartment-chunk-embedding-rc31e6md.js → compartment-chunk-embedding-ncsk0r9e.js} +8 -7
- package/dist/v2/{context-3c4z2wj5.js → context-znqfkap4.js} +1725 -1095
- package/dist/v2/{derive-budgets-knf763tt.js → derive-budgets-sa0v7bz0.js} +4 -3
- package/dist/v2/embedding-backfill-11j425e0.js +26 -0
- package/dist/v2/embedding-worker-process.js +2 -1
- package/dist/v2/embedding-worker.js +5 -4
- package/dist/v2/expand-attachments-h33jbgyz.js +21 -0
- package/dist/v2/fold/idle.d.ts +15 -0
- package/dist/v2/fold/idle.d.ts.map +1 -0
- package/dist/v2/fold/native-replay-v3.d.ts +68 -0
- package/dist/v2/fold/native-replay-v3.d.ts.map +1 -0
- package/dist/v2/fold/native-replay.d.ts +58 -2
- package/dist/v2/fold/native-replay.d.ts.map +1 -1
- package/dist/v2/fold/policy.d.ts +2 -1
- package/dist/v2/fold/policy.d.ts.map +1 -1
- package/dist/v2/{history-owner-ad0crnrn.js → history-owner-fpka43cn.js} +3 -2
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/expand-attachments.d.ts +8 -0
- package/dist/v2/hooks/expand-attachments.d.ts.map +1 -0
- package/dist/v2/hooks/overflow-recovery.d.ts +45 -0
- package/dist/v2/hooks/overflow-recovery.d.ts.map +1 -0
- package/dist/v2/hooks/store.d.ts +7 -2
- package/dist/v2/hooks/store.d.ts.map +1 -1
- package/dist/v2/{logger-p34mjtja.js → logger-4cj6d03m.js} +2 -1
- package/dist/v2/{message-fts-rowid-map-78awh03v.js → message-fts-rowid-map-rmk571mb.js} +5 -4
- package/dist/v2/{message-index-bounded-jvgz7vk9.js → message-index-bounded-620bppw7.js} +12 -11
- package/dist/v2/{message-time-backfill-zvthw6xb.js → message-time-backfill-0c4h7sg6.js} +3 -2
- package/dist/v2/migration-worker.js +13 -11
- package/dist/v2/ordinal-range.fixture.d.ts +7 -0
- package/dist/v2/ordinal-range.fixture.d.ts.map +1 -0
- package/dist/v2/{project-embedding-registry-1x5qe2fy.js → project-embedding-registry-bm5fe1a8.js} +13 -11
- package/dist/v2/raw-ordinal-warmup-worker.js +12 -7
- package/dist/v2/{read-session-chunk-djzgm4jg.js → read-session-chunk-qfwv1k71.js} +15 -10
- package/dist/v2/{read-session-raw-5x088amc.js → read-session-raw-q294t8xs.js} +3 -2
- package/dist/v2/recomp-orchestrator-fcnjref7.js +67 -0
- package/dist/v2/render-98a1qv0b.js +42 -0
- package/dist/v2/{safe-notification-target-khnzg57c.js → safe-notification-target-gphhast7.js} +3 -2
- package/dist/v2/{search-archive-n3dhns4r.js → search-archive-r0y1bafr.js} +13 -11
- package/dist/v2/{search-q3wkpe8t.js → search-z1zqzsmh.js} +25 -22
- package/dist/v2/{send-session-notification-x5nzy34v.js → send-session-notification-fst6hkg7.js} +7 -6
- package/dist/v2/{server-rb8m4vry.js → server-1xesqm5h.js} +146 -134
- package/dist/v2/server-2amn2s73.js +123 -0
- package/dist/v2/{server-6g98c227.js → server-3schkz95.js} +4 -4
- package/dist/v2/server-468mya5v.js +209 -0
- package/dist/v2/server-55v5hpth.js +270 -0
- package/dist/v2/server-5jp38p98.js +532 -0
- package/dist/v2/{server-qjvk4a9t.js → server-69m30b21.js} +1 -1
- package/dist/v2/{server-d01pe8q5.js → server-7ccxt4nq.js} +14 -216
- package/dist/v2/{server-3mz2qh5a.js → server-969cdpmg.js} +1 -1
- package/dist/v2/{server-835q39kd.js → server-9k0mjef7.js} +2 -2
- package/dist/v2/{server-qc915kw2.js → server-bez34e60.js} +4 -4
- package/dist/v2/{server-nxas8v1d.js → server-bpvsvtph.js} +3 -3
- package/dist/v2/{server-ab8017gw.js → server-bxpz2dcn.js} +29 -138
- package/dist/v2/{server-bsgd4dk1.js → server-dcws5831.js} +2 -2
- package/dist/v2/server-ef1mskas.js +777 -0
- package/dist/v2/{server-1bw1wcbp.js → server-f0j864ma.js} +1 -1
- package/dist/v2/{server-aqbm9c8d.js → server-fqj6ddpr.js} +632 -5540
- package/dist/v2/{server-rr4cbkr0.js → server-hnknwaz8.js} +37 -7
- package/dist/v2/{server-h1byrhwx.js → server-hsf0qsn5.js} +19 -8
- package/dist/v2/{server-6495nmn9.js → server-jb6tjyeb.js} +5 -222
- package/dist/v2/{server-2aasmpsp.js → server-kkxzwa6w.js} +4 -4
- package/dist/v2/{server-a7x00tw8.js → server-mfn1yf9d.js} +1 -1
- package/dist/v2/{server-tkdabx8q.js → server-q0z2q2dx.js} +5 -530
- package/dist/v2/{server-n14edf07.js → server-qa74bj91.js} +77 -17
- package/dist/v2/server-qf2kzsh2.js +4513 -0
- package/dist/v2/{server-gyy4k6mf.js → server-qmmkhz2z.js} +1 -1
- package/dist/v2/{server-29qp8nz4.js → server-qxzbmtqt.js} +1 -1
- package/dist/v2/{server-hwag0khr.js → server-r3chnxs5.js} +4 -4
- package/dist/v2/{server-vr4szghm.js → server-rktnzs89.js} +2 -2
- package/dist/v2/{server-6vd2n183.js → server-s9xgyyj9.js} +1 -1
- package/dist/v2/{server-53eh1r8r.js → server-sd8hvzte.js} +2 -2
- package/dist/v2/{server-k3t06fxr.js → server-sefxj8k1.js} +1 -1
- package/dist/v2/{server-v77xa5wj.js → server-tpt7bwq8.js} +1 -1
- package/dist/v2/{server-awr8qa4c.js → server-ws5exe6q.js} +2 -2
- package/dist/v2/server-x4m6xcn4.js +194 -0
- package/dist/v2/{server-806rzhs6.js → server-xbtw0p9t.js} +1 -1
- package/dist/v2/{server-cqjvxyrp.js → server-xy7w7hrd.js} +2 -2
- package/dist/v2/server-ypf1ap0v.js +529 -0
- package/dist/v2/server-z4p0ry94.js +222 -0
- package/dist/v2/server-z9zygwse.js +89 -0
- package/dist/v2/{server-ab1g0wn9.js → server-zzgtgqmd.js} +2 -2
- package/dist/v2/server.js +6 -5
- package/dist/v2/{storage-tags-18nbaanf.js → storage-tags-19s0ebf0.js} +5 -4
- package/dist/v2/store-reader-cgx47zkp.js +14 -0
- package/dist/v2/store-reader.d.ts +9 -2
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/store-vdm8v3jd.js +21 -0
- package/dist/v2/v2-archive-reader-t2c0eypn.js +11 -0
- package/dist/v2/{wrapup-orchestrator-ga5vfmwr.js → wrapup-orchestrator-aqpqsveg.js} +46 -39
- package/dist/v2-archive-reader-tm2eayp2.js +11 -0
- package/dist/wrapup-orchestrator-k5yp19a6.js +55 -0
- package/package.json +1 -1
- package/src/shared/sqlite-transaction-mode-guard.test.ts +4 -0
- package/dist/embedding-backfill-0jgtqxen.js +0 -25
- package/dist/recomp-orchestrator-skqzzvby.js +0 -62
- package/dist/v2/embedding-backfill-f43hd8y6.js +0 -24
- package/dist/v2/recomp-orchestrator-qfqdvbta.js +0 -61
- package/dist/wrapup-orchestrator-dy8r3gp8.js +0 -49
|
@@ -5,17 +5,17 @@ import {
|
|
|
5
5
|
getDataDir,
|
|
6
6
|
log2,
|
|
7
7
|
sessionLog2
|
|
8
|
-
} from "./server-
|
|
8
|
+
} from "./server-jb6tjyeb.js";
|
|
9
9
|
import {
|
|
10
10
|
inRootAsyncContext2,
|
|
11
11
|
withSqliteBackgroundWriter2
|
|
12
12
|
} from "./server-gzy5w8ya.js";
|
|
13
13
|
import {
|
|
14
14
|
scheduleAfterBootQuiet
|
|
15
|
-
} from "./server-
|
|
15
|
+
} from "./server-69m30b21.js";
|
|
16
16
|
import {
|
|
17
17
|
isRecord
|
|
18
|
-
} from "./server-
|
|
18
|
+
} from "./server-bpvsvtph.js";
|
|
19
19
|
import {
|
|
20
20
|
cleanSearchText,
|
|
21
21
|
keywordRelevance,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
isMessageIndexReconciledThrough,
|
|
26
26
|
clearIndexedMessages,
|
|
27
27
|
indexMessagesAfterOrdinal
|
|
28
|
-
} from "./server-
|
|
28
|
+
} from "./server-r3chnxs5.js";
|
|
29
29
|
import {
|
|
30
30
|
Priority,
|
|
31
31
|
AdmissionClass,
|
|
@@ -34,15 +34,14 @@ import {
|
|
|
34
34
|
StaleRouteHandleError,
|
|
35
35
|
SubcClient,
|
|
36
36
|
isConsumerReconnectTransient
|
|
37
|
-
} from "./server-
|
|
37
|
+
} from "./server-zzgtgqmd.js";
|
|
38
38
|
import {
|
|
39
39
|
buildCanonicalChunkTextFromFts2,
|
|
40
40
|
loadCompartmentChunkEmbeddingsForSearch2,
|
|
41
41
|
peekCompartmentChunkSearchPool2,
|
|
42
42
|
warmCompartmentChunkSearchPool2
|
|
43
|
-
} from "./server-
|
|
43
|
+
} from "./server-hsf0qsn5.js";
|
|
44
44
|
import {
|
|
45
|
-
recordEmbeddingMeasurement,
|
|
46
45
|
saveCommitEmbedding,
|
|
47
46
|
loadProjectCommitEmbeddings,
|
|
48
47
|
loadUnembeddedCommits,
|
|
@@ -57,7 +56,10 @@ import {
|
|
|
57
56
|
enqueueShadowEmbeddingItems2,
|
|
58
57
|
getProjectEmbeddingSnapshot2,
|
|
59
58
|
embedItemsForProject2
|
|
60
|
-
} from "./server-
|
|
59
|
+
} from "./server-bxpz2dcn.js";
|
|
60
|
+
import {
|
|
61
|
+
recordEmbeddingMeasurement
|
|
62
|
+
} from "./server-2amn2s73.js";
|
|
61
63
|
import {
|
|
62
64
|
getProjectEmbeddings2
|
|
63
65
|
} from "./server-4dhv7mqz.js";
|
|
@@ -66,7 +68,7 @@ import {
|
|
|
66
68
|
isEmbeddingEnabled,
|
|
67
69
|
embedText,
|
|
68
70
|
ensureMemoryEmbeddings2
|
|
69
|
-
} from "./server-
|
|
71
|
+
} from "./server-kkxzwa6w.js";
|
|
70
72
|
import {
|
|
71
73
|
ModuleMemoryAuthorityError2,
|
|
72
74
|
getMemoriesByProject2,
|
|
@@ -74,14 +76,12 @@ import {
|
|
|
74
76
|
updateMemoryRetrievalCount2
|
|
75
77
|
} from "./server-jjvbk92s.js";
|
|
76
78
|
import {
|
|
77
|
-
getNotes,
|
|
78
|
-
getActivePrimers,
|
|
79
79
|
USER_FACING_FAILURES,
|
|
80
80
|
relaxedFtsQuery,
|
|
81
81
|
sanitizeFtsQuery,
|
|
82
82
|
searchMemoriesFTS,
|
|
83
83
|
searchMemoriesFTSUnion
|
|
84
|
-
} from "./server-
|
|
84
|
+
} from "./server-q0z2q2dx.js";
|
|
85
85
|
import {
|
|
86
86
|
MESSAGE_FTS_SESSION_FILTER_SQL,
|
|
87
87
|
withMessageFtsSessionFilter
|
|
@@ -92,7 +92,11 @@ import {
|
|
|
92
92
|
expandWorkspaceIdentitySetWithAliases,
|
|
93
93
|
resolveStoredPathWorkspaceIdentity,
|
|
94
94
|
sourceNameForMemory
|
|
95
|
-
} from "./server-
|
|
95
|
+
} from "./server-3schkz95.js";
|
|
96
|
+
import {
|
|
97
|
+
getNotes,
|
|
98
|
+
getActivePrimers
|
|
99
|
+
} from "./server-ypf1ap0v.js";
|
|
96
100
|
import {
|
|
97
101
|
isKnownAutocommit
|
|
98
102
|
} from "./server-8ajstryz.js";
|
|
@@ -392,6 +396,32 @@ function invalidateIncrementalWork(sessionId) {
|
|
|
392
396
|
}
|
|
393
397
|
}
|
|
394
398
|
|
|
399
|
+
// src/features/magic-context/auto-search-diagnostics.ts
|
|
400
|
+
function createAutoSearchDiagnostics(threshold) {
|
|
401
|
+
return {
|
|
402
|
+
threshold,
|
|
403
|
+
lanes: {},
|
|
404
|
+
pool: "unknown",
|
|
405
|
+
poolRows: null,
|
|
406
|
+
peek: "not-run",
|
|
407
|
+
workerStarted: false
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
function autoSearchRelevance(query, result) {
|
|
411
|
+
if (cleanSearchText(result.source === "compartment" ? result.title : result.content).length === 0)
|
|
412
|
+
return 0;
|
|
413
|
+
return result.source === "message" || "matchType" in result && result.source !== "compartment" && result.matchType !== "semantic" ? keywordRelevance(query, result.content) : result.score;
|
|
414
|
+
}
|
|
415
|
+
function recordAutoSearchLane(diagnostics, lane, query, results) {
|
|
416
|
+
if (!diagnostics)
|
|
417
|
+
return;
|
|
418
|
+
const scores = results.map((result) => result.relevanceScore ?? autoSearchRelevance(query, result));
|
|
419
|
+
diagnostics.lanes[lane] = {
|
|
420
|
+
top: scores.length ? Math.max(...scores) : null,
|
|
421
|
+
nearMisses: scores.filter((score) => score >= 0.5 && score < diagnostics.threshold).length
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
|
|
395
425
|
// src/hooks/magic-context/module-transport.ts
|
|
396
426
|
import { realpathSync } from "node:fs";
|
|
397
427
|
import { join } from "node:path";
|
|
@@ -3009,11 +3039,17 @@ async function searchCompartmentChunks(args) {
|
|
|
3009
3039
|
if (args.limit <= 0 || !args.modelId || args.modelId === "off") {
|
|
3010
3040
|
if (args.timings)
|
|
3011
3041
|
args.timings.chunkPool = "off";
|
|
3042
|
+
if (args.diagnostics)
|
|
3043
|
+
args.diagnostics.pool = "off";
|
|
3044
|
+
args.reportDiagnostics?.();
|
|
3012
3045
|
return [];
|
|
3013
3046
|
}
|
|
3014
3047
|
if (!args.queryEmbedding) {
|
|
3015
3048
|
if (args.timings)
|
|
3016
3049
|
args.timings.chunkPool = "no-vector";
|
|
3050
|
+
if (args.diagnostics)
|
|
3051
|
+
args.diagnostics.pool = "no-vector";
|
|
3052
|
+
args.reportDiagnostics?.();
|
|
3017
3053
|
if (args.warmOnly)
|
|
3018
3054
|
warmCompartmentChunkSearchPool2(args.db, args.sessionId, args.projectPath, args.modelId);
|
|
3019
3055
|
return [];
|
|
@@ -3021,15 +3057,25 @@ async function searchCompartmentChunks(args) {
|
|
|
3021
3057
|
const cutoff = args.maxOrdinal != null && args.maxOrdinal >= 0 ? args.maxOrdinal : null;
|
|
3022
3058
|
let rows;
|
|
3023
3059
|
if (args.warmOnly) {
|
|
3024
|
-
const warm = peekCompartmentChunkSearchPool2(args.db, args.sessionId, args.projectPath, args.modelId, args.dateRange);
|
|
3060
|
+
const warm = peekCompartmentChunkSearchPool2(args.db, args.sessionId, args.projectPath, args.modelId, args.dateRange, args.diagnostics);
|
|
3025
3061
|
if (warm === null) {
|
|
3026
3062
|
if (args.timings)
|
|
3027
3063
|
args.timings.chunkPool = "cold";
|
|
3064
|
+
if (args.diagnostics) {
|
|
3065
|
+
args.diagnostics.pool = "cold";
|
|
3066
|
+
args.diagnostics.poolRows = 0;
|
|
3067
|
+
}
|
|
3068
|
+
args.reportDiagnostics?.();
|
|
3028
3069
|
warmCompartmentChunkSearchPool2(args.db, args.sessionId, args.projectPath, args.modelId);
|
|
3029
3070
|
return [];
|
|
3030
3071
|
}
|
|
3031
3072
|
if (args.timings)
|
|
3032
3073
|
args.timings.chunkPool = "warm";
|
|
3074
|
+
if (args.diagnostics) {
|
|
3075
|
+
args.diagnostics.pool = "warm";
|
|
3076
|
+
args.diagnostics.poolRows = warm.length;
|
|
3077
|
+
}
|
|
3078
|
+
args.reportDiagnostics?.();
|
|
3033
3079
|
rows = warm;
|
|
3034
3080
|
} else {
|
|
3035
3081
|
try {
|
|
@@ -3399,6 +3445,8 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3399
3445
|
lanes.message_fts = (outcome.laneResults ?? outcome.results).slice(0, 25);
|
|
3400
3446
|
if (timings)
|
|
3401
3447
|
timings.messageMs = performance.now() - stepStartedAt;
|
|
3448
|
+
recordAutoSearchLane(options.autoSearchDiagnostics, "messages", trimmedQuery, messageResults);
|
|
3449
|
+
options.onAutoSearchDiagnostics?.();
|
|
3402
3450
|
}
|
|
3403
3451
|
stepStartedAt = performance.now();
|
|
3404
3452
|
const capturedQuery = await queryEmbeddingPromise;
|
|
@@ -3416,6 +3464,8 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3416
3464
|
stepStartedAt = performance.now();
|
|
3417
3465
|
if (timings)
|
|
3418
3466
|
timings.chunkPool = "off";
|
|
3467
|
+
if (options.autoSearchDiagnostics && !runCompartmentChunks)
|
|
3468
|
+
options.autoSearchDiagnostics.pool = "off";
|
|
3419
3469
|
const compartmentResults = runCompartmentChunks ? await searchCompartmentChunks({
|
|
3420
3470
|
db,
|
|
3421
3471
|
sessionId,
|
|
@@ -3427,8 +3477,13 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3427
3477
|
dateRange,
|
|
3428
3478
|
warmOnly: options.chunkPoolWarmOnly,
|
|
3429
3479
|
signal: options.signal,
|
|
3430
|
-
timings
|
|
3480
|
+
timings,
|
|
3481
|
+
diagnostics: options.autoSearchDiagnostics,
|
|
3482
|
+
reportDiagnostics: options.onAutoSearchDiagnostics
|
|
3431
3483
|
}) : [];
|
|
3484
|
+
if (runCompartmentChunks)
|
|
3485
|
+
recordAutoSearchLane(options.autoSearchDiagnostics, "summaries", trimmedQuery, compartmentResults);
|
|
3486
|
+
options.onAutoSearchDiagnostics?.();
|
|
3432
3487
|
if (timings && runCompartmentChunks)
|
|
3433
3488
|
timings.chunkMs = performance.now() - stepStartedAt;
|
|
3434
3489
|
stepStartedAt = performance.now();
|
|
@@ -3489,6 +3544,11 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3489
3544
|
]);
|
|
3490
3545
|
if (timings)
|
|
3491
3546
|
timings.otherLanesMs = performance.now() - stepStartedAt;
|
|
3547
|
+
if (runMemory)
|
|
3548
|
+
recordAutoSearchLane(options.autoSearchDiagnostics, "memory", trimmedQuery, memoryOutcome.results);
|
|
3549
|
+
if (runGitCommits)
|
|
3550
|
+
recordAutoSearchLane(options.autoSearchDiagnostics, "git", trimmedQuery, gitCommitResults);
|
|
3551
|
+
options.onAutoSearchDiagnostics?.();
|
|
3492
3552
|
if (options.diagnostics) {
|
|
3493
3553
|
options.diagnostics.suppressedVisibleMemoryIds = memoryOutcome.suppressedVisibleIds;
|
|
3494
3554
|
}
|
|
@@ -3551,7 +3611,7 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3551
3611
|
if (options.autoHint) {
|
|
3552
3612
|
return results.map((result) => ({
|
|
3553
3613
|
...result,
|
|
3554
|
-
relevanceScore:
|
|
3614
|
+
relevanceScore: autoSearchRelevance(trimmedQuery, result)
|
|
3555
3615
|
}));
|
|
3556
3616
|
}
|
|
3557
3617
|
return results;
|
|
@@ -3674,4 +3734,4 @@ ${bodyParts.join(`
|
|
|
3674
3734
|
`)}`;
|
|
3675
3735
|
}
|
|
3676
3736
|
|
|
3677
|
-
export { getMessageIndexEpoch, isMessageIndexSearchable, scheduleReconciliation, scheduleClearAndReindex, getMessageIndexQueueHeapStats, renderSingleStoreMigrationRequiredRefusal, SingleStoreMigrationRequiredError, singleStoreMigrationRequiredFailure, projectNeedsSingleStoreMigration, STORE_AHEAD_OF_BINARY_CODE, storeAheadOfBinaryFailure, TRANSFORM_PAGE_UPLOAD_TIMEOUT_MS, transformColdStartExecuteTimeoutMs, getDefaultSubcConnectionFile, isModuleTransportGenerationChangedResult, SubcModuleTransport, indexCommitsForProject, embedUnembeddedCommits, createUnifiedSearchDiagnostics2, searchMessageHistory2, parseIdShapedQuery2, resolveMemoriesByIdsForSearch2, unifiedSearch2, formatSearchResults2 };
|
|
3737
|
+
export { getMessageIndexEpoch, isMessageIndexSearchable, scheduleReconciliation, scheduleClearAndReindex, getMessageIndexQueueHeapStats, createAutoSearchDiagnostics, renderSingleStoreMigrationRequiredRefusal, SingleStoreMigrationRequiredError, singleStoreMigrationRequiredFailure, projectNeedsSingleStoreMigration, STORE_AHEAD_OF_BINARY_CODE, storeAheadOfBinaryFailure, TRANSFORM_PAGE_UPLOAD_TIMEOUT_MS, transformColdStartExecuteTimeoutMs, getDefaultSubcConnectionFile, isModuleTransportGenerationChangedResult, SubcModuleTransport, indexCommitsForProject, embedUnembeddedCommits, createUnifiedSearchDiagnostics2, searchMessageHistory2, parseIdShapedQuery2, resolveMemoriesByIdsForSearch2, unifiedSearch2, formatSearchResults2 };
|