1"""Utility functions for session-mgmt-mcp."""

2

3 from .database_pool import DatabaseConnectionPool, get_database_pool

4 from .file_utils import (

5 _cleanup_session_logs,

6 _cleanup_temp_files,

7 _cleanup_uv_cache,

8 validate_claude_directory,

9)

10 from .format_utils import (

11 _build_search_header,

12 _format_efficiency_metrics,

13 _format_monitoring_status,

14 _format_no_data_message,

15 _format_quality_alerts,

16 _format_search_results,

17 _format_statistics_header,

18)

19 from .git_operations import (

20 create_checkpoint_commit,

21 create_commit,

22 get_git_status,

23 get_staged_files,

24 is_git_repository,

25 stage_files,

26)

27 from .git_utils import (

28 _optimize_git_repository,

29 _parse_git_status,

30 _stage_and_commit_files,

31)

32 from .instance_managers import (

33 get_app_monitor,

34 get_llm_manager,

35 get_serverless_manager,

36 reset_instances,

37)

38 from .lazy_imports import (

39 LazyImport,

40 LazyLoader,

41 get_dependency_status,

42 lazy_loader,

43 log_dependency_status,

44 optional_dependency,

45 require_dependency,

46)

47 from .logging import SessionLogger, get_session_logger

48 from .quality_utils import (

49 _analyze_quality_trend,

50 _extract_quality_scores,

51 _generate_quality_trend_recommendations,

52 _get_intelligence_error_result,

53 _get_time_based_recommendations,

54)

55 from .reflection_utils import (

56 AutoStoreDecision,

57 CheckpointReason,

58 format_auto_store_summary,

59 generate_auto_store_tags,

60 should_auto_store_checkpoint,

61)

62

63__all__ = [

64 # Existing utilities

65 "AutoStoreDecision",

66 "CheckpointReason",

67 "DatabaseConnectionPool",

68 "LazyImport",

69 "LazyLoader",

70 "SessionLogger",

71 "_analyze_quality_trend",

72 "_build_search_header",

73 # New extracted utilities

74 "_cleanup_session_logs",

75 "_cleanup_temp_files",

76 "_cleanup_uv_cache",

77 "_extract_quality_scores",

78 "_format_efficiency_metrics",

79 "_format_monitoring_status",

80 "_format_no_data_message",

81 "_format_quality_alerts",

82 "_format_search_results",

83 "_format_statistics_header",

84 "_generate_quality_trend_recommendations",

85 "_get_intelligence_error_result",

86 "_get_time_based_recommendations",

87 "_optimize_git_repository",

88 "_parse_git_status",

89 "_stage_and_commit_files",

90 "create_checkpoint_commit",

91 "create_commit",

92 "format_auto_store_summary",

93 "generate_auto_store_tags",

94 "get_app_monitor",

95 "get_database_pool",

96 "get_dependency_status",

97 "get_git_status",

98 "get_llm_manager",

99 "get_serverless_manager",

100 "get_session_logger",

101 "get_staged_files",

102 "is_git_repository",

103 "lazy_loader",

104 "log_dependency_status",

105 "optional_dependency",

106 "require_dependency",

107 "reset_instances",

108 "should_auto_store_checkpoint",

109 "stage_files",

110 "validate_claude_directory",

111]