opencode-acp 1.18.1-pr.432.183 → 1.18.1-pr.439.185
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
|
@@ -8209,7 +8209,7 @@ COMPRESSION CANDIDATES:
|
|
|
8209
8209
|
- EPISODE identifies a contiguous historical segment made from smaller units.
|
|
8210
8210
|
- Candidate entries are independent and non-overlapping, so they can be batched in one \`content[]\` array.
|
|
8211
8211
|
- Candidates are suggestions, not mandatory targets. Choose only content no longer needed for the current task and do not invent a target when none is listed.
|
|
8212
|
-
-
|
|
8212
|
+
- Listed candidates were validated against the current conversation when this nudge was built. Compress them directly; do not call \`acp_status\` before compressing. If a \`compress\` call fails on a stale ID, run \`acp_status\` once and re-issue using only the refs it reports.
|
|
8213
8213
|
- When the context limit is reached and candidates are listed, select at least one clearly stale candidate and call the \`compress\` tool in your next reply. Batch only additional candidates that are also clearly stale. Do not merely recommend compression.
|
|
8214
8214
|
</system-reminder>
|
|
8215
8215
|
`;
|
|
@@ -10571,7 +10571,7 @@ import { writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
|
|
|
10571
10571
|
import { join as join4 } from "path";
|
|
10572
10572
|
import { existsSync as existsSync4 } from "fs";
|
|
10573
10573
|
import { homedir as homedir3 } from "os";
|
|
10574
|
-
var LOG_VERSION = true ? "1.18.1-pr.
|
|
10574
|
+
var LOG_VERSION = true ? "1.18.1-pr.439.185" : "dev";
|
|
10575
10575
|
var LEVEL_RANK = {
|
|
10576
10576
|
debug: 10,
|
|
10577
10577
|
info: 20,
|
|
@@ -10805,7 +10805,7 @@ ACP may append a bounded list headed \`COMPRESSION CANDIDATES\` below a nudge or
|
|
|
10805
10805
|
- \`MICRO\` is one large plain message or one complete tool transaction, including every message needed to keep its tool call/result structure valid.
|
|
10806
10806
|
- \`EPISODE\` is a contiguous historical segment made from smaller adjacent units.
|
|
10807
10807
|
- Candidate ranges are independent, non-overlapping, and can be submitted together as separate \`content[]\` entries.
|
|
10808
|
-
- Choose candidates only when their content is no longer needed for the current task. Do not invent a target when no candidate is listed
|
|
10808
|
+
- Listed candidates were validated against the current conversation when the nudge or status report was built. Submit them directly with \`compress\`; do not call \`acp_status\` first. Choose candidates only when their content is no longer needed for the current task. Do not invent a target when no candidate is listed. If an arbitrary range is unavoidable, verify current visible IDs, protection boundaries, and complete tool-pair coverage first.
|
|
10809
10809
|
- Keep summaries self-contained and use the existing \`compress\` tool. Candidate labels do not replace the semantic judgment to preserve useful context.
|
|
10810
10810
|
- When a nudge lists a clearly stale candidate, call \`compress\` in that reply before continuing. A repeated nudge means compression was not completed; act on one clearly stale candidate rather than merely recommending compression.`;
|
|
10811
10811
|
var BREAKDOWN_TAIL_RANGES = `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.`;
|
|
@@ -10837,6 +10837,7 @@ When you see past \`compress\` tool calls in the conversation, their \`summary\`
|
|
|
10837
10837
|
- Do NOT echo, repeat, or continue summary content as your own output. Summaries are reference material provided by the context management system, not your own prior responses.
|
|
10838
10838
|
- Summaries may contain errors or simplifications. Use \`decompress\` to verify critical details before acting on them.
|
|
10839
10839
|
- The \`startId\`/\`endId\` in past compress calls are historical \u2014 do NOT reuse them as targets for new compress calls without verifying via \`acp_status\` that the range is still uncompressed.
|
|
10840
|
+
- If a \`compress\` call fails because a ref is stale or unknown, do NOT adjust ranges by arithmetic: run \`acp_status\`, then re-issue the \`compress\` in the same turn using only the refs it reports. Submit all target ranges in one batch call.
|
|
10840
10841
|
|
|
10841
10842
|
TOOLS
|
|
10842
10843
|
|
|
@@ -10884,8 +10885,6 @@ Summaries accumulate as the session grows. When tier-1 summaries pile up, the sy
|
|
|
10884
10885
|
|
|
10885
10886
|
To compress blocks: use block IDs as boundaries: \`compress({ content: [{ startId: "b3", endId: "b15", summary: "..." }] })\`. Multiple entries create separate blocks: \`compress({ content: [{ startId: "b3", endId: "b10", summary: "..." }, { startId: "b11", endId: "b20", summary: "..." }] })\`. This deactivates the consumed blocks and creates a new higher-tier block per entry. The system prompt at the trigger tells you which rules to follow.
|
|
10886
10887
|
|
|
10887
|
-
If you are unsure which \`mNNNNN\` refs are still compressible, or which blocks have already consumed which ranges, call \`acp_status\` first. It returns the visible context breakdown and the compressed block list.
|
|
10888
|
-
|
|
10889
10888
|
CONTEXT BREAKDOWN
|
|
10890
10889
|
|
|
10891
10890
|
When context usage passes a threshold, the system appends a breakdown showing where your context tokens are spent:
|
|
@@ -10908,7 +10907,7 @@ var SYSTEM = buildSystemPrompt(true);
|
|
|
10908
10907
|
|
|
10909
10908
|
// lib/prompts/compress-range.ts
|
|
10910
10909
|
var CANDIDATE_GUIDANCE_SECTION = `CANDIDATE GUIDANCE
|
|
10911
|
-
ACP may display a \`COMPRESSION CANDIDATES\` list in a nudge or \`acp_status\` report. A \`MICRO\` entry targets one large message or complete tool transaction; an \`EPISODE\` entry targets a contiguous historical segment. Displayed candidates are independent and non-overlapping, so they may be batched, but they are advisory: compress only entries whose content is no longer needed. When a nudge lists a clearly stale candidate, use its exact IDs and call \`compress\` before continuing. Keep current intent and active work visible
|
|
10910
|
+
ACP may display a \`COMPRESSION CANDIDATES\` list in a nudge or \`acp_status\` report. A \`MICRO\` entry targets one large message or complete tool transaction; an \`EPISODE\` entry targets a contiguous historical segment. Displayed candidates are independent and non-overlapping, so they may be batched, but they are advisory: compress only entries whose content is no longer needed. When a nudge lists a clearly stale candidate, use its exact IDs and call \`compress\` before continuing. Keep current intent and active work visible. Do not call \`acp_status\` before compressing listed candidates; if a \`compress\` call fails on a stale ID, run \`acp_status\` and re-issue using only the refs it reports.`;
|
|
10912
10911
|
function buildCompressRangePrompt(candidatesEnabled) {
|
|
10913
10912
|
const candidateGuidanceBlock = candidatesEnabled ? `${CANDIDATE_GUIDANCE_SECTION}
|
|
10914
10913
|
|
|
@@ -13276,7 +13275,7 @@ var server = (async (ctx) => {
|
|
|
13276
13275
|
}
|
|
13277
13276
|
const logger = new Logger(config.debug, config.debug ? "debug" : config.logLevel);
|
|
13278
13277
|
logger.info("ACP plugin initialized", {
|
|
13279
|
-
version: true ? "1.18.1-pr.
|
|
13278
|
+
version: true ? "1.18.1-pr.439.185" : "dev",
|
|
13280
13279
|
workspace: ctx.directory,
|
|
13281
13280
|
logLevel: logger.level,
|
|
13282
13281
|
debug: config.debug,
|