"""
向后兼容的导入层 - 从 store 包导入所有函数

此文件保持原有接口不变，所有实际实现已迁移到 store 包中。
"""

from __future__ import annotations

# 从 store 包导入所有公共 API
from .store import *  # noqa: F401, F403
from .store import (
    # 配置管理
    find_runtime_dir,
    get_project_root,
    get_runtime_dir,
    get_db_path,
    get_journal_path,
    get_config_path,
    load_runtime_config,
    write_runtime_config,
    save_runtime_config,
    describe_runtime,
    RUNTIME_DIRNAME,
    DB_FILENAME,
    CONFIG_FILENAME,
    DEFAULT_WEB_HOST,
    DEFAULT_WEB_PORT,
    # 数据库
    ensure_runtime_schema,
    get_connection,
    bootstrap_db,
    bootstrap_database,
    RECOVERY_DIR,
    RECOVERED_DB_PATH,
    # Git
    get_git_worktree_status,
    get_git_diff,
    get_git_diff_summary,
    get_git_recent_commits,
    list_recent_git_commits,
    _get_git_commit_snapshot,
    infer_git_metadata,
    _normalize_git_path,
    _normalize_file_list,
    # 任务
    list_tasks,
    get_task,
    create_task,
    update_task,
    plan_task,
    update_task_checkpoint,
    get_module_progress,
    # Roadmap
    list_roadmaps,
    get_roadmap,
    create_roadmap,
    update_roadmap,
    list_plans,
    get_plan,
    create_plan,
    update_plan,
    generate_plan,
    advance_plan,
    # 提交
    list_commits,
    get_commit,
    create_commit,
    update_commit,
    # 决策
    list_decisions,
    get_decision,
    create_decision,
    update_decision_status,
    # 想法
    list_ideas,
    get_idea,
    create_idea,
    review_idea,
    update_idea,
    list_idea_comments,
    create_idea_comment,
    convert_idea,
    get_idea_conversion,
    enrich_idea_with_conversion,
    # 愿景
    list_visions,
    get_vision,
    get_active_vision,
    create_vision,
    update_vision,
    # 原则
    list_principles,
    get_principle,
    get_active_principles,
    list_active_principles,
    create_principle,
    update_principle,
    # 链接
    list_links,
    list_links_for_entity,
    create_link,
    delete_link,
    # 文档
    list_doc_records,
    update_doc_record,
    audit_docs,
    # 日报
    get_daily_note,
    list_daily_notes,
    append_daily_note,
    replace_daily_note,
    # Canon
    fetch_canon,
    update_canon,
    empty_canon,
    # 汇总
    get_dashboard_summary,
    get_inbox_summary,
    build_brief,
    build_context_pack,
    build_next_action_packet,
    build_handoff_packet,
    get_status_snapshot,
    _module_guess_from_task,
    # 辅助
    now_iso,
    today,
    slug,
    dumps,
    loads,
)

__all__ = [
    # 配置管理
    "find_runtime_dir",
    "get_project_root",
    "get_runtime_dir",
    "get_db_path",
    "get_journal_path",
    "get_config_path",
    "load_runtime_config",
    "write_runtime_config",
    "save_runtime_config",
    "describe_runtime",
    "RUNTIME_DIRNAME",
    "DB_FILENAME",
    "CONFIG_FILENAME",
    "DEFAULT_WEB_HOST",
    "DEFAULT_WEB_PORT",
    # 数据库
    "ensure_runtime_schema",
    "get_connection",
    "bootstrap_db",
    "bootstrap_database",
    "RECOVERY_DIR",
    "RECOVERED_DB_PATH",
    # Git
    "get_git_worktree_status",
    "get_git_diff",
    "get_git_diff_summary",
    "get_git_recent_commits",
    "list_recent_git_commits",
    "_get_git_commit_snapshot",
    "infer_git_metadata",
    "_normalize_git_path",
    "_normalize_file_list",
    # 任务
    "list_tasks",
    "get_task",
    "create_task",
    "update_task",
    "plan_task",
    "update_task_checkpoint",
    "get_module_progress",
    # Roadmap
    "list_roadmaps",
    "get_roadmap",
    "create_roadmap",
    "update_roadmap",
    "list_plans",
    "get_plan",
    "create_plan",
    "update_plan",
    "generate_plan",
    "advance_plan",
    # 提交
    "list_commits",
    "get_commit",
    "create_commit",
    "update_commit",
    # 决策
    "list_decisions",
    "get_decision",
    "create_decision",
    "update_decision_status",
    # 想法
    "list_ideas",
    "get_idea",
    "create_idea",
    "review_idea",
    "update_idea",
    "list_idea_comments",
    "create_idea_comment",
    "convert_idea",
    "get_idea_conversion",
    "enrich_idea_with_conversion",
    # 愿景
    "list_visions",
    "get_vision",
    "get_active_vision",
    "create_vision",
    "update_vision",
    # 原则
    "list_principles",
    "get_principle",
    "get_active_principles",
    "list_active_principles",
    "create_principle",
    "update_principle",
    # 链接
    "list_links",
    "list_links_for_entity",
    "create_link",
    "delete_link",
    # 文档
    "list_doc_records",
    "update_doc_record",
    "audit_docs",
    # 日报
    "get_daily_note",
    "list_daily_notes",
    "append_daily_note",
    "replace_daily_note",
    # Canon
    "fetch_canon",
    "update_canon",
    "empty_canon",
    # 汇总
    "get_dashboard_summary",
    "get_inbox_summary",
    "build_brief",
    "build_context_pack",
    "build_next_action_packet",
    "build_handoff_packet",
    "get_status_snapshot",
    "_module_guess_from_task",
    # 辅助
    "now_iso",
    "today",
    "slug",
    "dumps",
    "loads",
]
