@cortexkit/opencode-magic-context 0.49.98 → 0.49.100
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/auto-search-worker.js +3 -3
- package/dist/chunk-embedding-write-worker.js +1 -1
- package/dist/{context-0ae81pg4.js → context-k2tdh146.js} +293 -32
- package/dist/{embedding-backfill-7terr34j.js → embedding-backfill-79br4kk6.js} +2 -2
- package/dist/features/magic-context/memory/embedding-openai.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-probe.d.ts +10 -9
- package/dist/features/magic-context/memory/embedding-probe.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-response-slots.d.ts +13 -0
- package/dist/features/magic-context/memory/embedding-response-slots.d.ts.map +1 -0
- package/dist/features/magic-context/overflow-detection.d.ts +7 -0
- package/dist/features/magic-context/overflow-detection.d.ts.map +1 -1
- package/dist/features/magic-context/storage-native-replay.d.ts +2 -0
- package/dist/features/magic-context/storage-native-replay.d.ts.map +1 -1
- package/dist/hooks/magic-context/apply-operations.d.ts +1 -1
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/emergency-drop.d.ts +8 -1
- package/dist/hooks/magic-context/emergency-drop.d.ts.map +1 -1
- package/dist/hooks/magic-context/execute-flush.d.ts +1 -1
- package/dist/hooks/magic-context/execute-flush.d.ts.map +1 -1
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts +4 -0
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -1
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts +1 -0
- package/dist/hooks/magic-context/heuristic-cleanup.d.ts.map +1 -1
- package/dist/hooks/magic-context/image-token-estimate.d.ts +1 -0
- package/dist/hooks/magic-context/image-token-estimate.d.ts.map +1 -1
- package/dist/hooks/magic-context/provider-refusal-count.d.ts +84 -0
- package/dist/hooks/magic-context/provider-refusal-count.d.ts.map +1 -0
- package/dist/hooks/magic-context/signed-thinking-hold.d.ts +2 -0
- package/dist/hooks/magic-context/signed-thinking-hold.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +1 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-p52gf8a6.js → index-0eyxarpb.js} +7 -7
- package/dist/{index-a1295271.js → index-0tqhr9zs.js} +5 -5
- package/dist/{index-xw608ytx.js → index-3cgh0ght.js} +1 -1
- package/dist/{index-hmrkgd4v.js → index-634cww4x.js} +7 -7
- package/dist/{index-h1xvt8fw.js → index-63kp05sy.js} +1 -1
- package/dist/{index-k86ec4j2.js → index-6hjbeeth.js} +4 -4
- package/dist/{index-04zhtsb1.js → index-e6s2jpr8.js} +1 -1
- package/dist/{index-db1art1p.js → index-esym6cw4.js} +1 -1
- package/dist/{index-tyjx0dwz.js → index-jjy4shhy.js} +1 -1
- package/dist/{index-8hhmv0ff.js → index-kjhgxkdx.js} +1 -1
- package/dist/{index-z1mj8fv5.js → index-mhdavdd4.js} +22 -17
- package/dist/{index-5wbqmvg8.js → index-n3tebmah.js} +25 -18
- package/dist/{index-0wj3jr8n.js → index-qjcye18f.js} +3 -3
- package/dist/{index-9eqt7755.js → index-rakm1eay.js} +2 -2
- package/dist/{index-w6kcwhhj.js → index-rjxg7a7m.js} +212 -4
- package/dist/{index-vxsxz3sp.js → index-txthzqrm.js} +286 -36
- package/dist/{index-em72jhc0.js → index-z1hc2g06.js} +1 -1
- package/dist/{index-kjdys7e2.js → index-zg5r2syy.js} +1 -1
- package/dist/{index-xbna9akt.js → index-zyb7tndy.js} +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +138 -26
- package/dist/{message-index-bounded-6y7p974x.js → message-index-bounded-289186ah.js} +3 -3
- package/dist/migration-worker.js +1 -1
- package/dist/plugin/messages-transform.d.ts +1 -0
- package/dist/plugin/messages-transform.d.ts.map +1 -1
- package/dist/plugin/provider-refusal-v1.d.ts +15 -0
- package/dist/plugin/provider-refusal-v1.d.ts.map +1 -0
- package/dist/{project-embedding-registry-5rp9w92w.js → project-embedding-registry-xy8dcdys.js} +1 -1
- package/dist/raw-ordinal-warmup-worker.js +4 -4
- package/dist/{read-session-chunk-9ejnbe07.js → read-session-chunk-frnwxnjg.js} +2 -2
- package/dist/{recomp-orchestrator-kmkf8dm4.js → recomp-orchestrator-e7n124g0.js} +10 -10
- package/dist/{render-9712q3gp.js → render-argap54x.js} +6 -6
- package/dist/{search-archive-5jr011gc.js → search-archive-ads5mh9s.js} +5 -5
- package/dist/{search-kd84wg76.js → search-fxtb4844.js} +9 -9
- package/dist/shared/transcript.d.ts +1 -1
- package/dist/shared/transcript.d.ts.map +1 -1
- package/dist/{storage-tags-vd3sgd4s.js → storage-tags-2d2ba8e9.js} +1 -1
- package/dist/{transform-postprocess-phase-n4q1yd72.js → transform-postprocess-phase-2y0st4gk.js} +11 -11
- package/dist/v2/auto-search-worker.js +3 -3
- package/dist/v2/chunk-embedding-write-worker.js +1 -1
- package/dist/v2/{context-fqeg60th.js → context-v56v40cx.js} +600 -87
- package/dist/v2/{embedding-backfill-dm33f3ce.js → embedding-backfill-nhgp8znm.js} +2 -2
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/http-refusal-count.d.ts +41 -0
- package/dist/v2/hooks/http-refusal-count.d.ts.map +1 -0
- package/dist/v2/hooks/overflow-recovery.d.ts +3 -0
- package/dist/v2/hooks/overflow-recovery.d.ts.map +1 -1
- package/dist/v2/hooks/types.d.ts +5 -0
- package/dist/v2/hooks/types.d.ts.map +1 -1
- package/dist/v2/{message-index-bounded-wj5rs9az.js → message-index-bounded-p69v4wpy.js} +3 -3
- package/dist/v2/migration-worker.js +1 -1
- package/dist/v2/{project-embedding-registry-z9qxkdxm.js → project-embedding-registry-qz9x79kn.js} +1 -1
- package/dist/v2/raw-ordinal-warmup-worker.js +4 -4
- package/dist/v2/{read-session-chunk-89ep8br4.js → read-session-chunk-qzw3vedr.js} +2 -2
- package/dist/v2/{recomp-orchestrator-79362xbm.js → recomp-orchestrator-5gkzamy2.js} +9 -9
- package/dist/v2/{render-bzzypsgy.js → render-atxj9eaf.js} +6 -6
- package/dist/v2/{search-4f6kmq31.js → search-51qr14ed.js} +8 -8
- package/dist/v2/{search-archive-4yr4hw2m.js → search-archive-vgwnvdx2.js} +5 -5
- package/dist/v2/{server-1bks09js.js → server-08jh9wew.js} +3 -3
- package/dist/v2/{server-b38pxt0e.js → server-2ek9exbe.js} +1 -1
- package/dist/v2/{server-8xgs110k.js → server-606mnrv4.js} +212 -4
- package/dist/v2/{server-md1cabvq.js → server-7wpw3wc6.js} +22 -17
- package/dist/v2/{server-zedjjdc5.js → server-8vby30m5.js} +1 -1
- package/dist/v2/{server-7861dnm3.js → server-awth2wsg.js} +1 -1
- package/dist/v2/{server-62t1852h.js → server-b25nvm9c.js} +1 -1
- package/dist/v2/{server-4ccgfzr2.js → server-bhr92yb4.js} +1 -1
- package/dist/v2/{server-6mq43ear.js → server-c1vcbszm.js} +1 -1
- package/dist/v2/{server-70dhx58s.js → server-d2a639dg.js} +6 -6
- package/dist/v2/{server-e8ybwfv8.js → server-p2wxmjc3.js} +2 -2
- package/dist/v2/{server-tk4hpcxq.js → server-rwdp3hw6.js} +7 -7
- package/dist/v2/{server-h95cdc30.js → server-s3m2y97h.js} +1 -1
- package/dist/v2/{server-d0h1gjz2.js → server-wdmcqhv6.js} +3 -3
- package/dist/v2/server.js +2 -2
- package/dist/v2/{storage-tags-8kktww54.js → storage-tags-4t9fb4ch.js} +1 -1
- package/dist/v2/{v2-archive-reader-veyqp15a.js → v2-archive-reader-1wc5wb1a.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-97s5wznb.js → wrapup-orchestrator-ksdn2emb.js} +9 -9
- package/dist/{v2-archive-reader-3s332fn7.js → v2-archive-reader-4pk46nc1.js} +1 -1
- package/dist/{wrapup-orchestrator-bm0x49e5.js → wrapup-orchestrator-sc2fsfct.js} +11 -11
- package/package.json +1 -1
- package/src/shared/tag-transcript.ts +5 -4
- package/src/shared/transcript.ts +1 -1
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
enqueueShadowEmbeddingItems2,
|
|
40
40
|
getProjectEmbeddingSnapshot2,
|
|
41
41
|
embedItemsForProject2
|
|
42
|
-
} from "./index-
|
|
42
|
+
} from "./index-mhdavdd4.js";
|
|
43
43
|
import {
|
|
44
44
|
recordEmbeddingMeasurement
|
|
45
45
|
} from "./index-2amn2s73.js";
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
sanitizeFtsQuery,
|
|
56
56
|
searchMemoriesFTS,
|
|
57
57
|
searchMemoriesFTSUnion
|
|
58
|
-
} from "./index-
|
|
58
|
+
} from "./index-esym6cw4.js";
|
|
59
59
|
import {
|
|
60
60
|
ModuleMemoryAuthorityError2,
|
|
61
61
|
getMemoriesByProject2,
|
|
@@ -65,25 +65,25 @@ import {
|
|
|
65
65
|
import {
|
|
66
66
|
matchedSearchSnippet,
|
|
67
67
|
getIndexedMessageCorpusSize
|
|
68
|
-
} from "./index-
|
|
68
|
+
} from "./index-jjy4shhy.js";
|
|
69
69
|
import {
|
|
70
70
|
getMessageIndexEpoch,
|
|
71
71
|
isMessageIndexSearchable,
|
|
72
72
|
withMemoryHintContent,
|
|
73
73
|
autoSearchRelevance,
|
|
74
74
|
recordAutoSearchLane
|
|
75
|
-
} from "./index-
|
|
75
|
+
} from "./index-63kp05sy.js";
|
|
76
76
|
import {
|
|
77
77
|
ensureMemoryEmbeddings2
|
|
78
|
-
} from "./index-
|
|
78
|
+
} from "./index-e6s2jpr8.js";
|
|
79
79
|
import {
|
|
80
80
|
MESSAGE_FTS_SESSION_FILTER_SQL,
|
|
81
81
|
withMessageFtsSessionFilter,
|
|
82
82
|
messageTextVisibleInRequestSql
|
|
83
|
-
} from "./index-
|
|
83
|
+
} from "./index-zg5r2syy.js";
|
|
84
84
|
import {
|
|
85
85
|
isRecord
|
|
86
|
-
} from "./index-
|
|
86
|
+
} from "./index-rjxg7a7m.js";
|
|
87
87
|
import {
|
|
88
88
|
resolveWorkspaceShareCategories,
|
|
89
89
|
resolveWorkspaceIdentitySet,
|
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
} from "./index-34xvre52.js";
|
|
4
4
|
import {
|
|
5
5
|
clearEmergencyRecovery
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-rjxg7a7m.js";
|
|
7
7
|
import {
|
|
8
8
|
requestPendingMaterialization,
|
|
9
9
|
dropSlot
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-z1hc2g06.js";
|
|
11
11
|
import {
|
|
12
12
|
pausedRecompReason,
|
|
13
13
|
executeContextRecomp
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-0eyxarpb.js";
|
|
15
15
|
import {
|
|
16
16
|
renderUserFacingFailure,
|
|
17
17
|
userFacingFailureCode
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-esym6cw4.js";
|
|
19
19
|
|
|
20
20
|
// src/hooks/magic-context/recomp-orchestrator.ts
|
|
21
21
|
function resolveLiveModelKey(liveSessionState, sessionId) {
|
|
@@ -122,6 +122,27 @@ async function withQueryEmbeddingDeadline(embed, signal) {
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
// src/features/magic-context/memory/embedding-response-slots.ts
|
|
126
|
+
var INVALID_EMBEDDING_INDEX_MESSAGE = "response data[].index values were missing, duplicated or out of range";
|
|
127
|
+
function responseSlots(items, inputCount) {
|
|
128
|
+
if (items.every((item) => item?.index === undefined)) {
|
|
129
|
+
return items.map((_, position) => position);
|
|
130
|
+
}
|
|
131
|
+
const slots = [];
|
|
132
|
+
const seen = new Set;
|
|
133
|
+
for (const item of items) {
|
|
134
|
+
if (!item || typeof item !== "object")
|
|
135
|
+
return null;
|
|
136
|
+
const index = item.index === undefined ? 0 : item.index;
|
|
137
|
+
if (typeof index !== "number" || !Number.isInteger(index) || index < 0 || index >= inputCount || seen.has(index)) {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
seen.add(index);
|
|
141
|
+
slots.push(index);
|
|
142
|
+
}
|
|
143
|
+
return slots;
|
|
144
|
+
}
|
|
145
|
+
|
|
125
146
|
// src/features/magic-context/memory/embedding-ssrf.ts
|
|
126
147
|
var METADATA_HOSTNAMES = new Set(["metadata.google.internal", "metadata.goog"]);
|
|
127
148
|
var IPV6_METADATA_HOSTS = new Set(["fd00:ec2::254"]);
|
|
@@ -176,22 +197,6 @@ function blockedEmbeddingEndpointReason(endpoint) {
|
|
|
176
197
|
}
|
|
177
198
|
|
|
178
199
|
// src/features/magic-context/memory/embedding-openai.ts
|
|
179
|
-
function responseSlots(items, inputCount) {
|
|
180
|
-
if (items.every((item) => item?.index === undefined)) {
|
|
181
|
-
return items.map((_, position) => position);
|
|
182
|
-
}
|
|
183
|
-
const slots = [];
|
|
184
|
-
const seen = new Set;
|
|
185
|
-
for (const item of items) {
|
|
186
|
-
const index = item?.index;
|
|
187
|
-
if (typeof index !== "number" || !Number.isInteger(index) || index < 0 || index >= inputCount || seen.has(index)) {
|
|
188
|
-
return null;
|
|
189
|
-
}
|
|
190
|
-
seen.add(index);
|
|
191
|
-
slots.push(index);
|
|
192
|
-
}
|
|
193
|
-
return slots;
|
|
194
|
-
}
|
|
195
200
|
function capEmbeddingInput(input, maxInputTokens, purpose) {
|
|
196
201
|
const ratio = purpose === "query" ? CHUNK_WINDOW_SAFETY_RATIO2 : 1;
|
|
197
202
|
const budget = Math.max(1, Math.floor(maxInputTokens * ratio));
|
|
@@ -488,7 +493,7 @@ class OpenAICompatibleEmbeddingProvider {
|
|
|
488
493
|
}
|
|
489
494
|
const slots = responseSlots(body.data, texts.length);
|
|
490
495
|
if (!slots) {
|
|
491
|
-
const failure = this.failure("invalid_envelope",
|
|
496
|
+
const failure = this.failure("invalid_envelope", INVALID_EMBEDDING_INDEX_MESSAGE, false);
|
|
492
497
|
log2(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
|
|
493
498
|
this.recordFailure(requestStartedAt, isProbe, failure);
|
|
494
499
|
return Array.from({ length: texts.length }, () => null);
|
|
@@ -118,6 +118,7 @@ import {
|
|
|
118
118
|
openCode2ThinkingPayload,
|
|
119
119
|
estimateEmergencyDropReclaimTokens,
|
|
120
120
|
planEmergencyDrop,
|
|
121
|
+
tagsInEmergencyDropOrder,
|
|
121
122
|
measureEmergencyTag,
|
|
122
123
|
snapshotEmergencyServedMass,
|
|
123
124
|
tagsSinceReading,
|
|
@@ -164,7 +165,7 @@ import {
|
|
|
164
165
|
adoptNullOwnerToolTag2,
|
|
165
166
|
getCandidateToolOwners2,
|
|
166
167
|
pickNearestPriorOwner2
|
|
167
|
-
} from "./index-
|
|
168
|
+
} from "./index-rjxg7a7m.js";
|
|
168
169
|
import {
|
|
169
170
|
getHarness2
|
|
170
171
|
} from "./index-pavzsdc6.js";
|
|
@@ -218,11 +219,11 @@ import {
|
|
|
218
219
|
saveSourceContent,
|
|
219
220
|
replaceSourceContent,
|
|
220
221
|
getSourceContents
|
|
221
|
-
} from "./index-
|
|
222
|
+
} from "./index-z1hc2g06.js";
|
|
222
223
|
import {
|
|
223
224
|
cleanSearchText,
|
|
224
225
|
matchedSearchSnippet
|
|
225
|
-
} from "./index-
|
|
226
|
+
} from "./index-jjy4shhy.js";
|
|
226
227
|
import {
|
|
227
228
|
BoundedSessionMap,
|
|
228
229
|
tagRevisionKey,
|
|
@@ -255,7 +256,7 @@ import {
|
|
|
255
256
|
extractToolCallObservation,
|
|
256
257
|
ToolMutationBatch,
|
|
257
258
|
createToolDropTarget
|
|
258
|
-
} from "./index-
|
|
259
|
+
} from "./index-kjhgxkdx.js";
|
|
259
260
|
import {
|
|
260
261
|
hasTrustedAbsoluteWall,
|
|
261
262
|
applyProvenInputFloor,
|
|
@@ -267,18 +268,18 @@ import {
|
|
|
267
268
|
getProjectEmbeddingSnapshot2,
|
|
268
269
|
embedTextForProject2,
|
|
269
270
|
embedBatchForProject2
|
|
270
|
-
} from "./index-
|
|
271
|
+
} from "./index-mhdavdd4.js";
|
|
271
272
|
import {
|
|
272
273
|
isEmbeddingHostBusy2
|
|
273
274
|
} from "./index-qt1qqasc.js";
|
|
274
275
|
import {
|
|
275
276
|
userFacingFailureCode
|
|
276
|
-
} from "./index-
|
|
277
|
+
} from "./index-esym6cw4.js";
|
|
277
278
|
import {
|
|
278
279
|
getMessageIndexEpoch,
|
|
279
280
|
isMessageIndexSearchable,
|
|
280
281
|
createAutoSearchDiagnostics
|
|
281
|
-
} from "./index-
|
|
282
|
+
} from "./index-63kp05sy.js";
|
|
282
283
|
import {
|
|
283
284
|
compareOpenCodeMessagesByCanonicalOrder,
|
|
284
285
|
startCompactionMarkerCandidatePreparation,
|
|
@@ -300,7 +301,7 @@ import {
|
|
|
300
301
|
peekNoteNudgeText,
|
|
301
302
|
markNoteNudgeDelivered,
|
|
302
303
|
getActiveCompartmentRun
|
|
303
|
-
} from "./index-
|
|
304
|
+
} from "./index-0eyxarpb.js";
|
|
304
305
|
import {
|
|
305
306
|
canonicalModelIdentity,
|
|
306
307
|
piModelRefToCanonical,
|
|
@@ -5067,7 +5068,7 @@ function applyPendingOperations(sessionId, db, targets, protectedTagIds, preload
|
|
|
5067
5068
|
}
|
|
5068
5069
|
return didMutateMessage;
|
|
5069
5070
|
}
|
|
5070
|
-
function applyFlushedStatuses(sessionId, db, targets, preloadedTags) {
|
|
5071
|
+
function applyFlushedStatuses(sessionId, db, targets, preloadedTags, keepRealArgumentsFor) {
|
|
5071
5072
|
let didMutateMessage = false;
|
|
5072
5073
|
const tags = preloadedTags ?? getDroppedTagsByNumbers2(db, sessionId, [...targets.keys()]);
|
|
5073
5074
|
for (const tag of tags) {
|
|
@@ -5098,7 +5099,7 @@ function applyFlushedStatuses(sessionId, db, targets, preloadedTags) {
|
|
|
5098
5099
|
didMutateMessage = true;
|
|
5099
5100
|
}
|
|
5100
5101
|
} else {
|
|
5101
|
-
const dropResult = target?.drop?.() ?? "absent";
|
|
5102
|
+
const dropResult = target?.drop?.(keepRealArgumentsFor?.has(tag.tagNumber)) ?? "absent";
|
|
5102
5103
|
if (dropResult === "removed" || dropResult === "truncated") {
|
|
5103
5104
|
didMutateMessage = true;
|
|
5104
5105
|
}
|
|
@@ -5349,14 +5350,12 @@ function applyHeuristicCleanup(sessionId, db, targets, messageTagNumbers, config
|
|
|
5349
5350
|
priorInputSample,
|
|
5350
5351
|
hasPriorDrop: priorInputSample > 0,
|
|
5351
5352
|
passAlreadyPriced: emergency.passAlreadyPriced === true,
|
|
5352
|
-
protectedToolTags: protectedTools
|
|
5353
|
+
protectedToolTags: protectedTools,
|
|
5354
|
+
...emergency.refusedInputTokens === undefined ? {} : { refusedInputTokens: emergency.refusedInputTokens }
|
|
5353
5355
|
});
|
|
5354
5356
|
if (plan.shouldDrop) {
|
|
5355
|
-
const toDrop = new Set(plan.tagNumbers);
|
|
5356
5357
|
const newestEmergencyTags = recentTags;
|
|
5357
|
-
for (const tag of tags) {
|
|
5358
|
-
if (!toDrop.has(tag.tagNumber))
|
|
5359
|
-
continue;
|
|
5358
|
+
for (const tag of tagsInEmergencyDropOrder(tags, plan)) {
|
|
5360
5359
|
if (tag.status !== "active" || tag.type !== "tool")
|
|
5361
5360
|
continue;
|
|
5362
5361
|
const target = targets.get(tag.tagNumber);
|
|
@@ -7524,7 +7523,7 @@ async function runPostTransformPhase2(args) {
|
|
|
7524
7523
|
let isExplicitFlush = pendingMaterializationAtPassStart;
|
|
7525
7524
|
const deferredMaterializationWasPending = deferredMaterializationAtPassStart;
|
|
7526
7525
|
const alreadyRanThisTurn = heuristicsAlreadyRanThisTurn(args.lastHeuristicsTurnId, args.sessionId, args.currentTurnId);
|
|
7527
|
-
const
|
|
7526
|
+
const readingBands = pressureBands({
|
|
7528
7527
|
percentage: args.contextUsage.percentage,
|
|
7529
7528
|
fromEstimate: args.contextUsageFromEstimate === true,
|
|
7530
7529
|
forceMaterializationPercentage: args.forceMaterializationPercentage,
|
|
@@ -7532,6 +7531,13 @@ async function runPostTransformPhase2(args) {
|
|
|
7532
7531
|
fullFeatureMode: args.fullFeatureMode,
|
|
7533
7532
|
schedulerDecision: args.schedulerDecision
|
|
7534
7533
|
});
|
|
7534
|
+
const measuredSizeRefusal = !compactionOff && args.refusedInputTokens !== undefined;
|
|
7535
|
+
const bands = measuredSizeRefusal && !readingBands.forceBandConfirmed ? {
|
|
7536
|
+
...readingBands,
|
|
7537
|
+
emergencyDropEligible: true,
|
|
7538
|
+
forceBandConfirmed: true,
|
|
7539
|
+
executePressureEligible: true
|
|
7540
|
+
} : readingBands;
|
|
7535
7541
|
const {
|
|
7536
7542
|
forceMaterialization,
|
|
7537
7543
|
emergencyDropEligible,
|
|
@@ -7815,7 +7821,7 @@ async function runPostTransformPhase2(args) {
|
|
|
7815
7821
|
executeReclaim: false,
|
|
7816
7822
|
subagentExecute: !args.fullFeatureMode && args.schedulerDecision === "execute",
|
|
7817
7823
|
hardFold: rewritingSignedPrefix || foldBustsServedPrefixThisPass || firstRenderBust || hostCheckpointRide,
|
|
7818
|
-
force: forceRide({
|
|
7824
|
+
force: measuredSizeRefusal || forceRide({
|
|
7819
7825
|
bands,
|
|
7820
7826
|
percentage: args.contextUsage.percentage,
|
|
7821
7827
|
fromEstimate: args.contextUsageFromEstimate === true,
|
|
@@ -8137,7 +8143,8 @@ async function runPostTransformPhase2(args) {
|
|
|
8137
8143
|
usagePercentage: args.contextUsage.percentage,
|
|
8138
8144
|
passAlreadyPriced: emergencyRewriteAlreadyPriced,
|
|
8139
8145
|
servedBeforePass: servedBeforeRemovals,
|
|
8140
|
-
sinceReading: tagsNewerThanReading
|
|
8146
|
+
sinceReading: tagsNewerThanReading,
|
|
8147
|
+
...args.refusedInputTokens === undefined ? {} : { refusedInputTokens: args.refusedInputTokens }
|
|
8141
8148
|
} : undefined,
|
|
8142
8149
|
routine: routineCleanupApplied,
|
|
8143
8150
|
caveman: cavemanConfig
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
withMessageFtsSessionFilter,
|
|
3
3
|
liveTailRangeTouchesUnresolvedCoverage,
|
|
4
4
|
rangeHasHiddenMessages
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-zg5r2syy.js";
|
|
6
6
|
import {
|
|
7
7
|
getSqliteDatabasePath2
|
|
8
8
|
} from "./index-gzy5w8ya.js";
|
|
@@ -21,10 +21,10 @@ import {
|
|
|
21
21
|
rawMessageWorkerSource2,
|
|
22
22
|
rawMessageOffThreadRangeReader2,
|
|
23
23
|
readRawSessionMessageIdOrdinalsForRange2
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-kjhgxkdx.js";
|
|
25
25
|
import {
|
|
26
26
|
readV2ArchiveOffThread2
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-zyb7tndy.js";
|
|
28
28
|
|
|
29
29
|
// src/tools/ctx-expand/search-archive.ts
|
|
30
30
|
var archiveReadsOnThisThread = 0;
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
} from "./index-2m3t73wk.js";
|
|
4
4
|
import {
|
|
5
5
|
getTagById2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-rjxg7a7m.js";
|
|
7
7
|
import {
|
|
8
8
|
expandToolPart,
|
|
9
9
|
visitRawSessionMessages2,
|
|
10
10
|
readRawSessionMessageById2
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-kjhgxkdx.js";
|
|
12
12
|
|
|
13
13
|
// src/tools/ctx-expand/render.ts
|
|
14
14
|
import { createHash } from "node:crypto";
|