@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
|
@@ -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-16vwdyy5.js";
|
|
64
67
|
import {
|
|
65
68
|
isRecord
|
|
66
|
-
} from "./index-
|
|
69
|
+
} from "./index-f8cn4xqa.js";
|
|
67
70
|
import {
|
|
68
71
|
getIndexedMessageCorpusSize2
|
|
69
|
-
} from "./index-
|
|
72
|
+
} from "./index-0x9cn9w1.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-a865mj02.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,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionLog2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-mvvephtj.js";
|
|
4
4
|
import {
|
|
5
5
|
isKnownAutocommit
|
|
6
6
|
} from "./index-8ajstryz.js";
|
|
@@ -468,32 +468,32 @@ function tagOrderConstraintIndex(db) {
|
|
|
468
468
|
// src/shared/stable-json.ts
|
|
469
469
|
function stableStringify(value, seen = new WeakSet) {
|
|
470
470
|
const pieces = [];
|
|
471
|
-
writeStable(value, seen, pieces);
|
|
471
|
+
writeStable(value, seen, (piece) => pieces.push(piece));
|
|
472
472
|
return pieces.join("");
|
|
473
473
|
}
|
|
474
|
-
function writeStable(value, seen,
|
|
474
|
+
function writeStable(value, seen, write) {
|
|
475
475
|
if (value === undefined) {
|
|
476
|
-
|
|
476
|
+
write("undefined");
|
|
477
477
|
return;
|
|
478
478
|
}
|
|
479
479
|
if (value === null || typeof value !== "object") {
|
|
480
|
-
|
|
480
|
+
write(JSON.stringify(value) ?? String(value));
|
|
481
481
|
return;
|
|
482
482
|
}
|
|
483
483
|
if (seen.has(value)) {
|
|
484
|
-
|
|
484
|
+
write('"[Circular]"');
|
|
485
485
|
return;
|
|
486
486
|
}
|
|
487
487
|
seen.add(value);
|
|
488
488
|
if (Array.isArray(value)) {
|
|
489
|
-
|
|
489
|
+
write("[");
|
|
490
490
|
for (let index = 0;index < value.length; index += 1) {
|
|
491
491
|
if (index > 0)
|
|
492
|
-
|
|
492
|
+
write(",");
|
|
493
493
|
if (index in value)
|
|
494
|
-
writeStable(value[index], seen,
|
|
494
|
+
writeStable(value[index], seen, write);
|
|
495
495
|
}
|
|
496
|
-
|
|
496
|
+
write("]");
|
|
497
497
|
return;
|
|
498
498
|
}
|
|
499
499
|
const entries = Object.entries(value).sort(([a], [b]) => {
|
|
@@ -503,14 +503,34 @@ function writeStable(value, seen, pieces) {
|
|
|
503
503
|
return 1;
|
|
504
504
|
return 0;
|
|
505
505
|
});
|
|
506
|
-
|
|
506
|
+
if (entries.length > 0 && entries.length <= 16 && entries.every(([key, child]) => key.length <= 4096 && !/^(0|[1-9]\d*)$/.test(key) && (child === null || typeof child === "number" || typeof child === "boolean" || typeof child === "string" && child.length <= 4096))) {
|
|
507
|
+
write(JSON.stringify(Object.fromEntries(entries)));
|
|
508
|
+
return;
|
|
509
|
+
}
|
|
510
|
+
write("{");
|
|
507
511
|
entries.forEach(([key, child], index) => {
|
|
508
512
|
if (index > 0)
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
513
|
+
write(",");
|
|
514
|
+
write(JSON.stringify(key));
|
|
515
|
+
write(":");
|
|
516
|
+
writeStable(child, seen, write);
|
|
512
517
|
});
|
|
513
|
-
|
|
518
|
+
write("}");
|
|
519
|
+
}
|
|
520
|
+
function stableStringifyHash(value, prefix = "") {
|
|
521
|
+
const sink = jsonHashSink(prefix);
|
|
522
|
+
writeStable(value, new WeakSet, sink.write);
|
|
523
|
+
return sink.digest();
|
|
524
|
+
}
|
|
525
|
+
function jsonHashSink(prefix = "") {
|
|
526
|
+
let hash = 2166136261;
|
|
527
|
+
const write = (piece) => {
|
|
528
|
+
for (let index = 0;index < piece.length; index++) {
|
|
529
|
+
hash = Math.imul(hash ^ piece.charCodeAt(index), 16777619);
|
|
530
|
+
}
|
|
531
|
+
};
|
|
532
|
+
write(prefix);
|
|
533
|
+
return { write, digest: () => (hash >>> 0).toString(16).padStart(8, "0") };
|
|
514
534
|
}
|
|
515
535
|
|
|
516
|
-
export { TAG_TOMBSTONE_OWNER_PREFIX, tagTombstoneOwnerRange, tagTombstoneOwnerKey, tagRevisionKey, tagIdentityRevisionKey, installTagIdentityRevisionTrigger, deleteTagIdentityRevisions, getTableColumnNames, ensureColumn, healAllNullColumns, getTemporalDecisions, observeTemporalDecisions, freezeTemporalDecisions, deleteTemporalDecision, installV95PerfSchema, tagOrderConstraintIndex, stableStringify };
|
|
536
|
+
export { TAG_TOMBSTONE_OWNER_PREFIX, tagTombstoneOwnerRange, tagTombstoneOwnerKey, tagRevisionKey, tagIdentityRevisionKey, installTagIdentityRevisionTrigger, deleteTagIdentityRevisions, getTableColumnNames, ensureColumn, healAllNullColumns, getTemporalDecisions, observeTemporalDecisions, freezeTemporalDecisions, deleteTemporalDecision, installV95PerfSchema, tagOrderConstraintIndex, stableStringify, stableStringifyHash };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/shared/project-directory-key.ts
|
|
2
|
+
import { realpathSync } from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
function projectDirectoryKey(directory) {
|
|
5
|
+
const slashed = directory.replaceAll("\\", "/").replace(/^\/\/\?\/UNC\//i, "//").replace(/^\/\/\?\//, "");
|
|
6
|
+
if (/^[a-z]:\//i.test(slashed) || slashed.startsWith("//")) {
|
|
7
|
+
return path.win32.normalize(slashed).replaceAll("\\", "/").replace(/\/$/, "").toLowerCase();
|
|
8
|
+
}
|
|
9
|
+
return path.resolve(directory);
|
|
10
|
+
}
|
|
11
|
+
function sameProjectDirectory(a, b) {
|
|
12
|
+
if (a.length === 0 || b.length === 0)
|
|
13
|
+
return false;
|
|
14
|
+
return projectDirectoryKey(a) === projectDirectoryKey(b);
|
|
15
|
+
}
|
|
16
|
+
var realpathForCanonicalDirectory = (directory) => realpathSync.native(directory);
|
|
17
|
+
function canonicalProjectDirectory(directory) {
|
|
18
|
+
let resolved = directory;
|
|
19
|
+
try {
|
|
20
|
+
resolved = realpathForCanonicalDirectory(directory);
|
|
21
|
+
} catch {}
|
|
22
|
+
return projectDirectoryKey(resolved);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { projectDirectoryKey, sameProjectDirectory, canonicalProjectDirectory };
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
estimateTokens
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-gjvjh960.js";
|
|
4
4
|
import {
|
|
5
5
|
getHarness2
|
|
6
6
|
} from "./index-pavzsdc6.js";
|
|
7
7
|
import {
|
|
8
8
|
log2
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-mvvephtj.js";
|
|
10
|
+
import {
|
|
11
|
+
inRootAsyncContext2
|
|
12
|
+
} from "./index-wafzvyhg.js";
|
|
10
13
|
|
|
11
14
|
// ../../node_modules/.bun/@cortexkit+subc-client@0.11.1/node_modules/@cortexkit/subc-client/dist/client.js
|
|
12
15
|
import { promises as fs2 } from "node:fs";
|
|
@@ -1919,7 +1922,7 @@ async function getSharedClient(options) {
|
|
|
1919
1922
|
if (sharedClientPromise && sharedClientFile === options.connectionFile)
|
|
1920
1923
|
return sharedClientPromise;
|
|
1921
1924
|
sharedClientFile = options.connectionFile;
|
|
1922
|
-
sharedClientPromise = SubcClient.connect({ connectionFile: options.connectionFile }).then((client) => {
|
|
1925
|
+
sharedClientPromise = inRootAsyncContext2(() => SubcClient.connect({ connectionFile: options.connectionFile })).then((client) => {
|
|
1923
1926
|
sharedClient = client;
|
|
1924
1927
|
return client;
|
|
1925
1928
|
});
|
|
@@ -1,34 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
withSqliteBackgroundWriter2,
|
|
3
3
|
withoutSqliteTransformPass2
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-wafzvyhg.js";
|
|
5
5
|
import {
|
|
6
6
|
logSlowWriteTransaction
|
|
7
|
-
} from "./index-
|
|
8
|
-
|
|
9
|
-
// src/shared/project-directory-key.ts
|
|
10
|
-
import { realpathSync } from "node:fs";
|
|
11
|
-
import path from "node:path";
|
|
12
|
-
function projectDirectoryKey(directory) {
|
|
13
|
-
const slashed = directory.replaceAll("\\", "/").replace(/^\/\/\?\/UNC\//i, "//").replace(/^\/\/\?\//, "");
|
|
14
|
-
if (/^[a-z]:\//i.test(slashed) || slashed.startsWith("//")) {
|
|
15
|
-
return path.win32.normalize(slashed).replaceAll("\\", "/").replace(/\/$/, "").toLowerCase();
|
|
16
|
-
}
|
|
17
|
-
return path.resolve(directory);
|
|
18
|
-
}
|
|
19
|
-
function sameProjectDirectory(a, b) {
|
|
20
|
-
if (a.length === 0 || b.length === 0)
|
|
21
|
-
return false;
|
|
22
|
-
return projectDirectoryKey(a) === projectDirectoryKey(b);
|
|
23
|
-
}
|
|
24
|
-
var realpathForCanonicalDirectory = (directory) => realpathSync.native(directory);
|
|
25
|
-
function canonicalProjectDirectory(directory) {
|
|
26
|
-
let resolved = directory;
|
|
27
|
-
try {
|
|
28
|
-
resolved = realpathForCanonicalDirectory(directory);
|
|
29
|
-
} catch {}
|
|
30
|
-
return projectDirectoryKey(resolved);
|
|
31
|
-
}
|
|
7
|
+
} from "./index-150zz6fh.js";
|
|
32
8
|
|
|
33
9
|
// src/features/magic-context/message-fts-rowid-map.ts
|
|
34
10
|
import { createHash } from "node:crypto";
|
|
@@ -192,4 +168,4 @@ function deleteUnmappedMessageFtsRows(db, sessionIds) {
|
|
|
192
168
|
WHERE rowid > ? AND session_id IN (${placeholders})`).run(state.watermarkRowid, ...sessionIds);
|
|
193
169
|
}
|
|
194
170
|
|
|
195
|
-
export {
|
|
171
|
+
export { recordMessageFtsRowid, recordIndexedMessageTime, startMessageFtsRowidMapBackfill, messageFtsOrdinalRangeIsMapped, deleteUnmappedMessageFtsRows };
|
|
@@ -125,7 +125,7 @@ var SECRET_TEXT_PATTERNS = [
|
|
|
125
125
|
replacement: "<GITHUB_PAT_REDACTED>"
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
|
-
pattern: /\b(?:gh[opsu]|ghr)_[A-Za-z0-
|
|
128
|
+
pattern: /\b(?:gh[opsu]|ghr)_[A-Za-z0-9_-]{30,}/g,
|
|
129
129
|
replacement: "<GITHUB_TOKEN_REDACTED>"
|
|
130
130
|
},
|
|
131
131
|
{
|
|
@@ -156,6 +156,10 @@ var SECRET_TEXT_PATTERNS = [
|
|
|
156
156
|
pattern: /\b((?:x-)?(?:api-?key|api-?token|auth-?token|access-?token)\s*:\s*)([^\s'"`,;<>]{6,})/gi,
|
|
157
157
|
replacement: (full, prefix, value) => isNonSecretScalarValue(value) ? full : `${prefix}<REDACTED:api_key>`
|
|
158
158
|
},
|
|
159
|
+
{
|
|
160
|
+
pattern: /\b((?:api[_-]?key|client[_-]?secret|access[_-]?token|token|secret|password|passwd|pwd)\s*:\s*)([^\s'"`,;<>]{6,})/gi,
|
|
161
|
+
replacement: (full, prefix, value) => isNonSecretScalarValue(value) ? full : `${prefix}<REDACTED:credential>`
|
|
162
|
+
},
|
|
159
163
|
{
|
|
160
164
|
pattern: /\b([a-z][a-z0-9+.-]*:\/\/[^\s/:@]+:)([^\s/@]+)(@)/gi,
|
|
161
165
|
replacement: (_full, prefix, _password, at) => `${prefix}<REDACTED:password>${at}`
|
|
@@ -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-3403gbzj.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-wpwpn7nj.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-21919gcq.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));
|
|
@@ -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,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
log2
|
|
3
|
-
} from "./
|
|
3
|
+
} from "./index-mvvephtj.js";
|
|
4
4
|
import {
|
|
5
5
|
canonicalProjectDirectory
|
|
6
|
-
} from "./
|
|
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";
|