import type { AgentMessage } from "@earendil-works/pi-agent-core";
import type { Api, Model } from "@earendil-works/pi-ai";
import { type SessionEntry } from "../../../session-manager.ts";
import { type OpenAiProviderNativeItem, type OpenAiRemoteInputItem } from "./openai-remote-schema.ts";
export type { OpenAiCompactBody, OpenAiContextCompactionItem, OpenAiContextCompactionTriggerItem, OpenAiRemoteCompactionDetails, OpenAiRemoteInputItem, OpenAiRemoteTransport, } from "./openai-remote-schema.ts";
export { getOpenAiRemoteCompactionDetails, isOpenAiContextCompactionItem, isOpenAiRemoteCompactionOutputItem, isRecord, isRetainedRemoteOutputItem, isRetainedResponsesStreamInputItem, OPENAI_REMOTE_COMPACTION_SCHEMA, } from "./openai-remote-schema.ts";
export declare function providerNativeItem(raw: unknown): OpenAiProviderNativeItem | undefined;
/**
 * Convert messages that are not yet persisted in the session branch (the
 * in-flight prompt) into input items, so payload replay can append them after
 * the branch-derived items.
 */
export declare function convertPendingMessages(messages: AgentMessage[], model: Model<Api>): OpenAiRemoteInputItem[];
/**
 * Convert session branch entries into OpenAI Responses input items.
 *
 * The route gate is provider capability (checked by the caller), not history
 * provenance: any entry the session can carry is converted through the same
 * pipeline the normal context path uses (`sessionEntryToContextMessages` +
 * `convertToLlm`), so foreign-provider messages, bash executions, branch
 * summaries, and prior local compactions degrade to their canonical text
 * form instead of disqualifying remote compaction. Prior OpenAI remote
 * compaction checkpoints splice their native `replacementInput` in order.
 */
export declare function convertBranchEntries(entries: SessionEntry[], model: Model<Api>): OpenAiRemoteInputItem[];
//# sourceMappingURL=openai-remote-convert.d.ts.map