import type { TaskEntity, TaskStoreDocument } from "../types.js";
export type TaskEngineTaskRow = {
    id: string;
    status: string;
    type: string;
    title: string;
    created_at: string;
    updated_at: string;
    archived: number;
    archived_at: string | null;
    priority: string | null;
    phase: string | null;
    phase_key: string | null;
    ownership: string | null;
    approach: string | null;
    depends_on_json: string;
    unblocks_json: string;
    technical_scope_json: string | null;
    acceptance_criteria_json: string | null;
    summary: string | null;
    description: string | null;
    risk: string | null;
    queue_namespace: string | null;
    evidence_key: string | null;
    evidence_kind: string | null;
    metadata_json: string | null;
    /** Kit SQLite user_version 17+: promoted list-task filter fields (mirror of metadata keys). */
    routing_category?: string | null;
    routing_confidence_tier?: string | null;
    routing_blocked_reason_category?: string | null;
    routing_tags_json?: string | null;
    /** Present from kit SQLite user_version 4+ relational rows; absent on pre-migration reads. */
    features_json?: string | null;
};
export type TaskEntityToRowOptions = {
    /** When true, persist `features_json` as `[]` (junction holds links; kit user_version 5+). */
    omitFeaturesJson?: boolean;
};
/** Serialize TaskEntity → DB row (transaction caller supplies table name). */
export declare function taskEntityToRow(t: TaskEntity, options?: TaskEntityToRowOptions): TaskEngineTaskRow;
export type RowToTaskEntityOptions = {
    /**
     * When set (non-null), feature slugs are resolved **only** from the junction map (registry-active DBs).
     * Legacy `features_json` is ignored — backfill `task_engine_task_features` before relying on links.
     */
    taskFeatureLinkMap?: Map<string, string[]> | null;
};
export declare function rowToTaskEntity(row: TaskEngineTaskRow, options?: RowToTaskEntityOptions): TaskEntity;
/**
 * Compatibility `task_store_json` payload when `relational_tasks=1`.
 * Task bodies and evidence are canonical in `task_engine_*` tables; this blob stays parseable for doctor/export only.
 */
export declare function relationalCompatibilityTaskBlob(lastUpdated: string): TaskStoreDocument;
