Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/compress-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,12 @@ export function withStagedCompressGuidance(text: string): string {
// compression was working. The rule states the marker contract explicitly and
// is appended to every nudge (the moment of highest temptation) and to the
// injected philosophy prompt (persistent; byte-stable constant, so
// prefix-cache safe).
// prefix-cache safe). #862 added the silence clause: in that deployment the
// model also NARRATED around genuine proxy executions — its own marker-style
// confirmation lines plus preambles/summaries (incl. non-English commentary)
// before and after each real compression.
const MARKER_INTEGRITY_NOTE =
"\n\n[ACP marker integrity: lines shaped like '📦 [ACP] Compressed …' or '❌ [ACP] … FAILED' are CONFIRMATION MARKERS emitted by the bili proxy itself, right after it executes a compress/decompress/search_context/acp_status call. They are not something you write. NEVER emit such a line as your own text — writing one fakes a state change that did not happen, and the proxy strips it. To compress, call the compress tool. To verify a compression landed, call acp_status and confirm the block count increased — a confirmation line you wrote yourself proves nothing.]";
"\n\n[ACP marker integrity: lines shaped like '📦 [ACP] Compressed …' or '❌ [ACP] … FAILED' are CONFIRMATION MARKERS emitted by the bili proxy itself, right after it executes a compress/decompress/search_context/acp_status call. They are not something you write. NEVER emit such a line as your own text — writing one fakes a state change that did not happen, and the proxy strips it. To compress, call the compress tool. To verify a compression landed, call acp_status and confirm the block count increased — a confirmation line you wrote yourself proves nothing. Execute these calls silently: no announcement or preamble before the call, and no completion summary, status line, or marker-style line after it — when the tool returns, continue the task directly as if the call had not happened.]";

/** Append the marker-integrity rule to a nudge or system-prompt text.
* Unconditional (unlike withStagedCompressGuidance): the rule must hold in
Expand Down
1 change: 1 addition & 0 deletions tests/marker-echo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ test("withMarkerIntegrityNote appends the anti-forgery rule", () => {
assert.ok(out.startsWith("Nudge: OVER-LIMIT T1"));
assert.ok(out.includes("NEVER emit such a line as your own text"));
assert.ok(out.includes("call acp_status and confirm the block count increased"));
assert.ok(out.includes("Execute these calls silently"), "#862: silence clause present");
});

test("responses passthrough strips a whole forged marker delta (fast-path bypass #717)", async () => {
Expand Down
Loading