/**
 * Local-first inbox intake — GitHub issues, CI logs, feedback, errors, files → tasks.
 * No connector auth or hosted services required.
 */
import type { Database } from "bun:sqlite";
import { type Task } from "../db/tasks.js";
import type { CreateTaskInput, TaskPriority } from "../types/index.js";
export declare const INBOX_INTAKE_SCHEMA = "todos.inbox_intake.v1";
export declare const INTAKE_SOURCE_TYPES: readonly ["github_issue", "ci_log", "feedback", "error_paste", "file", "text"];
export type IntakeSourceType = (typeof INTAKE_SOURCE_TYPES)[number];
export declare const INTAKE_TRIAGE_STATUSES: readonly ["preview", "triaged", "duplicate", "created"];
export type IntakeTriageStatus = (typeof INTAKE_TRIAGE_STATUSES)[number];
export interface IntakeInput {
    source_type?: IntakeSourceType;
    text?: string;
    file_path?: string;
    github_url?: string;
    title?: string;
    project_id?: string;
    task_list_id?: string;
    agent_id?: string;
    tags?: string[];
    priority?: TaskPriority;
}
export interface IntakePreview {
    schema_version: typeof INBOX_INTAKE_SCHEMA;
    source_type: IntakeSourceType;
    triage_status: IntakeTriageStatus;
    title: string;
    description: string;
    redacted: boolean;
    secret_match_count: number;
    suggested_tags: string[];
    suggested_priority: TaskPriority;
    source_metadata: Record<string, unknown>;
    source_fingerprint: string;
    duplicate_of: {
        task_id: string;
        short_id: string | null;
        title: string;
        score: number;
    } | null;
    create_task_input: CreateTaskInput;
}
export interface IntakeResult {
    schema_version: typeof INBOX_INTAKE_SCHEMA;
    preview: IntakePreview;
    task: Task | null;
    skipped_duplicate: boolean;
}
export interface IntakeOptions {
    dry_run?: boolean;
    skip_dedupe?: boolean;
    force?: boolean;
}
export declare function detectSourceType(text: string): IntakeSourceType;
export declare function parseCiLog(text: string): {
    title: string;
    failures: string[];
    job?: string;
};
export declare function parseErrorPaste(text: string): {
    title: string;
    stack: string;
};
export declare function parseFeedback(text: string): {
    title: string;
    body: string;
};
export declare function previewInboxIntake(input: IntakeInput, db?: Database): IntakePreview;
export declare function createInboxIntake(input: IntakeInput, options?: IntakeOptions, db?: Database): IntakeResult;
export declare function formatIntakePreviewText(preview: IntakePreview): string;
//# sourceMappingURL=inbox-intake.d.ts.map