@cortexkit/opencode-magic-context 0.49.48 → 0.49.50
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-g789dmt6.js → announcement-9pr71hd5.js} +3 -2
- package/dist/auto-search-worker.js +5 -5
- package/dist/chunk-embedding-write-worker.js +14 -15
- package/dist/{compaction-marker-candidates-dkfp1q9j.js → compaction-marker-candidates-8hazqfvj.js} +2 -3
- package/dist/compaction-marker-candidates-worker.js +1 -1
- package/dist/{compartment-chunk-embedding-snj51nmg.js → compartment-chunk-embedding-gfd093f8.js} +7 -8
- package/dist/config/project-security.d.ts.map +1 -1
- package/dist/config/schema/magic-context.d.ts +10 -0
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/{conflict-warning-hook-w1aw6w5t.js → conflict-warning-hook-56qpq7ws.js} +7 -8
- package/dist/{context-8r125qv3.js → context-4js5qnnm.js} +61 -49
- package/dist/{derive-budgets-nkw09vq7.js → derive-budgets-z53424qx.js} +2 -3
- package/dist/embedding-backfill-3wdjzrvs.js +27 -0
- package/dist/embedding-worker-process.js +2 -3
- package/dist/embedding-worker.js +6 -7
- package/dist/features/magic-context/dreamer/docs-proposals.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/provider-output-failure.d.ts +5 -7
- package/dist/features/magic-context/dreamer/provider-output-failure.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-scheduler.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/verify.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-identity.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-openai.d.ts +4 -0
- package/dist/features/magic-context/memory/embedding-openai.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-probe.d.ts +10 -0
- package/dist/features/magic-context/memory/embedding-probe.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/storage-db.d.ts +14 -0
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts +2 -0
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/{history-owner-0z620wgz.js → history-owner-n50e0e8y.js} +2 -3
- 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-trigger.d.ts.map +1 -1
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts +5 -3
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts.map +1 -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-rvmhyk89.js → index-07rp6xcn.js} +9 -9
- package/dist/{index-txs8tce6.js → index-0k283v27.js} +2 -4
- package/dist/{index-ak11t3gm.js → index-0tz2fzpq.js} +1 -1
- package/dist/{index-2qbtqg1w.js → index-25tm250q.js} +1 -1
- package/dist/{index-h9m41624.js → index-2ny9xwdn.js} +2 -2
- package/dist/{index-xa9mmq6c.js → index-36wseasx.js} +1 -1
- package/dist/{index-cgzpbz78.js → index-5dptmnvd.js} +5 -5
- package/dist/{index-q41sm60t.js → index-5g6npyw5.js} +89 -63
- package/dist/{index-qsyx931k.js → index-5t1mr0bt.js} +13 -15
- package/dist/{index-jrfre9ah.js → index-82dfe8en.js} +146 -5
- package/dist/{index-d4qw2h43.js → index-8d7gkgjs.js} +6 -5
- package/dist/{index-gn6gfz4y.js → index-90z05d0p.js} +1 -1
- package/dist/{index-trkxkgmd.js → index-97bjd14c.js} +5 -5
- package/dist/{index-9wnbnx8f.js → index-a6aqpfp6.js} +1 -1
- package/dist/{index-s79g172v.js → index-bamnjp2t.js} +29 -13
- package/dist/{index-4wpfbzks.js → index-bkg4hdyh.js} +3 -3
- package/dist/{index-gp3kcpc4.js → index-cd3vp8xa.js} +1 -1
- package/dist/{index-vk6srk5r.js → index-ct3ettqt.js} +3 -3
- package/dist/{index-sd2s4t4p.js → index-cwj6qhmf.js} +2 -2
- package/dist/{index-brj6was5.js → index-em92bp7f.js} +2 -2
- package/dist/{index-2p37txes.js → index-ga5q492k.js} +1 -1
- package/dist/{index-8cfnaagj.js → index-gapnh6tk.js} +2 -4
- package/dist/{index-fw42ms3m.js → index-gz001bx7.js} +1 -1
- package/dist/{index-zetm0ayn.js → index-h8g08nxs.js} +164 -106
- package/dist/{index-qcz1fy7h.js → index-hexdee98.js} +4 -4
- package/dist/{index-fgft4qjn.js → index-hkveze74.js} +4 -4
- package/dist/{index-smtbdmc3.js → index-hsv31e69.js} +2 -2
- package/dist/{index-dj2p8653.js → index-hsyczpn7.js} +2 -2
- package/dist/{index-4dpvnp8k.js → index-jjy5a5w0.js} +3 -0
- package/dist/{index-1hwn96x1.js → index-kn1bx21r.js} +3 -3
- package/dist/{index-t6s0tsp7.js → index-mjh63zvw.js} +3 -3
- package/dist/{index-ta87fpfs.js → index-n0twfvah.js} +64 -15
- package/dist/{index-nj360hcs.js → index-pb8ysnq2.js} +4 -4
- package/dist/{index-jz5bk7xd.js → index-qperbvjn.js} +2 -2
- package/dist/{index-25ka1jza.js → index-r9agn061.js} +4 -4
- package/dist/{index-hkh8x221.js → index-rbs27k1d.js} +7 -7
- package/dist/{index-hacf2tyx.js → index-reyws9fy.js} +1 -1
- package/dist/{index-cgsmttyj.js → index-s131svmx.js} +4 -4
- package/dist/{index-fxbk7gk3.js → index-tad3can2.js} +1 -1
- package/dist/{index-8ka0ne8t.js → index-v4a1pnny.js} +6 -6
- package/dist/{index-xh3jyejb.js → index-wr2t8zb0.js} +17 -19
- package/dist/{index-q6pjqm49.js → index-z4832qfe.js} +14 -14
- package/dist/index.js +54 -56
- package/dist/{logger-qwnbcfj9.js → logger-sw7z6sjz.js} +1 -2
- package/dist/{message-fts-rowid-map-msffhkve.js → message-fts-rowid-map-kx1bsdyg.js} +4 -5
- package/dist/{message-index-bounded-0q7sy04w.js → message-index-bounded-k0ebpy3y.js} +12 -13
- package/dist/{message-time-backfill-39bm498k.js → message-time-backfill-hp2jgn49.js} +2 -3
- package/dist/migration-worker.js +12 -13
- package/dist/plugin/embedding-bootstrap-helpers.d.ts.map +1 -1
- package/dist/plugin/embedding-routing.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/{project-embedding-registry-r6xfsrbe.js → project-embedding-registry-5dwh5zfn.js} +12 -13
- package/dist/raw-ordinal-warmup-worker.js +8 -8
- package/dist/{read-session-chunk-7fmg9p5m.js → read-session-chunk-6712p893.js} +10 -11
- package/dist/{read-session-raw-x7a9b3jm.js → read-session-raw-04ger9zt.js} +2 -3
- package/dist/{recomp-orchestrator-jqa5z4ar.js → recomp-orchestrator-8ebydg5j.js} +31 -32
- package/dist/render-dtc4qkq4.js +43 -0
- package/dist/{safe-notification-target-wztd7bgk.js → safe-notification-target-mx5khyxf.js} +2 -3
- package/dist/{search-archive-df09r8qn.js → search-archive-f6hjbnsa.js} +12 -13
- package/dist/{search-kt764afk.js → search-edv0gy1d.js} +24 -25
- package/dist/{send-session-notification-j93pn2hn.js → send-session-notification-gamjee2f.js} +5 -6
- package/dist/shared/data-path.d.ts +7 -13
- package/dist/shared/data-path.d.ts.map +1 -1
- package/dist/shared/hidden-model-cooldown.d.ts +23 -0
- package/dist/shared/hidden-model-cooldown.d.ts.map +1 -0
- package/dist/shared/model-suggestion-retry.d.ts +0 -2
- package/dist/shared/model-suggestion-retry.d.ts.map +1 -1
- package/dist/shared/provider-response-completion.d.ts +10 -0
- package/dist/shared/provider-response-completion.d.ts.map +1 -1
- package/dist/shared/rpc-types.d.ts +1 -0
- package/dist/shared/rpc-types.d.ts.map +1 -1
- package/dist/shared/status-summary.d.ts +1 -0
- package/dist/shared/status-summary.d.ts.map +1 -1
- package/dist/shared/status-view-check.d.ts.map +1 -1
- package/dist/shared/status-view.d.ts +1 -0
- package/dist/shared/status-view.d.ts.map +1 -1
- package/dist/shared/test-db.d.ts +13 -0
- package/dist/shared/test-db.d.ts.map +1 -0
- package/dist/{storage-tags-96vyd6ra.js → storage-tags-kdb4qsyq.js} +4 -5
- package/dist/test-preload.d.ts +2 -0
- package/dist/test-preload.d.ts.map +1 -0
- package/dist/{transform-postprocess-phase-a7ety10n.js → transform-postprocess-phase-1bg25094.js} +32 -33
- package/dist/v2/auto-search-worker.js +5 -5
- package/dist/v2/chunk-embedding-write-worker.js +14 -14
- package/dist/v2/{compaction-marker-candidates-y737qb1v.js → compaction-marker-candidates-re14353a.js} +2 -2
- package/dist/v2/compaction-marker-candidates-worker.js +1 -1
- package/dist/v2/{compartment-chunk-embedding-nj5nrnbj.js → compartment-chunk-embedding-0pxsrzrt.js} +7 -7
- package/dist/v2/{context-9x7mnb7x.js → context-qkr7z6d0.js} +99 -63
- package/dist/v2/{derive-budgets-b5cgrtp8.js → derive-budgets-w0815q82.js} +3 -3
- package/dist/v2/embedding-backfill-x1zpc04f.js +27 -0
- package/dist/v2/embedding-worker-process.js +1 -1
- package/dist/v2/embedding-worker.js +5 -5
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/{history-owner-fpka43cn.js → history-owner-ep91wgqj.js} +2 -2
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/usage-persist.d.ts +1 -1
- package/dist/v2/hooks/usage-persist.d.ts.map +1 -1
- package/dist/v2/hooks/usage-reading.d.ts +3 -0
- package/dist/v2/hooks/usage-reading.d.ts.map +1 -1
- package/dist/v2/{logger-4cj6d03m.js → logger-xnscpj6w.js} +1 -1
- package/dist/v2/{message-fts-rowid-map-qe7cpksd.js → message-fts-rowid-map-57jh6xpb.js} +4 -4
- package/dist/v2/{message-index-bounded-hctgp22r.js → message-index-bounded-a36rw93p.js} +12 -12
- package/dist/v2/{message-time-backfill-0c4h7sg6.js → message-time-backfill-baxebka0.js} +2 -2
- package/dist/v2/migration-worker.js +11 -11
- package/dist/v2/{project-embedding-registry-ek0cy0d5.js → project-embedding-registry-v2fxrs8b.js} +12 -12
- package/dist/v2/raw-ordinal-warmup-worker.js +8 -8
- package/dist/v2/{read-session-chunk-zknadvjr.js → read-session-chunk-hzhxvhyv.js} +10 -10
- package/dist/v2/{read-session-raw-yss2ev98.js → read-session-raw-3e482h3c.js} +2 -2
- package/dist/v2/{recomp-orchestrator-m5w0eqke.js → recomp-orchestrator-yzr49pd0.js} +32 -32
- package/dist/v2/{render-89asy54r.js → render-rhaevxv1.js} +21 -21
- package/dist/v2/{safe-notification-target-gphhast7.js → safe-notification-target-9r79xnbt.js} +2 -2
- package/dist/v2/{search-archive-axz2gbdb.js → search-archive-9924fyk8.js} +12 -12
- package/dist/v2/{search-kdtja5rx.js → search-ggvexvv7.js} +23 -23
- package/dist/v2/{send-session-notification-na3q825m.js → send-session-notification-95p89k7q.js} +5 -5
- package/dist/v2/{server-yyqmvbvv.js → server-016a1whm.js} +161 -102
- package/dist/v2/{server-z3tyd1mx.js → server-0k586y7d.js} +3 -3
- package/dist/v2/{server-p9s40wfa.js → server-0ms13pc8.js} +3 -0
- package/dist/v2/{server-e3m10ds0.js → server-16kfxcxj.js} +4 -4
- package/dist/v2/{server-nn4hbymt.js → server-3bfc26r7.js} +9 -9
- package/dist/v2/{server-7vb38e51.js → server-3jc6qmdz.js} +1 -1
- package/dist/v2/{server-jra7awr5.js → server-3qf9n5ck.js} +11 -11
- package/dist/v2/{server-69m30b21.js → server-3yk44ddz.js} +1 -1
- package/dist/v2/{server-2gjqhmn9.js → server-4h4acntc.js} +27 -11
- package/dist/v2/{server-3schkz95.js → server-58h6rrnx.js} +4 -4
- package/dist/v2/{server-af1rmkyn.js → server-5kgesxck.js} +2 -2
- package/dist/v2/{server-mfn1yf9d.js → server-7vrtk78d.js} +1 -1
- package/dist/v2/{server-27kccwe7.js → server-88yvx6r9.js} +63 -12
- package/dist/v2/{server-f0j864ma.js → server-91gb0vh8.js} +1 -1
- package/dist/v2/{server-131h608x.js → server-966dq3pd.js} +2 -2
- package/dist/v2/{server-jb6tjyeb.js → server-bb6kf05j.js} +23 -20
- package/dist/v2/{server-sg2qjkrb.js → server-brsx45r6.js} +6 -4
- package/dist/v2/{server-gwxys0d0.js → server-c8z2grq0.js} +1 -1
- package/dist/v2/{server-y8n33d9j.js → server-g61hgy1y.js} +4 -4
- package/dist/v2/{server-zahgxer8.js → server-jxrqsn84.js} +3 -3
- package/dist/v2/{server-2j87594q.js → server-kgq2e2hh.js} +2 -2
- package/dist/v2/{server-ddw42d76.js → server-mxsy9h1d.js} +2 -2
- package/dist/v2/{server-qmmkhz2z.js → server-np27dgyt.js} +1 -1
- package/dist/v2/{server-jqn7q7tm.js → server-q93jdtz8.js} +5 -5
- package/dist/v2/{server-dcws5831.js → server-qp5sj6n5.js} +2 -2
- package/dist/v2/{server-7be0ersd.js → server-rcchadw0.js} +3 -3
- package/dist/v2/{server-b3r080cm.js → server-rz5jnhnv.js} +1 -1
- package/dist/v2/{server-zt1m5rwj.js → server-sa1fdt41.js} +1 -1
- package/dist/v2/{server-wa4qhryh.js → server-sb55ddgn.js} +5 -4
- package/dist/v2/{server-4x7n5qz7.js → server-scp3y4dh.js} +13 -11
- package/dist/v2/{server-pej5rnye.js → server-sgn61hht.js} +2 -2
- package/dist/v2/{server-ypf1ap0v.js → server-t8n27rbt.js} +1 -1
- package/dist/v2/{server-sefxj8k1.js → server-tmf0ayqp.js} +1 -1
- package/dist/v2/{server-sr8tf5dt.js → server-vjadwb3j.js} +6 -5
- package/dist/v2/{server-bez34e60.js → server-vqq3g1t7.js} +4 -4
- package/dist/v2/{server-tpt7bwq8.js → server-ww7xbxxf.js} +1 -1
- package/dist/v2/server.js +6 -6
- package/dist/v2/{storage-tags-xq8hjqkf.js → storage-tags-rzv7y0n3.js} +4 -4
- package/dist/v2/{v2-archive-reader-ky1wqcws.js → v2-archive-reader-5ggewg8q.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-6wt67saz.js → wrapup-orchestrator-36c5wyvq.js} +32 -32
- package/dist/{v2-archive-reader-665x2x4d.js → v2-archive-reader-gx5ke1d7.js} +1 -1
- package/dist/wrapup-orchestrator-ya31knav.js +55 -0
- package/package.json +1 -1
- package/src/config/index.test.ts +20 -0
- package/src/config/project-security.test.ts +5 -1
- package/src/config/project-security.ts +4 -0
- package/src/config/schema/magic-context.test.ts +43 -0
- package/src/config/schema/magic-context.ts +19 -0
- package/src/shared/data-path.test.ts +104 -56
- package/src/shared/data-path.ts +30 -30
- package/src/shared/hidden-model-cooldown.test.ts +117 -0
- package/src/shared/hidden-model-cooldown.ts +123 -0
- package/src/shared/model-suggestion-retry.test.ts +53 -76
- package/src/shared/model-suggestion-retry.ts +38 -53
- package/src/shared/provider-response-completion.test.ts +49 -0
- package/src/shared/provider-response-completion.ts +64 -0
- package/src/shared/rpc-types.ts +1 -0
- package/src/shared/startup-maintenance-policy.test.ts +115 -0
- package/src/shared/status-detail-text.test.ts +7 -0
- package/src/shared/status-summary.ts +3 -0
- package/src/shared/status-view-check.ts +1 -0
- package/src/shared/status-view.test.ts +15 -0
- package/src/shared/status-view.ts +11 -1
- package/src/shared/test-db.test.ts +84 -0
- package/src/shared/test-db.ts +36 -0
- package/dist/embedding-backfill-kpy5shsa.js +0 -28
- package/dist/index-g2q4htwp.js +0 -146
- package/dist/render-mnqc74ar.js +0 -44
- package/dist/v2/embedding-backfill-360efh1t.js +0 -27
- package/dist/wrapup-orchestrator-7kmb3jf9.js +0 -56
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
} from "./index-gzy5w8ya.js";
|
|
6
6
|
import {
|
|
7
7
|
runSessionWarmupWorker
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-36wseasx.js";
|
|
9
9
|
import {
|
|
10
10
|
logSlowWriteTransaction
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-tad3can2.js";
|
|
12
12
|
|
|
13
13
|
// src/features/magic-context/message-fts-rowid-map.ts
|
|
14
14
|
import { createHash } from "node:crypto";
|
|
@@ -6,23 +6,23 @@ import {
|
|
|
6
6
|
} from "./index-gzy5w8ya.js";
|
|
7
7
|
import {
|
|
8
8
|
runSessionWarmupWorker
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-36wseasx.js";
|
|
10
10
|
import {
|
|
11
11
|
estimateTokens
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-0tz2fzpq.js";
|
|
13
13
|
import {
|
|
14
14
|
openCodeDbExists,
|
|
15
15
|
withReadOnlySessionDb
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-em92bp7f.js";
|
|
17
17
|
import {
|
|
18
18
|
hasRawMessageProvider2,
|
|
19
19
|
rawMessageWorkerSource2,
|
|
20
20
|
rawMessageOffThreadRangeReader2,
|
|
21
21
|
readRawSessionMessageIdOrdinalsForRange2
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-07rp6xcn.js";
|
|
23
23
|
import {
|
|
24
24
|
readV2ArchiveOffThread2
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-ct3ettqt.js";
|
|
26
26
|
|
|
27
27
|
// src/tools/ctx-expand/search-archive.ts
|
|
28
28
|
var archiveReadsOnThisThread = 0;
|
|
@@ -20,20 +20,19 @@ import {
|
|
|
20
20
|
} from "./index-pavzsdc6.js";
|
|
21
21
|
import {
|
|
22
22
|
getDataDir,
|
|
23
|
+
ensureCortexKitArtifactGitignore,
|
|
23
24
|
getMagicContextStorageResolution,
|
|
24
|
-
getMagicContextStorageDir
|
|
25
|
-
} from "./index-g2q4htwp.js";
|
|
26
|
-
import {
|
|
27
|
-
sanitizeDiagnosticText,
|
|
28
|
-
hasShareabilitySensitiveText
|
|
29
|
-
} from "./index-z4p0ry94.js";
|
|
30
|
-
import {
|
|
25
|
+
getMagicContextStorageDir,
|
|
31
26
|
classifyStalePluginBuild,
|
|
32
27
|
importPluginModule,
|
|
33
28
|
log2,
|
|
34
29
|
sessionLog2,
|
|
35
30
|
getLoggerDiagnostics2
|
|
36
|
-
} from "./index-
|
|
31
|
+
} from "./index-82dfe8en.js";
|
|
32
|
+
import {
|
|
33
|
+
sanitizeDiagnosticText,
|
|
34
|
+
hasShareabilitySensitiveText
|
|
35
|
+
} from "./index-z4p0ry94.js";
|
|
37
36
|
import {
|
|
38
37
|
resolveOpenCodeDbPath,
|
|
39
38
|
assertOpenCodeStoreGeneration,
|
|
@@ -72,7 +71,7 @@ import {
|
|
|
72
71
|
storedPathBelongsToIdentity,
|
|
73
72
|
beginBootQuietPeriod,
|
|
74
73
|
scheduleAfterBootQuiet
|
|
75
|
-
} from "./index-
|
|
74
|
+
} from "./index-0k283v27.js";
|
|
76
75
|
import {
|
|
77
76
|
recordSessionProjectIdentity,
|
|
78
77
|
hasRecordedSessionProjectIdentity,
|
|
@@ -82,7 +81,7 @@ import {
|
|
|
82
81
|
markGitSweepSuccessAndRelease,
|
|
83
82
|
parkGitSweepNonIndexable,
|
|
84
83
|
releaseGitSweepLease
|
|
85
|
-
} from "./index-
|
|
84
|
+
} from "./index-qperbvjn.js";
|
|
86
85
|
import {
|
|
87
86
|
getMagicContextBuiltinCommands,
|
|
88
87
|
formatConfigParseStatusLine,
|
|
@@ -107,13 +106,13 @@ import {
|
|
|
107
106
|
createChildSessionWithFence,
|
|
108
107
|
HiddenCompletionRefusal,
|
|
109
108
|
DreamerProviderOutputFailureError,
|
|
110
|
-
withDreamerModelCooldown,
|
|
111
109
|
providerOutputFailureFromInvalidManifest,
|
|
112
110
|
extractLatestAssistantText,
|
|
113
111
|
hasLengthCappedOutput,
|
|
114
112
|
parseProviderModel,
|
|
115
113
|
modelBodyField,
|
|
116
114
|
toModelEntry,
|
|
115
|
+
hiddenModelCooldowns,
|
|
117
116
|
isPromptTimeoutError,
|
|
118
117
|
getPromptFailureDetail,
|
|
119
118
|
raceWithSignal,
|
|
@@ -195,7 +194,7 @@ import {
|
|
|
195
194
|
snapRangeToCompartments,
|
|
196
195
|
getActiveCompartmentRun,
|
|
197
196
|
startCompartmentAgent
|
|
198
|
-
} from "./index-
|
|
197
|
+
} from "./index-h8g08nxs.js";
|
|
199
198
|
import {
|
|
200
199
|
hasTrustedAbsoluteWall,
|
|
201
200
|
applyProvenInputFloor,
|
|
@@ -207,7 +206,7 @@ import {
|
|
|
207
206
|
deriveTriggerBudget2,
|
|
208
207
|
resolveKnownHistorianContextLimit2,
|
|
209
208
|
resolveHistorianProducerLimits2
|
|
210
|
-
} from "./index-
|
|
209
|
+
} from "./index-gapnh6tk.js";
|
|
211
210
|
import {
|
|
212
211
|
resolveModelCalibration,
|
|
213
212
|
calibrateBuckets,
|
|
@@ -221,7 +220,7 @@ import {
|
|
|
221
220
|
estimateTokens,
|
|
222
221
|
estimateFixedPromptTokens,
|
|
223
222
|
normalizeText
|
|
224
|
-
} from "./index-
|
|
223
|
+
} from "./index-0tz2fzpq.js";
|
|
225
224
|
import {
|
|
226
225
|
protectedToolTokenCount,
|
|
227
226
|
peelLeadingMcTagNotation,
|
|
@@ -260,11 +259,11 @@ import {
|
|
|
260
259
|
getTagsByNumbers2,
|
|
261
260
|
getDroppedTagsByNumbers2,
|
|
262
261
|
getMaxDroppedTagNumber2
|
|
263
|
-
} from "./index-
|
|
262
|
+
} from "./index-bkg4hdyh.js";
|
|
264
263
|
import {
|
|
265
264
|
observeTemporalDecisions,
|
|
266
265
|
stableStringify
|
|
267
|
-
} from "./index-
|
|
266
|
+
} from "./index-a6aqpfp6.js";
|
|
268
267
|
import {
|
|
269
268
|
withContentLanguageDirective,
|
|
270
269
|
string,
|
|
@@ -284,14 +283,14 @@ import {
|
|
|
284
283
|
DEFAULT_HISTORIAN_TIMEOUT_MS,
|
|
285
284
|
DEFAULT_LOCAL_EMBEDDING_MODEL,
|
|
286
285
|
DREAM_TASK_PROMOTION_DEFAULTS
|
|
287
|
-
} from "./index-
|
|
286
|
+
} from "./index-jjy5a5w0.js";
|
|
288
287
|
import {
|
|
289
288
|
areRustHistorianSyntheticParts2,
|
|
290
289
|
isRawCompactionSummaryInfo2,
|
|
291
290
|
extractInMemoryMessageViews2,
|
|
292
291
|
buildInMemoryTailRawMessages2,
|
|
293
292
|
RawOrdinalsNotReady2
|
|
294
|
-
} from "./index-
|
|
293
|
+
} from "./index-36wseasx.js";
|
|
295
294
|
import {
|
|
296
295
|
openCodeDbExists,
|
|
297
296
|
withReadOnlySessionDb,
|
|
@@ -299,7 +298,7 @@ import {
|
|
|
299
298
|
latestPersistedMessageForRecovery,
|
|
300
299
|
latestRealUserTurnIdFromOpenCodeDb,
|
|
301
300
|
findLastAssistantModelFromOpenCodeDb
|
|
302
|
-
} from "./index-
|
|
301
|
+
} from "./index-em92bp7f.js";
|
|
303
302
|
import {
|
|
304
303
|
askAnswerLines,
|
|
305
304
|
estimateTrueRawMessageTokens,
|
|
@@ -427,11 +426,11 @@ import {
|
|
|
427
426
|
readRawSessionMessageById2,
|
|
428
427
|
readSessionChunk2,
|
|
429
428
|
readRawSessionSeedTail2
|
|
430
|
-
} from "./index-
|
|
429
|
+
} from "./index-07rp6xcn.js";
|
|
431
430
|
import {
|
|
432
431
|
BoundedSessionMap,
|
|
433
432
|
getMeasuredToolDefinitionTokens
|
|
434
|
-
} from "./index-
|
|
433
|
+
} from "./index-hsv31e69.js";
|
|
435
434
|
import {
|
|
436
435
|
isFailClosedBlockingError,
|
|
437
436
|
shouldBypassFailClosedBlock,
|
|
@@ -443,7 +442,7 @@ import {
|
|
|
443
442
|
rpcPortFilePath,
|
|
444
443
|
parseRpcPortFile,
|
|
445
444
|
inspectProcessesAsync
|
|
446
|
-
} from "./index-
|
|
445
|
+
} from "./index-ga5q492k.js";
|
|
447
446
|
import {
|
|
448
447
|
configureContextDatabasePragmas2
|
|
449
448
|
} from "./index-fb3zxn06.js";
|
|
@@ -457,7 +456,7 @@ import {
|
|
|
457
456
|
runSqliteOptimize,
|
|
458
457
|
openDatabase,
|
|
459
458
|
openCurrentDatabase
|
|
460
|
-
} from "./index-
|
|
459
|
+
} from "./index-z4832qfe.js";
|
|
461
460
|
import {
|
|
462
461
|
unescapeXml,
|
|
463
462
|
resolveWorkspaceShareCategories,
|
|
@@ -466,7 +465,7 @@ import {
|
|
|
466
465
|
resolveStoredPathWorkspaceIdentity,
|
|
467
466
|
storedPathBelongsToWorkspace,
|
|
468
467
|
computeWorkspaceEpochFingerprint
|
|
469
|
-
} from "./index-
|
|
468
|
+
} from "./index-pb8ysnq2.js";
|
|
470
469
|
import {
|
|
471
470
|
V2_MEMORY_CATEGORIES,
|
|
472
471
|
CATEGORY_PRIORITY
|
|
@@ -488,7 +487,7 @@ import {
|
|
|
488
487
|
toSynapseLaneDescriptor,
|
|
489
488
|
formatSynapseLaneDescriptor,
|
|
490
489
|
SynapseEmbeddingProvider
|
|
491
|
-
} from "./index-
|
|
490
|
+
} from "./index-hsyczpn7.js";
|
|
492
491
|
import {
|
|
493
492
|
getCompartments,
|
|
494
493
|
getLastCompartmentEndMessage,
|
|
@@ -566,10 +565,10 @@ import {
|
|
|
566
565
|
GLOBAL_USER_PROFILE_PROJECT_PATH,
|
|
567
566
|
getProjectState,
|
|
568
567
|
bumpProjectUserProfileVersion
|
|
569
|
-
} from "./index-
|
|
568
|
+
} from "./index-n0twfvah.js";
|
|
570
569
|
import {
|
|
571
570
|
getLastIndexedOrdinal
|
|
572
|
-
} from "./index-
|
|
571
|
+
} from "./index-hkveze74.js";
|
|
573
572
|
import {
|
|
574
573
|
SESSION_NOTE_CONDITION_ERROR,
|
|
575
574
|
getNoteByIdInScope,
|
|
@@ -595,7 +594,7 @@ import {
|
|
|
595
594
|
createPrimer,
|
|
596
595
|
updatePrimerSupport,
|
|
597
596
|
updatePrimerAnswer
|
|
598
|
-
} from "./index-
|
|
597
|
+
} from "./index-25tm250q.js";
|
|
599
598
|
import {
|
|
600
599
|
registerNotificationSink2,
|
|
601
600
|
pushNotification2,
|
|
@@ -607,7 +606,7 @@ import {
|
|
|
607
606
|
getCachedLocalEmbeddingPooling,
|
|
608
607
|
preflightLocalEmbeddingPooling,
|
|
609
608
|
getLocalEmbeddingNativeMemoryStats
|
|
610
|
-
} from "./index-
|
|
609
|
+
} from "./index-rbs27k1d.js";
|
|
611
610
|
import {
|
|
612
611
|
withQueryEmbeddingDeadline,
|
|
613
612
|
describeShadowBackfillWriteRefusal2,
|
|
@@ -628,7 +627,7 @@ import {
|
|
|
628
627
|
embedSessionCompartmentChunks2,
|
|
629
628
|
getEmbeddingCoverageStatus2,
|
|
630
629
|
getAutoEmbeddingSessionCoverage2
|
|
631
|
-
} from "./index-
|
|
630
|
+
} from "./index-bamnjp2t.js";
|
|
632
631
|
import {
|
|
633
632
|
saveEmbeddingIfHashMatches,
|
|
634
633
|
invalidateProject2,
|
|
@@ -636,7 +635,7 @@ import {
|
|
|
636
635
|
} from "./index-4dhv7mqz.js";
|
|
637
636
|
import {
|
|
638
637
|
cosineSimilarity
|
|
639
|
-
} from "./index-
|
|
638
|
+
} from "./index-8d7gkgjs.js";
|
|
640
639
|
import {
|
|
641
640
|
computeCueContentHash,
|
|
642
641
|
hasMuralCueColumns,
|
|
@@ -682,7 +681,7 @@ import {
|
|
|
682
681
|
readGitFileChangeTimesSince,
|
|
683
682
|
verificationFileExists,
|
|
684
683
|
normalizeVerificationFiles
|
|
685
|
-
} from "./index-
|
|
684
|
+
} from "./index-cwj6qhmf.js";
|
|
686
685
|
import {
|
|
687
686
|
renderSingleStoreMigrationRequiredRefusal,
|
|
688
687
|
SingleStoreMigrationRequiredError,
|
|
@@ -703,23 +702,23 @@ import {
|
|
|
703
702
|
resolveMemoriesByIdsForSearch2,
|
|
704
703
|
unifiedSearch2,
|
|
705
704
|
formatSearchResults2
|
|
706
|
-
} from "./index-
|
|
705
|
+
} from "./index-5t1mr0bt.js";
|
|
707
706
|
import {
|
|
708
707
|
scheduleReconciliation,
|
|
709
708
|
scheduleIncrementalIndex,
|
|
710
709
|
getMessageIndexQueueHeapStats,
|
|
711
710
|
clearSessionTracking
|
|
712
|
-
} from "./index-
|
|
711
|
+
} from "./index-s131svmx.js";
|
|
713
712
|
import {
|
|
714
713
|
flushIgnoredMessages2,
|
|
715
714
|
clearIgnoredMessages2,
|
|
716
715
|
observeIgnoredNotificationEvent2,
|
|
717
716
|
sendStatusNotification2
|
|
718
|
-
} from "./index-
|
|
717
|
+
} from "./index-r9agn061.js";
|
|
719
718
|
import {
|
|
720
719
|
setRecompStarting2,
|
|
721
720
|
setRecompTerminal2
|
|
722
|
-
} from "./index-
|
|
721
|
+
} from "./index-97bjd14c.js";
|
|
723
722
|
import {
|
|
724
723
|
makeToolCompositeKey,
|
|
725
724
|
searchMessageHistoryOffThread,
|
|
@@ -797,14 +796,14 @@ import {
|
|
|
797
796
|
abortSessionFailClosed2,
|
|
798
797
|
evaluateEmergencyFailClosed2,
|
|
799
798
|
runPostTransformPhase2
|
|
800
|
-
} from "./index-
|
|
799
|
+
} from "./index-wr2t8zb0.js";
|
|
801
800
|
import {
|
|
802
801
|
ANNOUNCEMENT_VERSION2,
|
|
803
802
|
ANNOUNCEMENT_FEATURES2,
|
|
804
803
|
ANNOUNCEMENT_FOOTER2,
|
|
805
804
|
markAnnouncementSeen2,
|
|
806
805
|
shouldShowAnnouncement2
|
|
807
|
-
} from "./index-
|
|
806
|
+
} from "./index-cd3vp8xa.js";
|
|
808
807
|
import {
|
|
809
808
|
resolvePromptContext2
|
|
810
809
|
} from "./index-fmsr7v69.js";
|
|
@@ -812,13 +811,13 @@ import {
|
|
|
812
811
|
renderMessageByOrdinal2,
|
|
813
812
|
renderVerboseRangeForTool2,
|
|
814
813
|
renderItemByTag2
|
|
815
|
-
} from "./index-
|
|
814
|
+
} from "./index-mjh63zvw.js";
|
|
816
815
|
import {
|
|
817
816
|
readV2ArchiveOffThread2
|
|
818
|
-
} from "./index-
|
|
817
|
+
} from "./index-ct3ettqt.js";
|
|
819
818
|
import {
|
|
820
819
|
renderSearchArchiveOffThread2
|
|
821
|
-
} from "./index-
|
|
820
|
+
} from "./index-5dptmnvd.js";
|
|
822
821
|
import {
|
|
823
822
|
COMPACTION_ENABLED_PATH,
|
|
824
823
|
isDreamerRunnable,
|
|
@@ -852,7 +851,7 @@ import {
|
|
|
852
851
|
} from "./index-8ajstryz.js";
|
|
853
852
|
import {
|
|
854
853
|
logSlowWriteTransaction
|
|
855
|
-
} from "./index-
|
|
854
|
+
} from "./index-tad3can2.js";
|
|
856
855
|
import {
|
|
857
856
|
shouldEnforcePrivateStoragePermissions,
|
|
858
857
|
ensureStorageDirectorySync,
|
|
@@ -4403,6 +4402,7 @@ function writeDocsProposal(projectDir, output, budget, expected, head) {
|
|
|
4403
4402
|
const result = validateDocsProposal(projectDir, output, budget, expected);
|
|
4404
4403
|
const dir = proposalDir(projectDir);
|
|
4405
4404
|
mkdirSync(join(dir, "superseded"), { recursive: true });
|
|
4405
|
+
ensureCortexKitArtifactGitignore(projectDir);
|
|
4406
4406
|
const stamp = `${new Date().toISOString().replace(/[:.]/g, "-")}-${Math.random().toString(36).slice(2, 8)}`;
|
|
4407
4407
|
const path = join(dir, `${stamp}.md`);
|
|
4408
4408
|
const body = `# Docs update proposal
|
|
@@ -9295,9 +9295,6 @@ function closeBroadCycle(args, cycleStartAt) {
|
|
|
9295
9295
|
});
|
|
9296
9296
|
}
|
|
9297
9297
|
async function runVerify(args) {
|
|
9298
|
-
return withDreamerModelCooldown(() => runVerifyWithCooldown(args));
|
|
9299
|
-
}
|
|
9300
|
-
async function runVerifyWithCooldown(args) {
|
|
9301
9298
|
const runStartedAt = Date.now();
|
|
9302
9299
|
const result = {
|
|
9303
9300
|
verified: 0,
|
|
@@ -11480,9 +11477,6 @@ function recordTransientFailure(db, projectIdentity, due, finishedAt, error, sch
|
|
|
11480
11477
|
var LEASE_WAIT_POLL_MS = 2000;
|
|
11481
11478
|
var MANUAL_RUN_LEASE_WAIT_MS = 60000;
|
|
11482
11479
|
async function runDomainGroup(deps, group, cb) {
|
|
11483
|
-
return withDreamerModelCooldown(() => runDomainGroupWithCooldown(deps, group, cb));
|
|
11484
|
-
}
|
|
11485
|
-
async function runDomainGroupWithCooldown(deps, group, cb) {
|
|
11486
11480
|
const { db, projectIdentity, executor } = deps;
|
|
11487
11481
|
const leaseKey = leaseKeyFor(group[0].config.task, projectIdentity);
|
|
11488
11482
|
const holderId = crypto.randomUUID();
|
|
@@ -12191,6 +12185,7 @@ var EMBEDDING_AFFECTING_KEYS = new Set([
|
|
|
12191
12185
|
"embedding.provider",
|
|
12192
12186
|
"embedding.input_type",
|
|
12193
12187
|
"embedding.truncate",
|
|
12188
|
+
"embedding.dimensions",
|
|
12194
12189
|
"embedding.max_input_tokens",
|
|
12195
12190
|
"embedding.query_input_type",
|
|
12196
12191
|
"embedding.query_instruction",
|
|
@@ -12309,6 +12304,7 @@ function fallbackConfig(config, provider) {
|
|
|
12309
12304
|
const queryInstruction = typeof raw.query_instruction === "string" || raw.query_instruction === false ? raw.query_instruction : undefined;
|
|
12310
12305
|
const documentPrefix = typeof raw.document_prefix === "string" ? raw.document_prefix : undefined;
|
|
12311
12306
|
const truncate = typeof raw.truncate === "string" ? raw.truncate.trim() : "";
|
|
12307
|
+
const dimensions = typeof raw.dimensions === "number" ? raw.dimensions : undefined;
|
|
12312
12308
|
const maxInputTokens = typeof raw.max_input_tokens === "number" ? raw.max_input_tokens : undefined;
|
|
12313
12309
|
if (provider === "off")
|
|
12314
12310
|
return { provider: "off" };
|
|
@@ -12323,6 +12319,7 @@ function fallbackConfig(config, provider) {
|
|
|
12323
12319
|
...queryInstruction !== undefined ? { query_instruction: queryInstruction } : {},
|
|
12324
12320
|
...documentPrefix !== undefined ? { document_prefix: documentPrefix } : {},
|
|
12325
12321
|
...truncate ? { truncate } : {},
|
|
12322
|
+
...dimensions !== undefined ? { dimensions } : {},
|
|
12326
12323
|
...maxInputTokens !== undefined ? { max_input_tokens: maxInputTokens } : {}
|
|
12327
12324
|
};
|
|
12328
12325
|
}
|
|
@@ -13714,6 +13711,7 @@ function statusSummaryFromDetail(detail) {
|
|
|
13714
13711
|
warnings: statusWarningsFromDetail(detail),
|
|
13715
13712
|
hiddenVariantWarnings: detail.hiddenVariantWarnings ?? [],
|
|
13716
13713
|
dreamerSkipped: detail.dreamerSkipped,
|
|
13714
|
+
hiddenModelSkips: detail.hiddenModelSkips,
|
|
13717
13715
|
dreamerQuotas: [
|
|
13718
13716
|
...new Set((detail.dreamerFailures ?? []).flatMap((failure) => {
|
|
13719
13717
|
const quota = primaryQuotaDiagnostic(failure.error);
|
|
@@ -13794,6 +13792,8 @@ function renderUserStatusSummary(summary, style) {
|
|
|
13794
13792
|
values.push(["Dreamer skipped", skipped]);
|
|
13795
13793
|
for (const quota of summary.dreamerQuotas ?? [])
|
|
13796
13794
|
values.push(["Dreamer quota", quota]);
|
|
13795
|
+
for (const quota of summary.hiddenModelSkips ?? [])
|
|
13796
|
+
values.push(["Hidden model quota", quota]);
|
|
13797
13797
|
if (summary.historianRefusal) {
|
|
13798
13798
|
values.push([
|
|
13799
13799
|
"Historian refusal",
|
|
@@ -14178,9 +14178,13 @@ function checkCompartmentTrigger(db, sessionId, sessionMeta, usage, _previousPer
|
|
|
14178
14178
|
}
|
|
14179
14179
|
return { shouldFire: false };
|
|
14180
14180
|
}
|
|
14181
|
+
const recovery = getOverflowState(db, sessionId).needsEmergencyRecovery;
|
|
14182
|
+
if (tailInfo.boundarySnapshot && recovery) {
|
|
14183
|
+
tailInfo.boundarySnapshot = { ...tailInfo.boundarySnapshot, recovery: true };
|
|
14184
|
+
}
|
|
14181
14185
|
if (tailInfo.boundarySnapshot && shouldWaitForNewHistorianHistory(tailInfo.boundarySnapshot, {
|
|
14182
14186
|
usagePercentage: usage.percentage,
|
|
14183
|
-
emergency:
|
|
14187
|
+
emergency: recovery
|
|
14184
14188
|
})) {
|
|
14185
14189
|
sessionLog2(sessionId, "compartment trigger: waiting for new history after no forward progress");
|
|
14186
14190
|
return { shouldFire: false };
|
|
@@ -14222,13 +14226,14 @@ function checkCompartmentTrigger(db, sessionId, sessionMeta, usage, _previousPer
|
|
|
14222
14226
|
executeThresholdPercentage,
|
|
14223
14227
|
usage,
|
|
14224
14228
|
usageSource: "live",
|
|
14225
|
-
emergencyTailScale: scale
|
|
14229
|
+
emergencyTailScale: scale,
|
|
14230
|
+
recovery
|
|
14226
14231
|
});
|
|
14227
14232
|
});
|
|
14228
14233
|
if (hasRunnableCompartmentWindow(scaledBoundary)) {
|
|
14229
14234
|
return { shouldFire: true, reason: "force_band", boundarySnapshot: scaledBoundary };
|
|
14230
14235
|
}
|
|
14231
|
-
sessionLog2(sessionId, "compartment trigger: force_band skipped —
|
|
14236
|
+
sessionLog2(sessionId, "compartment trigger: force_band skipped — no protected head meets summary admission after emergency tail scale");
|
|
14232
14237
|
return { shouldFire: false };
|
|
14233
14238
|
}
|
|
14234
14239
|
const clusterEnabled = commitClusterTrigger?.enabled ?? true;
|
|
@@ -15783,6 +15788,7 @@ function buildSidebarSnapshot(db, sessionId, directory, liveSessionState, inject
|
|
|
15783
15788
|
dreamerBacklog,
|
|
15784
15789
|
dreamerProgress,
|
|
15785
15790
|
...dreamerFailures === undefined ? {} : { dreamerFailures },
|
|
15791
|
+
hiddenModelSkips: hiddenModelCooldowns.live().map((entry) => `${entry.model} until ${new Date(entry.until).toISOString()}: ${entry.reason}`),
|
|
15786
15792
|
...dreamerSkipped === undefined ? {} : { dreamerSkipped },
|
|
15787
15793
|
compartmentTokens: calibrated.compartmentTokens,
|
|
15788
15794
|
factTokens: calibrated.factTokens,
|
|
@@ -16378,7 +16384,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16378
16384
|
return { count: buildCompartmentCount(db, sessionId, moduleStatus) };
|
|
16379
16385
|
});
|
|
16380
16386
|
const buildManagedCtx = async (db) => {
|
|
16381
|
-
const { deriveHistorianChunkTokens, resolveHistorianContextLimit } = await importPluginModule(() => import("./derive-budgets-
|
|
16387
|
+
const { deriveHistorianChunkTokens, resolveHistorianContextLimit } = await importPluginModule(() => import("./derive-budgets-z53424qx.js"));
|
|
16382
16388
|
const { resolveHistorianModel } = await importPluginModule(() => import("./model-resolution-280gmqvd.js"));
|
|
16383
16389
|
const { userObservationCollectionEnabled, userObservationsRequested } = await importPluginModule(() => import("./task-config-t6bpyka7.js"));
|
|
16384
16390
|
const DEFAULT_HISTORIAN_TIMEOUT_MS = 10 * 60 * 1000;
|
|
@@ -16411,7 +16417,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16411
16417
|
return { ok: false, error: "no session" };
|
|
16412
16418
|
const readDirectory = args.readSessionDirectory;
|
|
16413
16419
|
if (readDirectory) {
|
|
16414
|
-
const { handoffHistoryWork } = await import("./history-owner-
|
|
16420
|
+
const { handoffHistoryWork } = await import("./history-owner-n50e0e8y.js");
|
|
16415
16421
|
const handed = await handoffHistoryWork({
|
|
16416
16422
|
storageDir: args.storageDir ?? getMagicContextStorageDir(),
|
|
16417
16423
|
directory,
|
|
@@ -16430,8 +16436,8 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16430
16436
|
const db = readDatabase();
|
|
16431
16437
|
if (!db)
|
|
16432
16438
|
return { ok: false, error: "db unavailable" };
|
|
16433
|
-
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-
|
|
16434
|
-
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-
|
|
16439
|
+
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-8ebydg5j.js"));
|
|
16440
|
+
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-gamjee2f.js"));
|
|
16435
16441
|
log2(`[rpc] recomp requested for session ${sessionId}`);
|
|
16436
16442
|
if (!args.client && !args.hiddenCompletionExecutor) {
|
|
16437
16443
|
return {
|
|
@@ -16489,7 +16495,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16489
16495
|
rpcServer.handle("wrapup", async (params) => {
|
|
16490
16496
|
const readDirectory = args.readSessionDirectory;
|
|
16491
16497
|
if (readDirectory && params.sessionId) {
|
|
16492
|
-
const { handoffHistoryWork } = await import("./history-owner-
|
|
16498
|
+
const { handoffHistoryWork } = await import("./history-owner-n50e0e8y.js");
|
|
16493
16499
|
const sessionId = String(params.sessionId);
|
|
16494
16500
|
const handed = await handoffHistoryWork({
|
|
16495
16501
|
storageDir: args.storageDir ?? getMagicContextStorageDir(),
|
|
@@ -16515,7 +16521,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16515
16521
|
const db = readDatabase();
|
|
16516
16522
|
if (!db)
|
|
16517
16523
|
return { ok: false, error: "db unavailable" };
|
|
16518
|
-
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-
|
|
16524
|
+
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-ya31knav.js"));
|
|
16519
16525
|
const model = liveSessionState.liveModelBySession.get(sessionId);
|
|
16520
16526
|
const contextLimit = model ? resolveContextLimit(model.providerID, model.modelID, { db, sessionID: sessionId }) : 128000;
|
|
16521
16527
|
const ctx = {
|
|
@@ -16730,6 +16736,7 @@ var pendingDecisionBySession = new Map;
|
|
|
16730
16736
|
var pendingPiDecisionBySession = new Map;
|
|
16731
16737
|
var lastBoundMessageIdBySession = new Map;
|
|
16732
16738
|
var scheduledWriteTokensBySession = new Map;
|
|
16739
|
+
var scheduledWriteWaitersBySession = new Map;
|
|
16733
16740
|
var systemHashChangedSessions = new Set;
|
|
16734
16741
|
var piSystemHashChangedSessions = new Set;
|
|
16735
16742
|
var unbustedPassBySession = new Map;
|
|
@@ -16796,6 +16803,9 @@ function clearTransformDecisionSession(sessionId) {
|
|
|
16796
16803
|
pendingPiDecisionBySession.delete(sessionId);
|
|
16797
16804
|
lastBoundMessageIdBySession.delete(sessionId);
|
|
16798
16805
|
scheduledWriteTokensBySession.delete(sessionId);
|
|
16806
|
+
for (const resolve of scheduledWriteWaitersBySession.get(sessionId) ?? [])
|
|
16807
|
+
resolve();
|
|
16808
|
+
scheduledWriteWaitersBySession.delete(sessionId);
|
|
16799
16809
|
systemHashChangedSessions.delete(sessionId);
|
|
16800
16810
|
piSystemHashChangedSessions.delete(sessionId);
|
|
16801
16811
|
unbustedPassBySession.delete(sessionId);
|
|
@@ -16950,8 +16960,12 @@ function deleteScheduledWriteToken(sessionId, token) {
|
|
|
16950
16960
|
if (!tokens)
|
|
16951
16961
|
return;
|
|
16952
16962
|
tokens.delete(token);
|
|
16953
|
-
if (tokens.size === 0)
|
|
16963
|
+
if (tokens.size === 0) {
|
|
16954
16964
|
scheduledWriteTokensBySession.delete(sessionId);
|
|
16965
|
+
for (const resolve of scheduledWriteWaitersBySession.get(sessionId) ?? [])
|
|
16966
|
+
resolve();
|
|
16967
|
+
scheduledWriteWaitersBySession.delete(sessionId);
|
|
16968
|
+
}
|
|
16955
16969
|
}
|
|
16956
16970
|
function writeTransformDecisionBestEffort(dbPath, row) {
|
|
16957
16971
|
try {
|
|
@@ -24403,7 +24417,8 @@ async function runCompartmentPhaseImpl(args) {
|
|
|
24403
24417
|
executeThresholdPercentage: args.boundaryExecuteThresholdPercentage,
|
|
24404
24418
|
usage: args.boundaryUsage,
|
|
24405
24419
|
usageSource: args.boundaryUsageSource,
|
|
24406
|
-
emergencyTailScale
|
|
24420
|
+
emergencyTailScale,
|
|
24421
|
+
recovery: args.projectRecoveryRequest !== undefined
|
|
24407
24422
|
});
|
|
24408
24423
|
}
|
|
24409
24424
|
function getBoundarySnapshotForCompartment() {
|
|
@@ -24502,9 +24517,12 @@ async function runCompartmentPhaseImpl(args) {
|
|
|
24502
24517
|
if (!hasNewRawHistoryForCompartment())
|
|
24503
24518
|
return null;
|
|
24504
24519
|
const resolve = args.resolveRecoveryBoundary ?? resolveBoundarySnapshot;
|
|
24505
|
-
let snapshot = resolve();
|
|
24520
|
+
let snapshot = { ...resolve(), recovery: true };
|
|
24506
24521
|
if (!hasRunnableCompartmentWindow(snapshot)) {
|
|
24507
|
-
snapshot =
|
|
24522
|
+
snapshot = {
|
|
24523
|
+
...resolve(args.contextUsage.percentage >= BLOCK_UNTIL_DONE_PERCENTAGE ? 0.25 : 0.5),
|
|
24524
|
+
recovery: true
|
|
24525
|
+
};
|
|
24508
24526
|
}
|
|
24509
24527
|
cachedBoundarySnapshot = snapshot;
|
|
24510
24528
|
return hasRunnableCompartmentWindow(snapshot) ? snapshot : null;
|
|
@@ -25402,6 +25420,7 @@ function createTransform(deps) {
|
|
|
25402
25420
|
usage: boundaryUsageForProtectedTail,
|
|
25403
25421
|
usageSource: boundaryUsageSource,
|
|
25404
25422
|
emergencyTailScale,
|
|
25423
|
+
recovery: emergencyRecoveryArmed,
|
|
25405
25424
|
protectedTailMeta: earlyStateSnapshot.protectedTail
|
|
25406
25425
|
});
|
|
25407
25426
|
if (emergencyTailScale)
|
|
@@ -25430,9 +25449,16 @@ function createTransform(deps) {
|
|
|
25430
25449
|
return false;
|
|
25431
25450
|
const prepareRecoveryBoundary = () => {
|
|
25432
25451
|
const scale = emergencyUsagePercentageEarly >= 95 ? 0.25 : 0.5;
|
|
25433
|
-
|
|
25452
|
+
const recoveryBoundary = (scale) => {
|
|
25453
|
+
const snapshot = getRunnableBoundaryForCompartment(scale);
|
|
25454
|
+
return snapshot ? {
|
|
25455
|
+
...snapshot,
|
|
25456
|
+
recovery: emergencyRecoveryArmed || emergencyUsagePercentageEarly >= 95
|
|
25457
|
+
} : null;
|
|
25458
|
+
};
|
|
25459
|
+
let boundarySnapshot = recoveryBoundary();
|
|
25434
25460
|
if (!boundarySnapshot || !hasRunnableCompartmentWindow(boundarySnapshot)) {
|
|
25435
|
-
boundarySnapshot =
|
|
25461
|
+
boundarySnapshot = recoveryBoundary(scale);
|
|
25436
25462
|
}
|
|
25437
25463
|
if (false) {}
|
|
25438
25464
|
if (!boundarySnapshot || !hasRunnableCompartmentWindow(boundarySnapshot))
|