import type { AgentMessage, AgentTool } from "@mariozechner/pi-agent-core"; import type { SessionManager } from "@mariozechner/pi-coding-agent"; import type { TSchema } from "@sinclair/typebox"; import type { OpenClawConfig } from "../../config/config.js"; import type { ProviderRuntimeModel } from "../../plugins/types.js"; import type { TranscriptPolicy } from "../transcript-policy.js"; export declare function findUnsupportedSchemaKeywords(schema: unknown, path: string): string[]; export declare function sanitizeToolsForGoogle(params: { tools: AgentTool[]; provider: string; config?: OpenClawConfig; workspaceDir?: string; env?: NodeJS.ProcessEnv; modelId?: string; modelApi?: string | null; model?: ProviderRuntimeModel; }): AgentTool[]; export declare function logToolSchemasForGoogle(params: { tools: AgentTool[]; provider: string; config?: OpenClawConfig; workspaceDir?: string; env?: NodeJS.ProcessEnv; modelId?: string; modelApi?: string | null; model?: ProviderRuntimeModel; }): void; export type CompactionFailureListener = (reason: string) => void; /** * Register a listener for unhandled compaction failures. * Called when auto-compaction fails in a way that escapes the normal try-catch, * e.g., when the summarization request itself exceeds the model's token limit. * Returns an unsubscribe function. */ export declare function onUnhandledCompactionFailure(cb: CompactionFailureListener): () => void; export declare function applyGoogleTurnOrderingFix(params: { messages: AgentMessage[]; modelApi?: string | null; sessionManager: SessionManager; sessionId: string; warn?: (message: string) => void; }): { messages: AgentMessage[]; didPrepend: boolean; }; export declare function sanitizeSessionHistory(params: { messages: AgentMessage[]; modelApi?: string | null; modelId?: string; provider?: string; allowedToolNames?: Iterable; config?: OpenClawConfig; workspaceDir?: string; env?: NodeJS.ProcessEnv; model?: ProviderRuntimeModel; sessionManager: SessionManager; sessionId: string; policy?: TranscriptPolicy; }): Promise; export declare function validateReplayTurns(params: { messages: AgentMessage[]; modelApi?: string | null; modelId?: string; provider?: string; config?: OpenClawConfig; workspaceDir?: string; env?: NodeJS.ProcessEnv; model?: ProviderRuntimeModel; sessionId?: string; policy?: TranscriptPolicy; }): Promise;