import type { StyledOutput, SendMessageMarker } from '../services/CommandService.js';
import type { TuiAgentBackend } from '../agent-backend.js';
export interface CommandResult {
    type: 'command' | 'prompt';
    command?: string;
    args?: string[];
    rawInput: string;
}
/**
 * Command handler return type:
 * - boolean: Command handled (true) or not found (false)
 * - string: Output text to display
 * - StyledOutput: Styled output with structured data for rich rendering
 * - SendMessageMarker: Send text through normal streaming flow (for prompt commands)
 */
export type CommandHandlerResult = boolean | string | StyledOutput | SendMessageMarker;
/**
 * Context passed to command handlers
 */
export interface CommandContext {
    /** Current session ID, or null if no active session */
    sessionId: string | null;
    /** Source config file path for persistence and display (if available) */
    configFilePath: string | null;
}
export interface CommandDefinition {
    name: string;
    description: string;
    usage: string;
    category?: string;
    aliases?: string[];
    subcommands?: CommandDefinition[];
    handler: (args: string[], agent: TuiAgentBackend, ctx: CommandContext) => Promise<CommandHandlerResult>;
}
/**
 * No-op handler for overlay-only commands.
 * Used by commands in ALWAYS_OVERLAY that are handled entirely by the overlay system.
 */
export declare const overlayOnlyHandler: () => Promise<CommandHandlerResult>;
/**
 * Parses user input to determine if it's a slash command, shell command, or regular prompt
 */
export declare function parseInput(input: string): CommandResult;
/**
 * Finds command suggestions based on partial input
 */
export declare function getCommandSuggestions(partial: string, commands: CommandDefinition[]): string[];
/**
 * Formats help text for a command
 */
export declare function formatCommandHelp(cmd: CommandDefinition, detailed?: boolean): string;
/**
 * Displays a formatted list of all available commands
 */
export declare function displayAllCommands(commands: CommandDefinition[]): void;
//# sourceMappingURL=command-parser.d.ts.map