/**
 * Append-only activity log for tasks, projects, plans, runs, and comments.
 * Local SQLite storage with redaction and export/import compatibility.
 */
import type { Database } from "bun:sqlite";
export declare const ACTIVITY_LOG_SCHEMA = "todos.activity_log.v1";
export declare const ACTIVITY_ENTITY_TYPES: readonly ["task", "project", "plan", "agent_run", "run_record", "comment", "session"];
export type ActivityEntityType = (typeof ACTIVITY_ENTITY_TYPES)[number];
export interface ActivityRecord {
    schema_version: typeof ACTIVITY_LOG_SCHEMA;
    id: string;
    entity_type: ActivityEntityType;
    entity_id: string;
    action: string;
    field: string | null;
    old_value: string | null;
    new_value: string | null;
    actor_id: string | null;
    session_id: string | null;
    machine_id: string | null;
    metadata: Record<string, unknown>;
    created_at: string;
}
export interface LogActivityInput {
    entity_type: ActivityEntityType;
    entity_id: string;
    action: string;
    field?: string;
    old_value?: string | null;
    new_value?: string | null;
    actor_id?: string;
    session_id?: string;
    machine_id?: string;
    metadata?: Record<string, unknown>;
    /** Override timestamp (tests/internal) */
    created_at?: string;
}
export interface ListActivityFilter {
    entity_type?: ActivityEntityType;
    entity_id?: string;
    actor_id?: string;
    action?: string;
    since?: string;
    until?: string;
    limit?: number;
    offset?: number;
    order?: "asc" | "desc";
}
export interface ActivityExportBundle {
    schema_version: typeof ACTIVITY_LOG_SCHEMA;
    exported_at: string;
    records: ActivityRecord[];
}
export declare function redactActivityRecord(record: ActivityRecord): ActivityRecord;
export declare function logActivity(input: LogActivityInput, db?: Database): ActivityRecord;
export declare function getActivityRecord(id: string, db?: Database): ActivityRecord | null;
export declare function listActivity(filter?: ListActivityFilter, db?: Database): ActivityRecord[];
export declare function getActivityTimeline(entityType: ActivityEntityType, entityId: string, db?: Database): ActivityRecord[];
export declare function exportActivityLog(filter?: ListActivityFilter, db?: Database): ActivityExportBundle;
export declare function importActivityLog(bundle: ActivityExportBundle, options?: {
    skip_existing?: boolean;
}, db?: Database): {
    imported: number;
    skipped: number;
};
export declare function formatActivityRecordText(record: ActivityRecord): string;
//# sourceMappingURL=activity-audit.d.ts.map