Skip to content

Comments

[v0.8.0] CLI Architecture Refactoring, MCP Adapter System, and UX Normalization#46

Merged
LittleCoinCoin merged 242 commits intomainfrom
dev
Feb 20, 2026
Merged

[v0.8.0] CLI Architecture Refactoring, MCP Adapter System, and UX Normalization#46
LittleCoinCoin merged 242 commits intomainfrom
dev

Conversation

@LittleCoinCoin
Copy link
Member

Overview

Major architectural evolution introducing modular CLI architecture, unified MCP adapter system, and comprehensive UX improvements. Combines dev1 (architecture refactoring) and dev2 (validation fixes, tooling) while maintaining backward compatibility.

Major Changes

1. CLI Architecture Refactoring

Refactored monolithic cli_hatch.py (2000+ LOC) into modular handler-based architecture:

  • New hatch/cli/ package with separate modules: cli_env.py, cli_mcp.py, cli_package.py, cli_system.py, cli_utils.py
  • Backward compatibility via deprecated cli_hatch.py shim (removal in v0.9.0)
  • Migration: from hatch.cli_hatch import mainfrom hatch.cli import main

2. Unified MCP Adapter System

Replaced host-specific configuration models with unified MCPServerConfig + host-specific adapters:

  • Single source of truth for MCP server configuration
  • Adapters for Claude, VSCode, Cursor, LMStudio, Gemini, Kiro, Codex
  • Pipeline: filter → validate → transform
  • Breaking: Removed legacy models (MCPServerConfigGemini, MCPServerConfigVSCode, etc.)

3. Critical Adapter Validation Fix

Fixed validation ordering bug causing false rejections during cross-host sync:

  • Root cause: Validators ran before field filtering
  • Solution: New validate_filtered() method enforcing correct pipeline order
  • Fixed bugs: type field rejection (Gemini, Codex), tool coexistence issues, missing transport validation
  • Test coverage: 64 cross-host sync tests + regression tests

Key Features

New Commands

  • hatch env show — Detailed environment information with package lists
  • hatch env list hosts/servers — Show MCP deployments in environments
  • hatch mcp show hosts/servers — Detailed MCP configuration views
  • hatch mcp list hosts/servers — Table views of MCP configurations

Command Enhancements

  • hatch mcp sync --detailed — Field-level sync transparency with old → new diffs
  • hatch env list — Simplified output (use env show for details)
  • --pattern flag for regex filtering on list commands
  • --json flag for machine-readable output
  • --dry-run for env and package mutations
  • Confirmation prompts for env remove and package remove

CLI Output Standardization

  • ResultReporter — Unified output with consequence types (SUCCESS, ERROR, CREATED, UPDATED, etc.)
  • TableFormatter — Aligned table output
  • HatchArgumentParser — Formatted error messages
  • Color utilities with HCL palette and true color detection
  • Standardized formatters: report_error, format_warning, format_validation_error

Deprecations

  • hatch mcp discover servershatch mcp list servers
  • hatch package listhatch env list or hatch env show
  • hatch mcp show <host>hatch mcp show hosts --pattern <host>
  • hatch.cli_hatch module → hatch.cli (removal in v0.9.0)

Developer Experience

Pre-Commit Infrastructure

  • Added .pre-commit-config.yaml with black and ruff hooks
  • Applied formatting and linting across entire codebase

Test Modernization

  • Replaced slow integration tests with mocked unit tests
  • Modernized 8 test modules (installer, environment manager, etc.)
  • Added shared venv fixture and tests/README.md
  • Updated all 310 CLI tests for new architecture

Documentation

  • New guides: CLI Architecture, Adding CLI Commands, MCP Host Configuration (rewritten)
  • Updated CLI Reference with current syntax and outputs
  • Fixed 15+ command syntax errors in tutorials
  • Restructured API docs for modular architecture

Breaking Changes

Removed Models:

  • MCPServerConfigBase, MCPServerConfigGemini, MCPServerConfigVSCode, MCPServerConfigCursor, MCPServerConfigClaude, MCPServerConfigKiro, MCPServerConfigCodex, MCPServerConfigOmni
  • HOST_MODEL_REGISTRY

Migration: Use MCPServerConfig with adapters from hatch.mcp_host_config.adapters

Removed Commands:

  • hatch mcp show <host> — Use hatch mcp show hosts --pattern <host>

This pulls the most recent org's wide coding instructions.
Establish hatch/cli/ directory with package initialization as the
foundation for handler-based CLI architecture refactoring.

Deliverables:
- hatch/cli/__init__.py: Package init with main() export
- hatch/cli/__main__.py: Module entry point for python -m hatch.cli

Both files delegate to cli_hatch.main() for backward compatibility.
Full entry point migration planned for Task M1.7.
Add cli_test_utils.py with helper functions to simplify test setup
for CLI handlers during the refactoring process.

Utilities provided:
- create_mcp_configure_args(): Build Namespace for configure handler
- create_mock_env_manager(): Mock HatchEnvironmentManager
- create_mock_mcp_manager(): Mock MCPHostConfigurationManager

These reduce boilerplate and ensure consistent test patterns across
the CLI test suite as handlers are extracted to new modules.
Create hatch/cli/cli_utils.py with consolidated utility functions:
- EXIT_SUCCESS, EXIT_ERROR constants for consistent return values
- get_hatch_version() from importlib.metadata
- request_confirmation() for user interaction
- parse_env_vars(), parse_header(), parse_input() for CLI parsing
- parse_host_list() consolidated (resolved duplication, returns List[str])
- get_package_mcp_server_config() for MCP package configuration

Update cli_hatch.py to import from cli_utils and remove original
definitions. Update cli/__init__.py exports.

This consolidation reduces cli_hatch.py by ~150 LOC and resolves the
parse_host_list duplication (was at lines 47 and 1032).
Update test imports and mock paths for extracted utilities:

