import type { AgentStreamEvent } from '../types/agent.js'; /** * Creates a default appender function for the current environment. * Uses process.stdout.write in Node.js and console.log in browsers. * @returns Appender function that writes text to the output destination */ export declare function getDefaultAppender(): (text: string) => void; /** * Interface for printing agent activity to a destination. * Implementations can output to stdout, console, HTML elements, etc. */ export interface Printer { /** * Write content to the output destination. * @param content - The content to write */ write(content: string): void; /** * Process a streaming event from the agent. * @param event - The event to process */ processEvent(event: AgentStreamEvent): void; } /** * Default implementation of the Printer interface. * Outputs text, reasoning, and tool execution activity to the configured appender. */ export declare class AgentPrinter implements Printer { private readonly _appender; private _inReasoningBlock; private _toolCount; private _needReasoningIndent; /** * Creates a new AgentPrinter. * @param appender - Function that writes text to the output destination */ constructor(appender: (text: string) => void); /** * Write content to the output destination. * @param content - The content to write */ write(content: string): void; /** * Process a streaming event from the agent. * Handles text deltas, reasoning content, and tool execution events. * @param event - The event to process */ processEvent(event: AgentStreamEvent): void; /** * Handle raw model stream events unwrapped from ModelStreamUpdateEvent. */ private handleModelStreamEvent; /** * Handle content block delta events (text or reasoning). */ private handleContentBlockDelta; /** * Write reasoning text with proper indentation after newlines. */ private writeReasoningText; /** * Handle content block start events. * Prints a subtle preview during streaming; the definitive announcement * (with numbering and status icon) comes in beforeToolCallEvent after hooks resolve. */ private handleContentBlockStart; /** * Handle content block stop events. * Closes reasoning blocks if we were in one. */ private handleContentBlockStop; /** * Handle before-tool-call events. * Announces the tool after hooks have resolved, so denied tools get a * distinct indicator instead of looking like they executed. */ private handleBeforeToolCall; /** * Handle before-tools events. * When all tools are batch-cancelled, prints a notice since no individual * BeforeToolCallEvent will fire. */ private handleBeforeTools; /** * Handle tool result events. * Outputs completion status. */ private handleToolResult; } //# sourceMappingURL=printer.d.ts.map