/** * `/modes` — list the context-inheritance modes (built-in + project-defined) and * what each expands to, plus `extractModeFlag`: the shared `--mode ` parser * used by the bundled workflow commands so `/code-review --mode isolated` (etc.) * sets a run-level default posture for every subagent in that run. */ import type { ExtensionAPI } from "@earendil-works/pi-coding-agent"; import { type ContextModeRegistry } from "./context-mode.js"; /** * Pull a `--mode ` or `--mode=` flag out of a raw args string, * returning the mode (if present) and the args with the flag removed. The flag * may appear anywhere; the remaining args keep their order. Case-insensitive on * the flag, not on the value. */ export declare function extractModeFlag(args: string): { mode?: string; rest: string; }; /** Build the active registry for a project (built-ins + its `contextModes`). */ export declare function buildRegistryForCwd(cwd: string): ContextModeRegistry; /** Plain-text listing of a registry, the default mode first then alphabetical. * `inherit` is hidden — it is a back-compat alias of `legacy` (identical set). */ export declare function renderModes(registry: ContextModeRegistry): string; /** Register `/modes`. Idempotent. */ export declare function registerModesCommand(pi: ExtensionAPI, opts: { cwd: string; }): void;