import type Sqlite from "better-sqlite3";
export declare const IDEAS_KIT_MIN_USER_VERSION = 29;
export type IdeaStatus = "open" | "planning" | "planned";
export type IdeaRecord = {
    id: string;
    title: string;
    note?: string;
    status: IdeaStatus;
    sortOrder: number;
    linkedPlanArtifact?: string;
    previousPlanArtifacts: string[];
    createdAt: string;
    updatedAt: string;
};
type IdeaRow = {
    id: string;
    title: string;
    note: string | null;
    status: IdeaStatus;
    sort_order: number;
    linked_plan_artifact: string | null;
    previous_plan_artifacts_json: string;
    created_at: string;
    updated_at: string;
};
export declare function assertIdeasKitSchema(dbPathAbs: string): {
    ok: true;
} | {
    ok: false;
    message: string;
};
export declare function isIdeaId(raw: string): boolean;
export declare function parseIdeaStatus(raw: unknown): IdeaStatus | undefined;
export declare function readStringArray(raw: string): string[];
export declare function toIdeaRecord(row: IdeaRow): IdeaRecord;
export declare function allocateNextIdeaId(db: Sqlite.Database): string;
export declare function nextIdeaSortOrder(db: Sqlite.Database): number;
export type CreateIdeaInput = {
    title: string;
    note?: string;
    status?: IdeaStatus;
    linkedPlanArtifact?: string;
    previousPlanArtifacts?: string[];
};
export type UpdateIdeaInput = {
    title?: string;
    note?: string | null;
    status?: IdeaStatus;
    linkedPlanArtifact?: string | null;
    previousPlanArtifacts?: string[];
};
export declare function createIdea(db: Sqlite.Database, input: CreateIdeaInput, nowIso: string): IdeaRecord;
export declare function getIdea(db: Sqlite.Database, ideaId: string): IdeaRecord | null;
export declare function listIdeas(db: Sqlite.Database, status?: IdeaStatus): IdeaRecord[];
export declare function updateIdea(db: Sqlite.Database, ideaId: string, input: UpdateIdeaInput, nowIso: string): IdeaRecord | null;
export declare function deleteIdea(db: Sqlite.Database, ideaId: string): IdeaRecord | null;
export declare function reorderIdeas(db: Sqlite.Database, ideaIds: string[], nowIso: string): IdeaRecord[] | null;
export {};
