/** * Print mode (single-shot): Send prompts, output result, exit. * * Used for: * - `pi -p "prompt"` - text output * - `pi --mode json "prompt"` - JSON event stream */ import type { ImageContent } from "@apholdings/jensen-ai"; import type { AgentSession } from "../core/agent-session.js"; import { type ProtocolStatusResourceLoader } from "../core/protocol-status.js"; /** * Options for print mode. */ export interface PrintModeOptions { /** Output mode: "text" for final response only, "json" for all events */ mode: "text" | "json"; /** Array of additional prompts to send after initialMessage */ messages?: string[]; /** First message to send (may contain @file content) */ initialMessage?: string; /** Images to attach to the initial message */ initialImages?: ImageContent[]; } interface PrintModeLocalCommandSession extends Pick { resourceLoader?: ProtocolStatusResourceLoader; isStreaming?: boolean; state?: { messages: ReadonlyArray<{ role: string; }>; }; steer?: (message: string) => Promise; getSteeringMessages?: () => readonly string[]; agent?: { continue(): Promise; }; } export declare function getPrintModeLocalCommandOutput(session: PrintModeLocalCommandSession, text: string): Promise; /** * Run in print (single-shot) mode. * Sends prompts to the agent and outputs the result. */ export declare function runPrintMode(session: AgentSession, options: PrintModeOptions): Promise; export {}; //# sourceMappingURL=print-mode.d.ts.map