import type { Database } from "bun:sqlite";
import { type SnapshotType } from "./snapshots.js";
export type KnowledgeRecordType = "decision" | "architecture_note" | "tradeoff" | "context_snapshot";
export type KnowledgeExportFormat = "json" | "markdown";
export interface ProjectKnowledgeRecord {
    id: string;
    record_type: KnowledgeRecordType;
    title: string;
    content: string | null;
    decision: string | null;
    rationale: string | null;
    alternatives: string[];
    task_id: string | null;
    project_id: string | null;
    plan_id: string | null;
    agent_id: string | null;
    snapshot_id: string | null;
    tags: string[];
    metadata: Record<string, unknown>;
    created_at: string;
    updated_at: string;
}
export interface CreateKnowledgeRecordInput {
    record_type: KnowledgeRecordType;
    title: string;
    content?: string;
    decision?: string;
    rationale?: string;
    alternatives?: string[];
    task_id?: string;
    project_id?: string;
    plan_id?: string;
    agent_id?: string;
    snapshot_id?: string;
    tags?: string[];
    metadata?: Record<string, unknown>;
}
export interface ListKnowledgeRecordsOptions {
    record_type?: KnowledgeRecordType;
    task_id?: string;
    project_id?: string;
    plan_id?: string;
    agent_id?: string;
    snapshot_id?: string;
    tag?: string;
    limit?: number;
}
export interface SearchKnowledgeRecordsOptions extends ListKnowledgeRecordsOptions {
    query: string;
}
export interface CreateKnowledgeSnapshotInput {
    title?: string;
    snapshot_type?: SnapshotType;
    summary: string;
    task_id?: string;
    project_id?: string;
    agent_id?: string;
    files_open?: string[];
    attempts?: string[];
    blockers?: string[];
    next_steps?: string;
    tags?: string[];
    metadata?: Record<string, unknown>;
}
export interface KnowledgeExportReport {
    schema_version: 1;
    local_only: true;
    no_network: true;
    generated_at: string;
    filters: Omit<ListKnowledgeRecordsOptions, "limit"> & {
        query?: string | null;
    };
    count: number;
    records: ProjectKnowledgeRecord[];
}
export declare function createKnowledgeRecord(input: CreateKnowledgeRecordInput, db?: Database): ProjectKnowledgeRecord;
export declare function getKnowledgeRecord(id: string, db?: Database): ProjectKnowledgeRecord | null;
export declare function listKnowledgeRecords(options?: ListKnowledgeRecordsOptions, db?: Database): ProjectKnowledgeRecord[];
export declare function searchKnowledgeRecords(options: SearchKnowledgeRecordsOptions, db?: Database): ProjectKnowledgeRecord[];
export declare function createKnowledgeSnapshot(input: CreateKnowledgeSnapshotInput, db?: Database): {
    snapshot_id: string;
    record: ProjectKnowledgeRecord;
};
export declare function createKnowledgeExportReport(options: ListKnowledgeRecordsOptions & {
    query?: string;
}, db?: Database): KnowledgeExportReport;
export declare function renderKnowledgeExportMarkdown(report: KnowledgeExportReport): string;
//# sourceMappingURL=project-knowledge.d.ts.map