hatch-xclam 0.7.1.dev3__py3-none-any.whl → 0.8.0.dev1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. hatch/__init__.py +1 -1
  2. hatch/cli/__init__.py +71 -0
  3. hatch/cli/__main__.py +1035 -0
  4. hatch/cli/cli_env.py +865 -0
  5. hatch/cli/cli_mcp.py +1965 -0
  6. hatch/cli/cli_package.py +566 -0
  7. hatch/cli/cli_system.py +136 -0
  8. hatch/cli/cli_utils.py +1289 -0
  9. hatch/cli_hatch.py +160 -2838
  10. hatch/mcp_host_config/__init__.py +10 -10
  11. hatch/mcp_host_config/adapters/__init__.py +34 -0
  12. hatch/mcp_host_config/adapters/base.py +170 -0
  13. hatch/mcp_host_config/adapters/claude.py +105 -0
  14. hatch/mcp_host_config/adapters/codex.py +104 -0
  15. hatch/mcp_host_config/adapters/cursor.py +83 -0
  16. hatch/mcp_host_config/adapters/gemini.py +75 -0
  17. hatch/mcp_host_config/adapters/kiro.py +78 -0
  18. hatch/mcp_host_config/adapters/lmstudio.py +79 -0
  19. hatch/mcp_host_config/adapters/registry.py +149 -0
  20. hatch/mcp_host_config/adapters/vscode.py +83 -0
  21. hatch/mcp_host_config/backup.py +5 -3
  22. hatch/mcp_host_config/fields.py +126 -0
  23. hatch/mcp_host_config/models.py +161 -456
  24. hatch/mcp_host_config/reporting.py +57 -16
  25. hatch/mcp_host_config/strategies.py +155 -87
  26. hatch/template_generator.py +1 -1
  27. {hatch_xclam-0.7.1.dev3.dist-info → hatch_xclam-0.8.0.dev1.dist-info}/METADATA +3 -2
  28. {hatch_xclam-0.7.1.dev3.dist-info → hatch_xclam-0.8.0.dev1.dist-info}/RECORD +52 -43
  29. {hatch_xclam-0.7.1.dev3.dist-info → hatch_xclam-0.8.0.dev1.dist-info}/WHEEL +1 -1
  30. hatch_xclam-0.8.0.dev1.dist-info/entry_points.txt +2 -0
  31. tests/cli_test_utils.py +280 -0
  32. tests/integration/cli/__init__.py +14 -0
  33. tests/integration/cli/test_cli_reporter_integration.py +2439 -0
  34. tests/integration/mcp/__init__.py +0 -0
  35. tests/integration/mcp/test_adapter_serialization.py +173 -0
  36. tests/regression/cli/__init__.py +16 -0
  37. tests/regression/cli/test_color_logic.py +268 -0
  38. tests/regression/cli/test_consequence_type.py +298 -0
  39. tests/regression/cli/test_error_formatting.py +328 -0
  40. tests/regression/cli/test_result_reporter.py +586 -0
  41. tests/regression/cli/test_table_formatter.py +211 -0
  42. tests/regression/mcp/__init__.py +0 -0
  43. tests/regression/mcp/test_field_filtering.py +162 -0
  44. tests/test_cli_version.py +7 -5
  45. tests/test_data/fixtures/cli_reporter_fixtures.py +184 -0
  46. tests/unit/__init__.py +0 -0
  47. tests/unit/mcp/__init__.py +0 -0
  48. tests/unit/mcp/test_adapter_protocol.py +138 -0
  49. tests/unit/mcp/test_adapter_registry.py +158 -0
  50. tests/unit/mcp/test_config_model.py +146 -0
  51. hatch_xclam-0.7.1.dev3.dist-info/entry_points.txt +0 -2
  52. tests/integration/test_mcp_kiro_integration.py +0 -153
  53. tests/regression/test_mcp_codex_backup_integration.py +0 -162
  54. tests/regression/test_mcp_codex_host_strategy.py +0 -163
  55. tests/regression/test_mcp_codex_model_validation.py +0 -117
  56. tests/regression/test_mcp_kiro_backup_integration.py +0 -241
  57. tests/regression/test_mcp_kiro_cli_integration.py +0 -141
  58. tests/regression/test_mcp_kiro_decorator_registration.py +0 -71
  59. tests/regression/test_mcp_kiro_host_strategy.py +0 -214
  60. tests/regression/test_mcp_kiro_model_validation.py +0 -116
  61. tests/regression/test_mcp_kiro_omni_conversion.py +0 -104
  62. tests/test_mcp_atomic_operations.py +0 -276
  63. tests/test_mcp_backup_integration.py +0 -308
  64. tests/test_mcp_cli_all_host_specific_args.py +0 -496
  65. tests/test_mcp_cli_backup_management.py +0 -295
  66. tests/test_mcp_cli_direct_management.py +0 -456
  67. tests/test_mcp_cli_discovery_listing.py +0 -582
  68. tests/test_mcp_cli_host_config_integration.py +0 -823
  69. tests/test_mcp_cli_package_management.py +0 -360
  70. tests/test_mcp_cli_partial_updates.py +0 -859
  71. tests/test_mcp_environment_integration.py +0 -520
  72. tests/test_mcp_host_config_backup.py +0 -257
  73. tests/test_mcp_host_configuration_manager.py +0 -331
  74. tests/test_mcp_host_registry_decorator.py +0 -348
  75. tests/test_mcp_pydantic_architecture_v4.py +0 -603
  76. tests/test_mcp_server_config_models.py +0 -242
  77. tests/test_mcp_server_config_type_field.py +0 -221
  78. tests/test_mcp_sync_functionality.py +0 -316
  79. tests/test_mcp_user_feedback_reporting.py +0 -359
  80. {hatch_xclam-0.7.1.dev3.dist-info → hatch_xclam-0.8.0.dev1.dist-info}/licenses/LICENSE +0 -0
  81. {hatch_xclam-0.7.1.dev3.dist-info → hatch_xclam-0.8.0.dev1.dist-info}/top_level.txt +0 -0
