import { type DeterministicCommandExpansion } from '../../../core/runtime/command-expansion.js'; export interface PreviewableCommand { name: string; description?: string; source?: string; template?: string; /** Present only when an extension command's submission handler sends a * deterministic expanded user prompt. Immediate UI/dynamic commands omit it. */ expansion?: DeterministicCommandExpansion; } export interface LoadedCommandPreview { name: string; invocation: string; content: string; } /** Parse an untrusted broker command inventory. Bad entries are discarded so a * malformed extension registration cannot take down autocomplete or preview. */ export declare function parsePreviewableCommands(detail: string): PreviewableCommand[]; /** Parse prompt-template arguments exactly as pi does: whitespace separates * arguments except inside matching single or double quotes. */ export declare function parseCommandArgs(argsString: string): string[]; /** Expand pi's prompt-template placeholders without recursively expanding text * supplied by the user. Kept byte-compatible with pi's prompt expansion. */ export declare function substitutePromptArgs(content: string, args: string[]): string; /** Resolve the leading slash token in the live editor. Viewer builtins run * first, followed by extension commands and then pi prompt templates. Extension * matching deliberately uses only ASCII space: pi's `_tryExecuteExtensionCommand` * treats tabs and newlines as part of the command name, while template matching * accepts all whitespace. */ export declare function loadedCommandPreview(editorText: string, commands: ReadonlyArray): LoadedCommandPreview | undefined;