import type { ChatEnvelope } from './types/chat-envelope.js';
import type { AdapterContext } from './types/chat-envelope.js';
type ToolHistoryStatus = 'ok' | 'error' | 'unknown';
export interface ToolHistoryMessageRecord {
    role: 'user' | 'assistant' | 'tool';
    toolUse?: {
        id: string;
        name?: string;
    };
    toolResult?: {
        id: string;
        name?: string;
        status: ToolHistoryStatus;
    };
    ts: string;
}
export interface ToolSessionHistory {
    lastMessages: ToolHistoryMessageRecord[];
    pendingToolUses: Record<string, {
        name?: string;
        ts: string;
    }>;
    updatedAt: string;
}
export declare function applyToolSessionCompat(chat: ChatEnvelope, ctx: AdapterContext): Promise<void>;
export {};
