@cortexkit/opencode-magic-context 0.49.7 → 0.49.9
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/agents/hidden-agent-registrations.d.ts +5 -3
- package/dist/agents/hidden-agent-registrations.d.ts.map +1 -1
- package/dist/auto-search-worker.js +6 -6
- package/dist/compaction-marker-candidates-worker.js +2 -2
- package/dist/{compaction-marker-candidates-a0edbqrr.js → compaction-marker-candidates-xxz35vwp.js} +3 -3
- package/dist/config/schema/agent-overrides.d.ts +13 -13
- package/dist/config/schema/magic-context.d.ts +500 -500
- package/dist/{conflict-warning-hook-myk5hbt9.js → conflict-warning-hook-w3crzrar.js} +8 -8
- package/dist/{context-ffr7e0g7.js → context-ey3ap3cc.js} +81 -53
- package/dist/{derive-budgets-j4ry8j8n.js → derive-budgets-3nbxsyss.js} +2 -2
- package/dist/embedding-backfill-3h2m5n0q.js +21 -0
- package/dist/embedding-worker-process.js +6 -2
- package/dist/embedding-worker.js +6 -5
- package/dist/features/magic-context/compaction-marker-candidates.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/cron.d.ts +2 -0
- package/dist/features/magic-context/dreamer/cron.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/provider-output-failure.d.ts +1 -0
- package/dist/features/magic-context/dreamer/provider-output-failure.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-local.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-worker-client.d.ts.map +1 -1
- package/dist/features/magic-context/message-index-async.d.ts.map +1 -1
- package/dist/features/magic-context/migration-worker-client.d.ts.map +1 -1
- package/dist/features/magic-context/primer-clustering.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/compiler-prompt.d.ts +1 -1
- package/dist/features/magic-context/smart-notes/compiler-prompt.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/compiler.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/wake-plane.d.ts.map +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/history-owner-ty29fz0f.js +244 -0
- package/dist/hooks/auto-update-checker/checker.d.ts.map +1 -1
- package/dist/hooks/magic-context/__fixtures__/tail-hygiene-refresh.d.ts +34 -0
- package/dist/hooks/magic-context/__fixtures__/tail-hygiene-refresh.d.ts.map +1 -0
- package/dist/hooks/magic-context/auto-search-worker-client.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/ctx-reduce-nudge.d.ts +1 -0
- package/dist/hooks/magic-context/ctx-reduce-nudge.d.ts.map +1 -1
- package/dist/hooks/magic-context/dropped-input-guard.d.ts.map +1 -1
- package/dist/hooks/magic-context/edit-marker.d.ts +2 -0
- package/dist/hooks/magic-context/edit-marker.d.ts.map +1 -1
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts +2 -0
- package/dist/hooks/magic-context/final-wire-token-estimate.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.map +1 -1
- package/dist/hooks/magic-context/module-transport.d.ts +1 -0
- package/dist/hooks/magic-context/module-transport.d.ts.map +1 -1
- package/dist/hooks/magic-context/provider-visible-parts.d.ts +10 -4
- package/dist/hooks/magic-context/provider-visible-parts.d.ts.map +1 -1
- package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts +8 -4
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-mode-transform.d.ts +1 -0
- package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-refusal-recovery.d.ts.map +1 -1
- package/dist/hooks/magic-context/supersession-reclaim.d.ts +5 -3
- package/dist/hooks/magic-context/supersession-reclaim.d.ts.map +1 -1
- package/dist/hooks/magic-context/tail-hygiene-output-count.d.ts +18 -0
- package/dist/hooks/magic-context/tail-hygiene-output-count.d.ts.map +1 -0
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts +5 -1
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts.map +1 -1
- package/dist/hooks/magic-context/tool-drop-target.d.ts.map +1 -1
- package/dist/hooks/magic-context/tool-reclaim.d.ts +5 -2
- package/dist/hooks/magic-context/tool-reclaim.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.d.ts.map +1 -1
- package/dist/hooks/magic-context/unresolved-history-boundary.d.ts +5 -1
- package/dist/hooks/magic-context/unresolved-history-boundary.d.ts.map +1 -1
- package/dist/hooks/magic-context/wrapup-orchestrator.d.ts.map +1 -1
- package/dist/{index-g8qbdb03.js → index-0jz47061.js} +6 -3
- package/dist/{index-wq16ahsn.js → index-0x9cn9w1.js} +8 -8
- package/dist/{index-4mjhqadz.js → index-150zz6fh.js} +1 -1
- package/dist/{index-n7kwfw2r.js → index-16vwdyy5.js} +7 -7
- package/dist/{index-rwmpkss5.js → index-21919gcq.js} +4 -4
- package/dist/{index-5tbvdff4.js → index-3403gbzj.js} +200 -135
- package/dist/{index-0gyq3djm.js → index-4hb8nt93.js} +3 -3
- package/dist/{index-ebnngykq.js → index-6k86es2p.js} +142 -27
- package/dist/{index-ax2jhztn.js → index-7bjgyaj1.js} +4 -4
- package/dist/{index-h2wc01qk.js → index-9jvab89d.js} +2 -2
- package/dist/{index-w6bd03dc.js → index-a43xq1pg.js} +5 -5
- package/dist/{index-tqf7yg27.js → index-a4b0gbyg.js} +1 -1
- package/dist/{index-j5hce1ab.js → index-a865mj02.js} +5 -5
- package/dist/{index-37q80veb.js → index-angx1s0k.js} +4 -3
- package/dist/{index-z1tjp257.js → index-b64n4d0h.js} +1 -1
- package/dist/{index-gbmqa9x9.js → index-bmwfzz28.js} +9 -6
- package/dist/{index-tmtty2x5.js → index-f8cn4xqa.js} +290 -61
- package/dist/{index-j58gqrn2.js → index-ffa8x2as.js} +31 -24
- package/dist/{index-1bt88epp.js → index-g7jkrz0x.js} +36 -16
- package/dist/{index-qx53vezw.js → index-gjvjh960.js} +1 -1
- package/dist/{index-w23dh319.js → index-jw4gbfkv.js} +1 -1
- package/dist/index-knvkbfvh.js +25 -0
- package/dist/{index-vkbqdnkj.js → index-kvw6xew3.js} +6 -3
- package/dist/{index-rzmjkdd6.js → index-mp2kghkv.js} +3 -27
- package/dist/{index-nsjyysj0.js → index-mvvephtj.js} +5 -1
- package/dist/{index-9yyqq3mm.js → index-n78avt2p.js} +1 -1
- package/dist/{index-w6vr754t.js → index-nenz4gpb.js} +13 -9
- package/dist/{index-vt4sf4ep.js → index-pgy3h49n.js} +4 -4
- package/dist/{v2/server-1rfgbjfn.js → index-q28hsbpg.js} +15 -3
- package/dist/{index-a8acx4gc.js → index-q76br5zn.js} +3 -3
- package/dist/{index-sf94at64.js → index-rg1cezmj.js} +22 -22
- package/dist/{index-sh91t19a.js → index-s178h9z8.js} +4 -3
- package/dist/{index-4btknbqh.js → index-swgpe402.js} +48 -38
- package/dist/{index-k6xvbj2e.js → index-w28y7d0z.js} +2 -0
- package/dist/{index-j8epsc0g.js → index-wafzvyhg.js} +33 -10
- package/dist/{index-n5a170gs.js → index-wpwpn7nj.js} +166 -63
- package/dist/{index-tagss15p.js → index-x57ep4fp.js} +124 -63
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +84 -79
- package/dist/{logger-ewak5q1s.js → logger-wn328tfg.js} +1 -1
- package/dist/{message-index-rqtse28y.js → message-index-6r1x9cqh.js} +16 -16
- package/dist/{message-index-bounded-04rycpx4.js → message-index-bounded-fskdyc81.js} +16 -16
- package/dist/{message-time-backfill-a5ytnp53.js → message-time-backfill-nb5hhnrt.js} +3 -3
- package/dist/migration-worker.js +11 -11
- package/dist/plugin/boot-quiet.d.ts.map +1 -1
- package/dist/plugin/dream-timer.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts +2 -0
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/{project-embedding-registry-k0sd9k7v.js → project-embedding-registry-vy7sv9jt.js} +11 -11
- package/dist/raw-ordinal-warmup-worker.js +6 -6
- package/dist/{read-session-chunk-h1btx938.js → read-session-chunk-zgpvs423.js} +11 -11
- package/dist/{read-session-raw-vdf4wh78.js → read-session-raw-gm6xj30v.js} +3 -3
- package/dist/recomp-orchestrator-77xc8wpe.js +60 -0
- package/dist/{safe-notification-target-q0cyrx3x.js → safe-notification-target-jdynm677.js} +2 -2
- package/dist/{search-3rbdx6hw.js → search-72fkjwk2.js} +24 -24
- package/dist/{send-session-notification-2tp44tfa.js → send-session-notification-q8ngbap3.js} +6 -6
- package/dist/shared/hidden-zen-read.d.ts +24 -0
- package/dist/shared/hidden-zen-read.d.ts.map +1 -0
- package/dist/shared/history-owner.d.ts +12 -0
- package/dist/shared/history-owner.d.ts.map +1 -0
- package/dist/shared/off-thread-migration-clock.d.ts +8 -1
- package/dist/shared/off-thread-migration-clock.d.ts.map +1 -1
- package/dist/shared/reclaim-distance.d.ts +33 -0
- package/dist/shared/reclaim-distance.d.ts.map +1 -0
- package/dist/shared/redaction.d.ts.map +1 -1
- package/dist/shared/rpc-server.d.ts.map +1 -1
- package/dist/shared/sqlite.d.ts +2 -0
- package/dist/shared/sqlite.d.ts.map +1 -1
- package/dist/shared/stable-json.d.ts +7 -0
- package/dist/shared/stable-json.d.ts.map +1 -1
- package/dist/shared/tail-hygiene-json.d.ts +22 -0
- package/dist/shared/tail-hygiene-json.d.ts.map +1 -0
- package/dist/shared/transcript.d.ts +5 -0
- package/dist/shared/transcript.d.ts.map +1 -1
- package/dist/shared/user-facing-codes.d.ts +2 -2
- package/dist/{sqlite-j3tvg8r0.js → sqlite-4pqyynrs.js} +3 -1
- package/dist/{storage-memory-8168bgef.js → storage-memory-j3v3hc83.js} +2 -2
- package/dist/{storage-tags-61z5j2f9.js → storage-tags-35m4gms2.js} +5 -5
- package/dist/{transform-postprocess-phase-7qts7h54.js → transform-postprocess-phase-r8d406j0.js} +30 -30
- package/dist/v2/auto-search-worker.js +6 -6
- package/dist/v2/{compaction-marker-candidates-6nypjkpf.js → compaction-marker-candidates-a15w3mqh.js} +3 -3
- package/dist/v2/compaction-marker-candidates-worker.js +2 -2
- package/dist/v2/{context-xq4rtywr.js → context-z2yagwy4.js} +293 -91
- package/dist/v2/{derive-budgets-enckmg7y.js → derive-budgets-0rmpmxjw.js} +3 -3
- package/dist/v2/embedding-backfill-vr7wdtrf.js +20 -0
- package/dist/v2/embedding-worker-process.js +6 -2
- package/dist/v2/embedding-worker.js +6 -5
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/history-owner-2cr9py37.js +243 -0
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/hidden-child.d.ts +2 -2
- package/dist/v2/hooks/hidden-child.d.ts.map +1 -1
- package/dist/v2/hooks/store.d.ts +1 -0
- package/dist/v2/hooks/store.d.ts.map +1 -1
- package/dist/v2/{logger-pj02s7sr.js → logger-te6e1j72.js} +1 -1
- package/dist/v2/{message-index-8e5z2xx8.js → message-index-9ezq6wze.js} +16 -16
- package/dist/v2/{message-index-bounded-5vh1h2g7.js → message-index-bounded-rqc603f2.js} +16 -16
- package/dist/v2/{message-time-backfill-2z365239.js → message-time-backfill-rz1pnpaj.js} +3 -3
- package/dist/v2/migration-worker.js +11 -11
- package/dist/v2/{project-embedding-registry-b77awytr.js → project-embedding-registry-ja23aygk.js} +11 -11
- package/dist/v2/raw-ordinal-warmup-worker.js +6 -6
- package/dist/v2/{read-session-chunk-4sat83cx.js → read-session-chunk-7f87tg2q.js} +11 -11
- package/dist/v2/{read-session-raw-a3hw9jsp.js → read-session-raw-h4azh85b.js} +3 -3
- package/dist/v2/recomp-orchestrator-s5tdpsbs.js +59 -0
- package/dist/v2/{safe-notification-target-y3p1hce9.js → safe-notification-target-936374xx.js} +2 -2
- package/dist/v2/search-2td1b1wy.js +46 -0
- package/dist/v2/{send-session-notification-ppgc8qdz.js → send-session-notification-6n7chhyp.js} +6 -6
- package/dist/v2/{server-v4fwha43.js → server-23znwjqk.js} +48 -38
- package/dist/v2/{server-nfan6zb6.js → server-2hxypdx5.js} +31 -24
- package/dist/v2/{server-ras2sxnc.js → server-44ryn9rb.js} +9 -6
- package/dist/v2/{server-fw31krgq.js → server-4easnf78.js} +19 -19
- package/dist/v2/{server-d6g4whc2.js → server-4qr18rfg.js} +3 -3
- package/dist/v2/{server-sy4b1sra.js → server-4rs8sm06.js} +5 -5
- package/dist/v2/{server-jdwd03ep.js → server-4zwx20yg.js} +7 -7
- package/dist/v2/{server-brhj8qtd.js → server-63ha7f0f.js} +3 -27
- package/dist/v2/{server-3t0q2cqx.js → server-7dv9wt9r.js} +1 -1
- package/dist/v2/{server-cw6521wn.js → server-7e087rvk.js} +2 -0
- package/dist/v2/{server-6byqfbqf.js → server-89fcbe37.js} +36 -16
- package/dist/v2/{server-hb6xhh9q.js → server-988cqjme.js} +6 -3
- package/dist/v2/{server-fpqe39as.js → server-9a6bwc12.js} +4 -4
- package/dist/v2/{server-t4k4qexw.js → server-9e5r8y60.js} +5 -1
- package/dist/v2/{server-qcw43339.js → server-ak7w74j9.js} +4 -4
- package/dist/v2/{server-dd0nja67.js → server-bx59ezg6.js} +4 -3
- package/dist/v2/{server-mv1w7t6z.js → server-c9w52qss.js} +99 -43
- package/dist/v2/{server-676xw7at.js → server-ckrb5rm8.js} +1 -1
- package/dist/{index-w4mw92w3.js → v2/server-cxsr0ng6.js} +15 -3
- package/dist/v2/{server-hcvcxzx7.js → server-f27he3j1.js} +5 -5
- package/dist/v2/{server-gtv9wbhq.js → server-gc8x2xdb.js} +144 -63
- package/dist/v2/{server-t528t8qm.js → server-hn9fb3v0.js} +2 -2
- package/dist/v2/{server-w3zeywp1.js → server-kmapq3v0.js} +289 -60
- package/dist/v2/server-knvkbfvh.js +25 -0
- package/dist/v2/{server-9yyqq3mm.js → server-n78avt2p.js} +1 -1
- package/dist/v2/{server-kdrezdy0.js → server-njnx39q2.js} +6 -3
- package/dist/v2/{server-x08d1xf3.js → server-npm52h2q.js} +4 -3
- package/dist/v2/{server-vb7pbd9p.js → server-nveratm5.js} +1 -1
- package/dist/v2/{server-kzns2hbz.js → server-s6jqh8bj.js} +1 -1
- package/dist/v2/{server-j8epsc0g.js → server-wafzvyhg.js} +33 -10
- package/dist/v2/{server-7ekna9zs.js → server-xqf2d2mg.js} +2 -2
- package/dist/v2/{server-7srtwsa4.js → server-z0rjemg1.js} +9 -9
- package/dist/v2/{server-wkdgjjch.js → server-zrwaj29a.js} +2 -2
- package/dist/v2/server.js +7 -6
- package/dist/v2/{sqlite-j3tvg8r0.js → sqlite-4pqyynrs.js} +3 -1
- package/dist/v2/{storage-memory-8168bgef.js → storage-memory-j3v3hc83.js} +2 -2
- package/dist/v2/{storage-tags-j2fzq3sw.js → storage-tags-c4zfcxv4.js} +5 -5
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/{wrapup-orchestrator-s92ebfzv.js → wrapup-orchestrator-wg8dmmm9.js} +38 -35
- package/dist/wrapup-orchestrator-b1z99yg5.js +47 -0
- package/package.json +1 -1
- package/src/agents/hidden-agent-registrations.ts +22 -4
- package/src/config/compaction-accessor-guard.test.ts +3 -0
- package/src/features/magic-context/dreamer/cron.ts +8 -0
- package/src/shared/hidden-zen-read.test.ts +99 -0
- package/src/shared/hidden-zen-read.ts +88 -0
- package/src/shared/history-owner.test.ts +60 -0
- package/src/shared/history-owner.ts +43 -0
- package/src/shared/host-stall-profiler-node.ts +3 -1
- package/src/shared/host-stall-profiler.ts +3 -1
- package/src/shared/off-thread-migration-clock.test.ts +80 -10
- package/src/shared/off-thread-migration-clock.ts +37 -13
- package/src/shared/reclaim-distance.test.ts +111 -0
- package/src/shared/reclaim-distance.ts +91 -0
- package/src/shared/redaction.test.ts +16 -0
- package/src/shared/redaction.ts +8 -1
- package/src/shared/root-async-context.probe.mjs +36 -0
- package/src/shared/root-async-context.test.ts +49 -0
- package/src/shared/rpc-server.ts +27 -23
- package/src/shared/sqlite-busy-budget-review.test.ts +291 -0
- package/src/shared/sqlite-foreground-wait.test.ts +253 -1
- package/src/shared/sqlite.ts +55 -14
- package/src/shared/stable-json.ts +56 -14
- package/src/shared/tail-hygiene-json.test.ts +117 -0
- package/src/shared/tail-hygiene-json.ts +217 -0
- package/src/shared/transcript.ts +7 -0
- package/src/shared/user-facing-codes.ts +2 -2
- package/dist/embedding-backfill-re16xncd.js +0 -21
- package/dist/recomp-orchestrator-trcgmm23.js +0 -60
- package/dist/v2/embedding-backfill-xd9ygzgd.js +0 -20
- package/dist/v2/recomp-orchestrator-n11zv1f1.js +0 -59
- package/dist/v2/search-mvgqtkkz.js +0 -46
- package/dist/wrapup-orchestrator-df61jmz9.js +0 -47
|
@@ -35,23 +35,23 @@ import {
|
|
|
35
35
|
readSessionChunk2,
|
|
36
36
|
getRawSessionMessageIdsThrough2,
|
|
37
37
|
readRawSessionSeedTail2
|
|
38
|
-
} from "./server-
|
|
39
|
-
import"./server-
|
|
38
|
+
} from "./server-gc8x2xdb.js";
|
|
39
|
+
import"./server-kmapq3v0.js";
|
|
40
40
|
import"./server-1zx87sdm.js";
|
|
41
|
-
import"./server-
|
|
42
|
-
import"./server-
|
|
41
|
+
import"./server-zrwaj29a.js";
|
|
42
|
+
import"./server-bx59ezg6.js";
|
|
43
43
|
import"./server-51779zs2.js";
|
|
44
|
-
import"./server-
|
|
45
|
-
import"./server-
|
|
46
|
-
import"./server-
|
|
44
|
+
import"./server-7e087rvk.js";
|
|
45
|
+
import"./server-xqf2d2mg.js";
|
|
46
|
+
import"./server-89fcbe37.js";
|
|
47
47
|
import"./server-2ra6pwf3.js";
|
|
48
|
-
import"./server-
|
|
49
|
-
import"./server-j8epsc0g.js";
|
|
48
|
+
import"./server-7dv9wt9r.js";
|
|
50
49
|
import {
|
|
51
50
|
hasMeaningfulUserText2,
|
|
52
51
|
extractTexts2
|
|
53
|
-
} from "./server-
|
|
54
|
-
import"./server-
|
|
52
|
+
} from "./server-s6jqh8bj.js";
|
|
53
|
+
import"./server-wafzvyhg.js";
|
|
54
|
+
import"./server-9e5r8y60.js";
|
|
55
55
|
import"./server-pavzsdc6.js";
|
|
56
56
|
export {
|
|
57
57
|
RAW_MESSAGE_VISIT_PAGE_SIZE2 as RAW_MESSAGE_VISIT_PAGE_SIZE,
|
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
hasRawSessionMessageByIdFromDb2,
|
|
26
26
|
readRawSeedTailFromDb2,
|
|
27
27
|
readRawSessionBoundaryEndpointsFromDb2
|
|
28
|
-
} from "./server-
|
|
28
|
+
} from "./server-bx59ezg6.js";
|
|
29
29
|
import"./server-51779zs2.js";
|
|
30
|
-
import"./server-
|
|
31
|
-
import"./server-
|
|
30
|
+
import"./server-wafzvyhg.js";
|
|
31
|
+
import"./server-9e5r8y60.js";
|
|
32
32
|
import"./server-pavzsdc6.js";
|
|
33
33
|
export {
|
|
34
34
|
buildInMemoryTailRawMessages2 as buildInMemoryTailRawMessages,
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isRecompFailure2,
|
|
3
|
+
isRecompSkip2,
|
|
4
|
+
extractRecompReason2,
|
|
5
|
+
setRecompStarting2,
|
|
6
|
+
setRecompNote2,
|
|
7
|
+
setRecompTerminal2,
|
|
8
|
+
buildRecompDeps2,
|
|
9
|
+
runManagedRecomp2
|
|
10
|
+
} from "./server-c9w52qss.js";
|
|
11
|
+
import"./server-npm52h2q.js";
|
|
12
|
+
import"./server-4zwx20yg.js";
|
|
13
|
+
import"./server-z0rjemg1.js";
|
|
14
|
+
import"./server-4rs8sm06.js";
|
|
15
|
+
import"./server-n78avt2p.js";
|
|
16
|
+
import"./server-4easnf78.js";
|
|
17
|
+
import"./server-9a6bwc12.js";
|
|
18
|
+
import"./server-4dhv7mqz.js";
|
|
19
|
+
import"./server-hn9fb3v0.js";
|
|
20
|
+
import"./server-ak7w74j9.js";
|
|
21
|
+
import"./server-qt1qqasc.js";
|
|
22
|
+
import"./server-ckrb5rm8.js";
|
|
23
|
+
import"./server-4qr18rfg.js";
|
|
24
|
+
import"./server-nveratm5.js";
|
|
25
|
+
import"./server-x8a7jmkh.js";
|
|
26
|
+
import"./server-44ryn9rb.js";
|
|
27
|
+
import"./server-988cqjme.js";
|
|
28
|
+
import"./server-23znwjqk.js";
|
|
29
|
+
import"./server-fb3zxn06.js";
|
|
30
|
+
import"./server-f27he3j1.js";
|
|
31
|
+
import"./server-fr0wbhdn.js";
|
|
32
|
+
import"./server-njnx39q2.js";
|
|
33
|
+
import"./server-63ha7f0f.js";
|
|
34
|
+
import"./server-cxsr0ng6.js";
|
|
35
|
+
import"./server-gc8x2xdb.js";
|
|
36
|
+
import"./server-kmapq3v0.js";
|
|
37
|
+
import"./server-1zx87sdm.js";
|
|
38
|
+
import"./server-zrwaj29a.js";
|
|
39
|
+
import"./server-bx59ezg6.js";
|
|
40
|
+
import"./server-51779zs2.js";
|
|
41
|
+
import"./server-7e087rvk.js";
|
|
42
|
+
import"./server-xqf2d2mg.js";
|
|
43
|
+
import"./server-89fcbe37.js";
|
|
44
|
+
import"./server-2ra6pwf3.js";
|
|
45
|
+
import"./server-7dv9wt9r.js";
|
|
46
|
+
import"./server-s6jqh8bj.js";
|
|
47
|
+
import"./server-wafzvyhg.js";
|
|
48
|
+
import"./server-9e5r8y60.js";
|
|
49
|
+
import"./server-pavzsdc6.js";
|
|
50
|
+
export {
|
|
51
|
+
buildRecompDeps2 as buildRecompDeps,
|
|
52
|
+
extractRecompReason2 as extractRecompReason,
|
|
53
|
+
isRecompFailure2 as isRecompFailure,
|
|
54
|
+
isRecompSkip2 as isRecompSkip,
|
|
55
|
+
runManagedRecomp2 as runManagedRecomp,
|
|
56
|
+
setRecompNote2 as setRecompNote,
|
|
57
|
+
setRecompStarting2 as setRecompStarting,
|
|
58
|
+
setRecompTerminal2 as setRecompTerminal
|
|
59
|
+
};
|
package/dist/v2/{safe-notification-target-y3p1hce9.js → safe-notification-target-936374xx.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isDefaultSessionTitle2,
|
|
3
3
|
waitForSafeNotificationTarget2
|
|
4
|
-
} from "./server-
|
|
5
|
-
import"./server-
|
|
4
|
+
} from "./server-ckrb5rm8.js";
|
|
5
|
+
import"./server-9e5r8y60.js";
|
|
6
6
|
import"./server-pavzsdc6.js";
|
|
7
7
|
export {
|
|
8
8
|
isDefaultSessionTitle2 as isDefaultSessionTitle,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createUnifiedSearchDiagnostics2,
|
|
3
|
+
searchMessageHistory2,
|
|
4
|
+
parseIdShapedQuery2,
|
|
5
|
+
resolveMemoriesByIdsForSearch2,
|
|
6
|
+
unifiedSearch2,
|
|
7
|
+
formatSearchResults2
|
|
8
|
+
} from "./server-2hxypdx5.js";
|
|
9
|
+
import"./server-4zwx20yg.js";
|
|
10
|
+
import"./server-z0rjemg1.js";
|
|
11
|
+
import"./server-4rs8sm06.js";
|
|
12
|
+
import"./server-n78avt2p.js";
|
|
13
|
+
import"./server-4easnf78.js";
|
|
14
|
+
import"./server-9a6bwc12.js";
|
|
15
|
+
import"./server-4dhv7mqz.js";
|
|
16
|
+
import"./server-qt1qqasc.js";
|
|
17
|
+
import"./server-44ryn9rb.js";
|
|
18
|
+
import"./server-988cqjme.js";
|
|
19
|
+
import"./server-f27he3j1.js";
|
|
20
|
+
import"./server-fr0wbhdn.js";
|
|
21
|
+
import"./server-njnx39q2.js";
|
|
22
|
+
import"./server-63ha7f0f.js";
|
|
23
|
+
import"./server-cxsr0ng6.js";
|
|
24
|
+
import"./server-gc8x2xdb.js";
|
|
25
|
+
import"./server-kmapq3v0.js";
|
|
26
|
+
import"./server-1zx87sdm.js";
|
|
27
|
+
import"./server-zrwaj29a.js";
|
|
28
|
+
import"./server-bx59ezg6.js";
|
|
29
|
+
import"./server-51779zs2.js";
|
|
30
|
+
import"./server-7e087rvk.js";
|
|
31
|
+
import"./server-xqf2d2mg.js";
|
|
32
|
+
import"./server-89fcbe37.js";
|
|
33
|
+
import"./server-2ra6pwf3.js";
|
|
34
|
+
import"./server-7dv9wt9r.js";
|
|
35
|
+
import"./server-s6jqh8bj.js";
|
|
36
|
+
import"./server-wafzvyhg.js";
|
|
37
|
+
import"./server-9e5r8y60.js";
|
|
38
|
+
import"./server-pavzsdc6.js";
|
|
39
|
+
export {
|
|
40
|
+
createUnifiedSearchDiagnostics2 as createUnifiedSearchDiagnostics,
|
|
41
|
+
formatSearchResults2 as formatSearchResults,
|
|
42
|
+
parseIdShapedQuery2 as parseIdShapedQuery,
|
|
43
|
+
resolveMemoriesByIdsForSearch2 as resolveMemoriesByIdsForSearch,
|
|
44
|
+
searchMessageHistory2 as searchMessageHistory,
|
|
45
|
+
unifiedSearch2 as unifiedSearch
|
|
46
|
+
};
|
package/dist/v2/{send-session-notification-ppgc8qdz.js → send-session-notification-6n7chhyp.js}
RENAMED
|
@@ -8,15 +8,15 @@ import {
|
|
|
8
8
|
clearIgnoredMessages2,
|
|
9
9
|
observeIgnoredNotificationEvent2,
|
|
10
10
|
sendStatusNotification2
|
|
11
|
-
} from "./server-
|
|
11
|
+
} from "./server-ak7w74j9.js";
|
|
12
12
|
import"./server-qt1qqasc.js";
|
|
13
|
-
import"./server-
|
|
14
|
-
import"./server-
|
|
15
|
-
import"./server-
|
|
13
|
+
import"./server-ckrb5rm8.js";
|
|
14
|
+
import"./server-zrwaj29a.js";
|
|
15
|
+
import"./server-bx59ezg6.js";
|
|
16
16
|
import"./server-51779zs2.js";
|
|
17
17
|
import"./server-2ra6pwf3.js";
|
|
18
|
-
import"./server-
|
|
19
|
-
import"./server-
|
|
18
|
+
import"./server-wafzvyhg.js";
|
|
19
|
+
import"./server-9e5r8y60.js";
|
|
20
20
|
import"./server-pavzsdc6.js";
|
|
21
21
|
export {
|
|
22
22
|
MAX_QUEUED_IGNORED_NOTIFICATIONS2 as MAX_QUEUED_IGNORED_NOTIFICATIONS,
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
inRootAsyncContext2,
|
|
3
|
+
registerSlowWriteReporter2,
|
|
4
|
+
registerSqliteDiagnosticSink2,
|
|
5
|
+
detectSqliteRuntime2,
|
|
6
|
+
Database2,
|
|
7
|
+
withSqliteBackgroundWriter2,
|
|
8
|
+
withoutSqliteTransformPass2,
|
|
9
|
+
isTransientSqliteError2,
|
|
10
|
+
withPrivilegedWriter2
|
|
11
|
+
} from "./server-wafzvyhg.js";
|
|
12
|
+
import {
|
|
13
|
+
bootQuietRemainingMs,
|
|
14
|
+
scheduleAfterBootQuiet
|
|
15
|
+
} from "./server-njnx39q2.js";
|
|
1
16
|
import {
|
|
2
17
|
getHarness2,
|
|
3
18
|
harnessOwnsOpenCodeStore2
|
|
@@ -9,7 +24,7 @@ import {
|
|
|
9
24
|
importPluginModule,
|
|
10
25
|
writeForwardedLogLine2,
|
|
11
26
|
log2
|
|
12
|
-
} from "./server-
|
|
27
|
+
} from "./server-9e5r8y60.js";
|
|
13
28
|
import {
|
|
14
29
|
isOwnRpcServerRecord,
|
|
15
30
|
isPidAlive,
|
|
@@ -20,23 +35,13 @@ import {
|
|
|
20
35
|
parseRpcPortFile,
|
|
21
36
|
inspectProcessesAsync,
|
|
22
37
|
inspectWindowsProcessesSync
|
|
23
|
-
} from "./server-
|
|
24
|
-
import {
|
|
25
|
-
registerSlowWriteReporter2,
|
|
26
|
-
registerSqliteDiagnosticSink2,
|
|
27
|
-
detectSqliteRuntime2,
|
|
28
|
-
Database2,
|
|
29
|
-
withSqliteBackgroundWriter2,
|
|
30
|
-
withoutSqliteTransformPass2,
|
|
31
|
-
isTransientSqliteError2,
|
|
32
|
-
withPrivilegedWriter2
|
|
33
|
-
} from "./server-j8epsc0g.js";
|
|
38
|
+
} from "./server-cxsr0ng6.js";
|
|
34
39
|
import {
|
|
35
40
|
configureContextDatabasePragmas2
|
|
36
41
|
} from "./server-fb3zxn06.js";
|
|
37
42
|
import {
|
|
38
43
|
startMessageFtsRowidMapBackfill
|
|
39
|
-
} from "./server-
|
|
44
|
+
} from "./server-63ha7f0f.js";
|
|
40
45
|
import {
|
|
41
46
|
LKG_SLOT_CHUNKS_DDL,
|
|
42
47
|
SESSION_REPLAY_DECISIONS_DDL,
|
|
@@ -46,24 +51,20 @@ import {
|
|
|
46
51
|
hasPendingMigrations,
|
|
47
52
|
getMainThreadMigrationBodyCount,
|
|
48
53
|
runMigrations
|
|
49
|
-
} from "./server-
|
|
54
|
+
} from "./server-f27he3j1.js";
|
|
50
55
|
import {
|
|
51
56
|
ensureColumn,
|
|
52
57
|
installV95PerfSchema,
|
|
53
58
|
installTagIdentityRevisionTrigger
|
|
54
|
-
} from "./server-
|
|
59
|
+
} from "./server-89fcbe37.js";
|
|
55
60
|
import {
|
|
56
61
|
resolveOpenCodeDbPath,
|
|
57
62
|
hasV1MessageTables
|
|
58
63
|
} from "./server-2ra6pwf3.js";
|
|
59
|
-
import {
|
|
60
|
-
bootQuietRemainingMs,
|
|
61
|
-
scheduleAfterBootQuiet
|
|
62
|
-
} from "./server-kdrezdy0.js";
|
|
63
64
|
import {
|
|
64
65
|
setDatabase,
|
|
65
66
|
loadToolDefinitionMeasurements
|
|
66
|
-
} from "./server-
|
|
67
|
+
} from "./server-xqf2d2mg.js";
|
|
67
68
|
import {
|
|
68
69
|
getErrorMessage
|
|
69
70
|
} from "./server-y8v6yerm.js";
|
|
@@ -80,7 +81,7 @@ import {
|
|
|
80
81
|
} from "./server-8ajstryz.js";
|
|
81
82
|
import {
|
|
82
83
|
logSlowWriteTransaction
|
|
83
|
-
} from "./server-
|
|
84
|
+
} from "./server-7dv9wt9r.js";
|
|
84
85
|
|
|
85
86
|
// src/features/magic-context/storage-db.ts
|
|
86
87
|
import {
|
|
@@ -324,15 +325,25 @@ var activeMigrations = 0;
|
|
|
324
325
|
var activeSince = 0;
|
|
325
326
|
var accumulatedMs = 0;
|
|
326
327
|
var idleWaiters = [];
|
|
327
|
-
|
|
328
|
-
|
|
328
|
+
var testClock;
|
|
329
|
+
function now() {
|
|
330
|
+
return testClock?.now() ?? performance.now();
|
|
331
|
+
}
|
|
332
|
+
function scheduleTimeout(callback, delayMs) {
|
|
333
|
+
if (testClock)
|
|
334
|
+
return testClock.setTimeout(callback, delayMs);
|
|
335
|
+
const timer = setTimeout(callback, delayMs);
|
|
336
|
+
return () => clearTimeout(timer);
|
|
337
|
+
}
|
|
338
|
+
function offThreadMigrationMs(at = now()) {
|
|
339
|
+
return accumulatedMs + (activeMigrations > 0 ? Math.max(0, at - activeSince) : 0);
|
|
329
340
|
}
|
|
330
341
|
function isOffThreadMigrationRunning() {
|
|
331
342
|
return activeMigrations > 0;
|
|
332
343
|
}
|
|
333
344
|
function beginOffThreadMigration() {
|
|
334
345
|
if (activeMigrations === 0)
|
|
335
|
-
activeSince =
|
|
346
|
+
activeSince = now();
|
|
336
347
|
activeMigrations += 1;
|
|
337
348
|
let ended = false;
|
|
338
349
|
return () => {
|
|
@@ -342,7 +353,7 @@ function beginOffThreadMigration() {
|
|
|
342
353
|
activeMigrations -= 1;
|
|
343
354
|
if (activeMigrations > 0)
|
|
344
355
|
return;
|
|
345
|
-
accumulatedMs += Math.max(0,
|
|
356
|
+
accumulatedMs += Math.max(0, now() - activeSince);
|
|
346
357
|
const waiters = idleWaiters;
|
|
347
358
|
idleWaiters = [];
|
|
348
359
|
for (const wake of waiters)
|
|
@@ -355,10 +366,10 @@ function whenOffThreadMigrationIdle() {
|
|
|
355
366
|
return new Promise((resolve) => idleWaiters.push(resolve));
|
|
356
367
|
}
|
|
357
368
|
function startBootDeadline(timeoutMs, onDeferred) {
|
|
358
|
-
const startedAt =
|
|
369
|
+
const startedAt = now();
|
|
359
370
|
const migratedAtStart = offThreadMigrationMs(startedAt);
|
|
360
371
|
const budgetMs = Math.max(0, timeoutMs);
|
|
361
|
-
let
|
|
372
|
+
let cancelTimer;
|
|
362
373
|
let cancelled = false;
|
|
363
374
|
let deferredReported = false;
|
|
364
375
|
let resolveExpired;
|
|
@@ -366,12 +377,12 @@ function startBootDeadline(timeoutMs, onDeferred) {
|
|
|
366
377
|
resolveExpired = resolve;
|
|
367
378
|
});
|
|
368
379
|
const remainingMs = () => {
|
|
369
|
-
const
|
|
370
|
-
const countedMs =
|
|
380
|
+
const currentTime = now();
|
|
381
|
+
const countedMs = currentTime - startedAt - (offThreadMigrationMs(currentTime) - migratedAtStart);
|
|
371
382
|
return budgetMs - countedMs;
|
|
372
383
|
};
|
|
373
384
|
const check = () => {
|
|
374
|
-
|
|
385
|
+
cancelTimer = undefined;
|
|
375
386
|
if (cancelled)
|
|
376
387
|
return;
|
|
377
388
|
if (isOffThreadMigrationRunning()) {
|
|
@@ -384,19 +395,18 @@ function startBootDeadline(timeoutMs, onDeferred) {
|
|
|
384
395
|
}
|
|
385
396
|
const left = remainingMs();
|
|
386
397
|
if (left > 0) {
|
|
387
|
-
|
|
398
|
+
cancelTimer = scheduleTimeout(check, left);
|
|
388
399
|
return;
|
|
389
400
|
}
|
|
390
401
|
resolveExpired();
|
|
391
402
|
};
|
|
392
|
-
|
|
403
|
+
cancelTimer = scheduleTimeout(check, budgetMs);
|
|
393
404
|
return {
|
|
394
405
|
expired,
|
|
395
406
|
cancel: () => {
|
|
396
407
|
cancelled = true;
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
timer = undefined;
|
|
408
|
+
cancelTimer?.();
|
|
409
|
+
cancelTimer = undefined;
|
|
400
410
|
}
|
|
401
411
|
};
|
|
402
412
|
}
|
|
@@ -413,7 +423,7 @@ function runMigrationsOffThread(data) {
|
|
|
413
423
|
return new Promise((resolve, reject) => {
|
|
414
424
|
let worker;
|
|
415
425
|
try {
|
|
416
|
-
worker = new Worker(workerEntryOverride ?? defaultWorkerEntry(), { workerData: data });
|
|
426
|
+
worker = inRootAsyncContext2(() => new Worker(workerEntryOverride ?? defaultWorkerEntry(), { workerData: data }));
|
|
417
427
|
} catch (error) {
|
|
418
428
|
reject(workerStartError(error instanceof Error ? error.message : String(error)));
|
|
419
429
|
return;
|
|
@@ -1199,8 +1209,8 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
|
|
|
1199
1209
|
startMessageFtsRowidMapBackfill(db).then(async () => {
|
|
1200
1210
|
if (!readsOpenCodeStore)
|
|
1201
1211
|
return;
|
|
1202
|
-
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-
|
|
1203
|
-
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-
|
|
1212
|
+
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-7f87tg2q.js"));
|
|
1213
|
+
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-rz1pnpaj.js"));
|
|
1204
1214
|
await startMessageTimeBackfill(db, Object.assign(readRawSessionMessages, {
|
|
1205
1215
|
readPage: readRawSessionMessagePage
|
|
1206
1216
|
}));
|
|
@@ -6,18 +6,21 @@ import {
|
|
|
6
6
|
StaleRouteHandleError,
|
|
7
7
|
SubcClient,
|
|
8
8
|
isConsumerReconnectTransient
|
|
9
|
-
} from "./server-
|
|
9
|
+
} from "./server-988cqjme.js";
|
|
10
10
|
import {
|
|
11
11
|
getHarness2
|
|
12
12
|
} from "./server-pavzsdc6.js";
|
|
13
13
|
import {
|
|
14
14
|
getDataDir,
|
|
15
15
|
log2
|
|
16
|
-
} from "./server-
|
|
16
|
+
} from "./server-9e5r8y60.js";
|
|
17
|
+
import {
|
|
18
|
+
inRootAsyncContext2
|
|
19
|
+
} from "./server-wafzvyhg.js";
|
|
17
20
|
import {
|
|
18
21
|
buildCanonicalChunkTextFromFts,
|
|
19
22
|
loadCompartmentChunkEmbeddingsForSearch
|
|
20
|
-
} from "./server-
|
|
23
|
+
} from "./server-9a6bwc12.js";
|
|
21
24
|
import {
|
|
22
25
|
recordEmbeddingMeasurement,
|
|
23
26
|
saveCommitEmbedding,
|
|
@@ -34,7 +37,7 @@ import {
|
|
|
34
37
|
enqueueShadowEmbeddingItems2,
|
|
35
38
|
getProjectEmbeddingSnapshot2,
|
|
36
39
|
embedItemsForProject2
|
|
37
|
-
} from "./server-
|
|
40
|
+
} from "./server-4easnf78.js";
|
|
38
41
|
import {
|
|
39
42
|
getProjectEmbeddings2
|
|
40
43
|
} from "./server-4dhv7mqz.js";
|
|
@@ -43,13 +46,13 @@ import {
|
|
|
43
46
|
isEmbeddingEnabled,
|
|
44
47
|
embedText,
|
|
45
48
|
ensureMemoryEmbeddings2
|
|
46
|
-
} from "./server-
|
|
49
|
+
} from "./server-4rs8sm06.js";
|
|
47
50
|
import {
|
|
48
51
|
ModuleMemoryAuthorityError2,
|
|
49
52
|
getMemoriesByProject2,
|
|
50
53
|
getMemoriesByProjects2,
|
|
51
54
|
updateMemoryRetrievalCount2
|
|
52
|
-
} from "./server-
|
|
55
|
+
} from "./server-n78avt2p.js";
|
|
53
56
|
import {
|
|
54
57
|
getNotes,
|
|
55
58
|
getActivePrimers,
|
|
@@ -58,20 +61,20 @@ import {
|
|
|
58
61
|
sanitizeFtsQuery,
|
|
59
62
|
searchMemoriesFTS,
|
|
60
63
|
searchMemoriesFTSUnion
|
|
61
|
-
} from "./server-
|
|
64
|
+
} from "./server-4zwx20yg.js";
|
|
62
65
|
import {
|
|
63
66
|
isRecord
|
|
64
|
-
} from "./server-
|
|
67
|
+
} from "./server-kmapq3v0.js";
|
|
65
68
|
import {
|
|
66
69
|
getIndexedMessageCorpusSize2
|
|
67
|
-
} from "./server-
|
|
70
|
+
} from "./server-z0rjemg1.js";
|
|
68
71
|
import {
|
|
69
72
|
resolveWorkspaceShareCategories,
|
|
70
73
|
resolveWorkspaceIdentitySet,
|
|
71
74
|
expandWorkspaceIdentitySetWithAliases,
|
|
72
75
|
resolveStoredPathWorkspaceIdentity,
|
|
73
76
|
sourceNameForMemory
|
|
74
|
-
} from "./server-
|
|
77
|
+
} from "./server-f27he3j1.js";
|
|
75
78
|
import {
|
|
76
79
|
isKnownAutocommit
|
|
77
80
|
} from "./server-8ajstryz.js";
|
|
@@ -232,6 +235,10 @@ var SERIAL_LANE_MAX_WAITERS = 16;
|
|
|
232
235
|
var SERIAL_LANE_MAX_WAITERS_PER_SESSION = 8;
|
|
233
236
|
var SERIAL_LANE_MIN_REMAINING_MS = 25;
|
|
234
237
|
var CANONICAL_ROOT_CACHE_MAX_ENTRIES = 256;
|
|
238
|
+
var monotonicClockForTests;
|
|
239
|
+
function monotonicNow() {
|
|
240
|
+
return monotonicClockForTests?.() ?? performance.now();
|
|
241
|
+
}
|
|
235
242
|
function getDefaultSubcConnectionFile() {
|
|
236
243
|
return join(getDataDir(), "cortexkit", "run", "subc-connection.json");
|
|
237
244
|
}
|
|
@@ -479,7 +486,7 @@ class SubcModuleTransport {
|
|
|
479
486
|
});
|
|
480
487
|
}
|
|
481
488
|
async call(args) {
|
|
482
|
-
const callStartedAt =
|
|
489
|
+
const callStartedAt = monotonicNow();
|
|
483
490
|
const timings = {
|
|
484
491
|
lane: 0,
|
|
485
492
|
route: 0,
|
|
@@ -525,7 +532,7 @@ class SubcModuleTransport {
|
|
|
525
532
|
}
|
|
526
533
|
throw error;
|
|
527
534
|
}
|
|
528
|
-
timings.lane =
|
|
535
|
+
timings.lane = monotonicNow() - callStartedAt;
|
|
529
536
|
let rejectAbort;
|
|
530
537
|
const aborted = new Promise((_resolve, reject) => {
|
|
531
538
|
rejectAbort = reject;
|
|
@@ -542,25 +549,25 @@ class SubcModuleTransport {
|
|
|
542
549
|
throw args.signal.reason ?? new Error("module transport call aborted");
|
|
543
550
|
}
|
|
544
551
|
const attemptDeadlineMs = Date.now() + attemptTimeoutMs;
|
|
545
|
-
const routeStartedAt =
|
|
552
|
+
const routeStartedAt = monotonicNow();
|
|
546
553
|
ensuredRoute = await this.ensureRoute(args.sessionId, args.projectRoot, attemptDeadlineMs, args.signal);
|
|
547
554
|
if (args.signal?.aborted) {
|
|
548
555
|
throw args.signal.reason ?? new Error("module transport call aborted");
|
|
549
556
|
}
|
|
550
|
-
timings.route +=
|
|
551
|
-
const encodeStartedAt =
|
|
557
|
+
timings.route += monotonicNow() - routeStartedAt;
|
|
558
|
+
const encodeStartedAt = monotonicNow();
|
|
552
559
|
const body = args.body instanceof Uint8Array ? args.body : Buffer.from(JSON.stringify(moduleRequestBody(args.body, args.method)));
|
|
553
|
-
timings.encode +=
|
|
554
|
-
const issueStartedAt =
|
|
560
|
+
timings.encode += monotonicNow() - encodeStartedAt;
|
|
561
|
+
const issueStartedAt = monotonicNow();
|
|
555
562
|
const request = ensuredRoute.client.request(ensuredRoute.route, body, {
|
|
556
563
|
priority: Priority.Background,
|
|
557
564
|
admissionClass: AdmissionClass.Normal,
|
|
558
565
|
timeoutMs: Math.max(1, attemptDeadlineMs - Date.now())
|
|
559
566
|
});
|
|
560
|
-
timings.issue +=
|
|
561
|
-
const waitStartedAt =
|
|
567
|
+
timings.issue += monotonicNow() - issueStartedAt;
|
|
568
|
+
const waitStartedAt = monotonicNow();
|
|
562
569
|
const response = await this.beforeDeadline(Promise.race([request, aborted]), attemptDeadlineMs, "waiting for the module response");
|
|
563
|
-
timings.responseWait +=
|
|
570
|
+
timings.responseWait += monotonicNow() - waitStartedAt;
|
|
564
571
|
initialResponseReceived = true;
|
|
565
572
|
if (this.client !== ensuredRoute.client || this.connectionGeneration !== ensuredRoute.generation) {
|
|
566
573
|
throw this.connectionChangedError("subc connection changed while awaiting the module response");
|
|
@@ -645,7 +652,7 @@ class SubcModuleTransport {
|
|
|
645
652
|
args.signal?.removeEventListener("abort", onAbort);
|
|
646
653
|
finishWrapupTracking();
|
|
647
654
|
releaseLane();
|
|
648
|
-
timings.settle = Math.max(0,
|
|
655
|
+
timings.settle = Math.max(0, monotonicNow() - callStartedAt - timings.lane - timings.route - timings.encode - timings.issue - timings.responseWait);
|
|
649
656
|
args.onTimings?.(timings);
|
|
650
657
|
}
|
|
651
658
|
}
|
|
@@ -744,10 +751,10 @@ class SubcModuleTransport {
|
|
|
744
751
|
return resolved;
|
|
745
752
|
}
|
|
746
753
|
connectClient() {
|
|
747
|
-
return SubcClient.connect({
|
|
754
|
+
return inRootAsyncContext2(() => SubcClient.connect({
|
|
748
755
|
connectionFile: this.connectionFile,
|
|
749
756
|
handshakeTimeoutMs: HANDSHAKE_TIMEOUT_MS
|
|
750
|
-
});
|
|
757
|
+
}));
|
|
751
758
|
}
|
|
752
759
|
backoffActiveError() {
|
|
753
760
|
const error = new Error(`subc connection backoff active until ${this.nextProbeMs}`);
|
|
@@ -1604,7 +1611,7 @@ var connections = new Map;
|
|
|
1604
1611
|
async function connect(connectionFile) {
|
|
1605
1612
|
let connection = connections.get(connectionFile);
|
|
1606
1613
|
if (!connection) {
|
|
1607
|
-
connection = SubcClient.connect({ connectionFile });
|
|
1614
|
+
connection = inRootAsyncContext2(() => SubcClient.connect({ connectionFile }));
|
|
1608
1615
|
connections.set(connectionFile, connection);
|
|
1609
1616
|
connection.catch(() => connections.delete(connectionFile));
|
|
1610
1617
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_LOCAL_EMBEDDING_MODEL
|
|
3
|
-
} from "./server-
|
|
3
|
+
} from "./server-7e087rvk.js";
|
|
4
4
|
import {
|
|
5
5
|
getHarness2
|
|
6
6
|
} from "./server-pavzsdc6.js";
|
|
@@ -8,10 +8,13 @@ import {
|
|
|
8
8
|
getMagicContextStorageDir,
|
|
9
9
|
importPluginModule,
|
|
10
10
|
log2
|
|
11
|
-
} from "./server-
|
|
11
|
+
} from "./server-9e5r8y60.js";
|
|
12
12
|
import {
|
|
13
13
|
getSynapseLaneIdentity
|
|
14
|
-
} from "./server-
|
|
14
|
+
} from "./server-988cqjme.js";
|
|
15
|
+
import {
|
|
16
|
+
inRootAsyncContext2
|
|
17
|
+
} from "./server-wafzvyhg.js";
|
|
15
18
|
import {
|
|
16
19
|
computeNormalizedHash
|
|
17
20
|
} from "./server-2bvekkfy.js";
|
|
@@ -307,7 +310,7 @@ class EmbeddingWorkerClient {
|
|
|
307
310
|
start() {
|
|
308
311
|
if (this.startPromise)
|
|
309
312
|
return this.startPromise;
|
|
310
|
-
this.startPromise = this.startOwner().finally(() => {
|
|
313
|
+
this.startPromise = inRootAsyncContext2(() => this.startOwner()).finally(() => {
|
|
311
314
|
this.startPromise = null;
|
|
312
315
|
});
|
|
313
316
|
return this.startPromise;
|
|
@@ -556,10 +559,10 @@ async function acquireModelLoadLock(lockPath) {
|
|
|
556
559
|
}
|
|
557
560
|
function startLockHeartbeat(lockPath) {
|
|
558
561
|
const HEARTBEAT_MS = Math.floor(STALE_LOCK_MS / 3);
|
|
559
|
-
const timer = setInterval(() => {
|
|
562
|
+
const timer = inRootAsyncContext2(() => setInterval(() => {
|
|
560
563
|
writeStorageFileAsync(lockPath, `pid=${process.pid} alive=${Date.now()}
|
|
561
564
|
`).catch(() => {});
|
|
562
|
-
}, HEARTBEAT_MS);
|
|
565
|
+
}, HEARTBEAT_MS));
|
|
563
566
|
timer.unref?.();
|
|
564
567
|
return () => clearInterval(timer);
|
|
565
568
|
}
|