@cortexkit/opencode-magic-context 0.49.83 → 0.49.85
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-p41dde4h.js → announcement-fnyxaahs.js} +3 -1
- package/dist/auto-search-worker.js +3 -3
- package/dist/chunk-embedding-write-worker.js +5 -4
- package/dist/{context-xmyke353.js → context-bjfwzbts.js} +314 -107
- package/dist/{derive-budgets-2z6xxm7e.js → derive-budgets-90869322.js} +3 -1
- package/dist/{embedding-backfill-k994xdas.js → embedding-backfill-v6sw58m8.js} +7 -5
- package/dist/embedding-worker.js +15 -27
- package/dist/features/magic-context/memory/embedding-worker-boundary.test-support.d.ts +24 -0
- package/dist/features/magic-context/memory/embedding-worker-boundary.test-support.d.ts.map +1 -0
- package/dist/features/magic-context/memory/embedding-worker-client.d.ts +35 -1
- package/dist/features/magic-context/memory/embedding-worker-client.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-worker-loop.d.ts +57 -0
- package/dist/features/magic-context/memory/embedding-worker-loop.d.ts.map +1 -0
- package/dist/features/magic-context/mural/render-trigger.d.ts +3 -3
- package/dist/features/magic-context/mural/render-trigger.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts +6 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts.map +1 -1
- package/dist/{index-zzvd4a9z.js → index-05bm2ndp.js} +1 -1
- package/dist/{index-93rezfvc.js → index-08jfpny9.js} +37 -6
- package/dist/{index-dg5jvh9r.js → index-0rge5rkh.js} +8 -8
- package/dist/{index-2xhzmwf6.js → index-1pf5qrx4.js} +5 -5
- package/dist/{index-e21n48yd.js → index-1y4y98r1.js} +23 -0
- package/dist/{index-98qy103c.js → index-2kf73btc.js} +1 -1
- package/dist/{index-vpw46557.js → index-3dtzyred.js} +1 -1
- package/dist/{index-bd34njzg.js → index-4ntnt8ee.js} +1 -1
- package/dist/{index-w2wpx7t5.js → index-4w5rx7de.js} +1 -1
- package/dist/{index-twmeey4h.js → index-70cv85b0.js} +2 -2
- package/dist/{index-rnyaa7cj.js → index-798s7c8s.js} +2 -2
- package/dist/{index-2q0t43fy.js → index-7j2zv9nm.js} +1 -1
- package/dist/{index-fpqdbb67.js → index-7svecf3m.js} +3 -3
- package/dist/{index-eptthgkw.js → index-9fsxmjs6.js} +5 -5
- package/dist/{v2/server-fvnzcnww.js → index-c5tmzym6.js} +192 -11
- package/dist/{index-w8dcjt7f.js → index-k0tb2z28.js} +1 -1
- package/dist/{index-zb4h9nrk.js → index-k50xhjw1.js} +202 -14
- package/dist/{index-hz1xdb15.js → index-kqnef2tg.js} +4 -4
- package/dist/{index-2ygw6q5s.js → index-nny4gm06.js} +2 -2
- package/dist/{index-fgy6hnr3.js → index-pw279hmt.js} +2 -2
- package/dist/{index-eyk7msgw.js → index-qvn3q9f1.js} +41 -41
- package/dist/{index-shpyv8gq.js → index-s8ks5nz4.js} +16 -9
- package/dist/{index-wxxcfpxh.js → index-sbr58jaf.js} +8 -8
- package/dist/{index-b2787fk6.js → index-tzbcb8yt.js} +36 -20
- package/dist/{index-x8qgqnym.js → index-w6v4dw5f.js} +25 -25
- package/dist/{index-zvane1rq.js → index-xccywqdj.js} +16 -16
- package/dist/{index-y208s7zx.js → index-xrnhxkz7.js} +6 -1
- package/dist/{index-tky3j43e.js → index-zmqx48vt.js} +58 -14
- package/dist/index.js +37 -37
- package/dist/{message-index-bounded-cfkeyf72.js → message-index-bounded-6fr624zf.js} +3 -3
- package/dist/migration-worker.js +4 -3
- package/dist/{project-embedding-registry-y3z36mjy.js → project-embedding-registry-q80scexh.js} +6 -4
- package/dist/raw-ordinal-warmup-worker.js +4 -4
- package/dist/{read-session-chunk-s3qac56g.js → read-session-chunk-6wedfths.js} +2 -2
- package/dist/{recomp-orchestrator-fjdp3t1d.js → recomp-orchestrator-xzs0a455.js} +19 -18
- package/dist/{render-c9fjwrad.js → render-yqp7q79f.js} +12 -11
- package/dist/{search-archive-s2jas2jb.js → search-archive-r4h96j2z.js} +4 -4
- package/dist/{search-1jejx5cx.js → search-ztgy3ya6.js} +15 -13
- package/dist/shared/models-dev-cache.d.ts +6 -1
- package/dist/shared/models-dev-cache.d.ts.map +1 -1
- package/dist/shared/storage-file-mutex.d.ts.map +1 -1
- package/dist/shared/storage-permissions.d.ts +5 -3
- package/dist/shared/storage-permissions.d.ts.map +1 -1
- package/dist/shared/test-git-env.d.ts +3 -0
- package/dist/shared/test-git-env.d.ts.map +1 -0
- package/dist/{storage-tags-6e83pvff.js → storage-tags-y2mrb8e6.js} +1 -1
- package/dist/{store-ggrq9e14.js → store-n4yz3n66.js} +2 -2
- package/dist/{store-reader-tr64nxyy.js → store-reader-nf8z86n9.js} +1 -1
- package/dist/{transform-postprocess-phase-p2egg02g.js → transform-postprocess-phase-39a5hm2a.js} +20 -19
- package/dist/v2/auto-search-worker.js +3 -3
- package/dist/v2/chunk-embedding-write-worker.js +6 -5
- package/dist/v2/{context-zn18k0yk.js → context-k2rrqzf4.js} +446 -248
- package/dist/v2/{derive-budgets-2eam671q.js → derive-budgets-ecjy1aqh.js} +4 -2
- package/dist/v2/{embedding-backfill-hjvjxp7d.js → embedding-backfill-k8kqnwfq.js} +7 -5
- package/dist/v2/embedding-worker.js +15 -27
- package/dist/v2/fold/restore.d.ts.map +1 -1
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/revert-message-state.d.ts +12 -0
- package/dist/v2/hooks/revert-message-state.d.ts.map +1 -0
- package/dist/v2/hooks/storage-notice.d.ts +12 -6
- package/dist/v2/hooks/storage-notice.d.ts.map +1 -1
- package/dist/v2/{message-index-bounded-0xy4dn04.js → message-index-bounded-jqy7283g.js} +4 -4
- package/dist/v2/migration-worker.js +5 -4
- package/dist/v2/{project-embedding-registry-mzsvyads.js → project-embedding-registry-2jp1antr.js} +6 -4
- package/dist/v2/raw-ordinal-warmup-worker.js +4 -4
- package/dist/v2/{read-session-chunk-6mt2t6dy.js → read-session-chunk-n3nhfvd7.js} +3 -3
- package/dist/v2/{recomp-orchestrator-jn39mxh0.js → recomp-orchestrator-jnbxbsc8.js} +21 -20
- package/dist/v2/{render-q2aj9bgy.js → render-fezgh7pa.js} +13 -12
- package/dist/v2/{search-archive-fj59gjv1.js → search-archive-zz1kza50.js} +5 -5
- package/dist/v2/{search-9xn6ds9x.js → search-h5w7510x.js} +15 -13
- package/dist/v2/{server-2gcfmd47.js → server-2k8tkbhz.js} +2 -2
- package/dist/v2/{server-4z964n1c.js → server-3p6b0qya.js} +1 -1
- package/dist/v2/{server-c8mqs0v5.js → server-4wwwm2ya.js} +32 -32
- package/dist/v2/{server-1cn3kryt.js → server-97w51d8n.js} +5 -5
- package/dist/v2/{server-gx1s06dx.js → server-98hsp35q.js} +2 -2
- package/dist/v2/{server-xepx8t43.js → server-a2f1bhyj.js} +1 -1
- package/dist/v2/{server-r00xyx66.js → server-ap81bk3c.js} +28 -28
- package/dist/v2/{server-d706s5xn.js → server-b93f0bqh.js} +205 -17
- package/dist/v2/{server-2w1rdttn.js → server-brgandk4.js} +2 -2
- package/dist/v2/{server-rp52f40v.js → server-cwtehwbb.js} +1 -1
- package/dist/v2/{server-bj779zmp.js → server-e2k9mt86.js} +1 -1
- package/dist/v2/{server-68q80y27.js → server-hn8b7sfe.js} +16 -9
- package/dist/v2/{server-pejjj0nv.js → server-mbkwcwgw.js} +1 -1
- package/dist/v2/{server-g1a0nhtk.js → server-n5zr7190.js} +18 -18
- package/dist/v2/{server-2ktxmtbd.js → server-ps6rz88g.js} +2 -2
- package/dist/v2/{server-5yfq912a.js → server-qyazxy92.js} +23 -0
- package/dist/{index-fvnzcnww.js → v2/server-r2es6zt7.js} +192 -11
- package/dist/v2/{server-bt546axy.js → server-rz4snd3x.js} +3 -3
- package/dist/v2/{server-xdh4r20h.js → server-s15knz0w.js} +642 -627
- package/dist/v2/{server-vt6nj2hn.js → server-s76ty4ws.js} +41 -25
- package/dist/v2/{server-0dmzr7f9.js → server-sxfbjdye.js} +2 -2
- package/dist/v2/{server-569he5mh.js → server-w7mpvkpj.js} +1 -1
- package/dist/v2/{server-53n8hv5q.js → server-x77hd658.js} +8 -8
- package/dist/v2/{server-nqdzv8b7.js → server-xa8fefhw.js} +58 -14
- package/dist/v2/{server-1efjj215.js → server-ytqps2xa.js} +37 -6
- package/dist/v2/server.js +6 -4
- package/dist/v2/{storage-tags-z8j8wq34.js → storage-tags-xq81zgt2.js} +2 -2
- package/dist/v2/{store-reader-83tka051.js → store-reader-2vhx33n6.js} +1 -1
- package/dist/v2/store-reader.d.ts +11 -0
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/{store-qdgzd38f.js → store-y56y034s.js} +2 -2
- package/dist/v2/{v2-archive-reader-9z8z97db.js → v2-archive-reader-e2w39c3p.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-vd5zfp3v.js → wrapup-orchestrator-mmje3etf.js} +20 -19
- package/dist/{v2-archive-reader-r0xpxsb1.js → v2-archive-reader-8dsngf2j.js} +1 -1
- package/dist/{wrapup-orchestrator-k29zqfp9.js → wrapup-orchestrator-sm6pwf3p.js} +20 -19
- package/package.json +1 -1
- package/src/shared/models-dev-cache.ts +90 -21
- package/src/shared/reusable-worker.test.ts +31 -29
- package/src/shared/sqlite.test.ts +19 -6
- package/src/shared/storage-file-mutex-review.test.ts +125 -2
- package/src/shared/storage-file-mutex.ts +17 -8
- package/src/shared/storage-permissions-creators.test.ts +194 -0
- package/src/shared/storage-permissions-startup.test.ts +476 -0
- package/src/shared/storage-permissions.ts +227 -12
- package/src/shared/test-db.test.ts +5 -3
- package/src/shared/test-git-env.test.ts +38 -0
- package/src/shared/test-git-env.ts +10 -0
|
@@ -40,10 +40,11 @@ import {
|
|
|
40
40
|
materializeM0,
|
|
41
41
|
resetPrefixTrimFallbackState,
|
|
42
42
|
rebaseSessionCoordinatesAsync,
|
|
43
|
+
clearNoteNudgeTriggerOnly,
|
|
43
44
|
resolveOpenCodeProtectedTailBoundary,
|
|
44
45
|
nonNarrativeStoredGapRanges,
|
|
45
46
|
getActiveCompartmentRun
|
|
46
|
-
} from "./index-
|
|
47
|
+
} from "./index-tzbcb8yt.js";
|
|
47
48
|
import"./index-sd3egckz.js";
|
|
48
49
|
import {
|
|
49
50
|
getHarness2
|
|
@@ -55,6 +56,8 @@ import {
|
|
|
55
56
|
sessionLog2
|
|
56
57
|
} from "./index-ywrz4wy2.js";
|
|
57
58
|
import"./index-z4p0ry94.js";
|
|
59
|
+
import"./index-gqf8r04r.js";
|
|
60
|
+
import"./index-c5tmzym6.js";
|
|
58
61
|
import {
|
|
59
62
|
isSaneLimit,
|
|
60
63
|
setOutputReserveConfig,
|
|
@@ -65,7 +68,7 @@ import {
|
|
|
65
68
|
deriveHistorianChunkTokens2,
|
|
66
69
|
resolveKnownHistorianContextLimit2,
|
|
67
70
|
resolveHistorianContextLimit2
|
|
68
|
-
} from "./index-
|
|
71
|
+
} from "./index-zmqx48vt.js";
|
|
69
72
|
import"./index-6nqz8hsz.js";
|
|
70
73
|
import {
|
|
71
74
|
CANONICAL_DREAM_TASKS,
|
|
@@ -137,24 +140,17 @@ import {
|
|
|
137
140
|
applyJsonSchemaParameterDescriptions,
|
|
138
141
|
MagicContextRpcServer,
|
|
139
142
|
subagentTemperature
|
|
140
|
-
} from "./index-
|
|
141
|
-
import {
|
|
142
|
-
resolveHistorianModel2
|
|
143
|
-
} from "./index-5kym00ag.js";
|
|
143
|
+
} from "./index-qvn3q9f1.js";
|
|
144
144
|
import {
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
isFailClosedBlockingError,
|
|
149
|
-
shouldBypassFailClosedBlock,
|
|
150
|
-
createFailClosedController
|
|
151
|
-
} from "./index-wh9fxds5.js";
|
|
145
|
+
invalidateAutoEmbedSession,
|
|
146
|
+
clearEmbedSessionState
|
|
147
|
+
} from "./index-2amn2s73.js";
|
|
152
148
|
import {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
} from "./index-
|
|
157
|
-
import"./index-
|
|
149
|
+
hasMeaningfulUserText2,
|
|
150
|
+
preloadTokenizer,
|
|
151
|
+
estimateTokens
|
|
152
|
+
} from "./index-5vsk2cpp.js";
|
|
153
|
+
import"./index-pxnzyvjc.js";
|
|
158
154
|
import {
|
|
159
155
|
inRootAsyncContext2,
|
|
160
156
|
withSqliteTransformPass2,
|
|
@@ -162,14 +158,57 @@ import {
|
|
|
162
158
|
isTransientSqliteError2,
|
|
163
159
|
withAsyncPrivilegedWriter2
|
|
164
160
|
} from "./index-gzy5w8ya.js";
|
|
161
|
+
import"./index-v0p37hm2.js";
|
|
165
162
|
import"./index-96ztjvkn.js";
|
|
166
163
|
import"./index-1d042x6w.js";
|
|
167
164
|
import"./index-q7q6qp1f.js";
|
|
168
|
-
import"./index-
|
|
165
|
+
import"./index-s32f8y67.js";
|
|
166
|
+
import {
|
|
167
|
+
deleteChunkEmbedBackoffForSession2
|
|
168
|
+
} from "./index-snbpdpa3.js";
|
|
169
|
+
import {
|
|
170
|
+
advanceSessionActivity,
|
|
171
|
+
backfillSessionActivity,
|
|
172
|
+
acquireCompartmentLease,
|
|
173
|
+
releaseCompartmentLeaseBestEffort,
|
|
174
|
+
isCompartmentLeaseHeld,
|
|
175
|
+
queueM0Mutation,
|
|
176
|
+
clearRecompStaging,
|
|
177
|
+
getUncoveredCompartmentEndsThrough,
|
|
178
|
+
readServerFallbackUsage,
|
|
179
|
+
providerResponseFailed,
|
|
180
|
+
isSuccessfulProviderCompletion,
|
|
181
|
+
forgetUnpublishedAutoSearchNoHint,
|
|
182
|
+
readSessionMeta,
|
|
183
|
+
getOrCreateSessionMeta,
|
|
184
|
+
updateSessionMeta,
|
|
185
|
+
markSessionCleanupPending,
|
|
186
|
+
clearSession,
|
|
187
|
+
requestPendingMaterialization,
|
|
188
|
+
clearPendingMaterialization,
|
|
189
|
+
bindSystemPromptResponse,
|
|
190
|
+
retirePendingSystemPromptDelivery,
|
|
191
|
+
lkgProviderInputTotal,
|
|
192
|
+
beginV2LkgRequest,
|
|
193
|
+
currentLkgRequestIdentity,
|
|
194
|
+
noteLkgProviderResponse,
|
|
195
|
+
clearLkgMeasuredRequest,
|
|
196
|
+
beginServedRequest,
|
|
197
|
+
noteServedRefusal,
|
|
198
|
+
countServedRefusal,
|
|
199
|
+
dropServedRecord,
|
|
200
|
+
forgetServedRecord,
|
|
201
|
+
commitServedRequest,
|
|
202
|
+
getSlot,
|
|
203
|
+
dropSlot,
|
|
204
|
+
copySessionStateForClone
|
|
205
|
+
} from "./index-w6v4dw5f.js";
|
|
206
|
+
import"./index-05bm2ndp.js";
|
|
169
207
|
import {
|
|
170
208
|
stripPersistedAssistantText,
|
|
171
209
|
currentReclaimableToolOutputCount,
|
|
172
210
|
isRecord,
|
|
211
|
+
contentTagOwnerMessageId,
|
|
173
212
|
isDroppedToolOutput,
|
|
174
213
|
evaluateChannel2,
|
|
175
214
|
buildChannel2Reminder,
|
|
@@ -177,15 +216,23 @@ import {
|
|
|
177
216
|
clearCachedM0M1,
|
|
178
217
|
clearCachedM0,
|
|
179
218
|
readReplayEnvelope,
|
|
219
|
+
getPersistedReasoningWatermark,
|
|
220
|
+
setPersistedReasoningWatermark,
|
|
180
221
|
getChannel2NudgeState,
|
|
181
222
|
claimChannel2NudgeState,
|
|
182
223
|
casChannel2NudgeClaim,
|
|
224
|
+
getPersistedNoteNudge,
|
|
225
|
+
getNoteNudgeAnchors,
|
|
226
|
+
pruneNoteNudgeAnchors,
|
|
227
|
+
pruneAutoSearchHintDecisions,
|
|
183
228
|
getOverflowState,
|
|
184
229
|
recordOverflowDetected,
|
|
185
230
|
recordDetectedContextLimit,
|
|
186
231
|
clearDetectedContextLimit,
|
|
187
232
|
getPersistedCompactionMarkerState,
|
|
188
233
|
setPersistedCompactionMarkerState,
|
|
234
|
+
getStrippedPlaceholderIds,
|
|
235
|
+
applyStrippedPlaceholderDelta,
|
|
189
236
|
getPendingPiCompactionMarkerState,
|
|
190
237
|
clearPendingPiCompactionMarkerStateIf,
|
|
191
238
|
logPiCompactionMarkerClear,
|
|
@@ -195,19 +242,33 @@ import {
|
|
|
195
242
|
modelAcceptsEmptyContent,
|
|
196
243
|
markServedShapeRepair,
|
|
197
244
|
getEmptyImageParts,
|
|
198
|
-
estimateFinalWireInputTokens
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
preloadTokenizer,
|
|
203
|
-
estimateTokens
|
|
204
|
-
} from "./index-5vsk2cpp.js";
|
|
245
|
+
estimateFinalWireInputTokens,
|
|
246
|
+
getMaxTagNumberBySession2,
|
|
247
|
+
getTagsBySession2
|
|
248
|
+
} from "./index-xrnhxkz7.js";
|
|
205
249
|
import {
|
|
206
250
|
BoundedSessionMap,
|
|
207
251
|
getTableColumnNames,
|
|
208
252
|
recordToolDefinitionSet,
|
|
209
253
|
getCurrentToolSetHash
|
|
210
254
|
} from "./index-jrj95cce.js";
|
|
255
|
+
import {
|
|
256
|
+
resolveHistorianModel2
|
|
257
|
+
} from "./index-5kym00ag.js";
|
|
258
|
+
import {
|
|
259
|
+
formatFailClosedBlockingMessage,
|
|
260
|
+
formatFailClosedBlockingSummary,
|
|
261
|
+
createFailClosedBlockingError,
|
|
262
|
+
isFailClosedBlockingError,
|
|
263
|
+
shouldBypassFailClosedBlock,
|
|
264
|
+
createFailClosedController
|
|
265
|
+
} from "./index-wh9fxds5.js";
|
|
266
|
+
import {
|
|
267
|
+
setHomeProjectPermission,
|
|
268
|
+
resolveProjectIdentityForSession,
|
|
269
|
+
scheduleAfterBootQuiet
|
|
270
|
+
} from "./index-7svecf3m.js";
|
|
271
|
+
import"./index-1zx87sdm.js";
|
|
211
272
|
import"./index-58e3y90n.js";
|
|
212
273
|
import"./index-x40zr813.js";
|
|
213
274
|
import {
|
|
@@ -222,56 +283,10 @@ import {
|
|
|
222
283
|
cleanUserText2,
|
|
223
284
|
readRawSessionMessageIdOrdinalsForRange2,
|
|
224
285
|
readRawSessionMessageOrdinalById2
|
|
225
|
-
} from "./index-
|
|
226
|
-
import"./index-zzvd4a9z.js";
|
|
227
|
-
import"./index-s32f8y67.js";
|
|
286
|
+
} from "./index-7j2zv9nm.js";
|
|
228
287
|
import {
|
|
229
288
|
scheduleClearAndReindex
|
|
230
|
-
} from "./index-
|
|
231
|
-
import {
|
|
232
|
-
invalidateAutoEmbedSession,
|
|
233
|
-
clearEmbedSessionState
|
|
234
|
-
} from "./index-2amn2s73.js";
|
|
235
|
-
import"./index-pxnzyvjc.js";
|
|
236
|
-
import {
|
|
237
|
-
deleteChunkEmbedBackoffForSession2
|
|
238
|
-
} from "./index-snbpdpa3.js";
|
|
239
|
-
import"./index-gqf8r04r.js";
|
|
240
|
-
import {
|
|
241
|
-
advanceSessionActivity,
|
|
242
|
-
backfillSessionActivity,
|
|
243
|
-
acquireCompartmentLease,
|
|
244
|
-
releaseCompartmentLeaseBestEffort,
|
|
245
|
-
isCompartmentLeaseHeld,
|
|
246
|
-
queueM0Mutation,
|
|
247
|
-
getUncoveredCompartmentEndsThrough,
|
|
248
|
-
readServerFallbackUsage,
|
|
249
|
-
providerResponseFailed,
|
|
250
|
-
isSuccessfulProviderCompletion,
|
|
251
|
-
readSessionMeta,
|
|
252
|
-
getOrCreateSessionMeta,
|
|
253
|
-
updateSessionMeta,
|
|
254
|
-
markSessionCleanupPending,
|
|
255
|
-
clearSession,
|
|
256
|
-
requestPendingMaterialization,
|
|
257
|
-
clearPendingMaterialization,
|
|
258
|
-
bindSystemPromptResponse,
|
|
259
|
-
retirePendingSystemPromptDelivery,
|
|
260
|
-
lkgProviderInputTotal,
|
|
261
|
-
beginV2LkgRequest,
|
|
262
|
-
currentLkgRequestIdentity,
|
|
263
|
-
noteLkgProviderResponse,
|
|
264
|
-
clearLkgMeasuredRequest,
|
|
265
|
-
beginServedRequest,
|
|
266
|
-
noteServedRefusal,
|
|
267
|
-
countServedRefusal,
|
|
268
|
-
dropServedRecord,
|
|
269
|
-
forgetServedRecord,
|
|
270
|
-
commitServedRequest,
|
|
271
|
-
getSlot,
|
|
272
|
-
dropSlot,
|
|
273
|
-
copySessionStateForClone
|
|
274
|
-
} from "./index-x8qgqnym.js";
|
|
289
|
+
} from "./index-798s7c8s.js";
|
|
275
290
|
import {
|
|
276
291
|
startBootDeadline,
|
|
277
292
|
getSchemaFenceRejection,
|
|
@@ -281,17 +296,17 @@ import {
|
|
|
281
296
|
openDatabaseAsync,
|
|
282
297
|
isDatabasePersisted,
|
|
283
298
|
getDatabasePersistenceError
|
|
284
|
-
} from "./index-
|
|
299
|
+
} from "./index-xccywqdj.js";
|
|
285
300
|
import"./index-fr0wbhdn.js";
|
|
286
|
-
import"./index-
|
|
301
|
+
import"./index-4w5rx7de.js";
|
|
287
302
|
import {
|
|
288
303
|
gaDatabasePath2,
|
|
289
304
|
RAW_MESSAGE_TYPES2,
|
|
290
305
|
V2StoreReaderPool2,
|
|
291
306
|
V2StoreReader2
|
|
292
|
-
} from "./index-
|
|
307
|
+
} from "./index-1y4y98r1.js";
|
|
293
308
|
import"./index-fb3zxn06.js";
|
|
294
|
-
import"./index-
|
|
309
|
+
import"./index-4ntnt8ee.js";
|
|
295
310
|
import {
|
|
296
311
|
createTagger,
|
|
297
312
|
cavemanWordRulesForLanguage,
|
|
@@ -304,20 +319,20 @@ import {
|
|
|
304
319
|
servedHeadChanged,
|
|
305
320
|
noteHostCheckpointCommit,
|
|
306
321
|
isSyntheticHeadMessage2
|
|
307
|
-
} from "./index-
|
|
322
|
+
} from "./index-sbr58jaf.js";
|
|
308
323
|
import"./index-832w615x.js";
|
|
309
324
|
import"./index-qt1qqasc.js";
|
|
310
325
|
import {
|
|
311
326
|
retainProjectEmbedding2
|
|
312
|
-
} from "./index-
|
|
313
|
-
import"./index-
|
|
327
|
+
} from "./index-s8ks5nz4.js";
|
|
328
|
+
import"./index-3dtzyred.js";
|
|
314
329
|
import"./index-4dhv7mqz.js";
|
|
315
|
-
import"./index-
|
|
330
|
+
import"./index-k50xhjw1.js";
|
|
316
331
|
import {
|
|
317
332
|
renderUserFacingFailure,
|
|
318
333
|
userFacingFailureCode
|
|
319
|
-
} from "./index-
|
|
320
|
-
import"./index-
|
|
334
|
+
} from "./index-pw279hmt.js";
|
|
335
|
+
import"./index-k0tb2z28.js";
|
|
321
336
|
import"./index-jjvbk92s.js";
|
|
322
337
|
import {
|
|
323
338
|
pushLiveNotification2,
|
|
@@ -326,9 +341,9 @@ import {
|
|
|
326
341
|
} from "./index-fzgyvsb1.js";
|
|
327
342
|
import"./index-e6ncz7a6.js";
|
|
328
343
|
import"./index-g6hfh4h4.js";
|
|
329
|
-
import"./index-
|
|
330
|
-
import"./index-
|
|
331
|
-
import"./index-
|
|
344
|
+
import"./index-0rge5rkh.js";
|
|
345
|
+
import"./index-kqnef2tg.js";
|
|
346
|
+
import"./index-2kf73btc.js";
|
|
332
347
|
import {
|
|
333
348
|
detectConflicts
|
|
334
349
|
} from "./index-nxxzeq4y.js";
|
|
@@ -336,8 +351,10 @@ import {
|
|
|
336
351
|
STORAGE_NOTICE_PREFIX,
|
|
337
352
|
formatStorageRefusalNotice,
|
|
338
353
|
formatStorageRecoveryNotice,
|
|
354
|
+
isCopiedStorageNotice,
|
|
339
355
|
hasStorageNoticeShape,
|
|
340
356
|
dropStorageNotices,
|
|
357
|
+
storageNoticeHasNewInput,
|
|
341
358
|
rememberHostMedia,
|
|
342
359
|
hostMediaAsset,
|
|
343
360
|
hostMediaFromEncoded,
|
|
@@ -355,12 +372,12 @@ import {
|
|
|
355
372
|
readV2RawMessagePagesForConversion2,
|
|
356
373
|
createV2RawMessageReader2,
|
|
357
374
|
createV2RawMessageProvider2
|
|
358
|
-
} from "./index-
|
|
375
|
+
} from "./index-08jfpny9.js";
|
|
359
376
|
import"./index-fmsr7v69.js";
|
|
360
|
-
import"./index-
|
|
377
|
+
import"./index-70cv85b0.js";
|
|
361
378
|
import"./index-52x68mj4.js";
|
|
362
|
-
import"./index-
|
|
363
|
-
import"./index-
|
|
379
|
+
import"./index-1pf5qrx4.js";
|
|
380
|
+
import"./index-nny4gm06.js";
|
|
364
381
|
import {
|
|
365
382
|
isDreamerRunnable,
|
|
366
383
|
isSmartNoteSurfaceAvailable,
|
|
@@ -376,13 +393,13 @@ import {
|
|
|
376
393
|
import {
|
|
377
394
|
piModelRefToCanonical
|
|
378
395
|
} from "./index-avwt563y.js";
|
|
379
|
-
import {
|
|
380
|
-
sameProjectDirectory
|
|
381
|
-
} from "./index-knvkbfvh.js";
|
|
382
396
|
import {
|
|
383
397
|
getErrorMessage
|
|
384
398
|
} from "./index-y8v6yerm.js";
|
|
385
399
|
import"./index-m0pwswv9.js";
|
|
400
|
+
import {
|
|
401
|
+
sameProjectDirectory
|
|
402
|
+
} from "./index-knvkbfvh.js";
|
|
386
403
|
|
|
387
404
|
// src/v2/hooks/context.ts
|
|
388
405
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -6187,6 +6204,106 @@ function readPages(reader, sessionID, after, through) {
|
|
|
6187
6204
|
return rows;
|
|
6188
6205
|
}
|
|
6189
6206
|
|
|
6207
|
+
// src/v2/hooks/revert-message-state.ts
|
|
6208
|
+
var MAX_STAGED_REVERTS = 32;
|
|
6209
|
+
var MAX_STAGED_SUFFIX_ROWS = 1e4;
|
|
6210
|
+
|
|
6211
|
+
class V2RevertMessageCleanup {
|
|
6212
|
+
openStoreReader;
|
|
6213
|
+
staged = new BoundedSessionMap(MAX_STAGED_REVERTS);
|
|
6214
|
+
constructor(openStoreReader) {
|
|
6215
|
+
this.openStoreReader = openStoreReader;
|
|
6216
|
+
}
|
|
6217
|
+
captureStageProof(sessionID, cutoff) {
|
|
6218
|
+
this.discardStageProof(sessionID);
|
|
6219
|
+
if (typeof cutoff !== "string" || cutoff.length === 0)
|
|
6220
|
+
return;
|
|
6221
|
+
try {
|
|
6222
|
+
const reader = this.openStoreReader();
|
|
6223
|
+
try {
|
|
6224
|
+
const suffix = reader.revertSuffix(sessionID, cutoff, MAX_STAGED_SUFFIX_ROWS);
|
|
6225
|
+
this.staged.set(sessionID, suffix ? { cutoff, host: reader.hostIdentity(), suffix } : {
|
|
6226
|
+
cutoff,
|
|
6227
|
+
unavailable: "stage did not prove a bounded suffix and retained predecessor"
|
|
6228
|
+
});
|
|
6229
|
+
} finally {
|
|
6230
|
+
reader.close();
|
|
6231
|
+
}
|
|
6232
|
+
} catch {
|
|
6233
|
+
this.staged.set(sessionID, { cutoff, unavailable: "host store read failed at stage" });
|
|
6234
|
+
}
|
|
6235
|
+
}
|
|
6236
|
+
discardStageProof(sessionID) {
|
|
6237
|
+
this.staged.delete(sessionID);
|
|
6238
|
+
}
|
|
6239
|
+
discardAllStageProofs() {
|
|
6240
|
+
this.staged.clear();
|
|
6241
|
+
}
|
|
6242
|
+
pruneOnCommit(db, sessionID, to) {
|
|
6243
|
+
const staged = this.staged.peek(sessionID);
|
|
6244
|
+
this.discardStageProof(sessionID);
|
|
6245
|
+
const noteSkippedCleanup = (reason) => {
|
|
6246
|
+
sessionLog2(sessionID, `committed revert tag cleanup skipped: ${reason}`);
|
|
6247
|
+
return false;
|
|
6248
|
+
};
|
|
6249
|
+
if (!staged)
|
|
6250
|
+
return noteSkippedCleanup("no staged proof");
|
|
6251
|
+
if (staged.cutoff !== to)
|
|
6252
|
+
return noteSkippedCleanup("commit cutoff differs from staged cutoff");
|
|
6253
|
+
if ("unavailable" in staged)
|
|
6254
|
+
return noteSkippedCleanup(staged.unavailable);
|
|
6255
|
+
let removed;
|
|
6256
|
+
try {
|
|
6257
|
+
const reader = this.openStoreReader();
|
|
6258
|
+
try {
|
|
6259
|
+
if (reader.hostIdentity() !== staged.host)
|
|
6260
|
+
return noteSkippedCleanup("host database changed");
|
|
6261
|
+
removed = reader.removedRevertMessages(sessionID, staged.suffix);
|
|
6262
|
+
} finally {
|
|
6263
|
+
reader.close();
|
|
6264
|
+
}
|
|
6265
|
+
} catch {
|
|
6266
|
+
return noteSkippedCleanup("host store read failed at commit");
|
|
6267
|
+
}
|
|
6268
|
+
if (!removed)
|
|
6269
|
+
return noteSkippedCleanup("retained predecessor is not visible at commit");
|
|
6270
|
+
if (!removed.size)
|
|
6271
|
+
return noteSkippedCleanup("all staged rows still exist");
|
|
6272
|
+
pruneMessages(db, sessionID, removed);
|
|
6273
|
+
return true;
|
|
6274
|
+
}
|
|
6275
|
+
}
|
|
6276
|
+
function pruneMessages(db, sessionID, removed) {
|
|
6277
|
+
db.transaction(() => {
|
|
6278
|
+
const tagNumbers = getTagsBySession2(db, sessionID).flatMap((tag) => {
|
|
6279
|
+
const owner = tag.type === "tool" ? tag.toolOwnerMessageId : contentTagOwnerMessageId(tag.messageId);
|
|
6280
|
+
return owner && removed.has(owner) ? [tag.tagNumber] : [];
|
|
6281
|
+
});
|
|
6282
|
+
if (tagNumbers.length) {
|
|
6283
|
+
db.prepare("DELETE FROM tags WHERE session_id = ? AND tag_number IN (SELECT value FROM json_each(?))").run(sessionID, JSON.stringify(tagNumbers));
|
|
6284
|
+
}
|
|
6285
|
+
db.prepare("DELETE FROM temporal_decisions WHERE session_id = ? AND message_id IN (SELECT value FROM json_each(?))").run(sessionID, JSON.stringify([...removed]));
|
|
6286
|
+
const placeholders = [...getStrippedPlaceholderIds(db, sessionID)].filter((id) => removed.has(id));
|
|
6287
|
+
if (placeholders.length)
|
|
6288
|
+
applyStrippedPlaceholderDelta(db, sessionID, { remove: placeholders });
|
|
6289
|
+
const anchors = getNoteNudgeAnchors(db, sessionID);
|
|
6290
|
+
if (anchors.some(({ messageId }) => removed.has(messageId)))
|
|
6291
|
+
pruneNoteNudgeAnchors(db, sessionID, new Set(anchors.map(({ messageId }) => messageId).filter((id) => !removed.has(id))));
|
|
6292
|
+
const trigger = getPersistedNoteNudge(db, sessionID).triggerMessageId;
|
|
6293
|
+
if (trigger && removed.has(trigger))
|
|
6294
|
+
clearNoteNudgeTriggerOnly(db, sessionID);
|
|
6295
|
+
pruneAutoSearchHintDecisions(db, sessionID, removed);
|
|
6296
|
+
if (tagNumbers.length > 0) {
|
|
6297
|
+
const watermark = getPersistedReasoningWatermark(db, sessionID);
|
|
6298
|
+
const maxRetained = getMaxTagNumberBySession2(db, sessionID);
|
|
6299
|
+
if (watermark > maxRetained)
|
|
6300
|
+
setPersistedReasoningWatermark(db, sessionID, maxRetained);
|
|
6301
|
+
}
|
|
6302
|
+
}).immediate();
|
|
6303
|
+
for (const id of removed)
|
|
6304
|
+
forgetUnpublishedAutoSearchNoHint(sessionID, id);
|
|
6305
|
+
}
|
|
6306
|
+
|
|
6190
6307
|
// src/v2/hooks/rpc-live-state.ts
|
|
6191
6308
|
function createV2RpcLiveSessionState(overrides) {
|
|
6192
6309
|
return Object.assign(createLiveSessionState(), overrides);
|
|
@@ -6812,7 +6929,8 @@ function checkHistoryBoundary(db, reader, sessionID) {
|
|
|
6812
6929
|
return repairMissingHistoryBoundary({
|
|
6813
6930
|
db,
|
|
6814
6931
|
sessionId: sessionID,
|
|
6815
|
-
isInHostStore: (messageId) => storeHasSession ? reader.sequenceForId(sessionID, messageId) !== undefined : null
|
|
6932
|
+
isInHostStore: (messageId) => storeHasSession ? reader.sequenceForId(sessionID, messageId) !== undefined : null,
|
|
6933
|
+
onRetire: () => clearRecompStaging(db, sessionID)
|
|
6816
6934
|
});
|
|
6817
6935
|
} catch (error) {
|
|
6818
6936
|
sessionLog2(sessionID, "history boundary check failed; continuing without repair", error);
|
|
@@ -7177,6 +7295,40 @@ async function registerContext(context) {
|
|
|
7177
7295
|
const readerPool = new V2StoreReaderPool2;
|
|
7178
7296
|
const messageTimesCache = new V2MessageTimesCache;
|
|
7179
7297
|
const openStoreReader = () => readerPool.open(gaDatabasePath2(getDataDir(), process.env.OPENCODE_CHANNEL ?? "latest"));
|
|
7298
|
+
const revertMessageCleanup = new V2RevertMessageCleanup(openStoreReader);
|
|
7299
|
+
const dropRequestStorageNotices = (draft) => dropStorageNotices(draft.messages, (id) => isAdmittedSynthetic(context, draft.sessionID, id), (id) => {
|
|
7300
|
+
const reader = openStoreReader();
|
|
7301
|
+
try {
|
|
7302
|
+
return isCopiedStorageNotice(reader.messageById(draft.sessionID, id));
|
|
7303
|
+
} finally {
|
|
7304
|
+
reader.close();
|
|
7305
|
+
}
|
|
7306
|
+
});
|
|
7307
|
+
const shouldRefuseStorageNoticeStep = (draft, noticeID) => {
|
|
7308
|
+
let reader;
|
|
7309
|
+
try {
|
|
7310
|
+
const source = reader = openStoreReader();
|
|
7311
|
+
const idle = source.latestIdle(draft.sessionID)?.seq ?? -1;
|
|
7312
|
+
const notice = source.sequenceForId(draft.sessionID, noticeID);
|
|
7313
|
+
if (notice === undefined) {
|
|
7314
|
+
sessionLog2(draft.sessionID, "v2 storage notice step refused: notice row missing");
|
|
7315
|
+
return true;
|
|
7316
|
+
}
|
|
7317
|
+
if (notice <= idle)
|
|
7318
|
+
return true;
|
|
7319
|
+
const tail = draft.messages.at(-1);
|
|
7320
|
+
if (tail?.role !== "user" && tail?.role !== "tool")
|
|
7321
|
+
return true;
|
|
7322
|
+
if (tail.role === "user" && tail.id && tail.id === source.latestCompaction(draft.sessionID)?.id)
|
|
7323
|
+
return true;
|
|
7324
|
+
return !storageNoticeHasNewInput(draft.messages, idle, (id) => source.sequenceForId(draft.sessionID, id));
|
|
7325
|
+
} catch (error) {
|
|
7326
|
+
sessionLog2(draft.sessionID, "v2 storage notice step refused: the settled turn boundary is unknown", error);
|
|
7327
|
+
return true;
|
|
7328
|
+
} finally {
|
|
7329
|
+
reader?.close();
|
|
7330
|
+
}
|
|
7331
|
+
};
|
|
7180
7332
|
const createHiddenExecutor = async (database) => {
|
|
7181
7333
|
await cleanupLegacyOnce(database);
|
|
7182
7334
|
return createV2HiddenCompletionExecutor({
|
|
@@ -7459,14 +7611,27 @@ async function registerContext(context) {
|
|
|
7459
7611
|
catalogFailed = true;
|
|
7460
7612
|
}
|
|
7461
7613
|
if (!catalogFailed) {
|
|
7462
|
-
const providers = new Map
|
|
7614
|
+
const providers = new Map(catalogProvidersPayload(catalog).map((provider) => [
|
|
7615
|
+
provider.id,
|
|
7616
|
+
provider
|
|
7617
|
+
]));
|
|
7618
|
+
const listedModels = providers.get(draft.model.providerID)?.models;
|
|
7619
|
+
const draftOnlyModelKey = listedModels && Object.hasOwn(listedModels, draft.model.id) ? undefined : draftModelKey;
|
|
7463
7620
|
for (const model of catalogModels(catalog, draft.model)) {
|
|
7464
7621
|
rawLimits.set(`${model.providerID}/${model.id}`, model.limit);
|
|
7465
7622
|
const provider = providers.get(model.providerID) ?? {
|
|
7466
7623
|
id: model.providerID,
|
|
7467
7624
|
models: {}
|
|
7468
7625
|
};
|
|
7469
|
-
provider.models[model.id]
|
|
7626
|
+
const row = provider.models[model.id];
|
|
7627
|
+
const catalogLimit = row?.limit;
|
|
7628
|
+
provider.models[model.id] = {
|
|
7629
|
+
...row,
|
|
7630
|
+
limit: {
|
|
7631
|
+
...catalogLimit && typeof catalogLimit === "object" ? catalogLimit : {},
|
|
7632
|
+
...model.limit
|
|
7633
|
+
}
|
|
7634
|
+
};
|
|
7470
7635
|
providers.set(model.providerID, provider);
|
|
7471
7636
|
}
|
|
7472
7637
|
await refreshModelLimitsFromApi({
|
|
@@ -7475,7 +7640,7 @@ async function registerContext(context) {
|
|
|
7475
7640
|
data: { providers: [...providers.values()] }
|
|
7476
7641
|
})
|
|
7477
7642
|
}
|
|
7478
|
-
});
|
|
7643
|
+
}, { mode: "merge", draftOnlyModelKey });
|
|
7479
7644
|
queriedModels.add(draftModelKey);
|
|
7480
7645
|
}
|
|
7481
7646
|
}
|
|
@@ -7604,9 +7769,28 @@ async function registerContext(context) {
|
|
|
7604
7769
|
reader.close();
|
|
7605
7770
|
}
|
|
7606
7771
|
});
|
|
7607
|
-
if (
|
|
7608
|
-
|
|
7609
|
-
|
|
7772
|
+
if (event.type === "session.revert.staged" && db) {
|
|
7773
|
+
revertMessageCleanup.captureStageProof(sessionID, event.data.revert?.messageID);
|
|
7774
|
+
}
|
|
7775
|
+
if (event.type === "session.revert.cleared" || event.type === "session.deleted") {
|
|
7776
|
+
revertMessageCleanup.discardStageProof(sessionID);
|
|
7777
|
+
}
|
|
7778
|
+
if (event.type === "session.revert.committed") {
|
|
7779
|
+
dropServedRecord(sessionID, "host_edit");
|
|
7780
|
+
if (db) {
|
|
7781
|
+
const indexDb = db;
|
|
7782
|
+
withoutSqliteTransformPass2(() => {
|
|
7783
|
+
scheduleClearAndReindex(indexDb, sessionID, pagedRead);
|
|
7784
|
+
try {
|
|
7785
|
+
if (revertMessageCleanup.pruneOnCommit(indexDb, sessionID, event.data?.to)) {
|
|
7786
|
+
tagger.cleanup(sessionID);
|
|
7787
|
+
transform?.invalidateRustWireState(sessionID);
|
|
7788
|
+
}
|
|
7789
|
+
} catch (error) {
|
|
7790
|
+
sessionLog2(sessionID, "committed revert message cleanup failed:", error);
|
|
7791
|
+
}
|
|
7792
|
+
});
|
|
7793
|
+
}
|
|
7610
7794
|
}
|
|
7611
7795
|
if (event.type === "session.execution.started" || event.type === "session.execution.interrupted") {
|
|
7612
7796
|
hostFoldIdle?.active(sessionID);
|
|
@@ -7708,6 +7892,8 @@ async function registerContext(context) {
|
|
|
7708
7892
|
} catch (error) {
|
|
7709
7893
|
if (!usageController.signal.aborted)
|
|
7710
7894
|
log2("[magic-context] v2 usage subscription failed", error);
|
|
7895
|
+
} finally {
|
|
7896
|
+
revertMessageCleanup.discardAllStageProofs();
|
|
7711
7897
|
}
|
|
7712
7898
|
if (usageController.signal.aborted)
|
|
7713
7899
|
break;
|
|
@@ -8005,7 +8191,7 @@ async function registerContext(context) {
|
|
|
8005
8191
|
onRustEngineReconnectRefusal: (refusal) => rustRefusalRecovery?.arm(refusal),
|
|
8006
8192
|
...createHostSeams(context, readAllForConversion, pagedRead, liveModels)
|
|
8007
8193
|
});
|
|
8008
|
-
const runManagedContext = async (draft) => {
|
|
8194
|
+
const runManagedContext = async (draft, pass) => {
|
|
8009
8195
|
rememberHostMedia(draft.messages);
|
|
8010
8196
|
if (hiddenChildHook.apply(draft))
|
|
8011
8197
|
return "skipped";
|
|
@@ -8040,11 +8226,23 @@ async function registerContext(context) {
|
|
|
8040
8226
|
return stored;
|
|
8041
8227
|
};
|
|
8042
8228
|
const newest = draft.messages.at(-1);
|
|
8043
|
-
|
|
8229
|
+
const wakeNotice = newest?.id && hasStorageNoticeShape(newest) && await isMagicContextSynthetic(newest.id) ? newest.id : undefined;
|
|
8230
|
+
try {
|
|
8231
|
+
await dropRequestStorageNotices(draft);
|
|
8232
|
+
} catch (error) {
|
|
8233
|
+
if (!wakeNotice)
|
|
8234
|
+
throw error;
|
|
8235
|
+
sessionLog2(draft.sessionID, "v2 storage notice step refused: request notice lookup failed", error);
|
|
8044
8236
|
await refuseBeforeProvider(context.session, draft.sessionID, "storage-notice-turn");
|
|
8045
8237
|
return "skipped";
|
|
8046
8238
|
}
|
|
8047
|
-
|
|
8239
|
+
if (wakeNotice) {
|
|
8240
|
+
if (shouldRefuseStorageNoticeStep(draft, wakeNotice)) {
|
|
8241
|
+
await refuseBeforeProvider(context.session, draft.sessionID, "storage-notice-turn");
|
|
8242
|
+
return "skipped";
|
|
8243
|
+
}
|
|
8244
|
+
pass.storageNoticeWake = true;
|
|
8245
|
+
}
|
|
8048
8246
|
const hostMessagesAtEntry = [...draft.messages];
|
|
8049
8247
|
const cachedTimes = messageTimesCache.pass(draft.sessionID);
|
|
8050
8248
|
const readTimes = (reader, messages) => {
|
|
@@ -8623,7 +8821,10 @@ async function registerContext(context) {
|
|
|
8623
8821
|
let returned = false;
|
|
8624
8822
|
let outcome;
|
|
8625
8823
|
try {
|
|
8626
|
-
outcome = await runManagedContext(draft);
|
|
8824
|
+
outcome = await runManagedContext(draft, pass);
|
|
8825
|
+
if (!pass.refused && pass.storageNoticeWake && draft.messages.at(-1)?.role === "assistant") {
|
|
8826
|
+
await refuseBeforeProvider(context.session, draft.sessionID, "storage-notice-turn", "request ends with the previous reply");
|
|
8827
|
+
}
|
|
8627
8828
|
if (pass.refused) {
|
|
8628
8829
|
returned = true;
|
|
8629
8830
|
return;
|
|
@@ -8655,10 +8856,16 @@ async function registerContext(context) {
|
|
|
8655
8856
|
generateReplay.capture(draft, anchor);
|
|
8656
8857
|
}));
|
|
8657
8858
|
await context.session.hook("generate", async (draft) => {
|
|
8658
|
-
|
|
8859
|
+
const managed = !compactionOff && !deletedSessions.has(draft.sessionID);
|
|
8860
|
+
if (managed)
|
|
8659
8861
|
generateReplay.apply(draft);
|
|
8660
|
-
|
|
8862
|
+
try {
|
|
8863
|
+
await dropRequestStorageNotices(draft);
|
|
8864
|
+
} catch (error) {
|
|
8865
|
+
sessionLog2(draft.sessionID, "v2 side question: storage notice lookup failed; sending without notice filtering", error);
|
|
8661
8866
|
}
|
|
8867
|
+
if (managed)
|
|
8868
|
+
await refuseOversizedCheckpoint(draft);
|
|
8662
8869
|
});
|
|
8663
8870
|
withoutSqliteTransformPass2(() => warmModelLimitCacheFromCatalog(context));
|
|
8664
8871
|
const rpcLiveSessionState = createV2RpcLiveSessionState({
|
|
@@ -5,8 +5,10 @@ import {
|
|
|
5
5
|
resolveHistorianProducerLimits2,
|
|
6
6
|
resolveHistorianContextLimit2,
|
|
7
7
|
producerSourceLocalBudget2
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-zmqx48vt.js";
|
|
9
9
|
import"./index-1zx87sdm.js";
|
|
10
|
+
import"./index-c5tmzym6.js";
|
|
11
|
+
import"./index-gqf8r04r.js";
|
|
10
12
|
import"./index-ywrz4wy2.js";
|
|
11
13
|
import"./index-pavzsdc6.js";
|
|
12
14
|
import"./index-z4p0ry94.js";
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureMemoryEmbeddings2
|
|
3
|
-
} from "./index-
|
|
4
|
-
import"./index-
|
|
3
|
+
} from "./index-k0tb2z28.js";
|
|
4
|
+
import"./index-s8ks5nz4.js";
|
|
5
5
|
import"./index-4dhv7mqz.js";
|
|
6
6
|
import"./index-2amn2s73.js";
|
|
7
7
|
import"./index-qt1qqasc.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-k50xhjw1.js";
|
|
9
9
|
import"./index-6nqz8hsz.js";
|
|
10
|
-
import"./index-
|
|
10
|
+
import"./index-3dtzyred.js";
|
|
11
11
|
import"./index-snbpdpa3.js";
|
|
12
12
|
import"./index-pxnzyvjc.js";
|
|
13
|
-
import"./index-
|
|
13
|
+
import"./index-7svecf3m.js";
|
|
14
14
|
import"./index-s32f8y67.js";
|
|
15
15
|
import"./index-q7q6qp1f.js";
|
|
16
16
|
import"./index-96ztjvkn.js";
|
|
17
17
|
import"./index-v0p37hm2.js";
|
|
18
18
|
import"./index-m0pwswv9.js";
|
|
19
|
+
import"./index-c5tmzym6.js";
|
|
20
|
+
import"./index-gqf8r04r.js";
|
|
19
21
|
import"./index-5vsk2cpp.js";
|
|
20
22
|
import"./index-gzy5w8ya.js";
|
|
21
23
|
import"./index-ywrz4wy2.js";
|