@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
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
// src/shared/redaction.ts
|
|
2
|
+
import { homedir, userInfo } from "node:os";
|
|
3
|
+
function escapeRegex(value) {
|
|
4
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5
|
+
}
|
|
6
|
+
var SECRET_WORDS = [
|
|
7
|
+
"key",
|
|
8
|
+
"token",
|
|
9
|
+
"secret",
|
|
10
|
+
"password",
|
|
11
|
+
"auth",
|
|
12
|
+
"authorization",
|
|
13
|
+
"bearer",
|
|
14
|
+
"credential"
|
|
15
|
+
];
|
|
16
|
+
var SECRET_SEGMENT_PATTERN = new RegExp(`^(?:${SECRET_WORDS.map((w) => `${w}s?`).join("|")})$`, "i");
|
|
17
|
+
var TRAILING_DESCRIPTORS = new Set(["id", "ids", "value", "values", "header", "headers"]);
|
|
18
|
+
function redactionTypeForKey(key) {
|
|
19
|
+
const normalized = key.trim().toLowerCase().replace(/[^a-z0-9_.-]+/g, "_");
|
|
20
|
+
const suffix = normalized.split(".").filter(Boolean).at(-1) ?? normalized;
|
|
21
|
+
return suffix || "secret";
|
|
22
|
+
}
|
|
23
|
+
function isNonSecretScalarValue(value) {
|
|
24
|
+
const v = value.trim();
|
|
25
|
+
if (v === "true" || v === "false" || v === "null" || v === "undefined")
|
|
26
|
+
return true;
|
|
27
|
+
return /^[+-]?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?$/.test(v);
|
|
28
|
+
}
|
|
29
|
+
var SECRET_QUALIFIERS = new Set([
|
|
30
|
+
"api",
|
|
31
|
+
"access",
|
|
32
|
+
"private",
|
|
33
|
+
"client",
|
|
34
|
+
"auth",
|
|
35
|
+
"authorization",
|
|
36
|
+
"secret",
|
|
37
|
+
"bearer",
|
|
38
|
+
"session",
|
|
39
|
+
"refresh",
|
|
40
|
+
"service",
|
|
41
|
+
"x",
|
|
42
|
+
"openai",
|
|
43
|
+
"anthropic",
|
|
44
|
+
"google",
|
|
45
|
+
"github",
|
|
46
|
+
"huggingface",
|
|
47
|
+
"aws",
|
|
48
|
+
"azure",
|
|
49
|
+
"id"
|
|
50
|
+
]);
|
|
51
|
+
var UNQUALIFIED_SECRET_SEGMENT_PATTERN = /^(?:password|secret|credential|bearer|authorization)s?$/;
|
|
52
|
+
function isSecretKey(key) {
|
|
53
|
+
const segments = key.replace(/([a-z0-9])([A-Z])/g, "$1_$2").toLowerCase().split(/[._-]+/).filter(Boolean);
|
|
54
|
+
if (segments.length === 0)
|
|
55
|
+
return false;
|
|
56
|
+
if (segments.length === 1) {
|
|
57
|
+
const first = segments[0];
|
|
58
|
+
return Boolean(first && SECRET_SEGMENT_PATTERN.test(first));
|
|
59
|
+
}
|
|
60
|
+
for (let i = 0;i < segments.length; i++) {
|
|
61
|
+
const seg = segments[i];
|
|
62
|
+
if (!seg || !SECRET_SEGMENT_PATTERN.test(seg))
|
|
63
|
+
continue;
|
|
64
|
+
let trailingOk = true;
|
|
65
|
+
for (let j = i + 1;j < segments.length; j++) {
|
|
66
|
+
const tail = segments[j];
|
|
67
|
+
if (!tail)
|
|
68
|
+
continue;
|
|
69
|
+
if (TRAILING_DESCRIPTORS.has(tail))
|
|
70
|
+
continue;
|
|
71
|
+
if (SECRET_SEGMENT_PATTERN.test(tail))
|
|
72
|
+
continue;
|
|
73
|
+
trailingOk = false;
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
if (!trailingOk)
|
|
77
|
+
continue;
|
|
78
|
+
if (UNQUALIFIED_SECRET_SEGMENT_PATTERN.test(seg))
|
|
79
|
+
return true;
|
|
80
|
+
for (let k = i - 1;k >= 0; k--) {
|
|
81
|
+
const lead = segments[k];
|
|
82
|
+
if (lead && SECRET_QUALIFIERS.has(lead))
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
function sanitizePathString(value) {
|
|
89
|
+
const home = process.env.HOME || process.env.USERPROFILE || homedir();
|
|
90
|
+
const username = userInfo().username;
|
|
91
|
+
let sanitized = value;
|
|
92
|
+
if (home) {
|
|
93
|
+
sanitized = sanitized.replace(new RegExp(escapeRegex(home), "g"), "~");
|
|
94
|
+
}
|
|
95
|
+
sanitized = sanitized.replace(/\/Users\/[^/]+\//g, "/Users/<USER>/");
|
|
96
|
+
sanitized = sanitized.replace(/\/home\/[^/]+\//g, "/home/<USER>/");
|
|
97
|
+
sanitized = sanitized.replace(/C:\\Users\\[^\\]+\\/g, "C:\\Users\\<USER>\\");
|
|
98
|
+
if (username) {
|
|
99
|
+
sanitized = sanitized.replace(new RegExp(escapeRegex(username), "g"), "<USER>");
|
|
100
|
+
}
|
|
101
|
+
return sanitized;
|
|
102
|
+
}
|
|
103
|
+
var SECRET_TEXT_PATTERNS = [
|
|
104
|
+
{
|
|
105
|
+
pattern: /\bsk-ant-(?:api03-)?[A-Za-z0-9_-]{32,}/g,
|
|
106
|
+
replacement: "<ANTHROPIC_API_KEY_REDACTED>"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
pattern: /\bsk-(?:proj-)?[A-Za-z0-9_-]{12,}/g,
|
|
110
|
+
replacement: "<OPENAI_API_KEY_REDACTED>"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
pattern: /\bgithub_pat_[A-Za-z0-9_]{20,}/g,
|
|
114
|
+
replacement: "<GITHUB_PAT_REDACTED>"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
pattern: /\b(?:gh[opsu]|ghr)_[A-Za-z0-9_-]{30,}/g,
|
|
118
|
+
replacement: "<GITHUB_TOKEN_REDACTED>"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
pattern: /\bhf_[A-Za-z0-9]{30,}/g,
|
|
122
|
+
replacement: "<HUGGINGFACE_TOKEN_REDACTED>"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
pattern: /\b(?:AKIA|ASIA)[0-9A-Z]{16}\b/g,
|
|
126
|
+
replacement: "<AWS_ACCESS_KEY_ID_REDACTED>"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
pattern: /\bxox[abprsuvc]-[A-Za-z0-9-]{10,}/g,
|
|
130
|
+
replacement: "<SLACK_TOKEN_REDACTED>"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
pattern: /\bAIza[A-Za-z0-9_-]{35}\b/g,
|
|
134
|
+
replacement: "<GOOGLE_API_KEY_REDACTED>"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
pattern: /\b(Authorization\s*:\s*Bearer\s+)([A-Za-z0-9._~+/=-]{8,})/gi,
|
|
138
|
+
replacement: (_full, prefix) => `${prefix}<REDACTED:bearer>`
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
pattern: /\b((?:Proxy-)?Authorization\s*:\s*(?:Basic|Digest|Token|Negotiate|NTLM)\s+)([A-Za-z0-9._~+/=-]{4,})/gi,
|
|
142
|
+
replacement: (_full, prefix) => `${prefix}<REDACTED:authorization>`
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
pattern: /\b((?:x-)?(?:api-?key|api-?token|auth-?token|access-?token)\s*:\s*)([^\s'"`,;<>]{6,})/gi,
|
|
146
|
+
replacement: (full, prefix, value) => isNonSecretScalarValue(value) ? full : `${prefix}<REDACTED:api_key>`
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
pattern: /\b((?:api[_-]?key|client[_-]?secret|access[_-]?token|token|secret|password|passwd|pwd)\s*:\s*)([^\s'"`,;<>]{6,})/gi,
|
|
150
|
+
replacement: (full, prefix, value) => isNonSecretScalarValue(value) ? full : `${prefix}<REDACTED:credential>`
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
pattern: /\b([a-z][a-z0-9+.-]*:\/\/[^\s/:@]+:)([^\s/@]+)(@)/gi,
|
|
154
|
+
replacement: (_full, prefix, _password, at) => `${prefix}<REDACTED:password>${at}`
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
pattern: /\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g,
|
|
158
|
+
replacement: "<JWT_REDACTED>"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
pattern: /(["'])([^"']*(?:key|token|secret|password|auth|bearer|credential)[^"']*)\1(\s*:\s*)(["'])([^"']*)\4/gi,
|
|
162
|
+
replacement: (full, quote, key, separator, valueQuote, value) => isNonSecretScalarValue(value) ? full : `${quote}${key}${quote}${separator}${valueQuote}<REDACTED:${redactionTypeForKey(key)}>${valueQuote}`
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
pattern: /\b([A-Za-z0-9_.-]*(?:key|token|secret|password|auth|bearer|credential)[A-Za-z0-9_.-]*)\s*=\s*([^\s'"`]+)/gi,
|
|
166
|
+
replacement: (full, key, value) => isNonSecretScalarValue(value) ? full : `${key}=<REDACTED:${redactionTypeForKey(key)}>`
|
|
167
|
+
}
|
|
168
|
+
];
|
|
169
|
+
function redactSecretText(value) {
|
|
170
|
+
let redacted = value;
|
|
171
|
+
for (const { pattern, replacement } of SECRET_TEXT_PATTERNS) {
|
|
172
|
+
if (typeof replacement === "string") {
|
|
173
|
+
redacted = redacted.replace(pattern, replacement);
|
|
174
|
+
} else {
|
|
175
|
+
redacted = redacted.replace(pattern, replacement);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return redacted;
|
|
179
|
+
}
|
|
180
|
+
function sanitizeDiagnosticText(value) {
|
|
181
|
+
return redactSecretText(sanitizePathString(value));
|
|
182
|
+
}
|
|
183
|
+
var SHAREABILITY_SENSITIVE_PATTERNS = [
|
|
184
|
+
/\bC:\/Users\/[^/\s]+/i,
|
|
185
|
+
/(?:^|\s)~\/[^\s]+/,
|
|
186
|
+
/\b(?:api[_-]?key|secret|token|password|passwd|pwd|client[_-]?secret|access[_-]?key)\b\s*[:=]\s*\S+/i,
|
|
187
|
+
/\b(?:localhost|127\.0\.0\.1|0\.0\.0\.0|\[::1\])(?::\d+)?\b/i,
|
|
188
|
+
/\b(?:10|127)\.\d{1,3}\.\d{1,3}\.\d{1,3}\b/,
|
|
189
|
+
/\b192\.168\.\d{1,3}\.\d{1,3}\b/,
|
|
190
|
+
/\b172\.(?:1[6-9]|2\d|3[01])\.\d{1,3}\.\d{1,3}\b/
|
|
191
|
+
];
|
|
192
|
+
function hasShareabilitySensitiveText(text) {
|
|
193
|
+
try {
|
|
194
|
+
if (sanitizeDiagnosticText(text) !== text)
|
|
195
|
+
return true;
|
|
196
|
+
return SHAREABILITY_SENSITIVE_PATTERNS.some((pattern) => pattern.test(text));
|
|
197
|
+
} catch {
|
|
198
|
+
return true;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
function sanitizeConfigValue(value, keyPath = []) {
|
|
202
|
+
if (value === null || typeof value === "number" || typeof value === "boolean")
|
|
203
|
+
return value;
|
|
204
|
+
const key = keyPath.at(-1) ?? "";
|
|
205
|
+
if (key && isSecretKey(key)) {
|
|
206
|
+
return `<REDACTED:${redactionTypeForKey(key)}>`;
|
|
207
|
+
}
|
|
208
|
+
if (typeof value === "string")
|
|
209
|
+
return sanitizeDiagnosticText(value);
|
|
210
|
+
if (Array.isArray(value)) {
|
|
211
|
+
return value.map((entry, index) => sanitizeConfigValue(entry, [...keyPath, String(index)]));
|
|
212
|
+
}
|
|
213
|
+
if (value && typeof value === "object") {
|
|
214
|
+
return Object.fromEntries(Object.entries(value).map(([entryKey, entry]) => [
|
|
215
|
+
entryKey,
|
|
216
|
+
sanitizeConfigValue(entry, [...keyPath, entryKey])
|
|
217
|
+
]));
|
|
218
|
+
}
|
|
219
|
+
return value;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export { sanitizeDiagnosticText, hasShareabilitySensitiveText, sanitizeConfigValue };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// src/hooks/magic-context/host-served-rows.ts
|
|
2
|
+
var HOST_UNSERVED_ROW = "hostUnservedRow";
|
|
3
|
+
function markHostUnservedRow(target) {
|
|
4
|
+
Object.defineProperty(target, HOST_UNSERVED_ROW, {
|
|
5
|
+
value: true,
|
|
6
|
+
enumerable: false,
|
|
7
|
+
configurable: true
|
|
8
|
+
});
|
|
9
|
+
return target;
|
|
10
|
+
}
|
|
11
|
+
function isHostUnservedRow(value) {
|
|
12
|
+
return typeof value === "object" && value !== null && value[HOST_UNSERVED_ROW] === true;
|
|
13
|
+
}
|
|
14
|
+
function retreatPastHostUnservedRows(messages, exclusiveEnd, floor) {
|
|
15
|
+
if (!messages.some(isHostUnservedRow))
|
|
16
|
+
return exclusiveEnd;
|
|
17
|
+
const byOrdinal = new Map(messages.map((message) => [message.ordinal, message]));
|
|
18
|
+
let end = exclusiveEnd;
|
|
19
|
+
while (end - 1 >= floor && isHostUnservedRow(byOrdinal.get(end - 1)))
|
|
20
|
+
end -= 1;
|
|
21
|
+
return end;
|
|
22
|
+
}
|
|
23
|
+
function snapTerminalCompartmentToServedRow(compartments, lines) {
|
|
24
|
+
if (!lines.some(isHostUnservedRow))
|
|
25
|
+
return { compartments: [...compartments], snapped: false };
|
|
26
|
+
const byOrdinal = new Map(lines.map((line) => [line.ordinal, line]));
|
|
27
|
+
const result = [...compartments];
|
|
28
|
+
let snapped = false;
|
|
29
|
+
while (result.length > 0) {
|
|
30
|
+
const last = result[result.length - 1];
|
|
31
|
+
if (!isHostUnservedRow(byOrdinal.get(last.endMessage)))
|
|
32
|
+
break;
|
|
33
|
+
snapped = true;
|
|
34
|
+
let served;
|
|
35
|
+
for (let ordinal = last.endMessage - 1;ordinal >= last.startMessage; ordinal -= 1) {
|
|
36
|
+
const line = byOrdinal.get(ordinal);
|
|
37
|
+
if (line && !isHostUnservedRow(line)) {
|
|
38
|
+
served = line;
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (!served) {
|
|
43
|
+
result.pop();
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
result[result.length - 1] = {
|
|
47
|
+
...last,
|
|
48
|
+
endMessage: served.ordinal,
|
|
49
|
+
endMessageId: served.messageId
|
|
50
|
+
};
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
return { compartments: result, snapped };
|
|
54
|
+
}
|
|
55
|
+
function isHostRenderedSystemMessage(message) {
|
|
56
|
+
const id = message.info.id;
|
|
57
|
+
return (typeof id !== "string" || id.length === 0) && message.info.role === "system";
|
|
58
|
+
}
|
|
59
|
+
var COVERED_INSTRUCTION_ROW = "coveredInstructionRow";
|
|
60
|
+
function markCoveredInstructionRow(target) {
|
|
61
|
+
Object.defineProperty(target, COVERED_INSTRUCTION_ROW, {
|
|
62
|
+
value: true,
|
|
63
|
+
enumerable: false,
|
|
64
|
+
configurable: true
|
|
65
|
+
});
|
|
66
|
+
return target;
|
|
67
|
+
}
|
|
68
|
+
function isCoveredInstructionRow(value) {
|
|
69
|
+
return typeof value === "object" && value !== null && value[COVERED_INSTRUCTION_ROW] === true;
|
|
70
|
+
}
|
|
71
|
+
function takeCoveredInstructionRows(messages) {
|
|
72
|
+
const taken = messages.filter((message) => isCoveredInstructionRow(message.info));
|
|
73
|
+
if (taken.length > 0) {
|
|
74
|
+
const kept = messages.filter((message) => !isCoveredInstructionRow(message.info));
|
|
75
|
+
messages.splice(0, messages.length, ...kept);
|
|
76
|
+
}
|
|
77
|
+
return taken;
|
|
78
|
+
}
|
|
79
|
+
function cloneKeepingCoveredInstructionMarks(messages) {
|
|
80
|
+
const copy = structuredClone(messages);
|
|
81
|
+
messages.forEach((message, index) => {
|
|
82
|
+
const copied = copy[index];
|
|
83
|
+
if (copied && isCoveredInstructionRow(message.info))
|
|
84
|
+
markCoveredInstructionRow(copied.info);
|
|
85
|
+
});
|
|
86
|
+
return copy;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export { markHostUnservedRow, isHostUnservedRow, retreatPastHostUnservedRows, snapTerminalCompartmentToServedRow, isHostRenderedSystemMessage, markCoveredInstructionRow, isCoveredInstructionRow, takeCoveredInstructionRows, cloneKeepingCoveredInstructionMarks };
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
detectOverflow,
|
|
29
29
|
isAnthropicFamilyRoute,
|
|
30
30
|
readRawSessionMessages2
|
|
31
|
-
} from "./index-
|
|
31
|
+
} from "./index-tn9drm1a.js";
|
|
32
32
|
import {
|
|
33
33
|
setHarness2
|
|
34
34
|
} from "./index-pavzsdc6.js";
|
|
@@ -38,13 +38,14 @@ import {
|
|
|
38
38
|
isMagicContextStorageOutsideEngram,
|
|
39
39
|
claimStorageBackupWarningCheck
|
|
40
40
|
} from "./index-g2q4htwp.js";
|
|
41
|
+
import"./index-z4p0ry94.js";
|
|
41
42
|
import {
|
|
42
43
|
registerStalePluginBuildHost,
|
|
43
44
|
importPluginModule,
|
|
44
45
|
log2,
|
|
45
46
|
sessionLog2,
|
|
46
47
|
flushLogger2
|
|
47
|
-
} from "./index-
|
|
48
|
+
} from "./index-jrfre9ah.js";
|
|
48
49
|
import {
|
|
49
50
|
withContentLanguageDirective,
|
|
50
51
|
string,
|
|
@@ -56,7 +57,7 @@ import {
|
|
|
56
57
|
record,
|
|
57
58
|
DEFAULT_EXECUTE_THRESHOLD_PERCENTAGE,
|
|
58
59
|
DEFAULT_HISTORIAN_TIMEOUT_MS
|
|
59
|
-
} from "./index-
|
|
60
|
+
} from "./index-c5dzns43.js";
|
|
60
61
|
import {
|
|
61
62
|
denyTaskRoutingToCallerAgents,
|
|
62
63
|
buildHiddenAgentRegistrations,
|
|
@@ -72,25 +73,9 @@ import {
|
|
|
72
73
|
dreamerRunConfig,
|
|
73
74
|
pluginConfigReader,
|
|
74
75
|
createDreamerOutputCapSampler,
|
|
75
|
-
observeSessionActivity,
|
|
76
|
-
backfillSessionActivity,
|
|
77
76
|
COMPARTMENT_AGENT_SYSTEM_PROMPT,
|
|
78
77
|
HISTORIAN_EDITOR_SYSTEM_PROMPT,
|
|
79
78
|
COMPARTMENT_STRUCTURAL_SYSTEM_PROMPT,
|
|
80
|
-
providerResponseFailed,
|
|
81
|
-
isSuccessfulProviderCompletion,
|
|
82
|
-
forgetUnpublishedAutoSearchNoHint,
|
|
83
|
-
getOrCreateSessionMeta,
|
|
84
|
-
updateSessionMeta,
|
|
85
|
-
markSessionCleanupPending,
|
|
86
|
-
clearSession,
|
|
87
|
-
requestPendingMaterialization,
|
|
88
|
-
lkgProviderInputTotal,
|
|
89
|
-
noteLkgProviderResponse,
|
|
90
|
-
clearLkgMeasuredRequest,
|
|
91
|
-
createDbLkgPersistence,
|
|
92
|
-
registerLkgPersistence,
|
|
93
|
-
dropSlot,
|
|
94
79
|
recordPromptSessionError,
|
|
95
80
|
CTX_NOTE_LIGHT_DESCRIPTION,
|
|
96
81
|
createPromptSurfaceRuntime,
|
|
@@ -99,7 +84,7 @@ import {
|
|
|
99
84
|
checkCompactionMarkerConsistency,
|
|
100
85
|
clearInjectionCache,
|
|
101
86
|
clearNoteNudgeTriggerOnly
|
|
102
|
-
} from "./index-
|
|
87
|
+
} from "./index-9tdvbdv1.js";
|
|
103
88
|
import"./index-sd3egckz.js";
|
|
104
89
|
import {
|
|
105
90
|
hasTrustedAbsoluteWall,
|
|
@@ -109,7 +94,7 @@ import {
|
|
|
109
94
|
deriveHistorianChunkTokens2,
|
|
110
95
|
resolveKnownHistorianContextLimit2,
|
|
111
96
|
resolveHistorianContextLimit2
|
|
112
|
-
} from "./index-
|
|
97
|
+
} from "./index-dnqqqc5f.js";
|
|
113
98
|
import {
|
|
114
99
|
buildDreamTaskRuntimeConfigs2,
|
|
115
100
|
userMemoryCollectionEnabled2,
|
|
@@ -186,7 +171,7 @@ import {
|
|
|
186
171
|
parameterDescriptionsFor,
|
|
187
172
|
MagicContextRpcServer,
|
|
188
173
|
applyHiddenSubagentTemperature
|
|
189
|
-
} from "./index-
|
|
174
|
+
} from "./index-gnmhbyyc.js";
|
|
190
175
|
import {
|
|
191
176
|
resolveOpenCodeDbPath,
|
|
192
177
|
openCodeDbPathExists,
|
|
@@ -201,16 +186,8 @@ import {
|
|
|
201
186
|
createFailClosedController,
|
|
202
187
|
recordHookInitFailure,
|
|
203
188
|
clearHookInitFailure,
|
|
204
|
-
getLastHookInitFailure
|
|
205
|
-
|
|
206
|
-
getSchemaFenceRejection,
|
|
207
|
-
setSqlitePragmaConfig,
|
|
208
|
-
openDatabase,
|
|
209
|
-
openCurrentDatabase,
|
|
210
|
-
openDatabaseAsync,
|
|
211
|
-
isDatabasePersisted,
|
|
212
|
-
getDatabasePersistenceError
|
|
213
|
-
} from "./index-fm36bjv4.js";
|
|
189
|
+
getLastHookInitFailure
|
|
190
|
+
} from "./index-wh9fxds5.js";
|
|
214
191
|
import {
|
|
215
192
|
setHomeProjectPermission,
|
|
216
193
|
ProjectIdentityError,
|
|
@@ -221,64 +198,93 @@ import {
|
|
|
221
198
|
beginBootQuietPeriod,
|
|
222
199
|
bootQuietRemainingMs,
|
|
223
200
|
scheduleAfterBootQuiet
|
|
224
|
-
} from "./index-
|
|
201
|
+
} from "./index-txs8tce6.js";
|
|
225
202
|
import {
|
|
226
203
|
deleteTemporalDecision
|
|
227
|
-
} from "./index-
|
|
204
|
+
} from "./index-9wnbnx8f.js";
|
|
205
|
+
import {
|
|
206
|
+
observeSessionActivity,
|
|
207
|
+
backfillSessionActivity,
|
|
208
|
+
providerResponseFailed,
|
|
209
|
+
isSuccessfulProviderCompletion,
|
|
210
|
+
forgetUnpublishedAutoSearchNoHint,
|
|
211
|
+
getOrCreateSessionMeta,
|
|
212
|
+
updateSessionMeta,
|
|
213
|
+
markSessionCleanupPending,
|
|
214
|
+
clearSession,
|
|
215
|
+
requestPendingMaterialization,
|
|
216
|
+
lkgProviderInputTotal,
|
|
217
|
+
noteLkgProviderResponse,
|
|
218
|
+
clearLkgMeasuredRequest,
|
|
219
|
+
createDbLkgPersistence,
|
|
220
|
+
registerLkgPersistence,
|
|
221
|
+
dropSlot
|
|
222
|
+
} from "./index-72czy45z.js";
|
|
228
223
|
import {
|
|
229
224
|
recordSessionProjectIdentity
|
|
230
|
-
} from "./index-
|
|
231
|
-
import"./index-
|
|
225
|
+
} from "./index-jz5bk7xd.js";
|
|
226
|
+
import"./index-2p37txes.js";
|
|
232
227
|
import"./index-fb3zxn06.js";
|
|
228
|
+
import {
|
|
229
|
+
startBootDeadline,
|
|
230
|
+
getSchemaFenceRejection,
|
|
231
|
+
setSqlitePragmaConfig,
|
|
232
|
+
openDatabase,
|
|
233
|
+
openCurrentDatabase,
|
|
234
|
+
openDatabaseAsync,
|
|
235
|
+
isDatabasePersisted,
|
|
236
|
+
getDatabasePersistenceError
|
|
237
|
+
} from "./index-9fgmkfaf.js";
|
|
233
238
|
import {
|
|
234
239
|
registerExitAbort,
|
|
235
240
|
unregisterExitAbort
|
|
236
241
|
} from "./index-v0p37hm2.js";
|
|
237
|
-
import"./index-
|
|
242
|
+
import"./index-96ztjvkn.js";
|
|
243
|
+
import"./index-1d042x6w.js";
|
|
238
244
|
import {
|
|
239
245
|
forgetRawSessionOrdinalWatermark2
|
|
240
|
-
} from "./index-
|
|
241
|
-
import"./index-
|
|
242
|
-
import"./index-
|
|
246
|
+
} from "./index-r2epb000.js";
|
|
247
|
+
import"./index-b1ydbp95.js";
|
|
248
|
+
import"./index-nj360hcs.js";
|
|
243
249
|
import"./index-fr0wbhdn.js";
|
|
244
250
|
import {
|
|
245
251
|
preloadTokenizer
|
|
246
|
-
} from "./index-
|
|
252
|
+
} from "./index-4xyjr62e.js";
|
|
247
253
|
import {
|
|
248
254
|
BoundedSessionMap,
|
|
249
255
|
recordToolDefinition,
|
|
250
256
|
getCurrentToolSetHash
|
|
251
|
-
} from "./index-
|
|
252
|
-
import"./index-
|
|
257
|
+
} from "./index-jkanybgq.js";
|
|
258
|
+
import"./index-g4t7850m.js";
|
|
253
259
|
import {
|
|
254
260
|
getDefaultSubcConnectionFile,
|
|
255
261
|
SubcModuleTransport
|
|
256
|
-
} from "./index-
|
|
262
|
+
} from "./index-wcwhhtdh.js";
|
|
257
263
|
import"./index-qt1qqasc.js";
|
|
258
|
-
import"./index-
|
|
264
|
+
import"./index-fw42ms3m.js";
|
|
259
265
|
import {
|
|
260
266
|
observeOpenCodeTurnEvent,
|
|
261
267
|
clearTrackedOpenCodeSession,
|
|
262
268
|
findLastAssistantModelFromOpenCodeDb
|
|
263
|
-
} from "./index-
|
|
269
|
+
} from "./index-vd2ywmfe.js";
|
|
264
270
|
import {
|
|
265
271
|
sendCommandResult2,
|
|
266
272
|
sendStatusNotification2
|
|
267
|
-
} from "./index-
|
|
273
|
+
} from "./index-ae1ar4v1.js";
|
|
268
274
|
import {
|
|
269
275
|
detectConflicts,
|
|
270
276
|
resolveCompactionForBoot
|
|
271
|
-
} from "./index-
|
|
277
|
+
} from "./index-hacf2tyx.js";
|
|
272
278
|
import {
|
|
273
279
|
sendConflictWarning2,
|
|
274
280
|
cleanupConflictWarnings2
|
|
275
|
-
} from "./index-
|
|
281
|
+
} from "./index-jggt5gf2.js";
|
|
276
282
|
import"./index-1zx87sdm.js";
|
|
277
283
|
import {
|
|
278
284
|
stripPersistedAssistantText,
|
|
279
285
|
deleteTagsByMessageId2,
|
|
280
286
|
getMaxTagNumberBySession2
|
|
281
|
-
} from "./index-
|
|
287
|
+
} from "./index-8jjjmhab.js";
|
|
282
288
|
import {
|
|
283
289
|
resolveHistorianModel2,
|
|
284
290
|
resolveOpenCodeAgentOverrides2,
|
|
@@ -286,22 +292,26 @@ import {
|
|
|
286
292
|
} from "./index-5kym00ag.js";
|
|
287
293
|
import {
|
|
288
294
|
getEmbedDrainUiStatus,
|
|
289
|
-
clearEmbedSessionState
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
import"./index-v7287tzq.js";
|
|
295
|
+
clearEmbedSessionState
|
|
296
|
+
} from "./index-2amn2s73.js";
|
|
297
|
+
import"./index-dcjkw41m.js";
|
|
293
298
|
import {
|
|
294
299
|
deleteIndexedMessage
|
|
295
|
-
} from "./index-
|
|
296
|
-
import"./index-
|
|
300
|
+
} from "./index-2rs7912w.js";
|
|
301
|
+
import"./index-66a50f3e.js";
|
|
302
|
+
import"./index-2qbtqg1w.js";
|
|
297
303
|
import {
|
|
298
304
|
pushNotification2
|
|
299
305
|
} from "./index-x8a7jmkh.js";
|
|
300
|
-
import"./index-
|
|
306
|
+
import"./index-xd2p95m7.js";
|
|
307
|
+
import {
|
|
308
|
+
getEmbeddingCoverageStatus2
|
|
309
|
+
} from "./index-21fgrfrf.js";
|
|
301
310
|
import"./index-4dhv7mqz.js";
|
|
302
|
-
import"./index-
|
|
311
|
+
import"./index-ty4vhe4n.js";
|
|
303
312
|
import"./index-jjvbk92s.js";
|
|
304
|
-
import"./index-
|
|
313
|
+
import"./index-xnm0wq1r.js";
|
|
314
|
+
import"./index-850vthn3.js";
|
|
305
315
|
import {
|
|
306
316
|
createTagger,
|
|
307
317
|
cavemanWordRulesForLanguage,
|
|
@@ -309,13 +319,13 @@ import {
|
|
|
309
319
|
clearToolPermissionDenied,
|
|
310
320
|
collectForeignTextParts,
|
|
311
321
|
resetDegradedCacheCount2
|
|
312
|
-
} from "./index-
|
|
322
|
+
} from "./index-dfdg2cgg.js";
|
|
313
323
|
import {
|
|
314
324
|
scheduleClearAndReindex
|
|
315
|
-
} from "./index-
|
|
325
|
+
} from "./index-dz48h1wx.js";
|
|
316
326
|
import {
|
|
317
327
|
runManagedRecomp2
|
|
318
|
-
} from "./index-
|
|
328
|
+
} from "./index-ys7j6679.js";
|
|
319
329
|
import {
|
|
320
330
|
isValidSemver,
|
|
321
331
|
compareSemverCore
|
|
@@ -323,9 +333,11 @@ import {
|
|
|
323
333
|
import"./index-fmsr7v69.js";
|
|
324
334
|
import {
|
|
325
335
|
runManagedWrapup2
|
|
326
|
-
} from "./index-
|
|
336
|
+
} from "./index-pp8vdn01.js";
|
|
337
|
+
import"./index-j105mf16.js";
|
|
327
338
|
import"./index-kaqs6h31.js";
|
|
328
|
-
import"./index-
|
|
339
|
+
import"./index-prw8apnc.js";
|
|
340
|
+
import"./index-4ks89h5a.js";
|
|
329
341
|
import {
|
|
330
342
|
isDreamerRunnable,
|
|
331
343
|
isSmartNoteSurfaceAvailable,
|
|
@@ -345,7 +357,7 @@ import {
|
|
|
345
357
|
import {
|
|
346
358
|
closeQuietly
|
|
347
359
|
} from "./index-8ajstryz.js";
|
|
348
|
-
import"./index-
|
|
360
|
+
import"./index-fxbk7gk3.js";
|
|
349
361
|
import {
|
|
350
362
|
setStoragePrivatePermissionEnforcement,
|
|
351
363
|
ensureStorageDirectorySync,
|
|
@@ -8193,7 +8205,7 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
8193
8205
|
// package.json
|
|
8194
8206
|
var package_default = {
|
|
8195
8207
|
name: "@cortexkit/opencode-magic-context",
|
|
8196
|
-
version: "0.49.
|
|
8208
|
+
version: "0.49.36",
|
|
8197
8209
|
type: "module",
|
|
8198
8210
|
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
8199
8211
|
main: "dist/index.js",
|
|
@@ -12047,7 +12059,7 @@ async function setup(context) {
|
|
|
12047
12059
|
if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
|
|
12048
12060
|
log2(`[magic-context] Magic Context storage is at ${storageDir}, outside the folder Engram backs up (~/.local/share/cortexkit/magic-context). It is not included in CortexKit backups.`);
|
|
12049
12061
|
}
|
|
12050
|
-
const { registerContext } = await import("./context-
|
|
12062
|
+
const { registerContext } = await import("./context-969z683s.js");
|
|
12051
12063
|
setHarness2("opencode2");
|
|
12052
12064
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
12053
12065
|
const duties = await registerContext(context);
|
|
@@ -12126,7 +12138,7 @@ var server = async (ctx) => {
|
|
|
12126
12138
|
if (hasBannerEntries)
|
|
12127
12139
|
setTimeout(async () => {
|
|
12128
12140
|
try {
|
|
12129
|
-
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-
|
|
12141
|
+
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-14p3yje4.js"));
|
|
12130
12142
|
const clientWithSessions = ctx.client;
|
|
12131
12143
|
const sessions = await Promise.resolve(clientWithSessions.session?.list?.()).catch(() => null);
|
|
12132
12144
|
const sessionList = Array.isArray(sessions) ? sessions : sessions?.data;
|
|
@@ -12144,7 +12156,7 @@ var server = async (ctx) => {
|
|
|
12144
12156
|
log2(`[magic-context] opencode_db_missing path=${openCodeDbResolution.path} source=${openCodeDbResolution.source}`);
|
|
12145
12157
|
setTimeout(async () => {
|
|
12146
12158
|
try {
|
|
12147
|
-
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-
|
|
12159
|
+
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-14p3yje4.js"));
|
|
12148
12160
|
const clientWithSessions = ctx.client;
|
|
12149
12161
|
const sessions = await Promise.resolve(clientWithSessions.session?.list?.()).catch(() => null);
|
|
12150
12162
|
const sessionList = Array.isArray(sessions) ? sessions : sessions?.data;
|
|
@@ -12417,12 +12429,12 @@ var server = async (ctx) => {
|
|
|
12417
12429
|
{
|
|
12418
12430
|
const fence = getSchemaFenceRejection();
|
|
12419
12431
|
if (fence) {
|
|
12420
|
-
importPluginModule(() => import("./conflict-warning-hook-
|
|
12432
|
+
importPluginModule(() => import("./conflict-warning-hook-b75jn458.js")).then(({ sendSchemaFenceWarning }) => sendSchemaFenceWarning(ctx.client, ctx.directory, fence)).catch((error) => log2("[magic-context] schema-fence warning unavailable:", error));
|
|
12421
12433
|
}
|
|
12422
12434
|
}
|
|
12423
12435
|
const serverUrl = ctx.serverUrl;
|
|
12424
12436
|
const serverUrlStr = serverUrl instanceof URL ? serverUrl.toString().replace(/\/$/, "") : typeof serverUrl === "string" ? serverUrl.replace(/\/$/, "") : undefined;
|
|
12425
|
-
importPluginModule(() => import("./send-session-notification-
|
|
12437
|
+
importPluginModule(() => import("./send-session-notification-14p3yje4.js")).then(({ setNotificationServerUrl }) => {
|
|
12426
12438
|
setNotificationServerUrl(serverUrlStr);
|
|
12427
12439
|
}).catch((error) => log2("[magic-context] notification transport unavailable:", error));
|
|
12428
12440
|
if (conflictResult?.hasConflict) {
|
|
@@ -12445,7 +12457,7 @@ var server = async (ctx) => {
|
|
|
12445
12457
|
}) => {
|
|
12446
12458
|
if (!shouldShowAnnouncement())
|
|
12447
12459
|
return;
|
|
12448
|
-
return importPluginModule(() => import("./conflict-warning-hook-
|
|
12460
|
+
return importPluginModule(() => import("./conflict-warning-hook-b75jn458.js")).then(({ sendStartupAnnouncement }) => sendStartupAnnouncement(ctx.client, ctx.directory, ANNOUNCEMENT_VERSION, ANNOUNCEMENT_FEATURES, ANNOUNCEMENT_FOOTER, markAnnouncementSeen));
|
|
12449
12461
|
}).catch(() => {});
|
|
12450
12462
|
}, 8000);
|
|
12451
12463
|
}
|
|
@@ -12519,8 +12531,8 @@ var server = async (ctx) => {
|
|
|
12519
12531
|
tryReopenStorage,
|
|
12520
12532
|
rustReplayParticipant: () => magicContextRuntime.magicContext?.getRustReplayParticipant?.() ?? null,
|
|
12521
12533
|
onStorageBusyRefusal: async (sessionId, message) => {
|
|
12522
|
-
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-
|
|
12523
|
-
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-
|
|
12534
|
+
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-14p3yje4.js"));
|
|
12535
|
+
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-4gj0mtcg.js"));
|
|
12524
12536
|
await sendStatusNotification(ctx.client, sessionId, message, {
|
|
12525
12537
|
toastDurationMs: 15000
|
|
12526
12538
|
});
|
|
@@ -6,9 +6,10 @@ import {
|
|
|
6
6
|
getLoggerDiagnostics2,
|
|
7
7
|
flushLogger2,
|
|
8
8
|
getLogFilePath2
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-jrfre9ah.js";
|
|
10
10
|
import"./index-g2q4htwp.js";
|
|
11
11
|
import"./index-pavzsdc6.js";
|
|
12
|
+
import"./index-z4p0ry94.js";
|
|
12
13
|
export {
|
|
13
14
|
flushLogger2 as flushLogger,
|
|
14
15
|
getLogFilePath2 as getLogFilePath,
|