@cortexkit/opencode-magic-context 0.49.34 → 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-p3xrarzt.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/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/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/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/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-ftr84kkv.js → index-3d3872c6.js} +7 -5
- package/dist/{index-0677w9sd.js → index-3j9t1v4n.js} +55 -21
- package/dist/{index-atekmqef.js → index-4bgk5ztz.js} +363 -5499
- package/dist/{index-b88dwwrh.js → index-4xyjr62e.js} +1 -1
- package/dist/index-66a50f3e.js +777 -0
- package/dist/{index-04z754rd.js → index-87ctnzz9.js} +33 -5
- package/dist/{index-xrnsygfq.js → index-9wnbnx8f.js} +1 -1
- package/dist/{index-97spytxq.js → index-b6xz3qbe.js} +246 -420
- package/dist/{index-7g9dr8gy.js → index-brg2w6qc.js} +113 -133
- package/dist/{index-spwjbkc7.js → index-dnqqqc5f.js} +1 -1
- package/dist/index-dy7w6wm4.js +194 -0
- package/dist/{index-m1x9ghk5.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-fm36bjv4.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-9gpw8hrm.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-hbx7m8he.js → index-x2mrq5xv.js} +170 -48
- package/dist/{index-07vskjn8.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-qh91fdr3.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-kaghtr75.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-1kw2rp19.js → search-archive-0ny7p3bw.js} +13 -11
- package/dist/{search-p684j8ww.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-ph38mhrs.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-s60hcatx.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-4htdr1j6.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-1fa9qzwb.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-xfp51s0g.js → search-archive-r0y1bafr.js} +13 -11
- package/dist/v2/{search-wf8rqxhm.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-qvy4qavp.js → server-1xesqm5h.js} +113 -133
- 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-jw5qe9y8.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-z2wft9zv.js → server-fqj6ddpr.js} +402 -5497
- package/dist/v2/{server-grakwy1v.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-ajxhrgjv.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-m1pfg2d4.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-wxf7n5k6.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 +2 -0
- package/dist/embedding-backfill-0jgtqxen.js +0 -25
- package/dist/recomp-orchestrator-0y983w7h.js +0 -62
- package/dist/v2/embedding-backfill-f43hd8y6.js +0 -24
- package/dist/v2/recomp-orchestrator-7q9nvxte.js +0 -61
- package/dist/wrapup-orchestrator-ys2nrkkb.js +0 -49
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
importPluginModule,
|
|
6
6
|
sessionLog2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-jrfre9ah.js";
|
|
8
8
|
import {
|
|
9
9
|
isDefaultSessionTitle2
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-fw42ms3m.js";
|
|
11
11
|
import {
|
|
12
12
|
shouldHoldIgnoredNotification
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-pztqab6k.js";
|
|
14
14
|
import {
|
|
15
15
|
getErrorMessage
|
|
16
16
|
} from "./index-y8v6yerm.js";
|
|
@@ -142,7 +142,7 @@ async function sendIgnoredMessageNow(client, sessionId, text, params, forcePersi
|
|
|
142
142
|
holdIgnoredNotification({ client, sessionId, text, params, forcePersist }, "during target checks");
|
|
143
143
|
return "queued";
|
|
144
144
|
}
|
|
145
|
-
const { waitForSafeNotificationTarget } = await importPluginModule(() => import("./safe-notification-target-
|
|
145
|
+
const { waitForSafeNotificationTarget } = await importPluginModule(() => import("./safe-notification-target-wztd7bgk.js"));
|
|
146
146
|
if (await waitForSafeNotificationTarget(client, sessionId) === "skip") {
|
|
147
147
|
sessionLog2(sessionId, "notification skipped (session not titled yet)");
|
|
148
148
|
return "skipped";
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionLog2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-jrfre9ah.js";
|
|
4
4
|
import {
|
|
5
5
|
clearEmergencyRecovery
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-brg2w6qc.js";
|
|
7
7
|
import {
|
|
8
8
|
requestPendingMaterialization,
|
|
9
|
-
dropSlot
|
|
9
|
+
dropSlot
|
|
10
|
+
} from "./index-f297z1n8.js";
|
|
11
|
+
import {
|
|
10
12
|
executeContextRecomp
|
|
11
|
-
} from "./index-
|
|
13
|
+
} from "./index-4bgk5ztz.js";
|
|
12
14
|
import {
|
|
13
15
|
renderUserFacingFailure,
|
|
14
16
|
userFacingFailureCode
|
|
15
|
-
} from "./index-
|
|
17
|
+
} from "./index-0c7p8mq5.js";
|
|
16
18
|
|
|
17
19
|
// src/hooks/magic-context/recomp-orchestrator.ts
|
|
18
20
|
function resolveLiveModelKey(liveSessionState, sessionId) {
|
|
@@ -6,27 +6,26 @@ import {
|
|
|
6
6
|
StaleRouteHandleError,
|
|
7
7
|
SubcClient,
|
|
8
8
|
isConsumerReconnectTransient
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-g4t7850m.js";
|
|
10
10
|
import {
|
|
11
11
|
getHarness2
|
|
12
12
|
} from "./index-pavzsdc6.js";
|
|
13
13
|
import {
|
|
14
14
|
getDataDir
|
|
15
15
|
} from "./index-g2q4htwp.js";
|
|
16
|
-
import {
|
|
17
|
-
log2
|
|
18
|
-
} from "./index-h7tgn49j.js";
|
|
19
16
|
import {
|
|
20
17
|
inRootAsyncContext2
|
|
21
18
|
} from "./index-gzy5w8ya.js";
|
|
19
|
+
import {
|
|
20
|
+
log2
|
|
21
|
+
} from "./index-jrfre9ah.js";
|
|
22
22
|
import {
|
|
23
23
|
buildCanonicalChunkTextFromFts2,
|
|
24
24
|
loadCompartmentChunkEmbeddingsForSearch2,
|
|
25
25
|
peekCompartmentChunkSearchPool2,
|
|
26
26
|
warmCompartmentChunkSearchPool2
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-zhqwda72.js";
|
|
28
28
|
import {
|
|
29
|
-
recordEmbeddingMeasurement,
|
|
30
29
|
saveCommitEmbedding,
|
|
31
30
|
loadProjectCommitEmbeddings,
|
|
32
31
|
loadUnembeddedCommits,
|
|
@@ -41,7 +40,10 @@ import {
|
|
|
41
40
|
enqueueShadowEmbeddingItems2,
|
|
42
41
|
getProjectEmbeddingSnapshot2,
|
|
43
42
|
embedItemsForProject2
|
|
44
|
-
} from "./index-
|
|
43
|
+
} from "./index-jn0ddrhp.js";
|
|
44
|
+
import {
|
|
45
|
+
recordEmbeddingMeasurement
|
|
46
|
+
} from "./index-2amn2s73.js";
|
|
45
47
|
import {
|
|
46
48
|
getProjectEmbeddings2
|
|
47
49
|
} from "./index-4dhv7mqz.js";
|
|
@@ -50,7 +52,7 @@ import {
|
|
|
50
52
|
isEmbeddingEnabled,
|
|
51
53
|
embedText,
|
|
52
54
|
ensureMemoryEmbeddings2
|
|
53
|
-
} from "./index-
|
|
55
|
+
} from "./index-pswsyf1w.js";
|
|
54
56
|
import {
|
|
55
57
|
ModuleMemoryAuthorityError2,
|
|
56
58
|
getMemoriesByProject2,
|
|
@@ -59,37 +61,39 @@ import {
|
|
|
59
61
|
} from "./index-jjvbk92s.js";
|
|
60
62
|
import {
|
|
61
63
|
USER_FACING_FAILURES,
|
|
62
|
-
getNotes,
|
|
63
|
-
getActivePrimers,
|
|
64
64
|
relaxedFtsQuery,
|
|
65
65
|
sanitizeFtsQuery,
|
|
66
66
|
searchMemoriesFTS,
|
|
67
67
|
searchMemoriesFTSUnion
|
|
68
|
-
} from "./index-
|
|
68
|
+
} from "./index-0c7p8mq5.js";
|
|
69
69
|
import {
|
|
70
|
-
cleanSearchText,
|
|
71
|
-
keywordRelevance,
|
|
72
70
|
matchedSearchSnippet,
|
|
73
71
|
getIndexedMessageCorpusSize
|
|
74
|
-
} from "./index-
|
|
72
|
+
} from "./index-pq0dpwrc.js";
|
|
75
73
|
import {
|
|
76
74
|
MESSAGE_FTS_SESSION_FILTER_SQL,
|
|
77
75
|
withMessageFtsSessionFilter
|
|
78
76
|
} from "./index-kaqs6h31.js";
|
|
79
77
|
import {
|
|
80
78
|
isRecord
|
|
81
|
-
} from "./index-
|
|
79
|
+
} from "./index-ksv0a31x.js";
|
|
82
80
|
import {
|
|
83
81
|
getMessageIndexEpoch,
|
|
84
|
-
isMessageIndexSearchable
|
|
85
|
-
|
|
82
|
+
isMessageIndexSearchable,
|
|
83
|
+
autoSearchRelevance,
|
|
84
|
+
recordAutoSearchLane
|
|
85
|
+
} from "./index-87ctnzz9.js";
|
|
86
86
|
import {
|
|
87
87
|
resolveWorkspaceShareCategories,
|
|
88
88
|
resolveWorkspaceIdentitySet,
|
|
89
89
|
expandWorkspaceIdentitySetWithAliases,
|
|
90
90
|
resolveStoredPathWorkspaceIdentity,
|
|
91
91
|
sourceNameForMemory
|
|
92
|
-
} from "./index-
|
|
92
|
+
} from "./index-nj360hcs.js";
|
|
93
|
+
import {
|
|
94
|
+
getNotes,
|
|
95
|
+
getActivePrimers
|
|
96
|
+
} from "./index-2qbtqg1w.js";
|
|
93
97
|
import {
|
|
94
98
|
isKnownAutocommit
|
|
95
99
|
} from "./index-8ajstryz.js";
|
|
@@ -2711,11 +2715,17 @@ async function searchCompartmentChunks(args) {
|
|
|
2711
2715
|
if (args.limit <= 0 || !args.modelId || args.modelId === "off") {
|
|
2712
2716
|
if (args.timings)
|
|
2713
2717
|
args.timings.chunkPool = "off";
|
|
2718
|
+
if (args.diagnostics)
|
|
2719
|
+
args.diagnostics.pool = "off";
|
|
2720
|
+
args.reportDiagnostics?.();
|
|
2714
2721
|
return [];
|
|
2715
2722
|
}
|
|
2716
2723
|
if (!args.queryEmbedding) {
|
|
2717
2724
|
if (args.timings)
|
|
2718
2725
|
args.timings.chunkPool = "no-vector";
|
|
2726
|
+
if (args.diagnostics)
|
|
2727
|
+
args.diagnostics.pool = "no-vector";
|
|
2728
|
+
args.reportDiagnostics?.();
|
|
2719
2729
|
if (args.warmOnly)
|
|
2720
2730
|
warmCompartmentChunkSearchPool2(args.db, args.sessionId, args.projectPath, args.modelId);
|
|
2721
2731
|
return [];
|
|
@@ -2723,15 +2733,25 @@ async function searchCompartmentChunks(args) {
|
|
|
2723
2733
|
const cutoff = args.maxOrdinal != null && args.maxOrdinal >= 0 ? args.maxOrdinal : null;
|
|
2724
2734
|
let rows;
|
|
2725
2735
|
if (args.warmOnly) {
|
|
2726
|
-
const warm = peekCompartmentChunkSearchPool2(args.db, args.sessionId, args.projectPath, args.modelId, args.dateRange);
|
|
2736
|
+
const warm = peekCompartmentChunkSearchPool2(args.db, args.sessionId, args.projectPath, args.modelId, args.dateRange, args.diagnostics);
|
|
2727
2737
|
if (warm === null) {
|
|
2728
2738
|
if (args.timings)
|
|
2729
2739
|
args.timings.chunkPool = "cold";
|
|
2740
|
+
if (args.diagnostics) {
|
|
2741
|
+
args.diagnostics.pool = "cold";
|
|
2742
|
+
args.diagnostics.poolRows = 0;
|
|
2743
|
+
}
|
|
2744
|
+
args.reportDiagnostics?.();
|
|
2730
2745
|
warmCompartmentChunkSearchPool2(args.db, args.sessionId, args.projectPath, args.modelId);
|
|
2731
2746
|
return [];
|
|
2732
2747
|
}
|
|
2733
2748
|
if (args.timings)
|
|
2734
2749
|
args.timings.chunkPool = "warm";
|
|
2750
|
+
if (args.diagnostics) {
|
|
2751
|
+
args.diagnostics.pool = "warm";
|
|
2752
|
+
args.diagnostics.poolRows = warm.length;
|
|
2753
|
+
}
|
|
2754
|
+
args.reportDiagnostics?.();
|
|
2735
2755
|
rows = warm;
|
|
2736
2756
|
} else {
|
|
2737
2757
|
try {
|
|
@@ -3101,6 +3121,8 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3101
3121
|
lanes.message_fts = (outcome.laneResults ?? outcome.results).slice(0, 25);
|
|
3102
3122
|
if (timings)
|
|
3103
3123
|
timings.messageMs = performance.now() - stepStartedAt;
|
|
3124
|
+
recordAutoSearchLane(options.autoSearchDiagnostics, "messages", trimmedQuery, messageResults);
|
|
3125
|
+
options.onAutoSearchDiagnostics?.();
|
|
3104
3126
|
}
|
|
3105
3127
|
stepStartedAt = performance.now();
|
|
3106
3128
|
const capturedQuery = await queryEmbeddingPromise;
|
|
@@ -3118,6 +3140,8 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3118
3140
|
stepStartedAt = performance.now();
|
|
3119
3141
|
if (timings)
|
|
3120
3142
|
timings.chunkPool = "off";
|
|
3143
|
+
if (options.autoSearchDiagnostics && !runCompartmentChunks)
|
|
3144
|
+
options.autoSearchDiagnostics.pool = "off";
|
|
3121
3145
|
const compartmentResults = runCompartmentChunks ? await searchCompartmentChunks({
|
|
3122
3146
|
db,
|
|
3123
3147
|
sessionId,
|
|
@@ -3129,8 +3153,13 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3129
3153
|
dateRange,
|
|
3130
3154
|
warmOnly: options.chunkPoolWarmOnly,
|
|
3131
3155
|
signal: options.signal,
|
|
3132
|
-
timings
|
|
3156
|
+
timings,
|
|
3157
|
+
diagnostics: options.autoSearchDiagnostics,
|
|
3158
|
+
reportDiagnostics: options.onAutoSearchDiagnostics
|
|
3133
3159
|
}) : [];
|
|
3160
|
+
if (runCompartmentChunks)
|
|
3161
|
+
recordAutoSearchLane(options.autoSearchDiagnostics, "summaries", trimmedQuery, compartmentResults);
|
|
3162
|
+
options.onAutoSearchDiagnostics?.();
|
|
3134
3163
|
if (timings && runCompartmentChunks)
|
|
3135
3164
|
timings.chunkMs = performance.now() - stepStartedAt;
|
|
3136
3165
|
stepStartedAt = performance.now();
|
|
@@ -3191,6 +3220,11 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3191
3220
|
]);
|
|
3192
3221
|
if (timings)
|
|
3193
3222
|
timings.otherLanesMs = performance.now() - stepStartedAt;
|
|
3223
|
+
if (runMemory)
|
|
3224
|
+
recordAutoSearchLane(options.autoSearchDiagnostics, "memory", trimmedQuery, memoryOutcome.results);
|
|
3225
|
+
if (runGitCommits)
|
|
3226
|
+
recordAutoSearchLane(options.autoSearchDiagnostics, "git", trimmedQuery, gitCommitResults);
|
|
3227
|
+
options.onAutoSearchDiagnostics?.();
|
|
3194
3228
|
if (options.diagnostics) {
|
|
3195
3229
|
options.diagnostics.suppressedVisibleMemoryIds = memoryOutcome.suppressedVisibleIds;
|
|
3196
3230
|
}
|
|
@@ -3253,7 +3287,7 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3253
3287
|
if (options.autoHint) {
|
|
3254
3288
|
return results.map((result) => ({
|
|
3255
3289
|
...result,
|
|
3256
|
-
relevanceScore:
|
|
3290
|
+
relevanceScore: autoSearchRelevance(trimmedQuery, result)
|
|
3257
3291
|
}));
|
|
3258
3292
|
}
|
|
3259
3293
|
return results;
|