pub mod database;
pub mod error;
pub mod file_storage;
pub mod migrations;

pub use error::{Entity, Error, MigrationStep, OpenOp, Result};

/// Stable identifier for the seeded Default profile (see migration v6).
/// The Default profile cannot be renamed or deleted — guarded by SQLite triggers.
pub const DEFAULT_PROFILE_ID: &str = "00000000-0000-0000-0000-000000000001";

pub use database::{
    add_profile_term, complete_subtask_and_check_parent, complete_task, count_transcripts,
    create_profile, delete_implementation_rule, delete_profile, delete_profile_term, delete_task,
    delete_transcript, get_implementation_rule, get_profile, get_setting, get_task_by_id,
    get_transcript, init, init_readonly, insert_implementation_rule, insert_subtask, insert_task,
    insert_transcript, list_feedback_examples, list_implementation_rules, list_profile_terms,
    list_profiles, list_recent_completions, list_recent_errors, list_subtasks, list_tasks,
    list_transcripts, list_transcripts_paged, list_trashed_transcripts, log_error,
    mark_implementation_rule_fired, migrate_legacy_setting_keys, prune_error_log,
    purge_deleted_transcripts, record_feedback, restore_transcript, search_transcripts,
    set_implementation_rule_enabled, set_setting, set_task_energy, uncomplete_task, update_profile,
    update_task, update_transcript, update_transcript_meta, DailyCompletionCount, ErrorLogRow,
    FeedbackRow, FeedbackTargetType, ImplementationRuleRow, InsertTranscriptParams, ProfileRow,
    ProfileTermRow, RecordFeedbackParams, TaskRow, TranscriptRow,
};
pub use file_storage::{app_data_dir, crashes_dir, database_path, logs_dir, recordings_dir};
