/**
 * Module-level helpers used by RuntimeHost.open() and the constructor.
 *
 * Extracted from the monolithic runtime host as part of the
 * TypeScript migration.
 *
 * @module domain/runtimeHelpers
 */
import type BlobStoragePort from '../ports/BlobStoragePort.ts';
import type IndexStorePort from '../ports/IndexStorePort.ts';
import type CodecPort from '../ports/CodecPort.ts';
import type EffectSinkPort from '../ports/EffectSinkPort.ts';
import type { CorePersistence } from './types/WarpPersistence.ts';
import type { ExternalizationPolicy } from './types/ExternalizationPolicy.ts';
import type { EffectPipeline } from './services/EffectPipeline.ts';
import type RuntimeStorageCapabilityPort from '../ports/RuntimeStorageCapabilityPort.ts';
import { type PatchStorageRoute } from '../ports/CommitMessageCodecPort.ts';
export declare const DEFAULT_ADJACENCY_CACHE_SIZE = 3;
/**
 * Persistence accepted by runtime helper resolution.
 */
type RuntimeStoragePersistence = CorePersistence & Partial<RuntimeStorageCapabilityPort>;
/**
 * Resolves blob storage from an explicit injection, an adapter capability,
 * or the in-memory fallback used by browser/test paths.
 */
export declare function resolveBlobStorage(blobStorage: BlobStoragePort | undefined | null, persistence: RuntimeStoragePersistence): Promise<BlobStoragePort>;
/**
 * Resolves the default storage route for newly written patches.
 */
export declare function resolvePatchWriteStorage(persistence: RuntimeStoragePersistence, patchBlobStorage: BlobStoragePort | undefined | null): PatchStorageRoute;
type IndexStoreDeps = {
    codec: CodecPort;
    blobPort: {
        readBlob(oid: string): Promise<Uint8Array>;
        writeBlob(content: Uint8Array | string): Promise<string>;
    };
    treePort: {
        readTreeOids(treeOid: string): Promise<Record<string, string>>;
        writeTree(entries: string[]): Promise<string>;
    };
    blobStorage?: BlobStoragePort | null;
};
/**
 * Resolves an IndexStorePort: uses the provided instance if present,
 * otherwise auto-constructs a CborIndexStoreAdapter.
 */
export declare function resolveIndexStore(indexStore: IndexStorePort | undefined | null, deps: IndexStoreDeps): Promise<IndexStorePort>;
/**
 * Constructs an EffectPipeline from an array of sinks and an optional externalization lens.
 */
export declare function buildEffectPipeline(sinks: readonly EffectSinkPort[], lens: ExternalizationPolicy | undefined): Promise<EffectPipeline>;
export type TrustMode = 'off' | 'log-only' | 'enforce';
export type NormalizedTrustConfig = {
    mode: TrustMode;
    pin: string | null;
};
/**
 * Validates and returns the trust mode from a raw config.
 */
export declare function validateTrustMode(mode: string): TrustMode;
/**
 * Validates and returns the trust pin from a raw config.
 */
export declare function validateTrustPin(pin: string | null | undefined): string | null;
/**
 * Normalizes a trust configuration into a canonical shape with defaults.
 */
export declare function normalizeTrustConfig(trust: {
    mode?: TrustMode;
    pin?: string | null;
} | undefined | null): NormalizedTrustConfig;
export {};
