@cortexkit/opencode-magic-context 0.49.67 → 0.49.69
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 +1 -1
- package/dist/chunk-embedding-write-worker.js +1 -1
- package/dist/{context-1acz1d4x.js → context-rcts8w54.js} +15 -15
- package/dist/hooks/magic-context/final-wire-completeness.d.ts.map +1 -1
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -1
- package/dist/hooks/magic-context/image-token-estimate.d.ts +2 -0
- package/dist/hooks/magic-context/image-token-estimate.d.ts.map +1 -1
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts +13 -0
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts.map +1 -1
- package/dist/{index-nfvyraa3.js → index-0dbc9rxd.js} +4 -4
- package/dist/{index-m6cv2hv3.js → index-51anehwt.js} +3 -3
- package/dist/{index-2x46rnct.js → index-5hc4kjg0.js} +1 -1
- package/dist/{index-2t9e10mt.js → index-95475ngp.js} +15 -15
- package/dist/{index-8a1m48va.js → index-cdyhpdqx.js} +3 -3
- package/dist/{index-fybdhbd4.js → index-d0mb17q4.js} +2 -2
- package/dist/{index-g53qhdrb.js → index-fcrp1k8s.js} +1 -1
- package/dist/{index-q73yeb83.js → index-fm0bpxc6.js} +1 -1
- package/dist/{index-m47yte97.js → index-gvnt9yka.js} +5 -5
- package/dist/{index-gy33sq5h.js → index-mejvnav7.js} +6 -6
- package/dist/{index-3v5mfapn.js → index-mey1nc1v.js} +1 -1
- package/dist/{index-t20q6aj6.js → index-mxjdj2cz.js} +61 -6
- package/dist/{index-xmk2a6pq.js → index-n19pqsnh.js} +2 -2
- package/dist/{index-w6fh4v87.js → index-ng6gfs0y.js} +6 -3
- package/dist/{index-z10dryn5.js → index-rzxzap49.js} +5 -5
- package/dist/{index-ngrrs3yb.js → index-y664y8kq.js} +1 -1
- package/dist/index.js +18 -18
- package/dist/{message-index-bounded-f27039js.js → message-index-bounded-n2j33x8n.js} +3 -3
- package/dist/migration-worker.js +1 -1
- package/dist/raw-ordinal-warmup-worker.js +4 -4
- package/dist/{read-session-chunk-4ma2vsva.js → read-session-chunk-6kdtfa7k.js} +2 -2
- package/dist/{recomp-orchestrator-p9c4jg9m.js → recomp-orchestrator-t9670x13.js} +7 -7
- package/dist/{render-h16ea0th.js → render-re3akx9j.js} +6 -6
- package/dist/{search-archive-km2ahm3e.js → search-archive-0q8rdnrd.js} +4 -4
- package/dist/{search-m9rpnh7m.js → search-rppmngr5.js} +5 -5
- package/dist/{storage-tags-ktp70q1e.js → storage-tags-rptkad9p.js} +1 -1
- package/dist/{store-h20ny8b8.js → store-h2a1g3wh.js} +1 -1
- package/dist/{transform-postprocess-phase-120s1ep8.js → transform-postprocess-phase-qtd2wr52.js} +8 -8
- package/dist/v2/auto-search-worker.js +1 -1
- package/dist/v2/chunk-embedding-write-worker.js +1 -1
- package/dist/v2/{context-p0z7mrsf.js → context-wv122q62.js} +13 -13
- package/dist/v2/fold/restore.d.ts.map +1 -1
- package/dist/v2/{message-index-bounded-td516y9c.js → message-index-bounded-hfnsznj0.js} +3 -3
- package/dist/v2/migration-worker.js +1 -1
- package/dist/v2/raw-ordinal-warmup-worker.js +4 -4
- package/dist/v2/{read-session-chunk-6dz32wmh.js → read-session-chunk-qzd376gb.js} +2 -2
- package/dist/v2/{recomp-orchestrator-ayy7xzm3.js → recomp-orchestrator-rrsbcsmc.js} +6 -6
- package/dist/v2/{render-gqp4fwqn.js → render-qwy9ydnb.js} +6 -6
- package/dist/v2/{search-archive-qn82j8k0.js → search-archive-gewpafej.js} +4 -4
- package/dist/v2/{search-dhekqtfc.js → search-q3xcyyq8.js} +4 -4
- package/dist/v2/{server-q8ta10e5.js → server-07z334y6.js} +1 -1
- package/dist/v2/{server-77207nf4.js → server-0c7egkzr.js} +2 -2
- package/dist/v2/{server-5zzt9rah.js → server-474m6n9v.js} +6 -3
- package/dist/v2/{server-s1a0bwpc.js → server-axmk8rr2.js} +1 -1
- package/dist/v2/{server-34vhmd1d.js → server-fczyr89c.js} +2 -2
- package/dist/v2/{server-xwcg55a8.js → server-h8y2948e.js} +4 -4
- package/dist/v2/{server-jew1m85s.js → server-nc4qrjde.js} +1 -1
- package/dist/v2/{server-n6hdj0fn.js → server-ssdfdrpv.js} +5 -5
- package/dist/v2/{server-verzg5w8.js → server-vqkqv7ze.js} +61 -6
- package/dist/v2/{server-166m5nrw.js → server-vzrj39bj.js} +1 -1
- package/dist/v2/{server-s66wvkpf.js → server-xxy28mq5.js} +2 -2
- package/dist/v2/server.js +2 -2
- package/dist/v2/{storage-tags-qe8r1n9w.js → storage-tags-msa1qvk8.js} +1 -1
- package/dist/v2/{store-skkhh3rd.js → store-4se2a0n0.js} +1 -1
- package/dist/v2/{v2-archive-reader-tbjwxvc5.js → v2-archive-reader-nwaw9qph.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-ksdzyfby.js → wrapup-orchestrator-xyd3r2t1.js} +6 -6
- package/dist/{v2-archive-reader-j16k987e.js → v2-archive-reader-dv00gb2a.js} +1 -1
- package/dist/{wrapup-orchestrator-w09bkgmk.js → wrapup-orchestrator-fzygp85w.js} +8 -8
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ serveWorkerJobs(async (initial, port) => {
|
|
|
31
31
|
import("./embedding-cache-mgyr73ef.js"),
|
|
32
32
|
import("./storage-memory-e6a7mb0k.js"),
|
|
33
33
|
import("./project-embedding-registry-c2sfnamh.js"),
|
|
34
|
-
import("./search-
|
|
34
|
+
import("./search-rppmngr5.js"),
|
|
35
35
|
import("./compartment-chunk-embedding-ymc9mtwv.js"),
|
|
36
36
|
import("./embedding-activity-g1dhes6g.js"),
|
|
37
37
|
import("./harness-e4avh192.js"),
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
rebaseSessionCoordinatesAsync,
|
|
39
39
|
resolveOpenCodeProtectedTailBoundary,
|
|
40
40
|
getActiveCompartmentRun
|
|
41
|
-
} from "./index-
|
|
41
|
+
} from "./index-gvnt9yka.js";
|
|
42
42
|
import"./index-sd3egckz.js";
|
|
43
43
|
import {
|
|
44
44
|
getHarness2
|
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
applyJsonSchemaParameterDescriptions,
|
|
131
131
|
MagicContextRpcServer,
|
|
132
132
|
subagentTemperature
|
|
133
|
-
} from "./index-
|
|
133
|
+
} from "./index-95475ngp.js";
|
|
134
134
|
import {
|
|
135
135
|
resolveHistorianModel2
|
|
136
136
|
} from "./index-5kym00ag.js";
|
|
@@ -187,7 +187,7 @@ import {
|
|
|
187
187
|
markServedShapeRepair,
|
|
188
188
|
getEmptyImageParts,
|
|
189
189
|
estimateFinalWireInputTokens
|
|
190
|
-
} from "./index-
|
|
190
|
+
} from "./index-mxjdj2cz.js";
|
|
191
191
|
import {
|
|
192
192
|
hasMeaningfulUserText2,
|
|
193
193
|
preloadTokenizer,
|
|
@@ -213,12 +213,12 @@ import {
|
|
|
213
213
|
cleanUserText2,
|
|
214
214
|
readRawSessionMessageIdOrdinalsForRange2,
|
|
215
215
|
readRawSessionMessageOrdinalById2
|
|
216
|
-
} from "./index-
|
|
217
|
-
import"./index-
|
|
216
|
+
} from "./index-fm0bpxc6.js";
|
|
217
|
+
import"./index-5hc4kjg0.js";
|
|
218
218
|
import"./index-s32f8y67.js";
|
|
219
219
|
import {
|
|
220
220
|
scheduleClearAndReindex
|
|
221
|
-
} from "./index-
|
|
221
|
+
} from "./index-mey1nc1v.js";
|
|
222
222
|
import {
|
|
223
223
|
invalidateAutoEmbedSession,
|
|
224
224
|
clearEmbedSessionState
|
|
@@ -262,7 +262,7 @@ import {
|
|
|
262
262
|
getSlot,
|
|
263
263
|
dropSlot,
|
|
264
264
|
copySessionStateForClone
|
|
265
|
-
} from "./index-
|
|
265
|
+
} from "./index-y664y8kq.js";
|
|
266
266
|
import {
|
|
267
267
|
startBootDeadline,
|
|
268
268
|
BOOT_SQLITE_BUSY_TIMEOUT_MS,
|
|
@@ -270,7 +270,7 @@ import {
|
|
|
270
270
|
openDatabaseAsync,
|
|
271
271
|
isDatabasePersisted,
|
|
272
272
|
getDatabasePersistenceError
|
|
273
|
-
} from "./index-
|
|
273
|
+
} from "./index-fcrp1k8s.js";
|
|
274
274
|
import"./index-fr0wbhdn.js";
|
|
275
275
|
import"./index-xx05vta0.js";
|
|
276
276
|
import {
|
|
@@ -293,7 +293,7 @@ import {
|
|
|
293
293
|
servedHeadChanged,
|
|
294
294
|
noteHostCheckpointCommit,
|
|
295
295
|
isSyntheticHeadMessage2
|
|
296
|
-
} from "./index-
|
|
296
|
+
} from "./index-mejvnav7.js";
|
|
297
297
|
import"./index-832w615x.js";
|
|
298
298
|
import"./index-qt1qqasc.js";
|
|
299
299
|
import {
|
|
@@ -314,8 +314,8 @@ import {
|
|
|
314
314
|
} from "./index-x8a7jmkh.js";
|
|
315
315
|
import"./index-e6ncz7a6.js";
|
|
316
316
|
import"./index-1sq1krqw.js";
|
|
317
|
-
import"./index-
|
|
318
|
-
import"./index-
|
|
317
|
+
import"./index-51anehwt.js";
|
|
318
|
+
import"./index-cdyhpdqx.js";
|
|
319
319
|
import"./index-98qy103c.js";
|
|
320
320
|
import {
|
|
321
321
|
detectConflicts
|
|
@@ -336,12 +336,12 @@ import {
|
|
|
336
336
|
readV2RawMessagePagesForConversion2,
|
|
337
337
|
createV2RawMessageReader2,
|
|
338
338
|
createV2RawMessageProvider2
|
|
339
|
-
} from "./index-
|
|
339
|
+
} from "./index-ng6gfs0y.js";
|
|
340
340
|
import"./index-fmsr7v69.js";
|
|
341
|
-
import"./index-
|
|
341
|
+
import"./index-n19pqsnh.js";
|
|
342
342
|
import"./index-52x68mj4.js";
|
|
343
|
-
import"./index-
|
|
344
|
-
import"./index-
|
|
343
|
+
import"./index-0dbc9rxd.js";
|
|
344
|
+
import"./index-d0mb17q4.js";
|
|
345
345
|
import {
|
|
346
346
|
isDreamerRunnable,
|
|
347
347
|
isSmartNoteSurfaceAvailable,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"final-wire-completeness.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/final-wire-completeness.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"final-wire-completeness.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/final-wire-completeness.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,8EAA8E;AAC9E,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,EAAE,CAgEhE;AAMD,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE;;;;;;IAkBnE;AAED,sFAAsF;AACtF,wBAAgB,+BAA+B,CAAC,SAAS,EAAE,MAAM,IAErD,UAAU;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,EAAE,UAAU,SAAS,WAAW,EAAE,KAAG,IAAI,CAQ9F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"final-wire-token-estimate.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/final-wire-token-estimate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"final-wire-token-estimate.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/final-wire-token-estimate.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,MAAM,WAAW,oBAAoB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CACpB;AAwBD,oFAAoF;AACpF,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,CAS9E;AAiBD,kGAAkG;AAClG,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAiB5D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,C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AAO,EAAE,OAAO,CAAC;IACjB;sCACkC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,YAAY,GAAG,iBAAiB,GAAG,YAAY,CAAC;IAC/D,aAAa,EAAE,oBAAoB,CAAC;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC;;;;;OAKG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACjE;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACtC,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;;;GAIG;AACH;;8EAE8E;AAC9E,wBAAgB,8BAA8B,CAC1C,KAAK,EAAE,2BAA2B,EAClC,KAAK,CAAC,EAAE,MAAM,GACf,sBAAsB,CAsDxB;AAED,wBAAgB,4BAA4B,CACxC,KAAK,EAAE,2BAA2B,GACnC,sBAAsB,CAyHxB;AAaD,oFAAoF;AACpF,wBAAgB,0BAA0B,CACtC,KAAK,EAAE,IAAI,CAAC,2BAA2B,EAAE,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC,GAChF,sBAAsB,CA0BxB"}
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Returns a conservative fallback when parsing fails.
|
|
4
4
|
*/
|
|
5
5
|
export declare function estimateImageTokensFromDataUrl(url: string): number;
|
|
6
|
+
export declare function isInlineNativeMediaImage(part: Record<string, unknown>): boolean;
|
|
7
|
+
export declare function estimateNativeMediaImageTokens(part: Record<string, unknown>): number;
|
|
6
8
|
/**
|
|
7
9
|
* Image tokens of a tool part's `state.attachments`: the images a tool returned next to its
|
|
8
10
|
* text output (OpenCode's `read` on a PNG, for example). The provider bills each one as an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-token-estimate.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/image-token-estimate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image-token-estimate.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/image-token-estimate.ts"],"names":[],"mappings":"AAeA;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIlE;AAyDD,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAE/E;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAOpF;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAexE"}
|
|
@@ -94,6 +94,19 @@ export declare function isSyntheticMessage(message: MessageLike): boolean;
|
|
|
94
94
|
*/
|
|
95
95
|
export declare function countRealUserMessages(messages: readonly MessageLike[]): number;
|
|
96
96
|
export declare function stripChannel1ReminderSpans(output: string): string;
|
|
97
|
+
/**
|
|
98
|
+
* Tokens this part adds to the reclaimable share U. Prose (`text`) stays in the
|
|
99
|
+
* tail total T but never in U: U is tool output and files that are not yet
|
|
100
|
+
* reduced, as a share of the tail. Both TypeScript walks (OpenCode and Pi) use
|
|
101
|
+
* this one rule, so a full walk, a defer pass and the two hosts agree.
|
|
102
|
+
*/
|
|
103
|
+
export declare function reclaimableTailTokens(part: {
|
|
104
|
+
kind: TailHygienePartKind;
|
|
105
|
+
tokens: number;
|
|
106
|
+
tagStatus: TagEntry["status"] | null | undefined;
|
|
107
|
+
protected: boolean;
|
|
108
|
+
queuedForDrop: boolean;
|
|
109
|
+
}): number;
|
|
97
110
|
/**
|
|
98
111
|
* Capture a last-writer alarm, not a content hash. The legacy totalBytes field
|
|
99
112
|
* now sums string-leaf UTF-16 lengths and counts keys/array elements in one
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tail-hygiene-walk.d.ts","sourceRoot":"","sources":["../../../src/hooks/magic-context/tail-hygiene-walk.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAgBnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIlD,MAAM,WAAW,iBAAiB;IAC9B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,GAAG,MAAM,GAAG,UAAU,CAAC;AAE5F,MAAM,WAAW,0BAA0B;IACvC,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,mBAAmB,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,QAAQ,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;IACrC,SAAS,EAAE,OAAO,CAAC;IACnB,oIAAoI;IACpI,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACnC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,gBAAgB,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,0BAA0B,EAAE,CAAC;IACpC,+FAA+F;IAC/F,sBAAsB,EAAE,MAAM,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GACpC,SAAS,GACT,KAAK,GACL,aAAa,GACb,MA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Reads2(port, openConnections) {
|
|
|
138
138
|
] = await Promise.all([
|
|
139
139
|
import("./sqlite-zdgm52sv.js"),
|
|
140
140
|
import("./store-reader-3eh1s1m8.js"),
|
|
141
|
-
import("./store-
|
|
142
|
-
import("./read-session-chunk-
|
|
143
|
-
import("./render-
|
|
144
|
-
import("./search-archive-
|
|
141
|
+
import("./store-h2a1g3wh.js"),
|
|
142
|
+
import("./read-session-chunk-6kdtfa7k.js"),
|
|
143
|
+
import("./render-re3akx9j.js"),
|
|
144
|
+
import("./search-archive-0q8rdnrd.js"),
|
|
145
145
|
import("./expand-attachments-h33jbgyz.js")
|
|
146
146
|
]);
|
|
147
147
|
const pool = new V2StoreReaderPool;
|
|
@@ -67,21 +67,21 @@ import {
|
|
|
67
67
|
import {
|
|
68
68
|
matchedSearchSnippet,
|
|
69
69
|
getIndexedMessageCorpusSize
|
|
70
|
-
} from "./index-
|
|
70
|
+
} from "./index-5hc4kjg0.js";
|
|
71
71
|
import {
|
|
72
72
|
getMessageIndexEpoch,
|
|
73
73
|
isMessageIndexSearchable,
|
|
74
74
|
withMemoryHintContent,
|
|
75
75
|
autoSearchRelevance,
|
|
76
76
|
recordAutoSearchLane
|
|
77
|
-
} from "./index-
|
|
77
|
+
} from "./index-mey1nc1v.js";
|
|
78
78
|
import {
|
|
79
79
|
MESSAGE_FTS_SESSION_FILTER_SQL,
|
|
80
80
|
withMessageFtsSessionFilter
|
|
81
81
|
} from "./index-52x68mj4.js";
|
|
82
82
|
import {
|
|
83
83
|
isRecord
|
|
84
|
-
} from "./index-
|
|
84
|
+
} from "./index-mxjdj2cz.js";
|
|
85
85
|
import {
|
|
86
86
|
resolveWorkspaceShareCategories,
|
|
87
87
|
resolveWorkspaceIdentitySet,
|
|
@@ -196,7 +196,7 @@ import {
|
|
|
196
196
|
snapRangeToCompartments,
|
|
197
197
|
getActiveCompartmentRun,
|
|
198
198
|
startCompartmentAgent
|
|
199
|
-
} from "./index-
|
|
199
|
+
} from "./index-gvnt9yka.js";
|
|
200
200
|
import {
|
|
201
201
|
hasTrustedAbsoluteWall,
|
|
202
202
|
applyProvenInputFloor,
|
|
@@ -355,7 +355,7 @@ import {
|
|
|
355
355
|
getTagsByNumbers2,
|
|
356
356
|
getDroppedTagsByNumbers2,
|
|
357
357
|
getMaxDroppedTagNumber2
|
|
358
|
-
} from "./index-
|
|
358
|
+
} from "./index-mxjdj2cz.js";
|
|
359
359
|
import {
|
|
360
360
|
BoundedSessionMap,
|
|
361
361
|
observeTemporalDecisions,
|
|
@@ -427,7 +427,7 @@ import {
|
|
|
427
427
|
readRawSessionMessageById2,
|
|
428
428
|
readSessionChunk2,
|
|
429
429
|
readRawSessionSeedTail2
|
|
430
|
-
} from "./index-
|
|
430
|
+
} from "./index-fm0bpxc6.js";
|
|
431
431
|
import {
|
|
432
432
|
isFailClosedBlockingError,
|
|
433
433
|
shouldBypassFailClosedBlock,
|
|
@@ -453,7 +453,7 @@ import {
|
|
|
453
453
|
runSqliteOptimize,
|
|
454
454
|
openDatabase,
|
|
455
455
|
openCurrentDatabase
|
|
456
|
-
} from "./index-
|
|
456
|
+
} from "./index-fcrp1k8s.js";
|
|
457
457
|
import {
|
|
458
458
|
unescapeXml,
|
|
459
459
|
resolveWorkspaceShareCategories,
|
|
@@ -569,10 +569,10 @@ import {
|
|
|
569
569
|
GLOBAL_USER_PROFILE_PROJECT_PATH,
|
|
570
570
|
getProjectState,
|
|
571
571
|
bumpProjectUserProfileVersion
|
|
572
|
-
} from "./index-
|
|
572
|
+
} from "./index-y664y8kq.js";
|
|
573
573
|
import {
|
|
574
574
|
getLastIndexedOrdinal
|
|
575
|
-
} from "./index-
|
|
575
|
+
} from "./index-5hc4kjg0.js";
|
|
576
576
|
import {
|
|
577
577
|
SESSION_NOTE_CONDITION_ERROR,
|
|
578
578
|
getNoteByIdInScope,
|
|
@@ -706,13 +706,13 @@ import {
|
|
|
706
706
|
resolveMemoriesByIdsForSearch2,
|
|
707
707
|
unifiedSearch2,
|
|
708
708
|
formatSearchResults2
|
|
709
|
-
} from "./index-
|
|
709
|
+
} from "./index-51anehwt.js";
|
|
710
710
|
import {
|
|
711
711
|
scheduleReconciliation,
|
|
712
712
|
scheduleIncrementalIndex,
|
|
713
713
|
getMessageIndexQueueHeapStats,
|
|
714
714
|
clearSessionTracking
|
|
715
|
-
} from "./index-
|
|
715
|
+
} from "./index-mey1nc1v.js";
|
|
716
716
|
import {
|
|
717
717
|
flushIgnoredMessages2,
|
|
718
718
|
clearIgnoredMessages2,
|
|
@@ -722,7 +722,7 @@ import {
|
|
|
722
722
|
import {
|
|
723
723
|
setRecompStarting2,
|
|
724
724
|
setRecompTerminal2
|
|
725
|
-
} from "./index-
|
|
725
|
+
} from "./index-cdyhpdqx.js";
|
|
726
726
|
import {
|
|
727
727
|
makeToolCompositeKey,
|
|
728
728
|
searchMessageHistoryOffThread,
|
|
@@ -807,7 +807,7 @@ import {
|
|
|
807
807
|
abortSessionFailClosed2,
|
|
808
808
|
evaluateEmergencyFailClosed2,
|
|
809
809
|
runPostTransformPhase2
|
|
810
|
-
} from "./index-
|
|
810
|
+
} from "./index-mejvnav7.js";
|
|
811
811
|
import {
|
|
812
812
|
ANNOUNCEMENT_VERSION2,
|
|
813
813
|
ANNOUNCEMENT_FEATURES2,
|
|
@@ -822,13 +822,13 @@ import {
|
|
|
822
822
|
renderMessageByOrdinal2,
|
|
823
823
|
renderVerboseRangeForTool2,
|
|
824
824
|
renderItemByTag2
|
|
825
|
-
} from "./index-
|
|
825
|
+
} from "./index-n19pqsnh.js";
|
|
826
826
|
import {
|
|
827
827
|
readV2ArchiveOffThread2
|
|
828
|
-
} from "./index-
|
|
828
|
+
} from "./index-0dbc9rxd.js";
|
|
829
829
|
import {
|
|
830
830
|
renderSearchArchiveOffThread2
|
|
831
|
-
} from "./index-
|
|
831
|
+
} from "./index-d0mb17q4.js";
|
|
832
832
|
import {
|
|
833
833
|
COMPACTION_ENABLED_PATH,
|
|
834
834
|
isDreamerRunnable,
|
|
@@ -16468,7 +16468,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16468
16468
|
const db = readDatabase();
|
|
16469
16469
|
if (!db)
|
|
16470
16470
|
return { ok: false, error: "db unavailable" };
|
|
16471
|
-
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-
|
|
16471
|
+
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-t9670x13.js"));
|
|
16472
16472
|
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-ykvt5k2s.js"));
|
|
16473
16473
|
log2(`[rpc] recomp requested for session ${sessionId}`);
|
|
16474
16474
|
if (!args.client && !args.hiddenCompletionExecutor) {
|
|
@@ -16553,7 +16553,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16553
16553
|
const db = readDatabase();
|
|
16554
16554
|
if (!db)
|
|
16555
16555
|
return { ok: false, error: "db unavailable" };
|
|
16556
|
-
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-
|
|
16556
|
+
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-fzygp85w.js"));
|
|
16557
16557
|
const model = liveSessionState.liveModelBySession.get(sessionId);
|
|
16558
16558
|
const contextLimit = model ? resolveContextLimit(model.providerID, model.modelID, { db, sessionID: sessionId }) : 128000;
|
|
16559
16559
|
const ctx = {
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./index-ywrz4wy2.js";
|
|
4
4
|
import {
|
|
5
5
|
clearEmergencyRecovery
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-mxjdj2cz.js";
|
|
7
7
|
import {
|
|
8
8
|
requestPendingMaterialization,
|
|
9
9
|
dropSlot
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-y664y8kq.js";
|
|
11
11
|
import {
|
|
12
12
|
executeContextRecomp
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-gvnt9yka.js";
|
|
14
14
|
import {
|
|
15
15
|
renderUserFacingFailure,
|
|
16
16
|
userFacingFailureCode
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
rawMessageWorkerSource2,
|
|
20
20
|
rawMessageOffThreadRangeReader2,
|
|
21
21
|
readRawSessionMessageIdOrdinalsForRange2
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-fm0bpxc6.js";
|
|
23
23
|
import {
|
|
24
24
|
readV2ArchiveOffThread2
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-0dbc9rxd.js";
|
|
26
26
|
|
|
27
27
|
// src/tools/ctx-expand/search-archive.ts
|
|
28
28
|
var archiveReadsOnThisThread = 0;
|
|
@@ -1021,7 +1021,7 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
|
|
|
1021
1021
|
state.running = startMessageFtsRowidMapBackfill2(db, signal).then(async () => {
|
|
1022
1022
|
if (signal.aborted || !readsOpenCodeStore)
|
|
1023
1023
|
return;
|
|
1024
|
-
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-
|
|
1024
|
+
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-6kdtfa7k.js"));
|
|
1025
1025
|
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-pz5981mf.js"));
|
|
1026
1026
|
if (signal.aborted)
|
|
1027
1027
|
return;
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
getRawSessionTagKeysThrough2,
|
|
36
36
|
getLegacyProtectedTailStartOrdinal2,
|
|
37
37
|
readSessionChunk2
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-fm0bpxc6.js";
|
|
39
39
|
import {
|
|
40
40
|
getHarness2,
|
|
41
41
|
harnessOwnsOpenCodeStore2
|
|
@@ -113,7 +113,7 @@ import {
|
|
|
113
113
|
LATEST_SUPPORTED_VERSION,
|
|
114
114
|
getPersistedSchemaVersion,
|
|
115
115
|
openDatabase
|
|
116
|
-
} from "./index-
|
|
116
|
+
} from "./index-fcrp1k8s.js";
|
|
117
117
|
import {
|
|
118
118
|
areRustHistorianSyntheticParts2,
|
|
119
119
|
isStrictGapHealingMessage2,
|
|
@@ -201,14 +201,14 @@ import {
|
|
|
201
201
|
getProjectState,
|
|
202
202
|
recordSubagentInvocation,
|
|
203
203
|
getLatestHistorianInvocationId
|
|
204
|
-
} from "./index-
|
|
204
|
+
} from "./index-y664y8kq.js";
|
|
205
205
|
import {
|
|
206
206
|
clearCompressionDepth,
|
|
207
207
|
clearCompressionDepthRange,
|
|
208
208
|
toMessageIndexSource,
|
|
209
209
|
clearIndexedMessagesInTransaction,
|
|
210
210
|
indexSourcesAfterOrdinal
|
|
211
|
-
} from "./index-
|
|
211
|
+
} from "./index-5hc4kjg0.js";
|
|
212
212
|
import {
|
|
213
213
|
stripWellFormedLeadingTagPrefix,
|
|
214
214
|
peelLeadingMcTagNotation,
|
|
@@ -258,7 +258,7 @@ import {
|
|
|
258
258
|
foldShrunkPartTags2,
|
|
259
259
|
getTagNumberByMessageId2,
|
|
260
260
|
getActiveTagsBySession2
|
|
261
|
-
} from "./index-
|
|
261
|
+
} from "./index-mxjdj2cz.js";
|
|
262
262
|
import {
|
|
263
263
|
openCodeDbExists,
|
|
264
264
|
withReadOnlySessionDb,
|
|
@@ -171,7 +171,7 @@ import {
|
|
|
171
171
|
adoptNullOwnerToolTag2,
|
|
172
172
|
getCandidateToolOwners2,
|
|
173
173
|
pickNearestPriorOwner2
|
|
174
|
-
} from "./index-
|
|
174
|
+
} from "./index-mxjdj2cz.js";
|
|
175
175
|
import {
|
|
176
176
|
textMentionsRecentCommit,
|
|
177
177
|
hasMeaningfulUserText2,
|
|
@@ -224,11 +224,11 @@ import {
|
|
|
224
224
|
saveSourceContent,
|
|
225
225
|
replaceSourceContent,
|
|
226
226
|
getSourceContents
|
|
227
|
-
} from "./index-
|
|
227
|
+
} from "./index-y664y8kq.js";
|
|
228
228
|
import {
|
|
229
229
|
cleanSearchText,
|
|
230
230
|
matchedSearchSnippet
|
|
231
|
-
} from "./index-
|
|
231
|
+
} from "./index-5hc4kjg0.js";
|
|
232
232
|
import {
|
|
233
233
|
getProjectEmbeddingSnapshot2,
|
|
234
234
|
embedTextForProject2,
|
|
@@ -241,7 +241,7 @@ import {
|
|
|
241
241
|
getMessageIndexEpoch,
|
|
242
242
|
isMessageIndexSearchable,
|
|
243
243
|
createAutoSearchDiagnostics
|
|
244
|
-
} from "./index-
|
|
244
|
+
} from "./index-mey1nc1v.js";
|
|
245
245
|
import {
|
|
246
246
|
openCodeDbExists,
|
|
247
247
|
withReadOnlySessionDb,
|
|
@@ -259,7 +259,7 @@ import {
|
|
|
259
259
|
extractToolCallObservation,
|
|
260
260
|
ToolMutationBatch,
|
|
261
261
|
createToolDropTarget
|
|
262
|
-
} from "./index-
|
|
262
|
+
} from "./index-fm0bpxc6.js";
|
|
263
263
|
import {
|
|
264
264
|
compareOpenCodeMessagesByCanonicalOrder,
|
|
265
265
|
startCompactionMarkerCandidatePreparation,
|
|
@@ -281,7 +281,7 @@ import {
|
|
|
281
281
|
peekNoteNudgeText,
|
|
282
282
|
markNoteNudgeDelivered,
|
|
283
283
|
getActiveCompartmentRun
|
|
284
|
-
} from "./index-
|
|
284
|
+
} from "./index-gvnt9yka.js";
|
|
285
285
|
import {
|
|
286
286
|
userFacingFailureCode
|
|
287
287
|
} from "./index-n6aye6ny.js";
|
|
@@ -310,8 +310,9 @@ function estimateImageTokensFromDataUrl(url) {
|
|
|
310
310
|
const comma = url.indexOf(",");
|
|
311
311
|
if (comma < 0)
|
|
312
312
|
return IMAGE_FALLBACK_TOKENS;
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
return estimateImageTokensFromBase64(url.slice(0, comma), url.slice(comma + 1));
|
|
314
|
+
}
|
|
315
|
+
function estimateImageTokensFromBase64(header, payload) {
|
|
315
316
|
const sliceLen = Math.min(512, payload.length);
|
|
316
317
|
const preview = payload.slice(0, sliceLen);
|
|
317
318
|
let bytes;
|
|
@@ -320,12 +321,15 @@ function estimateImageTokensFromDataUrl(url) {
|
|
|
320
321
|
} catch {
|
|
321
322
|
return IMAGE_FALLBACK_TOKENS;
|
|
322
323
|
}
|
|
324
|
+
return estimateImageTokensFromHeader(header, bytes, () => createBase64ByteReader(payload, bytes));
|
|
325
|
+
}
|
|
326
|
+
function estimateImageTokensFromHeader(header, bytes, jpegReader) {
|
|
323
327
|
if (header.includes("image/png")) {
|
|
324
328
|
const dims = parsePngDimensions(bytes);
|
|
325
329
|
if (dims)
|
|
326
330
|
return clampImageTokens(Math.ceil(dims.w * dims.h / IMAGE_TOKEN_DIVISOR));
|
|
327
331
|
} else if (header.includes("image/jpeg") || header.includes("image/jpg")) {
|
|
328
|
-
const dims = parseJpegDimensions(
|
|
332
|
+
const dims = parseJpegDimensions(jpegReader());
|
|
329
333
|
if (dims)
|
|
330
334
|
return clampImageTokens(Math.ceil(dims.w * dims.h / IMAGE_TOKEN_DIVISOR));
|
|
331
335
|
} else if (header.includes("image/webp")) {
|
|
@@ -339,6 +343,36 @@ function estimateImageTokensFromDataUrl(url) {
|
|
|
339
343
|
}
|
|
340
344
|
return IMAGE_FALLBACK_TOKENS;
|
|
341
345
|
}
|
|
346
|
+
function nativeMediaImage(part) {
|
|
347
|
+
if (part.type !== "media" || !isRecord(part.media))
|
|
348
|
+
return;
|
|
349
|
+
const { mediaType, source } = part.media;
|
|
350
|
+
if (typeof mediaType !== "string" || !mediaType.startsWith("image/"))
|
|
351
|
+
return;
|
|
352
|
+
let inline;
|
|
353
|
+
if (isRecord(source)) {
|
|
354
|
+
const { type, data } = source;
|
|
355
|
+
if (type === "base64" && typeof data === "string" && data.length > 0)
|
|
356
|
+
inline = data;
|
|
357
|
+
if (type === "bytes" && data instanceof Uint8Array && data.byteLength > 0)
|
|
358
|
+
inline = data;
|
|
359
|
+
}
|
|
360
|
+
return { mediaType, inline };
|
|
361
|
+
}
|
|
362
|
+
function isInlineNativeMediaImage(part) {
|
|
363
|
+
return nativeMediaImage(part)?.inline !== undefined;
|
|
364
|
+
}
|
|
365
|
+
function estimateNativeMediaImageTokens(part) {
|
|
366
|
+
const image = nativeMediaImage(part);
|
|
367
|
+
if (!image)
|
|
368
|
+
return 0;
|
|
369
|
+
const { mediaType, inline } = image;
|
|
370
|
+
if (typeof inline === "string")
|
|
371
|
+
return estimateImageTokensFromBase64(mediaType, inline);
|
|
372
|
+
if (inline)
|
|
373
|
+
return estimateImageTokensFromHeader(mediaType, inline, () => (i) => inline[i]);
|
|
374
|
+
return IMAGE_FALLBACK_TOKENS;
|
|
375
|
+
}
|
|
342
376
|
function estimateToolAttachmentImageTokens(state) {
|
|
343
377
|
if (!state || typeof state !== "object")
|
|
344
378
|
return 0;
|
|
@@ -1066,12 +1100,21 @@ function buildTagAttribution(args) {
|
|
|
1066
1100
|
}
|
|
1067
1101
|
return { protectedNumbers, messageTags, toolTagsByPart };
|
|
1068
1102
|
}
|
|
1103
|
+
function reclaimableTailTokens(part) {
|
|
1104
|
+
return part.tagStatus === "active" && !part.protected && !part.queuedForDrop && part.kind !== "excluded" && part.kind !== "text" ? part.tokens : 0;
|
|
1105
|
+
}
|
|
1069
1106
|
function snapshot(args) {
|
|
1070
1107
|
const memo = memoizedContent(args.kind, args.content);
|
|
1071
1108
|
const tag = args.tag;
|
|
1072
1109
|
const isProtected = tag ? args.protectedNumbers.has(tag.tagNumber) : false;
|
|
1073
1110
|
const queuedForDrop = tag ? args.pendingDropTagNumbers.has(tag.tagNumber) : false;
|
|
1074
|
-
const uTokens =
|
|
1111
|
+
const uTokens = reclaimableTailTokens({
|
|
1112
|
+
kind: args.kind,
|
|
1113
|
+
tokens: args.tokens,
|
|
1114
|
+
tagStatus: tag?.status,
|
|
1115
|
+
protected: isProtected,
|
|
1116
|
+
queuedForDrop
|
|
1117
|
+
});
|
|
1075
1118
|
return {
|
|
1076
1119
|
key: args.key,
|
|
1077
1120
|
contentHash: memo.hash,
|
|
@@ -1235,7 +1278,13 @@ function measureWithReplay(input, replay) {
|
|
|
1235
1278
|
const tag = prior.kind === "text" ? attribution.messageTags.get(`${message.info.id}:p${partIndex}`) : prior.kind === "file" ? attribution.messageTags.get(`${message.info.id}:file${partIndex}`) : prior.kind === "toolInput" || prior.kind === "toolOutput" ? attribution.toolTagsByPart.get(message.parts[partIndex]) : undefined;
|
|
1236
1279
|
const protectedPart = tag ? attribution.protectedNumbers.has(tag.tagNumber) : false;
|
|
1237
1280
|
const queuedForDrop = tag ? pendingDropTagNumbers.has(tag.tagNumber) : false;
|
|
1238
|
-
const uTokens =
|
|
1281
|
+
const uTokens = reclaimableTailTokens({
|
|
1282
|
+
kind: prior.kind,
|
|
1283
|
+
tokens: prior.tokens,
|
|
1284
|
+
tagStatus: tag?.status,
|
|
1285
|
+
protected: protectedPart,
|
|
1286
|
+
queuedForDrop
|
|
1287
|
+
});
|
|
1239
1288
|
const measured = prior.tagNumber === (tag?.tagNumber ?? null) && prior.tagStatus === (tag?.status ?? null) && prior.protected === protectedPart && prior.queuedForDrop === queuedForDrop && prior.uTokens === uTokens ? prior : {
|
|
1240
1289
|
...prior,
|
|
1241
1290
|
tagNumber: tag?.tagNumber ?? null,
|
|
@@ -2008,9 +2057,12 @@ function incompleteWirePartFields(part) {
|
|
|
2008
2057
|
return missing(p.result !== undefined || p.content !== undefined || p.output !== undefined, "result");
|
|
2009
2058
|
case "step-start":
|
|
2010
2059
|
case "step-finish":
|
|
2060
|
+
case "effort":
|
|
2011
2061
|
return [];
|
|
2012
2062
|
case "file":
|
|
2013
2063
|
return missing(typeof p.url === "string" && p.url.startsWith("data:image/"), "url (data:image/)");
|
|
2064
|
+
case "media":
|
|
2065
|
+
return missing(isInlineNativeMediaImage(p), "media (inline image)");
|
|
2014
2066
|
default:
|
|
2015
2067
|
return ["supported type"];
|
|
2016
2068
|
}
|
|
@@ -6529,11 +6581,13 @@ function serializedTokens(value, bounded = false) {
|
|
|
6529
6581
|
return serialized ? wireTextTokens(serialized) : 0;
|
|
6530
6582
|
}
|
|
6531
6583
|
function estimatePartImageTokens(raw) {
|
|
6532
|
-
if (!raw
|
|
6584
|
+
if (!isRecord(raw))
|
|
6533
6585
|
return 0;
|
|
6534
6586
|
const part = raw;
|
|
6535
6587
|
if (part.ignored)
|
|
6536
6588
|
return 0;
|
|
6589
|
+
if (part.type === "media")
|
|
6590
|
+
return estimateNativeMediaImageTokens(raw);
|
|
6537
6591
|
if (part.type === "file" && part.mime?.startsWith("image/")) {
|
|
6538
6592
|
return typeof part.url === "string" && part.url.startsWith("data:") ? estimateImageTokensFromDataUrl(part.url) : 1200;
|
|
6539
6593
|
}
|
|
@@ -6596,6 +6650,7 @@ function visitWireContent(message, visit) {
|
|
|
6596
6650
|
opaque();
|
|
6597
6651
|
break;
|
|
6598
6652
|
case "file":
|
|
6653
|
+
case "media":
|
|
6599
6654
|
visit.image("conversation", estimatePartImageTokens(part));
|
|
6600
6655
|
break;
|
|
6601
6656
|
case "tool":
|