import type { CliOptions, WarpGraphInstance, Persistence, CursorBlob } from '../../types.ts';
import type Patch from '../../../../src/domain/types/Patch.ts';
import type { StrandDescriptor } from '../../../../src/domain/types/StrandDescriptor.ts';
/**
 * Opens a graph with debug context including cursor state for exploratory analysis.
 */
export declare function openDebugContext(options: CliOptions): Promise<{
    graph: WarpGraphInstance;
    graphName: string;
    persistence: Persistence;
    activeCursor: CursorBlob | null;
}>;
/**
 * Resolves the effective lamport ceiling from an explicit value or cursor state.
 */
export declare function resolveLamportCeiling(explicitLamportCeiling: number | null, activeCursor: CursorBlob | null): number | null;
/**
 * Materialize explicitly for debugger commands so they operate against an
 * intentional observation coordinate instead of relying on auto-materialize.
 *
 * The main git-warp CLI does not attach a checkpoint policy or persistent seek
 * cache when opening graphs, so this remains a read-only exploratory path.
 */
export declare function materializeForDebug(graph: WarpGraphInstance, options: {
    lamportCeiling: number | null;
    collectReceipts: boolean;
    strandId?: string | null;
}): Promise<unknown>;
/**
 * Retrieves decoded patch entries for a specific strand, optionally capped by lamport ceiling.
 */
export declare function getStrandPatchEntriesForDebug(graph: WarpGraphInstance, strandId: string, lamportCeiling: number | null): Promise<Array<{
    patch: Patch;
    sha: string;
}>>;
/**
 * Produces a serializable summary of a strand's context for debug output.
 */
declare function summarizeStrandContextForDebug(strand: StrandDescriptor): {
    strandId: string;
    baseLamportCeiling: number | null;
    overlayHeadPatchSha: string | null;
    overlayPatchCount: number;
    overlayWritable: boolean;
    braid: {
        readOverlayCount: number;
        braidedStrandIds: string[];
    };
};
/**
 * Loads and summarizes a strand's debug context, throwing if the strand is not found.
 */
export declare function loadStrandContextForDebug(graph: WarpGraphInstance, strandId: string): Promise<ReturnType<typeof summarizeStrandContextForDebug>>;
/**
 * Explicit byte/hex-safe string ordering for deterministic debug output.
 */
export declare function compareStrings(a: string, b: string): number;
/**
 * Numeric comparator for deterministic sorting.
 */
export declare function compareNumbers(a: number, b: number): number;
type DebugOpLike = {
    type: string;
    node?: string;
    from?: string;
    to?: string;
};
/**
 * Deterministic causal sort for patch entries.
 */
export declare function sortPatchEntriesCausally(entries: Array<{
    patch: {
        writer?: string;
        lamport?: number;
    };
    sha: string;
}>): Array<{
    patch: {
        writer?: string;
        lamport?: number;
    };
    sha: string;
}>;
type DebugPatch = {
    writer?: string;
    lamport?: number;
    schema?: number;
    ops?: DebugOpLike[];
    reads?: string[] | undefined;
    writes?: string[] | undefined;
};
/**
 * Transforms raw patch entries into compact summaries for debug display.
 */
export declare function summarizePatchEntries(entries: Array<{
    patch: DebugPatch;
    sha: string;
}>): Array<{
    sha: string;
    writer: string;
    lamport: number;
    schema: number | undefined;
    opCount: number;
    opSummary: Record<string, number>;
    reads: string[];
    writes: string[];
    targets: string[];
}>;
/**
 * Returns true if the SHA matches a given prefix, or if no prefix is provided.
 */
export declare function matchesShaPrefix(sha: string, prefix: string | null): boolean;
export {};
