@cortexkit/opencode-magic-context 0.49.93 → 0.49.96
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/{announcement-4ynkaf0d.js → announcement-8nj2jd87.js} +5 -5
- package/dist/auto-search-worker.js +5 -5
- package/dist/chunk-embedding-write-worker.js +16 -16
- package/dist/{compaction-marker-candidates-1ndjqh9k.js → compaction-marker-candidates-a4b0anvv.js} +3 -3
- package/dist/compaction-marker-candidates-worker.js +1 -1
- package/dist/{compartment-chunk-embedding-rp4asvk0.js → compartment-chunk-embedding-re2cw7y3.js} +8 -8
- package/dist/config/removed-agent-config.d.ts +1 -1
- package/dist/config/removed-agent-config.d.ts.map +1 -1
- package/dist/config/schema/magic-context.d.ts +0 -75
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/{conflict-warning-hook-exf96bpt.js → conflict-warning-hook-wcq55y61.js} +8 -8
- package/dist/{context-jpxthqxg.js → context-gtjdrp8f.js} +237 -140
- package/dist/{derive-budgets-hzzq71rm.js → derive-budgets-g1sy72e8.js} +5 -5
- package/dist/embedding-backfill-pdymqbnh.js +29 -0
- package/dist/embedding-worker-process.js +2 -2
- package/dist/embedding-worker.js +8 -8
- package/dist/features/magic-context/compartment-storage.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/docs-proposals.d.ts +5 -2
- package/dist/features/magic-context/dreamer/docs-proposals.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/token-budget.d.ts +2 -2
- package/dist/features/magic-context/dreamer/token-budget.d.ts.map +1 -1
- package/dist/features/magic-context/history-gap-recovery.d.ts +42 -0
- package/dist/features/magic-context/history-gap-recovery.d.ts.map +1 -0
- package/dist/features/magic-context/memory/embedding-synapse.d.ts +18 -5
- package/dist/features/magic-context/memory/embedding-synapse.d.ts.map +1 -1
- package/dist/features/magic-context/message-visibility.d.ts +10 -0
- package/dist/features/magic-context/message-visibility.d.ts.map +1 -0
- package/dist/features/magic-context/search-rerank.d.ts +2 -2
- 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/session-decision-calibration.d.ts.map +1 -1
- package/dist/features/magic-context/session-project-backfill.d.ts.map +1 -1
- package/dist/features/magic-context/store-generation-rebase.d.ts.map +1 -1
- package/dist/{history-owner-xqfsvf9k.js → history-owner-74826t4n.js} +3 -3
- package/dist/hooks/magic-context/compartment-runner-recomp.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/history-boundary-repair.d.ts +2 -2
- package/dist/hooks/magic-context/history-boundary-repair.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts +6 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-persist.d.ts +3 -1
- package/dist/hooks/magic-context/lkg-persist.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts +1 -0
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-replay.d.ts +3 -0
- package/dist/hooks/magic-context/lkg-replay.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/tail-hygiene-output-count.d.ts +4 -0
- package/dist/hooks/magic-context/tail-hygiene-output-count.d.ts.map +1 -1
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts +2 -0
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts +2 -1
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +1 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-stage-logger.d.ts +6 -0
- package/dist/hooks/magic-context/transform-stage-logger.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +2 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-5zrzg8r1.js → index-0bjj9yf3.js} +2 -2
- package/dist/{index-g9qtxv87.js → index-0sqhg9nf.js} +132 -64
- package/dist/{index-nxxzeq4y.js → index-0ve29s6f.js} +1 -1
- package/dist/{index-g6y2wk32.js → index-2afrmgy3.js} +6 -6
- package/dist/{index-ywrz4wy2.js → index-3fhb0j32.js} +1 -1
- package/dist/{index-gqf8r04r.js → index-3n4j5rqc.js} +1 -1
- package/dist/{index-xsqw8kbd.js → index-45qgkg8j.js} +2 -2
- package/dist/{index-5df2fw5b.js → index-6mryx739.js} +1 -1
- package/dist/{index-n9kd68vc.js → index-7m2tnk8q.js} +10 -10
- package/dist/{index-r4y0dczp.js → index-7sdns2ww.js} +2 -2
- package/dist/{index-mjy2k9jr.js → index-880a24vd.js} +1 -1
- package/dist/{index-pnawfv4e.js → index-89bkkgcn.js} +4 -4
- package/dist/{index-s32f8y67.js → index-89xg64wb.js} +2 -2
- package/dist/{index-hee64h6k.js → index-8sgv96kq.js} +7 -7
- package/dist/{index-ttdk2w0z.js → index-910gahfb.js} +6 -6
- package/dist/{index-kty5k23y.js → index-9jvxq5rt.js} +4 -4
- package/dist/{index-832w615x.js → index-azkfw78y.js} +1 -1
- package/dist/{index-wh9fxds5.js → index-c205x7xd.js} +1 -1
- package/dist/{index-mg9s2rc3.js → index-cpbr0xvk.js} +2 -2
- package/dist/{index-g5c67kay.js → index-cq8znmyw.js} +17 -17
- package/dist/{index-cr483vx6.js → index-dj64gzg5.js} +2 -2
- package/dist/{index-jba6ny4m.js → index-dnpcv1rg.js} +4 -4
- package/dist/{index-z4p0ry94.js → index-dt7cyqfe.js} +2 -1
- package/dist/{index-j2w79s9r.js → index-e6ay1gez.js} +2 -2
- package/dist/{index-y2vshk67.js → index-f154w8m4.js} +229 -84
- package/dist/{index-6r99v53h.js → index-fgw241hh.js} +164 -62
- package/dist/{index-rz47hf2m.js → index-fvfnq8n6.js} +30 -14
- package/dist/{index-yqha238s.js → index-gnrwgvn7.js} +127 -17
- package/dist/{index-fpjnjxyx.js → index-h7kta6cn.js} +3 -3
- package/dist/{index-q7q6qp1f.js → index-hedgz8an.js} +1 -1
- package/dist/{index-5pgyqgmx.js → index-hj78hvhm.js} +2 -2
- package/dist/{index-dr6bd4c8.js → index-hp46xe93.js} +7 -7
- package/dist/{index-0twg41mh.js → index-j4dcjb8t.js} +4 -4
- package/dist/{index-e6ncz7a6.js → index-jzrvdqb8.js} +1 -1
- package/dist/{index-sp5pvs95.js → index-k34hc455.js} +2 -2
- package/dist/{index-9ffntwyr.js → index-kj4bprep.js} +4 -4
- package/dist/index-mgy7g740.js +119 -0
- package/dist/{index-za1yx1m4.js → index-nqdwpdje.js} +154 -32
- package/dist/{index-hes3k87g.js → index-r1d45dsr.js} +4 -4
- package/dist/{index-y915t3ey.js → index-r3f85n7y.js} +5 -1
- package/dist/{index-1kem0xxx.js → index-t2e10rag.js} +5 -5
- package/dist/{index-m0pwswv9.js → index-tqtpgnhr.js} +1 -1
- package/dist/{index-01h7tqe3.js → index-tr4ep2ej.js} +21 -6
- package/dist/{index-xr1t0fxb.js → index-w7n7qkpf.js} +49 -13
- package/dist/{index-s7460efs.js → index-zfx7mtqa.js} +1 -1
- package/dist/{index-gqfy38m9.js → index-zkjx8gq3.js} +11 -11
- package/dist/{index-et39x9k3.js → index-zmgp0tr6.js} +3 -3
- package/dist/index.js +59 -56
- package/dist/{logger-d7c8akh9.js → logger-nmb2508f.js} +2 -2
- package/dist/{message-fts-rowid-map-0xx8ge09.js → message-fts-rowid-map-vcatdan0.js} +5 -5
- package/dist/{message-index-bounded-vjrnptar.js → message-index-bounded-abhwe610.js} +12 -12
- package/dist/{message-time-backfill-pz5981mf.js → message-time-backfill-zc5rsvhv.js} +3 -3
- package/dist/migration-worker.js +13 -13
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/{project-embedding-registry-m8zcmrsg.js → project-embedding-registry-e566q4bg.js} +15 -15
- package/dist/raw-ordinal-warmup-worker.js +9 -9
- package/dist/{read-session-chunk-zkzdc0e5.js → read-session-chunk-sde0wym3.js} +10 -10
- package/dist/{read-session-raw-3sc9231y.js → read-session-raw-trhdgc9z.js} +3 -3
- package/dist/recomp-orchestrator-d3rbpa59.js +69 -0
- package/dist/render-6cf1dgc4.js +43 -0
- package/dist/{safe-notification-target-d21swr3n.js → safe-notification-target-54ns7dv9.js} +3 -3
- package/dist/{search-e9bb9hpx.js → search-11aw8wpq.js} +27 -27
- package/dist/search-archive-s9m5szf0.js +29 -0
- package/dist/{send-session-notification-0779tyd9.js → send-session-notification-gxrj4w1r.js} +6 -6
- package/dist/shared/host-sqlite-runtime.d.ts +3 -0
- package/dist/shared/host-sqlite-runtime.d.ts.map +1 -0
- package/dist/shared/redaction.d.ts.map +1 -1
- package/dist/shared/storage-file-mutex.d.ts.map +1 -1
- package/dist/{storage-tags-gk7gjkqt.js → storage-tags-jq0c0zsn.js} +7 -7
- package/dist/{store-yr443ye8.js → store-29ksp6vy.js} +4 -4
- package/dist/{store-reader-qbq6q4v0.js → store-reader-dgh3ssxx.js} +1 -1
- package/dist/tools/ctx-expand/search-archive.d.ts +3 -2
- package/dist/tools/ctx-expand/search-archive.d.ts.map +1 -1
- package/dist/tools/ctx-expand/tools.d.ts.map +1 -1
- package/dist/tools/ctx-expand/v2-archive-reader.d.ts +2 -0
- package/dist/tools/ctx-expand/v2-archive-reader.d.ts.map +1 -1
- package/dist/tools/ctx-search/tools.d.ts.map +1 -1
- package/dist/{transform-postprocess-phase-neds90e3.js → transform-postprocess-phase-376xn40x.js} +35 -35
- package/dist/v2/auto-search-worker.js +5 -5
- package/dist/v2/chunk-embedding-write-worker.js +16 -16
- package/dist/v2/{compaction-marker-candidates-bp1bn579.js → compaction-marker-candidates-6nypmsr3.js} +3 -3
- package/dist/v2/compaction-marker-candidates-worker.js +1 -1
- package/dist/v2/{compartment-chunk-embedding-w7ht0t9v.js → compartment-chunk-embedding-jthtfhcd.js} +8 -8
- package/dist/v2/{context-ctsd80vc.js → context-vm09agrs.js} +426 -185
- package/dist/v2/{derive-budgets-hr4qqrnv.js → derive-budgets-wj0q7s7d.js} +6 -6
- package/dist/v2/embedding-backfill-16b16m38.js +29 -0
- package/dist/v2/embedding-worker-process.js +2 -2
- package/dist/v2/embedding-worker.js +8 -8
- package/dist/v2/fold/memory-cache.d.ts +2 -0
- package/dist/v2/fold/memory-cache.d.ts.map +1 -1
- package/dist/v2/fold/native-replay.d.ts +23 -5
- package/dist/v2/fold/native-replay.d.ts.map +1 -1
- package/dist/v2/hidden-child-native.d.ts.map +1 -1
- package/dist/v2/hidden-child-record.d.ts +8 -0
- package/dist/v2/hidden-child-record.d.ts.map +1 -1
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/hidden-run-holder.d.ts +8 -2
- package/dist/v2/hidden-run-holder.d.ts.map +1 -1
- package/dist/v2/{history-owner-260djmv5.js → history-owner-8pd5ax3n.js} +3 -3
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/hidden-child.d.ts +3 -0
- package/dist/v2/hooks/hidden-child.d.ts.map +1 -1
- package/dist/v2/hooks/revert-message-state.d.ts.map +1 -1
- package/dist/v2/hooks/session-project-backfill.d.ts +2 -1
- package/dist/v2/hooks/session-project-backfill.d.ts.map +1 -1
- package/dist/v2/{logger-zyf43np1.js → logger-58jfese9.js} +2 -2
- package/dist/v2/{message-fts-rowid-map-n8mcvcpz.js → message-fts-rowid-map-ax4vk78j.js} +5 -5
- package/dist/v2/{message-index-bounded-1vew9c37.js → message-index-bounded-qh794qxx.js} +12 -12
- package/dist/v2/{message-time-backfill-ynb3vg6r.js → message-time-backfill-yj773saf.js} +3 -3
- package/dist/v2/migration-worker.js +13 -13
- package/dist/v2/{project-embedding-registry-je5jam7y.js → project-embedding-registry-z05xvckg.js} +15 -15
- package/dist/v2/raw-ordinal-warmup-worker.js +9 -9
- package/dist/v2/{read-session-chunk-09sre4xv.js → read-session-chunk-8tn2dbn1.js} +10 -10
- package/dist/v2/{read-session-raw-wg5zc29f.js → read-session-raw-ywebck9q.js} +3 -3
- package/dist/v2/recomp-orchestrator-pfjpzdrb.js +69 -0
- package/dist/v2/render-7t5d7hkv.js +43 -0
- package/dist/v2/{safe-notification-target-y55z2zat.js → safe-notification-target-zrwbh6k7.js} +3 -3
- package/dist/v2/{search-gmye6n25.js → search-35cz80x0.js} +26 -26
- package/dist/v2/search-archive-5dpxv0ck.js +29 -0
- package/dist/v2/{send-session-notification-v69y04f5.js → send-session-notification-8x146x5y.js} +6 -6
- package/dist/v2/{server-z9czv2vb.js → server-11ra1pmx.js} +49 -13
- package/dist/v2/{server-gs2251jr.js → server-2cq3e1c1.js} +4 -4
- package/dist/v2/{server-39bcszk4.js → server-2qvnr3t7.js} +1 -1
- package/dist/v2/{server-jkj1dq6j.js → server-2sare4qg.js} +4 -4
- package/dist/v2/{server-jdfe07mp.js → server-2wz6y46g.js} +1 -1
- package/dist/v2/{server-at0v0z4t.js → server-379fd3n7.js} +1 -1
- package/dist/v2/{server-ds8vpfkr.js → server-40vdz8sf.js} +2 -2
- package/dist/v2/{server-qntmqaca.js → server-4yrvbnnm.js} +2 -2
- package/dist/v2/{server-x69fqsvz.js → server-5t4nzfpt.js} +1 -1
- package/dist/v2/{server-npdey91q.js → server-63ree5ns.js} +1 -1
- package/dist/v2/{server-gqkdfdvw.js → server-6qax5pds.js} +2 -2
- package/dist/v2/{server-qb3s0mnc.js → server-73bqw5c0.js} +1 -1
- package/dist/v2/{server-6chcnnhq.js → server-7h4gwphm.js} +4 -4
- package/dist/v2/{server-rkj44mez.js → server-7tj8yzrv.js} +2 -2
- package/dist/v2/{server-e6xneh68.js → server-arfzfxe8.js} +5 -1
- package/dist/v2/{server-6ash6z8z.js → server-av3p9c8k.js} +1 -1
- package/dist/v2/{server-5hwf5c7r.js → server-bx5k66qc.js} +1 -1
- package/dist/v2/{server-dgsjamm4.js → server-db91dxwc.js} +7 -7
- package/dist/v2/{server-z4p0ry94.js → server-dt7cyqfe.js} +2 -1
- package/dist/v2/{server-k1xc2bw1.js → server-ganavh75.js} +2 -2
- package/dist/v2/{server-6x40bnb7.js → server-gh2w75fn.js} +3 -3
- package/dist/v2/server-j1gxs1gj.js +119 -0
- package/dist/v2/{server-ps6zrzwj.js → server-k3ntgf6n.js} +164 -62
- package/dist/v2/{server-j8376q08.js → server-kzrrdjp5.js} +1 -1
- package/dist/v2/{server-1rrmxhd1.js → server-n33hyq9t.js} +2 -2
- package/dist/v2/{server-0tv6kytx.js → server-n34vzyfm.js} +1 -1
- package/dist/v2/{server-vc5fta6s.js → server-nnh81jqy.js} +6 -6
- package/dist/v2/{server-g53asaqt.js → server-pcq2d1wh.js} +30 -14
- package/dist/v2/{server-bnkc9kph.js → server-ppy2dj7g.js} +6 -6
- package/dist/v2/{server-96nm9vk4.js → server-rr5c0xcg.js} +2 -2
- package/dist/v2/{server-j4jjtdc5.js → server-rt8t6s2a.js} +2 -2
- package/dist/v2/{server-2xm0gxke.js → server-svccj9rd.js} +4 -4
- package/dist/v2/{server-5sbsnpkn.js → server-tq523gj6.js} +1 -1
- package/dist/v2/{server-00adcfjd.js → server-vj0xbbrc.js} +17 -3
- package/dist/v2/{server-4ecpanyn.js → server-vntc961c.js} +127 -17
- package/dist/v2/{server-btgnkr9z.js → server-vsx9tsks.js} +11 -11
- package/dist/v2/{server-vtgeyhq6.js → server-vtkbxzw1.js} +21 -6
- package/dist/v2/{server-cvp9w5gs.js → server-w35ep6wn.js} +192 -84
- package/dist/v2/{server-myp4pc6x.js → server-z2nv8jdv.js} +132 -64
- package/dist/v2/{server-pcarsvj2.js → server-z5cv5wm5.js} +10 -10
- package/dist/v2/{server-barj0mjz.js → server-zemnpv92.js} +4 -4
- package/dist/v2/server.js +9 -9
- package/dist/v2/{storage-tags-nccqr0kr.js → storage-tags-pcenytad.js} +7 -7
- package/dist/v2/{store-enef5jcn.js → store-gx19qc3a.js} +4 -4
- package/dist/v2/{store-reader-jbaqv1yp.js → store-reader-qt2msa8z.js} +1 -1
- package/dist/v2/store-reader.d.ts +1 -1
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/{v2-archive-reader-7vmng8q7.js → v2-archive-reader-jqrwz7b8.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-7r4y0bf6.js → wrapup-orchestrator-kcq3cv7y.js} +35 -35
- package/dist/{v2-archive-reader-7s90gfax.js → v2-archive-reader-64h2gtam.js} +1 -1
- package/dist/wrapup-orchestrator-knyac7jp.js +56 -0
- package/package.json +1 -1
- package/src/config/index.test.ts +23 -5
- package/src/config/live-run-config.test.ts +7 -7
- package/src/config/removed-agent-config.ts +14 -1
- package/src/config/schema/magic-context.ts +5 -1
- package/src/shared/host-sqlite-runtime.test.ts +21 -0
- package/src/shared/host-sqlite-runtime.ts +32 -0
- package/src/shared/redaction.test.ts +11 -8
- package/src/shared/redaction.ts +5 -1
- package/src/shared/storage-file-mutex-review.test.ts +110 -0
- package/src/shared/storage-file-mutex.ts +12 -0
- package/dist/embedding-backfill-6wzc4p2n.js +0 -29
- package/dist/index-52x68mj4.js +0 -58
- package/dist/recomp-orchestrator-qb2hymj5.js +0 -69
- package/dist/render-34p0kek8.js +0 -43
- package/dist/search-archive-08ppk0q5.js +0 -27
- package/dist/v2/embedding-backfill-40g0anxh.js +0 -29
- package/dist/v2/recomp-orchestrator-mgcty3we.js +0 -69
- package/dist/v2/render-ygcmyn9x.js +0 -43
- package/dist/v2/search-archive-nrsqqmk5.js +0 -27
- package/dist/v2/server-52x68mj4.js +0 -58
- package/dist/wrapup-orchestrator-m2p89973.js +0 -56
|
@@ -2,6 +2,7 @@ import { expect, spyOn, test } from "bun:test";
|
|
|
2
2
|
import * as fs from "node:fs";
|
|
3
3
|
import { existsSync, readdirSync, readFileSync, rmdirSync, rmSync, writeFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
+
import * as logger from "./logger";
|
|
5
6
|
import { __resetRpcIdentityTestHooks, __setRpcIdentityTestHooks } from "./rpc-utils";
|
|
6
7
|
import { withStorageFileMutex } from "./storage-file-mutex";
|
|
7
8
|
import * as permissions from "./storage-permissions";
|
|
@@ -301,3 +302,112 @@ test.skipIf(process.platform === "win32")(
|
|
|
301
302
|
},
|
|
302
303
|
15000,
|
|
303
304
|
);
|
|
305
|
+
|
|
306
|
+
/** Create the ticket file the way a real open would, then fail before any byte is written. */
|
|
307
|
+
function failTicketWriteAfterCreate() {
|
|
308
|
+
return spyOn(permissions, "writeStorageFileSync").mockImplementationOnce((path) => {
|
|
309
|
+
fs.closeSync(fs.openSync(path as string, "wx", 0o600));
|
|
310
|
+
throw Object.assign(new Error("injected ticket write failure"), { code: "ENOSPC" });
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
async function acquireInChild(directory: string, root: string) {
|
|
315
|
+
const script = `
|
|
316
|
+
import { withStorageFileMutex } from ${JSON.stringify(mutex)};
|
|
317
|
+
withStorageFileMutex(${JSON.stringify(directory)}, () => console.log('ACQUIRED'), 200);`;
|
|
318
|
+
const child = Bun.spawn([process.execPath, "--eval", script], {
|
|
319
|
+
env: {
|
|
320
|
+
...process.env,
|
|
321
|
+
XDG_DATA_HOME: root,
|
|
322
|
+
XDG_CONFIG_HOME: root,
|
|
323
|
+
MAGIC_CONTEXT_STORAGE_DIR: root,
|
|
324
|
+
MAGIC_CONTEXT_TEST_DATA_DIR: root,
|
|
325
|
+
},
|
|
326
|
+
stdout: "pipe",
|
|
327
|
+
stderr: "pipe",
|
|
328
|
+
windowsHide: true,
|
|
329
|
+
});
|
|
330
|
+
const [exit, stdout, stderr] = await Promise.all([
|
|
331
|
+
child.exited,
|
|
332
|
+
new Response(child.stdout).text(),
|
|
333
|
+
new Response(child.stderr).text(),
|
|
334
|
+
]);
|
|
335
|
+
return { exit, stdout, stderr };
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
test("a ticket whose write fails after creation is removed, so later acquisitions proceed", async () => {
|
|
339
|
+
const { dir: root, cleanup } = createTestTempDir("mc-mutex-failed-write-");
|
|
340
|
+
const directory = join(root, "locks");
|
|
341
|
+
const writer = failTicketWriteAfterCreate();
|
|
342
|
+
try {
|
|
343
|
+
// The caller sees the write failure itself, not a cleanup or lock error.
|
|
344
|
+
expect(() => withStorageFileMutex(directory, () => "unreached")).toThrow(
|
|
345
|
+
"injected ticket write failure",
|
|
346
|
+
);
|
|
347
|
+
expect(existsSync(directory) ? readdirSync(directory) : []).toEqual([]);
|
|
348
|
+
// This process stays alive, so a ticket left behind would make both of these
|
|
349
|
+
// refuse when their short budgets run out.
|
|
350
|
+
expect(withStorageFileMutex(directory, () => "same process", 200)).toBe("same process");
|
|
351
|
+
const second = await acquireInChild(directory, root);
|
|
352
|
+
expect(second.stdout, second.stderr).toContain("ACQUIRED");
|
|
353
|
+
expect(second.exit).toBe(0);
|
|
354
|
+
} finally {
|
|
355
|
+
writer.mockRestore();
|
|
356
|
+
cleanup();
|
|
357
|
+
}
|
|
358
|
+
}, 15000);
|
|
359
|
+
|
|
360
|
+
test("a failed ticket write leaves another contender's ticket in place", () => {
|
|
361
|
+
const { dir: root, cleanup } = createTestTempDir("mc-mutex-failed-write-peer-");
|
|
362
|
+
const directory = join(root, "locks");
|
|
363
|
+
// A live contender (this process) that is still choosing its number.
|
|
364
|
+
const peer = join(directory, `${process.pid}-00000000-0000-0000-0000-000000000000.lock`);
|
|
365
|
+
fs.mkdirSync(directory, { mode: 0o700 });
|
|
366
|
+
writeFileSync(peer, "choosing", { mode: 0o600 });
|
|
367
|
+
const writer = failTicketWriteAfterCreate();
|
|
368
|
+
try {
|
|
369
|
+
expect(() => withStorageFileMutex(directory, () => "unreached")).toThrow(
|
|
370
|
+
"injected ticket write failure",
|
|
371
|
+
);
|
|
372
|
+
expect(readdirSync(directory)).toEqual([peer.slice(directory.length + 1)]);
|
|
373
|
+
expect(readFileSync(peer, "utf8")).toBe("choosing");
|
|
374
|
+
} finally {
|
|
375
|
+
writer.mockRestore();
|
|
376
|
+
cleanup();
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
|
|
380
|
+
test("when the unwritten ticket cannot be removed, the write error wins and the path is logged", () => {
|
|
381
|
+
const { dir: root, cleanup } = createTestTempDir("mc-mutex-failed-write-cleanup-");
|
|
382
|
+
const directory = join(root, "locks");
|
|
383
|
+
const writer = failTicketWriteAfterCreate();
|
|
384
|
+
const rm = fs.rmSync;
|
|
385
|
+
let refusedPath: string | undefined;
|
|
386
|
+
const remover = spyOn(fs, "rmSync").mockImplementation((...args) => {
|
|
387
|
+
if (refusedPath === undefined && String(args[0]).endsWith(".lock")) {
|
|
388
|
+
refusedPath = String(args[0]);
|
|
389
|
+
throw Object.assign(new Error("injected removal failure"), { code: "EACCES" });
|
|
390
|
+
}
|
|
391
|
+
return rm(...args);
|
|
392
|
+
});
|
|
393
|
+
const logged = spyOn(logger, "log");
|
|
394
|
+
try {
|
|
395
|
+
expect(() => withStorageFileMutex(directory, () => "unreached")).toThrow(
|
|
396
|
+
"injected ticket write failure",
|
|
397
|
+
);
|
|
398
|
+
expect(refusedPath).toBeString();
|
|
399
|
+
const lines = logged.mock.calls.map((call) => String(call[0]));
|
|
400
|
+
expect(lines.filter((line) => line.includes(refusedPath!))).toHaveLength(1);
|
|
401
|
+
remover.mockRestore();
|
|
402
|
+
// The empty ticket still has a live owner, so a later acquisition waits for
|
|
403
|
+
// it and refuses within its budget.
|
|
404
|
+
expect(() => withStorageFileMutex(directory, () => "blocked", 100)).toThrow(
|
|
405
|
+
"Storage safety publication lock is unavailable",
|
|
406
|
+
);
|
|
407
|
+
} finally {
|
|
408
|
+
logged.mockRestore();
|
|
409
|
+
remover.mockRestore();
|
|
410
|
+
writer.mockRestore();
|
|
411
|
+
cleanup();
|
|
412
|
+
}
|
|
413
|
+
});
|
|
@@ -2,6 +2,7 @@ import { execFileSync } from "node:child_process";
|
|
|
2
2
|
import { createHash, randomUUID } from "node:crypto";
|
|
3
3
|
import { readdirSync, readFileSync, rmdirSync, rmSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
|
+
import { log } from "./logger";
|
|
5
6
|
import { isPidAlive, readProcessStartTime } from "./rpc-utils";
|
|
6
7
|
import {
|
|
7
8
|
ensurePrivateStorageDirectorySync,
|
|
@@ -74,6 +75,17 @@ export function withStorageFileMutex<T>(directory: string, work: () => T, timeou
|
|
|
74
75
|
writeStorageFileSync(ownPath, encodedTicket(), { flag: "wx", forcePrivate: true });
|
|
75
76
|
break;
|
|
76
77
|
} catch (error) {
|
|
78
|
+
// The write can fail after it created the file. Only this call uses this name,
|
|
79
|
+
// so remove that empty ticket: its live owner would otherwise block every
|
|
80
|
+
// contender for this directory until the process exits. If the removal fails,
|
|
81
|
+
// the caller still sees the write error.
|
|
82
|
+
try {
|
|
83
|
+
rmSync(ownPath, { force: true });
|
|
84
|
+
} catch (cleanupError) {
|
|
85
|
+
log(
|
|
86
|
+
`[magic-context] storage mutex could not remove its unwritten ticket ${ownPath}: ${String(cleanupError)}`,
|
|
87
|
+
);
|
|
88
|
+
}
|
|
77
89
|
// A peer can remove the empty directory before this process writes its ticket.
|
|
78
90
|
// On macOS, this race can also give EEXIST from mkdir or EINVAL from open.
|
|
79
91
|
const code = (error as NodeJS.ErrnoException).code;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ensureMemoryEmbeddings2
|
|
3
|
-
} from "./index-5zrzg8r1.js";
|
|
4
|
-
import"./index-n9kd68vc.js";
|
|
5
|
-
import"./index-qjwpqvnf.js";
|
|
6
|
-
import"./index-2amn2s73.js";
|
|
7
|
-
import"./index-qt1qqasc.js";
|
|
8
|
-
import"./index-hes3k87g.js";
|
|
9
|
-
import"./index-y915t3ey.js";
|
|
10
|
-
import"./index-r4y0dczp.js";
|
|
11
|
-
import"./index-0twg41mh.js";
|
|
12
|
-
import"./index-6r99v53h.js";
|
|
13
|
-
import"./index-5pgyqgmx.js";
|
|
14
|
-
import"./index-s32f8y67.js";
|
|
15
|
-
import"./index-q7q6qp1f.js";
|
|
16
|
-
import"./index-96ztjvkn.js";
|
|
17
|
-
import"./index-v0p37hm2.js";
|
|
18
|
-
import"./index-m0pwswv9.js";
|
|
19
|
-
import"./index-5df2fw5b.js";
|
|
20
|
-
import"./index-gqf8r04r.js";
|
|
21
|
-
import"./index-s7460efs.js";
|
|
22
|
-
import"./index-gzy5w8ya.js";
|
|
23
|
-
import"./index-ywrz4wy2.js";
|
|
24
|
-
import"./index-pavzsdc6.js";
|
|
25
|
-
import"./index-z4p0ry94.js";
|
|
26
|
-
import"./index-1d042x6w.js";
|
|
27
|
-
export {
|
|
28
|
-
ensureMemoryEmbeddings2 as ensureMemoryEmbeddings
|
|
29
|
-
};
|
package/dist/index-52x68mj4.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// src/features/magic-context/message-fts-session-filter.ts
|
|
2
|
-
var MESSAGE_FTS_SESSION_FILTER_SQL = `+message_history_fts.rowid IN (
|
|
3
|
-
SELECT fts_rowid FROM message_fts_rowid_map WHERE session_id = ?
|
|
4
|
-
) AND `;
|
|
5
|
-
var coverageCaches = new WeakMap;
|
|
6
|
-
var coverageScansOnThisThread = 0;
|
|
7
|
-
function getCoverageCache(db) {
|
|
8
|
-
let cache = coverageCaches.get(db);
|
|
9
|
-
if (!cache) {
|
|
10
|
-
cache = {
|
|
11
|
-
pin: db.prepare("SELECT fts_rowid FROM message_fts_rowid_map LIMIT 1"),
|
|
12
|
-
stamp: db.prepare("SELECT total_changes() AS changes, data_version AS version FROM pragma_data_version"),
|
|
13
|
-
missing: db.prepare(`SELECT DISTINCT session_id AS sessionId
|
|
14
|
-
FROM message_history_fts WHERE rowid IN (
|
|
15
|
-
SELECT id FROM message_history_fts_docsize
|
|
16
|
-
EXCEPT SELECT fts_rowid FROM message_fts_rowid_map
|
|
17
|
-
)`)
|
|
18
|
-
};
|
|
19
|
-
coverageCaches.set(db, cache);
|
|
20
|
-
}
|
|
21
|
-
return cache;
|
|
22
|
-
}
|
|
23
|
-
function withMessageFtsSessionFilter(db, sessionId, read) {
|
|
24
|
-
let cacheable = false;
|
|
25
|
-
try {
|
|
26
|
-
const transaction = db;
|
|
27
|
-
cacheable = transaction.inTransaction === false || transaction.isTransaction === false;
|
|
28
|
-
if (!cacheable)
|
|
29
|
-
coverageCaches.delete(db);
|
|
30
|
-
} catch {
|
|
31
|
-
coverageCaches.delete(db);
|
|
32
|
-
}
|
|
33
|
-
return db.transaction(() => {
|
|
34
|
-
let sessionFirst = false;
|
|
35
|
-
try {
|
|
36
|
-
const cache = getCoverageCache(db);
|
|
37
|
-
cache.pin.get();
|
|
38
|
-
const stamp = cache.stamp.get();
|
|
39
|
-
let incomplete = cache.incompleteSessions;
|
|
40
|
-
if (!cacheable || !incomplete || cache.version !== stamp.version || cache.changes !== stamp.changes) {
|
|
41
|
-
coverageScansOnThisThread += 1;
|
|
42
|
-
const rows = cache.missing.all();
|
|
43
|
-
incomplete = new Set(rows.map((row) => row.sessionId));
|
|
44
|
-
if (cacheable) {
|
|
45
|
-
cache.version = stamp.version;
|
|
46
|
-
cache.changes = stamp.changes;
|
|
47
|
-
cache.incompleteSessions = incomplete;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
sessionFirst = !incomplete.has(sessionId);
|
|
51
|
-
} catch {
|
|
52
|
-
coverageCaches.delete(db);
|
|
53
|
-
}
|
|
54
|
-
return read(sessionFirst);
|
|
55
|
-
}).deferred();
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export { MESSAGE_FTS_SESSION_FILTER_SQL, withMessageFtsSessionFilter };
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isRecompFailure2,
|
|
3
|
-
isRecompSkip2,
|
|
4
|
-
extractRecompReason2,
|
|
5
|
-
setRecompStarting2,
|
|
6
|
-
setRecompNote2,
|
|
7
|
-
setRecompTerminal2,
|
|
8
|
-
buildRecompDeps2,
|
|
9
|
-
runManagedRecomp2
|
|
10
|
-
} from "./index-1kem0xxx.js";
|
|
11
|
-
import"./index-za1yx1m4.js";
|
|
12
|
-
import"./index-832w615x.js";
|
|
13
|
-
import"./index-sd3egckz.js";
|
|
14
|
-
import"./index-ttdk2w0z.js";
|
|
15
|
-
import"./index-5zrzg8r1.js";
|
|
16
|
-
import"./index-9emdjcb5.js";
|
|
17
|
-
import"./index-n9kd68vc.js";
|
|
18
|
-
import"./index-qjwpqvnf.js";
|
|
19
|
-
import"./index-yqha238s.js";
|
|
20
|
-
import"./index-mjy2k9jr.js";
|
|
21
|
-
import"./index-pnawfv4e.js";
|
|
22
|
-
import"./index-2amn2s73.js";
|
|
23
|
-
import"./index-01h7tqe3.js";
|
|
24
|
-
import"./index-xsqw8kbd.js";
|
|
25
|
-
import"./index-fqth7850.js";
|
|
26
|
-
import"./index-9ffntwyr.js";
|
|
27
|
-
import"./index-qt1qqasc.js";
|
|
28
|
-
import"./index-dr6bd4c8.js";
|
|
29
|
-
import"./index-xr1t0fxb.js";
|
|
30
|
-
import"./index-1zx87sdm.js";
|
|
31
|
-
import"./index-sp5pvs95.js";
|
|
32
|
-
import"./index-y14pawe1.js";
|
|
33
|
-
import"./index-e6ncz7a6.js";
|
|
34
|
-
import"./index-hes3k87g.js";
|
|
35
|
-
import"./index-y915t3ey.js";
|
|
36
|
-
import"./index-r4y0dczp.js";
|
|
37
|
-
import"./index-0twg41mh.js";
|
|
38
|
-
import"./index-6r99v53h.js";
|
|
39
|
-
import"./index-gqfy38m9.js";
|
|
40
|
-
import"./index-fb3zxn06.js";
|
|
41
|
-
import"./index-jba6ny4m.js";
|
|
42
|
-
import"./index-fr0wbhdn.js";
|
|
43
|
-
import"./index-5pgyqgmx.js";
|
|
44
|
-
import"./index-s32f8y67.js";
|
|
45
|
-
import"./index-wh9fxds5.js";
|
|
46
|
-
import"./index-mg9s2rc3.js";
|
|
47
|
-
import"./index-q7q6qp1f.js";
|
|
48
|
-
import"./index-96ztjvkn.js";
|
|
49
|
-
import"./index-v0p37hm2.js";
|
|
50
|
-
import"./index-58e3y90n.js";
|
|
51
|
-
import"./index-m0pwswv9.js";
|
|
52
|
-
import"./index-5df2fw5b.js";
|
|
53
|
-
import"./index-gqf8r04r.js";
|
|
54
|
-
import"./index-s7460efs.js";
|
|
55
|
-
import"./index-gzy5w8ya.js";
|
|
56
|
-
import"./index-ywrz4wy2.js";
|
|
57
|
-
import"./index-pavzsdc6.js";
|
|
58
|
-
import"./index-z4p0ry94.js";
|
|
59
|
-
import"./index-1d042x6w.js";
|
|
60
|
-
export {
|
|
61
|
-
buildRecompDeps2 as buildRecompDeps,
|
|
62
|
-
extractRecompReason2 as extractRecompReason,
|
|
63
|
-
isRecompFailure2 as isRecompFailure,
|
|
64
|
-
isRecompSkip2 as isRecompSkip,
|
|
65
|
-
runManagedRecomp2 as runManagedRecomp,
|
|
66
|
-
setRecompNote2 as setRecompNote,
|
|
67
|
-
setRecompStarting2 as setRecompStarting,
|
|
68
|
-
setRecompTerminal2 as setRecompTerminal
|
|
69
|
-
};
|
package/dist/render-34p0kek8.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
renderMessageByOrdinal2,
|
|
3
|
-
renderVerboseRangeForTool2,
|
|
4
|
-
renderItemByTag2
|
|
5
|
-
} from "./index-fpjnjxyx.js";
|
|
6
|
-
import"./index-yqha238s.js";
|
|
7
|
-
import"./index-mjy2k9jr.js";
|
|
8
|
-
import"./index-pnawfv4e.js";
|
|
9
|
-
import"./index-2amn2s73.js";
|
|
10
|
-
import"./index-01h7tqe3.js";
|
|
11
|
-
import"./index-dr6bd4c8.js";
|
|
12
|
-
import"./index-xr1t0fxb.js";
|
|
13
|
-
import"./index-1zx87sdm.js";
|
|
14
|
-
import"./index-sp5pvs95.js";
|
|
15
|
-
import"./index-y915t3ey.js";
|
|
16
|
-
import"./index-0twg41mh.js";
|
|
17
|
-
import"./index-6r99v53h.js";
|
|
18
|
-
import"./index-gqfy38m9.js";
|
|
19
|
-
import"./index-fb3zxn06.js";
|
|
20
|
-
import"./index-jba6ny4m.js";
|
|
21
|
-
import"./index-fr0wbhdn.js";
|
|
22
|
-
import"./index-5pgyqgmx.js";
|
|
23
|
-
import"./index-s32f8y67.js";
|
|
24
|
-
import"./index-wh9fxds5.js";
|
|
25
|
-
import"./index-mg9s2rc3.js";
|
|
26
|
-
import"./index-q7q6qp1f.js";
|
|
27
|
-
import"./index-96ztjvkn.js";
|
|
28
|
-
import"./index-v0p37hm2.js";
|
|
29
|
-
import"./index-58e3y90n.js";
|
|
30
|
-
import"./index-m0pwswv9.js";
|
|
31
|
-
import"./index-5df2fw5b.js";
|
|
32
|
-
import"./index-gqf8r04r.js";
|
|
33
|
-
import"./index-s7460efs.js";
|
|
34
|
-
import"./index-gzy5w8ya.js";
|
|
35
|
-
import"./index-ywrz4wy2.js";
|
|
36
|
-
import"./index-pavzsdc6.js";
|
|
37
|
-
import"./index-z4p0ry94.js";
|
|
38
|
-
import"./index-1d042x6w.js";
|
|
39
|
-
export {
|
|
40
|
-
renderItemByTag2 as renderItemByTag,
|
|
41
|
-
renderMessageByOrdinal2 as renderMessageByOrdinal,
|
|
42
|
-
renderVerboseRangeForTool2 as renderVerboseRangeForTool
|
|
43
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
renderSearchArchive2,
|
|
3
|
-
renderSearchArchiveOffThread2
|
|
4
|
-
} from "./index-rz47hf2m.js";
|
|
5
|
-
import"./index-g6y2wk32.js";
|
|
6
|
-
import"./index-52x68mj4.js";
|
|
7
|
-
import"./index-dr6bd4c8.js";
|
|
8
|
-
import"./index-xr1t0fxb.js";
|
|
9
|
-
import"./index-1zx87sdm.js";
|
|
10
|
-
import"./index-sp5pvs95.js";
|
|
11
|
-
import"./index-y915t3ey.js";
|
|
12
|
-
import"./index-mg9s2rc3.js";
|
|
13
|
-
import"./index-q7q6qp1f.js";
|
|
14
|
-
import"./index-96ztjvkn.js";
|
|
15
|
-
import"./index-v0p37hm2.js";
|
|
16
|
-
import"./index-58e3y90n.js";
|
|
17
|
-
import"./index-m0pwswv9.js";
|
|
18
|
-
import"./index-s7460efs.js";
|
|
19
|
-
import"./index-gzy5w8ya.js";
|
|
20
|
-
import"./index-ywrz4wy2.js";
|
|
21
|
-
import"./index-pavzsdc6.js";
|
|
22
|
-
import"./index-z4p0ry94.js";
|
|
23
|
-
import"./index-1d042x6w.js";
|
|
24
|
-
export {
|
|
25
|
-
renderSearchArchive2 as renderSearchArchive,
|
|
26
|
-
renderSearchArchiveOffThread2 as renderSearchArchiveOffThread
|
|
27
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ensureMemoryEmbeddings2
|
|
3
|
-
} from "./server-k1xc2bw1.js";
|
|
4
|
-
import"./server-pcarsvj2.js";
|
|
5
|
-
import"./server-qjwpqvnf.js";
|
|
6
|
-
import"./server-2amn2s73.js";
|
|
7
|
-
import"./server-qt1qqasc.js";
|
|
8
|
-
import"./server-6chcnnhq.js";
|
|
9
|
-
import"./server-e6xneh68.js";
|
|
10
|
-
import"./server-gqkdfdvw.js";
|
|
11
|
-
import"./server-barj0mjz.js";
|
|
12
|
-
import"./server-ps6zrzwj.js";
|
|
13
|
-
import"./server-1rrmxhd1.js";
|
|
14
|
-
import"./server-ds8vpfkr.js";
|
|
15
|
-
import"./server-6ash6z8z.js";
|
|
16
|
-
import"./server-96ztjvkn.js";
|
|
17
|
-
import"./server-v0p37hm2.js";
|
|
18
|
-
import"./server-5sbsnpkn.js";
|
|
19
|
-
import"./server-qb3s0mnc.js";
|
|
20
|
-
import"./server-0tv6kytx.js";
|
|
21
|
-
import"./server-jdfe07mp.js";
|
|
22
|
-
import"./server-gzy5w8ya.js";
|
|
23
|
-
import"./server-j8376q08.js";
|
|
24
|
-
import"./server-pavzsdc6.js";
|
|
25
|
-
import"./server-z4p0ry94.js";
|
|
26
|
-
import"./server-1d042x6w.js";
|
|
27
|
-
export {
|
|
28
|
-
ensureMemoryEmbeddings2 as ensureMemoryEmbeddings
|
|
29
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isRecompFailure2,
|
|
3
|
-
isRecompSkip2,
|
|
4
|
-
extractRecompReason2,
|
|
5
|
-
setRecompStarting2,
|
|
6
|
-
setRecompNote2,
|
|
7
|
-
setRecompTerminal2,
|
|
8
|
-
buildRecompDeps2,
|
|
9
|
-
runManagedRecomp2
|
|
10
|
-
} from "./server-cvp9w5gs.js";
|
|
11
|
-
import"./server-at0v0z4t.js";
|
|
12
|
-
import"./server-vc5fta6s.js";
|
|
13
|
-
import"./server-k1xc2bw1.js";
|
|
14
|
-
import"./server-9emdjcb5.js";
|
|
15
|
-
import"./server-pcarsvj2.js";
|
|
16
|
-
import"./server-qjwpqvnf.js";
|
|
17
|
-
import"./server-4ecpanyn.js";
|
|
18
|
-
import"./server-x69fqsvz.js";
|
|
19
|
-
import"./server-2xm0gxke.js";
|
|
20
|
-
import"./server-2amn2s73.js";
|
|
21
|
-
import"./server-vtgeyhq6.js";
|
|
22
|
-
import"./server-j4jjtdc5.js";
|
|
23
|
-
import"./server-gs2251jr.js";
|
|
24
|
-
import"./server-qt1qqasc.js";
|
|
25
|
-
import"./server-dgsjamm4.js";
|
|
26
|
-
import"./server-z9czv2vb.js";
|
|
27
|
-
import"./server-1zx87sdm.js";
|
|
28
|
-
import"./server-5hwf5c7r.js";
|
|
29
|
-
import"./server-npdey91q.js";
|
|
30
|
-
import"./server-00adcfjd.js";
|
|
31
|
-
import"./server-96nm9vk4.js";
|
|
32
|
-
import"./server-n5wn7d9b.js";
|
|
33
|
-
import"./server-y14pawe1.js";
|
|
34
|
-
import"./server-6chcnnhq.js";
|
|
35
|
-
import"./server-e6xneh68.js";
|
|
36
|
-
import"./server-gqkdfdvw.js";
|
|
37
|
-
import"./server-barj0mjz.js";
|
|
38
|
-
import"./server-ps6zrzwj.js";
|
|
39
|
-
import"./server-btgnkr9z.js";
|
|
40
|
-
import"./server-fb3zxn06.js";
|
|
41
|
-
import"./server-jkj1dq6j.js";
|
|
42
|
-
import"./server-fr0wbhdn.js";
|
|
43
|
-
import"./server-1rrmxhd1.js";
|
|
44
|
-
import"./server-ds8vpfkr.js";
|
|
45
|
-
import"./server-39bcszk4.js";
|
|
46
|
-
import"./server-qntmqaca.js";
|
|
47
|
-
import"./server-6ash6z8z.js";
|
|
48
|
-
import"./server-96ztjvkn.js";
|
|
49
|
-
import"./server-v0p37hm2.js";
|
|
50
|
-
import"./server-2ra6pwf3.js";
|
|
51
|
-
import"./server-5sbsnpkn.js";
|
|
52
|
-
import"./server-qb3s0mnc.js";
|
|
53
|
-
import"./server-0tv6kytx.js";
|
|
54
|
-
import"./server-jdfe07mp.js";
|
|
55
|
-
import"./server-gzy5w8ya.js";
|
|
56
|
-
import"./server-j8376q08.js";
|
|
57
|
-
import"./server-pavzsdc6.js";
|
|
58
|
-
import"./server-z4p0ry94.js";
|
|
59
|
-
import"./server-1d042x6w.js";
|
|
60
|
-
export {
|
|
61
|
-
buildRecompDeps2 as buildRecompDeps,
|
|
62
|
-
extractRecompReason2 as extractRecompReason,
|
|
63
|
-
isRecompFailure2 as isRecompFailure,
|
|
64
|
-
isRecompSkip2 as isRecompSkip,
|
|
65
|
-
runManagedRecomp2 as runManagedRecomp,
|
|
66
|
-
setRecompNote2 as setRecompNote,
|
|
67
|
-
setRecompStarting2 as setRecompStarting,
|
|
68
|
-
setRecompTerminal2 as setRecompTerminal
|
|
69
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
renderMessageByOrdinal2,
|
|
3
|
-
renderVerboseRangeForTool2,
|
|
4
|
-
renderItemByTag2
|
|
5
|
-
} from "./server-6x40bnb7.js";
|
|
6
|
-
import"./server-4ecpanyn.js";
|
|
7
|
-
import"./server-x69fqsvz.js";
|
|
8
|
-
import"./server-2xm0gxke.js";
|
|
9
|
-
import"./server-2amn2s73.js";
|
|
10
|
-
import"./server-vtgeyhq6.js";
|
|
11
|
-
import"./server-dgsjamm4.js";
|
|
12
|
-
import"./server-z9czv2vb.js";
|
|
13
|
-
import"./server-1zx87sdm.js";
|
|
14
|
-
import"./server-5hwf5c7r.js";
|
|
15
|
-
import"./server-e6xneh68.js";
|
|
16
|
-
import"./server-barj0mjz.js";
|
|
17
|
-
import"./server-ps6zrzwj.js";
|
|
18
|
-
import"./server-btgnkr9z.js";
|
|
19
|
-
import"./server-fb3zxn06.js";
|
|
20
|
-
import"./server-jkj1dq6j.js";
|
|
21
|
-
import"./server-fr0wbhdn.js";
|
|
22
|
-
import"./server-1rrmxhd1.js";
|
|
23
|
-
import"./server-ds8vpfkr.js";
|
|
24
|
-
import"./server-39bcszk4.js";
|
|
25
|
-
import"./server-qntmqaca.js";
|
|
26
|
-
import"./server-6ash6z8z.js";
|
|
27
|
-
import"./server-96ztjvkn.js";
|
|
28
|
-
import"./server-v0p37hm2.js";
|
|
29
|
-
import"./server-2ra6pwf3.js";
|
|
30
|
-
import"./server-5sbsnpkn.js";
|
|
31
|
-
import"./server-qb3s0mnc.js";
|
|
32
|
-
import"./server-0tv6kytx.js";
|
|
33
|
-
import"./server-jdfe07mp.js";
|
|
34
|
-
import"./server-gzy5w8ya.js";
|
|
35
|
-
import"./server-j8376q08.js";
|
|
36
|
-
import"./server-pavzsdc6.js";
|
|
37
|
-
import"./server-z4p0ry94.js";
|
|
38
|
-
import"./server-1d042x6w.js";
|
|
39
|
-
export {
|
|
40
|
-
renderItemByTag2 as renderItemByTag,
|
|
41
|
-
renderMessageByOrdinal2 as renderMessageByOrdinal,
|
|
42
|
-
renderVerboseRangeForTool2 as renderVerboseRangeForTool
|
|
43
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
renderSearchArchive2,
|
|
3
|
-
renderSearchArchiveOffThread2
|
|
4
|
-
} from "./server-g53asaqt.js";
|
|
5
|
-
import"./server-bnkc9kph.js";
|
|
6
|
-
import"./server-52x68mj4.js";
|
|
7
|
-
import"./server-dgsjamm4.js";
|
|
8
|
-
import"./server-z9czv2vb.js";
|
|
9
|
-
import"./server-1zx87sdm.js";
|
|
10
|
-
import"./server-5hwf5c7r.js";
|
|
11
|
-
import"./server-e6xneh68.js";
|
|
12
|
-
import"./server-qntmqaca.js";
|
|
13
|
-
import"./server-6ash6z8z.js";
|
|
14
|
-
import"./server-96ztjvkn.js";
|
|
15
|
-
import"./server-v0p37hm2.js";
|
|
16
|
-
import"./server-2ra6pwf3.js";
|
|
17
|
-
import"./server-5sbsnpkn.js";
|
|
18
|
-
import"./server-qb3s0mnc.js";
|
|
19
|
-
import"./server-gzy5w8ya.js";
|
|
20
|
-
import"./server-j8376q08.js";
|
|
21
|
-
import"./server-pavzsdc6.js";
|
|
22
|
-
import"./server-z4p0ry94.js";
|
|
23
|
-
import"./server-1d042x6w.js";
|
|
24
|
-
export {
|
|
25
|
-
renderSearchArchive2 as renderSearchArchive,
|
|
26
|
-
renderSearchArchiveOffThread2 as renderSearchArchiveOffThread
|
|
27
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
// src/features/magic-context/message-fts-session-filter.ts
|
|
2
|
-
var MESSAGE_FTS_SESSION_FILTER_SQL = `+message_history_fts.rowid IN (
|
|
3
|
-
SELECT fts_rowid FROM message_fts_rowid_map WHERE session_id = ?
|
|
4
|
-
) AND `;
|
|
5
|
-
var coverageCaches = new WeakMap;
|
|
6
|
-
var coverageScansOnThisThread = 0;
|
|
7
|
-
function getCoverageCache(db) {
|
|
8
|
-
let cache = coverageCaches.get(db);
|
|
9
|
-
if (!cache) {
|
|
10
|
-
cache = {
|
|
11
|
-
pin: db.prepare("SELECT fts_rowid FROM message_fts_rowid_map LIMIT 1"),
|
|
12
|
-
stamp: db.prepare("SELECT total_changes() AS changes, data_version AS version FROM pragma_data_version"),
|
|
13
|
-
missing: db.prepare(`SELECT DISTINCT session_id AS sessionId
|
|
14
|
-
FROM message_history_fts WHERE rowid IN (
|
|
15
|
-
SELECT id FROM message_history_fts_docsize
|
|
16
|
-
EXCEPT SELECT fts_rowid FROM message_fts_rowid_map
|
|
17
|
-
)`)
|
|
18
|
-
};
|
|
19
|
-
coverageCaches.set(db, cache);
|
|
20
|
-
}
|
|
21
|
-
return cache;
|
|
22
|
-
}
|
|
23
|
-
function withMessageFtsSessionFilter(db, sessionId, read) {
|
|
24
|
-
let cacheable = false;
|
|
25
|
-
try {
|
|
26
|
-
const transaction = db;
|
|
27
|
-
cacheable = transaction.inTransaction === false || transaction.isTransaction === false;
|
|
28
|
-
if (!cacheable)
|
|
29
|
-
coverageCaches.delete(db);
|
|
30
|
-
} catch {
|
|
31
|
-
coverageCaches.delete(db);
|
|
32
|
-
}
|
|
33
|
-
return db.transaction(() => {
|
|
34
|
-
let sessionFirst = false;
|
|
35
|
-
try {
|
|
36
|
-
const cache = getCoverageCache(db);
|
|
37
|
-
cache.pin.get();
|
|
38
|
-
const stamp = cache.stamp.get();
|
|
39
|
-
let incomplete = cache.incompleteSessions;
|
|
40
|
-
if (!cacheable || !incomplete || cache.version !== stamp.version || cache.changes !== stamp.changes) {
|
|
41
|
-
coverageScansOnThisThread += 1;
|
|
42
|
-
const rows = cache.missing.all();
|
|
43
|
-
incomplete = new Set(rows.map((row) => row.sessionId));
|
|
44
|
-
if (cacheable) {
|
|
45
|
-
cache.version = stamp.version;
|
|
46
|
-
cache.changes = stamp.changes;
|
|
47
|
-
cache.incompleteSessions = incomplete;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
sessionFirst = !incomplete.has(sessionId);
|
|
51
|
-
} catch {
|
|
52
|
-
coverageCaches.delete(db);
|
|
53
|
-
}
|
|
54
|
-
return read(sessionFirst);
|
|
55
|
-
}).deferred();
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export { MESSAGE_FTS_SESSION_FILTER_SQL, withMessageFtsSessionFilter };
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
runManagedWrapup2
|
|
3
|
-
} from "./index-hee64h6k.js";
|
|
4
|
-
import"./index-1kem0xxx.js";
|
|
5
|
-
import"./index-za1yx1m4.js";
|
|
6
|
-
import"./index-832w615x.js";
|
|
7
|
-
import"./index-sd3egckz.js";
|
|
8
|
-
import"./index-ttdk2w0z.js";
|
|
9
|
-
import"./index-5zrzg8r1.js";
|
|
10
|
-
import"./index-9emdjcb5.js";
|
|
11
|
-
import"./index-n9kd68vc.js";
|
|
12
|
-
import"./index-qjwpqvnf.js";
|
|
13
|
-
import"./index-yqha238s.js";
|
|
14
|
-
import"./index-mjy2k9jr.js";
|
|
15
|
-
import"./index-pnawfv4e.js";
|
|
16
|
-
import"./index-2amn2s73.js";
|
|
17
|
-
import"./index-01h7tqe3.js";
|
|
18
|
-
import"./index-xsqw8kbd.js";
|
|
19
|
-
import"./index-fqth7850.js";
|
|
20
|
-
import"./index-9ffntwyr.js";
|
|
21
|
-
import"./index-qt1qqasc.js";
|
|
22
|
-
import"./index-dr6bd4c8.js";
|
|
23
|
-
import"./index-xr1t0fxb.js";
|
|
24
|
-
import"./index-1zx87sdm.js";
|
|
25
|
-
import"./index-sp5pvs95.js";
|
|
26
|
-
import"./index-y14pawe1.js";
|
|
27
|
-
import"./index-e6ncz7a6.js";
|
|
28
|
-
import"./index-hes3k87g.js";
|
|
29
|
-
import"./index-y915t3ey.js";
|
|
30
|
-
import"./index-r4y0dczp.js";
|
|
31
|
-
import"./index-0twg41mh.js";
|
|
32
|
-
import"./index-6r99v53h.js";
|
|
33
|
-
import"./index-gqfy38m9.js";
|
|
34
|
-
import"./index-fb3zxn06.js";
|
|
35
|
-
import"./index-jba6ny4m.js";
|
|
36
|
-
import"./index-fr0wbhdn.js";
|
|
37
|
-
import"./index-5pgyqgmx.js";
|
|
38
|
-
import"./index-s32f8y67.js";
|
|
39
|
-
import"./index-wh9fxds5.js";
|
|
40
|
-
import"./index-mg9s2rc3.js";
|
|
41
|
-
import"./index-q7q6qp1f.js";
|
|
42
|
-
import"./index-96ztjvkn.js";
|
|
43
|
-
import"./index-v0p37hm2.js";
|
|
44
|
-
import"./index-58e3y90n.js";
|
|
45
|
-
import"./index-m0pwswv9.js";
|
|
46
|
-
import"./index-5df2fw5b.js";
|
|
47
|
-
import"./index-gqf8r04r.js";
|
|
48
|
-
import"./index-s7460efs.js";
|
|
49
|
-
import"./index-gzy5w8ya.js";
|
|
50
|
-
import"./index-ywrz4wy2.js";
|
|
51
|
-
import"./index-pavzsdc6.js";
|
|
52
|
-
import"./index-z4p0ry94.js";
|
|
53
|
-
import"./index-1d042x6w.js";
|
|
54
|
-
export {
|
|
55
|
-
runManagedWrapup2 as runManagedWrapup
|
|
56
|
-
};
|