import type { DaemonResponse } from "../daemon/protocol.js"; /** * Ergonomic `bp` command surface: a declarative table of CommandSpecs consumed by a small * hand-rolled parser (no CLI-framework dependency). Each spec maps a subcommand path to a * core tool name, ordered positionals, and typed flags. */ type FlagType = "string" | "number" | "boolean" | "string[]"; interface FlagDef { /** action-arg key this flag fills (defaults to the flag's long name). */ key?: string; type: FlagType; alias?: string; desc: string; } export interface CommandSpec { path: string[]; tool: string; positionals?: { key: string; required?: boolean; desc: string; }[]; flags?: Record; summary: string; } export declare const COMMANDS: CommandSpec[]; export interface Parsed { spec: CommandSpec; args: Record; json: boolean; help: boolean; } export declare class CliError extends Error { readonly code: number; constructor(message: string, code?: number); } /** Parse argv (already minus the command path is computed here) into a Parsed request. */ export declare function parseCommand(argv: string[]): Parsed; export declare function usageFor(spec: CommandSpec): string; export declare function topUsage(): string; /** Render a daemon response to stdout/stderr; returns the process exit code. */ export declare function render(res: DaemonResponse, json: boolean, hasOutputFile: boolean): number; export {}; //# sourceMappingURL=commands.d.ts.map