/**
 * Orchestrator-side cold-store.
 *
 * Extends BaseColdStore with orchestrator-specific table adapters.
 * Phase A registered no adapters; Phase C added execution_runs /
 * execution_jobs / execution_steps. Phase D adds secret_audit_log
 * and access_log.
 */
import { type Kysely } from 'kysely';
import { BaseColdStore, type BaseColdStoreDeps, type ColdStoreConfig, type PurgeableChunk } from '@kici-dev/shared';
import type { Database } from '../db/types.js';
export interface OrchestratorColdStoreDeps extends Omit<BaseColdStoreDeps, 'db'> {
    /** Kysely handle used by every registered Orchestrator adapter. */
    kdb: Kysely<Database>;
}
export declare class OrchestratorColdStore extends BaseColdStore {
    private readonly kdb;
    constructor(deps: OrchestratorColdStoreDeps);
    /**
     * Phase 2 — query the orchestrator's `cold_store_chunks` table for
     * chunks past their per-row cold-retention horizon. See the matching
     * Platform-side method for the full rationale.
     */
    protected listPurgeableChunks(opts: {
        tableFilter?: string;
        bucketFilter?: string;
        limit: number;
    }): Promise<PurgeableChunk[]>;
    /**
     * Phase 2 — per-chunk advisory lock keyed on
     * `hashtext('cold-store-purge|orchestrator|<table>|<chunkId>')`.
     */
    protected withPurgeLock<T>(args: {
        table: string;
        chunkId: string;
    }, fn: () => Promise<T>): Promise<T | null>;
}
/**
 * Build the orchestrator cold-store config from env vars. Reads
 * `KICI_COLD_STORE_*` vars mirrored with the Platform side. YAML
 * integration (per the design doc) lands in a follow-up commit that
 * wires the `coldStore` section of the orchestrator config schema;
 * Phase A ships the env-var path only.
 */
export declare function readOrchestratorColdStoreConfig(env?: NodeJS.ProcessEnv): ColdStoreConfig;
/**
 * Build the cold-store-archive scheduled-job handler for the
 * orchestrator. Re-reads env vars on every tick so SIGHUP-driven
 * config reload picks up new bucket/prefix values without a restart.
 */
export declare function createColdStoreArchiveHandler(instanceId: string, kdb: Kysely<Database>): () => Promise<void>;
/**
 * Phase 2 — build the cold-store-purge scheduled-job handler. Same
 * env-var re-read pattern as the archive handler so SIGHUP picks up
 * config changes mid-run.
 */
export declare function createColdStorePurgeHandler(instanceId: string, kdb: Kysely<Database>): () => Promise<void>;
//# sourceMappingURL=orchestrator-cold-store.d.ts.map