From 993b37c803213bf893eab00c11dbfe73c48a04f7 Mon Sep 17 00:00:00 2001 From: Al Duncanson Date: Thu, 4 Dec 2025 12:09:08 -0500 Subject: [PATCH 1/9] refactor: delete leftover file from previous refactoring --- packages/common/src/handler_common/_version.py | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 packages/common/src/handler_common/_version.py diff --git a/packages/common/src/handler_common/_version.py b/packages/common/src/handler_common/_version.py deleted file mode 100644 index fd8f6c9..0000000 --- a/packages/common/src/handler_common/_version.py +++ /dev/null @@ -1,3 +0,0 @@ -"""Single source of truth for Handler version.""" - -__version__ = "0.1.3" From 4577e6f5d3483dd1c3900645dfdde0eebb855715 Mon Sep 17 00:00:00 2001 From: Al Duncanson Date: Thu, 4 Dec 2025 12:12:16 -0500 Subject: [PATCH 2/9] refactor: migrate dynamic version to static for uv build backend --- pyproject.toml | 13 +++++-------- src/a2a_handler/__init__.py | 5 ++++- src/a2a_handler/_version.py | 3 --- src/a2a_handler/tui.py | 4 +++- uv.lock | 1 + 5 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 src/a2a_handler/_version.py diff --git a/pyproject.toml b/pyproject.toml index 85e700a..e434e07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "a2a-handler" -dynamic = ["version"] +version = "0.1.3" description = "An A2A Protocol client TUI and CLI." requires-python = ">=3.11" dependencies = [ @@ -28,11 +28,8 @@ dev = [ handler = "a2a_handler.cli:main" [build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" +requires = ["uv_build>=0.7,<0.8"] +build-backend = "uv_build" -[tool.hatch.version] -path = "src/a2a_handler/_version.py" - -[tool.hatch.build.targets.wheel] -packages = ["src/a2a_handler"] +[tool.uv.build-backend] +module-root = "src" diff --git a/src/a2a_handler/__init__.py b/src/a2a_handler/__init__.py index 7d299dd..5c492a3 100644 --- a/src/a2a_handler/__init__.py +++ b/src/a2a_handler/__init__.py @@ -1,6 +1,9 @@ """Handler - A2A protocol client and TUI for agent interaction""" -from a2a_handler._version import __version__ +from importlib.metadata import version + from a2a_handler.tui import HandlerTUI, main +__version__ = version("a2a-handler") + __all__ = ["__version__", "HandlerTUI", "main"] diff --git a/src/a2a_handler/_version.py b/src/a2a_handler/_version.py deleted file mode 100644 index fd8f6c9..0000000 --- a/src/a2a_handler/_version.py +++ /dev/null @@ -1,3 +0,0 @@ -"""Single source of truth for Handler version.""" - -__version__ = "0.1.3" diff --git a/src/a2a_handler/tui.py b/src/a2a_handler/tui.py index bafbc54..0b34b5e 100644 --- a/src/a2a_handler/tui.py +++ b/src/a2a_handler/tui.py @@ -4,7 +4,9 @@ import httpx from a2a.types import AgentCard -from a2a_handler._version import __version__ +from importlib.metadata import version + +__version__ = version("a2a-handler") from a2a_handler.client import ( build_http_client, fetch_agent_card, diff --git a/uv.lock b/uv.lock index 5af2b9f..dc22f0a 100644 --- a/uv.lock +++ b/uv.lock @@ -9,6 +9,7 @@ resolution-markers = [ [[package]] name = "a2a-handler" +version = "0.1.3" source = { editable = "." } dependencies = [ { name = "a2a-sdk" }, From b7192a460823aaaa99aef96734e69817b62aaccd Mon Sep 17 00:00:00 2001 From: Al Duncanson Date: Thu, 4 Dec 2025 12:19:33 -0500 Subject: [PATCH 3/9] chore: update uv build backend version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e434e07..6408176 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ dev = [ handler = "a2a_handler.cli:main" [build-system] -requires = ["uv_build>=0.7,<0.8"] +requires = ["uv_build>=0.9.15,<0.10.0"] build-backend = "uv_build" [tool.uv.build-backend] From c013a4a27ea2b04cb752950434a2541786b30e9f Mon Sep 17 00:00:00 2001 From: Al Duncanson Date: Thu, 4 Dec 2025 12:20:23 -0500 Subject: [PATCH 4/9] feat: use uv to get project version in release workflow --- .github/workflows/release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0097af5..3cdd24f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,10 +44,10 @@ jobs: - name: Verify version matches run: | - FILE_VERSION=$(grep -oP '__version__ = "\K[^"]+' packages/common/src/handler_common/_version.py) + PROJECT_VERSION=$(uv version --short) TAG_VERSION=${{ steps.version.outputs.VERSION }} - if [ "$FILE_VERSION" != "$TAG_VERSION" ]; then - echo "Error: Version mismatch! File: $FILE_VERSION, Tag: $TAG_VERSION" + if [ "$PROJECT_VERSION" != "$TAG_VERSION" ]; then + echo "Error: Version mismatch! Project: $PROJECT_VERSION, Tag: $TAG_VERSION" exit 1 fi From 6f1c1ffb10c4344f15a6818413fd8664ea7d55e6 Mon Sep 17 00:00:00 2001 From: Al Duncanson Date: Thu, 4 Dec 2025 12:25:03 -0500 Subject: [PATCH 5/9] feat: use uv for version and add bump recipe --- justfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/justfile b/justfile index c721e14..cbe1eea 100644 --- a/justfile +++ b/justfile @@ -57,12 +57,16 @@ fix: # Show the current version version: - uvx hatch version + uv version + +# Bump version (major, minor, or patch) +bump level="patch": + uv version --bump {{level}} # Create a git tag for the current version tag: - git tag "v$(uvx hatch version)" + git tag "v$(uv version --short)" # Tag and push the release to origin release: tag - git push origin "v$(uvx hatch version)" + git push origin "v$(uv version --short)" From 607dd6935d1b91a11df18f0d345c8430d27ce5f1 Mon Sep 17 00:00:00 2001 From: Al Duncanson Date: Thu, 4 Dec 2025 12:27:36 -0500 Subject: [PATCH 6/9] docs: bump, tag, and release just recipes --- AGENTS.md | 3 +++ CONTRIBUTING.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 12d6bdb..cf6cbfa 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -17,6 +17,9 @@ Use `just` for all development tasks: | `just get-card` | Fetch agent card (CLI) | | `just send` | Send message to agent (CLI) | | `just version` | Show current version | +| `just bump` | Bump version (patch, minor, major) | +| `just tag` | Create git tag for current version | +| `just release` | Tag and push release to origin | ## Project Structure diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b5d0e46..0d4a308 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,6 +44,9 @@ just install # or: uv sync | `just get-card [url]` | Fetch agent card from URL | | `just send [url] [msg]` | Send message to agent | | `just version` | Show current version | +| `just bump [level]` | Bump version (patch, minor, major) | +| `just tag` | Create git tag for current version | +| `just release` | Tag and push release to origin | ## Code Style From 249f5c7a95bfde1328f9fb1581bf0091106e2b53 Mon Sep 17 00:00:00 2001 From: Al Duncanson Date: Thu, 4 Dec 2025 12:34:22 -0500 Subject: [PATCH 7/9] chore: add project metadata for PyPI --- pyproject.toml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 6408176..f2d5255 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,35 @@ name = "a2a-handler" version = "0.1.3" description = "An A2A Protocol client TUI and CLI." +readme = "README.md" requires-python = ">=3.11" +license = "GPL-3.0-or-later" +license-files = ["LICENSE"] +authors = [ + { name = "Al Duncanson", email = "al@alduncanson.com" } +] +keywords = [ + "a2a", + "a2a-protocol", + "agent", + "agent-to-agent", + "ai", + "cli", + "tui", +] +classifiers = [ + "Development Status :: 4 - Beta", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Software Development :: Libraries :: Python Modules", + "Typing :: Typed", +] dependencies = [ "a2a-sdk>=0.2.5", "click>=8.0.0", @@ -24,6 +52,13 @@ dev = [ "ty>=0.0.1a27", ] +[project.urls] +Homepage = "https://github.com/alDuncanson/handler" +Repository = "https://github.com/alDuncanson/handler" +Documentation = "https://github.com/alDuncanson/handler#readme" +Issues = "https://github.com/alDuncanson/handler/issues" +Changelog = "https://github.com/alDuncanson/handler/releases" + [project.scripts] handler = "a2a_handler.cli:main" From 9d1c7e5b6856a15a394bb070fe49e9e6127e0331 Mon Sep 17 00:00:00 2001 From: Al Duncanson Date: Thu, 4 Dec 2025 12:39:12 -0500 Subject: [PATCH 8/9] docs: add PyPI badge and clarify install instructions --- README.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 64b3ebf..22516e4 100644 --- a/README.md +++ b/README.md @@ -3,24 +3,25 @@ [![CI](https://github.com/alDuncanson/handler/actions/workflows/ci.yml/badge.svg)](https://github.com/alDuncanson/handler/actions/workflows/ci.yml) [![A2A Protocol](https://img.shields.io/badge/A2A_Protocol-v0.3.0-blue)](https://a2a-protocol.org/latest/) [![GitHub release](https://img.shields.io/github/v/release/alDuncanson/handler)](https://github.com/alDuncanson/handler/releases) +[![PyPI version](https://img.shields.io/pypi/v/a2a-handler)](https://pypi.org/project/a2a-handler/) [![GitHub stars](https://img.shields.io/github/stars/alDuncanson/handler)](https://github.com/alDuncanson/handler/stargazers) An [A2A](https://a2a-protocol.org/latest/) Protocol client TUI and CLI. ![Handler TUI](./assets/handler-tui.png) -## Run +## Install -This project is managed with [uv](https://docs.astral.sh/uv/), so you can run Handler in a temporary, isolated environment: +Install with [uv](https://docs.astral.sh/uv/): ```bash -uvx --from git+https://github.com/alDuncanson/Handler.git@v0.1.3 handler +uv tool install a2a-handler ``` -or, install it globally: +Or run directly without installing: ```bash -uv tool install git+https://github.com/alDuncanson/Handler.git@v0.1.3 +uvx --from a2a-handler handler ``` ## Use From 43f2ad2bf60698aafebaba6c70e3bdc3952f2340 Mon Sep 17 00:00:00 2001 From: Al Duncanson Date: Thu, 4 Dec 2025 12:39:57 -0500 Subject: [PATCH 9/9] chore: bump version --- pyproject.toml | 2 +- uv.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f2d5255..1252e17 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "a2a-handler" -version = "0.1.3" +version = "0.1.4" description = "An A2A Protocol client TUI and CLI." readme = "README.md" requires-python = ">=3.11" diff --git a/uv.lock b/uv.lock index dc22f0a..daa8b55 100644 --- a/uv.lock +++ b/uv.lock @@ -9,7 +9,7 @@ resolution-markers = [ [[package]] name = "a2a-handler" -version = "0.1.3" +version = "0.1.4" source = { editable = "." } dependencies = [ { name = "a2a-sdk" },