@cortexkit/opencode-magic-context 0.49.19 → 0.49.20
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 +48 -9
- package/dist/chunk-embedding-write-worker.js +30 -23
- package/dist/{compaction-marker-candidates-n4krhat4.js → compaction-marker-candidates-b2q30cft.js} +3 -3
- package/dist/compaction-marker-candidates-worker.js +2 -2
- package/dist/compartment-chunk-embedding-va090as0.js +65 -0
- package/dist/config/schema/magic-context.d.ts +6 -6
- package/dist/{conflict-warning-hook-4pmz879v.js → conflict-warning-hook-frp3z2wk.js} +9 -8
- package/dist/{context-j31m2dv7.js → context-mkece1db.js} +455 -134
- package/dist/{derive-budgets-zn7yzd2d.js → derive-budgets-pqybnx09.js} +2 -2
- package/dist/embedding-backfill-gy3p78py.js +25 -0
- package/dist/embedding-worker-process.js +2 -2
- package/dist/embedding-worker.js +5 -5
- package/dist/features/magic-context/chunk-embedding-writer.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts +44 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/hidden-single-shot.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-config.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts +2 -0
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-identity.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-local.d.ts +1 -0
- package/dist/features/magic-context/memory/embedding-local.d.ts.map +1 -1
- package/dist/features/magic-context/memory/local-embedding-pooling.d.ts +22 -0
- package/dist/features/magic-context/memory/local-embedding-pooling.d.ts.map +1 -0
- package/dist/features/magic-context/message-index-async.d.ts.map +1 -1
- package/dist/features/magic-context/message-index.d.ts +2 -0
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/mural/compress-cues.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/search.d.ts +27 -0
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/compiler.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +1 -0
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/subagent-token-capture.d.ts +20 -0
- package/dist/features/magic-context/subagent-token-capture.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/review-user-memories.d.ts.map +1 -1
- package/dist/{history-owner-xp3pngv7.js → history-owner-36wp3mkb.js} +2 -2
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-embed-session.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-hint.d.ts +7 -1
- package/dist/hooks/magic-context/auto-search-hint.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-worker-client.d.ts +33 -6
- package/dist/hooks/magic-context/auto-search-worker-client.d.ts.map +1 -1
- package/dist/hooks/magic-context/cache-busting-signals.d.ts +5 -2
- package/dist/hooks/magic-context/cache-busting-signals.d.ts.map +1 -1
- package/dist/hooks/magic-context/channel2-delivery.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-types.d.ts +5 -0
- package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts +1 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -1
- package/dist/hooks/magic-context/diagnostic-log-state.d.ts +4 -0
- package/dist/hooks/magic-context/diagnostic-log-state.d.ts.map +1 -0
- package/dist/hooks/magic-context/execute-reclaim.d.ts +35 -0
- package/dist/hooks/magic-context/execute-reclaim.d.ts.map +1 -0
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +1 -3
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/latest-assistant-turn.d.ts +8 -0
- package/dist/hooks/magic-context/latest-assistant-turn.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts +5 -0
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts.map +1 -1
- package/dist/hooks/magic-context/nudge-evaluation-log.d.ts +3 -0
- package/dist/hooks/magic-context/nudge-evaluation-log.d.ts.map +1 -0
- package/dist/hooks/magic-context/pending-drop-eligibility.d.ts.map +1 -1
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts +4 -0
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts.map +1 -1
- package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-date-refresh.d.ts +5 -5
- package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
- package/dist/hooks/magic-context/system-prompt-sticky-date.d.ts +10 -0
- package/dist/hooks/magic-context/system-prompt-sticky-date.d.ts.map +1 -0
- 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/transform-compartment-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +21 -6
- 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-bjcnntmz.js → index-0wthn7fp.js} +468 -18
- package/dist/{index-kq82mtg0.js → index-11zf2wwc.js} +3 -3
- package/dist/{index-b5vqckbw.js → index-153r2q6z.js} +314 -127
- package/dist/{index-3h4dp9wb.js → index-1pefp8ar.js} +5 -5
- package/dist/{index-beht37jy.js → index-1zx2pa5d.js} +1 -1
- package/dist/{index-ze7mvk54.js → index-2yhtnfcf.js} +75 -57
- package/dist/{index-cf74k5ak.js → index-305y133n.js} +4 -4
- package/dist/{index-s734jcsr.js → index-35qc6606.js} +9 -3
- package/dist/{index-se4m2g6w.js → index-48stjd56.js} +105 -19
- package/dist/{index-4911rn0b.js → index-4n7w9rad.js} +6 -6
- package/dist/{index-kee4kn5j.js → index-4pnsgvfk.js} +1 -1
- package/dist/{v2/server-8cd2j99z.js → index-5kym00ag.js} +32 -13
- package/dist/{index-4s3t0nd0.js → index-616rsjrv.js} +2 -2
- package/dist/{index-jhghdnsm.js → index-67nyj0gy.js} +485 -202
- package/dist/{index-6x57ar45.js → index-adk2z5d8.js} +3 -3
- package/dist/{index-c5pytzne.js → index-b88dwwrh.js} +1 -1
- package/dist/{index-rr2bb45z.js → index-c4b76d4t.js} +2 -2
- package/dist/{index-nj7yykkx.js → index-c7phnbvk.js} +1 -1
- package/dist/index-cpjk5jd2.js +82 -0
- package/dist/{index-edmpdxcw.js → index-d6rp4dxh.js} +5 -5
- package/dist/{index-dxmq29t1.js → index-dc8hy95c.js} +69 -17
- package/dist/{index-j75v2476.js → index-h7tgn49j.js} +12 -15
- package/dist/{index-ke416mdc.js → index-j76ah6d7.js} +2 -2
- package/dist/{index-c1p88z1y.js → index-jfh3cktr.js} +4 -4
- package/dist/{index-a6mc0v4d.js → index-jmycsey7.js} +3 -3
- package/dist/{index-24fezq97.js → index-jr5na10t.js} +4 -4
- package/dist/{index-s74zqahq.js → index-kc9pn495.js} +4 -4
- package/dist/{index-p5y3k4g7.js → index-nda0zgna.js} +2 -1
- package/dist/{index-jn12fvvh.js → index-neb2jaed.js} +3 -3
- package/dist/{index-63k48rv9.js → index-pnjwa6qa.js} +5 -5
- package/dist/{index-jrr131e0.js → index-rmd0069m.js} +11 -11
- package/dist/{index-y9f76s3f.js → index-rrv26qjz.js} +1 -1
- package/dist/{index-v10f1rjv.js → index-spwjbkc7.js} +1 -1
- package/dist/{index-k29z4aqh.js → index-t5pck3ss.js} +1 -1
- package/dist/{index-3esx8tkf.js → index-t7hx3qcb.js} +318 -104
- package/dist/{index-rpxdjkm0.js → index-v7r4td4c.js} +306 -59
- package/dist/{index-2vxtcb95.js → index-vkc1ca9p.js} +2 -2
- package/dist/{index-9zcsy3hh.js → index-x4k3f4mf.js} +17 -9
- package/dist/{index-bp5083x2.js → index-x9k3mqrf.js} +1 -1
- package/dist/{index-n37sebck.js → index-y4a3nhtk.js} +1 -1
- package/dist/index.js +52 -49
- package/dist/{logger-jm3sqqzr.js → logger-94kew5wm.js} +1 -1
- package/dist/{message-fts-rowid-map-17s0dfn4.js → message-fts-rowid-map-22tevnnj.js} +6 -5
- package/dist/{message-index-gtpqnj8w.js → message-index-5qxcz6h7.js} +16 -15
- package/dist/{message-index-bounded-zyc8h32y.js → message-index-bounded-n0m0t7tv.js} +16 -15
- package/dist/{message-time-backfill-73mmm76q.js → message-time-backfill-0myx7fz3.js} +3 -3
- package/dist/migration-worker.js +13 -12
- package/dist/{model-resolution-nx97z3x7.js → model-resolution-280gmqvd.js} +1 -1
- package/dist/plugin/embedding-bootstrap.d.ts +3 -1
- package/dist/plugin/embedding-bootstrap.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts +8 -0
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/plugin/subagent-tool-policy.d.ts +9 -0
- package/dist/plugin/subagent-tool-policy.d.ts.map +1 -1
- package/dist/{project-embedding-registry-z74mhqkf.js → project-embedding-registry-s2pqgec9.js} +13 -12
- package/dist/raw-ordinal-warmup-worker.js +136 -101
- package/dist/{read-session-chunk-jjb48bt9.js → read-session-chunk-0a8vdyqp.js} +11 -10
- package/dist/{read-session-raw-rsc8c7qy.js → read-session-raw-y5cszf0b.js} +4 -3
- package/dist/recomp-orchestrator-61vyha9j.js +62 -0
- package/dist/{safe-notification-target-1szv1k5k.js → safe-notification-target-mkr9yzvr.js} +2 -2
- package/dist/{search-archive-6vm0e2f5.js → search-archive-8q9s49p5.js} +12 -11
- package/dist/{search-xsqk1bj4.js → search-v1y9ejws.js} +25 -24
- package/dist/{send-session-notification-6ve0e8p4.js → send-session-notification-0k6qzydk.js} +7 -6
- package/dist/shared/logger.d.ts.map +1 -1
- package/dist/shared/model-resolution.d.ts +2 -0
- package/dist/shared/model-resolution.d.ts.map +1 -1
- package/dist/shared/prompt-async-transport.d.ts +3 -0
- package/dist/shared/prompt-async-transport.d.ts.map +1 -1
- package/dist/shared/rpc-types.d.ts +7 -0
- package/dist/shared/rpc-types.d.ts.map +1 -1
- package/dist/shared/sqlite.d.ts +1 -1
- package/dist/shared/sqlite.d.ts.map +1 -1
- package/dist/shared/subagent-runner.d.ts +2 -0
- package/dist/shared/subagent-runner.d.ts.map +1 -1
- package/dist/shared/worker-shutdown.d.ts +68 -0
- package/dist/shared/worker-shutdown.d.ts.map +1 -0
- package/dist/shared/worker-shutdown.fixture.d.ts +2 -0
- package/dist/shared/worker-shutdown.fixture.d.ts.map +1 -0
- package/dist/{sqlite-zf72c52d.js → sqlite-1rpvw2rj.js} +1 -1
- package/dist/{storage-memory-y3qmy00r.js → storage-memory-nm7v82mj.js} +2 -2
- package/dist/{storage-tags-r7k9tjcv.js → storage-tags-r6nk29n4.js} +5 -5
- package/dist/{task-config-x3qmayd2.js → task-config-t6bpyka7.js} +2 -2
- package/dist/tools/ctx-search/tools.d.ts.map +1 -1
- package/dist/{transform-postprocess-phase-jj99r7z2.js → transform-postprocess-phase-vtrgb7m6.js} +34 -31
- package/dist/v2/auto-search-worker.js +48 -9
- package/dist/v2/chunk-embedding-write-worker.js +30 -23
- package/dist/v2/{compaction-marker-candidates-ebx3388k.js → compaction-marker-candidates-cfab70cs.js} +3 -3
- package/dist/v2/compaction-marker-candidates-worker.js +2 -2
- package/dist/v2/compartment-chunk-embedding-nbdqx1td.js +64 -0
- package/dist/v2/{context-y5yamxak.js → context-cc33tv2z.js} +1189 -386
- package/dist/v2/{derive-budgets-2zh4gm2c.js → derive-budgets-knf763tt.js} +3 -3
- package/dist/v2/embedding-backfill-yxv2h5mc.js +24 -0
- package/dist/v2/embedding-worker-process.js +2 -2
- package/dist/v2/embedding-worker.js +5 -5
- package/dist/v2/hidden-child-record.d.ts +2 -0
- package/dist/v2/hidden-child-record.d.ts.map +1 -1
- package/dist/v2/hidden-completion.d.ts +2 -0
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/hidden-model-activity.d.ts +7 -0
- package/dist/v2/hidden-model-activity.d.ts.map +1 -0
- package/dist/v2/{history-owner-42e16w0n.js → history-owner-ad0crnrn.js} +2 -2
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/generate.d.ts +36 -1
- package/dist/v2/hooks/generate.d.ts.map +1 -1
- package/dist/v2/hooks/lkg-system.d.ts +35 -4
- package/dist/v2/hooks/lkg-system.d.ts.map +1 -1
- package/dist/v2/hooks/payload.d.ts +16 -1
- package/dist/v2/hooks/payload.d.ts.map +1 -1
- package/dist/v2/{logger-7qt02bnb.js → logger-p34mjtja.js} +1 -1
- package/dist/v2/{message-fts-rowid-map-wfx67gfd.js → message-fts-rowid-map-dg12wymk.js} +6 -5
- package/dist/v2/{message-index-bounded-spd8r7pj.js → message-index-bounded-f4e01xk0.js} +16 -15
- package/dist/v2/{message-index-8vz2pq76.js → message-index-ydzrp6y6.js} +16 -15
- package/dist/v2/{message-time-backfill-04t0km1z.js → message-time-backfill-ddh8n9gy.js} +3 -3
- package/dist/v2/migration-worker.js +13 -12
- package/dist/v2/{model-resolution-nx97z3x7.js → model-resolution-280gmqvd.js} +1 -1
- package/dist/v2/{project-embedding-registry-gnkj56xp.js → project-embedding-registry-deza9ksw.js} +13 -12
- package/dist/v2/raw-ordinal-warmup-worker.js +136 -101
- package/dist/v2/{read-session-chunk-cwkxrmns.js → read-session-chunk-8cxfagky.js} +11 -10
- package/dist/v2/{read-session-raw-yaegtjzh.js → read-session-raw-1nrrecvx.js} +4 -3
- package/dist/v2/recomp-orchestrator-47m4hv5g.js +61 -0
- package/dist/v2/{safe-notification-target-qg7n2s77.js → safe-notification-target-khnzg57c.js} +2 -2
- package/dist/v2/{search-archive-wve3tq1k.js → search-archive-e80cvc09.js} +12 -11
- package/dist/v2/{search-hwg7jfbj.js → search-fjz746zr.js} +25 -24
- package/dist/v2/{send-session-notification-3pxn658x.js → send-session-notification-nwvrv34d.js} +7 -6
- package/dist/v2/{server-8by8qfec.js → server-0epqaxhd.js} +75 -57
- package/dist/v2/{server-pwv4ezb0.js → server-168pb207.js} +1 -1
- package/dist/v2/{server-h0410h0v.js → server-1bw1wcbp.js} +1 -1
- package/dist/v2/{server-beht37jy.js → server-1zx2pa5d.js} +1 -1
- package/dist/v2/{server-a9xqj88f.js → server-230fnbws.js} +4 -4
- package/dist/v2/{server-tbe1femw.js → server-29qp8nz4.js} +1 -1
- package/dist/v2/{server-tgnbmwah.js → server-3mz2qh5a.js} +1 -1
- package/dist/v2/{server-hy3d3vsx.js → server-4nw4fqhr.js} +2 -2
- package/dist/v2/{server-45q69hkq.js → server-4sxjs6hn.js} +5 -5
- package/dist/v2/{server-34kwfsr4.js → server-53eh1r8r.js} +2 -2
- package/dist/v2/{server-xj136kt8.js → server-55rgxfrw.js} +9 -3
- package/dist/v2/{server-nj659894.js → server-5arr9ecn.js} +2 -2
- package/dist/{index-8cd2j99z.js → v2/server-5kym00ag.js} +32 -13
- package/dist/v2/{server-2ar62dyx.js → server-63fqdghs.js} +106 -20
- package/dist/v2/{server-f2xf5gcb.js → server-6495nmn9.js} +12 -15
- package/dist/v2/{server-qd11g795.js → server-92g7d776.js} +2 -1
- package/dist/v2/{server-xq7dfjke.js → server-9x0kmta4.js} +5 -5
- package/dist/v2/{server-27gq4mfz.js → server-a3dwxfgd.js} +4 -4
- package/dist/v2/{server-6tmj0s7j.js → server-af2pght7.js} +3 -3
- package/dist/v2/{server-1wy7b9de.js → server-br1x0tev.js} +3 -3
- package/dist/v2/{server-n1prf1g6.js → server-brj8j2gk.js} +2 -2
- package/dist/v2/{server-6vdzn1td.js → server-c7dxxsj7.js} +308 -61
- package/dist/v2/server-cpjk5jd2.js +82 -0
- package/dist/v2/{server-g3qma5c0.js → server-dj7tz4ph.js} +2 -2
- package/dist/v2/{server-9hx7g5jp.js → server-ej96a39v.js} +17 -9
- package/dist/v2/{server-6pmqg9m4.js → server-gyy4k6mf.js} +1 -1
- package/dist/v2/{server-bmymkx73.js → server-hqzyq8n4.js} +11 -11
- package/dist/v2/{server-h1v0pyxb.js → server-j4jnp9b5.js} +468 -18
- package/dist/v2/{server-da07v4xp.js → server-k3t06fxr.js} +1 -1
- package/dist/v2/{server-gsxjv2q2.js → server-m91f9m5s.js} +69 -17
- package/dist/v2/{server-rmygf5pn.js → server-ne8arh8t.js} +2 -2
- package/dist/v2/{server-hm38q7r0.js → server-vn2nwcv6.js} +5 -5
- package/dist/v2/{server-46neh5fa.js → server-wyawsa88.js} +314 -127
- package/dist/v2/{server-zzkj2fch.js → server-xsryvyf6.js} +4 -4
- package/dist/v2/{server-n37sebck.js → server-y4a3nhtk.js} +1 -1
- package/dist/v2/{server-d04vrx0j.js → server-ygtykank.js} +2 -2
- package/dist/v2/server.js +6 -6
- package/dist/v2/{sqlite-zf72c52d.js → sqlite-1rpvw2rj.js} +1 -1
- package/dist/v2/{storage-memory-y3qmy00r.js → storage-memory-nm7v82mj.js} +2 -2
- package/dist/v2/{storage-tags-3wdb8zph.js → storage-tags-ss08kj5r.js} +5 -5
- package/dist/v2/store-reader.d.ts +8 -0
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/{task-config-nvz8mapa.js → task-config-7md27rx8.js} +2 -2
- package/dist/v2/{wrapup-orchestrator-embdz8gj.js → wrapup-orchestrator-639whfhq.js} +32 -31
- package/dist/wrapup-orchestrator-mnvt2g8m.js +49 -0
- package/package.json +1 -1
- package/src/config/index.test.ts +28 -6
- package/src/shared/logger.test.ts +42 -1
- package/src/shared/logger.ts +11 -13
- package/src/shared/model-resolution.test.ts +67 -12
- package/src/shared/model-resolution.ts +43 -16
- package/src/shared/model-suggestion-retry.ts +1 -1
- package/src/shared/prompt-async-transport.ts +47 -3
- package/src/shared/rpc-types.ts +7 -0
- package/src/shared/sqlite-busy-budget-review.test.ts +6 -1
- package/src/shared/sqlite.ts +4 -2
- package/src/shared/subagent-runner.ts +2 -0
- package/src/shared/worker-shutdown-fence.test.ts +87 -0
- package/src/shared/worker-shutdown.fixture.ts +25 -0
- package/src/shared/worker-shutdown.test.ts +127 -0
- package/src/shared/worker-shutdown.ts +160 -0
- package/dist/embedding-backfill-fmz50tsy.js +0 -24
- package/dist/recomp-orchestrator-999jj4bc.js +0 -61
- package/dist/v2/embedding-backfill-7c7yr69y.js +0 -23
- package/dist/v2/recomp-orchestrator-f6m9jr7p.js +0 -60
- package/dist/wrapup-orchestrator-whhbjmaz.js +0 -48
|
@@ -6,21 +6,23 @@ import {
|
|
|
6
6
|
StaleRouteHandleError,
|
|
7
7
|
SubcClient,
|
|
8
8
|
isConsumerReconnectTransient
|
|
9
|
-
} from "./server-
|
|
9
|
+
} from "./server-af2pght7.js";
|
|
10
10
|
import {
|
|
11
11
|
getHarness2
|
|
12
12
|
} from "./server-pavzsdc6.js";
|
|
13
13
|
import {
|
|
14
14
|
getDataDir,
|
|
15
15
|
log2
|
|
16
|
-
} from "./server-
|
|
16
|
+
} from "./server-6495nmn9.js";
|
|
17
17
|
import {
|
|
18
18
|
inRootAsyncContext2
|
|
19
|
-
} from "./server-
|
|
19
|
+
} from "./server-1zx2pa5d.js";
|
|
20
20
|
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
buildCanonicalChunkTextFromFts2,
|
|
22
|
+
loadCompartmentChunkEmbeddingsForSearch2,
|
|
23
|
+
peekCompartmentChunkSearchPool2,
|
|
24
|
+
warmCompartmentChunkSearchPool2
|
|
25
|
+
} from "./server-wyawsa88.js";
|
|
24
26
|
import {
|
|
25
27
|
recordEmbeddingMeasurement,
|
|
26
28
|
saveCommitEmbedding,
|
|
@@ -37,7 +39,7 @@ import {
|
|
|
37
39
|
enqueueShadowEmbeddingItems2,
|
|
38
40
|
getProjectEmbeddingSnapshot2,
|
|
39
41
|
embedItemsForProject2
|
|
40
|
-
} from "./server-
|
|
42
|
+
} from "./server-0epqaxhd.js";
|
|
41
43
|
import {
|
|
42
44
|
getProjectEmbeddings2
|
|
43
45
|
} from "./server-4dhv7mqz.js";
|
|
@@ -46,13 +48,13 @@ import {
|
|
|
46
48
|
isEmbeddingEnabled,
|
|
47
49
|
embedText,
|
|
48
50
|
ensureMemoryEmbeddings2
|
|
49
|
-
} from "./server-
|
|
51
|
+
} from "./server-xsryvyf6.js";
|
|
50
52
|
import {
|
|
51
53
|
ModuleMemoryAuthorityError2,
|
|
52
54
|
getMemoriesByProject2,
|
|
53
55
|
getMemoriesByProjects2,
|
|
54
56
|
updateMemoryRetrievalCount2
|
|
55
|
-
} from "./server-
|
|
57
|
+
} from "./server-y4a3nhtk.js";
|
|
56
58
|
import {
|
|
57
59
|
getNotes,
|
|
58
60
|
getActivePrimers,
|
|
@@ -61,27 +63,27 @@ import {
|
|
|
61
63
|
sanitizeFtsQuery,
|
|
62
64
|
searchMemoriesFTS,
|
|
63
65
|
searchMemoriesFTSUnion
|
|
64
|
-
} from "./server-
|
|
66
|
+
} from "./server-vn2nwcv6.js";
|
|
65
67
|
import {
|
|
66
68
|
cleanSearchText,
|
|
67
69
|
keywordRelevance,
|
|
68
70
|
matchedSearchSnippet,
|
|
69
71
|
getIndexedMessageCorpusSize2
|
|
70
|
-
} from "./server-
|
|
72
|
+
} from "./server-63fqdghs.js";
|
|
71
73
|
import {
|
|
72
74
|
MESSAGE_FTS_SESSION_FILTER_SQL,
|
|
73
75
|
withMessageFtsSessionFilter
|
|
74
76
|
} from "./server-kaqs6h31.js";
|
|
75
77
|
import {
|
|
76
78
|
isRecord
|
|
77
|
-
} from "./server-
|
|
79
|
+
} from "./server-a3dwxfgd.js";
|
|
78
80
|
import {
|
|
79
81
|
resolveWorkspaceShareCategories,
|
|
80
82
|
resolveWorkspaceIdentitySet,
|
|
81
83
|
expandWorkspaceIdentitySetWithAliases,
|
|
82
84
|
resolveStoredPathWorkspaceIdentity,
|
|
83
85
|
sourceNameForMemory
|
|
84
|
-
} from "./server-
|
|
86
|
+
} from "./server-9x0kmta4.js";
|
|
85
87
|
import {
|
|
86
88
|
isKnownAutocommit
|
|
87
89
|
} from "./server-8ajstryz.js";
|
|
@@ -1675,7 +1677,7 @@ Reason: ${row.reason}` : ""}`;
|
|
|
1675
1677
|
case "compartment": {
|
|
1676
1678
|
title = hit.title;
|
|
1677
1679
|
location = `compartment ${hit.compartmentId} ${hit.sessionId} @${hit.startOrdinal}-${hit.endOrdinal}`;
|
|
1678
|
-
body =
|
|
1680
|
+
body = buildCanonicalChunkTextFromFts2(db, hit.sessionId, hit.startOrdinal, hit.endOrdinal) ?? "";
|
|
1679
1681
|
break;
|
|
1680
1682
|
}
|
|
1681
1683
|
}
|
|
@@ -2614,10 +2616,42 @@ function searchNotes(args) {
|
|
|
2614
2616
|
}));
|
|
2615
2617
|
}
|
|
2616
2618
|
async function searchCompartmentChunks(args) {
|
|
2617
|
-
if (
|
|
2619
|
+
if (args.limit <= 0 || !args.modelId || args.modelId === "off") {
|
|
2620
|
+
if (args.timings)
|
|
2621
|
+
args.timings.chunkPool = "off";
|
|
2618
2622
|
return [];
|
|
2623
|
+
}
|
|
2624
|
+
if (!args.queryEmbedding) {
|
|
2625
|
+
if (args.timings)
|
|
2626
|
+
args.timings.chunkPool = "no-vector";
|
|
2627
|
+
if (args.warmOnly)
|
|
2628
|
+
warmCompartmentChunkSearchPool2(args.db, args.sessionId, args.projectPath, args.modelId);
|
|
2629
|
+
return [];
|
|
2630
|
+
}
|
|
2619
2631
|
const cutoff = args.maxOrdinal != null && args.maxOrdinal >= 0 ? args.maxOrdinal : null;
|
|
2620
|
-
|
|
2632
|
+
let rows;
|
|
2633
|
+
if (args.warmOnly) {
|
|
2634
|
+
const warm = peekCompartmentChunkSearchPool2(args.db, args.sessionId, args.projectPath, args.modelId, args.dateRange);
|
|
2635
|
+
if (warm === null) {
|
|
2636
|
+
if (args.timings)
|
|
2637
|
+
args.timings.chunkPool = "cold";
|
|
2638
|
+
warmCompartmentChunkSearchPool2(args.db, args.sessionId, args.projectPath, args.modelId);
|
|
2639
|
+
return [];
|
|
2640
|
+
}
|
|
2641
|
+
if (args.timings)
|
|
2642
|
+
args.timings.chunkPool = "warm";
|
|
2643
|
+
rows = warm;
|
|
2644
|
+
} else {
|
|
2645
|
+
try {
|
|
2646
|
+
rows = await loadCompartmentChunkEmbeddingsForSearch2(args.db, args.sessionId, args.projectPath, args.modelId, args.dateRange, args.signal);
|
|
2647
|
+
} catch (error) {
|
|
2648
|
+
if (args.signal?.aborted)
|
|
2649
|
+
return [];
|
|
2650
|
+
throw error;
|
|
2651
|
+
}
|
|
2652
|
+
if (args.timings)
|
|
2653
|
+
args.timings.chunkPool = "loaded";
|
|
2654
|
+
}
|
|
2621
2655
|
if (rows.length === 0)
|
|
2622
2656
|
return [];
|
|
2623
2657
|
const byCompartment = new Map;
|
|
@@ -2942,6 +2976,8 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
2942
2976
|
if (options.signal?.aborted)
|
|
2943
2977
|
return [];
|
|
2944
2978
|
const messageProbes = options.explicitSearch ? extractLiteralProbes(trimmedQuery) : [];
|
|
2979
|
+
const timings = options.stepTimings;
|
|
2980
|
+
let stepStartedAt = performance.now();
|
|
2945
2981
|
let messageResults = [];
|
|
2946
2982
|
if (runMessages) {
|
|
2947
2983
|
const messageRequest = {
|
|
@@ -2968,8 +3004,13 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
2968
3004
|
messageResults = outcome.results.filter((result) => result.messageId !== options.excludeMessageId);
|
|
2969
3005
|
if (lanes)
|
|
2970
3006
|
lanes.message_fts = (outcome.laneResults ?? outcome.results).slice(0, 25);
|
|
3007
|
+
if (timings)
|
|
3008
|
+
timings.messageMs = performance.now() - stepStartedAt;
|
|
2971
3009
|
}
|
|
3010
|
+
stepStartedAt = performance.now();
|
|
2972
3011
|
const capturedQuery = await queryEmbeddingPromise;
|
|
3012
|
+
if (timings && needsEmbedding)
|
|
3013
|
+
timings.vectorWaitMs = performance.now() - stepStartedAt;
|
|
2973
3014
|
if (options.signal?.aborted)
|
|
2974
3015
|
return [];
|
|
2975
3016
|
const embeddingSnapshot = getProjectEmbeddingSnapshot2(projectPath);
|
|
@@ -2979,6 +3020,9 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
2979
3020
|
const workspace = resolveSearchWorkspaceContext(db, projectPath);
|
|
2980
3021
|
const embeddingModelId = queryContract?.modelId ?? options.embeddingModelIdOverride ?? embeddingSnapshot?.modelId;
|
|
2981
3022
|
const chunkModelId = queryContract?.chunkModelId ?? options.chunkModelIdOverride ?? embeddingSnapshot?.chunkModelId;
|
|
3023
|
+
stepStartedAt = performance.now();
|
|
3024
|
+
if (timings)
|
|
3025
|
+
timings.chunkPool = "off";
|
|
2982
3026
|
const compartmentResults = runCompartmentChunks ? await searchCompartmentChunks({
|
|
2983
3027
|
db,
|
|
2984
3028
|
sessionId,
|
|
@@ -2987,8 +3031,14 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
2987
3031
|
limit: lanes ? Math.max(tierLimit, 25) : tierLimit,
|
|
2988
3032
|
maxOrdinal: options.maxMessageOrdinal,
|
|
2989
3033
|
modelId: chunkModelId && chunkModelId !== "off" ? chunkModelId : null,
|
|
2990
|
-
dateRange
|
|
3034
|
+
dateRange,
|
|
3035
|
+
warmOnly: options.chunkPoolWarmOnly,
|
|
3036
|
+
signal: options.signal,
|
|
3037
|
+
timings
|
|
2991
3038
|
}) : [];
|
|
3039
|
+
if (timings && runCompartmentChunks)
|
|
3040
|
+
timings.chunkMs = performance.now() - stepStartedAt;
|
|
3041
|
+
stepStartedAt = performance.now();
|
|
2992
3042
|
if (lanes)
|
|
2993
3043
|
lanes.chunk_vector = compartmentResults.slice(0, 25);
|
|
2994
3044
|
const messageLikeResults = mergeMessageAndCompartmentResults({
|
|
@@ -3044,6 +3094,8 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3044
3094
|
dateRange
|
|
3045
3095
|
})) : Promise.resolve([])
|
|
3046
3096
|
]);
|
|
3097
|
+
if (timings)
|
|
3098
|
+
timings.otherLanesMs = performance.now() - stepStartedAt;
|
|
3047
3099
|
if (options.diagnostics) {
|
|
3048
3100
|
options.diagnostics.suppressedVisibleMemoryIds = memoryOutcome.suppressedVisibleIds;
|
|
3049
3101
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getMagicContextStorageDir,
|
|
3
3
|
log2
|
|
4
|
-
} from "./server-
|
|
4
|
+
} from "./server-6495nmn9.js";
|
|
5
5
|
import {
|
|
6
6
|
inRootAsyncContext2
|
|
7
|
-
} from "./server-
|
|
7
|
+
} from "./server-1zx2pa5d.js";
|
|
8
8
|
import {
|
|
9
9
|
projectDirectoryKey
|
|
10
10
|
} from "./server-knvkbfvh.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./server-pavzsdc6.js";
|
|
4
4
|
import {
|
|
5
5
|
isTransientSqliteError2
|
|
6
|
-
} from "./server-
|
|
6
|
+
} from "./server-1zx2pa5d.js";
|
|
7
7
|
import {
|
|
8
8
|
PROMOTABLE_CATEGORIES,
|
|
9
9
|
CATEGORY_DEFAULT_TTL
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
sanitizeDiagnosticText,
|
|
13
13
|
sessionLog2
|
|
14
|
-
} from "./server-
|
|
14
|
+
} from "./server-6495nmn9.js";
|
|
15
15
|
import {
|
|
16
16
|
managedAuthorityNoteRow
|
|
17
|
-
} from "./server-
|
|
17
|
+
} from "./server-9x0kmta4.js";
|
|
18
18
|
import {
|
|
19
19
|
embedTextForProject2
|
|
20
|
-
} from "./server-
|
|
20
|
+
} from "./server-0epqaxhd.js";
|
|
21
21
|
import {
|
|
22
22
|
saveEmbeddingIfHashMatches
|
|
23
23
|
} from "./server-4dhv7mqz.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
buildWorkspaceMemorySqlFilter2,
|
|
31
31
|
getMemoryById2,
|
|
32
32
|
updateMemorySeenCount2
|
|
33
|
-
} from "./server-
|
|
33
|
+
} from "./server-y4a3nhtk.js";
|
|
34
34
|
import {
|
|
35
35
|
computeNormalizedHash
|
|
36
36
|
} from "./server-2bvekkfy.js";
|