@cortexkit/opencode-magic-context 0.49.56 → 0.49.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{announcement-9pr71hd5.js → announcement-p41dde4h.js} +2 -2
- package/dist/auto-search-worker.js +5 -5
- package/dist/chunk-embedding-write-worker.js +13 -13
- package/dist/{compaction-marker-candidates-8hazqfvj.js → compaction-marker-candidates-1ndjqh9k.js} +2 -2
- package/dist/compaction-marker-candidates-worker.js +1 -1
- package/dist/{compartment-chunk-embedding-gfd093f8.js → compartment-chunk-embedding-ymc9mtwv.js} +7 -7
- package/dist/{conflict-warning-hook-56qpq7ws.js → conflict-warning-hook-m8yezwdj.js} +7 -7
- package/dist/{context-bejy30t5.js → context-aexc6pbs.js} +69 -44
- package/dist/{derive-budgets-z53424qx.js → derive-budgets-heypxqdz.js} +2 -2
- package/dist/{embedding-backfill-2dvf3rcn.js → embedding-backfill-sk7agn5v.js} +12 -12
- package/dist/embedding-worker-process.js +1 -1
- package/dist/embedding-worker.js +4 -4
- package/dist/features/magic-context/mural/render-mural.d.ts +17 -0
- package/dist/features/magic-context/mural/render-mural.d.ts.map +1 -1
- package/dist/features/magic-context/mural/render-trigger.d.ts +2 -1
- package/dist/features/magic-context/mural/render-trigger.d.ts.map +1 -1
- package/dist/features/magic-context/mural/resolve-mural.d.ts +8 -2
- package/dist/features/magic-context/mural/resolve-mural.d.ts.map +1 -1
- package/dist/features/magic-context/storage-historian-runs.d.ts +7 -0
- package/dist/features/magic-context/storage-historian-runs.d.ts.map +1 -1
- package/dist/{history-owner-n50e0e8y.js → history-owner-xqfsvf9k.js} +2 -2
- package/dist/hooks/magic-context/command-handler.d.ts +2 -0
- package/dist/hooks/magic-context/command-handler.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-incremental.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-types.d.ts +9 -0
- package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner.d.ts +7 -1
- package/dist/hooks/magic-context/compartment-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/historian-failure-report.d.ts +112 -0
- package/dist/hooks/magic-context/historian-failure-report.d.ts.map +1 -0
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts +11 -1
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-5ptp2de1.js → index-0cz8bsyx.js} +9 -9
- package/dist/{index-r9agn061.js → index-1sq1krqw.js} +4 -4
- package/dist/{index-b6rdv8re.js → index-3hk445am.js} +4 -4
- package/dist/{index-by14cr73.js → index-3yyfftqq.js} +11 -11
- package/dist/{index-ffab4edg.js → index-575njz7q.js} +74 -50
- package/dist/{index-gapnh6tk.js → index-5ps3axh5.js} +1 -1
- package/dist/{index-0tz2fzpq.js → index-5vsk2cpp.js} +1 -1
- package/dist/{index-90z05d0p.js → index-832w615x.js} +1 -1
- package/dist/{index-sk6p6esd.js → index-8sc7vqt7.js} +4 -4
- package/dist/{index-cd3vp8xa.js → index-98qy103c.js} +1 -1
- package/dist/{index-3jeq08jv.js → index-a09sw9fx.js} +380 -93
- package/dist/{index-29ff546v.js → index-d0feqcs5.js} +6 -6
- package/dist/{index-gz001bx7.js → index-e6ncz7a6.js} +1 -1
- package/dist/{index-reyws9fy.js → index-esqcwes7.js} +1 -1
- package/dist/{index-h62j8z2r.js → index-ev2rrjfc.js} +4 -4
- package/dist/{index-sx1sppd6.js → index-gq1g9a3a.js} +8 -8
- package/dist/{index-ga5q492k.js → index-gqf8r04r.js} +1 -1
- package/dist/{index-5483ntzh.js → index-gth4t4ar.js} +5 -5
- package/dist/{index-pxfb7pp8.js → index-j4aeh6tx.js} +14 -14
- package/dist/{index-qperbvjn.js → index-jg7sbt3v.js} +2 -2
- package/dist/{index-9mggb1nv.js → index-jrj95cce.js} +2 -2
- package/dist/{index-12p4j9wa.js → index-kv4ntrr6.js} +5 -5
- package/dist/{index-tad3can2.js → index-m0pwswv9.js} +1 -1
- package/dist/{index-pdh4tdcq.js → index-n6aye6ny.js} +2 -2
- package/dist/{index-hsyczpn7.js → index-pxnzyvjc.js} +2 -2
- package/dist/{index-kn1bx21r.js → index-pzvdf7sr.js} +3 -3
- package/dist/{index-36wseasx.js → index-q7q6qp1f.js} +1 -1
- package/dist/{index-qfc1kjh4.js → index-s2jdky2x.js} +3 -3
- package/dist/{index-2ny9xwdn.js → index-s32f8y67.js} +2 -2
- package/dist/{index-3wmp1nb7.js → index-s3t4vk21.js} +7 -7
- package/dist/{index-hexdee98.js → index-snbpdpa3.js} +4 -4
- package/dist/{index-dhdv88e5.js → index-tebcx987.js} +1 -1
- package/dist/{index-5gqszjq9.js → index-tq20edcs.js} +3 -3
- package/dist/{index-0k283v27.js → index-tzy5h4x6.js} +1 -1
- package/dist/{index-em92bp7f.js → index-x40zr813.js} +2 -2
- package/dist/{index-sv5tn72j.js → index-xx05vta0.js} +4 -4
- package/dist/{index-82dfe8en.js → index-ywrz4wy2.js} +9 -4
- package/dist/{index-wgbp5zch.js → index-ywxvdwmj.js} +25 -10
- package/dist/{index-xstbytjn.js → index-zb4h9nrk.js} +2 -2
- package/dist/{index-2vsd5064.js → index-zxj39ba2.js} +4 -4
- package/dist/index.js +51 -50
- package/dist/{logger-sw7z6sjz.js → logger-d7c8akh9.js} +1 -1
- package/dist/{message-fts-rowid-map-kx1bsdyg.js → message-fts-rowid-map-0xx8ge09.js} +4 -4
- package/dist/{message-index-bounded-xav3h8qe.js → message-index-bounded-f6yz4xq8.js} +10 -10
- package/dist/{message-time-backfill-hp2jgn49.js → message-time-backfill-pz5981mf.js} +2 -2
- package/dist/migration-worker.js +10 -10
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/{project-embedding-registry-f2azrq24.js → project-embedding-registry-c2sfnamh.js} +11 -11
- package/dist/raw-ordinal-warmup-worker.js +8 -8
- package/dist/{read-session-chunk-70aam2c1.js → read-session-chunk-8b1g06nz.js} +8 -8
- package/dist/{read-session-raw-04ger9zt.js → read-session-raw-3sc9231y.js} +2 -2
- package/dist/{recomp-orchestrator-2tsjqbrm.js → recomp-orchestrator-zqn9zwxn.js} +29 -29
- package/dist/{render-fgxbcmnh.js → render-nrfbtkkw.js} +19 -19
- package/dist/{safe-notification-target-mx5khyxf.js → safe-notification-target-d21swr3n.js} +2 -2
- package/dist/{search-archive-0mz3p1g1.js → search-archive-1ppdjfm9.js} +10 -10
- package/dist/{search-jfwb4ms3.js → search-xha0r30f.js} +22 -22
- package/dist/{send-session-notification-gamjee2f.js → send-session-notification-ykvt5k2s.js} +5 -5
- package/dist/shared/data-path.d.ts +31 -36
- package/dist/shared/data-path.d.ts.map +1 -1
- package/dist/shared/test-temp-dir.d.ts +28 -0
- package/dist/shared/test-temp-dir.d.ts.map +1 -1
- package/dist/{storage-tags-arnkn5t1.js → storage-tags-spet01yb.js} +5 -5
- package/dist/{transform-postprocess-phase-64xtx439.js → transform-postprocess-phase-gxb3sp91.js} +30 -30
- package/dist/v2/auto-search-worker.js +5 -5
- package/dist/v2/chunk-embedding-write-worker.js +13 -13
- package/dist/v2/{compaction-marker-candidates-re14353a.js → compaction-marker-candidates-bp1bn579.js} +2 -2
- package/dist/v2/compaction-marker-candidates-worker.js +1 -1
- package/dist/v2/{compartment-chunk-embedding-0pxsrzrt.js → compartment-chunk-embedding-x6qw6mjk.js} +7 -7
- package/dist/v2/{context-5hhm89jw.js → context-wszt0gbq.js} +102 -57
- package/dist/v2/{derive-budgets-w0815q82.js → derive-budgets-gw030jzt.js} +3 -3
- package/dist/v2/{embedding-backfill-48qbnh7p.js → embedding-backfill-j2xj86zn.js} +12 -12
- package/dist/v2/embedding-worker-process.js +1 -1
- package/dist/v2/embedding-worker.js +4 -4
- package/dist/v2/{history-owner-ep91wgqj.js → history-owner-260djmv5.js} +2 -2
- package/dist/v2/hooks/claude-agent-instructions.d.ts +27 -0
- package/dist/v2/hooks/claude-agent-instructions.d.ts.map +1 -0
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/hidden-child.d.ts +15 -2
- package/dist/v2/hooks/hidden-child.d.ts.map +1 -1
- package/dist/v2/hooks/usage-persist.d.ts +7 -1
- package/dist/v2/hooks/usage-persist.d.ts.map +1 -1
- package/dist/v2/{logger-xnscpj6w.js → logger-zyf43np1.js} +1 -1
- package/dist/v2/{message-fts-rowid-map-57jh6xpb.js → message-fts-rowid-map-n8mcvcpz.js} +4 -4
- package/dist/v2/{message-index-bounded-sw8hyqw1.js → message-index-bounded-0w8eh8fc.js} +10 -10
- package/dist/v2/{message-time-backfill-baxebka0.js → message-time-backfill-ynb3vg6r.js} +2 -2
- package/dist/v2/migration-worker.js +10 -10
- package/dist/v2/{project-embedding-registry-kwahtjgg.js → project-embedding-registry-k0hjqt11.js} +11 -11
- package/dist/v2/raw-ordinal-warmup-worker.js +8 -8
- package/dist/v2/{read-session-chunk-nqkn0yb4.js → read-session-chunk-dxs1tgt9.js} +8 -8
- package/dist/v2/{read-session-raw-3e482h3c.js → read-session-raw-wg5zc29f.js} +2 -2
- package/dist/v2/{recomp-orchestrator-dzdxrgdt.js → recomp-orchestrator-76rv3b89.js} +30 -30
- package/dist/v2/{render-jfa3hj8z.js → render-9knrdrjs.js} +19 -19
- package/dist/v2/{safe-notification-target-9r79xnbt.js → safe-notification-target-y55z2zat.js} +2 -2
- package/dist/v2/{search-8dc9ex0a.js → search-a2a0qs3t.js} +21 -21
- package/dist/v2/{search-archive-p4s9q7a3.js → search-archive-2jmyvj69.js} +10 -10
- package/dist/v2/{send-session-notification-95p89k7q.js → send-session-notification-8g4r97bp.js} +5 -5
- package/dist/v2/{server-7vrtk78d.js → server-3ap5dmhc.js} +1 -1
- package/dist/v2/{server-avfc9ezb.js → server-4r86tcs2.js} +3 -3
- package/dist/v2/{server-np27dgyt.js → server-5sbsnpkn.js} +1 -1
- package/dist/v2/{server-rz5jnhnv.js → server-6ash6z8z.js} +1 -1
- package/dist/v2/{server-beydmd68.js → server-88n85n60.js} +4 -4
- package/dist/v2/{server-g61hgy1y.js → server-8pdfmc27.js} +4 -4
- package/dist/v2/{server-gge95a03.js → server-8ycacd59.js} +6 -6
- package/dist/v2/{server-8e5m2gre.js → server-9ab9jnpq.js} +3 -3
- package/dist/v2/{server-z6sxv6n3.js → server-9emfsa60.js} +382 -95
- package/dist/v2/{server-kyfj1090.js → server-9m5r04ws.js} +5 -5
- package/dist/v2/{server-3yk44ddz.js → server-afsz3cmx.js} +1 -1
- package/dist/v2/{server-c8z2grq0.js → server-at0v0z4t.js} +1 -1
- package/dist/v2/{server-v817sf79.js → server-d07yxksx.js} +2 -2
- package/dist/v2/{server-kwtnrhv3.js → server-d706s5xn.js} +2 -2
- package/dist/v2/{server-ycvqg2s3.js → server-d9aayyxk.js} +4 -4
- package/dist/v2/{server-966dq3pd.js → server-ds8vpfkr.js} +2 -2
- package/dist/v2/{server-bb6kf05j.js → server-j8376q08.js} +9 -4
- package/dist/v2/{server-7waad75d.js → server-ja6swvmb.js} +11 -11
- package/dist/v2/{server-tmf0ayqp.js → server-jdfe07mp.js} +1 -1
- package/dist/v2/{server-6k0rnwbd.js → server-jn4pktdk.js} +4 -4
- package/dist/v2/{server-qp5sj6n5.js → server-jtq03rkb.js} +2 -2
- package/dist/v2/{server-sa1fdt41.js → server-kc5kb9ya.js} +1 -1
- package/dist/v2/{server-91gb0vh8.js → server-npdey91q.js} +1 -1
- package/dist/v2/{server-vqq3g1t7.js → server-qjff96a6.js} +4 -4
- package/dist/v2/{server-4x0xq8a1.js → server-rbtx6q5v.js} +1 -1
- package/dist/v2/{server-jwydbwcx.js → server-svx20ra2.js} +4 -4
- package/dist/v2/{server-q02z0jq7.js → server-t8tmrtcg.js} +25 -10
- package/dist/v2/{server-0ayyh3mx.js → server-tzh55x6d.js} +9 -9
- package/dist/v2/{server-5p0bjk3y.js → server-v1s0cb4v.js} +2 -2
- package/dist/v2/{server-mxsy9h1d.js → server-x6fn9x8q.js} +2 -2
- package/dist/v2/{server-b0357as4.js → server-xepx8t43.js} +2 -2
- package/dist/v2/{server-3jc6qmdz.js → server-y8xjr8rx.js} +1 -1
- package/dist/v2/{server-5kgesxck.js → server-ypaat9rj.js} +2 -2
- package/dist/v2/{server-rpmkz5ta.js → server-z5255w05.js} +8 -8
- package/dist/v2/server.js +5 -5
- package/dist/v2/{storage-tags-19da4c0m.js → storage-tags-50wsqg3t.js} +5 -5
- package/dist/v2/{v2-archive-reader-jpdh0ktt.js → v2-archive-reader-ycjh6a2d.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-5dfj2mcs.js → wrapup-orchestrator-ejcx02g2.js} +30 -30
- package/dist/{v2-archive-reader-557b5dn3.js → v2-archive-reader-wec0a8fx.js} +1 -1
- package/dist/wrapup-orchestrator-e7mczz6e.js +54 -0
- package/package.json +1 -1
- package/src/shared/data-path.test.ts +27 -10
- package/src/shared/data-path.ts +39 -39
- package/src/shared/test-temp-dir.ts +59 -0
- package/dist/wrapup-orchestrator-21hgybdk.js +0 -54
|
@@ -27,16 +27,16 @@ serveWorkerJobs(async (initial, port) => {
|
|
|
27
27
|
{ Database, registerSqliteDiagnosticSink },
|
|
28
28
|
{ log }
|
|
29
29
|
] = await Promise.all([
|
|
30
|
-
import("./embedding-backfill-
|
|
30
|
+
import("./embedding-backfill-j2xj86zn.js"),
|
|
31
31
|
import("./embedding-cache-mgyr73ef.js"),
|
|
32
32
|
import("./storage-memory-e6a7mb0k.js"),
|
|
33
|
-
import("./project-embedding-registry-
|
|
34
|
-
import("./search-
|
|
35
|
-
import("./compartment-chunk-embedding-
|
|
33
|
+
import("./project-embedding-registry-k0hjqt11.js"),
|
|
34
|
+
import("./search-a2a0qs3t.js"),
|
|
35
|
+
import("./compartment-chunk-embedding-x6qw6mjk.js"),
|
|
36
36
|
import("./embedding-activity-g1dhes6g.js"),
|
|
37
37
|
import("./harness-e4avh192.js"),
|
|
38
38
|
import("./sqlite-zdgm52sv.js"),
|
|
39
|
-
import("./logger-
|
|
39
|
+
import("./logger-zyf43np1.js")
|
|
40
40
|
]);
|
|
41
41
|
setHarness(input.harness);
|
|
42
42
|
registerSqliteDiagnosticSink(log, getHarness);
|
|
@@ -11,38 +11,38 @@ import {
|
|
|
11
11
|
isWorkerCloseMessage,
|
|
12
12
|
exitOnWorkerClose
|
|
13
13
|
} from "./server-1d042x6w.js";
|
|
14
|
-
import"./server-
|
|
15
|
-
import"./server-
|
|
14
|
+
import"./server-y8xjr8rx.js";
|
|
15
|
+
import"./server-j8376q08.js";
|
|
16
16
|
import"./server-z4p0ry94.js";
|
|
17
|
-
import"./server-
|
|
17
|
+
import"./server-x6fn9x8q.js";
|
|
18
18
|
import"./server-v0p37hm2.js";
|
|
19
19
|
import"./server-96ztjvkn.js";
|
|
20
|
-
import"./server-
|
|
21
|
-
import"./server-
|
|
20
|
+
import"./server-6ash6z8z.js";
|
|
21
|
+
import"./server-ds8vpfkr.js";
|
|
22
22
|
import {
|
|
23
23
|
replaceCompartmentChunkEmbeddings2,
|
|
24
24
|
recordChunkEmbedBackoff2,
|
|
25
25
|
loadUnembeddedSessionChunkCandidates2,
|
|
26
26
|
countUnembeddedSessionCompartments2
|
|
27
|
-
} from "./server-
|
|
27
|
+
} from "./server-8pdfmc27.js";
|
|
28
28
|
import {
|
|
29
29
|
acquireGitSweepLease,
|
|
30
30
|
renewGitSweepLease,
|
|
31
31
|
releaseGitSweepLease,
|
|
32
32
|
recordSessionProjectIdentity
|
|
33
|
-
} from "./server-
|
|
34
|
-
import"./server-
|
|
35
|
-
import"./server-
|
|
33
|
+
} from "./server-jtq03rkb.js";
|
|
34
|
+
import"./server-afsz3cmx.js";
|
|
35
|
+
import"./server-jdfe07mp.js";
|
|
36
36
|
import {
|
|
37
37
|
LATEST_SUPPORTED_VERSION,
|
|
38
38
|
enforceSchemaFence
|
|
39
|
-
} from "./server-
|
|
39
|
+
} from "./server-tzh55x6d.js";
|
|
40
40
|
import"./server-468mya5v.js";
|
|
41
|
-
import"./server-
|
|
42
|
-
import"./server-
|
|
41
|
+
import"./server-jn4pktdk.js";
|
|
42
|
+
import"./server-xepx8t43.js";
|
|
43
43
|
import"./server-fr0wbhdn.js";
|
|
44
44
|
import"./server-2ra6pwf3.js";
|
|
45
|
-
import"./server-
|
|
45
|
+
import"./server-5sbsnpkn.js";
|
|
46
46
|
import {
|
|
47
47
|
serveWorkerJobs
|
|
48
48
|
} from "./server-7v05d9b7.js";
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
certifiedMarkerReferenceFloor2,
|
|
10
10
|
readMarkerReferenceRows2,
|
|
11
11
|
readKnownMarkerReferenceRows2
|
|
12
|
-
} from "./server-
|
|
12
|
+
} from "./server-at0v0z4t.js";
|
|
13
13
|
import"./server-96ztjvkn.js";
|
|
14
14
|
import"./server-v0p37hm2.js";
|
|
15
15
|
import"./server-gzy5w8ya.js";
|
|
16
|
-
import"./server-
|
|
16
|
+
import"./server-j8376q08.js";
|
|
17
17
|
import"./server-pavzsdc6.js";
|
|
18
18
|
import"./server-z4p0ry94.js";
|
|
19
19
|
import"./server-1d042x6w.js";
|
|
@@ -7,7 +7,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
7
7
|
port.postMessage({ kind: "accepted" });
|
|
8
8
|
const [{ Database }, { scanMarkerCandidateSnapshot }] = await Promise.all([
|
|
9
9
|
import("./sqlite-zdgm52sv.js"),
|
|
10
|
-
import("./compaction-marker-candidates-
|
|
10
|
+
import("./compaction-marker-candidates-bp1bn579.js")
|
|
11
11
|
]);
|
|
12
12
|
let db;
|
|
13
13
|
let reply;
|
package/dist/v2/{compartment-chunk-embedding-0pxsrzrt.js → compartment-chunk-embedding-x6qw6mjk.js}
RENAMED
|
@@ -24,16 +24,16 @@ import {
|
|
|
24
24
|
countSessionCompartmentEmbedCoverage2,
|
|
25
25
|
countSessionCompartmentEmbedCoveragePolite2,
|
|
26
26
|
countUnembeddedSessionCompartmentsPolite2
|
|
27
|
-
} from "./server-
|
|
28
|
-
import"./server-
|
|
29
|
-
import"./server-
|
|
30
|
-
import"./server-
|
|
27
|
+
} from "./server-8pdfmc27.js";
|
|
28
|
+
import"./server-x6fn9x8q.js";
|
|
29
|
+
import"./server-ds8vpfkr.js";
|
|
30
|
+
import"./server-6ash6z8z.js";
|
|
31
31
|
import"./server-96ztjvkn.js";
|
|
32
32
|
import"./server-v0p37hm2.js";
|
|
33
|
-
import"./server-
|
|
34
|
-
import"./server-
|
|
33
|
+
import"./server-5sbsnpkn.js";
|
|
34
|
+
import"./server-y8xjr8rx.js";
|
|
35
35
|
import"./server-gzy5w8ya.js";
|
|
36
|
-
import"./server-
|
|
36
|
+
import"./server-j8376q08.js";
|
|
37
37
|
import"./server-pavzsdc6.js";
|
|
38
38
|
import"./server-z4p0ry94.js";
|
|
39
39
|
import"./server-1d042x6w.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
resolveLegacyConfigSources,
|
|
8
8
|
getProtectedTokensTierOverrides,
|
|
9
9
|
loadPluginConfigDetailed
|
|
10
|
-
} from "./server-
|
|
10
|
+
} from "./server-v1s0cb4v.js";
|
|
11
11
|
import {
|
|
12
12
|
getHarness2,
|
|
13
13
|
harnessOwnsOpenCodeStore2
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
log2,
|
|
22
22
|
sessionLog2,
|
|
23
23
|
getLoggerDiagnostics2
|
|
24
|
-
} from "./server-
|
|
24
|
+
} from "./server-j8376q08.js";
|
|
25
25
|
import {
|
|
26
26
|
sanitizeDiagnosticText,
|
|
27
27
|
hasShareabilitySensitiveText
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
getSdkContextLimit,
|
|
38
38
|
getSdkOutputLimit,
|
|
39
39
|
getModelsDevCacheState
|
|
40
|
-
} from "./server-
|
|
40
|
+
} from "./server-kc5kb9ya.js";
|
|
41
41
|
import {
|
|
42
42
|
string,
|
|
43
43
|
number,
|
|
@@ -194,6 +194,8 @@ import {
|
|
|
194
194
|
producerPromptFailureReason,
|
|
195
195
|
resolveHiddenCompletionExecutor,
|
|
196
196
|
createV1HiddenCompletionExecutor,
|
|
197
|
+
readHistorianFailureStreak,
|
|
198
|
+
describeHistorianJoinRefusal,
|
|
197
199
|
shouldWaitForNewHistorianHistory,
|
|
198
200
|
EMPTY_READ_REPLY,
|
|
199
201
|
noteTouchedAt,
|
|
@@ -218,7 +220,7 @@ import {
|
|
|
218
220
|
startCompartmentAgent,
|
|
219
221
|
setRecompStarting2,
|
|
220
222
|
setRecompTerminal2
|
|
221
|
-
} from "./server-
|
|
223
|
+
} from "./server-9emfsa60.js";
|
|
222
224
|
import {
|
|
223
225
|
resolveHistorianModel2
|
|
224
226
|
} from "./server-5kym00ag.js";
|
|
@@ -246,7 +248,7 @@ import {
|
|
|
246
248
|
storedPathBelongsToIdentity,
|
|
247
249
|
beginBootQuietPeriod,
|
|
248
250
|
scheduleAfterBootQuiet
|
|
249
|
-
} from "./server-
|
|
251
|
+
} from "./server-afsz3cmx.js";
|
|
250
252
|
import"./server-v0p37hm2.js";
|
|
251
253
|
import {
|
|
252
254
|
inRootAsyncContext2,
|
|
@@ -275,7 +277,7 @@ import {
|
|
|
275
277
|
buildInMemoryTailRawMessages2,
|
|
276
278
|
RawOrdinalsNotReady2,
|
|
277
279
|
runSessionWarmupWorker
|
|
278
|
-
} from "./server-
|
|
280
|
+
} from "./server-6ash6z8z.js";
|
|
279
281
|
import {
|
|
280
282
|
resolveModelCalibration,
|
|
281
283
|
calibrateBuckets,
|
|
@@ -376,7 +378,6 @@ import {
|
|
|
376
378
|
setPersistedTodoSyntheticAnchor,
|
|
377
379
|
clearPersistedTodoSyntheticAnchor,
|
|
378
380
|
setNoteLastReadAt,
|
|
379
|
-
getHistorianFailureState,
|
|
380
381
|
clearHistorianFailureState,
|
|
381
382
|
getOverflowState,
|
|
382
383
|
loadTransformPassStateSnapshot,
|
|
@@ -533,7 +534,7 @@ import {
|
|
|
533
534
|
adoptNullOwnerToolTag2,
|
|
534
535
|
getCandidateToolOwners2,
|
|
535
536
|
pickNearestPriorOwner2
|
|
536
|
-
} from "./server-
|
|
537
|
+
} from "./server-88n85n60.js";
|
|
537
538
|
import {
|
|
538
539
|
textMentionsRecentCommit,
|
|
539
540
|
hasMeaningfulUserText2,
|
|
@@ -544,7 +545,7 @@ import {
|
|
|
544
545
|
estimateTokens,
|
|
545
546
|
estimateFixedPromptTokens,
|
|
546
547
|
normalizeText
|
|
547
|
-
} from "./server-
|
|
548
|
+
} from "./server-y8xjr8rx.js";
|
|
548
549
|
import {
|
|
549
550
|
BoundedSessionMap,
|
|
550
551
|
stableStringify,
|
|
@@ -557,7 +558,7 @@ import {
|
|
|
557
558
|
freezeTemporalDecisions,
|
|
558
559
|
tagRevisionKey,
|
|
559
560
|
tagIdentityRevisionKey
|
|
560
|
-
} from "./server-
|
|
561
|
+
} from "./server-xepx8t43.js";
|
|
561
562
|
import {
|
|
562
563
|
resolveOpenCodeDbPath,
|
|
563
564
|
assertOpenCodeStoreGeneration,
|
|
@@ -573,7 +574,7 @@ import {
|
|
|
573
574
|
latestRealUserTurnIdFromOpenCodeDb,
|
|
574
575
|
getMessageTimesFromOpenCodeDb,
|
|
575
576
|
findLastAssistantModelFromOpenCodeDb
|
|
576
|
-
} from "./server-
|
|
577
|
+
} from "./server-3ap5dmhc.js";
|
|
577
578
|
import {
|
|
578
579
|
askAnswerLines,
|
|
579
580
|
estimateTrueRawMessageTokens,
|
|
@@ -615,13 +616,13 @@ import {
|
|
|
615
616
|
readRawSessionMessageOrdinalById2,
|
|
616
617
|
readSessionChunk2,
|
|
617
618
|
readRawSessionSeedTail2
|
|
618
|
-
} from "./server-
|
|
619
|
+
} from "./server-8ycacd59.js";
|
|
619
620
|
import {
|
|
620
621
|
cleanSearchText,
|
|
621
622
|
matchedSearchSnippet,
|
|
622
623
|
getLastIndexedOrdinal
|
|
623
|
-
} from "./server-
|
|
624
|
-
import"./server-
|
|
624
|
+
} from "./server-svx20ra2.js";
|
|
625
|
+
import"./server-ds8vpfkr.js";
|
|
625
626
|
import {
|
|
626
627
|
getMessageIndexEpoch,
|
|
627
628
|
isMessageIndexSearchable,
|
|
@@ -647,7 +648,7 @@ import {
|
|
|
647
648
|
resolveMemoriesByIdsForSearch2,
|
|
648
649
|
unifiedSearch2,
|
|
649
650
|
formatSearchResults2
|
|
650
|
-
} from "./server-
|
|
651
|
+
} from "./server-ja6swvmb.js";
|
|
651
652
|
import {
|
|
652
653
|
embedPauseBySession,
|
|
653
654
|
embedRunStateBySession,
|
|
@@ -666,17 +667,17 @@ import {
|
|
|
666
667
|
toSynapseLaneDescriptor,
|
|
667
668
|
formatSynapseLaneDescriptor,
|
|
668
669
|
SynapseEmbeddingProvider
|
|
669
|
-
} from "./server-
|
|
670
|
+
} from "./server-x6fn9x8q.js";
|
|
670
671
|
import {
|
|
671
672
|
deleteChunkEmbedBackoffForSession2
|
|
672
|
-
} from "./server-
|
|
673
|
+
} from "./server-8pdfmc27.js";
|
|
673
674
|
import {
|
|
674
675
|
registerOwnRpcServerInstance,
|
|
675
676
|
rpcPortDir,
|
|
676
677
|
rpcPortFilePath,
|
|
677
678
|
parseRpcPortFile,
|
|
678
679
|
inspectProcessesAsync
|
|
679
|
-
} from "./server-
|
|
680
|
+
} from "./server-jdfe07mp.js";
|
|
680
681
|
import {
|
|
681
682
|
acquireCompartmentLease,
|
|
682
683
|
releaseCompartmentLeaseBestEffort,
|
|
@@ -793,7 +794,7 @@ import {
|
|
|
793
794
|
saveSourceContent,
|
|
794
795
|
replaceSourceContent,
|
|
795
796
|
getSourceContents
|
|
796
|
-
} from "./server-
|
|
797
|
+
} from "./server-t8tmrtcg.js";
|
|
797
798
|
import {
|
|
798
799
|
startBootDeadline,
|
|
799
800
|
getUnconfirmedMigrationHolders,
|
|
@@ -809,7 +810,7 @@ import {
|
|
|
809
810
|
openDatabaseAsync,
|
|
810
811
|
isDatabasePersisted,
|
|
811
812
|
getDatabasePersistenceError
|
|
812
|
-
} from "./server-
|
|
813
|
+
} from "./server-tzh55x6d.js";
|
|
813
814
|
import {
|
|
814
815
|
V2_MEMORY_CATEGORIES,
|
|
815
816
|
CATEGORY_PRIORITY
|
|
@@ -822,7 +823,7 @@ import {
|
|
|
822
823
|
resolveStoredPathWorkspaceIdentity,
|
|
823
824
|
storedPathBelongsToWorkspace,
|
|
824
825
|
computeWorkspaceEpochFingerprint
|
|
825
|
-
} from "./server-
|
|
826
|
+
} from "./server-jn4pktdk.js";
|
|
826
827
|
import {
|
|
827
828
|
gaDatabasePath2,
|
|
828
829
|
RAW_MESSAGE_TYPES2,
|
|
@@ -857,15 +858,15 @@ import {
|
|
|
857
858
|
createPrimer,
|
|
858
859
|
updatePrimerSupport,
|
|
859
860
|
updatePrimerAnswer
|
|
860
|
-
} from "./server-
|
|
861
|
+
} from "./server-rbtx6q5v.js";
|
|
861
862
|
import {
|
|
862
863
|
deriveTriggerBudget2,
|
|
863
864
|
deriveHistorianChunkTokens2,
|
|
864
865
|
resolveKnownHistorianContextLimit2,
|
|
865
866
|
resolveHistorianProducerLimits2,
|
|
866
867
|
resolveHistorianContextLimit2
|
|
867
|
-
} from "./server-
|
|
868
|
-
import"./server-
|
|
868
|
+
} from "./server-ypaat9rj.js";
|
|
869
|
+
import"./server-at0v0z4t.js";
|
|
869
870
|
import {
|
|
870
871
|
isEmbeddingHostBusy2
|
|
871
872
|
} from "./server-qt1qqasc.js";
|
|
@@ -890,7 +891,7 @@ import {
|
|
|
890
891
|
embedSessionCompartmentChunks2,
|
|
891
892
|
getEmbeddingCoverageStatus2,
|
|
892
893
|
getAutoEmbeddingSessionCoverage2
|
|
893
|
-
} from "./server-
|
|
894
|
+
} from "./server-z5255w05.js";
|
|
894
895
|
import {
|
|
895
896
|
GIT_SWEEP_LEASE_RENEWAL_MS,
|
|
896
897
|
acquireGitSweepLease,
|
|
@@ -900,7 +901,7 @@ import {
|
|
|
900
901
|
releaseGitSweepLease,
|
|
901
902
|
recordSessionProjectIdentity,
|
|
902
903
|
hasRecordedSessionProjectIdentity
|
|
903
|
-
} from "./server-
|
|
904
|
+
} from "./server-jtq03rkb.js";
|
|
904
905
|
import {
|
|
905
906
|
saveEmbeddingIfHashMatches,
|
|
906
907
|
invalidateProject2,
|
|
@@ -910,10 +911,10 @@ import {
|
|
|
910
911
|
getCachedLocalEmbeddingPooling,
|
|
911
912
|
preflightLocalEmbeddingPooling,
|
|
912
913
|
getLocalEmbeddingNativeMemoryStats
|
|
913
|
-
} from "./server-
|
|
914
|
+
} from "./server-d706s5xn.js";
|
|
914
915
|
import {
|
|
915
916
|
cosineSimilarity
|
|
916
|
-
} from "./server-
|
|
917
|
+
} from "./server-d9aayyxk.js";
|
|
917
918
|
import {
|
|
918
919
|
computeCueContentHash,
|
|
919
920
|
hasMuralCueColumns,
|
|
@@ -958,7 +959,7 @@ import {
|
|
|
958
959
|
readGitFileChangeTimesSince,
|
|
959
960
|
verificationFileExists,
|
|
960
961
|
normalizeVerificationFiles
|
|
961
|
-
} from "./server-
|
|
962
|
+
} from "./server-d07yxksx.js";
|
|
962
963
|
import {
|
|
963
964
|
registerNotificationSink2,
|
|
964
965
|
pushNotification2,
|
|
@@ -966,11 +967,11 @@ import {
|
|
|
966
967
|
drainNotifications2,
|
|
967
968
|
isTuiConnected2
|
|
968
969
|
} from "./server-x8a7jmkh.js";
|
|
969
|
-
import"./server-
|
|
970
|
+
import"./server-npdey91q.js";
|
|
970
971
|
import {
|
|
971
972
|
flushIgnoredMessages2,
|
|
972
973
|
sendStatusNotification2
|
|
973
|
-
} from "./server-
|
|
974
|
+
} from "./server-qjff96a6.js";
|
|
974
975
|
import {
|
|
975
976
|
isToolError,
|
|
976
977
|
toolErrorText,
|
|
@@ -995,14 +996,14 @@ import {
|
|
|
995
996
|
renderMessageByOrdinal2,
|
|
996
997
|
renderVerboseRangeForTool2,
|
|
997
998
|
renderItemByTag2
|
|
998
|
-
} from "./server-
|
|
999
|
+
} from "./server-4r86tcs2.js";
|
|
999
1000
|
import"./server-52x68mj4.js";
|
|
1000
1001
|
import {
|
|
1001
1002
|
readV2ArchiveOffThread2
|
|
1002
|
-
} from "./server-
|
|
1003
|
+
} from "./server-9ab9jnpq.js";
|
|
1003
1004
|
import {
|
|
1004
1005
|
renderSearchArchiveOffThread2
|
|
1005
|
-
} from "./server-
|
|
1006
|
+
} from "./server-9m5r04ws.js";
|
|
1006
1007
|
import {
|
|
1007
1008
|
markHostInstructionRow,
|
|
1008
1009
|
hostInstructionRow,
|
|
@@ -1047,7 +1048,7 @@ import {
|
|
|
1047
1048
|
} from "./server-8ajstryz.js";
|
|
1048
1049
|
import {
|
|
1049
1050
|
logSlowWriteTransaction
|
|
1050
|
-
} from "./server-
|
|
1051
|
+
} from "./server-5sbsnpkn.js";
|
|
1051
1052
|
import {
|
|
1052
1053
|
shouldEnforcePrivateStoragePermissions,
|
|
1053
1054
|
ensureStorageDirectorySync,
|
|
@@ -20200,10 +20201,18 @@ function historianJoinFailClosedMessage(input) {
|
|
|
20200
20201
|
if (estimate?.trusted === true && Number.isFinite(estimate.tokens) && estimate.tokens > 0 && Number.isFinite(input.contextLimitTokens) && input.contextLimitTokens > 0 && estimate.tokens < input.contextLimitTokens) {
|
|
20201
20202
|
return null;
|
|
20202
20203
|
}
|
|
20203
|
-
|
|
20204
|
-
|
|
20205
|
-
|
|
20206
|
-
|
|
20204
|
+
return describeHistorianJoinRefusal({
|
|
20205
|
+
waitedMs: input.budgetMs ?? HISTORIAN_INLINE_JOIN_BUDGET_MS,
|
|
20206
|
+
usagePercentage: input.usagePercentage,
|
|
20207
|
+
run: input.joinedRun,
|
|
20208
|
+
failures: input.failures ?? {
|
|
20209
|
+
count: 0,
|
|
20210
|
+
lastError: null,
|
|
20211
|
+
lastFailureAt: null,
|
|
20212
|
+
since: null
|
|
20213
|
+
},
|
|
20214
|
+
now: input.now
|
|
20215
|
+
});
|
|
20207
20216
|
}
|
|
20208
20217
|
function runCompartmentPhase(args) {
|
|
20209
20218
|
if (args.historianRunnable !== false && !args.compactionOff && args.canRunCompartments && !getActiveCompartmentRun(args.sessionId) && (args.sessionMeta.compartmentInProgress || args.contextUsage.percentage >= BLOCK_UNTIL_DONE_PERCENTAGE) && isHistorianDrainBudgetSpent({
|
|
@@ -20250,6 +20259,7 @@ async function runCompartmentPhaseImpl(args) {
|
|
|
20250
20259
|
let rebuiltHistoryThisPass = false;
|
|
20251
20260
|
let historianJoinTimedOut = false;
|
|
20252
20261
|
let historianJoinBudgetMs = null;
|
|
20262
|
+
let historianJoinedRun;
|
|
20253
20263
|
let chainedRecoveryRuns = 0;
|
|
20254
20264
|
const historianRunnable = args.historianRunnable !== false;
|
|
20255
20265
|
if (args.compactionOff) {
|
|
@@ -20267,6 +20277,7 @@ async function runCompartmentPhaseImpl(args) {
|
|
|
20267
20277
|
rebuiltHistoryThisPass,
|
|
20268
20278
|
historianJoinTimedOut,
|
|
20269
20279
|
historianJoinBudgetMs,
|
|
20280
|
+
historianJoinedRun,
|
|
20270
20281
|
chainedRecoveryRuns,
|
|
20271
20282
|
recoveryHistoryRemains: false
|
|
20272
20283
|
};
|
|
@@ -20322,6 +20333,7 @@ async function runCompartmentPhaseImpl(args) {
|
|
|
20322
20333
|
if (activeRun.inlineJoinTimedOutBudgetMs !== undefined && !activeRun.settled) {
|
|
20323
20334
|
historianJoinTimedOut = true;
|
|
20324
20335
|
historianJoinBudgetMs = activeRun.inlineJoinTimedOutBudgetMs;
|
|
20336
|
+
historianJoinedRun = activeRun;
|
|
20325
20337
|
sessionLog2(args.sessionId, "transform: compartment inline join budget already exhausted for this run — not waiting again");
|
|
20326
20338
|
return "timed_out";
|
|
20327
20339
|
}
|
|
@@ -20342,6 +20354,7 @@ async function runCompartmentPhaseImpl(args) {
|
|
|
20342
20354
|
if (result === "timeout") {
|
|
20343
20355
|
activeRun.inlineJoinTimedOutBudgetMs = join.budgetMs;
|
|
20344
20356
|
historianJoinTimedOut = true;
|
|
20357
|
+
historianJoinedRun = activeRun;
|
|
20345
20358
|
sessionLog2(args.sessionId, `transform: compartment await timed out after ${timeoutMs}ms — proceeding without waiting`);
|
|
20346
20359
|
return "timed_out";
|
|
20347
20360
|
}
|
|
@@ -20579,6 +20592,7 @@ async function runCompartmentPhaseImpl(args) {
|
|
|
20579
20592
|
rebuiltHistoryThisPass,
|
|
20580
20593
|
historianJoinTimedOut,
|
|
20581
20594
|
historianJoinBudgetMs,
|
|
20595
|
+
historianJoinedRun,
|
|
20582
20596
|
chainedRecoveryRuns,
|
|
20583
20597
|
recoveryHistoryRemains
|
|
20584
20598
|
};
|
|
@@ -21028,9 +21042,17 @@ function createTransform(deps) {
|
|
|
21028
21042
|
deps.liveModelBySession.set(sessionId, currentOutgoingModel);
|
|
21029
21043
|
const outgoingModelKey = resolveModelKey(currentOutgoingModel.providerID, currentOutgoingModel.modelID);
|
|
21030
21044
|
const lastUsageModelKey = persistedUsageBeforeResets?.lastObservedModelKey ?? null;
|
|
21031
|
-
|
|
21032
|
-
|
|
21033
|
-
|
|
21045
|
+
const modelChangedSinceUsage = lastUsageModelKey != null && outgoingModelKey != null && piModelRefToCanonical(lastUsageModelKey) !== piModelRefToCanonical(outgoingModelKey);
|
|
21046
|
+
const storedOverflow = getOverflowState(db, sessionId);
|
|
21047
|
+
const detectedLimitForOtherModel = outgoingModelKey != null && storedOverflow.detectedContextLimit > 0 && storedOverflow.detectedContextLimitModelKey !== null && storedOverflow.detectedContextLimitModelKey !== piModelRefToCanonical(outgoingModelKey);
|
|
21048
|
+
if (detectedLimitForOtherModel && !modelChangedSinceUsage) {
|
|
21049
|
+
sessionLog2(sessionId, `transform: clearing detected limit ${storedOverflow.detectedContextLimit} and overflow recovery recorded for ${storedOverflow.detectedContextLimitModelKey}; outgoing model is ${outgoingModelKey}`);
|
|
21050
|
+
clearDetectedContextLimit(db, sessionId);
|
|
21051
|
+
clearEmergencyRecovery(db, sessionId);
|
|
21052
|
+
forgetHistoryBoundaryRecovery(sessionId);
|
|
21053
|
+
}
|
|
21054
|
+
if (modelChangedSinceUsage) {
|
|
21055
|
+
const preserveOutgoingOverflow = storedOverflow.detectedContextLimit > 0 && storedOverflow.detectedContextLimitModelKey !== null && !detectedLimitForOtherModel;
|
|
21034
21056
|
dropSlot(sessionId, "model-change");
|
|
21035
21057
|
sessionLog2(sessionId, `transform: model change since last usage (${lastUsageModelKey} -> ${outgoingModelKey}), clearing stale per-model state`);
|
|
21036
21058
|
updateSessionMeta(db, sessionId, {
|
|
@@ -21044,7 +21066,7 @@ function createTransform(deps) {
|
|
|
21044
21066
|
clearPersistedReasoningWatermark(db, sessionId);
|
|
21045
21067
|
clearEmergencyDropSample(db, sessionId);
|
|
21046
21068
|
if (preserveOutgoingOverflow) {
|
|
21047
|
-
sessionLog2(sessionId, `transform: preserving detected limit ${
|
|
21069
|
+
sessionLog2(sessionId, `transform: preserving detected limit ${storedOverflow.detectedContextLimit} and overflow recovery for outgoing model ${outgoingModelKey}`);
|
|
21048
21070
|
} else {
|
|
21049
21071
|
clearDetectedContextLimit(db, sessionId);
|
|
21050
21072
|
clearEmergencyRecovery(db, sessionId);
|
|
@@ -22334,10 +22356,12 @@ Historian previously failed ${historianFailureState.failureCount} time(s), so Ma
|
|
|
22334
22356
|
budgetMs: compartmentPhase.historianJoinBudgetMs,
|
|
22335
22357
|
finalWireEstimate,
|
|
22336
22358
|
contextLimitTokens: boundaryContextLimit,
|
|
22337
|
-
|
|
22359
|
+
joinedRun: compartmentPhase.historianJoinedRun,
|
|
22360
|
+
failures: readHistorianFailureStreak(db, sessionId),
|
|
22361
|
+
usagePercentage: contextUsage.percentage
|
|
22338
22362
|
}) : null;
|
|
22339
22363
|
if (timedOutHistorianFailure) {
|
|
22340
|
-
sessionLog2(sessionId, `transform: ${timedOutHistorianFailure}; finalEstimate=${finalWireEstimate?.tokens ?? "unavailable"} estimateTrusted=${finalWireEstimate?.trusted ?? false} contextLimit=${boundaryContextLimit} emergencyReclaimed=${postTransformResult.emergencyReclaimedTokens}`);
|
|
22364
|
+
sessionLog2(sessionId, `transform: historian join refusal: ${timedOutHistorianFailure}; finalEstimate=${finalWireEstimate?.tokens ?? "unavailable"} estimateTrusted=${finalWireEstimate?.trusted ?? false} contextLimit=${boundaryContextLimit} emergencyReclaimed=${postTransformResult.emergencyReclaimedTokens}`);
|
|
22341
22365
|
keepRecoveryArmed();
|
|
22342
22366
|
throw new EmergencyFailClosedError(timedOutHistorianFailure);
|
|
22343
22367
|
}
|
|
@@ -25997,7 +26021,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
25997
26021
|
return { count: buildCompartmentCount(db, sessionId, moduleStatus) };
|
|
25998
26022
|
});
|
|
25999
26023
|
const buildManagedCtx = async (db) => {
|
|
26000
|
-
const { deriveHistorianChunkTokens, resolveHistorianContextLimit } = await importPluginModule(() => import("./derive-budgets-
|
|
26024
|
+
const { deriveHistorianChunkTokens, resolveHistorianContextLimit } = await importPluginModule(() => import("./derive-budgets-gw030jzt.js"));
|
|
26001
26025
|
const { resolveHistorianModel } = await importPluginModule(() => import("./model-resolution-280gmqvd.js"));
|
|
26002
26026
|
const { userObservationCollectionEnabled, userObservationsRequested } = await importPluginModule(() => import("./task-config-7md27rx8.js"));
|
|
26003
26027
|
const DEFAULT_HISTORIAN_TIMEOUT_MS = 10 * 60 * 1000;
|
|
@@ -26030,7 +26054,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
26030
26054
|
return { ok: false, error: "no session" };
|
|
26031
26055
|
const readDirectory = args.readSessionDirectory;
|
|
26032
26056
|
if (readDirectory) {
|
|
26033
|
-
const { handoffHistoryWork } = await import("./history-owner-
|
|
26057
|
+
const { handoffHistoryWork } = await import("./history-owner-260djmv5.js");
|
|
26034
26058
|
const handed = await handoffHistoryWork({
|
|
26035
26059
|
storageDir: args.storageDir ?? getMagicContextStorageDir(),
|
|
26036
26060
|
directory,
|
|
@@ -26049,8 +26073,8 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
26049
26073
|
const db = readDatabase();
|
|
26050
26074
|
if (!db)
|
|
26051
26075
|
return { ok: false, error: "db unavailable" };
|
|
26052
|
-
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-
|
|
26053
|
-
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-
|
|
26076
|
+
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-76rv3b89.js"));
|
|
26077
|
+
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-8g4r97bp.js"));
|
|
26054
26078
|
log2(`[rpc] recomp requested for session ${sessionId}`);
|
|
26055
26079
|
if (!args.client && !args.hiddenCompletionExecutor) {
|
|
26056
26080
|
return {
|
|
@@ -26108,7 +26132,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
26108
26132
|
rpcServer.handle("wrapup", async (params) => {
|
|
26109
26133
|
const readDirectory = args.readSessionDirectory;
|
|
26110
26134
|
if (readDirectory && params.sessionId) {
|
|
26111
|
-
const { handoffHistoryWork } = await import("./history-owner-
|
|
26135
|
+
const { handoffHistoryWork } = await import("./history-owner-260djmv5.js");
|
|
26112
26136
|
const sessionId = String(params.sessionId);
|
|
26113
26137
|
const handed = await handoffHistoryWork({
|
|
26114
26138
|
storageDir: args.storageDir ?? getMagicContextStorageDir(),
|
|
@@ -26134,7 +26158,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
26134
26158
|
const db = readDatabase();
|
|
26135
26159
|
if (!db)
|
|
26136
26160
|
return { ok: false, error: "db unavailable" };
|
|
26137
|
-
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-
|
|
26161
|
+
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-ejcx02g2.js"));
|
|
26138
26162
|
const model = liveSessionState.liveModelBySession.get(sessionId);
|
|
26139
26163
|
const contextLimit = model ? resolveContextLimit(model.providerID, model.modelID, { db, sessionID: sessionId }) : 128000;
|
|
26140
26164
|
const ctx = {
|
|
@@ -56350,17 +56374,26 @@ function persistV2UsageReading(args) {
|
|
|
56350
56374
|
updateSessionMeta(db, sessionID, { lastResponseTime: responseTime });
|
|
56351
56375
|
return;
|
|
56352
56376
|
}
|
|
56353
|
-
|
|
56377
|
+
let limit = reading.limit;
|
|
56378
|
+
const readingModel = reading.modelKey ?? draftModelKey;
|
|
56379
|
+
if (served && clearDisprovedDetectedLimit(db, sessionID, readingModel, reading.inputTokens)) {
|
|
56380
|
+
const slash = readingModel.indexOf("/");
|
|
56381
|
+
const relimit = slash > 0 ? args.limitFor?.(readingModel.slice(0, slash), readingModel.slice(slash + 1)) : undefined;
|
|
56382
|
+
if (typeof relimit === "number" && Number.isFinite(relimit) && relimit > 0) {
|
|
56383
|
+
limit = relimit;
|
|
56384
|
+
}
|
|
56385
|
+
}
|
|
56386
|
+
const percentage = reading.inputTokens / limit * 100;
|
|
56354
56387
|
const updates = {
|
|
56355
56388
|
lastContextPercentage: percentage,
|
|
56356
56389
|
lastInputTokens: reading.inputTokens,
|
|
56357
|
-
lastUsageContextLimit:
|
|
56390
|
+
lastUsageContextLimit: limit,
|
|
56358
56391
|
lastObservedModelKey: reading.modelKey ?? draftModelKey
|
|
56359
56392
|
};
|
|
56360
56393
|
if (responseTime)
|
|
56361
56394
|
updates.lastResponseTime = responseTime;
|
|
56362
56395
|
updateSessionMeta(db, sessionID, updates);
|
|
56363
|
-
sessionLog2(sessionID, `v2 usage: inputTokens=${reading.inputTokens} contextLimit=${
|
|
56396
|
+
sessionLog2(sessionID, `v2 usage: inputTokens=${reading.inputTokens} contextLimit=${limit} percentage=${percentage} responseModel=${reading.modelKey ?? "legacy"} draftContextLimit=${reading.admissionLimit} pressure=${readingMatchesDraft ? "current" : "stale-model-ignored"}`);
|
|
56364
56397
|
if (readingMatchesDraft) {
|
|
56365
56398
|
args.contextUsageMap.set(sessionID, {
|
|
56366
56399
|
usage: { inputTokens: reading.inputTokens, percentage },
|
|
@@ -56371,6 +56404,16 @@ function persistV2UsageReading(args) {
|
|
|
56371
56404
|
args.contextUsageMap.delete(sessionID);
|
|
56372
56405
|
}
|
|
56373
56406
|
}
|
|
56407
|
+
function clearDisprovedDetectedLimit(db, sessionID, readingModel, inputTokens) {
|
|
56408
|
+
const stored = getOverflowState(db, sessionID);
|
|
56409
|
+
if (stored.detectedContextLimit <= 0 || inputTokens <= stored.detectedContextLimit || stored.detectedContextLimitModelKey !== null && stored.detectedContextLimitModelKey !== piModelRefToCanonical(readingModel))
|
|
56410
|
+
return false;
|
|
56411
|
+
clearDetectedContextLimit(db, sessionID);
|
|
56412
|
+
dropSlot(sessionID, "session-cache-invalidated");
|
|
56413
|
+
clearInjectionCache(sessionID);
|
|
56414
|
+
sessionLog2(sessionID, `v2 usage: detected limit ${stored.detectedContextLimit} invalidated by a successful ${inputTokens}-token request on ${readingModel}; using catalog/default`);
|
|
56415
|
+
return true;
|
|
56416
|
+
}
|
|
56374
56417
|
|
|
56375
56418
|
// src/v2/hooks/context.ts
|
|
56376
56419
|
class V2LkgAdmissionReplay extends Error {
|
|
@@ -57237,7 +57280,8 @@ async function registerContext(context) {
|
|
|
57237
57280
|
sessionID: draft.sessionID,
|
|
57238
57281
|
draftModel: draft.model,
|
|
57239
57282
|
reading,
|
|
57240
|
-
contextUsageMap: usage
|
|
57283
|
+
contextUsageMap: usage,
|
|
57284
|
+
limitFor
|
|
57241
57285
|
});
|
|
57242
57286
|
}
|
|
57243
57287
|
} finally {
|
|
@@ -58388,7 +58432,8 @@ async function registerContext(context) {
|
|
|
58388
58432
|
const sessionId = String(params.sessionId ?? "");
|
|
58389
58433
|
if (!sessionId)
|
|
58390
58434
|
return { ok: false, error: "no session" };
|
|
58391
|
-
const
|
|
58435
|
+
const sampled = dreamerRunConfig(config, liveConfigReader.poll().effective);
|
|
58436
|
+
const manualDreamer = config.dreamer && sampled.dreamer?.disable !== true ? sampled.dreamer ?? config.dreamer : undefined;
|
|
58392
58437
|
if (!manualDreamer || !hiddenCompletionExecutor) {
|
|
58393
58438
|
pushNotification2("toast", { message: "Dreaming is not configured for this project.", variant: "warning" }, sessionId);
|
|
58394
58439
|
return { ok: false, error: "dreamer unavailable" };
|
|
@@ -58418,7 +58463,7 @@ async function registerContext(context) {
|
|
|
58418
58463
|
projectIdentity: resolveProjectIdentityForSession(directory, config.allow_home_project) ?? "",
|
|
58419
58464
|
directory,
|
|
58420
58465
|
language: config.language,
|
|
58421
|
-
mural:
|
|
58466
|
+
mural: sampled.mural,
|
|
58422
58467
|
executor: runExecutor,
|
|
58423
58468
|
sessionId,
|
|
58424
58469
|
...requested.task !== undefined ? { task: requested.task } : {}
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
resolveHistorianProducerLimits2,
|
|
6
6
|
resolveHistorianContextLimit2,
|
|
7
7
|
producerSourceLocalBudget2
|
|
8
|
-
} from "./server-
|
|
8
|
+
} from "./server-ypaat9rj.js";
|
|
9
9
|
import"./server-1zx87sdm.js";
|
|
10
|
-
import"./server-
|
|
11
|
-
import"./server-
|
|
10
|
+
import"./server-kc5kb9ya.js";
|
|
11
|
+
import"./server-j8376q08.js";
|
|
12
12
|
import"./server-pavzsdc6.js";
|
|
13
13
|
import"./server-z4p0ry94.js";
|
|
14
14
|
export {
|