import type { ExternalAgentExecution } from '../../agent-config/schema.js'; import type { StoredAgent } from '../../agent-catalog/types.js'; import type { TranscriptStoredRow } from '../../session/session-context-for-llm.js'; import type { ExternalSessionBinding, ExternalSessionIdentity } from './types.js'; export type ExternalStoredAgent = StoredAgent & { execution: ExternalAgentExecution; }; export declare function getExternalAgent(agentId: string): ExternalStoredAgent | undefined; export declare function getExternalConversationAgent(conversationId: string): ExternalStoredAgent | undefined; export declare function isExternalConversation(conversationId: string): boolean; export declare function hasExternalSessionBinding(conversationId: string): boolean; export declare function readExternalSessionBinding(identity: ExternalSessionIdentity): ExternalSessionBinding | undefined; export declare function readExternalSessionLastInputEntryId(transcriptId: string): string | null; export declare function bindExternalSession(identity: ExternalSessionIdentity, binding: { nativeSessionId: string; inputEntryId?: string | null; resumeCursor?: string; metadata?: Record; allowSessionRotation?: boolean; }): void; /** Clear last_input_entry_id after an intentional external rollback so the next turn can resume cleanly. */ export declare function clearExternalSessionLastInputEntry(transcriptId: string): void; export declare function appendExternalTranscriptEntry(identity: ExternalSessionIdentity, entryId: string, row: TranscriptStoredRow): boolean; export declare function updateExternalTranscriptEntry(identity: ExternalSessionIdentity, entryId: string, row: TranscriptStoredRow): boolean;