/**
 * Internal helpers and constants shared by checkpoint creation and loading.
 *
 * @module domain/services/state/checkpointHelpers
 */
import type BlobPort from '../../../ports/BlobPort.ts';
import type TreePort from '../../../ports/TreePort.ts';
/** Current shipped checkpoint schema: envelope tree with state subtree. */
export declare const CURRENT_CHECKPOINT_SCHEMA = 5;
/** Supported shipped runtime checkpoint schemas. */
export declare const SUPPORTED_CHECKPOINT_SCHEMAS: readonly [5];
/**
 * Returns true when the schema number identifies the current runtime
 * checkpoint envelope.
 */
export declare function isCurrentCheckpointSchema(schema: number | undefined | null): boolean;
export type ContentAnchorObjectType = 'blob' | 'tree';
export type ContentAnchorObjectTypeReader = (oid: string) => Promise<ContentAnchorObjectType>;
/** Minimal persistence surface needed by writeIndexSubtree. */
export type IndexSubtreePersistence = Pick<BlobPort, 'writeBlob'> & Pick<TreePort, 'writeTree'>;
/**
 * Writes index tree shards as blobs and creates a subtree.
 */
export declare function writeIndexSubtree(indexTree: Record<string, Uint8Array>, persistence: IndexSubtreePersistence): Promise<string>;
/**
 * Partitions readTreeOids output into core entries and index shard OIDs.
 *
 * Entries prefixed with `index/` are stripped and collected separately.
 */
export declare function partitionTreeOids(rawOids: Record<string, string>): {
    treeOids: Record<string, string>;
    indexShardOids: Record<string, string>;
};
/**
 * Compares git tree entry lines by path segment (content after the tab).
 */
export declare function compareTreeEntriesByPath(left: string, right: string): number;
/**
 * Merges two sorted string arrays into one sorted unique array.
 */
export declare function mergeSortedUniqueStrings(existing: string[], incoming: string[]): string[];
/**
 * Collects sorted, de-duplicated content storage anchor entries for a
 * checkpoint tree without holding all content OIDs in one monolithic Set at
 * once. Current content storage OIDs identify CAS trees, so checkpoint trees
 * must anchor them as tree entries.
 */
export declare function collectContentAnchorEntries(propMap: Iterable<readonly [string, {
    readonly value: unknown;
}]>, // nosemgrep: ts-no-unknown-outside-adapters -- 0025B
readObjectType?: ContentAnchorObjectTypeReader): Promise<string[]>;
