@cortexkit/opencode-magic-context 0.49.7 → 0.49.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto-search-worker.js +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/{conflict-warning-hook-myk5hbt9.js → conflict-warning-hook-w3crzrar.js} +8 -8
- package/dist/{context-ffr7e0g7.js → context-x0ccfv0f.js} +65 -42
- 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/project-embedding-registry.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/auto-search-worker-client.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/edit-marker.d.ts +2 -0
- package/dist/hooks/magic-context/edit-marker.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/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/tool-drop-target.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-4mjhqadz.js → index-150zz6fh.js} +1 -1
- package/dist/{index-j58gqrn2.js → index-2rw244rh.js} +31 -24
- package/dist/{index-0gyq3djm.js → index-4hb8nt93.js} +3 -3
- package/dist/{index-ax2jhztn.js → index-7bjgyaj1.js} +4 -4
- package/dist/{index-h2wc01qk.js → index-8kk7yh6m.js} +2 -2
- package/dist/{index-n5a170gs.js → index-9g1c4bt9.js} +81 -58
- package/dist/{index-w6bd03dc.js → index-a43xq1pg.js} +5 -5
- package/dist/{index-tqf7yg27.js → index-a4b0gbyg.js} +1 -1
- package/dist/{index-37q80veb.js → index-angx1s0k.js} +4 -3
- package/dist/{index-wq16ahsn.js → index-b4gcb3rk.js} +8 -8
- package/dist/{index-z1tjp257.js → index-b64n4d0h.js} +1 -1
- package/dist/{index-1bt88epp.js → index-bd9cjab3.js} +1 -1
- package/dist/{index-gbmqa9x9.js → index-bmwfzz28.js} +9 -6
- package/dist/{index-qx53vezw.js → index-gjvjh960.js} +1 -1
- package/dist/{index-ebnngykq.js → index-gzg9ekc1.js} +19 -18
- package/dist/{index-5tbvdff4.js → index-hxrvx6cy.js} +79 -40
- 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-vt4sf4ep.js → index-pgy3h49n.js} +4 -4
- package/dist/{index-w6vr754t.js → index-pjgzdezw.js} +13 -9
- package/dist/{v2/server-1rfgbjfn.js → index-q28hsbpg.js} +15 -3
- package/dist/{index-a8acx4gc.js → index-q76br5zn.js} +3 -3
- package/dist/{index-j5hce1ab.js → index-qgp5vnt4.js} +5 -5
- package/dist/{index-sf94at64.js → index-rg1cezmj.js} +22 -22
- package/dist/{index-sh91t19a.js → index-s178h9z8.js} +4 -3
- package/dist/{index-tagss15p.js → index-w1ejb9qr.js} +105 -58
- package/dist/{index-k6xvbj2e.js → index-w28y7d0z.js} +2 -0
- package/dist/{index-j8epsc0g.js → index-wafzvyhg.js} +33 -10
- package/dist/{index-rwmpkss5.js → index-xf6k8szp.js} +4 -4
- package/dist/{index-tmtty2x5.js → index-xpn05jxq.js} +4 -4
- package/dist/{index-n7kwfw2r.js → index-ydjgz36f.js} +7 -7
- package/dist/{index-4btknbqh.js → index-zf9nydbd.js} +48 -38
- package/dist/index.js +51 -50
- package/dist/{logger-ewak5q1s.js → logger-wn328tfg.js} +1 -1
- package/dist/{message-index-bounded-04rycpx4.js → message-index-bounded-hxjp56qk.js} +16 -16
- package/dist/{message-index-rqtse28y.js → message-index-zs882h8e.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/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-t9r7r0sg.js} +11 -11
- package/dist/{read-session-raw-vdf4wh78.js → read-session-raw-gm6xj30v.js} +3 -3
- package/dist/recomp-orchestrator-gr36zvd2.js +60 -0
- package/dist/{safe-notification-target-q0cyrx3x.js → safe-notification-target-jdynm677.js} +2 -2
- package/dist/{search-3rbdx6hw.js → search-qjen1pmz.js} +24 -24
- package/dist/{send-session-notification-2tp44tfa.js → send-session-notification-q8ngbap3.js} +6 -6
- 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/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/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-a513rkj3.js} +5 -5
- package/dist/{transform-postprocess-phase-7qts7h54.js → transform-postprocess-phase-yv463b7y.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-wd82v9z6.js} +137 -68
- 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/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-bounded-5vh1h2g7.js → message-index-bounded-madg2kfr.js} +16 -16
- package/dist/v2/{message-index-8e5z2xx8.js → message-index-yd94vt9n.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-7qs791f3.js} +11 -11
- package/dist/v2/{read-session-raw-a3hw9jsp.js → read-session-raw-h4azh85b.js} +3 -3
- package/dist/v2/recomp-orchestrator-ee91r9s6.js +59 -0
- package/dist/v2/{safe-notification-target-y3p1hce9.js → safe-notification-target-936374xx.js} +2 -2
- package/dist/v2/search-pn15rr52.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-08k4zkfk.js} +48 -38
- 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-hcvcxzx7.js → server-4gz0xkrc.js} +5 -5
- 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-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-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-7ekna9zs.js → server-adfte03x.js} +2 -2
- 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-676xw7at.js → server-ckrb5rm8.js} +1 -1
- package/dist/{index-w4mw92w3.js → v2/server-cxsr0ng6.js} +15 -3
- package/dist/v2/{server-t528t8qm.js → server-hn9fb3v0.js} +2 -2
- package/dist/v2/{server-7srtwsa4.js → server-j3dm74ey.js} +9 -9
- package/dist/v2/{server-w3zeywp1.js → server-jjsf29aq.js} +4 -4
- 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-mv1w7t6z.js → server-q360kdb8.js} +77 -38
- package/dist/v2/{server-kzns2hbz.js → server-s6jqh8bj.js} +1 -1
- package/dist/v2/{server-6byqfbqf.js → server-shme41gj.js} +1 -1
- package/dist/v2/{server-j8epsc0g.js → server-wafzvyhg.js} +33 -10
- package/dist/v2/{server-gtv9wbhq.js → server-xj4mewze.js} +81 -58
- package/dist/v2/{server-nfan6zb6.js → server-y5g32dhq.js} +31 -24
- package/dist/v2/{server-jdwd03ep.js → server-yak3sxya.js} +7 -7
- 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-spa92sgj.js} +5 -5
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/{wrapup-orchestrator-s92ebfzv.js → wrapup-orchestrator-5wxy1ggv.js} +38 -35
- package/dist/wrapup-orchestrator-gv08c6f9.js +47 -0
- package/package.json +1 -1
- package/src/config/compaction-accessor-guard.test.ts +3 -0
- package/src/features/magic-context/dreamer/cron.ts +8 -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/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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unresolved-history-boundary.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/unresolved-history-boundary.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unresolved-history-boundary.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/unresolved-history-boundary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAIpD,sGAAsG;AACtG,wBAAgB,6BAA6B,CACzC,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,GAClB,OAAO,GAAG,SAAS,CAWrB;AAED;;;;;;GAMG;AACH,qBAAa,8BAA+B,SAAQ,KAAK;IAKjD,QAAQ,CAAC,eAAe,EAAE,MAAM;IAChC,QAAQ,CAAC,kBAAkB,EAAE,MAAM;IACnC,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO;IANtC,QAAQ,CAAC,IAAI,iCAAiC;IAC9C,QAAQ,CAAC,WAAW,QAAQ;gBAGf,eAAe,EAAE,MAAM,EACvB,kBAAkB,EAAE,MAAM,EAC1B,eAAe,CAAC,EAAE,OAAO,YAAA;CAWzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrapup-orchestrator.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/wrapup-orchestrator.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AASvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAIlE,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAC9D,YAAY,EAAE,MAAM,CAAC;IACrB,0BAA0B,EAAE,MAAM,CAAC;IACnC,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IACvD,4BAA4B,CAAC,EAAE,OAAO,mBAAmB,CAAC;IAC1D,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,WAAW,aAAa;IAC1B,cAAc,EAAE,MAAM,CAAC;CAC1B;
|
|
1
|
+
{"version":3,"file":"wrapup-orchestrator.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/wrapup-orchestrator.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AASvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAIlE,MAAM,WAAW,oBAAqB,SAAQ,oBAAoB;IAC9D,YAAY,EAAE,MAAM,CAAC;IACrB,0BAA0B,EAAE,MAAM,CAAC;IACnC,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC;IACvD,4BAA4B,CAAC,EAAE,OAAO,mBAAmB,CAAC;IAC1D,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACrC;AAED,MAAM,WAAW,aAAa;IAC1B,cAAc,EAAE,MAAM,CAAC;CAC1B;AAkPD,wBAAsB,gBAAgB,CAClC,GAAG,EAAE,oBAAoB,EACzB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,aAAa,GACvB,OAAO,CAAC,MAAM,CAAC,CA2BjB"}
|
|
@@ -3,10 +3,13 @@ import {
|
|
|
3
3
|
} from "./index-0sahzkwr.js";
|
|
4
4
|
import {
|
|
5
5
|
log2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-mvvephtj.js";
|
|
7
|
+
import {
|
|
8
|
+
inRootAsyncContext2
|
|
9
|
+
} from "./index-wafzvyhg.js";
|
|
7
10
|
import {
|
|
8
11
|
projectDirectoryKey
|
|
9
|
-
} from "./index-
|
|
12
|
+
} from "./index-knvkbfvh.js";
|
|
10
13
|
import {
|
|
11
14
|
writeStorageFileAtomicSync
|
|
12
15
|
} from "./index-fvnzcnww.js";
|
|
@@ -539,7 +542,7 @@ function bootQuietRemainingMs(now = Date.now()) {
|
|
|
539
542
|
return Math.max(0, bootQuietUntilMs - now);
|
|
540
543
|
}
|
|
541
544
|
function scheduleAfterBootQuiet(task, additionalDelayMs = 0) {
|
|
542
|
-
const timer = setTimeout(task, bootQuietRemainingMs() + Math.max(0, additionalDelayMs));
|
|
545
|
+
const timer = inRootAsyncContext2(() => setTimeout(task, bootQuietRemainingMs() + Math.max(0, additionalDelayMs)));
|
|
543
546
|
timer.unref?.();
|
|
544
547
|
return timer;
|
|
545
548
|
}
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
StaleRouteHandleError,
|
|
7
7
|
SubcClient,
|
|
8
8
|
isConsumerReconnectTransient
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-kvw6xew3.js";
|
|
10
10
|
import {
|
|
11
11
|
getHarness2
|
|
12
12
|
} from "./index-pavzsdc6.js";
|
|
@@ -15,11 +15,14 @@ import {
|
|
|
15
15
|
} from "./index-0sahzkwr.js";
|
|
16
16
|
import {
|
|
17
17
|
log2
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-mvvephtj.js";
|
|
19
|
+
import {
|
|
20
|
+
inRootAsyncContext2
|
|
21
|
+
} from "./index-wafzvyhg.js";
|
|
19
22
|
import {
|
|
20
23
|
buildCanonicalChunkTextFromFts,
|
|
21
24
|
loadCompartmentChunkEmbeddingsForSearch
|
|
22
|
-
} from "./index-
|
|
25
|
+
} from "./index-7bjgyaj1.js";
|
|
23
26
|
import {
|
|
24
27
|
recordEmbeddingMeasurement,
|
|
25
28
|
saveCommitEmbedding,
|
|
@@ -36,7 +39,7 @@ import {
|
|
|
36
39
|
enqueueShadowEmbeddingItems2,
|
|
37
40
|
getProjectEmbeddingSnapshot2,
|
|
38
41
|
embedItemsForProject2
|
|
39
|
-
} from "./index-
|
|
42
|
+
} from "./index-rg1cezmj.js";
|
|
40
43
|
import {
|
|
41
44
|
getProjectEmbeddings2
|
|
42
45
|
} from "./index-4dhv7mqz.js";
|
|
@@ -45,13 +48,13 @@ import {
|
|
|
45
48
|
isEmbeddingEnabled,
|
|
46
49
|
embedText,
|
|
47
50
|
ensureMemoryEmbeddings2
|
|
48
|
-
} from "./index-
|
|
51
|
+
} from "./index-a43xq1pg.js";
|
|
49
52
|
import {
|
|
50
53
|
ModuleMemoryAuthorityError2,
|
|
51
54
|
getMemoriesByProject2,
|
|
52
55
|
getMemoriesByProjects2,
|
|
53
56
|
updateMemoryRetrievalCount2
|
|
54
|
-
} from "./index-
|
|
57
|
+
} from "./index-n78avt2p.js";
|
|
55
58
|
import {
|
|
56
59
|
USER_FACING_FAILURES,
|
|
57
60
|
getNotes,
|
|
@@ -60,20 +63,20 @@ import {
|
|
|
60
63
|
sanitizeFtsQuery,
|
|
61
64
|
searchMemoriesFTS,
|
|
62
65
|
searchMemoriesFTSUnion
|
|
63
|
-
} from "./index-
|
|
66
|
+
} from "./index-ydjgz36f.js";
|
|
64
67
|
import {
|
|
65
68
|
isRecord
|
|
66
|
-
} from "./index-
|
|
69
|
+
} from "./index-xpn05jxq.js";
|
|
67
70
|
import {
|
|
68
71
|
getIndexedMessageCorpusSize2
|
|
69
|
-
} from "./index-
|
|
72
|
+
} from "./index-b4gcb3rk.js";
|
|
70
73
|
import {
|
|
71
74
|
resolveWorkspaceShareCategories,
|
|
72
75
|
resolveWorkspaceIdentitySet,
|
|
73
76
|
expandWorkspaceIdentitySetWithAliases,
|
|
74
77
|
resolveStoredPathWorkspaceIdentity,
|
|
75
78
|
sourceNameForMemory
|
|
76
|
-
} from "./index-
|
|
79
|
+
} from "./index-qgp5vnt4.js";
|
|
77
80
|
import {
|
|
78
81
|
isKnownAutocommit
|
|
79
82
|
} from "./index-8ajstryz.js";
|
|
@@ -234,6 +237,10 @@ var SERIAL_LANE_MAX_WAITERS = 16;
|
|
|
234
237
|
var SERIAL_LANE_MAX_WAITERS_PER_SESSION = 8;
|
|
235
238
|
var SERIAL_LANE_MIN_REMAINING_MS = 25;
|
|
236
239
|
var CANONICAL_ROOT_CACHE_MAX_ENTRIES = 256;
|
|
240
|
+
var monotonicClockForTests;
|
|
241
|
+
function monotonicNow() {
|
|
242
|
+
return monotonicClockForTests?.() ?? performance.now();
|
|
243
|
+
}
|
|
237
244
|
function getDefaultSubcConnectionFile() {
|
|
238
245
|
return join(getDataDir(), "cortexkit", "run", "subc-connection.json");
|
|
239
246
|
}
|
|
@@ -481,7 +488,7 @@ class SubcModuleTransport {
|
|
|
481
488
|
});
|
|
482
489
|
}
|
|
483
490
|
async call(args) {
|
|
484
|
-
const callStartedAt =
|
|
491
|
+
const callStartedAt = monotonicNow();
|
|
485
492
|
const timings = {
|
|
486
493
|
lane: 0,
|
|
487
494
|
route: 0,
|
|
@@ -527,7 +534,7 @@ class SubcModuleTransport {
|
|
|
527
534
|
}
|
|
528
535
|
throw error;
|
|
529
536
|
}
|
|
530
|
-
timings.lane =
|
|
537
|
+
timings.lane = monotonicNow() - callStartedAt;
|
|
531
538
|
let rejectAbort;
|
|
532
539
|
const aborted = new Promise((_resolve, reject) => {
|
|
533
540
|
rejectAbort = reject;
|
|
@@ -544,25 +551,25 @@ class SubcModuleTransport {
|
|
|
544
551
|
throw args.signal.reason ?? new Error("module transport call aborted");
|
|
545
552
|
}
|
|
546
553
|
const attemptDeadlineMs = Date.now() + attemptTimeoutMs;
|
|
547
|
-
const routeStartedAt =
|
|
554
|
+
const routeStartedAt = monotonicNow();
|
|
548
555
|
ensuredRoute = await this.ensureRoute(args.sessionId, args.projectRoot, attemptDeadlineMs, args.signal);
|
|
549
556
|
if (args.signal?.aborted) {
|
|
550
557
|
throw args.signal.reason ?? new Error("module transport call aborted");
|
|
551
558
|
}
|
|
552
|
-
timings.route +=
|
|
553
|
-
const encodeStartedAt =
|
|
559
|
+
timings.route += monotonicNow() - routeStartedAt;
|
|
560
|
+
const encodeStartedAt = monotonicNow();
|
|
554
561
|
const body = args.body instanceof Uint8Array ? args.body : Buffer.from(JSON.stringify(moduleRequestBody(args.body, args.method)));
|
|
555
|
-
timings.encode +=
|
|
556
|
-
const issueStartedAt =
|
|
562
|
+
timings.encode += monotonicNow() - encodeStartedAt;
|
|
563
|
+
const issueStartedAt = monotonicNow();
|
|
557
564
|
const request = ensuredRoute.client.request(ensuredRoute.route, body, {
|
|
558
565
|
priority: Priority.Background,
|
|
559
566
|
admissionClass: AdmissionClass.Normal,
|
|
560
567
|
timeoutMs: Math.max(1, attemptDeadlineMs - Date.now())
|
|
561
568
|
});
|
|
562
|
-
timings.issue +=
|
|
563
|
-
const waitStartedAt =
|
|
569
|
+
timings.issue += monotonicNow() - issueStartedAt;
|
|
570
|
+
const waitStartedAt = monotonicNow();
|
|
564
571
|
const response = await this.beforeDeadline(Promise.race([request, aborted]), attemptDeadlineMs, "waiting for the module response");
|
|
565
|
-
timings.responseWait +=
|
|
572
|
+
timings.responseWait += monotonicNow() - waitStartedAt;
|
|
566
573
|
initialResponseReceived = true;
|
|
567
574
|
if (this.client !== ensuredRoute.client || this.connectionGeneration !== ensuredRoute.generation) {
|
|
568
575
|
throw this.connectionChangedError("subc connection changed while awaiting the module response");
|
|
@@ -647,7 +654,7 @@ class SubcModuleTransport {
|
|
|
647
654
|
args.signal?.removeEventListener("abort", onAbort);
|
|
648
655
|
finishWrapupTracking();
|
|
649
656
|
releaseLane();
|
|
650
|
-
timings.settle = Math.max(0,
|
|
657
|
+
timings.settle = Math.max(0, monotonicNow() - callStartedAt - timings.lane - timings.route - timings.encode - timings.issue - timings.responseWait);
|
|
651
658
|
args.onTimings?.(timings);
|
|
652
659
|
}
|
|
653
660
|
}
|
|
@@ -746,10 +753,10 @@ class SubcModuleTransport {
|
|
|
746
753
|
return resolved;
|
|
747
754
|
}
|
|
748
755
|
connectClient() {
|
|
749
|
-
return SubcClient.connect({
|
|
756
|
+
return inRootAsyncContext2(() => SubcClient.connect({
|
|
750
757
|
connectionFile: this.connectionFile,
|
|
751
758
|
handshakeTimeoutMs: HANDSHAKE_TIMEOUT_MS
|
|
752
|
-
});
|
|
759
|
+
}));
|
|
753
760
|
}
|
|
754
761
|
backoffActiveError() {
|
|
755
762
|
const error = new Error(`subc connection backoff active until ${this.nextProbeMs}`);
|
|
@@ -1606,7 +1613,7 @@ var connections = new Map;
|
|
|
1606
1613
|
async function connect(connectionFile) {
|
|
1607
1614
|
let connection = connections.get(connectionFile);
|
|
1608
1615
|
if (!connection) {
|
|
1609
|
-
connection = SubcClient.connect({ connectionFile });
|
|
1616
|
+
connection = inRootAsyncContext2(() => SubcClient.connect({ connectionFile }));
|
|
1610
1617
|
connections.set(connectionFile, connection);
|
|
1611
1618
|
connection.catch(() => connections.delete(connectionFile));
|
|
1612
1619
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
importPluginModule,
|
|
3
3
|
log2
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-mvvephtj.js";
|
|
5
5
|
import {
|
|
6
6
|
sendStatusNotification2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-pgy3h49n.js";
|
|
8
8
|
import {
|
|
9
9
|
formatConflictShort
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-b64n4d0h.js";
|
|
11
11
|
|
|
12
12
|
// src/plugin/conflict-warning-hook.ts
|
|
13
13
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getTokenEstimatorFingerprint,
|
|
3
3
|
estimateTokens
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-gjvjh960.js";
|
|
5
5
|
import {
|
|
6
6
|
getHarness2
|
|
7
7
|
} from "./index-pavzsdc6.js";
|
|
8
8
|
import {
|
|
9
9
|
log2
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-mvvephtj.js";
|
|
11
11
|
import {
|
|
12
12
|
isSynapseEmbeddingTruncated
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-kvw6xew3.js";
|
|
14
14
|
import {
|
|
15
15
|
messageFtsOrdinalRangeIsMapped
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-mp2kghkv.js";
|
|
17
17
|
|
|
18
18
|
// src/features/magic-context/compartment-chunk-embedding.ts
|
|
19
19
|
import { createHash } from "node:crypto";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
estimateTokens
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-gjvjh960.js";
|
|
4
4
|
import {
|
|
5
5
|
stableStringify
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-bd9cjab3.js";
|
|
7
7
|
|
|
8
8
|
// src/features/magic-context/tool-definition-tokens.ts
|
|
9
9
|
import { createHash } from "node:crypto";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./index-pavzsdc6.js";
|
|
4
4
|
import {
|
|
5
5
|
sessionLog2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-mvvephtj.js";
|
|
7
7
|
import {
|
|
8
8
|
UNKNOWN_FIT_RATIO,
|
|
9
9
|
resolveDecisionCalibration,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
TAG_SELECT_COLUMNS2,
|
|
24
24
|
getCandidateToolOwners2,
|
|
25
25
|
pickNearestPriorOwner2
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-xpn05jxq.js";
|
|
27
27
|
import {
|
|
28
28
|
OMO_INTERNAL_INITIATOR_MARKER,
|
|
29
29
|
isSystemDirective,
|
|
@@ -40,18 +40,18 @@ import {
|
|
|
40
40
|
formatBlock,
|
|
41
41
|
compactTextForSummary,
|
|
42
42
|
mergeCommitHashes
|
|
43
|
-
} from "./index-
|
|
43
|
+
} from "./index-gjvjh960.js";
|
|
44
44
|
import {
|
|
45
45
|
prepareCachedStatement2
|
|
46
|
-
} from "./index-
|
|
46
|
+
} from "./index-wafzvyhg.js";
|
|
47
47
|
import {
|
|
48
48
|
stableStringify
|
|
49
|
-
} from "./index-
|
|
49
|
+
} from "./index-bd9cjab3.js";
|
|
50
50
|
import {
|
|
51
51
|
renderToolTemplate,
|
|
52
52
|
resolveModelConfigValue,
|
|
53
53
|
deriveDefaultProtectedTokens
|
|
54
|
-
} from "./index-
|
|
54
|
+
} from "./index-w28y7d0z.js";
|
|
55
55
|
import {
|
|
56
56
|
readRawSessionMessagesFromDb2,
|
|
57
57
|
readRawSessionMessagePageFromDb2,
|
|
@@ -68,25 +68,25 @@ import {
|
|
|
68
68
|
readRawSeedTailFromDb2,
|
|
69
69
|
readRawSessionBoundaryEndpointsFromDb2,
|
|
70
70
|
prewarmRawSessionOrdinalsForDb
|
|
71
|
-
} from "./index-
|
|
71
|
+
} from "./index-angx1s0k.js";
|
|
72
72
|
import {
|
|
73
73
|
openCodeDbExists,
|
|
74
74
|
withReadOnlySessionDb,
|
|
75
75
|
getRawSessionMessageCountFromDb,
|
|
76
76
|
getMessageTimesFromOpenCodeDb
|
|
77
|
-
} from "./index-
|
|
77
|
+
} from "./index-q76br5zn.js";
|
|
78
78
|
import {
|
|
79
79
|
getToolDefinitionMeasurementSignature,
|
|
80
80
|
getLargestMeasuredToolDefinitionTokens,
|
|
81
81
|
getMeasuredToolDefinitionTokens
|
|
82
|
-
} from "./index-
|
|
82
|
+
} from "./index-8kk7yh6m.js";
|
|
83
83
|
import {
|
|
84
84
|
canonicalModelIdentity,
|
|
85
85
|
piModelRefToCanonical
|
|
86
86
|
} from "./index-avwt563y.js";
|
|
87
87
|
import {
|
|
88
88
|
logSlowWriteTransaction
|
|
89
|
-
} from "./index-
|
|
89
|
+
} from "./index-150zz6fh.js";
|
|
90
90
|
|
|
91
91
|
// src/features/magic-context/dreamer/token-budget.ts
|
|
92
92
|
class DreamTokenBudgetExceeded extends Error {
|
|
@@ -1182,6 +1182,12 @@ function safeSlice(str, maxLen) {
|
|
|
1182
1182
|
function isEditTool(name) {
|
|
1183
1183
|
return name === "edit" || name === "write";
|
|
1184
1184
|
}
|
|
1185
|
+
function needsEditMarker(input) {
|
|
1186
|
+
return Object.keys(input).some((key) => {
|
|
1187
|
+
const value = input[key];
|
|
1188
|
+
return DIFF_KEYS.has(key) && typeof value === "string" && value.length > EDIT_REGION_HINT_LEN && !value.endsWith(TRUNCATION_SENTINEL);
|
|
1189
|
+
});
|
|
1190
|
+
}
|
|
1185
1191
|
function applyEditMarkerToInput(input) {
|
|
1186
1192
|
for (const key of Object.keys(input)) {
|
|
1187
1193
|
if (PATH_KEYS.has(key))
|
|
@@ -5824,24 +5830,18 @@ function setToolContent(part, content) {
|
|
|
5824
5830
|
}
|
|
5825
5831
|
}
|
|
5826
5832
|
function clonePart(part) {
|
|
5827
|
-
|
|
5828
|
-
|
|
5829
|
-
|
|
5830
|
-
|
|
5831
|
-
} catch {
|
|
5832
|
-
try {
|
|
5833
|
-
return JSON.parse(JSON.stringify(part));
|
|
5834
|
-
} catch {
|
|
5835
|
-
return part;
|
|
5836
|
-
}
|
|
5837
|
-
}
|
|
5833
|
+
return {
|
|
5834
|
+
...part,
|
|
5835
|
+
...isRecord(part.state) ? { state: { ...part.state } } : {}
|
|
5836
|
+
};
|
|
5838
5837
|
}
|
|
5839
5838
|
function clampCloneInPlace(occurrence, clamp) {
|
|
5840
|
-
const clone = clonePart(occurrence.part);
|
|
5841
|
-
clamp(clone);
|
|
5842
5839
|
const parts = occurrence.message.parts;
|
|
5843
5840
|
const index = parts.indexOf(servedPart(occurrence));
|
|
5844
5841
|
if (index >= 0) {
|
|
5842
|
+
const clone = clamp(occurrence.part);
|
|
5843
|
+
if (clone === servedPart(occurrence))
|
|
5844
|
+
return;
|
|
5845
5845
|
parts[index] = clone;
|
|
5846
5846
|
occurrence.served = clone;
|
|
5847
5847
|
}
|
|
@@ -5851,17 +5851,24 @@ function servedPart(occurrence) {
|
|
|
5851
5851
|
}
|
|
5852
5852
|
function skeletonRealToolPart(part, tagId, stripAttachments = false) {
|
|
5853
5853
|
if (!isRecord(part))
|
|
5854
|
-
return;
|
|
5854
|
+
return part;
|
|
5855
5855
|
const sentinel = `[dropped §${tagId}§]`;
|
|
5856
5856
|
if (part.type === "tool" && isRecord(part.state)) {
|
|
5857
|
-
part.state.output
|
|
5857
|
+
if (part.state.output === sentinel && !needsAttachmentStrip(part.state, stripAttachments))
|
|
5858
|
+
return part;
|
|
5859
|
+
const clone = clonePart(part);
|
|
5860
|
+
const state = clone.state;
|
|
5861
|
+
state.output = sentinel;
|
|
5858
5862
|
if (stripAttachments)
|
|
5859
|
-
|
|
5860
|
-
return;
|
|
5861
|
-
}
|
|
5862
|
-
if (part.type === "tool_result") {
|
|
5863
|
-
part.content = sentinel;
|
|
5863
|
+
state.attachments = [];
|
|
5864
|
+
return clone;
|
|
5864
5865
|
}
|
|
5866
|
+
if (part.type === "tool_result" && part.content !== sentinel)
|
|
5867
|
+
return { ...part, content: sentinel };
|
|
5868
|
+
return part;
|
|
5869
|
+
}
|
|
5870
|
+
function needsAttachmentStrip(state, strip) {
|
|
5871
|
+
return strip && (!Array.isArray(state.attachments) || state.attachments.length !== 0);
|
|
5865
5872
|
}
|
|
5866
5873
|
function readToolPartRawInput(part) {
|
|
5867
5874
|
if (!isRecord(part))
|
|
@@ -5874,51 +5881,62 @@ function readToolPartRawInput(part) {
|
|
|
5874
5881
|
return part.input;
|
|
5875
5882
|
return;
|
|
5876
5883
|
}
|
|
5884
|
+
function isDroppedInput(input, sentinel) {
|
|
5885
|
+
return isRecord(input) && Object.keys(input).length === 1 && Object.hasOwn(input, "dropped") && input.dropped === sentinel;
|
|
5886
|
+
}
|
|
5877
5887
|
function truncateToolPart(part, tagId) {
|
|
5878
5888
|
if (!isRecord(part))
|
|
5879
|
-
return;
|
|
5889
|
+
return part;
|
|
5880
5890
|
const sentinel = `[dropped §${tagId}§]`;
|
|
5881
5891
|
if (part.type === "tool" && isRecord(part.state)) {
|
|
5882
|
-
|
|
5892
|
+
if (part.state.output === sentinel && isDroppedInput(part.state.input, sentinel))
|
|
5893
|
+
return part;
|
|
5894
|
+
const clone = clonePart(part);
|
|
5895
|
+
const state = clone.state;
|
|
5883
5896
|
state.output = sentinel;
|
|
5884
5897
|
state.input = droppedInputMarker(tagId);
|
|
5885
|
-
return;
|
|
5898
|
+
return clone;
|
|
5886
5899
|
}
|
|
5887
5900
|
if (part.type === "tool_result") {
|
|
5888
|
-
part.content
|
|
5889
|
-
return;
|
|
5901
|
+
return part.content === sentinel ? part : { ...part, content: sentinel };
|
|
5890
5902
|
}
|
|
5891
5903
|
if (part.type === "tool-invocation") {
|
|
5892
|
-
part.args
|
|
5893
|
-
return;
|
|
5904
|
+
return isDroppedInput(part.args, sentinel) ? part : { ...part, args: droppedInputMarker(tagId) };
|
|
5894
5905
|
}
|
|
5895
5906
|
if (part.type === "tool_use") {
|
|
5896
|
-
part.input
|
|
5907
|
+
return isDroppedInput(part.input, sentinel) ? part : { ...part, input: droppedInputMarker(tagId) };
|
|
5897
5908
|
}
|
|
5909
|
+
return part;
|
|
5898
5910
|
}
|
|
5899
5911
|
function editMarkerToolPart(part, tagId, stripAttachments = false) {
|
|
5900
5912
|
if (!isRecord(part))
|
|
5901
|
-
return;
|
|
5913
|
+
return part;
|
|
5902
5914
|
const sentinel = `[dropped §${tagId}§]`;
|
|
5915
|
+
const input = readToolPartInput(part);
|
|
5916
|
+
const rewriteInput = input !== null && needsEditMarker(input);
|
|
5903
5917
|
if (part.type === "tool" && isRecord(part.state)) {
|
|
5904
|
-
part.state.output
|
|
5918
|
+
if (part.state.output === sentinel && !rewriteInput && !needsAttachmentStrip(part.state, stripAttachments))
|
|
5919
|
+
return part;
|
|
5920
|
+
const clone = clonePart(part);
|
|
5921
|
+
const state = clone.state;
|
|
5922
|
+
state.output = sentinel;
|
|
5905
5923
|
if (stripAttachments)
|
|
5906
|
-
|
|
5907
|
-
if (
|
|
5908
|
-
|
|
5909
|
-
|
|
5924
|
+
state.attachments = [];
|
|
5925
|
+
if (rewriteInput) {
|
|
5926
|
+
state.input = { ...input };
|
|
5927
|
+
applyEditMarkerToInput(state.input);
|
|
5928
|
+
}
|
|
5929
|
+
return clone;
|
|
5910
5930
|
}
|
|
5911
5931
|
if (part.type === "tool_result") {
|
|
5912
|
-
part.content
|
|
5913
|
-
return;
|
|
5914
|
-
}
|
|
5915
|
-
if (part.type === "tool-invocation" && isRecord(part.args)) {
|
|
5916
|
-
applyEditMarkerToInput(part.args);
|
|
5917
|
-
return;
|
|
5932
|
+
return part.content === sentinel ? part : { ...part, content: sentinel };
|
|
5918
5933
|
}
|
|
5919
|
-
if (
|
|
5920
|
-
|
|
5934
|
+
if (rewriteInput) {
|
|
5935
|
+
const markedInput = { ...input };
|
|
5936
|
+
applyEditMarkerToInput(markedInput);
|
|
5937
|
+
return { ...part, [part.type === "tool-invocation" ? "args" : "input"]: markedInput };
|
|
5921
5938
|
}
|
|
5939
|
+
return part;
|
|
5922
5940
|
}
|
|
5923
5941
|
function readToolPartInput(part) {
|
|
5924
5942
|
if (!isRecord(part))
|
|
@@ -6147,9 +6165,7 @@ function createToolDropTarget(compositeKey, thinkingParts, index, batch, tagId)
|
|
|
6147
6165
|
parts
|
|
6148
6166
|
});
|
|
6149
6167
|
const before = count(parts);
|
|
6150
|
-
const retained = skeleton ?
|
|
6151
|
-
for (const part of retained)
|
|
6152
|
-
skeletonRealToolPart(part, tagId);
|
|
6168
|
+
const retained = skeleton ? parts.map((part) => skeletonRealToolPart(part, tagId)) : [];
|
|
6153
6169
|
const after = count(retained);
|
|
6154
6170
|
return {
|
|
6155
6171
|
beforeTools: before.toolCall,
|
|
@@ -6701,13 +6717,20 @@ function readRawSessionMessageOrdinalById2(sessionId, messageId) {
|
|
|
6701
6717
|
return null;
|
|
6702
6718
|
return withReadOnlySessionDb((db) => readRawSessionMessageOrdinalByIdFromDb2(db, sessionId, messageId));
|
|
6703
6719
|
}
|
|
6720
|
+
function readRawSessionMessageOrderPosition(sessionId, messageId) {
|
|
6721
|
+
const provider = sessionProviders.get(sessionId)?.provider;
|
|
6722
|
+
if (provider) {
|
|
6723
|
+
return provider.readMessageOrderById ? provider.readMessageOrderById(messageId) : provider.readMessageOrdinalById?.(messageId) ?? null;
|
|
6724
|
+
}
|
|
6725
|
+
return readRawSessionMessageOrdinalById2(sessionId, messageId);
|
|
6726
|
+
}
|
|
6704
6727
|
function compareRawSessionMessageOrder2(sessionId, leftId, rightId) {
|
|
6705
6728
|
const provider = sessionProviders.get(sessionId)?.provider;
|
|
6706
6729
|
if (provider) {
|
|
6707
|
-
if (!provider.readMessageOrdinalById)
|
|
6730
|
+
if (!provider.readMessageOrderById && !provider.readMessageOrdinalById)
|
|
6708
6731
|
return null;
|
|
6709
|
-
const left =
|
|
6710
|
-
const right =
|
|
6732
|
+
const left = readRawSessionMessageOrderPosition(sessionId, leftId);
|
|
6733
|
+
const right = readRawSessionMessageOrderPosition(sessionId, rightId);
|
|
6711
6734
|
return left === null || right === null ? null : left - right;
|
|
6712
6735
|
}
|
|
6713
6736
|
if (!openCodeDbExists())
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_LOCAL_EMBEDDING_MODEL
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-w28y7d0z.js";
|
|
4
4
|
import {
|
|
5
5
|
log2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-mvvephtj.js";
|
|
7
7
|
import {
|
|
8
8
|
isSynapseEmbeddingTruncated,
|
|
9
9
|
SynapseEmbeddingProvider
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-kvw6xew3.js";
|
|
11
11
|
import {
|
|
12
12
|
LocalEmbeddingProvider
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-bmwfzz28.js";
|
|
14
14
|
import {
|
|
15
15
|
OpenAICompatibleEmbeddingProvider,
|
|
16
16
|
getProjectEmbeddingSnapshot2,
|
|
17
17
|
embedBatchForProject2
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-rg1cezmj.js";
|
|
19
19
|
import {
|
|
20
20
|
isEmbeddingHostBusy2
|
|
21
21
|
} from "./index-qt1qqasc.js";
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
+
inRootAsyncContext2,
|
|
2
3
|
getSqliteDatabasePath2,
|
|
3
4
|
releaseIndexOwner2
|
|
4
|
-
} from "./index-
|
|
5
|
+
} from "./index-wafzvyhg.js";
|
|
5
6
|
import {
|
|
6
7
|
registerExitAbort
|
|
7
8
|
} from "./index-v0p37hm2.js";
|
|
8
9
|
import {
|
|
9
10
|
log2
|
|
10
|
-
} from "./index-
|
|
11
|
+
} from "./index-mvvephtj.js";
|
|
11
12
|
|
|
12
13
|
// src/hooks/magic-context/read-session-raw.ts
|
|
13
14
|
import { isMainThread } from "node:worker_threads";
|
|
@@ -69,7 +70,7 @@ function runSessionWarmupWorker(input, options) {
|
|
|
69
70
|
deadline.unref?.();
|
|
70
71
|
};
|
|
71
72
|
try {
|
|
72
|
-
worker = new Worker(options.entry ?? defaultEntry(), { workerData: input });
|
|
73
|
+
worker = inRootAsyncContext2(() => new Worker(options.entry ?? defaultEntry(), { workerData: input }));
|
|
73
74
|
} catch (error) {
|
|
74
75
|
finish({ failure: "start-failed", detail: String(error) });
|
|
75
76
|
return;
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
tagRevisionKey,
|
|
6
6
|
tagIdentityRevisionKey,
|
|
7
7
|
deleteTagIdentityRevisions
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-bd9cjab3.js";
|
|
9
9
|
import {
|
|
10
10
|
getHarness2
|
|
11
11
|
} from "./index-pavzsdc6.js";
|
|
@@ -13,30 +13,30 @@ import {
|
|
|
13
13
|
removeSystemReminders,
|
|
14
14
|
hasMeaningfulUserText2,
|
|
15
15
|
extractTexts2
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-gjvjh960.js";
|
|
17
17
|
import {
|
|
18
18
|
getMagicContextStorageDir
|
|
19
19
|
} from "./index-0sahzkwr.js";
|
|
20
20
|
import {
|
|
21
21
|
withSqliteBackgroundWriter2,
|
|
22
22
|
withoutSqliteTransformPass2
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-wafzvyhg.js";
|
|
24
24
|
import {
|
|
25
25
|
cleanUserText2
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-9g1c4bt9.js";
|
|
27
27
|
import {
|
|
28
28
|
recordMessageFtsRowid,
|
|
29
29
|
recordIndexedMessageTime,
|
|
30
30
|
messageFtsOrdinalRangeIsMapped,
|
|
31
31
|
deleteUnmappedMessageFtsRows
|
|
32
|
-
} from "./index-
|
|
32
|
+
} from "./index-mp2kghkv.js";
|
|
33
33
|
import {
|
|
34
34
|
isPidAlive,
|
|
35
35
|
readProcessStartTime
|
|
36
|
-
} from "./index-
|
|
36
|
+
} from "./index-q28hsbpg.js";
|
|
37
37
|
import {
|
|
38
38
|
deleteChunkEmbedBackoffForSession
|
|
39
|
-
} from "./index-
|
|
39
|
+
} from "./index-7bjgyaj1.js";
|
|
40
40
|
import {
|
|
41
41
|
ensurePrivateStorageDirectorySync,
|
|
42
42
|
writeStorageFileSync,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
} from "./index-8ajstryz.js";
|
|
50
50
|
import {
|
|
51
51
|
logSlowWriteTransaction
|
|
52
|
-
} from "./index-
|
|
52
|
+
} from "./index-150zz6fh.js";
|
|
53
53
|
|
|
54
54
|
// src/shared/bounded-session-map.ts
|
|
55
55
|
class BoundedSessionMap {
|