import type { AgentToolResult } from "@oh-my-pi/pi-agent-core"; import type { ImageContent, TextContent } from "@oh-my-pi/pi-ai"; import type { OutputSummary, TruncationResult } from "@oh-my-pi/pi-tui/tools/streaming-output"; import type { MinimizedMeta, OutputMeta } from "@oh-my-pi/pi-tui/tools/output-meta"; import type { LimitsInput, TruncationMetaInput, TruncationSummaryOptions, TruncationTextOptions } from "./output-meta.js"; type ToolContent = Array; type DetailsWithMeta = { meta?: OutputMeta; }; export declare class ToolResultBuilder { #private; constructor(details?: TDetails); text(text: string): this; content(content: ToolContent): this; truncation(result: TruncationResult, options: TruncationMetaInput): this; truncationFromSummary(summary: OutputSummary, options: TruncationSummaryOptions): this; truncationFromText(text: string, options: TruncationTextOptions): this; limits(limits: LimitsInput): this; sourceUrl(value: string): this; sourcePath(value: string): this; sourceInternal(value: string): this; /** Mark the result as a bounded page of a file its source re-reads with line selectors. */ pagedSource(): this; diagnostics(summary: string, messages: string[]): this; /** Record the bash minimizer's rewrite of this output, when there was one. */ minimized(value: MinimizedMeta | undefined): this; /** Flag the result as a non-throwing failure (agent-loop surfaces it as a tool error). */ error(value?: boolean): this; /** Marks the result contextually useless — compaction may elide it once consumed. */ useless(value?: boolean): this; done(): AgentToolResult; } export declare function toolResult(details?: TDetails): ToolResultBuilder; export {};