test_cli_version.py:
- Import get_hatch_version from hatch.cli.cli_utils
- Update mock path hatch.cli_hatch.version -> hatch.cli.cli_utils.version

test_mcp_cli_package_management.py:
- Import utilities from hatch.cli.cli_utils
- Update mock path for MCPHostRegistry
- Update parse_host_list tests for List[str] return type (was List[MCPHostType])
- Update mock path for Path.exists to hatch.cli.cli_utils.Path.exists
test(cli): update test_mcp_cli_package_management mock paths for new architecture

test(cli): update test_mcp_cli_discovery_listing mock paths for new architecture

test(cli): update test_mcp_cli_direct_management for new architecture

- Update import paths from hatch.cli_hatch to hatch.cli modules
- Fix handler calls to use args: Namespace signature instead of individual parameters
- Add env_manager attribute to test Namespace objects where required
- Fix attribute names (host_name vs host) for remove host handlers
- Update mock paths to new module locations
- All 21 tests now passing

test(cli): update test_mcp_cli_backup_management for new architecture

M1.8.1: Update backup management tests for handler-based architecture

Changes:
- Update mock paths from hatch.cli_hatch to hatch.cli.cli_mcp
- Update argument parsing tests to use assert_called_once()
- Patch MCPHostConfigBackupManager at source module level
- Patch request_confirmation at hatch.cli.cli_utils
- Import MCPHostConfigBackupManager at module level for patching

All 14 backup management tests now pass.

test(cli): update remaining test files for handler-based architecture

M1.8.1: Complete test updates for new CLI architecture

Files updated:
- tests/cli_test_utils.py: Enhanced helper functions for Namespace creation
- tests/test_mcp_cli_host_config_integration.py: Updated mock paths and Namespace calls
- tests/test_mcp_cli_partial_updates.py: Updated for new handler signatures
- tests/test_mcp_cli_all_host_specific_args.py: Updated mock paths
- tests/regression/test_mcp_kiro_cli_integration.py: Updated for cli_mcp module

All 310 CLI tests now pass.
M1.8.3: Add comprehensive docstrings to all CLI modules

Updated docstrings in:
- hatch/cli/__init__.py: Architecture overview and entry points
- hatch/cli/__main__.py: Command structure and routing details
- hatch/cli/cli_utils.py: Constants and function documentation
- hatch/cli/cli_mcp.py: Supported hosts and command groups
- hatch/cli/cli_env.py: Environment management commands
- hatch/cli/cli_package.py: Package workflow documentation
- hatch/cli/cli_system.py: Package creation and validation
- hatch/cli_hatch.py: Migration notes and exported symbols

All docstrings include examples and handler signature documentation.
Update documentation references after CLI refactoring from monolithic
cli_hatch.py to handler-based architecture in hatch/cli/ package.

Updated files:
- docs/articles/api/cli.md: Expand API docs for new CLI package structure
- docs/articles/users/CLIReference.md: Update intro reference
- docs/articles/devs/implementation_guides/mcp_host_configuration_extension.md: Fix CLI integration guidance
- docs/articles/devs/architecture/mcp_host_configuration.md: Update CLI references
- docs/resources/diagrams/architecture.puml: Update CLI layer to show modular structure

Added deprecation analysis report documenting all changes.
Add DeprecationWarning when importing from hatch.cli_hatch module.
Update hatch/__init__.py to import main from hatch.cli instead of
the deprecated cli_hatch shim to avoid triggering warnings internally.

Changes:
- hatch/cli_hatch.py: Add deprecation warning (removal planned for v0.9.0)
- hatch/__init__.py: Import main from hatch.cli
- docs/articles/api/index.md: Update example imports
LittleCoinCoin and others added 27 commits February 20, 2026 11:04
Convert TestPythonEnvironmentManagerIntegration to use mocked executables:
- setUpClass: create manager with mocked _detect_conda_mamba, set fake executables
- tearDownClass: simplified to just temp dir cleanup (no real envs to remove)
- test_conda_mamba_detection_real: remove @slow_test, uses pre-set fake executables
- test_manager_diagnostics_real: remove @slow_test, mock subprocess.run for --version calls
- Fix pre-existing ruff F841 (unused python_version variable)

Tests now run in <0.2s instead of minutes.
- Mock python_env_manager.is_available() to skip real conda/mamba calls
  in test_create_environment, test_remove_environment, test_set_current_environment
- Mock _install_hatch_mcp_server to prevent MCP server installation attempts
- Remove @slow_test decorator from all 3 tests
- Remove hard assertion on Hatching-Dev directory in setUp

Agent-Id: agent-039b1492-3695-46d1-8e71-7b13d5e8128b
Mock test_create_and_remove_python_environment_real and
test_create_python_environment_with_version_real:
- Stateful subprocess mock tracks env creation/removal state
- Mock Path.exists for python executable checks
- Remove @slow_test from create/remove test
- Both tests now run in <0.2s
Mock all remaining TestPythonEnvironmentManagerIntegration tests:
- test_environment_diagnostics_real: mock subprocess for env diagnostics
- test_force_recreation_real: stateful mock for create/force-recreate/remove flow
- test_list_environments_real: mock env list JSON response
- test_multiple_python_versions_real: mock multi-version create/verify, remove skipIf
- test_error_handling_real: mock empty env list for non-existent env error handling
- Remove unused slow_test import and python_path variable

All 9 integration tests now run in <0.2s with zero subprocess calls.
- Mock python_env_manager.is_available() in test_add_local_package,
  test_add_package_with_dependencies, test_add_package_with_some_dependencies_already_present
- Remove @slow_test decorator from all 3 tests
- Add hatch_installer import to ensure installer registration

Agent-Id: agent-039b1492-3695-46d1-8e71-7b13d5e8128b
- Mock python_env_manager.is_available() in test_add_package_with_all_dependencies_already_present,
  test_add_package_with_version_constraint_satisfaction, test_add_package_with_mixed_dependency_types
