@cortexkit/opencode-magic-context 0.49.34 → 0.49.36
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/README.md +1 -1
- package/dist/auto-search-worker.js +163 -155
- package/dist/chunk-embedding-write-worker.js +70 -66
- package/dist/{compaction-marker-candidates-31h86ph0.js → compaction-marker-candidates-5p1qkve9.js} +5 -2
- package/dist/compaction-marker-candidates-worker.js +24 -23
- package/dist/{compartment-chunk-embedding-5q5gj67r.js → compartment-chunk-embedding-ypktm0tk.js} +10 -8
- package/dist/{conflict-warning-hook-xgskea1v.js → conflict-warning-hook-b75jn458.js} +11 -9
- package/dist/{context-p3xrarzt.js → context-969z683s.js} +1839 -746
- package/dist/{derive-budgets-pqybnx09.js → derive-budgets-htj16n4x.js} +3 -2
- package/dist/embedding-backfill-rma0v2ct.js +28 -0
- package/dist/embedding-worker-process.js +2 -1
- package/dist/embedding-worker.js +6 -5
- 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-candidates.d.ts.map +1 -1
- package/dist/features/magic-context/compaction-marker.d.ts +5 -3
- 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/dreamer/task-gates.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/verify-gate.d.ts +2 -0
- package/dist/features/magic-context/dreamer/verify-gate.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/verify-state.d.ts +9 -0
- package/dist/features/magic-context/dreamer/verify-state.d.ts.map +1 -0
- package/dist/features/magic-context/dreamer/verify.d.ts +2 -1
- package/dist/features/magic-context/dreamer/verify.d.ts.map +1 -1
- package/dist/features/magic-context/migration-worker-client.d.ts +3 -0
- package/dist/features/magic-context/migration-worker-client.d.ts.map +1 -1
- package/dist/features/magic-context/migration-worker.d.ts +15 -0
- package/dist/features/magic-context/migration-worker.d.ts.map +1 -1
- package/dist/features/magic-context/overflow-detection.d.ts +2 -2
- package/dist/features/magic-context/overflow-detection.d.ts.map +1 -1
- package/dist/features/magic-context/search-rerank.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 +1 -0
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tags.d.ts +4 -0
- package/dist/features/magic-context/storage-tags.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/features/magic-context/work-metrics-carry-storage.d.ts +10 -0
- package/dist/features/magic-context/work-metrics-carry-storage.d.ts.map +1 -0
- 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 +10 -2
- package/dist/hooks/magic-context/auto-search-worker-client.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-marker-publication.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-historian.d.ts.map +1 -1
- 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/issue-423-fixture.d.ts +1 -1
- package/dist/hooks/magic-context/issue-423-fixture.d.ts.map +1 -1
- package/dist/hooks/magic-context/issue-424-fixture.d.ts +1 -1
- package/dist/hooks/magic-context/issue-424-fixture.d.ts.map +1 -1
- package/dist/hooks/magic-context/project-structural-sentinels.d.ts +25 -0
- package/dist/hooks/magic-context/project-structural-sentinels.d.ts.map +1 -0
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts +8 -1
- package/dist/hooks/magic-context/protected-tail-boundary.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/read-session-true-raw-tokens.d.ts +2 -0
- package/dist/hooks/magic-context/read-session-true-raw-tokens.d.ts.map +1 -1
- package/dist/hooks/magic-context/release-recovery-prefix.d.ts +9 -0
- package/dist/hooks/magic-context/release-recovery-prefix.d.ts.map +1 -0
- package/dist/hooks/magic-context/strip-structural-noise.d.ts +6 -3
- package/dist/hooks/magic-context/strip-structural-noise.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-context-state.d.ts +3 -0
- package/dist/hooks/magic-context/transform-context-state.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +3 -0
- 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-cpjk5jd2.js → index-1d042x6w.js} +16 -14
- package/dist/{index-2743x98y.js → index-21fgrfrf.js} +35 -142
- 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-9gpw8hrm.js → index-2rs7912w.js} +4 -4
- package/dist/{index-m1x9ghk5.js → index-4ks89h5a.js} +37 -7
- package/dist/{index-b88dwwrh.js → index-4xyjr62e.js} +1 -1
- package/dist/index-4y35msh5.js +531 -0
- package/dist/index-66a50f3e.js +777 -0
- package/dist/index-72czy45z.js +4557 -0
- package/dist/index-7v05d9b7.js +58 -0
- package/dist/{index-qgh1qwjj.js → index-850vthn3.js} +9 -3
- package/dist/{index-np3rgfw4.js → index-8jjjmhab.js} +15 -4
- package/dist/index-96ztjvkn.js +204 -0
- package/dist/{index-fm36bjv4.js → index-9fgmkfaf.js} +22 -277
- package/dist/{index-atekmqef.js → index-9tdvbdv1.js} +508 -5547
- package/dist/{index-xrnsygfq.js → index-9wnbnx8f.js} +1 -1
- package/dist/{index-waktfbjy.js → index-ae1ar4v1.js} +4 -4
- package/dist/{index-v15ne3a3.js → index-b1ydbp95.js} +2 -2
- package/dist/{index-nxrsns5x.js → index-c5dzns43.js} +75 -75
- package/dist/{index-v7287tzq.js → index-dcjkw41m.js} +19 -8
- package/dist/{index-hbx7m8he.js → index-dfdg2cgg.js} +338 -86
- package/dist/{index-spwjbkc7.js → index-dnqqqc5f.js} +1 -1
- package/dist/{index-04z754rd.js → index-dz48h1wx.js} +33 -5
- 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-97spytxq.js → index-gnmhbyyc.js} +583 -474
- package/dist/{index-4pnsgvfk.js → index-hacf2tyx.js} +1 -1
- package/dist/index-j105mf16.js +270 -0
- package/dist/{index-gkee6p4g.js → index-jggt5gf2.js} +3 -3
- package/dist/{index-s1n8dd2n.js → index-jkanybgq.js} +2 -2
- package/dist/{index-h7tgn49j.js → index-jrfre9ah.js} +5 -222
- package/dist/{index-kfyb3k6n.js → index-jz5bk7xd.js} +2 -2
- package/dist/{index-7kkphb6c.js → index-nj360hcs.js} +4 -4
- package/dist/{index-07vskjn8.js → index-pp8vdn01.js} +15 -13
- package/dist/index-prw8apnc.js +194 -0
- package/dist/{index-rverk2vz.js → index-r2epb000.js} +34 -4
- package/dist/{index-7g9dr8gy.js → index-tn9drm1a.js} +125 -143
- package/dist/{index-kq5w68dp.js → index-txs8tce6.js} +1 -1
- package/dist/{index-rfxzazzy.js → index-ty4vhe4n.js} +5 -5
- package/dist/{index-y1qwzvxn.js → index-vd2ywmfe.js} +2 -2
- package/dist/{index-0677w9sd.js → index-wcwhhtdh.js} +58 -23
- package/dist/index-wh9fxds5.js +265 -0
- package/dist/{index-51rdvtkz.js → index-xd2p95m7.js} +3 -3
- package/dist/{index-as2amvn3.js → index-xnm0wq1r.js} +6 -531
- package/dist/{index-ftr84kkv.js → index-ys7j6679.js} +7 -5
- package/dist/index-z4p0ry94.js +222 -0
- package/dist/index-z9zygwse.js +89 -0
- package/dist/index.js +86 -74
- package/dist/{logger-94kew5wm.js → logger-qwnbcfj9.js} +2 -1
- package/dist/{message-fts-rowid-map-va36knh4.js → message-fts-rowid-map-t6qsyg9s.js} +7 -5
- package/dist/{message-index-bounded-qh91fdr3.js → message-index-bounded-wfk6aqxk.js} +15 -13
- package/dist/{message-time-backfill-4qva0b4f.js → message-time-backfill-39bm498k.js} +3 -2
- package/dist/migration-worker.js +55 -48
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/{project-embedding-registry-6yex0r9f.js → project-embedding-registry-3yyegjma.js} +16 -13
- package/dist/raw-ordinal-warmup-worker.js +114 -113
- package/dist/{read-session-chunk-kaghtr75.js → read-session-chunk-26yrrhyz.js} +18 -12
- package/dist/{read-session-raw-b2sd67v4.js → read-session-raw-j7c9w57v.js} +5 -3
- package/dist/recomp-orchestrator-wk509qkp.js +69 -0
- package/dist/render-h1qarr8a.js +44 -0
- package/dist/{safe-notification-target-mkr9yzvr.js → safe-notification-target-wztd7bgk.js} +3 -2
- package/dist/search-5h9fydyq.js +54 -0
- package/dist/search-archive-q79hyqxs.js +29 -0
- package/dist/{send-session-notification-vz86nt79.js → send-session-notification-14p3yje4.js} +9 -7
- package/dist/shared/model-suggestion-retry.d.ts +7 -0
- package/dist/shared/model-suggestion-retry.d.ts.map +1 -1
- package/dist/shared/prompt-async-transport.d.ts.map +1 -1
- package/dist/shared/reusable-worker-entry.d.ts +4 -0
- package/dist/shared/reusable-worker-entry.d.ts.map +1 -0
- package/dist/shared/reusable-worker.d.ts +6 -0
- package/dist/shared/reusable-worker.d.ts.map +1 -0
- package/dist/shared/reusable-worker.fixture.d.ts +2 -0
- package/dist/shared/reusable-worker.fixture.d.ts.map +1 -0
- package/dist/shared/worker-shutdown.d.ts +1 -1
- package/dist/shared/worker-shutdown.d.ts.map +1 -1
- package/dist/{storage-tags-6hvkk01c.js → storage-tags-vj0yj7ed.js} +5 -4
- package/dist/store-reader-yh19h38c.js +14 -0
- package/dist/store-s3eykdjt.js +21 -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-4gj0mtcg.js} +39 -32
- package/dist/v2/auto-search-worker.js +163 -155
- package/dist/v2/chunk-embedding-write-worker.js +71 -67
- package/dist/v2/compaction-marker-candidates-worker.js +24 -23
- package/dist/v2/{compaction-marker-candidates-m4vmye3w.js → compaction-marker-candidates-yeb2ky46.js} +6 -3
- package/dist/v2/{compartment-chunk-embedding-rc31e6md.js → compartment-chunk-embedding-qfk791bd.js} +11 -9
- package/dist/v2/{context-s60hcatx.js → context-bxr039be.js} +2678 -1246
- package/dist/v2/{derive-budgets-knf763tt.js → derive-budgets-sa0v7bz0.js} +4 -3
- package/dist/v2/embedding-backfill-00tw59rx.js +27 -0
- package/dist/v2/embedding-worker-process.js +2 -1
- package/dist/v2/embedding-worker.js +6 -5
- package/dist/v2/expand-attachments-h33jbgyz.js +21 -0
- package/dist/v2/fold/code-mode-catalog.d.ts +3 -0
- package/dist/v2/fold/code-mode-catalog.d.ts.map +1 -0
- package/dist/v2/fold/idle.d.ts +16 -0
- package/dist/v2/fold/idle.d.ts.map +1 -0
- package/dist/v2/fold/manual-baseline.d.ts +8 -0
- package/dist/v2/fold/manual-baseline.d.ts.map +1 -0
- package/dist/v2/fold/native-replay-v3.d.ts +75 -0
- package/dist/v2/fold/native-replay-v3.d.ts.map +1 -0
- package/dist/v2/fold/native-replay.d.ts +81 -8
- 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/fold/restore.d.ts.map +1 -1
- package/dist/v2/fold/summary.d.ts +4 -0
- package/dist/v2/fold/summary.d.ts.map +1 -0
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/{history-owner-ad0crnrn.js → history-owner-fpka43cn.js} +3 -2
- package/dist/v2/hooks/channel2.d.ts +6 -0
- package/dist/v2/hooks/channel2.d.ts.map +1 -1
- 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/restore-rows.d.ts +12 -2
- package/dist/v2/hooks/restore-rows.d.ts.map +1 -1
- package/dist/v2/hooks/store.d.ts +7 -2
- package/dist/v2/hooks/store.d.ts.map +1 -1
- package/dist/v2/hooks/synthetic-admission.d.ts +7 -0
- package/dist/v2/hooks/synthetic-admission.d.ts.map +1 -0
- package/dist/v2/hooks/usage-persist.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-z86avy0n.js} +8 -6
- package/dist/v2/{message-index-bounded-4htdr1j6.js → message-index-bounded-w14496s9.js} +16 -14
- package/dist/v2/{message-time-backfill-zvthw6xb.js → message-time-backfill-0c4h7sg6.js} +3 -2
- package/dist/v2/migration-worker.js +56 -49
- 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-jqq2qeqb.js} +17 -14
- package/dist/v2/raw-ordinal-warmup-worker.js +114 -113
- package/dist/v2/{read-session-chunk-1fa9qzwb.js → read-session-chunk-tqnh1ret.js} +18 -12
- package/dist/v2/{read-session-raw-5x088amc.js → read-session-raw-qpp6x9kg.js} +6 -4
- package/dist/v2/recomp-orchestrator-9cjk6aej.js +68 -0
- package/dist/v2/render-5dz1knf2.js +43 -0
- package/dist/v2/{safe-notification-target-khnzg57c.js → safe-notification-target-gphhast7.js} +3 -2
- package/dist/v2/search-8yfet25y.js +52 -0
- package/dist/v2/search-archive-z6z9jqwf.js +28 -0
- package/dist/v2/{send-session-notification-x5nzy34v.js → send-session-notification-kxp47tsw.js} +9 -7
- package/dist/v2/{server-cpjk5jd2.js → server-1d042x6w.js} +16 -14
- 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-z2wft9zv.js → server-5by3vdzs.js} +562 -5560
- package/dist/v2/{server-qjvk4a9t.js → server-69m30b21.js} +1 -1
- package/dist/v2/server-6emy0v9a.js +531 -0
- package/dist/v2/{server-vr4szghm.js → server-6vzh6wej.js} +3 -3
- package/dist/v2/{server-ajxhrgjv.js → server-7094pk3w.js} +80 -19
- package/dist/v2/{server-ab8017gw.js → server-7acq7815.js} +34 -141
- package/dist/v2/server-7v05d9b7.js +58 -0
- package/dist/v2/{server-24g8r2d0.js → server-7zacmty5.js} +75 -75
- package/dist/v2/{server-3mz2qh5a.js → server-969cdpmg.js} +1 -1
- package/dist/v2/server-96ztjvkn.js +204 -0
- package/dist/v2/{server-grakwy1v.js → server-a9w5f0yw.js} +37 -7
- package/dist/v2/{server-835q39kd.js → server-avdveykk.js} +3 -3
- package/dist/v2/{server-qc915kw2.js → server-bez34e60.js} +4 -4
- package/dist/v2/{server-h1byrhwx.js → server-cp1a03vc.js} +19 -8
- package/dist/v2/{server-bsgd4dk1.js → server-dcws5831.js} +2 -2
- package/dist/v2/{server-m1pfg2d4.js → server-dfq5vb8j.js} +4 -4
- package/dist/v2/server-e51xmr4d.js +194 -0
- package/dist/v2/server-ef1mskas.js +777 -0
- package/dist/v2/{server-1bw1wcbp.js → server-f0j864ma.js} +1 -1
- package/dist/v2/{server-jw5qe9y8.js → server-g3gqq4ac.js} +18 -217
- package/dist/v2/{server-2aasmpsp.js → server-gkse1wyz.js} +5 -5
- package/dist/v2/{server-6495nmn9.js → server-jb6tjyeb.js} +5 -222
- package/dist/v2/{server-qvy4qavp.js → server-jd7vzwn4.js} +125 -143
- package/dist/v2/{server-a7x00tw8.js → server-mfn1yf9d.js} +1 -1
- package/dist/v2/{server-awr8qa4c.js → server-nmyganc8.js} +2 -2
- package/dist/v2/{server-tkdabx8q.js → server-nq3cb7be.js} +5 -530
- package/dist/v2/server-qjyp27vf.js +270 -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-806rzhs6.js → server-r4430x9m.js} +10 -4
- 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-t8y64xj7.js +4513 -0
- package/dist/v2/{server-6vd2n183.js → server-tnzbk64q.js} +35 -5
- package/dist/v2/{server-v77xa5wj.js → server-tpt7bwq8.js} +1 -1
- package/dist/v2/{server-51779zs2.js → server-v0p37hm2.js} +4 -1
- package/dist/v2/{server-nxas8v1d.js → server-xfjjbrkt.js} +15 -4
- 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 +7 -6
- package/dist/v2/{storage-tags-18nbaanf.js → storage-tags-cw07ky67.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-z3qe67cg.js +21 -0
- package/dist/v2/v2-archive-reader-z7wr42ry.js +11 -0
- package/dist/v2/{wrapup-orchestrator-wxf7n5k6.js → wrapup-orchestrator-j1v62bkj.js} +50 -42
- package/dist/v2-archive-reader-028z6kck.js +11 -0
- package/dist/wrapup-orchestrator-xg9avt2p.js +56 -0
- package/package.json +1 -1
- package/src/shared/model-suggestion-retry.ts +1 -1
- package/src/shared/prompt-async-transport.test.ts +64 -3
- package/src/shared/prompt-async-transport.ts +61 -16
- package/src/shared/reusable-worker-entry.ts +58 -0
- package/src/shared/reusable-worker-reset.test.ts +108 -0
- package/src/shared/reusable-worker.fixture.ts +35 -0
- package/src/shared/reusable-worker.test.ts +253 -0
- package/src/shared/reusable-worker.ts +240 -0
- package/src/shared/sqlite-transaction-mode-guard.test.ts +2 -0
- package/src/shared/worker-shutdown.ts +21 -17
- package/dist/embedding-backfill-0jgtqxen.js +0 -25
- package/dist/recomp-orchestrator-0y983w7h.js +0 -62
- package/dist/search-archive-1kw2rp19.js +0 -26
- package/dist/search-p684j8ww.js +0 -50
- package/dist/v2/embedding-backfill-f43hd8y6.js +0 -24
- package/dist/v2/recomp-orchestrator-7q9nvxte.js +0 -61
- package/dist/v2/search-archive-xfp51s0g.js +0 -25
- package/dist/v2/search-wf8rqxhm.js +0 -48
- package/dist/wrapup-orchestrator-ys2nrkkb.js +0 -49
|
@@ -5,15 +5,17 @@ import {
|
|
|
5
5
|
startMessageFtsRowidMapBackfill2,
|
|
6
6
|
messageFtsOrdinalRangeIsMapped2,
|
|
7
7
|
deleteUnmappedMessageFtsRows2
|
|
8
|
-
} from "./index-
|
|
9
|
-
import"./index-
|
|
8
|
+
} from "./index-b1ydbp95.js";
|
|
9
|
+
import"./index-r2epb000.js";
|
|
10
|
+
import"./index-96ztjvkn.js";
|
|
10
11
|
import"./index-v0p37hm2.js";
|
|
11
|
-
import"./index-
|
|
12
|
+
import"./index-fxbk7gk3.js";
|
|
12
13
|
import"./index-gzy5w8ya.js";
|
|
13
|
-
import"./index-
|
|
14
|
+
import"./index-jrfre9ah.js";
|
|
14
15
|
import"./index-g2q4htwp.js";
|
|
15
16
|
import"./index-pavzsdc6.js";
|
|
16
|
-
import"./index-
|
|
17
|
+
import"./index-z4p0ry94.js";
|
|
18
|
+
import"./index-1d042x6w.js";
|
|
17
19
|
export {
|
|
18
20
|
deleteUnmappedMessageFtsRows2 as deleteUnmappedMessageFtsRows,
|
|
19
21
|
messageFtsOrdinalRangeIsMapped2 as messageFtsOrdinalRangeIsMapped,
|
|
@@ -4,20 +4,22 @@ import {
|
|
|
4
4
|
yieldIndexChunk2
|
|
5
5
|
} from "./index-gzy5w8ya.js";
|
|
6
6
|
import"./index-1zx87sdm.js";
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
import"./index-8jjjmhab.js";
|
|
8
|
+
import"./index-4xyjr62e.js";
|
|
9
9
|
import"./index-pavzsdc6.js";
|
|
10
10
|
import"./index-g2q4htwp.js";
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
11
|
+
import"./index-z4p0ry94.js";
|
|
12
|
+
import"./index-jrfre9ah.js";
|
|
13
|
+
import"./index-9wnbnx8f.js";
|
|
14
|
+
import"./index-c5dzns43.js";
|
|
14
15
|
import"./index-v0p37hm2.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
16
|
+
import"./index-96ztjvkn.js";
|
|
17
|
+
import"./index-1d042x6w.js";
|
|
18
|
+
import"./index-r2epb000.js";
|
|
17
19
|
import"./index-58e3y90n.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
20
|
+
import"./index-vd2ywmfe.js";
|
|
21
|
+
import"./index-tn9drm1a.js";
|
|
22
|
+
import"./index-jkanybgq.js";
|
|
21
23
|
import {
|
|
22
24
|
MESSAGE_INDEX_MAX_FTS_BYTES,
|
|
23
25
|
messageIndexSkipKey,
|
|
@@ -25,9 +27,9 @@ import {
|
|
|
25
27
|
markMessageIndexDirty,
|
|
26
28
|
getIndexableContent,
|
|
27
29
|
indexSingleMessage
|
|
28
|
-
} from "./index-
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
30
|
+
} from "./index-2rs7912w.js";
|
|
31
|
+
import"./index-b1ydbp95.js";
|
|
32
|
+
import"./index-fxbk7gk3.js";
|
|
31
33
|
|
|
32
34
|
// src/features/magic-context/message-index-bounded.ts
|
|
33
35
|
import { createHash } from "node:crypto";
|
|
@@ -4,10 +4,11 @@ import {
|
|
|
4
4
|
} from "./index-gzy5w8ya.js";
|
|
5
5
|
import"./index-pavzsdc6.js";
|
|
6
6
|
import"./index-g2q4htwp.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-z4p0ry94.js";
|
|
8
|
+
import"./index-jrfre9ah.js";
|
|
8
9
|
import {
|
|
9
10
|
logSlowWriteTransaction
|
|
10
|
-
} from "./index-
|
|
11
|
+
} from "./index-fxbk7gk3.js";
|
|
11
12
|
|
|
12
13
|
// src/features/magic-context/message-time-backfill.ts
|
|
13
14
|
var MESSAGE_TIME_BACKFILL_BATCH_SIZE = 500;
|
package/dist/migration-worker.js
CHANGED
|
@@ -1,71 +1,78 @@
|
|
|
1
1
|
import"./index-pavzsdc6.js";
|
|
2
2
|
import"./index-g2q4htwp.js";
|
|
3
|
+
import"./index-z4p0ry94.js";
|
|
3
4
|
import {
|
|
4
5
|
setLogLineForwarder2,
|
|
5
6
|
log2
|
|
6
|
-
} from "./index-
|
|
7
|
+
} from "./index-jrfre9ah.js";
|
|
7
8
|
import {
|
|
8
9
|
Database2
|
|
9
10
|
} from "./index-gzy5w8ya.js";
|
|
10
11
|
import"./index-fr0wbhdn.js";
|
|
11
12
|
import {
|
|
12
13
|
runMigrationsWithRetry
|
|
13
|
-
} from "./index-
|
|
14
|
-
import"./index-
|
|
14
|
+
} from "./index-nj360hcs.js";
|
|
15
|
+
import"./index-9wnbnx8f.js";
|
|
15
16
|
import"./index-58e3y90n.js";
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
17
|
+
import"./index-txs8tce6.js";
|
|
18
|
+
import"./index-2p37txes.js";
|
|
18
19
|
import"./index-fb3zxn06.js";
|
|
19
20
|
import {
|
|
20
21
|
setSqlitePragmaConfig,
|
|
21
22
|
initializeDatabase
|
|
22
|
-
} from "./index-
|
|
23
|
+
} from "./index-9fgmkfaf.js";
|
|
24
|
+
import"./index-wh9fxds5.js";
|
|
23
25
|
import"./index-v0p37hm2.js";
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
26
|
+
import"./index-96ztjvkn.js";
|
|
27
|
+
import"./index-1d042x6w.js";
|
|
28
|
+
import"./index-r2epb000.js";
|
|
29
|
+
import"./index-b1ydbp95.js";
|
|
30
|
+
import"./index-4xyjr62e.js";
|
|
31
|
+
import"./index-jkanybgq.js";
|
|
29
32
|
import {
|
|
30
33
|
closeQuietly
|
|
31
34
|
} from "./index-8ajstryz.js";
|
|
32
|
-
import"./index-
|
|
35
|
+
import"./index-fxbk7gk3.js";
|
|
36
|
+
import {
|
|
37
|
+
serveWorkerJobs
|
|
38
|
+
} from "./index-7v05d9b7.js";
|
|
33
39
|
|
|
34
40
|
// src/features/magic-context/migration-worker.ts
|
|
35
|
-
|
|
36
|
-
function post(message) {
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
async function main() {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
41
|
+
serveWorkerJobs(async (data, port) => {
|
|
42
|
+
function post(message) {
|
|
43
|
+
port.postMessage(message);
|
|
44
|
+
}
|
|
45
|
+
async function main() {
|
|
46
|
+
setLogLineForwarder2((line) => post({ type: "log", line }));
|
|
47
|
+
setSqlitePragmaConfig(data.sqlitePragmaConfig);
|
|
48
|
+
post({ type: "ready" });
|
|
49
|
+
let db;
|
|
50
|
+
try {
|
|
51
|
+
db = new Database2(data.dbPath);
|
|
52
|
+
initializeDatabase(db, data.busyTimeoutMs);
|
|
53
|
+
await runMigrationsWithRetry(db, {
|
|
54
|
+
sleep: async (delayMs) => {
|
|
55
|
+
post({ type: "lock-wait", waiting: true });
|
|
56
|
+
await new Promise((resolve) => setTimeout(resolve, delayMs));
|
|
57
|
+
post({ type: "lock-wait", waiting: false });
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
const finished = db;
|
|
61
|
+
db = undefined;
|
|
62
|
+
finished.close();
|
|
63
|
+
log2(`[migrations] migration worker connection closed: ${data.dbPath}`);
|
|
64
|
+
post({ type: "done" });
|
|
65
|
+
} catch (error) {
|
|
66
|
+
post({
|
|
67
|
+
type: "failed",
|
|
68
|
+
message: error instanceof Error ? error.message : String(error)
|
|
69
|
+
});
|
|
70
|
+
} finally {
|
|
71
|
+
if (db)
|
|
72
|
+
closeQuietly(db);
|
|
73
|
+
setLogLineForwarder2(null);
|
|
74
|
+
}
|
|
69
75
|
}
|
|
70
|
-
|
|
71
|
-
|
|
76
|
+
await main();
|
|
77
|
+
port.close();
|
|
78
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-handlers.d.ts","sourceRoot":"","sources":["../../src/plugin/rpc-handlers.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAoCzE,OAAO,EACH,KAAK,eAAe,IAAI,QAAQ,
|
|
1
|
+
{"version":3,"file":"rpc-handlers.d.ts","sourceRoot":"","sources":["../../src/plugin/rpc-handlers.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAoCzE,OAAO,EACH,KAAK,eAAe,IAAI,QAAQ,EAEnC,MAAM,mCAAmC,CAAC;AAmB3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAchG,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gDAAgD,CAAC;AAElG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2CAA2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B,CAAC;IACnC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,wBAAwB,CAAC,EAAE,oBAAoB,CAAC,0BAA0B,CAAC,CAAC;IAC5E,qFAAqF;IACrF,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,6FAA6F;IAC7F,oBAAoB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qBAAqB,CAAC,EAAE,MAAM,yBAAyB,GAAG,SAAS,CAAC;IACpE,WAAW,CAAC,EAAE,MAAM,QAAQ,GAAG,IAAI,CAAC;CACvC,GACF,IAAI,CAodN"}
|
package/dist/{project-embedding-registry-6yex0r9f.js → project-embedding-registry-3yyegjma.js}
RENAMED
|
@@ -35,25 +35,28 @@ import {
|
|
|
35
35
|
sweepAllRegisteredProjects2,
|
|
36
36
|
_setTestProviderFactoryForProject2,
|
|
37
37
|
_resetProjectEmbeddingRegistryForTests2
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-21fgrfrf.js";
|
|
39
39
|
import"./index-4dhv7mqz.js";
|
|
40
|
+
import"./index-2amn2s73.js";
|
|
40
41
|
import"./index-qt1qqasc.js";
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-
|
|
44
|
-
import"./index-
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
47
|
-
import"./index-
|
|
48
|
-
import"./index-
|
|
42
|
+
import"./index-xd2p95m7.js";
|
|
43
|
+
import"./index-c5dzns43.js";
|
|
44
|
+
import"./index-jz5bk7xd.js";
|
|
45
|
+
import"./index-dcjkw41m.js";
|
|
46
|
+
import"./index-g4t7850m.js";
|
|
47
|
+
import"./index-txs8tce6.js";
|
|
48
|
+
import"./index-b1ydbp95.js";
|
|
49
|
+
import"./index-r2epb000.js";
|
|
50
|
+
import"./index-96ztjvkn.js";
|
|
49
51
|
import"./index-v0p37hm2.js";
|
|
50
|
-
import"./index-
|
|
51
|
-
import"./index-
|
|
52
|
+
import"./index-fxbk7gk3.js";
|
|
53
|
+
import"./index-4xyjr62e.js";
|
|
52
54
|
import"./index-gzy5w8ya.js";
|
|
53
|
-
import"./index-
|
|
55
|
+
import"./index-jrfre9ah.js";
|
|
54
56
|
import"./index-g2q4htwp.js";
|
|
55
57
|
import"./index-pavzsdc6.js";
|
|
56
|
-
import"./index-
|
|
58
|
+
import"./index-z4p0ry94.js";
|
|
59
|
+
import"./index-1d042x6w.js";
|
|
57
60
|
export {
|
|
58
61
|
_resetProjectEmbeddingRegistryForTests2 as _resetProjectEmbeddingRegistryForTests,
|
|
59
62
|
_setTestProviderFactoryForProject2 as _setTestProviderFactoryForProject,
|
|
@@ -1,126 +1,127 @@
|
|
|
1
1
|
import {
|
|
2
2
|
exitOnWorkerClose
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-1d042x6w.js";
|
|
4
|
+
import {
|
|
5
|
+
serveWorkerJobs
|
|
6
|
+
} from "./index-7v05d9b7.js";
|
|
4
7
|
|
|
5
8
|
// src/hooks/magic-context/raw-ordinal-warmup-worker.ts
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
try {
|
|
16
|
-
connection.close();
|
|
17
|
-
} catch {}
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
main().catch((error) => {
|
|
21
|
-
setTimeout(() => {
|
|
22
|
-
throw error;
|
|
9
|
+
serveWorkerJobs(async (input, port) => {
|
|
10
|
+
port.postMessage({ kind: "accepted" });
|
|
11
|
+
const openConnections = new Set;
|
|
12
|
+
const { closePort } = exitOnWorkerClose(port, () => {
|
|
13
|
+
for (const connection of openConnections) {
|
|
14
|
+
try {
|
|
15
|
+
connection.close();
|
|
16
|
+
} catch {}
|
|
17
|
+
}
|
|
23
18
|
});
|
|
24
|
-
|
|
25
|
-
async function main() {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
{ log }
|
|
31
|
-
] = await Promise.all([
|
|
32
|
-
import("./sqlite-zdgm52sv.js"),
|
|
33
|
-
import("./read-session-raw-b2sd67v4.js"),
|
|
34
|
-
import("./harness-e4avh192.js"),
|
|
35
|
-
import("./logger-94kew5wm.js")
|
|
36
|
-
]);
|
|
37
|
-
setHarness(input.harness ?? "opencode");
|
|
38
|
-
registerSqliteDiagnosticSink(log, getHarness);
|
|
39
|
-
let db;
|
|
40
|
-
let reply;
|
|
41
|
-
try {
|
|
42
|
-
if (input.openCancellation && Atomics.load(new Int32Array(input.openCancellation), 0) !== 0) {
|
|
43
|
-
throw new Error("warm-up owner closed before database open");
|
|
19
|
+
await main();
|
|
20
|
+
async function main() {
|
|
21
|
+
if (input.v2ArchiveReader) {
|
|
22
|
+
const { serveV2ArchiveReads } = await import("./v2-archive-reader-028z6kck.js");
|
|
23
|
+
await serveV2ArchiveReads(port, openConnections);
|
|
24
|
+
return;
|
|
44
25
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
26
|
+
const [
|
|
27
|
+
{ Database, registerSqliteDiagnosticSink },
|
|
28
|
+
{ readRawSessionMessageIdsAtOrdinalsFromDb, scanRawSessionSummaryRows },
|
|
29
|
+
{ getHarness, setHarness },
|
|
30
|
+
{ log }
|
|
31
|
+
] = await Promise.all([
|
|
32
|
+
import("./sqlite-zdgm52sv.js"),
|
|
33
|
+
import("./read-session-raw-j7c9w57v.js"),
|
|
34
|
+
import("./harness-e4avh192.js"),
|
|
35
|
+
import("./logger-qwnbcfj9.js")
|
|
36
|
+
]);
|
|
37
|
+
setHarness(input.harness ?? "opencode");
|
|
38
|
+
registerSqliteDiagnosticSink(log, getHarness);
|
|
39
|
+
let db;
|
|
40
|
+
let reply;
|
|
41
|
+
try {
|
|
42
|
+
if (input.openCancellation && Atomics.load(new Int32Array(input.openCancellation), 0) !== 0) {
|
|
43
|
+
throw new Error("warm-up owner closed before database open");
|
|
44
|
+
}
|
|
45
|
+
db = input.indexMessage || input.ftsRowidBackfill ? new Database(input.path) : new Database(input.path, { readonly: true });
|
|
46
|
+
openConnections.add(db);
|
|
47
|
+
db.exec("PRAGMA busy_timeout = 250");
|
|
48
|
+
if (input.ftsRowidBackfill) {
|
|
49
|
+
const { runMessageFtsRowidMapBackfill } = await import("./message-fts-rowid-map-t6qsyg9s.js");
|
|
50
|
+
db.exec("PRAGMA busy_timeout = 0");
|
|
51
|
+
await runMessageFtsRowidMapBackfill(db);
|
|
52
|
+
reply = { kind: "fts-rowid-backfill" };
|
|
53
|
+
} else if (input.searchArchive) {
|
|
54
|
+
const { renderSearchArchive } = await import("./search-archive-q79hyqxs.js");
|
|
55
|
+
const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-j7c9w57v.js");
|
|
56
|
+
const archive = input.searchArchive;
|
|
57
|
+
let raw;
|
|
58
|
+
try {
|
|
59
|
+
reply = {
|
|
60
|
+
kind: "search-archive",
|
|
61
|
+
text: renderSearchArchive(db, input.sessionId, archive.start, archive.end, archive.tokenBudget, archive.archiveOnly, () => {
|
|
62
|
+
if (!archive.rawPath)
|
|
63
|
+
return new Map(archive.rawIds);
|
|
64
|
+
raw = new Database(archive.rawPath, { readonly: true });
|
|
65
|
+
openConnections.add(raw);
|
|
66
|
+
raw.exec("PRAGMA busy_timeout = 250");
|
|
67
|
+
return readRawSessionMessageIdOrdinalsForRangeFromDb(raw, input.sessionId, archive.start, archive.end);
|
|
68
|
+
})
|
|
69
|
+
};
|
|
70
|
+
} finally {
|
|
71
|
+
if (raw)
|
|
72
|
+
openConnections.delete(raw);
|
|
73
|
+
raw?.close();
|
|
74
|
+
}
|
|
75
|
+
} else if (input.exactOrdinalIds) {
|
|
76
|
+
reply = {
|
|
77
|
+
kind: "exact-ordinal-ids",
|
|
78
|
+
ids: readRawSessionMessageIdsAtOrdinalsFromDb(db, input.sessionId, input.exactOrdinalIds)
|
|
79
|
+
};
|
|
80
|
+
} else if (input.indexMessage) {
|
|
81
|
+
const { setHarness } = await import("./harness-e4avh192.js");
|
|
82
|
+
setHarness(input.harness ?? "opencode");
|
|
83
|
+
const [{ indexMessageInShortChunks }, { configureContextDatabasePragmas }] = await Promise.all([
|
|
84
|
+
import("./message-index-bounded-wfk6aqxk.js"),
|
|
85
|
+
import("./sqlite-context-pragmas-mv9jqwjh.js")
|
|
86
|
+
]);
|
|
87
|
+
configureContextDatabasePragmas(db);
|
|
88
|
+
const writer = db;
|
|
89
|
+
const message = input.indexMessage;
|
|
90
|
+
const cancellation = input.indexCancellation ? new Int32Array(input.indexCancellation) : undefined;
|
|
91
|
+
const result = await indexMessageInShortChunks(writer, input.sessionId, message, input, () => !cancellation || Atomics.load(cancellation, 0) === 0);
|
|
59
92
|
reply = {
|
|
60
|
-
kind: "
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return new Map(archive.rawIds);
|
|
64
|
-
raw = new Database(archive.rawPath, { readonly: true });
|
|
65
|
-
openConnections.add(raw);
|
|
66
|
-
raw.exec("PRAGMA busy_timeout = 250");
|
|
67
|
-
return readRawSessionMessageIdOrdinalsForRangeFromDb(raw, input.sessionId, archive.start, archive.end);
|
|
68
|
-
})
|
|
93
|
+
kind: "indexed",
|
|
94
|
+
inserted: result.inserted,
|
|
95
|
+
measurements: result.measurements
|
|
69
96
|
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
97
|
+
} else if (input.tagRatio !== undefined) {
|
|
98
|
+
const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-vj0yj7ed.js");
|
|
99
|
+
const delta = input.tagState ? scanTagOwnerDelta(db, input.sessionId, input.tagState) : null;
|
|
100
|
+
if (delta)
|
|
101
|
+
reply = { kind: "tag-delta", delta };
|
|
102
|
+
else
|
|
103
|
+
reply = {
|
|
104
|
+
kind: "tag-summary",
|
|
105
|
+
summary: scanTagOwnerSummary(db, input.sessionId, input.tagRatio, input.tagRatios)
|
|
106
|
+
};
|
|
107
|
+
} else {
|
|
108
|
+
const scan = scanRawSessionSummaryRows(db, input.sessionId, input.previous);
|
|
109
|
+
reply = { kind: "scan", scan };
|
|
74
110
|
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
kind: "exact-ordinal-ids",
|
|
78
|
-
ids: readRawSessionMessageIdsAtOrdinalsFromDb(db, input.sessionId, input.exactOrdinalIds)
|
|
79
|
-
};
|
|
80
|
-
} else if (input.indexMessage) {
|
|
81
|
-
const { setHarness } = await import("./harness-e4avh192.js");
|
|
82
|
-
setHarness(input.harness ?? "opencode");
|
|
83
|
-
const [{ indexMessageInShortChunks }, { configureContextDatabasePragmas }] = await Promise.all([
|
|
84
|
-
import("./message-index-bounded-qh91fdr3.js"),
|
|
85
|
-
import("./sqlite-context-pragmas-mv9jqwjh.js")
|
|
86
|
-
]);
|
|
87
|
-
configureContextDatabasePragmas(db);
|
|
88
|
-
const writer = db;
|
|
89
|
-
const message = input.indexMessage;
|
|
90
|
-
const cancellation = input.indexCancellation ? new Int32Array(input.indexCancellation) : undefined;
|
|
91
|
-
const result = await indexMessageInShortChunks(writer, input.sessionId, message, input, () => !cancellation || Atomics.load(cancellation, 0) === 0);
|
|
111
|
+
} catch (error) {
|
|
112
|
+
const sqliteError = error;
|
|
92
113
|
reply = {
|
|
93
|
-
kind: "
|
|
94
|
-
|
|
95
|
-
|
|
114
|
+
kind: "error",
|
|
115
|
+
error: error instanceof Error ? error.stack ?? error.message : String(error),
|
|
116
|
+
code: typeof sqliteError?.code === "string" ? sqliteError.code : undefined,
|
|
117
|
+
errcode: typeof sqliteError?.errcode === "number" ? sqliteError.errcode : undefined
|
|
96
118
|
};
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
reply = { kind: "tag-delta", delta };
|
|
102
|
-
else
|
|
103
|
-
reply = {
|
|
104
|
-
kind: "tag-summary",
|
|
105
|
-
summary: scanTagOwnerSummary(db, input.sessionId, input.tagRatio, input.tagRatios)
|
|
106
|
-
};
|
|
107
|
-
} else {
|
|
108
|
-
const scan = scanRawSessionSummaryRows(db, input.sessionId, input.previous);
|
|
109
|
-
reply = { kind: "scan", scan };
|
|
119
|
+
} finally {
|
|
120
|
+
if (db)
|
|
121
|
+
openConnections.delete(db);
|
|
122
|
+
db?.close();
|
|
110
123
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
reply = {
|
|
114
|
-
kind: "error",
|
|
115
|
-
error: error instanceof Error ? error.stack ?? error.message : String(error),
|
|
116
|
-
code: typeof sqliteError?.code === "string" ? sqliteError.code : undefined,
|
|
117
|
-
errcode: typeof sqliteError?.errcode === "number" ? sqliteError.errcode : undefined
|
|
118
|
-
};
|
|
119
|
-
} finally {
|
|
120
|
-
if (db)
|
|
121
|
-
openConnections.delete(db);
|
|
122
|
-
db?.close();
|
|
124
|
+
port.postMessage(reply);
|
|
125
|
+
closePort();
|
|
123
126
|
}
|
|
124
|
-
|
|
125
|
-
closePort();
|
|
126
|
-
}
|
|
127
|
+
});
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveHostServedBoundaryId2,
|
|
3
3
|
hasRawMessageProvider2,
|
|
4
|
+
rawMessageWorkerSource2,
|
|
5
|
+
rawMessageOffThreadRangeReader2,
|
|
4
6
|
setRawMessageProvider2,
|
|
5
7
|
setBoundedRawMessageProvider2,
|
|
6
8
|
withRawMessageProvider2,
|
|
@@ -36,26 +38,28 @@ import {
|
|
|
36
38
|
readSessionChunk2,
|
|
37
39
|
getRawSessionMessageIdsThrough2,
|
|
38
40
|
readRawSessionSeedTail2
|
|
39
|
-
} from "./index-
|
|
40
|
-
import"./index-
|
|
41
|
+
} from "./index-tn9drm1a.js";
|
|
42
|
+
import"./index-8jjjmhab.js";
|
|
41
43
|
import"./index-1zx87sdm.js";
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-
|
|
44
|
-
import"./index-
|
|
45
|
-
import"./index-
|
|
46
|
-
import"./index-
|
|
47
|
-
import"./index-
|
|
44
|
+
import"./index-vd2ywmfe.js";
|
|
45
|
+
import"./index-c5dzns43.js";
|
|
46
|
+
import"./index-jkanybgq.js";
|
|
47
|
+
import"./index-9wnbnx8f.js";
|
|
48
|
+
import"./index-r2epb000.js";
|
|
49
|
+
import"./index-96ztjvkn.js";
|
|
48
50
|
import"./index-v0p37hm2.js";
|
|
49
|
-
import"./index-
|
|
51
|
+
import"./index-58e3y90n.js";
|
|
52
|
+
import"./index-fxbk7gk3.js";
|
|
50
53
|
import {
|
|
51
54
|
hasMeaningfulUserText2,
|
|
52
55
|
extractTexts2
|
|
53
|
-
} from "./index-
|
|
56
|
+
} from "./index-4xyjr62e.js";
|
|
54
57
|
import"./index-gzy5w8ya.js";
|
|
55
|
-
import"./index-
|
|
58
|
+
import"./index-jrfre9ah.js";
|
|
56
59
|
import"./index-g2q4htwp.js";
|
|
57
60
|
import"./index-pavzsdc6.js";
|
|
58
|
-
import"./index-
|
|
61
|
+
import"./index-z4p0ry94.js";
|
|
62
|
+
import"./index-1d042x6w.js";
|
|
59
63
|
export {
|
|
60
64
|
RAW_MESSAGE_VISIT_PAGE_SIZE2 as RAW_MESSAGE_VISIT_PAGE_SIZE,
|
|
61
65
|
RAW_SESSION_TAG_KEY_PAGE_SIZE2 as RAW_SESSION_TAG_KEY_PAGE_SIZE,
|
|
@@ -76,6 +80,8 @@ export {
|
|
|
76
80
|
prepareRawSessionOrdinals2 as prepareRawSessionOrdinals,
|
|
77
81
|
primeInMemoryTailRawMessageCache2 as primeInMemoryTailRawMessageCache,
|
|
78
82
|
primeTailRawMessageCache2 as primeTailRawMessageCache,
|
|
83
|
+
rawMessageOffThreadRangeReader2 as rawMessageOffThreadRangeReader,
|
|
84
|
+
rawMessageWorkerSource2 as rawMessageWorkerSource,
|
|
79
85
|
readRawSessionBoundaryEndpoints2 as readRawSessionBoundaryEndpoints,
|
|
80
86
|
readRawSessionMessageById2 as readRawSessionMessageById,
|
|
81
87
|
readRawSessionMessageIdOrdinals2 as readRawSessionMessageIdOrdinals,
|
|
@@ -29,13 +29,15 @@ import {
|
|
|
29
29
|
hasRawSessionMessageByIdFromDb2,
|
|
30
30
|
readRawSeedTailFromDb2,
|
|
31
31
|
readRawSessionBoundaryEndpointsFromDb2
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-r2epb000.js";
|
|
33
|
+
import"./index-96ztjvkn.js";
|
|
33
34
|
import"./index-v0p37hm2.js";
|
|
34
35
|
import"./index-gzy5w8ya.js";
|
|
35
|
-
import"./index-
|
|
36
|
+
import"./index-jrfre9ah.js";
|
|
36
37
|
import"./index-g2q4htwp.js";
|
|
37
38
|
import"./index-pavzsdc6.js";
|
|
38
|
-
import"./index-
|
|
39
|
+
import"./index-z4p0ry94.js";
|
|
40
|
+
import"./index-1d042x6w.js";
|
|
39
41
|
export {
|
|
40
42
|
RawOrdinalsNotReady2 as RawOrdinalsNotReady,
|
|
41
43
|
areRustHistorianSyntheticParts2 as areRustHistorianSyntheticParts,
|