import type { Harness } from '@mastra/core/harness'; export interface HeadlessArgs { prompt?: string; timeout?: number; format: 'default' | 'json'; outputFormat?: 'text' | 'json' | 'stream-json'; continue_: boolean; model?: string; mode?: 'build' | 'plan' | 'fast'; thinkingLevel?: 'off' | 'low' | 'medium' | 'high' | 'xhigh'; settings?: string; thread?: string; title?: string; cloneThread: boolean; resourceId?: string; } /** Returns true if argv contains --prompt or -p, indicating headless mode. */ export declare function hasHeadlessFlag(argv: string[]): boolean; /** Parse CLI arguments for headless mode (--prompt, --timeout, --format, --output-format, --continue, --model, --mode, --thinking-level, --settings). */ export declare function parseHeadlessArgs(argv: string[]): HeadlessArgs; /** Truncate a string to `max` characters, appending "..." if truncated. */ export declare function truncate(s: string, max: number): string; export declare function printHeadlessUsage(): void; /** * Run headless mode: subscribe to harness events with auto-approval, * optionally resume a thread, send the prompt, and wait for completion. * * Returns the exit code (0 = success, 1 = error/aborted, 2 = timeout). */ export declare function runHeadless>(harness: Harness, args: HeadlessArgs & { prompt: string; }, effectiveDefaults?: Record): Promise; /** * Headless mode main entry point: parse arguments, read stdin, initialize * MastraCode, and run headless mode. */ export declare function headlessMain(predrainedInput?: string | null): Promise; //# sourceMappingURL=headless.d.ts.map