Skip to content

v2.0.0-python

@ianphil ianphil tagged this 08 Nov 04:40
First stable release of the Python implementation.

Features:
=========
- Python 3.11+ runtime with modern tooling (uv)
- Lazy-loading MCP client manager
- Auto-generated typed wrappers
- Field normalization utilities
- 98.7% token reduction pattern preserved

Key Components:
===============
- MCP Client Manager (src/runtime/mcp_client.py)
  * Lazy initialization and connection
  * Tool caching for efficiency
  * Defensive unwrapping pattern

- Script Harness (src/runtime/harness.py)
  * Execute Python scripts with MCP context
  * Automatic cleanup and error handling

- Wrapper Generation (src/runtime/generate_wrappers.py)
  * Auto-generate typed Pydantic models from MCP schemas
  * Type-safe tool wrappers with IDE support

- Field Normalization (src/runtime/normalize_fields.py)
  * Normalize field names for ADO integration
  * Extensible strategy pattern

Testing & Quality:
==================
✅ Unit tests: 66/66 passed
✅ Integration tests: 14/14 passed
✅ mypy strict mode: Success
✅ black formatting: Compliant
✅ ruff linting: Passing

Documentation:
==============
- README.md: Complete Python usage guide
- docs/python-port.md: TypeScript migration guide
- docs/pydantic-usage.md: Pydantic models guide
- docs/type-safety.md: mypy configuration guide

CLI Commands:
=============
uv run mcp-exec <script.py>      # Execute script with MCP
uv run mcp-generate              # Generate typed wrappers

Breaking Changes:
=================
- Python replaces TypeScript as primary implementation
- New project structure (src/ layout with uv)
- New CLI commands (mcp-exec, mcp-generate)
- TypeScript moved to _typescript_reference/

Migration:
==========
See docs/python-port.md for migration guide from TypeScript.

Validation:
===========
All 135 CHECKLIST.md quality checks: ✅ PASSED
All 164 TASKS.md tasks: ✅ COMPLETED
All 8 phases (plan.md): ✅ COMPLETE
Assets 2
Loading