import type { Truncation } from "./output.js"; export interface ToolOk { ok: true; data: T; warnings?: string[]; truncated?: Truncation[]; } export interface ToolError { ok: false; error: { code: string; message: string; details?: unknown; retryable?: boolean; }; } type TextContent = { type: "text"; text: string; }; export type ToolResult = { content: TextContent[]; isError?: true; }; export declare function ok(data: T, options?: { warnings?: string[]; truncated?: Truncation[]; }): ToolResult; export declare function fail(code: string, message: string, options?: { details?: unknown; retryable?: boolean; }): ToolResult; export declare function errorResult(error: unknown, code?: string): ToolResult; export {};