/**
 * WarpChain Storage — CRUD operations for chain definitions and instances.
 *
 * Uses tasks.db (main database) via the native SQLite adapter.
 * Tables: warp_chains, warp_chain_instances (defined in chain-schema.ts).
 *
 * @task T5403
 */
import type { GateResult, WarpChain, WarpChainInstance } from '@cleocode/contracts';
export interface ChainFindCriteria {
    query?: string;
    category?: WarpChain['shape']['stages'][number]['category'];
    tessera?: string;
    archetype?: string;
    limit?: number;
}
/**
 * Store a validated WarpChain definition.
 *
 * Validates the chain before storing. Throws if validation fails.
 *
 * @task T5403
 */
export declare function addChain(chain: WarpChain, projectRoot: string): Promise<void>;
/**
 * Retrieve a WarpChain definition by ID.
 *
 * @task T5403
 */
export declare function showChain(id: string, projectRoot: string): Promise<WarpChain | null>;
/**
 * List all stored WarpChain definitions.
 *
 * @task T5403
 */
export declare function listChains(projectRoot: string): Promise<WarpChain[]>;
/**
 * Find WarpChain definitions by criteria.
 *
 * @task T5403
 */
export declare function findChains(criteria: ChainFindCriteria, projectRoot: string): Promise<WarpChain[]>;
/**
 * Create a chain instance binding a chain to an epic.
 *
 * @task T5403
 */
export declare function createInstance(params: {
    chainId: string;
    epicId: string;
    variables?: Record<string, unknown>;
    stageToTask?: Record<string, string>;
}, projectRoot: string): Promise<WarpChainInstance>;
/**
 * Retrieve a chain instance by ID.
 *
 * @task T5403
 */
export declare function showInstance(id: string, projectRoot: string): Promise<WarpChainInstance | null>;
/**
 * Read persisted gate results for a chain instance.
 */
export declare function listInstanceGateResults(id: string, projectRoot: string): Promise<GateResult[]>;
/**
 * Advance a chain instance to the next stage, recording gate results.
 *
 * @task T5403
 */
export declare function advanceInstance(id: string, nextStage: string, gateResults: GateResult[], projectRoot: string): Promise<WarpChainInstance>;
//# sourceMappingURL=chain-store.d.ts.map