@cortexkit/opencode-magic-context 0.49.62 → 0.49.64
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-45fde2p4.js → context-v1apxpct.js} +18 -23
- package/dist/features/magic-context/overflow-detection.d.ts +0 -20
- package/dist/features/magic-context/overflow-detection.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tags.d.ts +7 -0
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts +13 -0
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/{index-tq20edcs.js → index-0ab398z2.js} +2 -2
- package/dist/{index-qdver0af.js → index-5fbeycst.js} +6 -6
- package/dist/{index-d0feqcs5.js → index-6kgsfb81.js} +1 -1
- package/dist/{index-3hk445am.js → index-71h616be.js} +1 -1
- package/dist/{index-ev2rrjfc.js → index-7dj3s7qq.js} +1 -1
- package/dist/{index-zz4k3f65.js → index-aq4yfcq6.js} +47 -49
- package/dist/{index-3yyfftqq.js → index-c0k54yhd.js} +3 -3
- package/dist/{index-ywxvdwmj.js → index-ezr8mr1c.js} +1 -1
- package/dist/{index-s2jdky2x.js → index-g59gpt1j.js} +3 -3
- package/dist/{index-kv4ntrr6.js → index-gwb2wpz7.js} +2 -2
- package/dist/{index-s2qsd3w9.js → index-hs9xxmmy.js} +5 -5
- package/dist/{index-8sc7vqt7.js → index-kvfrse61.js} +75 -43
- package/dist/{index-3wq9btxt.js → index-m568xww6.js} +3 -3
- package/dist/{index-0cz8bsyx.js → index-qn27gh4e.js} +1 -1
- package/dist/{index-4yjn3er4.js → index-zdd01nhc.js} +5 -5
- package/dist/index.js +18 -18
- package/dist/{message-index-bounded-f6yz4xq8.js → message-index-bounded-zs7ah2te.js} +3 -3
- package/dist/migration-worker.js +1 -1
- package/dist/raw-ordinal-warmup-worker.js +4 -4
- package/dist/{read-session-chunk-8b1g06nz.js → read-session-chunk-jf2f8jz8.js} +2 -2
- package/dist/{recomp-orchestrator-7s8nyzhy.js → recomp-orchestrator-6vxnrh2w.js} +7 -7
- package/dist/{render-nrfbtkkw.js → render-n46wpv2n.js} +6 -6
- package/dist/{search-archive-1ppdjfm9.js → search-archive-9k6vsp44.js} +4 -4
- package/dist/{search-xha0r30f.js → search-s386bwwh.js} +5 -5
- package/dist/shared/tag-transcript.d.ts.map +1 -1
- package/dist/{storage-tags-spet01yb.js → storage-tags-2r952wqy.js} +1 -1
- package/dist/{transform-postprocess-phase-fxp1atm1.js → transform-postprocess-phase-jjc9jcer.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-77g3jhf2.js → context-nfkhb5sv.js} +41 -40
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/{message-index-bounded-0w8eh8fc.js → message-index-bounded-axbs1s97.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-dxs1tgt9.js → read-session-chunk-41cm522x.js} +2 -2
- package/dist/v2/{recomp-orchestrator-zc1wdv9q.js → recomp-orchestrator-krccyz0a.js} +6 -6
- package/dist/v2/{render-9knrdrjs.js → render-7v7yx9xb.js} +6 -6
- package/dist/v2/{search-archive-2jmyvj69.js → search-archive-1yc8bh6y.js} +4 -4
- package/dist/v2/{search-a2a0qs3t.js → search-mabwkzw2.js} +4 -4
- package/dist/v2/{server-svx20ra2.js → server-8w9b5exq.js} +1 -1
- package/dist/v2/{server-9m5r04ws.js → server-anh8gf0w.js} +2 -2
- package/dist/v2/{server-ja6swvmb.js → server-bh9yzxpz.js} +2 -2
- package/dist/v2/{server-9ab9jnpq.js → server-bnka2vf2.js} +3 -3
- package/dist/v2/{server-8ycacd59.js → server-cdddk5d1.js} +1 -1
- package/dist/v2/{server-88n85n60.js → server-hb5zm7yh.js} +75 -43
- package/dist/v2/{server-tzh55x6d.js → server-hcgqsdrh.js} +1 -1
- package/dist/v2/{server-4r86tcs2.js → server-k97r77x3.js} +2 -2
- package/dist/v2/{server-8hcxmt1w.js → server-xse5jngy.js} +5 -5
- package/dist/v2/{server-t8tmrtcg.js → server-yxw43z2w.js} +1 -1
- package/dist/v2/server.js +2 -2
- package/dist/v2/{storage-tags-50wsqg3t.js → storage-tags-9zs0gc7w.js} +1 -1
- package/dist/v2/{v2-archive-reader-ycjh6a2d.js → v2-archive-reader-pgk140pb.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-fyyb28jf.js → wrapup-orchestrator-v2rgtczc.js} +6 -6
- package/dist/{v2-archive-reader-wec0a8fx.js → v2-archive-reader-cv6veqnz.js} +1 -1
- package/dist/{wrapup-orchestrator-560v99mk.js → wrapup-orchestrator-qbtg1dhm.js} +8 -8
- package/package.json +1 -1
- package/src/shared/tag-transcript.ts +105 -1
|
@@ -139,9 +139,9 @@ async function serveV2ArchiveReads2(port, openConnections) {
|
|
|
139
139
|
import("./sqlite-zdgm52sv.js"),
|
|
140
140
|
import("./store-reader-3eh1s1m8.js"),
|
|
141
141
|
import("./store-h20ny8b8.js"),
|
|
142
|
-
import("./read-session-chunk-
|
|
143
|
-
import("./render-
|
|
144
|
-
import("./search-archive-
|
|
142
|
+
import("./read-session-chunk-jf2f8jz8.js"),
|
|
143
|
+
import("./render-n46wpv2n.js"),
|
|
144
|
+
import("./search-archive-9k6vsp44.js"),
|
|
145
145
|
import("./expand-attachments-h33jbgyz.js")
|
|
146
146
|
]);
|
|
147
147
|
const pool = new V2StoreReaderPool;
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
rawMessageWorkerSource2,
|
|
20
20
|
rawMessageOffThreadRangeReader2,
|
|
21
21
|
readRawSessionMessageIdOrdinalsForRange2
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-6kgsfb81.js";
|
|
23
23
|
import {
|
|
24
24
|
readV2ArchiveOffThread2
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-g59gpt1j.js";
|
|
26
26
|
|
|
27
27
|
// src/tools/ctx-expand/search-archive.ts
|
|
28
28
|
var archiveReadsOnThisThread = 0;
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
releaseCompartmentLeaseBestEffort,
|
|
9
9
|
getCompartments,
|
|
10
10
|
getLastCompartmentEndMessage
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-ezr8mr1c.js";
|
|
12
12
|
import {
|
|
13
13
|
inRootAsyncContext2
|
|
14
14
|
} from "./index-gzy5w8ya.js";
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
releaseWrapupInProgress,
|
|
20
20
|
getHistorianFailureState,
|
|
21
21
|
clearEmergencyRecovery
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-kvfrse61.js";
|
|
23
23
|
import {
|
|
24
24
|
prepareRawSessionOrdinals2
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-6kgsfb81.js";
|
|
26
26
|
import {
|
|
27
27
|
pushNotification2
|
|
28
28
|
} from "./index-x8a7jmkh.js";
|
|
@@ -34,14 +34,14 @@ import {
|
|
|
34
34
|
getActiveCompartmentRun,
|
|
35
35
|
markActiveCompartmentRunPublished,
|
|
36
36
|
registerActiveCompartmentRun
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-zdd01nhc.js";
|
|
38
38
|
import {
|
|
39
39
|
sendStatusNotification2
|
|
40
40
|
} from "./index-1sq1krqw.js";
|
|
41
41
|
import {
|
|
42
42
|
setRecompStarting2,
|
|
43
43
|
setRecompTerminal2
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-m568xww6.js";
|
|
45
45
|
|
|
46
46
|
// src/hooks/magic-context/wrapup-orchestrator.ts
|
|
47
47
|
import * as crypto from "node:crypto";
|
|
@@ -5046,6 +5046,11 @@ function markDropLeavesReasoning(db, sessionId) {
|
|
|
5046
5046
|
}
|
|
5047
5047
|
|
|
5048
5048
|
// src/features/magic-context/overflow-detection.ts
|
|
5049
|
+
var TOKEN_COUNT = String.raw`(?<![\d+_-])(?:\d+(?:[,_ .\u202f]+\d+)*(?=\s*tokens?\b)|\d+(?:[,_ \u202f]+\d+)*)(?!\w|[,_\s.]+\d)`;
|
|
5050
|
+
var ESTIMATED_REQUEST = String.raw`\bthis request has an estimated\b`;
|
|
5051
|
+
function overflowPattern(strings, ...fragments) {
|
|
5052
|
+
return new RegExp(String.raw(strings, ...fragments), "i");
|
|
5053
|
+
}
|
|
5049
5054
|
var OVERFLOW_PATTERNS = [
|
|
5050
5055
|
/prompt is too long/i,
|
|
5051
5056
|
/input is too long for requested model/i,
|
|
@@ -5053,7 +5058,7 @@ var OVERFLOW_PATTERNS = [
|
|
|
5053
5058
|
/input token count.*exceeds the maximum/i,
|
|
5054
5059
|
/maximum prompt length is \d+/i,
|
|
5055
5060
|
/reduce the length of the messages/i,
|
|
5056
|
-
|
|
5061
|
+
overflowPattern`maximum context length is ${TOKEN_COUNT} tokens?\b`,
|
|
5057
5062
|
/maximum model length is \d+/i,
|
|
5058
5063
|
/exceeds the limit of \d+/i,
|
|
5059
5064
|
/exceeds the available context size/i,
|
|
@@ -5062,48 +5067,84 @@ var OVERFLOW_PATTERNS = [
|
|
|
5062
5067
|
/exceeded model token limit/i,
|
|
5063
5068
|
/context[_ ]length[_ ]exceeded/i,
|
|
5064
5069
|
/request entity too large/i,
|
|
5065
|
-
|
|
5070
|
+
overflowPattern`context length is only ${TOKEN_COUNT} tokens?\b`,
|
|
5066
5071
|
/input length.*exceeds.*context length/i,
|
|
5067
5072
|
/\bContextWindowExceededError\b/i,
|
|
5068
|
-
|
|
5073
|
+
overflowPattern`\bthe input \(${TOKEN_COUNT} tokens?\) is longer than the model's context length \(${TOKEN_COUNT} tokens?\)`,
|
|
5069
5074
|
/prompt too long; exceeded (?:max )?context length/i,
|
|
5070
|
-
|
|
5075
|
+
overflowPattern`too large for model with ${TOKEN_COUNT} maximum context length`,
|
|
5071
5076
|
/model_context_window_exceeded/i,
|
|
5072
5077
|
/context size has been exceeded/i,
|
|
5073
5078
|
/prepared prompt exceeds engine max_context/i,
|
|
5074
5079
|
/prompt exceeds (?:the )?.{0,32}\bmax_context\b/i
|
|
5075
5080
|
];
|
|
5076
5081
|
var LIMIT_EXTRACTION_PATTERNS = [
|
|
5077
|
-
{ pattern: /maximum prompt length is (\d+)/i, provenance: "prompt_only" },
|
|
5078
5082
|
{
|
|
5079
|
-
pattern:
|
|
5083
|
+
pattern: overflowPattern`maximum prompt length is (${TOKEN_COUNT})`,
|
|
5084
|
+
provenance: "prompt_only"
|
|
5085
|
+
},
|
|
5086
|
+
{
|
|
5087
|
+
pattern: overflowPattern`maximum context length is (${TOKEN_COUNT}) tokens?\b`,
|
|
5080
5088
|
provenance: "combined"
|
|
5081
5089
|
},
|
|
5082
|
-
{ pattern:
|
|
5083
|
-
{ pattern: /context length is only (\d+) tokens?/i, provenance: "combined" },
|
|
5084
|
-
{ pattern: /exceeds the limit of (\d+)/i, provenance: "unknown" },
|
|
5090
|
+
{ pattern: overflowPattern`maximum model length is (${TOKEN_COUNT})`, provenance: "combined" },
|
|
5085
5091
|
{
|
|
5086
|
-
pattern:
|
|
5092
|
+
pattern: overflowPattern`context length is only (${TOKEN_COUNT}) tokens?\b`,
|
|
5087
5093
|
provenance: "combined"
|
|
5088
5094
|
},
|
|
5089
|
-
{ pattern:
|
|
5090
|
-
{ pattern: /exceeds? the context length of (\d+)/i, provenance: "combined" },
|
|
5095
|
+
{ pattern: overflowPattern`exceeds the limit of (${TOKEN_COUNT})`, provenance: "unknown" },
|
|
5091
5096
|
{
|
|
5092
|
-
pattern:
|
|
5097
|
+
pattern: overflowPattern`too large for model with (${TOKEN_COUNT}) maximum context length`,
|
|
5093
5098
|
provenance: "combined"
|
|
5094
5099
|
},
|
|
5095
5100
|
{
|
|
5096
|
-
pattern:
|
|
5101
|
+
pattern: overflowPattern`context size[^0-9]{0,40}(${TOKEN_COUNT})\s*tokens?\b`,
|
|
5102
|
+
provenance: "combined"
|
|
5103
|
+
},
|
|
5104
|
+
{
|
|
5105
|
+
pattern: overflowPattern`exceeds? the context length of (${TOKEN_COUNT})`,
|
|
5106
|
+
provenance: "combined"
|
|
5107
|
+
},
|
|
5108
|
+
{
|
|
5109
|
+
pattern: overflowPattern`\bthe input \(${TOKEN_COUNT} tokens?\) is longer than the model's context length \((${TOKEN_COUNT}) tokens?\)`,
|
|
5110
|
+
provenance: "combined"
|
|
5111
|
+
},
|
|
5112
|
+
{
|
|
5113
|
+
pattern: overflowPattern`>\s*(${TOKEN_COUNT})\s*(?:tokens?\s*)?(?:maximum|max|limit)\b`,
|
|
5097
5114
|
provenance: "prompt_only"
|
|
5098
5115
|
},
|
|
5099
5116
|
{
|
|
5100
|
-
pattern:
|
|
5117
|
+
pattern: overflowPattern`maximum number of tokens allowed\s*\(?\s*(${TOKEN_COUNT})`,
|
|
5101
5118
|
provenance: "prompt_only"
|
|
5102
5119
|
},
|
|
5103
|
-
{
|
|
5104
|
-
|
|
5105
|
-
|
|
5120
|
+
{
|
|
5121
|
+
pattern: overflowPattern`prepared prompt exceeds engine max_context\s+(${TOKEN_COUNT})`,
|
|
5122
|
+
provenance: "unknown"
|
|
5123
|
+
},
|
|
5124
|
+
{
|
|
5125
|
+
pattern: overflowPattern`prompt exceeds (?:the )?.{0,32}\bmax_context\s+(${TOKEN_COUNT})`,
|
|
5126
|
+
provenance: "unknown"
|
|
5127
|
+
},
|
|
5128
|
+
{
|
|
5129
|
+
pattern: overflowPattern`\ballows a context of up to (${TOKEN_COUNT}) tokens?\b`,
|
|
5130
|
+
provenance: "combined"
|
|
5131
|
+
},
|
|
5132
|
+
{
|
|
5133
|
+
pattern: overflowPattern`(?<!${ESTIMATED_REQUEST}\s+)\bup to (${TOKEN_COUNT}) tokens?\b`,
|
|
5134
|
+
provenance: "unknown"
|
|
5135
|
+
},
|
|
5136
|
+
{
|
|
5137
|
+
pattern: overflowPattern`max(?:imum)?.*context(?:(?!${ESTIMATED_REQUEST})[^\d\r\n])*(${TOKEN_COUNT})`,
|
|
5138
|
+
provenance: "unknown"
|
|
5139
|
+
}
|
|
5106
5140
|
];
|
|
5141
|
+
function parseTokenCount(raw) {
|
|
5142
|
+
if (raw === undefined || !/^(?:\d+|\d{1,3}([,_ .\u202f])\d{3}(?:\1\d{3})*)$/.test(raw)) {
|
|
5143
|
+
return null;
|
|
5144
|
+
}
|
|
5145
|
+
const value = Number(raw.replace(/[,_ .\u202f]/g, ""));
|
|
5146
|
+
return Number.isSafeInteger(value) ? value : null;
|
|
5147
|
+
}
|
|
5107
5148
|
var MIN_PLAUSIBLE_LIMIT = 1024;
|
|
5108
5149
|
var MAX_PLAUSIBLE_LIMIT = 1e7;
|
|
5109
5150
|
var THINKING_BINDING_MISMATCH_PATTERN = /bound to a different conversation/i;
|
|
@@ -5225,24 +5266,22 @@ function detectOverflow(error) {
|
|
|
5225
5266
|
matchedPattern: matched?.source
|
|
5226
5267
|
};
|
|
5227
5268
|
}
|
|
5269
|
+
var INPUT_EXTRACTION_PATTERNS = [
|
|
5270
|
+
overflowPattern`prompt is too long:\s*(${TOKEN_COUNT})`,
|
|
5271
|
+
overflowPattern`input token count\s*\(?\s*(${TOKEN_COUNT})`,
|
|
5272
|
+
overflowPattern`input length\s*(${TOKEN_COUNT})`,
|
|
5273
|
+
overflowPattern`prompt was\s*(${TOKEN_COUNT})`,
|
|
5274
|
+
overflowPattern`messages resulted in\s*(${TOKEN_COUNT})\s*tokens?\b`,
|
|
5275
|
+
overflowPattern`\bthe input \((${TOKEN_COUNT}) tokens?\) is longer than the model's context length \(${TOKEN_COUNT} tokens?\)`,
|
|
5276
|
+
overflowPattern`\(\s*(${TOKEN_COUNT})\s+in the messages,\s*${TOKEN_COUNT}\s+in the completion\s*\)`,
|
|
5277
|
+
overflowPattern`${ESTIMATED_REQUEST}\s+(${TOKEN_COUNT})`
|
|
5278
|
+
];
|
|
5228
5279
|
function parseReportedInputTokens(message) {
|
|
5229
5280
|
if (!message)
|
|
5230
5281
|
return;
|
|
5231
|
-
const
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
/input length\s*(\d+)/i,
|
|
5235
|
-
/prompt was\s*(\d+)/i,
|
|
5236
|
-
/messages resulted in\s*(\d+)\s*tokens?/i,
|
|
5237
|
-
/\bthe input \((\d+) tokens?\) is longer than the model's context length \(\d+ tokens?\)/i,
|
|
5238
|
-
/\(\s*(\d+)\s+in the messages,\s*\d+\s+in the completion\s*\)/i
|
|
5239
|
-
];
|
|
5240
|
-
for (const pattern of patterns) {
|
|
5241
|
-
const raw = message.match(pattern)?.[1];
|
|
5242
|
-
if (!raw)
|
|
5243
|
-
continue;
|
|
5244
|
-
const value = Number.parseInt(raw, 10);
|
|
5245
|
-
if (Number.isFinite(value) && value > 0)
|
|
5282
|
+
for (const pattern of INPUT_EXTRACTION_PATTERNS) {
|
|
5283
|
+
const value = parseTokenCount(message.match(pattern)?.[1]);
|
|
5284
|
+
if (value !== null && value > 0)
|
|
5246
5285
|
return value;
|
|
5247
5286
|
}
|
|
5248
5287
|
return;
|
|
@@ -5251,16 +5290,8 @@ function parseReportedLimit(message) {
|
|
|
5251
5290
|
if (!message)
|
|
5252
5291
|
return;
|
|
5253
5292
|
for (const { pattern, provenance } of LIMIT_EXTRACTION_PATTERNS) {
|
|
5254
|
-
const
|
|
5255
|
-
if (
|
|
5256
|
-
continue;
|
|
5257
|
-
const raw = match[1];
|
|
5258
|
-
if (!raw)
|
|
5259
|
-
continue;
|
|
5260
|
-
const value = Number.parseInt(raw, 10);
|
|
5261
|
-
if (!Number.isFinite(value))
|
|
5262
|
-
continue;
|
|
5263
|
-
if (value < MIN_PLAUSIBLE_LIMIT || value > MAX_PLAUSIBLE_LIMIT)
|
|
5293
|
+
const value = parseTokenCount(message.match(pattern)?.[1]);
|
|
5294
|
+
if (value === null || value < MIN_PLAUSIBLE_LIMIT || value > MAX_PLAUSIBLE_LIMIT)
|
|
5264
5295
|
continue;
|
|
5265
5296
|
return { value, provenance };
|
|
5266
5297
|
}
|
|
@@ -7445,6 +7476,7 @@ function getActiveTagTokenTotalsByMessage2(db, sessionId, messageIds) {
|
|
|
7445
7476
|
return out;
|
|
7446
7477
|
}
|
|
7447
7478
|
var updateTagTokenCountStatements = new WeakMap;
|
|
7479
|
+
var setTagTokenCountStatements = new WeakMap;
|
|
7448
7480
|
var updateTagInputTokenCountStatements = new WeakMap;
|
|
7449
7481
|
function getUpdateTagTokenCountStatement(db) {
|
|
7450
7482
|
let stmt = updateTagTokenCountStatements.get(db);
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./index-ywrz4wy2.js";
|
|
4
4
|
import {
|
|
5
5
|
clearEmergencyRecovery
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-kvfrse61.js";
|
|
7
7
|
import {
|
|
8
8
|
requestPendingMaterialization,
|
|
9
9
|
dropSlot
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-ezr8mr1c.js";
|
|
11
11
|
import {
|
|
12
12
|
executeContextRecomp
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-zdd01nhc.js";
|
|
14
14
|
import {
|
|
15
15
|
renderUserFacingFailure,
|
|
16
16
|
userFacingFailureCode
|
|
@@ -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-jf2f8jz8.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-6kgsfb81.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-qn27gh4e.js";
|
|
117
117
|
import {
|
|
118
118
|
areRustHistorianSyntheticParts2,
|
|
119
119
|
isStrictGapHealingMessage2,
|
|
@@ -200,14 +200,14 @@ import {
|
|
|
200
200
|
getProjectState,
|
|
201
201
|
recordSubagentInvocation,
|
|
202
202
|
getLatestHistorianInvocationId
|
|
203
|
-
} from "./index-
|
|
203
|
+
} from "./index-ezr8mr1c.js";
|
|
204
204
|
import {
|
|
205
205
|
clearCompressionDepth,
|
|
206
206
|
clearCompressionDepthRange,
|
|
207
207
|
toMessageIndexSource,
|
|
208
208
|
clearIndexedMessagesInTransaction,
|
|
209
209
|
indexSourcesAfterOrdinal
|
|
210
|
-
} from "./index-
|
|
210
|
+
} from "./index-7dj3s7qq.js";
|
|
211
211
|
import {
|
|
212
212
|
stripWellFormedLeadingTagPrefix,
|
|
213
213
|
peelLeadingMcTagNotation,
|
|
@@ -256,7 +256,7 @@ import {
|
|
|
256
256
|
foldShrunkPartTags2,
|
|
257
257
|
getTagNumberByMessageId2,
|
|
258
258
|
getActiveTagsBySession2
|
|
259
|
-
} from "./index-
|
|
259
|
+
} from "./index-kvfrse61.js";
|
|
260
260
|
import {
|
|
261
261
|
openCodeDbExists,
|
|
262
262
|
withReadOnlySessionDb,
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
recordToolParameters,
|
|
5
5
|
createDroppedInputToolExecuteBeforeHook,
|
|
6
6
|
readRawSessionMessages2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-6kgsfb81.js";
|
|
8
8
|
import {
|
|
9
9
|
setHarness2
|
|
10
10
|
} from "./index-pavzsdc6.js";
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
checkCompactionMarkerConsistency,
|
|
59
59
|
clearInjectionCache,
|
|
60
60
|
clearNoteNudgeTriggerOnly
|
|
61
|
-
} from "./index-
|
|
61
|
+
} from "./index-zdd01nhc.js";
|
|
62
62
|
import"./index-sd3egckz.js";
|
|
63
63
|
import {
|
|
64
64
|
hasTrustedAbsoluteWall,
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
parameterDescriptionsFor,
|
|
144
144
|
MagicContextRpcServer,
|
|
145
145
|
applyHiddenSubagentTemperature
|
|
146
|
-
} from "./index-
|
|
146
|
+
} from "./index-aq4yfcq6.js";
|
|
147
147
|
import {
|
|
148
148
|
resolveOpenCodeDbPath,
|
|
149
149
|
openCodeDbPathExists,
|
|
@@ -195,7 +195,7 @@ import {
|
|
|
195
195
|
dropServedRecord,
|
|
196
196
|
registerLkgPersistence,
|
|
197
197
|
dropSlot
|
|
198
|
-
} from "./index-
|
|
198
|
+
} from "./index-ezr8mr1c.js";
|
|
199
199
|
import {
|
|
200
200
|
recordSessionProjectIdentity
|
|
201
201
|
} from "./index-jg7sbt3v.js";
|
|
@@ -210,7 +210,7 @@ import {
|
|
|
210
210
|
openDatabaseAsync,
|
|
211
211
|
isDatabasePersisted,
|
|
212
212
|
getDatabasePersistenceError
|
|
213
|
-
} from "./index-
|
|
213
|
+
} from "./index-qn27gh4e.js";
|
|
214
214
|
import {
|
|
215
215
|
registerExitAbort,
|
|
216
216
|
unregisterExitAbort
|
|
@@ -230,7 +230,7 @@ import"./index-pxnzyvjc.js";
|
|
|
230
230
|
import {
|
|
231
231
|
getDefaultSubcConnectionFile,
|
|
232
232
|
SubcModuleTransport
|
|
233
|
-
} from "./index-
|
|
233
|
+
} from "./index-c0k54yhd.js";
|
|
234
234
|
import"./index-qt1qqasc.js";
|
|
235
235
|
import"./index-e6ncz7a6.js";
|
|
236
236
|
import {
|
|
@@ -280,7 +280,7 @@ import {
|
|
|
280
280
|
isAnthropicFamilyRoute,
|
|
281
281
|
deleteTagsByMessageId2,
|
|
282
282
|
getMaxTagNumberBySession2
|
|
283
|
-
} from "./index-
|
|
283
|
+
} from "./index-kvfrse61.js";
|
|
284
284
|
import {
|
|
285
285
|
resolveHistorianModel2,
|
|
286
286
|
resolveOpenCodeAgentOverrides2,
|
|
@@ -293,7 +293,7 @@ import {
|
|
|
293
293
|
import"./index-snbpdpa3.js";
|
|
294
294
|
import {
|
|
295
295
|
deleteIndexedMessage
|
|
296
|
-
} from "./index-
|
|
296
|
+
} from "./index-7dj3s7qq.js";
|
|
297
297
|
import"./index-6athgjba.js";
|
|
298
298
|
import"./index-tebcx987.js";
|
|
299
299
|
import {
|
|
@@ -317,13 +317,13 @@ import {
|
|
|
317
317
|
armBindingRecoverySafely,
|
|
318
318
|
collectForeignTextParts,
|
|
319
319
|
resetDegradedCacheCount2
|
|
320
|
-
} from "./index-
|
|
320
|
+
} from "./index-5fbeycst.js";
|
|
321
321
|
import {
|
|
322
322
|
scheduleClearAndReindex
|
|
323
|
-
} from "./index-
|
|
323
|
+
} from "./index-71h616be.js";
|
|
324
324
|
import {
|
|
325
325
|
runManagedRecomp2
|
|
326
|
-
} from "./index-
|
|
326
|
+
} from "./index-m568xww6.js";
|
|
327
327
|
import {
|
|
328
328
|
isValidSemver,
|
|
329
329
|
compareSemverCore
|
|
@@ -331,11 +331,11 @@ import {
|
|
|
331
331
|
import"./index-fmsr7v69.js";
|
|
332
332
|
import {
|
|
333
333
|
runManagedWrapup2
|
|
334
|
-
} from "./index-
|
|
335
|
-
import"./index-
|
|
334
|
+
} from "./index-hs9xxmmy.js";
|
|
335
|
+
import"./index-0ab398z2.js";
|
|
336
336
|
import"./index-52x68mj4.js";
|
|
337
|
-
import"./index-
|
|
338
|
-
import"./index-
|
|
337
|
+
import"./index-g59gpt1j.js";
|
|
338
|
+
import"./index-gwb2wpz7.js";
|
|
339
339
|
import {
|
|
340
340
|
isDreamerRunnable,
|
|
341
341
|
isSmartNoteSurfaceAvailable,
|
|
@@ -8203,7 +8203,7 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
8203
8203
|
// package.json
|
|
8204
8204
|
var package_default = {
|
|
8205
8205
|
name: "@cortexkit/opencode-magic-context",
|
|
8206
|
-
version: "0.49.
|
|
8206
|
+
version: "0.49.64",
|
|
8207
8207
|
type: "module",
|
|
8208
8208
|
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
8209
8209
|
main: "dist/index.js",
|
|
@@ -12081,7 +12081,7 @@ async function setup(context) {
|
|
|
12081
12081
|
if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
|
|
12082
12082
|
log2(`[magic-context] Magic Context storage is at ${storageDir}, outside the folder Engram backs up (~/.local/share/cortexkit/magic-context). It is not included in CortexKit backups.`);
|
|
12083
12083
|
}
|
|
12084
|
-
const { registerContext } = await import("./context-
|
|
12084
|
+
const { registerContext } = await import("./context-v1apxpct.js");
|
|
12085
12085
|
setHarness2("opencode2");
|
|
12086
12086
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
12087
12087
|
const duties = await registerContext(context);
|
|
@@ -12554,7 +12554,7 @@ var server = async (ctx) => {
|
|
|
12554
12554
|
rustReplayParticipant: () => magicContextRuntime.magicContext?.getRustReplayParticipant?.() ?? null,
|
|
12555
12555
|
onStorageBusyRefusal: async (sessionId, message) => {
|
|
12556
12556
|
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-ykvt5k2s.js"));
|
|
12557
|
-
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-
|
|
12557
|
+
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-jjc9jcer.js"));
|
|
12558
12558
|
await sendStatusNotification(ctx.client, sessionId, message, {
|
|
12559
12559
|
toastDurationMs: 15000
|
|
12560
12560
|
});
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
yieldIndexChunk2
|
|
5
5
|
} from "./index-gzy5w8ya.js";
|
|
6
6
|
import"./index-1zx87sdm.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-kvfrse61.js";
|
|
8
8
|
import"./index-5vsk2cpp.js";
|
|
9
9
|
import"./index-pavzsdc6.js";
|
|
10
10
|
import"./index-ywrz4wy2.js";
|
|
@@ -17,7 +17,7 @@ import"./index-1d042x6w.js";
|
|
|
17
17
|
import"./index-q7q6qp1f.js";
|
|
18
18
|
import"./index-58e3y90n.js";
|
|
19
19
|
import"./index-x40zr813.js";
|
|
20
|
-
import"./index-
|
|
20
|
+
import"./index-6kgsfb81.js";
|
|
21
21
|
import {
|
|
22
22
|
MESSAGE_INDEX_MAX_FTS_BYTES,
|
|
23
23
|
messageIndexSkipKey,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
markMessageIndexDirty,
|
|
26
26
|
getIndexableContent,
|
|
27
27
|
indexSingleMessage
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-7dj3s7qq.js";
|
|
29
29
|
import"./index-s32f8y67.js";
|
|
30
30
|
import"./index-m0pwswv9.js";
|
|
31
31
|
|
package/dist/migration-worker.js
CHANGED
|
@@ -19,7 +19,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
19
19
|
await main();
|
|
20
20
|
async function main() {
|
|
21
21
|
if (input.v2ArchiveReader) {
|
|
22
|
-
const { serveV2ArchiveReads } = await import("./v2-archive-reader-
|
|
22
|
+
const { serveV2ArchiveReads } = await import("./v2-archive-reader-cv6veqnz.js");
|
|
23
23
|
await serveV2ArchiveReads(port, openConnections);
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
@@ -51,7 +51,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
51
51
|
await runMessageFtsRowidMapBackfill(db);
|
|
52
52
|
reply = { kind: "fts-rowid-backfill" };
|
|
53
53
|
} else if (input.searchArchive) {
|
|
54
|
-
const { renderSearchArchive } = await import("./search-archive-
|
|
54
|
+
const { renderSearchArchive } = await import("./search-archive-9k6vsp44.js");
|
|
55
55
|
const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-3sc9231y.js");
|
|
56
56
|
const archive = input.searchArchive;
|
|
57
57
|
let raw;
|
|
@@ -81,7 +81,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
81
81
|
const { setHarness } = await import("./harness-e4avh192.js");
|
|
82
82
|
setHarness(input.harness ?? "opencode");
|
|
83
83
|
const [{ indexMessageInShortChunks }, { configureContextDatabasePragmas }] = await Promise.all([
|
|
84
|
-
import("./message-index-bounded-
|
|
84
|
+
import("./message-index-bounded-zs7ah2te.js"),
|
|
85
85
|
import("./sqlite-context-pragmas-mv9jqwjh.js")
|
|
86
86
|
]);
|
|
87
87
|
configureContextDatabasePragmas(db);
|
|
@@ -95,7 +95,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
95
95
|
measurements: result.measurements
|
|
96
96
|
};
|
|
97
97
|
} else if (input.tagRatio !== undefined) {
|
|
98
|
-
const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-
|
|
98
|
+
const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-2r952wqy.js");
|
|
99
99
|
const delta = input.tagState ? scanTagOwnerDelta(db, input.sessionId, input.tagState) : null;
|
|
100
100
|
if (delta)
|
|
101
101
|
reply = { kind: "tag-delta", delta };
|
|
@@ -38,8 +38,8 @@ import {
|
|
|
38
38
|
readSessionChunk2,
|
|
39
39
|
getRawSessionMessageIdsThrough2,
|
|
40
40
|
readRawSessionSeedTail2
|
|
41
|
-
} from "./index-
|
|
42
|
-
import"./index-
|
|
41
|
+
} from "./index-6kgsfb81.js";
|
|
42
|
+
import"./index-kvfrse61.js";
|
|
43
43
|
import"./index-1zx87sdm.js";
|
|
44
44
|
import"./index-x40zr813.js";
|
|
45
45
|
import"./index-6nqz8hsz.js";
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
setRecompTerminal2,
|
|
8
8
|
buildRecompDeps2,
|
|
9
9
|
runManagedRecomp2
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
} from "./index-m568xww6.js";
|
|
11
|
+
import"./index-zdd01nhc.js";
|
|
12
12
|
import"./index-832w615x.js";
|
|
13
13
|
import"./index-sd3egckz.js";
|
|
14
14
|
import"./index-n6aye6ny.js";
|
|
@@ -16,16 +16,16 @@ import"./index-zxj39ba2.js";
|
|
|
16
16
|
import"./index-jjvbk92s.js";
|
|
17
17
|
import"./index-gq1g9a3a.js";
|
|
18
18
|
import"./index-4dhv7mqz.js";
|
|
19
|
-
import"./index-
|
|
19
|
+
import"./index-ezr8mr1c.js";
|
|
20
20
|
import"./index-tebcx987.js";
|
|
21
|
-
import"./index-
|
|
21
|
+
import"./index-7dj3s7qq.js";
|
|
22
22
|
import"./index-2amn2s73.js";
|
|
23
23
|
import"./index-6athgjba.js";
|
|
24
24
|
import"./index-ngwmx6nt.js";
|
|
25
25
|
import"./index-1sq1krqw.js";
|
|
26
26
|
import"./index-qt1qqasc.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
import"./index-6kgsfb81.js";
|
|
28
|
+
import"./index-kvfrse61.js";
|
|
29
29
|
import"./index-1zx87sdm.js";
|
|
30
30
|
import"./index-x40zr813.js";
|
|
31
31
|
import"./index-x8a7jmkh.js";
|
|
@@ -35,7 +35,7 @@ import"./index-6nqz8hsz.js";
|
|
|
35
35
|
import"./index-jg7sbt3v.js";
|
|
36
36
|
import"./index-snbpdpa3.js";
|
|
37
37
|
import"./index-pxnzyvjc.js";
|
|
38
|
-
import"./index-
|
|
38
|
+
import"./index-qn27gh4e.js";
|
|
39
39
|
import"./index-fb3zxn06.js";
|
|
40
40
|
import"./index-xx05vta0.js";
|
|
41
41
|
import"./index-fr0wbhdn.js";
|
|
@@ -2,20 +2,20 @@ import {
|
|
|
2
2
|
renderMessageByOrdinal2,
|
|
3
3
|
renderVerboseRangeForTool2,
|
|
4
4
|
renderItemByTag2
|
|
5
|
-
} from "./index-
|
|
6
|
-
import"./index-
|
|
5
|
+
} from "./index-0ab398z2.js";
|
|
6
|
+
import"./index-ezr8mr1c.js";
|
|
7
7
|
import"./index-tebcx987.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-7dj3s7qq.js";
|
|
9
9
|
import"./index-2amn2s73.js";
|
|
10
10
|
import"./index-6athgjba.js";
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
11
|
+
import"./index-6kgsfb81.js";
|
|
12
|
+
import"./index-kvfrse61.js";
|
|
13
13
|
import"./index-1zx87sdm.js";
|
|
14
14
|
import"./index-x40zr813.js";
|
|
15
15
|
import"./index-6nqz8hsz.js";
|
|
16
16
|
import"./index-snbpdpa3.js";
|
|
17
17
|
import"./index-pxnzyvjc.js";
|
|
18
|
-
import"./index-
|
|
18
|
+
import"./index-qn27gh4e.js";
|
|
19
19
|
import"./index-fb3zxn06.js";
|
|
20
20
|
import"./index-xx05vta0.js";
|
|
21
21
|
import"./index-fr0wbhdn.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderSearchArchive2,
|
|
3
3
|
renderSearchArchiveOffThread2
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
4
|
+
} from "./index-gwb2wpz7.js";
|
|
5
|
+
import"./index-g59gpt1j.js";
|
|
6
6
|
import"./index-52x68mj4.js";
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
import"./index-6kgsfb81.js";
|
|
8
|
+
import"./index-kvfrse61.js";
|
|
9
9
|
import"./index-1zx87sdm.js";
|
|
10
10
|
import"./index-x40zr813.js";
|
|
11
11
|
import"./index-6nqz8hsz.js";
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
resolveMemoriesByIdsForSearch2,
|
|
6
6
|
unifiedSearch2,
|
|
7
7
|
formatSearchResults2
|
|
8
|
-
} from "./index-
|
|
9
|
-
import"./index-
|
|
8
|
+
} from "./index-c0k54yhd.js";
|
|
9
|
+
import"./index-71h616be.js";
|
|
10
10
|
import"./index-52x68mj4.js";
|
|
11
11
|
import"./index-n6aye6ny.js";
|
|
12
12
|
import"./index-zxj39ba2.js";
|
|
@@ -14,11 +14,11 @@ import"./index-jjvbk92s.js";
|
|
|
14
14
|
import"./index-gq1g9a3a.js";
|
|
15
15
|
import"./index-4dhv7mqz.js";
|
|
16
16
|
import"./index-tebcx987.js";
|
|
17
|
-
import"./index-
|
|
17
|
+
import"./index-7dj3s7qq.js";
|
|
18
18
|
import"./index-2amn2s73.js";
|
|
19
19
|
import"./index-qt1qqasc.js";
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
20
|
+
import"./index-6kgsfb81.js";
|
|
21
|
+
import"./index-kvfrse61.js";
|
|
22
22
|
import"./index-1zx87sdm.js";
|
|
23
23
|
import"./index-x40zr813.js";
|
|
24
24
|
import"./index-zb4h9nrk.js";
|