- Remove @slow_test decorator from all 3 tests
- Add PythonInstaller import and mock _run_pip_subprocess for mixed dependency test
- Mock get_environment_info for python environment verification

Agent-Id: agent-039b1492-3695-46d1-8e71-7b13d5e8128b
- Mock SystemInstaller methods for test_add_package_with_system_dependency
- Mock DockerInstaller methods for test_add_package_with_docker_dependency
- Remove @slow_test from 5 tests (system dep, docker dep, 3 MCP server tests)
- Remove @unittest.skipIf/@skipUnless platform/docker guards (now mocked)
- Add SystemInstaller and DockerInstaller imports for registration
- Use TestDataLoader for system/docker package paths instead of Hatching-Dev
- Add is_available mock to MCP server tests

Agent-Id: agent-039b1492-3695-46d1-8e71-7b13d5e8128b
Mock setUp() to patch PythonEnvironmentManager._detect_conda_mamba and
HatchEnvironmentManager._install_hatch_mcp_server before constructing the
environment manager. This prevents real subprocess/network calls during
test initialization.

Convert 3 slow tests to fast mocked tests:
- test_create_environment
- test_remove_environment
- test_set_current_environment

All 3 tests now complete in <0.2s (previously ~3.5s each).
Remove @slow_test from 3 package addition tests:
- test_add_local_package
- test_add_package_with_dependencies
- test_add_package_with_some_dependencies_already_present

These tests use create_python_env=False so no conda/pip calls needed.
The setUp() mocking from the previous commit handles constructor speed.

Note: test_add_package_with_some_dependencies_already_present has a
pre-existing failure (hatch dependency installer not registered for
utility_pkg) unrelated to mocking changes.
Remove @slow_test from:
- test_add_package_with_all_dependencies_already_present
- test_add_package_with_version_constraint_satisfaction
- test_add_package_with_mixed_dependency_types

Add PythonEnvironmentManager mocks (is_available, create_python_environment,
get_environment_info) for test_add_package_with_mixed_dependency_types.

Note: test_add_package_with_mixed_dependency_types has a pre-existing failure
(python installer not registered in test context) unrelated to mocking changes.
- Remove @slow_test from 5 tests: system dep, docker dep, 3 MCP server tests
- Remove @unittest.skipIf (platform) and @unittest.skipUnless (docker) guards
- Add @patch.object decorators for SystemInstaller methods (_is_platform_supported,
  _is_apt_available, _run_apt_subprocess, _verify_installation)
- Add @patch.object decorators for DockerInstaller methods (_is_docker_available,
  _pull_docker_image)
- Replace Hatching-Dev paths with TestDataLoader for system_dep_pkg and docker_dep_pkg
- Import SystemInstaller and DockerInstaller; remove unused DOCKER_DAEMON_AVAILABLE import
- MCP server tests already had instance-level mocks; setUp class-level mock handles
  constructor slowness
- Remove @slow_test from final 3 tests: test_create_environment_no_python_no_mcp_server,
  test_install_mcp_server_existing_environment,
  test_create_python_environment_only_with_mcp_wrapper
- Remove slow_test from wobble.decorators import (no longer used)
- All 3 tests already had instance-level mocks; setUp class-level patches handle
  constructor slowness
- All 17 originally-slow tests now run as fast mocked unit tests (0.25s total)
- Remove @slow_test decorator from all 9 integration tests
- Mock subprocess.Popen for direct subprocess tests
- Mock _run_apt_subprocess for install flow tests
- Remove unused slow_test import
- All 42 tests pass in 0.24s

Agent-Id: agent-779d11db-f301-4bf7-91b1-5deca63bec38
Remove @slow_test decorators from all 6 tests across 2 files:
- test_docker_installer.py: 3 tests in TestDockerInstallerIntegration mocked
  with @patch.object for DockerInstaller._is_docker_available and
  _get_docker_client
- test_online_package_loader.py: 3 tests mocked with patch.object for
  RegistryRetriever, PythonEnvironmentManager, and
  DependencyInstallerOrchestrator to eliminate network/subprocess calls

All 27 tests pass in 0.18s.
Remove @slow_test decorators from all 8 tests in test_non_tty_integration.py.
All tests were already fully mocked (simulation_mode, mock stdin.isatty,
mock input, mock os.environ) so no additional mocking was needed.

All 8 tests pass. Combined with Steps 1-2, all 23 @slow_test decorators
have been removed from the 4 target files (77 tests total, 72 passed,
5 skipped).
Agent-Id: agent-bdfb98f1-93d0-4131-907f-e24aa62c5009
The get_hatch_version() function was attempting to retrieve the version
using 'hatch' as the package name, but the actual package name in
pyproject.toml is 'hatch-xclam'. This caused PackageNotFoundError,
resulting in the fallback message "unknown (development mode)".

Changes:
- Update get_hatch_version() to use version("hatch-xclam")
- Update test assertion to expect the correct package name

Now 'hatch --version' correctly displays the actual version from package
metadata instead of falling back to the development mode message.

Agent-Id: agent-6c8c473d-ba2a-4032-9e3f-cbbd10cf75e6
The pip command to install a new dev version was not correct (missing double `=`)
- Update submodule: 9 files cleaned, roadmap schema added
- Add fresh-eye review report (02-fresh_eye_review_v0.md)
[v0.8.0.dev2] Adapter validation fix, pre-commit infrastructure, and test modernization
## 0.8.0-dev.2 (2026-02-20)

