@cortexkit/opencode-magic-context 0.49.6 → 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 +10 -7
- package/dist/compaction-marker-candidates-worker.js +2 -2
- package/dist/{compaction-marker-candidates-cz72pm1t.js → compaction-marker-candidates-xxz35vwp.js} +3 -3
- package/dist/{conflict-warning-hook-1jq1rxx7.js → conflict-warning-hook-w3crzrar.js} +8 -8
- package/dist/{context-ae3gxdye.js → context-x0ccfv0f.js} +88 -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/compaction-marker.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/hidden-single-shot.d.ts +6 -3
- package/dist/features/magic-context/dreamer/hidden-single-shot.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/map-memories-prompt.d.ts +7 -1
- package/dist/features/magic-context/dreamer/map-memories-prompt.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/map-memories.d.ts +2 -2
- package/dist/features/magic-context/dreamer/map-memories.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/primer-seed.d.ts +2 -0
- package/dist/features/magic-context/dreamer/primer-seed.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/dreamer/refresh-primers.d.ts +2 -2
- 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/storage-clone.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +10 -3
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts.map +1 -1
- package/dist/features/magic-context/storage-replay-document.d.ts +4 -0
- package/dist/features/magic-context/storage-replay-document.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/apply-operations.d.ts +7 -0
- package/dist/hooks/magic-context/apply-operations.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/heuristic-cleanup.d.ts.map +1 -1
- package/dist/hooks/magic-context/history-boundary-repair.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-persist.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/note-nudger.d.ts +5 -3
- package/dist/hooks/magic-context/note-nudger.d.ts.map +1 -1
- package/dist/hooks/magic-context/postprocess-read-cache.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 +15 -4
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/replay-committed-drops.d.ts +9 -0
- package/dist/hooks/magic-context/replay-committed-drops.d.ts.map +1 -0
- package/dist/hooks/magic-context/rust-lkg-freeze-registry.d.ts +2 -2
- package/dist/hooks/magic-context/rust-lkg-freeze-registry.d.ts.map +1 -1
- package/dist/hooks/magic-context/rust-mode-transform.d.ts +4 -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/rust-served-raw.d.ts +29 -0
- package/dist/hooks/magic-context/rust-served-raw.d.ts.map +1 -0
- package/dist/hooks/magic-context/strip-content.d.ts +23 -24
- package/dist/hooks/magic-context/strip-content.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts +2 -0
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/tool-drop-target.d.ts +2 -0
- package/dist/hooks/magic-context/tool-drop-target.d.ts.map +1 -1
- 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-g9exahnx.js → index-0jz47061.js} +6 -3
- package/dist/{index-4mjhqadz.js → index-150zz6fh.js} +1 -1
- package/dist/{index-ch08qwgd.js → index-2rw244rh.js} +88 -81
- package/dist/{index-6q5h70h2.js → index-4hb8nt93.js} +3 -3
- package/dist/{index-j55vn694.js → index-7bjgyaj1.js} +4 -4
- package/dist/{index-h2wc01qk.js → index-8kk7yh6m.js} +2 -2
- package/dist/{index-vztbgcdk.js → index-9g1c4bt9.js} +304 -92
- package/dist/{index-7q1m1qjk.js → index-a43xq1pg.js} +5 -5
- package/dist/{index-tqf7yg27.js → index-a4b0gbyg.js} +1 -1
- package/dist/{index-vnjhmkwk.js → index-angx1s0k.js} +4 -3
- package/dist/{index-1xaw2pq8.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-zgzdm6dg.js → index-gzg9ekc1.js} +155 -103
- package/dist/{index-vh3e2mvr.js → index-hxrvx6cy.js} +121 -51
- 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-bg5qqene.js → index-mp2kghkv.js} +3 -27
- package/dist/{index-nsjyysj0.js → index-mvvephtj.js} +5 -1
- package/dist/{index-cm4hmxyk.js → index-n78avt2p.js} +1 -1
- package/dist/{index-hr64sth2.js → index-pgy3h49n.js} +4 -4
- package/dist/{index-a796ct3s.js → index-pjgzdezw.js} +13 -9
- package/dist/{index-9m7bn21d.js → index-q28hsbpg.js} +15 -3
- package/dist/{index-ab3bgm2m.js → index-q76br5zn.js} +3 -3
- package/dist/{index-xqyj5c85.js → index-qgp5vnt4.js} +5 -5
- package/dist/{index-9s58tq95.js → index-rg1cezmj.js} +22 -22
- package/dist/{index-f3dnvnw6.js → index-s178h9z8.js} +4 -3
- package/dist/{index-mj1fgfrk.js → index-w1ejb9qr.js} +939 -160
- package/dist/{index-k6xvbj2e.js → index-w28y7d0z.js} +2 -0
- package/dist/{index-0nnd4bry.js → index-wafzvyhg.js} +63 -19
- package/dist/{index-ck6y3td2.js → index-xf6k8szp.js} +4 -4
- package/dist/{index-1j8jcjpa.js → index-xpn05jxq.js} +4 -4
- package/dist/{index-s0gsmthp.js → index-ydjgz36f.js} +7 -7
- package/dist/{index-besxhcsh.js → index-zf9nydbd.js} +50 -39
- package/dist/index.js +53 -52
- package/dist/{logger-ewak5q1s.js → logger-wn328tfg.js} +1 -1
- package/dist/{message-index-bounded-630j53ps.js → message-index-bounded-hxjp56qk.js} +16 -16
- package/dist/{message-index-c84wm2g0.js → message-index-zs882h8e.js} +16 -16
- package/dist/{message-time-backfill-8kj57qe3.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/messages-transform.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-vv59t7ah.js → project-embedding-registry-vy7sv9jt.js} +11 -11
- package/dist/raw-ordinal-warmup-worker.js +17 -15
- package/dist/{read-session-chunk-t3vjd0h0.js → read-session-chunk-t9r7r0sg.js} +13 -11
- package/dist/{read-session-raw-gf7eytnm.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-kth2p6cc.js → search-qjen1pmz.js} +24 -24
- package/dist/{send-session-notification-3j6krd4w.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/processed-image-eligibility.d.ts +22 -0
- package/dist/shared/processed-image-eligibility.d.ts.map +1 -0
- package/dist/shared/recovery-reasoning-prefix.d.ts +9 -0
- package/dist/shared/recovery-reasoning-prefix.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 +3 -1
- package/dist/shared/sqlite.d.ts.map +1 -1
- package/dist/shared/tag-transcript.d.ts +9 -0
- package/dist/shared/tag-transcript.d.ts.map +1 -1
- package/dist/shared/user-facing-codes.d.ts +2 -2
- package/dist/{sqlite-d7edbk1s.js → sqlite-4pqyynrs.js} +3 -1
- package/dist/{storage-memory-af5zdz98.js → storage-memory-j3v3hc83.js} +2 -2
- package/dist/{storage-tags-dyj7mmbq.js → storage-tags-a513rkj3.js} +5 -5
- package/dist/tools/ctx-expand/search-archive.d.ts +4 -0
- package/dist/tools/ctx-expand/search-archive.d.ts.map +1 -0
- package/dist/tools/ctx-expand/tools.d.ts.map +1 -1
- package/dist/{transform-postprocess-phase-bv3kb5s1.js → transform-postprocess-phase-yv463b7y.js} +30 -30
- package/dist/v2/auto-search-worker.js +10 -7
- package/dist/v2/{compaction-marker-candidates-6gqp5wrc.js → compaction-marker-candidates-a15w3mqh.js} +3 -3
- package/dist/v2/compaction-marker-candidates-worker.js +2 -2
- package/dist/v2/{context-p8f2shp1.js → context-wd82v9z6.js} +1133 -278
- 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/payload.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-yzxmf6vp.js → message-index-bounded-madg2kfr.js} +16 -16
- package/dist/v2/{message-index-3ws17x1g.js → message-index-yd94vt9n.js} +16 -16
- package/dist/v2/{message-time-backfill-5nf10c65.js → message-time-backfill-rz1pnpaj.js} +3 -3
- package/dist/v2/migration-worker.js +11 -11
- package/dist/v2/{project-embedding-registry-rsnf2263.js → project-embedding-registry-ja23aygk.js} +11 -11
- package/dist/v2/raw-ordinal-warmup-worker.js +17 -15
- package/dist/v2/{read-session-chunk-vtb0w2kd.js → read-session-chunk-7qs791f3.js} +13 -11
- package/dist/v2/{read-session-raw-gpcddemt.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-5aj2j7vf.js → send-session-notification-6n7chhyp.js} +6 -6
- package/dist/v2/{server-09g9pkvx.js → server-08k4zkfk.js} +50 -39
- package/dist/v2/{server-ras2sxnc.js → server-44ryn9rb.js} +9 -6
- package/dist/v2/{server-158ehmk2.js → server-4easnf78.js} +19 -19
- package/dist/v2/{server-ww9nr8pe.js → server-4gz0xkrc.js} +5 -5
- package/dist/v2/{server-d6g4whc2.js → server-4qr18rfg.js} +3 -3
- package/dist/v2/{server-f9py7s7a.js → server-4rs8sm06.js} +5 -5
- package/dist/v2/{server-yezz0cp2.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-keswwkvv.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-9zqewm6g.js → server-ak7w74j9.js} +4 -4
- package/dist/v2/{server-387vkhjq.js → server-bx59ezg6.js} +4 -3
- package/dist/v2/{server-676xw7at.js → server-ckrb5rm8.js} +1 -1
- package/dist/v2/{server-wrem2nmz.js → server-cxsr0ng6.js} +15 -3
- package/dist/v2/{server-t528t8qm.js → server-hn9fb3v0.js} +2 -2
- package/dist/v2/{server-qn23p4h7.js → server-j3dm74ey.js} +9 -9
- package/dist/v2/{server-yd01snxq.js → server-jjsf29aq.js} +4 -4
- package/dist/v2/server-knvkbfvh.js +25 -0
- package/dist/v2/{server-cm4hmxyk.js → server-n78avt2p.js} +1 -1
- package/dist/v2/{server-btgnsv7w.js → server-njnx39q2.js} +6 -3
- package/dist/v2/{server-6a9mxnb2.js → server-npm52h2q.js} +4 -3
- package/dist/v2/{server-vb7pbd9p.js → server-nveratm5.js} +1 -1
- package/dist/v2/{server-7skbfb81.js → server-q360kdb8.js} +121 -51
- 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-0nnd4bry.js → server-wafzvyhg.js} +63 -19
- package/dist/v2/{server-fby0cxbq.js → server-xj4mewze.js} +304 -92
- package/dist/v2/{server-aa9w15cs.js → server-y5g32dhq.js} +88 -81
- package/dist/v2/{server-x2r63c0x.js → server-yak3sxya.js} +7 -7
- package/dist/v2/{server-4tn95znb.js → server-zrwaj29a.js} +2 -2
- package/dist/v2/server.js +9 -8
- package/dist/v2/{sqlite-d7edbk1s.js → sqlite-4pqyynrs.js} +3 -1
- package/dist/v2/{storage-memory-af5zdz98.js → storage-memory-j3v3hc83.js} +2 -2
- package/dist/v2/{storage-tags-d47bpaqa.js → storage-tags-spa92sgj.js} +5 -5
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/{wrapup-orchestrator-cahk37n7.js → wrapup-orchestrator-5wxy1ggv.js} +38 -35
- package/dist/wrapup-orchestrator-gv08c6f9.js +47 -0
- package/package.json +3 -3
- 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/processed-image-eligibility.test.ts +68 -0
- package/src/shared/processed-image-eligibility.ts +41 -0
- package/src/shared/processed-image-position-review.json +20 -0
- package/src/shared/processed-image-position-review.test.ts +19 -0
- package/src/shared/recovery-reasoning-prefix.test.ts +34 -0
- package/src/shared/recovery-reasoning-prefix.ts +35 -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-writer-diagnostics.test.ts +31 -0
- package/src/shared/sqlite.ts +112 -30
- package/src/shared/tag-transcript.ts +118 -0
- package/src/shared/user-facing-codes.ts +2 -2
- package/dist/embedding-backfill-dtjmyktb.js +0 -21
- package/dist/recomp-orchestrator-1d08g57a.js +0 -60
- package/dist/v2/embedding-backfill-cg4rv90f.js +0 -20
- package/dist/v2/recomp-orchestrator-v64r4s4r.js +0 -59
- package/dist/v2/search-bpa4fxq1.js +0 -46
- package/dist/wrapup-orchestrator-mqp0v195.js +0 -47
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
importPluginModule,
|
|
6
6
|
sessionLog2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-mvvephtj.js";
|
|
8
8
|
import {
|
|
9
9
|
isDefaultSessionTitle2
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-a4b0gbyg.js";
|
|
11
11
|
import {
|
|
12
12
|
shouldHoldIgnoredNotification
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-q76br5zn.js";
|
|
14
14
|
import {
|
|
15
15
|
getErrorMessage
|
|
16
16
|
} from "./index-y8v6yerm.js";
|
|
@@ -142,7 +142,7 @@ async function sendIgnoredMessageNow(client, sessionId, text, params, forcePersi
|
|
|
142
142
|
holdIgnoredNotification({ client, sessionId, text, params, forcePersist }, "during target checks");
|
|
143
143
|
return "queued";
|
|
144
144
|
}
|
|
145
|
-
const { waitForSafeNotificationTarget } = await importPluginModule(() => import("./safe-notification-target-
|
|
145
|
+
const { waitForSafeNotificationTarget } = await importPluginModule(() => import("./safe-notification-target-jdynm677.js"));
|
|
146
146
|
if (await waitForSafeNotificationTarget(client, sessionId) === "skip") {
|
|
147
147
|
sessionLog2(sessionId, "notification skipped (session not titled yet)");
|
|
148
148
|
return "skipped";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionLog2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-mvvephtj.js";
|
|
4
4
|
import {
|
|
5
5
|
COMPARTMENT_LEASE_RENEWAL_MS,
|
|
6
6
|
acquireCompartmentLease,
|
|
@@ -15,7 +15,10 @@ import {
|
|
|
15
15
|
getActiveCompartmentRun,
|
|
16
16
|
markActiveCompartmentRunPublished,
|
|
17
17
|
registerActiveCompartmentRun
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-hxrvx6cy.js";
|
|
19
|
+
import {
|
|
20
|
+
inRootAsyncContext2
|
|
21
|
+
} from "./index-wafzvyhg.js";
|
|
19
22
|
import {
|
|
20
23
|
getWrapupInProgressState,
|
|
21
24
|
acquireWrapupInProgress,
|
|
@@ -24,17 +27,17 @@ import {
|
|
|
24
27
|
getHistorianFailureState,
|
|
25
28
|
clearEmergencyRecovery,
|
|
26
29
|
prepareRawSessionOrdinals2
|
|
27
|
-
} from "./index-
|
|
30
|
+
} from "./index-9g1c4bt9.js";
|
|
28
31
|
import {
|
|
29
32
|
pushNotification2
|
|
30
33
|
} from "./index-x8a7jmkh.js";
|
|
31
34
|
import {
|
|
32
35
|
sendStatusNotification2
|
|
33
|
-
} from "./index-
|
|
36
|
+
} from "./index-pgy3h49n.js";
|
|
34
37
|
import {
|
|
35
38
|
setRecompStarting2,
|
|
36
39
|
setRecompTerminal2
|
|
37
|
-
} from "./index-
|
|
40
|
+
} from "./index-xf6k8szp.js";
|
|
38
41
|
|
|
39
42
|
// src/hooks/magic-context/wrapup-orchestrator.ts
|
|
40
43
|
import * as crypto from "node:crypto";
|
|
@@ -157,7 +160,7 @@ async function runOneWrapupIteration(args) {
|
|
|
157
160
|
if (!acquired.ok)
|
|
158
161
|
return { ran: false, reason: acquired.reason };
|
|
159
162
|
const leaseHolderId = acquired.holderId;
|
|
160
|
-
const renewal = setInterval(() => {
|
|
163
|
+
const renewal = inRootAsyncContext2(() => setInterval(() => {
|
|
161
164
|
try {
|
|
162
165
|
if (!renewCompartmentLease(ctx.db, sessionId, leaseHolderId)) {
|
|
163
166
|
sessionLog2(sessionId, "wrapup: compartment lease renewal failed");
|
|
@@ -165,7 +168,7 @@ async function runOneWrapupIteration(args) {
|
|
|
165
168
|
} catch (err) {
|
|
166
169
|
sessionLog2(sessionId, `wrapup: compartment lease renewal threw; continuing (${err instanceof Error ? err.message : String(err)})`);
|
|
167
170
|
}
|
|
168
|
-
}, COMPARTMENT_LEASE_RENEWAL_MS);
|
|
171
|
+
}, COMPARTMENT_LEASE_RENEWAL_MS));
|
|
169
172
|
const runCompartmentAgentForWrapup = ctx.runCompartmentAgentForWrapup ?? runCompartmentAgent;
|
|
170
173
|
const runnerPromise = runCompartmentAgentForWrapup({
|
|
171
174
|
client: ctx.client,
|
|
@@ -175,6 +178,7 @@ async function runOneWrapupIteration(args) {
|
|
|
175
178
|
sessionId,
|
|
176
179
|
historianChunkTokens: ctx.historianChunkTokens,
|
|
177
180
|
historianTimeoutMs: ctx.historianTimeoutMs,
|
|
181
|
+
historianMaxOutputTokens: ctx.historianMaxOutputTokens,
|
|
178
182
|
boundarySnapshot: plan.snapshot,
|
|
179
183
|
currentContextLimit: ctx.contextLimit,
|
|
180
184
|
directory: ctx.directory,
|
|
@@ -282,7 +286,7 @@ ${message}`;
|
|
|
282
286
|
}
|
|
283
287
|
return true;
|
|
284
288
|
};
|
|
285
|
-
const markerRenewal = setInterval(() => {
|
|
289
|
+
const markerRenewal = inRootAsyncContext2(() => setInterval(() => {
|
|
286
290
|
try {
|
|
287
291
|
renewWrapupMarker({
|
|
288
292
|
lastCompartmentEnd: getLastCompartmentEndMessage(ctx.db, sessionId),
|
|
@@ -291,7 +295,7 @@ ${message}`;
|
|
|
291
295
|
} catch (err) {
|
|
292
296
|
sessionLog2(sessionId, `wrapup: marker renewal threw; continuing (${err instanceof Error ? err.message : String(err)})`);
|
|
293
297
|
}
|
|
294
|
-
}, 60000);
|
|
298
|
+
}, 60000));
|
|
295
299
|
markerRenewal.unref?.();
|
|
296
300
|
try {
|
|
297
301
|
const activeAtStart = await waitForExistingIncrementalRun(sessionId, resolveWrapupLeaseWaitTimeout(ctx));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-mvvephtj.js";
|
|
4
4
|
import {
|
|
5
5
|
canonicalProjectDirectory
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-knvkbfvh.js";
|
|
7
7
|
|
|
8
8
|
// src/shared/rpc-utils.ts
|
|
9
9
|
import { execFile, execFileSync } from "node:child_process";
|
|
@@ -34,13 +34,25 @@ function isOwnRpcServerRecord(record) {
|
|
|
34
34
|
function projectHash(directory) {
|
|
35
35
|
return createHash("sha256").update(canonicalProjectDirectory(directory)).digest("hex").slice(0, 16);
|
|
36
36
|
}
|
|
37
|
+
function legacyProjectHash(directory) {
|
|
38
|
+
const normalized = directory.replace(/\/+$/, "");
|
|
39
|
+
return createHash("sha256").update(normalized).digest("hex").slice(0, 16);
|
|
40
|
+
}
|
|
37
41
|
function rpcPortDir(storageDir, directory) {
|
|
38
42
|
return join(storageDir, "rpc", projectHash(directory));
|
|
39
43
|
}
|
|
44
|
+
function rpcPortDirsForLookup(storageDir, directory) {
|
|
45
|
+
const canonical = rpcPortDir(storageDir, directory);
|
|
46
|
+
const legacy = join(storageDir, "rpc", legacyProjectHash(directory));
|
|
47
|
+
return legacy === canonical ? [canonical] : [canonical, legacy];
|
|
48
|
+
}
|
|
40
49
|
function rpcPortFilePath(storageDir, directory, pid = process.pid, instanceId) {
|
|
41
50
|
const suffix = instanceId ? `-${instanceId}` : "";
|
|
42
51
|
return join(rpcPortDir(storageDir, directory), `port-${pid}${suffix}.json`);
|
|
43
52
|
}
|
|
53
|
+
function legacyRpcPortFilePath(storageDir, directory) {
|
|
54
|
+
return join(storageDir, "rpc", legacyProjectHash(directory), "port");
|
|
55
|
+
}
|
|
44
56
|
function isPidAlive(pid) {
|
|
45
57
|
if (!Number.isInteger(pid) || pid <= 0)
|
|
46
58
|
return "dead";
|
|
@@ -730,4 +742,4 @@ function inspectWindowsProcessesSync() {
|
|
|
730
742
|
};
|
|
731
743
|
}
|
|
732
744
|
|
|
733
|
-
export { registerOwnRpcServerInstance, isOwnRpcServerRecord, rpcPortDir, rpcPortFilePath, isPidAlive, readProcessStartTime, readProcessProbeEvidence, classifyProcessKind, isPidIdentityPlausible, inspectLivePiProcesses, parseRpcPortFile, inspectProcessesAsync, inspectWindowsProcessesSync };
|
|
745
|
+
export { registerOwnRpcServerInstance, isOwnRpcServerRecord, rpcPortDir, rpcPortDirsForLookup, rpcPortFilePath, legacyRpcPortFilePath, isPidAlive, readProcessStartTime, readProcessProbeEvidence, classifyProcessKind, isPidIdentityPlausible, inspectLivePiProcesses, parseRpcPortFile, inspectProcessesAsync, inspectWindowsProcessesSync };
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./index-pavzsdc6.js";
|
|
4
4
|
import {
|
|
5
5
|
log2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-mvvephtj.js";
|
|
7
7
|
import {
|
|
8
8
|
resolveOpenCodeDbPath,
|
|
9
9
|
assertOpenCodeStoreGeneration,
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
} from "./index-58e3y90n.js";
|
|
15
15
|
import {
|
|
16
16
|
Database2
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-wafzvyhg.js";
|
|
18
18
|
import {
|
|
19
19
|
forgetRawSessionOrdinalWatermark2,
|
|
20
20
|
forgetRawSessionSummaryRows2
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-angx1s0k.js";
|
|
22
22
|
import {
|
|
23
23
|
closeQuietly
|
|
24
24
|
} from "./index-8ajstryz.js";
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
} from "./index-fr0wbhdn.js";
|
|
4
4
|
import {
|
|
5
5
|
log2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-mvvephtj.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureColumn,
|
|
9
9
|
healAllNullColumns,
|
|
10
10
|
installV95PerfSchema
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-bd9cjab3.js";
|
|
12
12
|
import {
|
|
13
13
|
resolveOpenCodeDbPath,
|
|
14
14
|
openCodeDbPathExists,
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
} from "./index-58e3y90n.js";
|
|
17
17
|
import {
|
|
18
18
|
Database2
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-wafzvyhg.js";
|
|
20
20
|
import {
|
|
21
21
|
normalizeStoredProjectPath,
|
|
22
22
|
storedPathBelongsToIdentity
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-0jz47061.js";
|
|
24
24
|
import {
|
|
25
25
|
logSlowWriteTransaction
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-150zz6fh.js";
|
|
27
27
|
|
|
28
28
|
// src/features/magic-context/lkg-prefix-chunks.ts
|
|
29
29
|
import { createHash } from "node:crypto";
|
|
@@ -4,25 +4,26 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
sanitizeDiagnosticText,
|
|
6
6
|
log2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-mvvephtj.js";
|
|
8
8
|
import {
|
|
9
9
|
isUserHomeDirectory,
|
|
10
10
|
setBootQuietPeriodForTests
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-0jz47061.js";
|
|
12
12
|
import {
|
|
13
|
+
inRootAsyncContext2,
|
|
13
14
|
withSqliteBackgroundWriter2,
|
|
14
15
|
withoutSqliteTransformPass2,
|
|
15
16
|
isTransientSqliteError2
|
|
16
|
-
} from "./index-
|
|
17
|
+
} from "./index-wafzvyhg.js";
|
|
17
18
|
import {
|
|
18
19
|
estimateTokens
|
|
19
|
-
} from "./index-
|
|
20
|
+
} from "./index-gjvjh960.js";
|
|
20
21
|
import {
|
|
21
22
|
SYNAPSE_DEFAULT_MODEL,
|
|
22
23
|
isSynapseEmbeddingTruncated,
|
|
23
24
|
getSynapseBatchRequestKey,
|
|
24
25
|
SynapseEmbeddingProvider
|
|
25
|
-
} from "./index-
|
|
26
|
+
} from "./index-kvw6xew3.js";
|
|
26
27
|
import {
|
|
27
28
|
CHUNK_WINDOW_SAFETY_RATIO,
|
|
28
29
|
normalizeCompartmentChunkMaxInputTokens,
|
|
@@ -39,10 +40,17 @@ import {
|
|
|
39
40
|
countSessionCompartmentEmbedCoverage,
|
|
40
41
|
countSessionCompartmentEmbedCoveragePolite,
|
|
41
42
|
countUnembeddedSessionCompartmentsPolite
|
|
42
|
-
} from "./index-
|
|
43
|
+
} from "./index-7bjgyaj1.js";
|
|
43
44
|
import {
|
|
44
45
|
DEFAULT_LOCAL_EMBEDDING_MODEL
|
|
45
|
-
} from "./index-
|
|
46
|
+
} from "./index-w28y7d0z.js";
|
|
47
|
+
import {
|
|
48
|
+
embeddingModelsMatch,
|
|
49
|
+
resolveEmbeddingTextPrefixes,
|
|
50
|
+
getEmbeddingProviderIdentity,
|
|
51
|
+
dominantEmbeddingFailure,
|
|
52
|
+
LocalEmbeddingProvider
|
|
53
|
+
} from "./index-bmwfzz28.js";
|
|
46
54
|
import {
|
|
47
55
|
isEmbeddingHostBusy2
|
|
48
56
|
} from "./index-qt1qqasc.js";
|
|
@@ -51,16 +59,9 @@ import {
|
|
|
51
59
|
getMemoryEmbedCoverage,
|
|
52
60
|
invalidateProject2
|
|
53
61
|
} from "./index-4dhv7mqz.js";
|
|
54
|
-
import {
|
|
55
|
-
embeddingModelsMatch,
|
|
56
|
-
resolveEmbeddingTextPrefixes,
|
|
57
|
-
getEmbeddingProviderIdentity,
|
|
58
|
-
dominantEmbeddingFailure,
|
|
59
|
-
LocalEmbeddingProvider
|
|
60
|
-
} from "./index-gbmqa9x9.js";
|
|
61
62
|
import {
|
|
62
63
|
logSlowWriteTransaction
|
|
63
|
-
} from "./index-
|
|
64
|
+
} from "./index-150zz6fh.js";
|
|
64
65
|
|
|
65
66
|
// src/features/magic-context/session-project-storage.ts
|
|
66
67
|
var SESSION_CHUNK_REPAIR_BATCH_SIZE = 100;
|
|
@@ -1016,7 +1017,6 @@ function listShadowBackfillStalls2(db, projectIdentity) {
|
|
|
1016
1017
|
}
|
|
1017
1018
|
return stalls;
|
|
1018
1019
|
}
|
|
1019
|
-
|
|
1020
1020
|
// src/features/magic-context/project-embedding-registry.ts
|
|
1021
1021
|
var OFF_PROVIDER_IDENTITY = "embedding-provider:off";
|
|
1022
1022
|
var SWEEP_MAX_WALL_CLOCK_MS = 10 * 60 * 1000;
|
|
@@ -2608,12 +2608,12 @@ async function drainCommitBacklogForProject2(db, projectIdentity, deadline) {
|
|
|
2608
2608
|
}
|
|
2609
2609
|
let total = 0;
|
|
2610
2610
|
let leaseLost = false;
|
|
2611
|
-
const renewal = setInterval(() => {
|
|
2611
|
+
const renewal = inRootAsyncContext2(() => setInterval(() => {
|
|
2612
2612
|
try {
|
|
2613
2613
|
if (!renewGitSweepLease(db, projectIdentity, holderId))
|
|
2614
2614
|
leaseLost = true;
|
|
2615
2615
|
} catch {}
|
|
2616
|
-
}, SESSION_EMBED_LEASE_RENEWAL_MS);
|
|
2616
|
+
}, SESSION_EMBED_LEASE_RENEWAL_MS));
|
|
2617
2617
|
renewal.unref?.();
|
|
2618
2618
|
try {
|
|
2619
2619
|
while (!leaseLost && !isEmbeddingHostBusy2() && Date.now() < deadline && total < COMMIT_DRAIN_MAX_PER_SWEEP) {
|
|
@@ -2777,12 +2777,12 @@ async function drainCompartmentChunkBacklogForProject(db, projectIdentity, deadl
|
|
|
2777
2777
|
}
|
|
2778
2778
|
let total = 0;
|
|
2779
2779
|
let leaseLost = false;
|
|
2780
|
-
const renewal = setInterval(() => {
|
|
2780
|
+
const renewal = inRootAsyncContext2(() => setInterval(() => {
|
|
2781
2781
|
try {
|
|
2782
2782
|
if (!renewGitSweepLease(db, projectIdentity, holderId))
|
|
2783
2783
|
leaseLost = true;
|
|
2784
2784
|
} catch {}
|
|
2785
|
-
}, SESSION_EMBED_LEASE_RENEWAL_MS);
|
|
2785
|
+
}, SESSION_EMBED_LEASE_RENEWAL_MS));
|
|
2786
2786
|
renewal.unref?.();
|
|
2787
2787
|
try {
|
|
2788
2788
|
while (!leaseLost && !isEmbeddingHostBusy2() && Date.now() < deadline && total < CHUNK_DRAIN_MAX_PER_SWEEP) {
|
|
@@ -2823,14 +2823,14 @@ async function embedSessionCompartmentChunks2(db, projectIdentity, sessionId, op
|
|
|
2823
2823
|
drainAbort.abort();
|
|
2824
2824
|
else
|
|
2825
2825
|
options?.signal?.addEventListener("abort", forwardCallerAbort, { once: true });
|
|
2826
|
-
const renewal = setInterval(() => {
|
|
2826
|
+
const renewal = inRootAsyncContext2(() => setInterval(() => {
|
|
2827
2827
|
try {
|
|
2828
2828
|
if (!renewGitSweepLease(db, projectIdentity, holderId)) {
|
|
2829
2829
|
leaseLost = true;
|
|
2830
2830
|
drainAbort.abort();
|
|
2831
2831
|
}
|
|
2832
2832
|
} catch {}
|
|
2833
|
-
}, SESSION_EMBED_LEASE_RENEWAL_MS);
|
|
2833
|
+
}, SESSION_EMBED_LEASE_RENEWAL_MS));
|
|
2834
2834
|
renewal.unref?.();
|
|
2835
2835
|
const batchSize = Math.max(1, options?.batchSize ?? CHUNK_DRAIN_BATCH_SIZE);
|
|
2836
2836
|
const skipIds = [];
|
|
@@ -3,10 +3,11 @@ import {
|
|
|
3
3
|
} from "./index-v0p37hm2.js";
|
|
4
4
|
import {
|
|
5
5
|
log2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-mvvephtj.js";
|
|
7
7
|
import {
|
|
8
|
+
inRootAsyncContext2,
|
|
8
9
|
getSqliteDatabasePath2
|
|
9
|
-
} from "./index-
|
|
10
|
+
} from "./index-wafzvyhg.js";
|
|
10
11
|
|
|
11
12
|
// src/features/magic-context/compaction-marker-candidates.ts
|
|
12
13
|
import { existsSync, realpathSync } from "node:fs";
|
|
@@ -152,7 +153,7 @@ function runCandidateWorker(path, sessionId, options) {
|
|
|
152
153
|
timer.unref?.();
|
|
153
154
|
};
|
|
154
155
|
try {
|
|
155
|
-
worker = new Worker(entry, { workerData: { path, sessionId } });
|
|
156
|
+
worker = inRootAsyncContext2(() => new Worker(entry, { workerData: { path, sessionId } }));
|
|
156
157
|
workers.add(worker);
|
|
157
158
|
worker.unref();
|
|
158
159
|
deadline(options.acceptMs ?? 2000);
|