import type { AgentMessage } from '@earendil-works/pi-agent-core';
import type { Config } from '../../config/schema.js';
export declare const DEFAULT_MAX_LIVE_TOOL_RESULT_CHARS = 16000;
export declare const HARD_MAX_TOOL_RESULT_CHARS = 16000;
type ToolResultTruncationOptions = {
    suffix?: string | ((truncatedChars: number) => string);
    minKeepChars?: number;
};
export declare function truncateToolResultText(text: string, maxChars: number, options?: ToolResultTruncationOptions): string;
export declare function calculateMaxToolResultCharsWithCap(contextWindowTokens: number, hardCapChars: number): number;
export declare function resolveLiveToolResultMaxChars(params: {
    contextWindowTokens: number;
    cfg?: Config;
    agentId?: string | null;
}): number;
export declare function getToolResultTextLength(msg: AgentMessage): number;
export declare function truncateToolResultMessage(msg: AgentMessage, maxChars: number, options?: ToolResultTruncationOptions): AgentMessage;
export {};
