import type { CompactionResult } from '../memory/compaction.js'; import { type TurnCheckpointDiff } from './checkpoint.js'; import { ExternalRollbackNotAppliedError, isExternalRollbackNotAppliedError } from './errors.js'; export { ExternalRollbackNotAppliedError, isExternalRollbackNotAppliedError }; /** Compact an external runtime's native conversation context (e.g. Codex `thread/compact/start`). */ export declare function compactExternalSession(conversationId: string, signal?: AbortSignal): Promise; /** Fork an external runtime's native thread and bind the newly created xopc conversation to it. */ export declare function forkExternalSession(input: { sourceConversationId: string; targetConversationId: string; signal?: AbortSignal; }): Promise; /** Roll back trailing turns in an external runtime's native thread (e.g. Codex `thread/rollback`). */ export declare function rollbackExternalSession(conversationId: string, numTurns: number, options?: { signal?: AbortSignal; expectedTranscriptId?: string; targetTurnId?: string; }): Promise; /** Read the Git checkpoint diff and availability for a turn in a Project session. */ export declare function getSessionTurnCheckpointDiff(conversationId: string, turnId: string): Promise<{ hasBefore: boolean; hasAfter: boolean; diff: TurnCheckpointDiff | null; }>; /** Restore the workspace working tree to a turn's `before` or `after` Git checkpoint. */ export declare function restoreSessionTurnCheckpoint(conversationId: string, turnId: string, stage?: 'before' | 'after', options?: { checkOnly?: boolean; optional?: boolean; }): Promise<{ restored: boolean; filesChanged: number; stage: 'before' | 'after'; }>;