//! 桌面 facade 层（Tauri / GUI / 桌面 smoke 入口）。
//!
//! 物理拆分：
//! - `dto.rs`：所有 Request/Response DTO + DTO 映射 impl
//! - `errors.rs`：`DesktopErrorEnvelope` + 分类 helper
//! - `validate.rs`：输入校验集合
//! - `helpers.rs`：csv/文件列表解析、session 索引加载、continue/delete/terminal helpers
//! - `service.rs`：`DesktopService` 工作流入口
//! - `tauri.rs`：Tauri 命令 shim（保留以前位置）
//!
//! 外部统一 `use crate::desktop::xxx`，因此所有公开项在这里 re-export。

mod dto;
mod errors;
mod helpers;
mod service;
mod validate;

pub mod tauri;

pub use crate::desktop_status::DesktopStatusResponse;
pub use dto::{
    DesktopContextResponse, DesktopDaemonRequest, DesktopHistoryResponse,
    DesktopImportSessionRequest, DesktopImportSessionResponse, DesktopLifecycleActionDto,
    DesktopMemoryActionRequest, DesktopMemoryDraftRequest, DesktopMetadataDto,
    DesktopPromptOptimizeRequest, DesktopPromptOptimizeResponse, DesktopRecordLookupRequest,
    DesktopRecordResponse, DesktopRouteRequest, DesktopSessionActionRequest,
    DesktopSessionActionResponse, DesktopSessionBrowserRequest, DesktopSessionBrowserResponse,
    DesktopSessionDetailRequest, DesktopSessionDetailResponse, DesktopSessionItem,
    DesktopSessionMessage, DesktopStatusRequest, DesktopWakeupRequest, DesktopWakeupResponse,
    DesktopWikiIndexRequest, DesktopWikiIndexResponse, DesktopWikiLintRequest,
    DesktopWikiLintResponse, DesktopWorkbenchRequest, DesktopWorkbenchResponse,
    DesktopWriteResponse,
};
pub use errors::{DesktopErrorEnvelope, DesktopErrorKind, DesktopResult};
pub use helpers::{parse_csv_items, parse_file_list};
pub use service::DesktopService;

#[cfg(test)]
mod tests;
