opencode-acp 1.14.27-pr.365.101 → 1.14.27-pr.367.104

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 CHANGED
@@ -2092,56 +2092,6 @@ var messageHasCompressAttempt = (message) => {
2092
2092
  const parts = Array.isArray(message.parts) ? message.parts : [];
2093
2093
  return parts.some((part) => part.type === "tool" && part.tool === "compress");
2094
2094
  };
2095
- var isCaptureOnlyCompress = (message) => {
2096
- if (!isMessageWithInfo(message)) {
2097
- return false;
2098
- }
2099
- if (message.info.role !== "assistant") {
2100
- return false;
2101
- }
2102
- const parts = Array.isArray(message.parts) ? message.parts : [];
2103
- let sawBoundary = false;
2104
- for (const part of parts) {
2105
- if (!(part.type === "tool" && part.tool === "compress")) {
2106
- continue;
2107
- }
2108
- for (const startId of extractCompressBoundaryIds(part.state?.input)) {
2109
- sawBoundary = true;
2110
- if (/^b\d+$/i.test(startId)) {
2111
- return false;
2112
- }
2113
- }
2114
- }
2115
- return sawBoundary;
2116
- };
2117
- function extractCompressBoundaryIds(rawInput) {
2118
- let content = [];
2119
- if (typeof rawInput === "string") {
2120
- try {
2121
- const parsed = JSON.parse(rawInput);
2122
- const c = parsed?.content;
2123
- content = Array.isArray(c) ? c : [];
2124
- } catch {
2125
- return [];
2126
- }
2127
- } else if (rawInput && typeof rawInput === "object") {
2128
- const c = rawInput.content;
2129
- content = Array.isArray(c) ? c : [];
2130
- }
2131
- const ids = [];
2132
- for (const entry of content) {
2133
- if (!entry || typeof entry !== "object") {
2134
- continue;
2135
- }
2136
- const { startId, endId } = entry;
2137
- for (const sid of [startId, endId]) {
2138
- if (typeof sid === "string" && sid.trim() !== "") {
2139
- ids.push(sid.trim());
2140
- }
2141
- }
2142
- }
2143
- return ids;
2144
- }
2145
2095
  var isIgnoredUserMessage = (message) => {
2146
2096
  if (!isMessageWithInfo(message)) {
2147
2097
  return false;
@@ -7831,11 +7781,8 @@ var injectCompressNudges = (state, config, logger, messages, prompts, compressio
7831
7781
  state.nudges.iterationNudgeAnchors.clear();
7832
7782
  state.nudges.lastNudgeShownTokens = void 0;
7833
7783
  state.nudges.lastToolOutputNudgeTokens = void 0;
7834
- const captureOnly = isCaptureOnlyCompress(lastCompressMsg);
7835
- if (!captureOnly) {
7836
- state.nudges.lastTier2NudgeTokens = currentTokens;
7837
- state.nudges.lastTier3NudgeTokens = currentTokens;
7838
- }
7784
+ state.nudges.lastTier2NudgeTokens = currentTokens;
7785
+ state.nudges.lastTier3NudgeTokens = currentTokens;
7839
7786
  const currentTurnHasSuccessfulCompress = messages.slice(currentTurnStart).some((m) => m.info.role === "assistant" && messageHasCompress(m));
7840
7787
  if (currentTurnHasSuccessfulCompress && wasNudgeTriggered && !state.nudges.compressBaselineSet) {
7841
7788
  const baseline = state.nudges.lastPerMessageNudgeTokens;
@@ -9431,7 +9378,7 @@ import { writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
9431
9378
  import { join as join3 } from "path";
9432
9379
  import { existsSync as existsSync3 } from "fs";
9433
9380
  import { homedir as homedir3 } from "os";
9434
- var LOG_VERSION = true ? "1.14.27-pr.365.101" : "dev";
9381
+ var LOG_VERSION = true ? "1.14.27-pr.367.104" : "dev";
9435
9382
  var LEVEL_RANK = {
9436
9383
  debug: 10,
9437
9384
  info: 20,
@@ -11904,7 +11851,7 @@ var server = (async (ctx) => {
11904
11851
  }
11905
11852
  const logger = new Logger(config.debug, config.debug ? "debug" : config.logLevel);
11906
11853
  logger.info("ACP plugin initialized", {
11907
- version: true ? "1.14.27-pr.365.101" : "dev",
11854
+ version: true ? "1.14.27-pr.367.104" : "dev",
11908
11855
  workspace: ctx.directory,
11909
11856
  logLevel: logger.level,
11910
11857
  debug: config.debug,