/** * Tool output serialization utilities. * Extracted from Agent.executeTools to allow reuse and consistent output handling. */ export interface ToolOutputSerializerOptions { perIterationOutputCapBytes?: number | undefined; estimator?: ((text: string) => number) | undefined; } export interface ToolOutputSerializeContext { toolName?: string | undefined; input?: unknown; /** * Optional reference to the Tool object. When present and the tool defines * a `serialize()` method, the serializer delegates to it instead of the * central `renderToolObject()` switch (P3 #21). */ tool?: { serialize?: (output: unknown, input: unknown) => string; } | undefined; } export declare function createToolOutputSerializer(opts?: ToolOutputSerializerOptions): { serialize: (value: unknown, context?: ToolOutputSerializeContext) => string; enforceCap: (text: string, remainingBudget: number) => { text: string; newBudget: number; }; capBytes: number; }; /** * Render a tool result body for inclusion in the `tool.executed` event. * Tool outputs can be large (file dumps, command output); UIs only want a * preview line, so cap at ~400 chars with an ellipsis marker. */ export declare function truncateForEvent(content: string, max?: number): string; export declare function sizeSignals(toolName: string | undefined, content: string): { outputBytes: number; outputTokens: number; outputLines: number | undefined; }; //# sourceMappingURL=tool-output-serializer.d.ts.map