* Merge pull request #45 from LittleCoinCoin/dev ([0ed9010](0ed9010)), closes [#45](#45)
* fix(ci): pre-release installation instructions ([0206dc0](0206dc0))
* fix(cli-version): use correct package name for version lookup ([76c3364](76c3364))
* fix(cli): remove obsolete handle_mcp_show import ([388ca01](388ca01))
* fix(instructions): purge stale Phase terminology ([dba119a](dba119a))
* fix(mcp-adapters): add missing strategies import ([533a66d](533a66d))
* fix(mcp-adapters): add transport mutual exclusion to GeminiAdapter ([319d067](319d067))
* fix(mcp-adapters): allow enabled_tools/disabled_tools coexistence ([ea6471c](ea6471c))
* fix(mcp-adapters): allow includeTools/excludeTools coexistence ([d8f8a56](d8f8a56))
* fix(mcp-adapters): remove type field rejection from CodexAdapter ([0627352](0627352))
* fix(mcp-adapters): remove type field rejection from GeminiAdapter ([2d8e0a3](2d8e0a3))
* fix(ruff): resolve F821 errors and consolidate imports ([0be9fc8](0be9fc8)), closes [hi#priority](https://github.com/hi/issues/priority)
* docs(cli-ref): update mcp sync command documentation ([17ae770](17ae770))
* docs(mcp-adapters): update architecture for new pattern ([693665c](693665c))
* docs(mcp): update error message examples ([5988b3a](5988b3a))
* docs(testing): add tests/README.md with testing strategy ([08162ce](08162ce))
* docs(testing): update README - all test issues resolved ([5c60ef2](5c60ef2))
* test(docker-loader): mock docker and online package loader tests ([df5533e](df5533e))
* test(env-manager): mock conda/mamba detection tests ([ce82350](ce82350))
* test(env-manager): mock environment creation tests ([8bf3289](8bf3289))
* test(env-manager): mock remaining integration tests ([5a4d215](5a4d215))
* test(env-manip): mock advanced package dependency tests ([1878751](1878751))
* test(env-manip): mock advanced package dependency tests ([9a945ad](9a945ad))
* test(env-manip): mock basic environment operations ([0b4ed74](0b4ed74))
* test(env-manip): mock basic environment operations ([675a67d](675a67d))
* test(env-manip): mock package addition tests ([0f99f4c](0f99f4c))
* test(env-manip): mock package addition tests ([04cb79f](04cb79f))
* test(env-manip): mock remaining 3 slow tests ([df7517c](df7517c))
* test(env-manip): mock system, docker, and MCP server tests ([63084c4](63084c4))
* test(env-manip): mock system, docker, and MCP server tests ([9487ef8](9487ef8))
* test(env-manip): remove remaining @slow_test decorators ([0403a7d](0403a7d))
* test(installer): add shared venv fixture for integration tests ([095f6ce](095f6ce))
* test(installer): mock pip installation tests (batch 1) ([45bdae0](45bdae0))
* test(installer): mock pip installation tests (batch 2) ([1650442](1650442))
* test(installer): refactor integration test to use shared venv ([bd979be](bd979be))
* test(mcp-adapters): add canonical configs fixture ([46f54a6](46f54a6))
* test(mcp-adapters): add cross-host sync tests (64 pairs) ([c77f448](c77f448))
* test(mcp-adapters): add field filtering regression tests ([bc3e631](bc3e631))
* test(mcp-adapters): add host configuration tests (8 hosts) ([b3e640e](b3e640e))
* test(mcp-adapters): add validation bug regression tests ([8eb6f7a](8eb6f7a))
* test(mcp-adapters): deprecate old tests for data-driven ([8177520](8177520))
* test(mcp-adapters): fix registry test for new abstract method ([32aa3cb](32aa3cb))
* test(mcp-adapters): implement HostRegistry with fields.py ([127c1f7](127c1f7))
* test(mcp-adapters): implement property-based assertions ([4ac17ef](4ac17ef))
* test(mcp-sync): use canonical fixture data in detailed flag tests ([c2f35e4](c2f35e4))
* test(non-tty): remove slow_test from integration tests ([772de01](772de01))
* test(system-installer): mock system installer tests ([23de568](23de568))
* test(validation): add pytest pythonpath config ([9924374](9924374))
* feat(cli): display server list in mcp sync pre-prompt ([96d7f56](96d7f56))
* feat(mcp-adapters): implement field transformations in CodexAdapter ([59cc931](59cc931))
* feat(mcp-sync): add --detailed flag for field-level sync output ([dea1541](dea1541))
* feat(mcp): add preview_sync method for server name resolution ([52bdc10](52bdc10))
* refactor(cli): standardize backup restore failure error ([9a8377f](9a8377f))
* refactor(cli): standardize configure failure error ([1065c32](1065c32))
* refactor(cli): standardize mcp sync failure error reporting ([82a2d3b](82a2d3b))
* refactor(cli): standardize package configure exception warning ([b1bde91](b1bde91))
* refactor(cli): standardize package configure failure warning ([b14e9f4](b14e9f4))
* refactor(cli): standardize package invalid host error ([7f448a1](7f448a1))
* refactor(cli): standardize remove failure error ([023c64f](023c64f))
* refactor(cli): standardize remove-host failure error ([b2de533](b2de533))
* refactor(cli): standardize remove-server failure error ([2d40d09](2d40d09))
* refactor(mcp-adapters): add validate_filtered to BaseAdapter ([b1f542a](b1f542a))
* refactor(mcp-adapters): convert ClaudeAdapter to validate-after-filter ([13933a5](13933a5))
* refactor(mcp-adapters): convert CodexAdapter to validate-after-filter ([7ac8de1](7ac8de1))
* refactor(mcp-adapters): convert CursorAdapter to validate-after-filter ([93aa631](93aa631))
* refactor(mcp-adapters): convert GeminiAdapter to validate-after-filter ([cb5d98e](cb5d98e))
* refactor(mcp-adapters): convert KiroAdapter to validate-after-filter ([0eb7d46](0eb7d46))
* refactor(mcp-adapters): convert LMStudioAdapter to validate-after-filter ([1bd3780](1bd3780))
* refactor(mcp-adapters): convert VSCodeAdapter to validate-after-filter ([5c78df9](5c78df9))
* chore(dev-infra): add code quality tools to dev dependencies ([f76c5c1](f76c5c1))
* chore(dev-infra): add pre-commit configuration ([67da239](67da239))
* chore(dev-infra): apply black formatting to entire codebase ([2daa89d](2daa89d))
* chore(dev-infra): apply ruff linting fixes to codebase ([6681ee6](6681ee6))
* chore(dev-infra): install pre-commit hooks and document initial state ([eb81ea4](eb81ea4))
* chore(dev-infra): verify pre-commit hooks pass on entire codebase ([ed90350](ed90350))
@LittleCoinCoin
Copy link
Member Author

See #45 and #44 for intermediate development PRs

@LittleCoinCoin LittleCoinCoin merged commit 514f2c7 into main Feb 20, 2026
6 checks passed
cracking-shells-semantic-release bot pushed a commit that referenced this pull request Feb 20, 2026
## 0.8.0 (2026-02-20)

* Merge pull request #44 from LittleCoinCoin/dev ([1157922](1157922)), closes [#44](#44)
* Merge pull request #45 from LittleCoinCoin/dev ([0ed9010](0ed9010)), closes [#45](#45)
* Merge pull request #46 from CrackingShells/dev ([514f2c7](514f2c7)), closes [#46](#46)
* chore: update entry point to hatch.cli module ([cf81671](cf81671))
* chore: update submodule `cracking-shells-playbook` ([222b357](222b357))
* chore(deps): add pytest to dev dependencies ([2761afe](2761afe))
* chore(dev-infra): add code quality tools to dev dependencies ([f76c5c1](f76c5c1))
* chore(dev-infra): add pre-commit configuration ([67da239](67da239))
* chore(dev-infra): apply black formatting to entire codebase ([2daa89d](2daa89d))
* chore(dev-infra): apply ruff linting fixes to codebase ([6681ee6](6681ee6))
* chore(dev-infra): install pre-commit hooks and document initial state ([eb81ea4](eb81ea4))
* chore(dev-infra): verify pre-commit hooks pass on entire codebase ([ed90350](ed90350))
* chore(docs): remove deprecated CLI api doc ([12a22c0](12a22c0))
* chore(docs): remove deprecated MCP documentation files ([5ca09a3](5ca09a3))
* chore(release): 0.8.0-dev.1 ([f787c93](f787c93))
* chore(release): 0.8.0-dev.2 ([2d30523](2d30523))
* chore(tests): remove deprecated MCP test files ([29a5ec5](29a5ec5))
* fix(backup): support different config filenames in backup listing ([06eb53a](06eb53a)), closes [#2](#2)
* fix(ci): pre-release installation instructions ([0206dc0](0206dc0))
* fix(cli-version): use correct package name for version lookup ([76c3364](76c3364))
* fix(cli): remove obsolete handle_mcp_show import ([388ca01](388ca01))
* fix(docs): add missing return type annotations for mkdocs build ([da78682](da78682))
* fix(instructions): purge stale Phase terminology ([dba119a](dba119a))
* fix(mcp-adapters): add missing strategies import ([533a66d](533a66d))
* fix(mcp-adapters): add transport mutual exclusion to GeminiAdapter ([319d067](319d067))
* fix(mcp-adapters): allow enabled_tools/disabled_tools coexistence ([ea6471c](ea6471c))
* fix(mcp-adapters): allow includeTools/excludeTools coexistence ([d8f8a56](d8f8a56))
* fix(mcp-adapters): remove type field rejection from CodexAdapter ([0627352](0627352))
* fix(mcp-adapters): remove type field rejection from GeminiAdapter ([2d8e0a3](2d8e0a3))
* fix(ruff): resolve F821 errors and consolidate imports ([0be9fc8](0be9fc8)), closes [hi#priority](https://github.com/hi/issues/priority)
* docs: fix broken link in MCP host configuration architecture ([e9f89f1](e9f89f1))
* docs(api): restructure CLI API documentation to modular architecture ([318d212](318d212))
* docs(cli-ref): mark package list as deprecated and update filters ([06f5b75](06f5b75))
* docs(cli-ref): update environment commands section ([749d992](749d992))
* docs(cli-ref): update MCP commands section with new list/show commands ([1c812fd](1c812fd))
* docs(cli-ref): update mcp sync command documentation ([17ae770](17ae770))
* docs(cli): add module docstrings for refactored CLI ([8d7de20](8d7de20))
* docs(cli): update documentation for handler-based architecture ([f95c5d0](f95c5d0))
* docs(devs): add CLI architecture and implementation guide ([a3152e1](a3152e1))
* docs(guide): add quick reference for viewing commands ([5bf5d01](5bf5d01))
* docs(guide): add viewing host configurations section ([6c381d1](6c381d1))
* docs(mcp-adapters): update architecture for new pattern ([693665c](693665c))
* docs(mcp-host-config): deprecate legacy architecture doc ([d8618a5](d8618a5))
* docs(mcp-host-config): deprecate legacy extension guide ([f172a51](f172a51))
* docs(mcp-host-config): write new architecture documentation ([ff05ad5](ff05ad5))
* docs(mcp-host-config): write new extension guide ([7821062](7821062))
* docs(mcp-reporting): document metadata field exclusion behavior ([5ccb7f9](5ccb7f9))
* docs(mcp): update error message examples ([5988b3a](5988b3a))
* docs(testing): add tests/README.md with testing strategy ([08162ce](08162ce))
* docs(testing): update README - all test issues resolved ([5c60ef2](5c60ef2))
* docs(tutorial): fix command syntax in environment sync tutorial ([b2f40bf](b2f40bf))
* docs(tutorial): fix verification commands in checkpoint tutorial ([59b2485](59b2485))
* docs(tutorial): update env list output in create environment tutorial ([443607c](443607c))
* docs(tutorial): update package installation tutorial outputs ([588bab3](588bab3))
* docs(tutorials): fix command syntax in 04-mcp-host-configuration ([2ac1058](2ac1058))
* docs(tutorials): fix outdated env list output format in 02-environments ([d38ae24](d38ae24))
* docs(tutorials): fix validation output in 03-author-package ([776d40f](776d40f))
* test(cli): add ConversionReport fixtures for reporter tests ([eeccff6](eeccff6))
* test(cli): add failing integration test for MCP handler ([acf7c94](acf7c94))
* test(cli): add failing test for host-centric mcp list servers ([0fcb8fd](0fcb8fd))
* test(cli): add failing tests for ConversionReport integration ([8e6efc0](8e6efc0))
* test(cli): add failing tests for env list hosts ([454b0e4](454b0e4))
* test(cli): add failing tests for env list servers ([7250387](7250387))
* test(cli): add failing tests for host-centric mcp list hosts ([3ec0617](3ec0617))
* test(cli): add failing tests for mcp show hosts ([8c8f3e9](8c8f3e9))
* test(cli): add failing tests for mcp show servers ([fac85fe](fac85fe))
* test(cli): add failing tests for TableFormatter ([90f3953](90f3953))
* test(cli): add test directory structure for CLI reporter ([7044b47](7044b47))
* test(cli): add test utilities for handler testing ([55322c7](55322c7))
* test(cli): add tests for Color enum and color enable/disable logic ([f854324](f854324))
* test(cli): add tests for Consequence dataclass and ResultReporter ([127575d](127575d))
* test(cli): add tests for ConsequenceType enum ([a3f0204](a3f0204))
* test(cli): add tests for error reporting methods ([2561532](2561532))
* test(cli): add tests for HatchArgumentParser ([8b192e5](8b192e5))
* test(cli): add tests for ValidationError and utilities ([a2a5c29](a2a5c29))
* test(cli): add true color detection tests ([79f6faa](79f6faa))
* test(cli): update backup tests for cli_mcp module ([8174bef](8174bef))
* test(cli): update color tests for HCL palette ([a19780c](a19780c))
* test(cli): update direct_management tests for cli_mcp module ([16f8520](16f8520))
* test(cli): update discovery tests for cli_mcp module ([de75cf0](de75cf0))
* test(cli): update for new cli architecture ([64cf74e](64cf74e))
* test(cli): update host config integration tests for cli_mcp module ([ea5c6b6](ea5c6b6))
* test(cli): update host_specific_args tests for cli_mcp module ([8f477f6](8f477f6))
* test(cli): update list tests for cli_mcp module ([e21ecc0](e21ecc0))
* test(cli): update mcp list servers tests for --pattern removal ([9bb5fe5](9bb5fe5))
* test(cli): update partial_updates tests for cli_mcp module ([4484e67](4484e67))
* test(cli): update remaining MCP tests for cli_mcp module ([a655775](a655775))
* test(cli): update sync_functionality tests for cli_mcp module ([eeb2d6d](eeb2d6d))
* test(cli): update tests for cli_utils module ([7d72f76](7d72f76))
* test(cli): update tests for mcp show removal ([a0e730b](a0e730b))
* test(deprecate): rename 28 legacy MCP tests to .bak for rebuild ([e7f9c50](e7f9c50))
* test(docker-loader): mock docker and online package loader tests ([df5533e](df5533e))
* test(env-manager): mock conda/mamba detection tests ([ce82350](ce82350))
* test(env-manager): mock environment creation tests ([8bf3289](8bf3289))
* test(env-manager): mock remaining integration tests ([5a4d215](5a4d215))
* test(env-manip): mock advanced package dependency tests ([1878751](1878751))
* test(env-manip): mock advanced package dependency tests ([9a945ad](9a945ad))
* test(env-manip): mock basic environment operations ([0b4ed74](0b4ed74))
* test(env-manip): mock basic environment operations ([675a67d](675a67d))
* test(env-manip): mock package addition tests ([0f99f4c](0f99f4c))
* test(env-manip): mock package addition tests ([04cb79f](04cb79f))
* test(env-manip): mock remaining 3 slow tests ([df7517c](df7517c))
* test(env-manip): mock system, docker, and MCP server tests ([63084c4](63084c4))
* test(env-manip): mock system, docker, and MCP server tests ([9487ef8](9487ef8))
* test(env-manip): remove remaining @slow_test decorators ([0403a7d](0403a7d))
* test(installer): add shared venv fixture for integration tests ([095f6ce](095f6ce))
* test(installer): mock pip installation tests (batch 1) ([45bdae0](45bdae0))
* test(installer): mock pip installation tests (batch 2) ([1650442](1650442))
* test(installer): refactor integration test to use shared venv ([bd979be](bd979be))
* test(mcp-adapters): add canonical configs fixture ([46f54a6](46f54a6))
* test(mcp-adapters): add cross-host sync tests (64 pairs) ([c77f448](c77f448))
* test(mcp-adapters): add field filtering regression tests ([bc3e631](bc3e631))
* test(mcp-adapters): add host configuration tests (8 hosts) ([b3e640e](b3e640e))
* test(mcp-adapters): add validation bug regression tests ([8eb6f7a](8eb6f7a))
* test(mcp-adapters): deprecate old tests for data-driven ([8177520](8177520))
* test(mcp-adapters): fix registry test for new abstract method ([32aa3cb](32aa3cb))
* test(mcp-adapters): implement HostRegistry with fields.py ([127c1f7](127c1f7))
* test(mcp-adapters): implement property-based assertions ([4ac17ef](4ac17ef))
* test(mcp-host-config): add adapter registry unit tests ([bc8f455](bc8f455))
* test(mcp-host-config): add integration tests for adapter serialization ([6910120](6910120))
* test(mcp-host-config): add regression tests for field filtering ([d6ce817](d6ce817))
* test(mcp-host-config): add unit tests ([c1a0fa4](c1a0fa4))
* test(mcp-host-config): create three-tier test directory structure ([d78681b](d78681b))
* test(mcp-host-config): update integration tests for adapter architecture ([acd7871](acd7871))
* test(mcp-sync): use canonical fixture data in detailed flag tests ([c2f35e4](c2f35e4))
* test(non-tty): remove slow_test from integration tests ([772de01](772de01))
* test(system-installer): mock system installer tests ([23de568](23de568))
* test(validation): add pytest pythonpath config ([9924374](9924374))
* feat(adapters): create AdapterRegistry for host-adapter mapping ([a8e3dfb](a8e3dfb))
* feat(adapters): create BaseAdapter abstract class ([4d9833c](4d9833c))
* feat(adapters): create host-specific adapters ([7b725c8](7b725c8))
* feat(cli): add --dry-run to env and package commands ([4a0f3e5](4a0f3e5))
* feat(cli): add --dry-run to env use, package add, create commands ([79da44c](79da44c))
* feat(cli): add --host and --pattern flags to mcp list servers ([29f86aa](29f86aa))
* feat(cli): add --json flag to list commands ([73f62ed](73f62ed))
* feat(cli): add --pattern filter to env list ([6deff84](6deff84))
* feat(cli): add Color, ConsequenceType, Consequence, ResultReporter ([10cdb71](10cdb71))
* feat(cli): add confirmation prompt to env remove ([b1156e7](b1156e7))
* feat(cli): add confirmation prompt to package remove ([38d9051](38d9051))
* feat(cli): add ConversionReport to ResultReporter bridge ([4ea999e](4ea999e))
* feat(cli): add format_info utility ([b1f33d4](b1f33d4))
* feat(cli): add format_validation_error utility ([f28b841](f28b841))
* feat(cli): add format_warning utility ([28ec610](28ec610))
* feat(cli): add hatch env show command ([2bc96bc](2bc96bc))
* feat(cli): add hatch mcp show command ([9ab53bc](9ab53bc))
* feat(cli): add HatchArgumentParser with formatted errors ([1fb7006](1fb7006))
* feat(cli): add highlight utility for entity names ([c25631a](c25631a))
* feat(cli): add parser for env list hosts command ([a218dea](a218dea))
* feat(cli): add parser for env list servers command ([851c866](851c866))
* feat(cli): add parser for mcp show hosts command ([f7abe61](f7abe61))
* feat(cli): add report_error method to ResultReporter ([e0f89e1](e0f89e1))
* feat(cli): add report_partial_success method to ResultReporter ([1ce4fd9](1ce4fd9))
* feat(cli): add TableFormatter for aligned table output ([658f48a](658f48a))
* feat(cli): add true color terminal detection ([aa76bfc](aa76bfc))
* feat(cli): add unicode terminal detection ([91d7c30](91d7c30))
* feat(cli): add ValidationError exception class ([af63b46](af63b46))
* feat(cli): display server list in mcp sync pre-prompt ([96d7f56](96d7f56))
* feat(cli): implement env list hosts command ([bebe6ab](bebe6ab))
* feat(cli): implement env list servers command ([0c7a744](0c7a744))
* feat(cli): implement HCL color palette with true color support ([d70b4f2](d70b4f2))
* feat(cli): implement mcp show hosts command ([2c716bb](2c716bb))
* feat(cli): implement mcp show servers command ([e6df7b4](e6df7b4))
* feat(cli): update mcp list hosts JSON output ([a6f5994](a6f5994))
* feat(cli): update mcp list hosts parser with --server flag ([c298d52](c298d52))
* feat(mcp-adapters): implement field transformations in CodexAdapter ([59cc931](59cc931))
* feat(mcp-host-config): add field support constants ([1e81a24](1e81a24))
* feat(mcp-host-config): add transport detection to MCPServerConfig ([c4eabd2](c4eabd2))
* feat(mcp-host-config): implement LMStudioAdapter ([0662b14](0662b14))
* feat(mcp-reporting): metadata fields exclusion from cli reports ([41db3da](41db3da))
* feat(mcp-sync): add --detailed flag for field-level sync output ([dea1541](dea1541))
* feat(mcp): add preview_sync method for server name resolution ([52bdc10](52bdc10))
* refactor(cli): add deprecation warning to cli_hatch shim ([f9adf0a](f9adf0a))
* refactor(cli): create cli package structure ([bc80e29](bc80e29))
* refactor(cli): deprecate `mcp discover servers` and `package list` ([9ce5be0](9ce5be0))
* refactor(cli): extract argument parsing and implement clean routing ([efeae24](efeae24))
* refactor(cli): extract environment handlers to cli_env ([d00959f](d00959f))
* refactor(cli): extract handle_mcp_configure to cli_mcp ([9b9bc4d](9b9bc4d))
* refactor(cli): extract handle_mcp_sync to cli_mcp ([f69be90](f69be90))
* refactor(cli): extract MCP backup handlers to cli_mcp ([ca65e2b](ca65e2b))
* refactor(cli): extract MCP discovery handlers to cli_mcp ([887b96e](887b96e))
* refactor(cli): extract MCP list handlers to cli_mcp ([e518e90](e518e90))
* refactor(cli): extract MCP remove handlers to cli_mcp ([4e84be7](4e84be7))
* refactor(cli): extract package handlers to cli_package ([ebecb1e](ebecb1e))
* refactor(cli): extract shared utilities to cli_utils ([0b0dc92](0b0dc92))
* refactor(cli): extract system handlers to cli_system ([2f7d715](2f7d715))
* refactor(cli): integrate backup path into ResultReporter ([fd9a1f4](fd9a1f4))
* refactor(cli): integrate sync statistics into ResultReporter ([cc5a8b2](cc5a8b2))
* refactor(cli): normalize cli_utils warning messages ([6e9b983](6e9b983))
* refactor(cli): normalize MCP warning messages ([b72c6a4](b72c6a4))
* refactor(cli): normalize operation cancelled messages ([ab0b611](ab0b611))
* refactor(cli): normalize package warning messages ([c7463b3](c7463b3))
* refactor(cli): remove --pattern from mcp list servers ([b8baef9](b8baef9))
* refactor(cli): remove legacy mcp show <host> command ([fd2c290](fd2c290))
* refactor(cli): rewrite mcp list hosts for host-centric design ([ac88a84](ac88a84))
* refactor(cli): rewrite mcp list servers for host-centric design ([c2de727](c2de727))
* refactor(cli): simplify CLI to use unified MCPServerConfig with adapters ([d97b99e](d97b99e))
* refactor(cli): simplify env list to show package count only ([3045718](3045718))
* refactor(cli): standardize backup restore failure error ([9a8377f](9a8377f))
* refactor(cli): standardize configure failure error ([1065c32](1065c32))
* refactor(cli): standardize mcp sync failure error reporting ([82a2d3b](82a2d3b))
* refactor(cli): standardize package configure exception warning ([b1bde91](b1bde91))
* refactor(cli): standardize package configure failure warning ([b14e9f4](b14e9f4))
* refactor(cli): standardize package invalid host error ([7f448a1](7f448a1))
* refactor(cli): standardize remove failure error ([023c64f](023c64f))
* refactor(cli): standardize remove-host failure error ([b2de533](b2de533))
* refactor(cli): standardize remove-server failure error ([2d40d09](2d40d09))
* refactor(cli): update env execution errors to use report_error ([8021ba2](8021ba2))
* refactor(cli): update env validation error to use ValidationError ([101eba7](101eba7))
* refactor(cli): update MCP exception handlers to use report_error ([edec31d](edec31d))
* refactor(cli): update MCP validation errors to use ValidationError ([20b165a](20b165a))
* refactor(cli): update package errors to use report_error ([4d0ab73](4d0ab73))
* refactor(cli): update system errors to use report_error ([b205032](b205032))
* refactor(cli): use HatchArgumentParser for all parsers ([4b750fa](4b750fa))
* refactor(cli): use ResultReporter in env create/remove handlers ([d0991ba](d0991ba))
* refactor(cli): use ResultReporter in env python handlers ([df14f66](df14f66))
* refactor(cli): use ResultReporter in handle_env_python_add_hatch_mcp ([0ec6b6a](0ec6b6a))
* refactor(cli): use ResultReporter in handle_env_use ([b7536fb](b7536fb))
* refactor(cli): use ResultReporter in handle_mcp_configure ([5f3c60c](5f3c60c))
* refactor(cli): use ResultReporter in handle_mcp_sync ([9d52d24](9d52d24))
* refactor(cli): use ResultReporter in handle_package_add ([49585fa](49585fa))
* refactor(cli): use ResultReporter in handle_package_remove ([58ffdf1](58ffdf1))
* refactor(cli): use ResultReporter in handle_package_sync ([987b9d1](987b9d1))
* refactor(cli): use ResultReporter in MCP backup handlers ([9ec9e7b](9ec9e7b))
* refactor(cli): use ResultReporter in MCP remove handlers ([e727324](e727324))
* refactor(cli): use ResultReporter in system handlers ([df64898](df64898))
* refactor(cli): use TableFormatter in handle_env_list ([0f18682](0f18682))
* refactor(cli): use TableFormatter in handle_mcp_backup_list ([17dd96a](17dd96a))
* refactor(cli): use TableFormatter in handle_mcp_discover_hosts ([6bef0fa](6bef0fa))
* refactor(cli): use TableFormatter in handle_mcp_list_hosts ([3b465bb](3b465bb))
* refactor(cli): use TableFormatter in handle_mcp_list_servers ([3145e47](3145e47))
* refactor(mcp-adapters): add validate_filtered to BaseAdapter ([b1f542a](b1f542a))
* refactor(mcp-adapters): convert ClaudeAdapter to validate-after-filter ([13933a5](13933a5))
* refactor(mcp-adapters): convert CodexAdapter to validate-after-filter ([7ac8de1](7ac8de1))
* refactor(mcp-adapters): convert CursorAdapter to validate-after-filter ([93aa631](93aa631))
* refactor(mcp-adapters): convert GeminiAdapter to validate-after-filter ([cb5d98e](cb5d98e))
* refactor(mcp-adapters): convert KiroAdapter to validate-after-filter ([0eb7d46](0eb7d46))
* refactor(mcp-adapters): convert LMStudioAdapter to validate-after-filter ([1bd3780](1bd3780))
* refactor(mcp-adapters): convert VSCodeAdapter to validate-after-filter ([5c78df9](5c78df9))
* refactor(mcp-host-config): unified MCPServerConfig ([ca0e51c](ca0e51c))
* refactor(mcp-host-config): update module exports ([5371a43](5371a43))
* refactor(mcp-host-config): wire all strategies to use adapters ([528e5f5](528e5f5))
* refactor(mcp): deprecate display_report in favor of ResultReporter ([3880ea3](3880ea3))
* refactor(models): remove legacy host-specific models from models.py ([ff92280](ff92280))

### BREAKING CHANGE

* Remove all legacy host-specific configuration models
that are now replaced by the unified adapter architecture.

Removed models:
- MCPServerConfigBase (abstract base class)
- MCPServerConfigGemini
- MCPServerConfigVSCode
- MCPServerConfigCursor
- MCPServerConfigClaude
- MCPServerConfigKiro
- MCPServerConfigCodex
- MCPServerConfigOmni
- HOST_MODEL_REGISTRY

The unified MCPServerConfig model plus host-specific adapters now
handle all MCP server configuration. See:
- hatch/mcp_host_config/adapters/ for host adapters

This is part of Milestone 3.1: Legacy Removal in the adapter architecture
refactoring. Tests will need to be updated in subsequent commits.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants