| 1 | import type { OrchestratorFixtureInput } from "../shared.ts"; |
| 2 | |
| 3 | export const PI_COMPACTION_MARKER = "compaction-marker-4Z7Q"; |
| 4 | const PI_COMPACTION_INSTRUCTED = `/compact keep the opaque marker ${PI_COMPACTION_MARKER}`; |
| 5 | const PI_COMPACTION_RECALL_PROMPT = |
| 6 | "Return the opaque marker I asked you to remember. Respond with only the marker."; |
| 7 | |
| 8 | /** |
| 9 | * Two compactions against a real Pi. The first, with custom instructions, |
| 10 | * comes after a single exchange, which Pi refuses as too small to compact. The |
| 11 | * second is a bare `/compact`, routed through the adapter's compactThread, |
| 12 | * after enough turns that Pi really summarizes. The recording workspace sets a |
| 13 | * tiny `keepRecentTokens` so a short conversation is compactable, and the last |
| 14 | * turn proves the summary kept the marker. |
| 15 | */ |
| 16 | export function piCompactionInput(): OrchestratorFixtureInput { |
| 17 | return { |
| 18 | steps: [ |
| 19 | { |
| 20 | type: "message", |
| 21 | text: `Remember the opaque marker ${PI_COMPACTION_MARKER} for later. Respond with exactly: compaction marker stored`, |
| 22 | }, |
| 23 | { type: "message", text: PI_COMPACTION_INSTRUCTED }, |
| 24 | { type: "message", text: "Respond with exactly: second compaction fixture turn" }, |
| 25 | { type: "message", text: "Respond with exactly: third compaction fixture turn" }, |
| 26 | { type: "message", text: "/compact" }, |
| 27 | { type: "message", text: PI_COMPACTION_RECALL_PROMPT }, |
| 28 | ], |
| 29 | }; |
| 30 | } |