import type { ResponseInput } from "./providers/openai-responses-wire.js"; import type { CacheRetention, OpenAIResponsesHistoryPayload, ProviderPayload } from "./types.js"; export { isRecord } from "@oh-my-pi/pi-utils"; export declare function normalizeSystemPrompts(systemPrompt: readonly string[] | string | undefined | null): string[]; export declare function normalizeToolCallId(id: string): string; type ResponsesToolItemIdPrefix = "fc" | "ctc"; export declare function normalizeResponsesToolCallId(id: string, itemPrefix?: ResponsesToolItemIdPrefix): { callId: string; itemId: string; }; /** * Truncate an OpenAI Responses API item ID to 64 characters. * IDs exceeding the limit are replaced with a hash-based ID using the given prefix. */ export declare function truncateResponseItemId(id: string, prefix: string): string; export declare function sanitizeOpenAIResponsesHistoryItemsForReplay(items: Array>): ResponseInput; /** * Sanitize assistant-native Responses history for replay. * * Returns `undefined` for hidden-empty turns that only contain reasoning and an * empty assistant message, allowing callers to rebuild visible transcript * history instead of replaying stale native state. */ export declare function sanitizeOpenAIResponsesAssistantHistoryItemsForReplay(items: Array>): ResponseInput | undefined; /** * Drop hidden-only fallback assistant replay after a native Responses snapshot is rejected. */ export declare function sanitizeOpenAIResponsesAssistantFallbackItemsForReplay(items: ResponseInput): ResponseInput; export declare function createOpenAIResponsesHistoryPayload(provider: string, items: Array>, incremental?: boolean): OpenAIResponsesHistoryPayload; export declare function getOpenAIResponsesHistoryPayload(providerPayload: ProviderPayload | undefined, currentProvider: string, fallbackProvider?: string): OpenAIResponsesHistoryPayload | undefined; export declare function getOpenAIResponsesHistoryItems(providerPayload: ProviderPayload | undefined, currentProvider: string, fallbackProvider?: string): Array> | undefined; /** * Resolve cache retention preference. * Defaults to "short" and uses PI_CACHE_RETENTION for backward compatibility. */ export declare function resolveCacheRetention(cacheRetention?: CacheRetention): CacheRetention;