@cortexkit/opencode-magic-context 0.49.47 → 0.49.49
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/{conflict-warning-hook-w1aw6w5t.js → conflict-warning-hook-56qpq7ws.js} +7 -8
- package/dist/{context-hvkjxqhs.js → context-bwf57gnh.js} +41 -43
- package/dist/{derive-budgets-nkw09vq7.js → derive-budgets-z53424qx.js} +2 -3
- package/dist/{embedding-backfill-kpy5shsa.js → embedding-backfill-d9x9q2e2.js} +12 -13
- package/dist/embedding-worker-process.js +2 -3
- package/dist/embedding-worker.js +5 -6
- package/dist/features/magic-context/dreamer/docs-proposals.d.ts.map +1 -1
- package/dist/{history-owner-0z620wgz.js → history-owner-n50e0e8y.js} +2 -3
- 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/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.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/todo-view.d.ts +29 -17
- package/dist/hooks/magic-context/todo-view.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-txs8tce6.js → index-0k283v27.js} +2 -4
- package/dist/{index-s79g172v.js → index-0mdh2cke.js} +10 -10
- 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-sd2s4t4p.js → index-3n9ee4jh.js} +2 -2
- package/dist/{index-xgczbhyx.js → index-5850zme4.js} +3 -3
- package/dist/{index-5jk4h64j.js → index-5bksfv58.js} +13 -15
- package/dist/{index-esr8qcc4.js → index-7n2n3v92.js} +5 -5
- package/dist/{index-jrfre9ah.js → index-82dfe8en.js} +146 -5
- package/dist/{index-gn6gfz4y.js → index-90z05d0p.js} +1 -1
- package/dist/{index-9wnbnx8f.js → index-a6aqpfp6.js} +1 -1
- package/dist/{index-b0xt5qz9.js → index-agfh931z.js} +11 -13
- package/dist/{index-d4qw2h43.js → index-arxg51bj.js} +4 -4
- package/dist/{index-x53gnmce.js → index-bkg4hdyh.js} +6 -28
- package/dist/{index-gp3kcpc4.js → index-cd3vp8xa.js} +1 -1
- package/dist/{index-44pp3vrj.js → index-cs7pmwt6.js} +4 -4
- 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-kw7azjmy.js → index-h3p558ec.js} +3 -3
- package/dist/{index-qcz1fy7h.js → index-hexdee98.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-c99tqfge.js → index-j7verehm.js} +93 -73
- package/dist/{index-etn2hmb5.js → index-jedbxq6n.js} +4 -4
- package/dist/{index-2x3kd999.js → index-k47v0tmk.js} +16 -18
- package/dist/{index-1hwn96x1.js → index-kn1bx21r.js} +3 -3
- package/dist/{index-nj360hcs.js → index-pb8ysnq2.js} +4 -4
- package/dist/{index-xgnh498s.js → index-qb75tv9j.js} +8 -8
- package/dist/{index-jz5bk7xd.js → index-qperbvjn.js} +2 -2
- package/dist/{index-25ka1jza.js → index-r9agn061.js} +4 -4
- package/dist/{index-hacf2tyx.js → index-reyws9fy.js} +1 -1
- package/dist/{index-fxbk7gk3.js → index-tad3can2.js} +1 -1
- package/dist/{index-hkh8x221.js → index-tj5gz396.js} +3 -5
- package/dist/{index-bqhjzhv4.js → index-va9x7y48.js} +35 -31
- package/dist/{index-37a9bfta.js → index-vbmh68fb.js} +6 -6
- package/dist/{index-1qmv26ga.js → index-vyv4tame.js} +12 -14
- package/dist/{index-eej9kwad.js → index-wdmfnmv1.js} +5 -5
- package/dist/index.js +53 -55
- 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-3qpg8dq5.js → message-index-bounded-2shxmht9.js} +11 -12
- package/dist/{message-time-backfill-39bm498k.js → message-time-backfill-hp2jgn49.js} +2 -3
- package/dist/migration-worker.js +12 -13
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/{project-embedding-registry-r6xfsrbe.js → project-embedding-registry-nzgkq61z.js} +11 -12
- package/dist/raw-ordinal-warmup-worker.js +8 -8
- package/dist/{read-session-chunk-7h9f32sz.js → read-session-chunk-c15y8yg6.js} +9 -10
- package/dist/{read-session-raw-x7a9b3jm.js → read-session-raw-04ger9zt.js} +2 -3
- package/dist/{recomp-orchestrator-43g9tjya.js → recomp-orchestrator-gfxqqpph.js} +30 -31
- package/dist/{render-4m7x9cq4.js → render-5tx8r0me.js} +20 -21
- package/dist/{safe-notification-target-wztd7bgk.js → safe-notification-target-mx5khyxf.js} +2 -3
- package/dist/{search-archive-f6kwv02s.js → search-archive-6tgh88xp.js} +11 -12
- package/dist/{search-0a3hh5x6.js → search-k2n5bvsk.js} +23 -24
- 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/{storage-tags-q8erkn48.js → storage-tags-kdb4qsyq.js} +4 -5
- package/dist/{transform-postprocess-phase-5746a5b6.js → transform-postprocess-phase-36dw4kxb.js} +31 -32
- 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-e9n2mxax.js → context-td3jyze3.js} +90 -68
- package/dist/v2/{derive-budgets-b5cgrtp8.js → derive-budgets-w0815q82.js} +3 -3
- package/dist/v2/{embedding-backfill-360efh1t.js → embedding-backfill-5dqdm3ff.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-fpka43cn.js → history-owner-ep91wgqj.js} +2 -2
- 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-na8debr6.js → message-index-bounded-j1jskn8a.js} +11 -11
- 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-swm4mw1t.js} +11 -11
- package/dist/v2/raw-ordinal-warmup-worker.js +8 -8
- package/dist/v2/{read-session-chunk-x33xeg2g.js → read-session-chunk-carzw3m8.js} +9 -9
- package/dist/v2/{read-session-raw-yss2ev98.js → read-session-raw-3e482h3c.js} +2 -2
- package/dist/v2/{recomp-orchestrator-jyjpn5jm.js → recomp-orchestrator-e7vrs932.js} +31 -31
- package/dist/v2/{render-mp82ns36.js → render-e9mh9y1d.js} +20 -20
- package/dist/v2/{safe-notification-target-gphhast7.js → safe-notification-target-9r79xnbt.js} +2 -2
- package/dist/v2/{search-archive-d0fcqch9.js → search-archive-j3kb9ggd.js} +11 -11
- package/dist/v2/{search-ebd0yr40.js → search-sr23g316.js} +22 -22
- package/dist/v2/{send-session-notification-na3q825m.js → send-session-notification-95p89k7q.js} +5 -5
- package/dist/v2/{server-pej5rnye.js → server-0qxb8r8q.js} +2 -2
- package/dist/v2/{server-sg2qjkrb.js → server-1ppcpsdw.js} +2 -2
- package/dist/v2/{server-c43zxc9k.js → server-2qxt6qv0.js} +8 -8
- package/dist/v2/{server-7vb38e51.js → server-3jc6qmdz.js} +1 -1
- package/dist/v2/{server-69m30b21.js → server-3yk44ddz.js} +1 -1
- package/dist/v2/{server-wwmaqtxy.js → server-4y2pcckw.js} +3 -3
- 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-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-zypeavf0.js → server-c5kq8d5n.js} +4 -4
- package/dist/v2/{server-gwxys0d0.js → server-c8z2grq0.js} +1 -1
- package/dist/v2/{server-gy26cwvw.js → server-e14c3hd6.js} +10 -10
- package/dist/v2/{server-epvj1cey.js → server-e20kfytm.js} +11 -11
- package/dist/v2/{server-2gjqhmn9.js → server-fw49gc57.js} +8 -8
- package/dist/v2/{server-y8n33d9j.js → server-g61hgy1y.js} +4 -4
- 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-dcws5831.js → server-qp5sj6n5.js} +2 -2
- package/dist/v2/{server-sr8tf5dt.js → server-r7y35vm9.js} +4 -4
- package/dist/v2/{server-t4hk02v1.js → server-rcchadw0.js} +6 -28
- 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-fhxe5jgm.js → server-t5cgb15n.js} +5 -5
- 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-wa4qhryh.js → server-ttrrh27h.js} +2 -2
- 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-1f03b92k.js → server-y7q8cds3.js} +3 -3
- package/dist/v2/{server-xsrykjkj.js → server-yxe0gh3v.js} +11 -11
- package/dist/v2/{server-rg92e592.js → server-z7n3n1ra.js} +34 -28
- package/dist/v2/server.js +5 -5
- package/dist/v2/{storage-tags-ztar1k0g.js → storage-tags-rzv7y0n3.js} +4 -4
- package/dist/v2/{v2-archive-reader-gm6mygag.js → v2-archive-reader-jnzjavzr.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-y9a02xpd.js → wrapup-orchestrator-jw4nre49.js} +31 -31
- package/dist/{v2-archive-reader-yp9956t8.js → v2-archive-reader-b76tfeje.js} +1 -1
- package/dist/wrapup-orchestrator-fhfazjkq.js +55 -0
- package/package.json +1 -1
- package/src/shared/data-path.test.ts +104 -56
- package/src/shared/data-path.ts +30 -30
- package/dist/index-g2q4htwp.js +0 -146
- package/dist/wrapup-orchestrator-ese0epyk.js +0 -56
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./index-pavzsdc6.js";
|
|
4
4
|
import {
|
|
5
5
|
sessionLog2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-82dfe8en.js";
|
|
7
7
|
import {
|
|
8
8
|
UNKNOWN_FIT_RATIO,
|
|
9
9
|
resolveDecisionCalibration,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
TAG_SELECT_COLUMNS2,
|
|
25
25
|
getCandidateToolOwners2,
|
|
26
26
|
pickNearestPriorOwner2
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-bkg4hdyh.js";
|
|
28
28
|
import {
|
|
29
29
|
OMO_INTERNAL_INITIATOR_MARKER,
|
|
30
30
|
isSystemDirective,
|
|
@@ -42,13 +42,13 @@ import {
|
|
|
42
42
|
formatBlock,
|
|
43
43
|
compactTextForSummary,
|
|
44
44
|
mergeCommitHashes
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-0tz2fzpq.js";
|
|
46
46
|
import {
|
|
47
47
|
prepareCachedStatement2
|
|
48
48
|
} from "./index-gzy5w8ya.js";
|
|
49
49
|
import {
|
|
50
50
|
stableStringify
|
|
51
|
-
} from "./index-
|
|
51
|
+
} from "./index-a6aqpfp6.js";
|
|
52
52
|
import {
|
|
53
53
|
renderToolTemplate,
|
|
54
54
|
resolveModelConfigValue,
|
|
@@ -70,18 +70,18 @@ import {
|
|
|
70
70
|
readRawSeedTailFromDb2,
|
|
71
71
|
readRawSessionBoundaryEndpointsFromDb2,
|
|
72
72
|
prewarmRawSessionOrdinalsForDb
|
|
73
|
-
} from "./index-
|
|
73
|
+
} from "./index-36wseasx.js";
|
|
74
74
|
import {
|
|
75
75
|
openCodeDbExists,
|
|
76
76
|
withReadOnlySessionDb,
|
|
77
77
|
getRawSessionMessageCountFromDb,
|
|
78
78
|
getMessageTimesFromOpenCodeDb
|
|
79
|
-
} from "./index-
|
|
79
|
+
} from "./index-em92bp7f.js";
|
|
80
80
|
import {
|
|
81
81
|
getToolDefinitionMeasurementSignature,
|
|
82
82
|
getMeasuredToolDefinitionTokens,
|
|
83
83
|
getSessionToolDefinitionTokens
|
|
84
|
-
} from "./index-
|
|
84
|
+
} from "./index-hsv31e69.js";
|
|
85
85
|
import {
|
|
86
86
|
markHostUnservedRow,
|
|
87
87
|
isHostUnservedRow
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
} from "./index-avwt563y.js";
|
|
93
93
|
import {
|
|
94
94
|
logSlowWriteTransaction
|
|
95
|
-
} from "./index-
|
|
95
|
+
} from "./index-tad3can2.js";
|
|
96
96
|
|
|
97
97
|
// src/shared/hidden-zen-read.ts
|
|
98
98
|
function isToolFreeHiddenAgent(agent) {
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./index-pavzsdc6.js";
|
|
4
4
|
import {
|
|
5
5
|
isUserHomeDirectory
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-0k283v27.js";
|
|
7
7
|
import {
|
|
8
8
|
logSlowWriteTransaction
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-tad3can2.js";
|
|
10
10
|
|
|
11
11
|
// src/features/magic-context/session-project-storage.ts
|
|
12
12
|
var SESSION_CHUNK_REPAIR_BATCH_SIZE = 100;
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
importPluginModule,
|
|
6
6
|
sessionLog2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-82dfe8en.js";
|
|
8
8
|
import {
|
|
9
9
|
isDefaultSessionTitle2
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-gz001bx7.js";
|
|
11
11
|
import {
|
|
12
12
|
shouldHoldIgnoredNotification
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-em92bp7f.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-mx5khyxf.js"));
|
|
146
146
|
if (await waitForSafeNotificationTarget(client, sessionId) === "skip") {
|
|
147
147
|
sessionLog2(sessionId, "notification skipped (session not titled yet)");
|
|
148
148
|
return "skipped";
|
|
@@ -3,17 +3,15 @@ import {
|
|
|
3
3
|
} from "./index-4dpvnp8k.js";
|
|
4
4
|
import {
|
|
5
5
|
getSynapseLaneIdentity
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-hsyczpn7.js";
|
|
7
7
|
import {
|
|
8
8
|
getHarness2
|
|
9
9
|
} from "./index-pavzsdc6.js";
|
|
10
10
|
import {
|
|
11
|
-
getMagicContextStorageDir
|
|
12
|
-
} from "./index-g2q4htwp.js";
|
|
13
|
-
import {
|
|
11
|
+
getMagicContextStorageDir,
|
|
14
12
|
importPluginModule,
|
|
15
13
|
log2
|
|
16
|
-
} from "./index-
|
|
14
|
+
} from "./index-82dfe8en.js";
|
|
17
15
|
import {
|
|
18
16
|
inRootAsyncContext2
|
|
19
17
|
} from "./index-gzy5w8ya.js";
|
|
@@ -72,22 +72,20 @@ import {
|
|
|
72
72
|
getRawSessionTagKeysThrough2,
|
|
73
73
|
getLegacyProtectedTailStartOrdinal2,
|
|
74
74
|
readSessionChunk2
|
|
75
|
-
} from "./index-
|
|
75
|
+
} from "./index-qb75tv9j.js";
|
|
76
76
|
import {
|
|
77
77
|
getHarness2,
|
|
78
78
|
harnessOwnsOpenCodeStore2
|
|
79
79
|
} from "./index-pavzsdc6.js";
|
|
80
80
|
import {
|
|
81
81
|
ensureCortexKitArtifactGitignore,
|
|
82
|
-
getProjectMagicContextHistorianDir
|
|
83
|
-
|
|
82
|
+
getProjectMagicContextHistorianDir,
|
|
83
|
+
log2,
|
|
84
|
+
sessionLog2
|
|
85
|
+
} from "./index-82dfe8en.js";
|
|
84
86
|
import {
|
|
85
87
|
sanitizeDiagnosticText
|
|
86
88
|
} from "./index-z4p0ry94.js";
|
|
87
|
-
import {
|
|
88
|
-
log2,
|
|
89
|
-
sessionLog2
|
|
90
|
-
} from "./index-jrfre9ah.js";
|
|
91
89
|
import {
|
|
92
90
|
createScanner,
|
|
93
91
|
parseTree,
|
|
@@ -110,7 +108,7 @@ import {
|
|
|
110
108
|
deriveTriggerBudget2,
|
|
111
109
|
resolveHistorianProducerLimits2,
|
|
112
110
|
producerSourceLocalBudget2
|
|
113
|
-
} from "./index-
|
|
111
|
+
} from "./index-gapnh6tk.js";
|
|
114
112
|
import {
|
|
115
113
|
withContentLanguageDirective,
|
|
116
114
|
buildPrimaryLanguageDirective,
|
|
@@ -133,7 +131,7 @@ import {
|
|
|
133
131
|
hasMeaningfulUserText2,
|
|
134
132
|
estimateTokens,
|
|
135
133
|
estimateFixedPromptTokens
|
|
136
|
-
} from "./index-
|
|
134
|
+
} from "./index-0tz2fzpq.js";
|
|
137
135
|
import {
|
|
138
136
|
FAIL_CLOSED_DOCTOR_COMMAND
|
|
139
137
|
} from "./index-wh9fxds5.js";
|
|
@@ -147,13 +145,13 @@ import {
|
|
|
147
145
|
import {
|
|
148
146
|
shouldSkipHomeProjectMemory,
|
|
149
147
|
resolveProjectIdentity
|
|
150
|
-
} from "./index-
|
|
148
|
+
} from "./index-0k283v27.js";
|
|
151
149
|
import {
|
|
152
150
|
getSchemaFenceRejection,
|
|
153
151
|
LATEST_SUPPORTED_VERSION,
|
|
154
152
|
getPersistedSchemaVersion,
|
|
155
153
|
openDatabase
|
|
156
|
-
} from "./index-
|
|
154
|
+
} from "./index-agfh931z.js";
|
|
157
155
|
import {
|
|
158
156
|
areRustHistorianSyntheticParts2,
|
|
159
157
|
isStrictGapHealingMessage2,
|
|
@@ -161,7 +159,7 @@ import {
|
|
|
161
159
|
RawOrdinalsNotReady2,
|
|
162
160
|
dropRawSessionOrdinalCheckpoints2,
|
|
163
161
|
runSessionWarmupWorker
|
|
164
|
-
} from "./index-
|
|
162
|
+
} from "./index-36wseasx.js";
|
|
165
163
|
import {
|
|
166
164
|
parseCompartmentOutput,
|
|
167
165
|
resolveWorkspaceShareCategories,
|
|
@@ -170,7 +168,7 @@ import {
|
|
|
170
168
|
resolveStoredPathWorkspaceIdentity,
|
|
171
169
|
sourceNameForMemory,
|
|
172
170
|
computeWorkspaceEpochFingerprint
|
|
173
|
-
} from "./index-
|
|
171
|
+
} from "./index-pb8ysnq2.js";
|
|
174
172
|
import {
|
|
175
173
|
V2_MEMORY_CATEGORIES,
|
|
176
174
|
CATEGORY_PRIORITY,
|
|
@@ -184,7 +182,7 @@ import {
|
|
|
184
182
|
} from "./index-58e3y90n.js";
|
|
185
183
|
import {
|
|
186
184
|
BoundedSessionMap
|
|
187
|
-
} from "./index-
|
|
185
|
+
} from "./index-hsv31e69.js";
|
|
188
186
|
import {
|
|
189
187
|
invalidateAutoEmbedSession
|
|
190
188
|
} from "./index-2amn2s73.js";
|
|
@@ -197,7 +195,7 @@ import {
|
|
|
197
195
|
replaceCompartmentChunkEmbeddings2,
|
|
198
196
|
deleteChunkEmbedBackoffForSession2,
|
|
199
197
|
chunkWindowSourceKey2
|
|
200
|
-
} from "./index-
|
|
198
|
+
} from "./index-hexdee98.js";
|
|
201
199
|
import {
|
|
202
200
|
COMPARTMENT_LEASE_RENEWAL_MS,
|
|
203
201
|
getCompartmentLeaseBlocker,
|
|
@@ -239,14 +237,14 @@ import {
|
|
|
239
237
|
getProjectState,
|
|
240
238
|
recordSubagentInvocation,
|
|
241
239
|
getLatestHistorianInvocationId
|
|
242
|
-
} from "./index-
|
|
240
|
+
} from "./index-vyv4tame.js";
|
|
243
241
|
import {
|
|
244
242
|
clearCompressionDepth,
|
|
245
243
|
clearCompressionDepthRange,
|
|
246
244
|
toMessageIndexSource,
|
|
247
245
|
clearIndexedMessagesInTransaction,
|
|
248
246
|
indexSourcesAfterOrdinal
|
|
249
|
-
} from "./index-
|
|
247
|
+
} from "./index-jedbxq6n.js";
|
|
250
248
|
import {
|
|
251
249
|
stripWellFormedLeadingTagPrefix,
|
|
252
250
|
peelLeadingMcTagNotation,
|
|
@@ -257,17 +255,17 @@ import {
|
|
|
257
255
|
foldShrunkPartTags2,
|
|
258
256
|
getTagNumberByMessageId2,
|
|
259
257
|
getActiveTagsBySession2
|
|
260
|
-
} from "./index-
|
|
258
|
+
} from "./index-bkg4hdyh.js";
|
|
261
259
|
import {
|
|
262
260
|
openCodeDbExists,
|
|
263
261
|
withReadOnlySessionDb,
|
|
264
262
|
getMessageTimesFromOpenCodeDb
|
|
265
|
-
} from "./index-
|
|
263
|
+
} from "./index-em92bp7f.js";
|
|
266
264
|
import {
|
|
267
265
|
getSessionNotes,
|
|
268
266
|
getReadySmartNotes,
|
|
269
267
|
insertPrimerCandidates
|
|
270
|
-
} from "./index-
|
|
268
|
+
} from "./index-25tm250q.js";
|
|
271
269
|
import {
|
|
272
270
|
pushNotification2
|
|
273
271
|
} from "./index-x8a7jmkh.js";
|
|
@@ -285,13 +283,13 @@ import {
|
|
|
285
283
|
getProjectChunkEmbeddingModelId2,
|
|
286
284
|
getProjectEmbeddingMaxInputTokens2,
|
|
287
285
|
embedItemsForProject2
|
|
288
|
-
} from "./index-
|
|
286
|
+
} from "./index-0mdh2cke.js";
|
|
289
287
|
import {
|
|
290
288
|
renderUserFacingFailure,
|
|
291
289
|
userFacingFailureCode,
|
|
292
290
|
promoteSessionFactsDurable,
|
|
293
291
|
embedPromotedFacts
|
|
294
|
-
} from "./index-
|
|
292
|
+
} from "./index-3n9ee4jh.js";
|
|
295
293
|
import {
|
|
296
294
|
isMarkerCandidateBasisCurrent2,
|
|
297
295
|
invalidateMarkerCandidateBasis2,
|
|
@@ -302,10 +300,10 @@ import {
|
|
|
302
300
|
certifiedMarkerReferenceFloor2,
|
|
303
301
|
readMarkerReferenceRows2,
|
|
304
302
|
readKnownMarkerReferenceRows2
|
|
305
|
-
} from "./index-
|
|
303
|
+
} from "./index-90z05d0p.js";
|
|
306
304
|
import {
|
|
307
305
|
sendStatusNotification2
|
|
308
|
-
} from "./index-
|
|
306
|
+
} from "./index-r9agn061.js";
|
|
309
307
|
import {
|
|
310
308
|
isCompactionEnabled,
|
|
311
309
|
migrateLegacyAgentEnabledInMemory
|
|
@@ -329,7 +327,7 @@ import {
|
|
|
329
327
|
import {
|
|
330
328
|
logSlowWriteTransaction,
|
|
331
329
|
WriteTransactionSteps
|
|
332
|
-
} from "./index-
|
|
330
|
+
} from "./index-tad3can2.js";
|
|
333
331
|
import {
|
|
334
332
|
ensureStorageDirectorySync,
|
|
335
333
|
writeStorageFileAtomicSync
|
|
@@ -16302,10 +16300,6 @@ var FORCE80_MAX_CAP = 500000;
|
|
|
16302
16300
|
var FORCE95_MAX_CAP = 750000;
|
|
16303
16301
|
var NORMAL_HYSTERESIS_TOKENS = 256;
|
|
16304
16302
|
var RECOVERY_NO_HEAD_LIMIT = 2;
|
|
16305
|
-
var MIN_FORCE_ELIGIBLE_TOKENS_CAP = 1000;
|
|
16306
|
-
function deriveMinForceEligibleTokens(scaledN) {
|
|
16307
|
-
return Math.min(MIN_FORCE_ELIGIBLE_TOKENS_CAP, Math.max(1, Math.floor(scaledN / 8)));
|
|
16308
|
-
}
|
|
16309
16303
|
function clampPercentage(value) {
|
|
16310
16304
|
if (!Number.isFinite(value))
|
|
16311
16305
|
return 0;
|
|
@@ -16550,6 +16544,7 @@ function resolveProtectedTailBoundary(ctx) {
|
|
|
16550
16544
|
priorBoundaryOrdinal: ctx.priorBoundaryOrdinal,
|
|
16551
16545
|
migrationFloorActive: ctx.migrationFloorActive,
|
|
16552
16546
|
emergencyTailScale: ctx.emergencyTailScale,
|
|
16547
|
+
recovery: ctx.recovery,
|
|
16553
16548
|
providerShapeVersion: ctx.providerShapeVersion,
|
|
16554
16549
|
cacheNamespace: ctx.cacheNamespace,
|
|
16555
16550
|
createdAt,
|
|
@@ -16594,6 +16589,7 @@ function resolveProtectedTailBoundary(ctx) {
|
|
|
16594
16589
|
priorBoundaryOrdinal: ctx.priorBoundaryOrdinal,
|
|
16595
16590
|
migrationFloorActive: false,
|
|
16596
16591
|
emergencyTailScale: ctx.emergencyTailScale,
|
|
16592
|
+
recovery: ctx.recovery,
|
|
16597
16593
|
providerShapeVersion: ctx.providerShapeVersion,
|
|
16598
16594
|
cacheNamespace: ctx.cacheNamespace,
|
|
16599
16595
|
createdAt,
|
|
@@ -16709,6 +16705,7 @@ function resolveProtectedTailBoundary(ctx) {
|
|
|
16709
16705
|
priorBoundaryOrdinal: ctx.priorBoundaryOrdinal,
|
|
16710
16706
|
migrationFloorActive: ctx.migrationFloorActive,
|
|
16711
16707
|
emergencyTailScale: ctx.emergencyTailScale,
|
|
16708
|
+
recovery: ctx.recovery,
|
|
16712
16709
|
liftLivePromptFloor: ctx.liftLivePromptFloor === true ? true : undefined,
|
|
16713
16710
|
providerShapeVersion: ctx.providerShapeVersion,
|
|
16714
16711
|
cacheNamespace: ctx.cacheNamespace,
|
|
@@ -16787,6 +16784,7 @@ function resolveBoundaryContext(args) {
|
|
|
16787
16784
|
protectedTailPolicyVersion: meta.protectedTailPolicyVersion,
|
|
16788
16785
|
migrationFloorActive,
|
|
16789
16786
|
emergencyTailScale: args.emergencyTailScale,
|
|
16787
|
+
recovery: args.recovery,
|
|
16790
16788
|
liftLivePromptFloor: args.liftLivePromptFloor,
|
|
16791
16789
|
providerShapeVersion: args.providerShapeVersion ?? "opencode-v1",
|
|
16792
16790
|
cacheNamespace: args.cacheNamespace ?? `opencode:${args.sessionId}`,
|
|
@@ -16967,9 +16965,11 @@ function hasRunnableCompartmentWindow(snapshot) {
|
|
|
16967
16965
|
return false;
|
|
16968
16966
|
if (snapshot.eligibleEndOrdinal <= snapshot.offset)
|
|
16969
16967
|
return false;
|
|
16968
|
+
if (snapshot.recovery || snapshot.usagePercentage >= 95 || snapshot.mode === "manual-wrapup" || snapshot.mode === "manual-full-recomp")
|
|
16969
|
+
return true;
|
|
16970
16970
|
const forceMaterializationPercentage = escalationBands(snapshot.executeThresholdPercentage).forceMaterializationPercentage;
|
|
16971
16971
|
if (snapshot.usagePercentage >= forceMaterializationPercentage || snapshot.emergencyTailScale) {
|
|
16972
|
-
return snapshot.
|
|
16972
|
+
return snapshot.summaryRemovedEligibleTokens >= snapshot.contextLimit * 0.02;
|
|
16973
16973
|
}
|
|
16974
16974
|
return snapshot.eligibleEndOrdinal > snapshot.offset;
|
|
16975
16975
|
}
|
|
@@ -17431,7 +17431,7 @@ async function runCompartmentAgent(deps) {
|
|
|
17431
17431
|
return;
|
|
17432
17432
|
}
|
|
17433
17433
|
if (!validation.ok && validation.reason === "stale_snapshot") {
|
|
17434
|
-
const
|
|
17434
|
+
const refreshedBoundary = deps.refreshBoundarySnapshot ? deps.refreshBoundarySnapshot(boundarySnapshot, validation) : resolveOpenCodeProtectedTailBoundary({
|
|
17435
17435
|
db,
|
|
17436
17436
|
sessionId,
|
|
17437
17437
|
mode: "incremental-runner",
|
|
@@ -17445,6 +17445,10 @@ async function runCompartmentAgent(deps) {
|
|
|
17445
17445
|
emergencyTailScale: boundarySnapshot.emergencyTailScale,
|
|
17446
17446
|
liftLivePromptFloor: boundarySnapshot.liftLivePromptFloor === true
|
|
17447
17447
|
});
|
|
17448
|
+
const refreshed = refreshedBoundary ? {
|
|
17449
|
+
...refreshedBoundary,
|
|
17450
|
+
recovery: boundarySnapshot.recovery || deps.forceDrainQuota
|
|
17451
|
+
} : null;
|
|
17448
17452
|
if (refreshed && hasRunnableCompartmentWindow(refreshed)) {
|
|
17449
17453
|
sessionLog2(sessionId, `historian: refreshed stale protected-tail snapshot at run time (was: ${validation.detail ?? "stale"}) — eligible head ${refreshed.offset}-${refreshed.eligibleEndOrdinal - 1}`);
|
|
17450
17454
|
boundarySnapshot = refreshed;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionLog2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-82dfe8en.js";
|
|
4
4
|
import {
|
|
5
5
|
COMPARTMENT_LEASE_RENEWAL_MS,
|
|
6
6
|
acquireCompartmentLease,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
releaseCompartmentLeaseBestEffort,
|
|
9
9
|
getCompartments,
|
|
10
10
|
getLastCompartmentEndMessage
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-vyv4tame.js";
|
|
12
12
|
import {
|
|
13
13
|
inRootAsyncContext2
|
|
14
14
|
} from "./index-gzy5w8ya.js";
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
getHistorianFailureState,
|
|
21
21
|
clearEmergencyRecovery,
|
|
22
22
|
prepareRawSessionOrdinals2
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-qb75tv9j.js";
|
|
24
24
|
import {
|
|
25
25
|
pushNotification2
|
|
26
26
|
} from "./index-x8a7jmkh.js";
|
|
@@ -32,14 +32,14 @@ import {
|
|
|
32
32
|
getActiveCompartmentRun,
|
|
33
33
|
markActiveCompartmentRunPublished,
|
|
34
34
|
registerActiveCompartmentRun
|
|
35
|
-
} from "./index-
|
|
35
|
+
} from "./index-va9x7y48.js";
|
|
36
36
|
import {
|
|
37
37
|
sendStatusNotification2
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-r9agn061.js";
|
|
39
39
|
import {
|
|
40
40
|
setRecompStarting2,
|
|
41
41
|
setRecompTerminal2
|
|
42
|
-
} from "./index-
|
|
42
|
+
} from "./index-wdmfnmv1.js";
|
|
43
43
|
|
|
44
44
|
// src/hooks/magic-context/wrapup-orchestrator.ts
|
|
45
45
|
import * as crypto from "node:crypto";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
tagIdentityRevisionKey,
|
|
6
6
|
deleteTagIdentityRevisions,
|
|
7
7
|
getTableColumnNames
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-a6aqpfp6.js";
|
|
9
9
|
import {
|
|
10
10
|
invalidateAutoEmbedSession,
|
|
11
11
|
drainBackgroundBatches
|
|
@@ -15,12 +15,10 @@ import {
|
|
|
15
15
|
} from "./index-pavzsdc6.js";
|
|
16
16
|
import {
|
|
17
17
|
getDataDir,
|
|
18
|
-
getMagicContextStorageDir
|
|
19
|
-
} from "./index-g2q4htwp.js";
|
|
20
|
-
import {
|
|
18
|
+
getMagicContextStorageDir,
|
|
21
19
|
log2,
|
|
22
20
|
sessionLog2
|
|
23
|
-
} from "./index-
|
|
21
|
+
} from "./index-82dfe8en.js";
|
|
24
22
|
import {
|
|
25
23
|
prepareCachedStatement2,
|
|
26
24
|
withSqliteBackgroundWriter2,
|
|
@@ -28,14 +26,14 @@ import {
|
|
|
28
26
|
} from "./index-gzy5w8ya.js";
|
|
29
27
|
import {
|
|
30
28
|
deleteUnmappedMessageFtsRows2
|
|
31
|
-
} from "./index-
|
|
29
|
+
} from "./index-2ny9xwdn.js";
|
|
32
30
|
import {
|
|
33
31
|
deleteChunkEmbedBackoffForSession2
|
|
34
|
-
} from "./index-
|
|
32
|
+
} from "./index-hexdee98.js";
|
|
35
33
|
import {
|
|
36
34
|
isPidAlive,
|
|
37
35
|
readProcessStartTime
|
|
38
|
-
} from "./index-
|
|
36
|
+
} from "./index-ga5q492k.js";
|
|
39
37
|
import {
|
|
40
38
|
MERGED_REASONING_PARTS_PREFIX,
|
|
41
39
|
decodeMergedReasoningParts,
|
|
@@ -63,23 +61,23 @@ import {
|
|
|
63
61
|
serializeProcessedImageMarkers,
|
|
64
62
|
getPendingPiCompactionMarkerState,
|
|
65
63
|
logPiCompactionMarkerClear
|
|
66
|
-
} from "./index-
|
|
64
|
+
} from "./index-qb75tv9j.js";
|
|
67
65
|
import {
|
|
68
66
|
stripTagPrefix,
|
|
69
67
|
isRecord,
|
|
70
68
|
providerVisibleMessage
|
|
71
|
-
} from "./index-
|
|
69
|
+
} from "./index-bkg4hdyh.js";
|
|
72
70
|
import {
|
|
73
71
|
withReadOnlySessionDb
|
|
74
|
-
} from "./index-
|
|
72
|
+
} from "./index-em92bp7f.js";
|
|
75
73
|
import {
|
|
76
74
|
BoundedSessionMap,
|
|
77
75
|
getMeasuredToolDefinitionTokens
|
|
78
|
-
} from "./index-
|
|
76
|
+
} from "./index-hsv31e69.js";
|
|
79
77
|
import {
|
|
80
78
|
layoutLkgPrefix,
|
|
81
79
|
assembleLkgPrefix
|
|
82
|
-
} from "./index-
|
|
80
|
+
} from "./index-pb8ysnq2.js";
|
|
83
81
|
import {
|
|
84
82
|
gaDatabasePath2,
|
|
85
83
|
V2StoreReader2
|
|
@@ -96,7 +94,7 @@ import {
|
|
|
96
94
|
} from "./index-avwt563y.js";
|
|
97
95
|
import {
|
|
98
96
|
logSlowWriteTransaction
|
|
99
|
-
} from "./index-
|
|
97
|
+
} from "./index-tad3can2.js";
|
|
100
98
|
import {
|
|
101
99
|
ensurePrivateStorageDirectorySync,
|
|
102
100
|
writeStorageFileSync,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionLog2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-82dfe8en.js";
|
|
4
4
|
import {
|
|
5
5
|
clearEmergencyRecovery
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-qb75tv9j.js";
|
|
7
7
|
import {
|
|
8
8
|
requestPendingMaterialization,
|
|
9
9
|
dropSlot
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-vyv4tame.js";
|
|
11
11
|
import {
|
|
12
12
|
executeContextRecomp
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-va9x7y48.js";
|
|
14
14
|
import {
|
|
15
15
|
renderUserFacingFailure,
|
|
16
16
|
userFacingFailureCode
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-3n9ee4jh.js";
|
|
18
18
|
|
|
19
19
|
// src/hooks/magic-context/recomp-orchestrator.ts
|
|
20
20
|
function resolveLiveModelKey(liveSessionState, sessionId) {
|