/** * v0.3.0 — slash command bot-side parsing. * * The PM SKILL.md already instructs the model to recognize 5 slash prefixes * (`/think /plan /build /review /ship`) and act differently for each. This * module gives the bot a tiny pre-processor so it can: * 1. Validate that the prefix is a recognized command (typo detection) * 2. Optionally enrich the forwarded user text with a structured wrapper * (`[SLASH /plan] `) so the PM has a stable parse signal even * when the user types it informally. * 3. Print a help message in #owner-command for unknown slashes. * * We do NOT execute slash commands ourselves — the PM remains in charge of * what `/plan` actually means. This keeps the slash semantics in prompt * land, where iteration is cheap. */ export declare const KNOWN_SLASHES: Set; export interface SlashCommand { command: string; args: string; } /** Parse the leading slash command from a user message, if any. */ export declare function parseSlash(input: string): SlashCommand | null; export interface SlashHandlingResult { /** Text to forward to PM (possibly wrapped). May differ from input. */ forwardText: string; /** Optional message to reply to the user directly (e.g. /help, unknown). */ directReply?: string; /** If true, do not forward to PM (only directReply matters). */ shortCircuit?: boolean; /** * v1.2.9 §D — `/cancel`: abort the in-flight Chief turn for this session. * Handled bot-side (calls `chiefRunner.cancelTurn`), never forwarded to PM. * Must be checked BEFORE the session mutex so it isn't queued behind the * very turn it means to cancel. */ cancel?: boolean; /** * v1.2.9 §E — `/grant` (true) / `/revoke` (false): flip the workspace * dev-capability master toggle so agents can (or can't) write files + run * git. Handled bot-side (config write), never forwarded to PM. */ grant?: boolean; } /** * Normalize a user message for PM consumption. If the message begins with a * recognized slash, wrap it in a clear marker so PM SKILL.md can act on it * deterministically. Unknown slashes are reported back with a help hint. */ export declare function handleSlashIfAny(input: string): SlashHandlingResult;