diff --git a/kernel/package-lock.json b/kernel/package-lock.json index bb7bd588bb..8a2c4491d7 100644 --- a/kernel/package-lock.json +++ b/kernel/package-lock.json @@ -1,12 +1,12 @@ { "name": "acp-kernel", - "version": "0.0.200", + "version": "0.0.201", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "acp-kernel", - "version": "0.0.200", + "version": "0.0.201", "license": "MIT", "devDependencies": { "@types/node": "^22.0.0", diff --git a/kernel/package.json b/kernel/package.json index d20ac004ac..5ac694d897 100644 --- a/kernel/package.json +++ b/kernel/package.json @@ -1,6 +1,6 @@ { "name": "acp-kernel", - "version": "0.0.200", + "version": "0.0.201", "description": "Framework-agnostic context-compression engine (model-driven, 3-tier LSM). Pure core: no host dependency.", "license": "MIT", "author": "ranxianglei", diff --git a/kernel/src/packs.ts b/kernel/src/packs.ts index a66232053d..044214f3b5 100644 --- a/kernel/src/packs.ts +++ b/kernel/src/packs.ts @@ -285,6 +285,7 @@ const LEAN_PROMPT_SECTIONS = { acpTags: [ `User/tool messages carry hidden \x3cacp\x3e refs such as m00123. Never echo the XML tags; use only refs in ACP tool calls.`, `Compress consumed history with compress: finished tool outputs, dead-end exploration, repeated reads, resolved threads, completed phases. Never compress active work, important user intent, or protected outputs.`, + `Compress receipts are authoritative stop signals: after a no-op, an "already compressed" receipt, or "No compressible ranges remain", issue no further compress calls until a receipt or nudge names ranges to fold or the user explicitly asks to compress.`, `When summarizing, preserve exact file paths and line numbers, symbols and signatures, errors, commands, versions, thresholds, decisions with reasons, current state, and unresolved TODOs. Never replace exact technical values with vague wording — a good summary is the primary carrier and makes recall unnecessary.`, `Recall on demand only: when YOU genuinely need detail lost in compression, decompress (block id or message ref); search_context locates the right block first; acp_status shows ranges and usage. Never run recall as a routine post-compress step.`, `Message refs remain stable across compression within the same session state. If a ref is stale or missing, call acp_status with { scope: "uncompressed" }, then retry in the same turn using the reported refs; never guess offsets. Batch target ranges in one call.`, diff --git a/kernel/tests/packs.test.ts b/kernel/tests/packs.test.ts index 9239918d95..9cc76fe081 100644 --- a/kernel/tests/packs.test.ts +++ b/kernel/tests/packs.test.ts @@ -170,6 +170,31 @@ test("lean acpTags carries BOTH the summary-trust guardrail and the post-compres ); }); +test("lean acpTags carries the receipt stop-signal clause after the standing compress bullet (#6930)", () => { + const pi = leanPack.surface.adapters?.pi as { + promptSections: Record; + }; + const tags = pi.promptSections.acpTags ?? ""; + const standing = "Compress consumed history with compress:"; + const stopClause = "Compress receipts are authoritative stop signals:"; + assert.ok(tags.includes(standing), "standing compress bullet must be present"); + assert.ok(tags.includes(stopClause), "stop-signal clause must be present"); + assert.ok( + tags.indexOf(stopClause) > tags.indexOf(standing), + "stop-signal clause must be positioned after the standing compress bullet", + ); + // The clause names the stop triggers and the two resume conditions — not a blanket ban. + for (const marker of [ + 'an "already compressed" receipt', + '"No compressible ranges remain"', + "issue no further compress calls", + "a receipt or nudge names ranges to fold", + "the user explicitly asks to compress", + ]) { + assert.ok(tags.includes(marker), `missing stop/resume detail: ${marker}`); + } +}); + test("lean acpTags states ref stability across compression (no false renumbering claim, #417)", () => { const pi = leanPack.surface.adapters?.pi as { promptSections: Record; diff --git a/package-lock.json b/package-lock.json index dd0c2f32d2..72519f7f77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -51,7 +51,7 @@ }, "kernel": { "name": "acp-kernel", - "version": "0.0.200", + "version": "0.0.201", "dev": true, "license": "MIT", "devDependencies": {