opencode-acp 1.14.27-pr.370.110 → 1.14.27-pr.374.107
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/index.js +30 -153
- package/dist/index.js.map +1 -1
- package/dist/lib/compress/status.d.ts.map +1 -1
- package/dist/lib/config-validation.d.ts.map +1 -1
- package/dist/lib/config.d.ts +1 -33
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/hooks.d.ts.map +1 -1
- package/dist/lib/messages/index.d.ts +1 -1
- package/dist/lib/messages/index.d.ts.map +1 -1
- package/dist/lib/messages/inject/utils.d.ts +1 -0
- package/dist/lib/messages/inject/utils.d.ts.map +1 -1
- package/dist/lib/messages/reasoning-strip.d.ts +0 -42
- package/dist/lib/messages/reasoning-strip.d.ts.map +1 -1
- package/dist/lib/prompts/system.d.ts +1 -1
- package/dist/lib/prompts/system.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -909,10 +909,6 @@ var VALID_CONFIG_KEYS = /* @__PURE__ */ new Set([
|
|
|
909
909
|
"compress.preserveRecentMessages",
|
|
910
910
|
"compress.preserveRecentTokens",
|
|
911
911
|
"compress.preserveLastUserMessage",
|
|
912
|
-
"compress.stripProtectedReasoning",
|
|
913
|
-
"compress.stripProtectedReasoningThreshold",
|
|
914
|
-
"compress.stripProtectedReasoningProviders",
|
|
915
|
-
"compress.stripProtectedReasoningMinMessages",
|
|
916
912
|
"gc",
|
|
917
913
|
"gc.algorithm",
|
|
918
914
|
"gc.promotionThreshold",
|
|
@@ -1266,36 +1262,6 @@ function validateConfigTypes(config) {
|
|
|
1266
1262
|
actual: typeof compress.preserveLastUserMessage
|
|
1267
1263
|
});
|
|
1268
1264
|
}
|
|
1269
|
-
if (compress.stripProtectedReasoning !== void 0 && typeof compress.stripProtectedReasoning !== "boolean") {
|
|
1270
|
-
errors.push({
|
|
1271
|
-
key: "compress.stripProtectedReasoning",
|
|
1272
|
-
expected: "boolean",
|
|
1273
|
-
actual: typeof compress.stripProtectedReasoning
|
|
1274
|
-
});
|
|
1275
|
-
}
|
|
1276
|
-
if (compress.stripProtectedReasoningThreshold !== void 0 && (typeof compress.stripProtectedReasoningThreshold !== "number" || !Number.isFinite(compress.stripProtectedReasoningThreshold) || compress.stripProtectedReasoningThreshold < 0)) {
|
|
1277
|
-
errors.push({
|
|
1278
|
-
key: "compress.stripProtectedReasoningThreshold",
|
|
1279
|
-
expected: "number (>= 0)",
|
|
1280
|
-
actual: JSON.stringify(compress.stripProtectedReasoningThreshold)
|
|
1281
|
-
});
|
|
1282
|
-
}
|
|
1283
|
-
if (compress.stripProtectedReasoningProviders !== void 0 && (!Array.isArray(compress.stripProtectedReasoningProviders) || !compress.stripProtectedReasoningProviders.every(
|
|
1284
|
-
(entry) => typeof entry === "string" && entry.trim() !== ""
|
|
1285
|
-
))) {
|
|
1286
|
-
errors.push({
|
|
1287
|
-
key: "compress.stripProtectedReasoningProviders",
|
|
1288
|
-
expected: 'string[] (non-empty strings; "*" = all providers)',
|
|
1289
|
-
actual: JSON.stringify(compress.stripProtectedReasoningProviders)
|
|
1290
|
-
});
|
|
1291
|
-
}
|
|
1292
|
-
if (compress.stripProtectedReasoningMinMessages !== void 0 && (typeof compress.stripProtectedReasoningMinMessages !== "number" || !Number.isInteger(compress.stripProtectedReasoningMinMessages) || compress.stripProtectedReasoningMinMessages < 0)) {
|
|
1293
|
-
errors.push({
|
|
1294
|
-
key: "compress.stripProtectedReasoningMinMessages",
|
|
1295
|
-
expected: "integer (>= 0)",
|
|
1296
|
-
actual: JSON.stringify(compress.stripProtectedReasoningMinMessages)
|
|
1297
|
-
});
|
|
1298
|
-
}
|
|
1299
1265
|
if (typeof compress.iterationNudgeThreshold === "number" && compress.iterationNudgeThreshold < 1) {
|
|
1300
1266
|
errors.push({
|
|
1301
1267
|
key: "compress.iterationNudgeThreshold",
|
|
@@ -1693,11 +1659,7 @@ var defaultConfig = {
|
|
|
1693
1659
|
lastSegmentSoftBlock: true,
|
|
1694
1660
|
preserveRecentMessages: 5,
|
|
1695
1661
|
preserveRecentTokens: 5e3,
|
|
1696
|
-
preserveLastUserMessage: true
|
|
1697
|
-
stripProtectedReasoning: true,
|
|
1698
|
-
stripProtectedReasoningThreshold: 0,
|
|
1699
|
-
stripProtectedReasoningProviders: ["anthropic", "gemini"],
|
|
1700
|
-
stripProtectedReasoningMinMessages: 100
|
|
1662
|
+
preserveLastUserMessage: true
|
|
1701
1663
|
},
|
|
1702
1664
|
gc: {
|
|
1703
1665
|
algorithm: "truncate",
|
|
@@ -1867,11 +1829,7 @@ function mergeCompress(base, override) {
|
|
|
1867
1829
|
lastSegmentSoftBlock: override.lastSegmentSoftBlock ?? base.lastSegmentSoftBlock,
|
|
1868
1830
|
preserveRecentMessages: override.preserveRecentMessages ?? base.preserveRecentMessages,
|
|
1869
1831
|
preserveRecentTokens: override.preserveRecentTokens ?? base.preserveRecentTokens,
|
|
1870
|
-
preserveLastUserMessage: override.preserveLastUserMessage ?? base.preserveLastUserMessage
|
|
1871
|
-
stripProtectedReasoning: override.stripProtectedReasoning ?? base.stripProtectedReasoning,
|
|
1872
|
-
stripProtectedReasoningThreshold: override.stripProtectedReasoningThreshold ?? base.stripProtectedReasoningThreshold,
|
|
1873
|
-
stripProtectedReasoningProviders: Array.isArray(override.stripProtectedReasoningProviders) ? [...override.stripProtectedReasoningProviders] : base.stripProtectedReasoningProviders,
|
|
1874
|
-
stripProtectedReasoningMinMessages: override.stripProtectedReasoningMinMessages ?? base.stripProtectedReasoningMinMessages
|
|
1832
|
+
preserveLastUserMessage: override.preserveLastUserMessage ?? base.preserveLastUserMessage
|
|
1875
1833
|
};
|
|
1876
1834
|
}
|
|
1877
1835
|
function mergeCommands(base, override) {
|
|
@@ -6861,6 +6819,7 @@ function estimateContextComposition(messages, state, protectedTools = [], protec
|
|
|
6861
6819
|
let summaryTokens = 0;
|
|
6862
6820
|
let messageTokens = 0;
|
|
6863
6821
|
let protectedTokens = 0;
|
|
6822
|
+
let reasoningTokens = 0;
|
|
6864
6823
|
const perMessage = [];
|
|
6865
6824
|
const perTool = [];
|
|
6866
6825
|
const perCode = [];
|
|
@@ -6914,6 +6873,10 @@ function estimateContextComposition(messages, state, protectedTools = [], protec
|
|
|
6914
6873
|
summaryTokens += summaryPartTokens;
|
|
6915
6874
|
toolTypeMap.set(toolName, (toolTypeMap.get(toolName) || 0) + toolPartTokens);
|
|
6916
6875
|
if (!msgToolName) msgToolName = toolName;
|
|
6876
|
+
} else if (part.type === "reasoning" && typeof part.text === "string") {
|
|
6877
|
+
const tokens = Math.round(part.text.length / 4);
|
|
6878
|
+
msgTotal += tokens;
|
|
6879
|
+
reasoningTokens += tokens;
|
|
6917
6880
|
}
|
|
6918
6881
|
}
|
|
6919
6882
|
if (isProtected && !isSummary) {
|
|
@@ -6941,7 +6904,8 @@ function estimateContextComposition(messages, state, protectedTools = [], protec
|
|
|
6941
6904
|
textTokens: Math.max(0, messageTokens - codeTokens),
|
|
6942
6905
|
systemTokens,
|
|
6943
6906
|
protectedTokens,
|
|
6944
|
-
|
|
6907
|
+
reasoningTokens,
|
|
6908
|
+
total: systemTokens + toolTokens + summaryTokens + messageTokens + reasoningTokens,
|
|
6945
6909
|
largestRanges: perMessage.slice(0, 15),
|
|
6946
6910
|
largestToolRanges: perTool.slice(0, 15),
|
|
6947
6911
|
largestCodeRanges: perCode.slice(0, 5),
|
|
@@ -8136,7 +8100,7 @@ This is an efficiency nudge to compress early and keep context lean \u2014 not a
|
|
|
8136
8100
|
${COMPRESS_PHILOSOPHY}` : "";
|
|
8137
8101
|
const sysPart = composition.systemTokens > 0 ? `${fmt(composition.systemTokens)} system (${pct2(composition.systemTokens)}%) | ` : "";
|
|
8138
8102
|
let breakdown = `${efficiencyNote}
|
|
8139
|
-
Breakdown: ${sysPart}${fmt(composition.toolTokens)} tool (${pct2(composition.toolTokens)}%) | ${fmt(composition.summaryTokens)} summaries (${pct2(composition.summaryTokens)}%) | ${fmt(composition.codeTokens)} code (${pct2(composition.codeTokens)}%) | ${fmt(plainTextTokens)} text (${pct2(plainTextTokens)}%)${growthStr}`;
|
|
8103
|
+
Breakdown: ${sysPart}${fmt(composition.toolTokens)} tool (${pct2(composition.toolTokens)}%) | ${fmt(composition.summaryTokens)} summaries (${pct2(composition.summaryTokens)}%) | ${fmt(composition.codeTokens)} code (${pct2(composition.codeTokens)}%) | ${fmt(plainTextTokens)} text (${pct2(plainTextTokens)}%) | ${fmt(composition.reasoningTokens)} reasoning (${pct2(composition.reasoningTokens)}%)${growthStr}`;
|
|
8140
8104
|
const compressibleTokens = composition.total - composition.systemTokens - composition.protectedTokens - composition.summaryTokens;
|
|
8141
8105
|
if (composition.protectedTokens > 0) {
|
|
8142
8106
|
breakdown += `
|
|
@@ -8304,76 +8268,6 @@ function stripStaleMetadata(messages) {
|
|
|
8304
8268
|
});
|
|
8305
8269
|
});
|
|
8306
8270
|
}
|
|
8307
|
-
function stripProtectedReasoning(messages, protectedTools, threshold, options) {
|
|
8308
|
-
if (protectedTools.length === 0) {
|
|
8309
|
-
return 0;
|
|
8310
|
-
}
|
|
8311
|
-
const allowedProviders = options?.allowedProviders;
|
|
8312
|
-
if (allowedProviders !== void 0) {
|
|
8313
|
-
if (allowedProviders.length === 0) {
|
|
8314
|
-
return 0;
|
|
8315
|
-
}
|
|
8316
|
-
if (!allowedProviders.some((entry) => entry.trim() === "*")) {
|
|
8317
|
-
const providerID = options?.providerID;
|
|
8318
|
-
if (providerID === void 0 || !allowedProviders.some(
|
|
8319
|
-
(entry) => providerID.toLowerCase().includes(entry.trim().toLowerCase())
|
|
8320
|
-
)) {
|
|
8321
|
-
return 0;
|
|
8322
|
-
}
|
|
8323
|
-
}
|
|
8324
|
-
}
|
|
8325
|
-
const minMessages = options?.minMessages;
|
|
8326
|
-
if (minMessages !== void 0 && minMessages > 0 && messages.length < minMessages) {
|
|
8327
|
-
return 0;
|
|
8328
|
-
}
|
|
8329
|
-
const lastUserMessage = getLastUserMessage(messages);
|
|
8330
|
-
if (!lastUserMessage || lastUserMessage.info.role !== "user") {
|
|
8331
|
-
return 0;
|
|
8332
|
-
}
|
|
8333
|
-
let lastUserIndex = -1;
|
|
8334
|
-
for (let i = messages.length - 1; i >= 0; i--) {
|
|
8335
|
-
if (messages[i] === lastUserMessage) {
|
|
8336
|
-
lastUserIndex = i;
|
|
8337
|
-
break;
|
|
8338
|
-
}
|
|
8339
|
-
}
|
|
8340
|
-
if (lastUserIndex <= 0) {
|
|
8341
|
-
return 0;
|
|
8342
|
-
}
|
|
8343
|
-
const protectedSet = new Set(protectedTools);
|
|
8344
|
-
let removed = 0;
|
|
8345
|
-
for (let i = 0; i < lastUserIndex; i++) {
|
|
8346
|
-
const message = messages[i];
|
|
8347
|
-
if (!message || message.info.role !== "assistant") {
|
|
8348
|
-
continue;
|
|
8349
|
-
}
|
|
8350
|
-
const parts = Array.isArray(message.parts) ? message.parts : [];
|
|
8351
|
-
let hasProtectedTool = false;
|
|
8352
|
-
let reasoningLength = 0;
|
|
8353
|
-
for (const part of parts) {
|
|
8354
|
-
if (part.type === "tool") {
|
|
8355
|
-
if (protectedSet.has(part.tool)) {
|
|
8356
|
-
hasProtectedTool = true;
|
|
8357
|
-
}
|
|
8358
|
-
} else if (part.type === "reasoning") {
|
|
8359
|
-
reasoningLength += part.text.length;
|
|
8360
|
-
}
|
|
8361
|
-
}
|
|
8362
|
-
if (!hasProtectedTool) {
|
|
8363
|
-
continue;
|
|
8364
|
-
}
|
|
8365
|
-
if (reasoningLength <= threshold) {
|
|
8366
|
-
continue;
|
|
8367
|
-
}
|
|
8368
|
-
const filtered = parts.filter((part) => part.type !== "reasoning");
|
|
8369
|
-
if (filtered.length === parts.length) {
|
|
8370
|
-
continue;
|
|
8371
|
-
}
|
|
8372
|
-
message.parts = filtered;
|
|
8373
|
-
removed += parts.length - filtered.length;
|
|
8374
|
-
}
|
|
8375
|
-
return removed;
|
|
8376
|
-
}
|
|
8377
8271
|
|
|
8378
8272
|
// lib/messages/priority.ts
|
|
8379
8273
|
function buildPriorityMap(_config, _state, _messages) {
|
|
@@ -9054,6 +8948,7 @@ function collectVisibleMessages(rawMessages, ctx) {
|
|
|
9054
8948
|
const ref = byRawId.get(msgId);
|
|
9055
8949
|
if (!ref) return;
|
|
9056
8950
|
let tokens = 0;
|
|
8951
|
+
let reasoning = 0;
|
|
9057
8952
|
let toolName = "";
|
|
9058
8953
|
for (const part of msg.parts || []) {
|
|
9059
8954
|
if (part.type === "text" && typeof part.text === "string") {
|
|
@@ -9064,10 +8959,12 @@ function collectVisibleMessages(rawMessages, ctx) {
|
|
|
9064
8959
|
if (!toolName) {
|
|
9065
8960
|
toolName = part?.tool || "unknown";
|
|
9066
8961
|
}
|
|
8962
|
+
} else if (part.type === "reasoning" && typeof part.text === "string") {
|
|
8963
|
+
reasoning += Math.round(part.text.length / 4);
|
|
9067
8964
|
}
|
|
9068
8965
|
}
|
|
9069
|
-
if (tokens > 0) {
|
|
9070
|
-
result.push({ ref, tokens, tool: toolName || "text", index: idx });
|
|
8966
|
+
if (tokens > 0 || reasoning > 0) {
|
|
8967
|
+
result.push({ ref, tokens, tool: toolName || "text", index: idx, reasoning });
|
|
9071
8968
|
}
|
|
9072
8969
|
});
|
|
9073
8970
|
return {
|
|
@@ -9089,14 +8986,16 @@ function renderOverview(visibleMessages, summaryTokens, systemTokens, blocks, fe
|
|
|
9089
8986
|
} else {
|
|
9090
8987
|
const totalTool = visibleMessages.filter((m) => m.tool !== "text" && m.tool !== "step-finish").reduce((s, m) => s + m.tokens, 0);
|
|
9091
8988
|
const totalText = visibleMessages.filter((m) => m.tool === "text").reduce((s, m) => s + m.tokens, 0);
|
|
9092
|
-
const
|
|
8989
|
+
const totalReasoning = visibleMessages.reduce((s, m) => s + m.reasoning, 0);
|
|
8990
|
+
const total = systemTokens + totalTool + totalText + summaryTokens + totalReasoning;
|
|
9093
8991
|
const sysPct = pct(systemTokens, total);
|
|
9094
8992
|
const toolPct = pct(totalTool, total);
|
|
9095
8993
|
const textPct = pct(totalText, total);
|
|
9096
8994
|
const summaryPct = pct(summaryTokens, total);
|
|
8995
|
+
const reasoningPct = pct(totalReasoning, total);
|
|
9097
8996
|
lines.push("CONTEXT BREAKDOWN");
|
|
9098
8997
|
lines.push(
|
|
9099
|
-
` ${formatTokens(systemTokens)} system (${sysPct}%) | ${formatTokens(totalTool)} tool (${toolPct}%) | ${formatTokens(totalText)} text (${textPct}%) | ${formatTokens(summaryTokens)} summaries (${summaryPct}%)`
|
|
8998
|
+
` ${formatTokens(systemTokens)} system (${sysPct}%) | ${formatTokens(totalTool)} tool (${toolPct}%) | ${formatTokens(totalText)} text (${textPct}%) | ${formatTokens(summaryTokens)} summaries (${summaryPct}%) | ${formatTokens(totalReasoning)} reasoning (${reasoningPct}%)`
|
|
9100
8999
|
);
|
|
9101
9000
|
const topTypes = Array.from(toolTypeMap.entries()).map(([tool6, tokens]) => ({ tool: tool6, tokens })).sort((a, b) => b.tokens - a.tokens).slice(0, 3);
|
|
9102
9001
|
if (topTypes.length > 0) {
|
|
@@ -9207,22 +9106,23 @@ function renderUncompressedDrilldown(visibleMessages, toolFilter, sort, limit) {
|
|
|
9207
9106
|
if (toolFilter) {
|
|
9208
9107
|
filtered = filtered.filter((m) => m.tool === toolFilter);
|
|
9209
9108
|
}
|
|
9109
|
+
const sizeOf = (m) => m.tokens + m.reasoning;
|
|
9210
9110
|
if (sort === "time") {
|
|
9211
9111
|
filtered.sort((a, b) => a.index - b.index);
|
|
9212
9112
|
} else if (sort === "tool") {
|
|
9213
|
-
filtered.sort((a, b) => a.tool.localeCompare(b.tool) || b
|
|
9113
|
+
filtered.sort((a, b) => a.tool.localeCompare(b.tool) || sizeOf(b) - sizeOf(a));
|
|
9214
9114
|
} else {
|
|
9215
|
-
filtered.sort((a, b) => b
|
|
9115
|
+
filtered.sort((a, b) => sizeOf(b) - sizeOf(a));
|
|
9216
9116
|
}
|
|
9217
|
-
const totalTokens = filtered.reduce((s, m) => s + m
|
|
9218
|
-
const allTokens = visibleMessages.reduce((s, m) => s + m
|
|
9117
|
+
const totalTokens = filtered.reduce((s, m) => s + sizeOf(m), 0);
|
|
9118
|
+
const allTokens = visibleMessages.reduce((s, m) => s + sizeOf(m), 0);
|
|
9219
9119
|
const header = toolFilter ? `UNCOMPRESSED \u2014 ${toolFilter}: ${formatTokens(totalTokens)} | ${filtered.length} msgs | ${pct(totalTokens, allTokens)}% of visible` : `UNCOMPRESSED \u2014 ${formatTokens(totalTokens)} | ${filtered.length} msgs`;
|
|
9220
9120
|
lines.push(header);
|
|
9221
9121
|
lines.push(`Sorted by ${sort}`);
|
|
9222
9122
|
lines.push("");
|
|
9223
9123
|
const shown = filtered.slice(0, limit);
|
|
9224
9124
|
for (const m of shown) {
|
|
9225
|
-
lines.push(` ${m.ref} (${formatTokens(m
|
|
9125
|
+
lines.push(` ${m.ref} (${formatTokens(sizeOf(m))}) ${m.tool}`);
|
|
9226
9126
|
}
|
|
9227
9127
|
if (filtered.length > shown.length) {
|
|
9228
9128
|
lines.push("");
|
|
@@ -9490,7 +9390,7 @@ import { writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
|
|
|
9490
9390
|
import { join as join3 } from "path";
|
|
9491
9391
|
import { existsSync as existsSync3 } from "fs";
|
|
9492
9392
|
import { homedir as homedir3 } from "os";
|
|
9493
|
-
var LOG_VERSION = true ? "1.14.27-pr.
|
|
9393
|
+
var LOG_VERSION = true ? "1.14.27-pr.374.107" : "dev";
|
|
9494
9394
|
var LEVEL_RANK = {
|
|
9495
9395
|
debug: 10,
|
|
9496
9396
|
info: 20,
|
|
@@ -9786,13 +9686,14 @@ CONTEXT BREAKDOWN
|
|
|
9786
9686
|
|
|
9787
9687
|
When context usage passes a threshold, the system appends a breakdown showing where your context tokens are spent:
|
|
9788
9688
|
|
|
9789
|
-
Breakdown:
|
|
9689
|
+
Breakdown: 4.2K system (21%) | 8.0K tool (40%) | 2.0K summaries (10%) | 2.6K code (13%) | 2.2K text (11%) | 1.0K reasoning (5%)
|
|
9790
9690
|
|
|
9791
9691
|
- "system" = system prompt tokens (AGENTS.md, tool definitions \u2014 not compressible)
|
|
9792
9692
|
- "tool" = tool call outputs (largest category \u2014 compress first when consumed)
|
|
9793
9693
|
- "summaries" = existing compression block summaries (already compressed; do not re-compress standalone)
|
|
9794
9694
|
- "code" = messages containing code blocks
|
|
9795
9695
|
- "text" = plain text messages
|
|
9696
|
+
- "reasoning" = model thinking blocks (counted to match real API usage; freed when their message is compressed)
|
|
9796
9697
|
|
|
9797
9698
|
Below the breakdown, the system lists compressible ranges grouped by conversation turn. All listed ranges should be compressed to summary format \u2014 the only exceptions are protected content, content the current step is actively using, or critical content you cannot reconstruct. Compress the largest ranges first when the current step no longer needs them.
|
|
9798
9699
|
|
|
@@ -11432,7 +11333,6 @@ function createChatMessageTransformHandler(client, registry4, logger, config, pr
|
|
|
11432
11333
|
return;
|
|
11433
11334
|
}
|
|
11434
11335
|
const lastUserMessage = getLastUserMessage(messages);
|
|
11435
|
-
const requestModel = lastUserMessage?.info?.model;
|
|
11436
11336
|
let state;
|
|
11437
11337
|
if (!lastUserMessage) {
|
|
11438
11338
|
state = createSessionState();
|
|
@@ -11443,6 +11343,7 @@ function createChatMessageTransformHandler(client, registry4, logger, config, pr
|
|
|
11443
11343
|
messages,
|
|
11444
11344
|
config
|
|
11445
11345
|
);
|
|
11346
|
+
const requestModel = lastUserMessage.info.model;
|
|
11446
11347
|
const requestModelLimit = registry4.resolveModelLimit(
|
|
11447
11348
|
requestModel?.providerID,
|
|
11448
11349
|
requestModel?.modelID
|
|
@@ -11507,30 +11408,6 @@ function createChatMessageTransformHandler(client, registry4, logger, config, pr
|
|
|
11507
11408
|
prune(state, logger, config, output.messages);
|
|
11508
11409
|
truncateLargeToolOutputs(state, config, logger, output.messages);
|
|
11509
11410
|
hideConsumedCompressCalls(state, output.messages);
|
|
11510
|
-
if (config.compress.stripProtectedReasoning !== false) {
|
|
11511
|
-
const removedReasoning = stripProtectedReasoning(
|
|
11512
|
-
output.messages,
|
|
11513
|
-
config.compress.protectedTools,
|
|
11514
|
-
config.compress.stripProtectedReasoningThreshold ?? 0,
|
|
11515
|
-
{
|
|
11516
|
-
// Prefer this request's provider from the user-message
|
|
11517
|
-
// model metadata; fall back to the cached identity pair
|
|
11518
|
-
// (undefined on the first request of a fresh session →
|
|
11519
|
-
// fail-closed).
|
|
11520
|
-
providerID: requestModel?.providerID ?? state.modelProviderID,
|
|
11521
|
-
allowedProviders: config.compress.stripProtectedReasoningProviders ?? [
|
|
11522
|
-
"anthropic",
|
|
11523
|
-
"gemini"
|
|
11524
|
-
],
|
|
11525
|
-
minMessages: config.compress.stripProtectedReasoningMinMessages ?? 100
|
|
11526
|
-
}
|
|
11527
|
-
);
|
|
11528
|
-
if (removedReasoning > 0) {
|
|
11529
|
-
logger.debug("stripProtectedReasoning: removed reasoning parts from historical protected messages", {
|
|
11530
|
-
removed: removedReasoning
|
|
11531
|
-
});
|
|
11532
|
-
}
|
|
11533
|
-
}
|
|
11534
11411
|
assignMessageRefs(state, output.messages);
|
|
11535
11412
|
const compressionPriorities = buildPriorityMap(config, state, output.messages);
|
|
11536
11413
|
prompts.reload();
|
|
@@ -11987,7 +11864,7 @@ var server = (async (ctx) => {
|
|
|
11987
11864
|
}
|
|
11988
11865
|
const logger = new Logger(config.debug, config.debug ? "debug" : config.logLevel);
|
|
11989
11866
|
logger.info("ACP plugin initialized", {
|
|
11990
|
-
version: true ? "1.14.27-pr.
|
|
11867
|
+
version: true ? "1.14.27-pr.374.107" : "dev",
|
|
11991
11868
|
workspace: ctx.directory,
|
|
11992
11869
|
logLevel: logger.level,
|
|
11993
11870
|
debug: config.debug,
|