hatch/__init__.py CHANGED
@@ -5,7 +5,7 @@ This package provides tools for managing Hatch packages, environments,
5
5
  and interacting with the Hatch registry.
6
6
  """
7
7
 
8
- from .cli_hatch import main
8
+ from .cli import main
9
9
  from .environment_manager import HatchEnvironmentManager
10
10
  from .package_loader import HatchPackageLoader, PackageLoaderError
11
11
  from .registry_retriever import RegistryRetriever
hatch/cli/__init__.py ADDED
@@ -0,0 +1,71 @@
1
+ """CLI package for Hatch package manager.
2
+
3
+ This package provides the command-line interface for Hatch, organized into
4
+ domain-specific handler modules following a handler-based architecture pattern.
5
+
6
+ Architecture Overview:
7
+ The CLI is structured as a routing layer (__main__.py) that delegates to
8
+ specialized handler modules. Each handler follows the standardized signature:
9
+ (args: Namespace) -> int, where args contains parsed command-line arguments
10
+ and the return value is the exit code (0 for success, non-zero for errors).
11
+
12
+ Modules:
13
+ __main__: Entry point with argument parsing and command routing
14
+ cli_utils: Shared utilities, exit codes, and helper functions
15
+ cli_mcp: MCP (Model Context Protocol) host configuration handlers
16
+ cli_env: Environment management handlers
17
+ cli_package: Package management handlers
18
+ cli_system: System commands (create, validate)
19
+
20
+ Entry Points:
21
+ - main(): Primary entry point for the CLI
22
+ - python -m hatch.cli: Module execution
23
+ - hatch: Console script (when installed via pip)
24
+
25
+ Example:
26
+ >>> from hatch.cli import main
27
+ >>> exit_code = main() # Runs CLI with sys.argv
28
+
29
+ >>> from hatch.cli import EXIT_SUCCESS, EXIT_ERROR
30
+ >>> return EXIT_SUCCESS if operation_ok else EXIT_ERROR
31
+
32
+ Backward Compatibility:
33
+ The hatch.cli_hatch module re-exports all public symbols for backward
34
+ compatibility with external consumers.
35
+ """
36
+
37
+ # Export utilities from cli_utils (no circular import issues)
38
+ from hatch.cli.cli_utils import (
39
+ EXIT_SUCCESS,
40
+ EXIT_ERROR,
41
+ get_hatch_version,
42
+ request_confirmation,
43
+ parse_env_vars,
44
+ parse_header,
45
+ parse_input,
46
+ parse_host_list,
47
+ get_package_mcp_server_config,
48
+ )
49
+
50
+
51
+ def main():
52
+ """Main entry point - delegates to __main__.main().
53
+
54
+ This provides the hatch.cli.main() interface.
55
+ """
56
+ from hatch.cli.__main__ import main as _main
57
+ return _main()
58
+
59
+
60
+ __all__ = [
61
+ 'main',
62
+ 'EXIT_SUCCESS',
63
+ 'EXIT_ERROR',
64
+ 'get_hatch_version',
65
+ 'request_confirmation',
66
+ 'parse_env_vars',
67
+ 'parse_header',
68
+ 'parse_input',
69
+ 'parse_host_list',
70
+ 'get_package_mcp_server_config',
71
+ ]