/**
 * `execution_steps` cold-store adapter (Orchestrator side).
 *
 *
 * Contract:
 *   - tenant column: `routing_key` (denormalized in migration 006)
 *   - partition column: `created_at`
 *   - warm TTL: 30 days (design §5 matrix row 9)
 *   - eligibility: created_at < cutoff (steps are append-only and have no
 *     terminal-status predicate — there is no UPDATE statement against
 *     `execution_steps` in the orchestrator codebase, so age alone is
 *     sufficient)
 *
 * Order: registered FIRST in the orchestrator cold-store. Within one
 * cycle the framework iterates adapters in registration order
 * (steps → jobs → runs); steps go first so the FK chain
 * (execution_jobs.run_id → execution_runs.run_id) doesn't break when
 * jobs and runs are archived later.
 *
 * Audit emission: orchestrator-side adapters write to `access_log`
 * (the orchestrator's audit surface; `audit_log` is Platform-side only).
 * The row uses actor_type='system', actor_id='cold-store-archive:<id>'.
 */
import { type Kysely, type Selectable } from 'kysely';
import { type ChunkCommitMetadata, type ColdStoreTableConfig, type EligiblePartition, type TableAdapter } from '@kici-dev/shared';
import type { Database, ExecutionStepTable } from '../../db/types.js';
export type ExecutionStepRow = Selectable<ExecutionStepTable>;
export interface ExecutionStepsAdapterOptions {
    overrides?: Partial<ColdStoreTableConfig>;
}
export declare class ExecutionStepsAdapter implements TableAdapter<ExecutionStepRow> {
    private readonly kdb;
    private readonly instanceId;
    readonly db: "orchestrator";
    readonly table = "execution_steps";
    readonly tenantColumn = "routing_key";
    readonly partitionColumn = "created_at";
    readonly config: ColdStoreTableConfig;
    constructor(kdb: Kysely<Database>, instanceId: string, opts?: ExecutionStepsAdapterOptions);
    listEligiblePartitions(args: {
        warmCutoff: Date;
    }): AsyncIterable<EligiblePartition>;
    countTenantWarmBytes(args: {
        tenantId: string;
        warmCutoff: Date;
    }): Promise<number>;
    withPartitionLock<T>(args: {
        tenantId: string;
        partitionDate: string;
    }, fn: () => Promise<T>): Promise<T | null>;
    selectEligible(args: {
        tenantId: string;
        partitionDate: string;
        limit: number;
    }): AsyncIterable<ExecutionStepRow>;
    encodeRow(row: ExecutionStepRow): string;
    decodeRow(line: string): ExecutionStepRow;
    rowId(row: ExecutionStepRow): string | number;
    rowTimestamp(row: ExecutionStepRow): Date | string;
    markArchivedAndDelete(args: {
        rowIds: ReadonlyArray<string | number>;
        chunkMeta: ChunkCommitMetadata;
    }): Promise<void>;
}
//# sourceMappingURL=execution-steps.d.ts.map