// Scenario format for the mock agents. A scenario is a list of turns; the initial // prompt starts turn 0 and every prompt submitted afterwards starts the next turn. // It is read from /.peppa/mock-scenario.json. export type Action = | { say: string } // print an assistant message (the last one is the turn's final message) | { work: number } // animate a spinner for N ms (screen keeps changing) | { sleep: number } | { mcp: string; args?: Record } // call a peppa MCP tool | { permission: { tool: string; input: Record } } // claude: PermissionRequest | { ask: Array<{ question: string; options?: string[] }> } // claude: AskUserQuestion | { limit: true | { resetInSec?: number; reset?: "unknown" } } // usage limit: StopFailure (claude) / banner only (codex); resetInSec → "resets at HH:MM" | { hang: true } // freeze: no output, no input handling | { crash: number } // exit with this code | { clear: true } // claude: /clear (SessionEnd + SessionStart with a new id) | { exit: true }; // clean exit (code 0) export interface Scenario { turns: Action[][]; /** Used instead of `turns` when the CLI is started with a resume target. */ resumeTurns?: Action[][]; } export interface MockLogEntry { ev: string; [k: string]: unknown; }