Skip to content

feat(a2a): donkey.serve() wraps the official a2a-sdk - #1212

Merged
tommasobolis merged 2 commits into
developfrom
feat/224-donkey-serve
Oct 25, 2026
Merged

tommasobolis merged 2 commits into
developfrom
feat/224-donkey-serve

Conversation

@tommasobolis

@tommasobolis tommasobolis commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #224

Summary

  • donkey.serve(handler) serves a @donkey.agent handler over A2A in one line (BG §2.9.1). The a2a-sdk handles the protocol; DDK adds a card generated from the @donkey.agent record, a localhost default bind, and failures that reveal only the exception type.
  • New donkey_kit.a2a package beside integrations (ADR 0014); A2ATask/A2AResult exported. New [a2a] extra (a2a-sdk[http-server]>=1.2.0, uvicorn>=0.30), in [all]; floor in verified-apis §8.3, wrapped names in §8.5.
  • Docs: a2a.mdx leads with "Why not have users call the a2a-sdk directly?" and "The setup it replaces"; serve is Offline-verified, expose/dev stay Roadmap. Governed inbound and typed refusals are a2a: governance-aware inbound — correlation, tags, spans and typed refusals on served tasks #225.

Test plan

  • tests/unit/test_a2a_serve.py: raw JSON-RPC round trips (str, A2AResult, sync handler, failures), card from marker, localhost default, missing-extra error, import donkey_kit does not load a2a.
  • Lowest-direct on py3.10 (a2a-sdk 1.2.0, uvicorn 0.30.0): full unit suite green.
  • Real uvicorn + curl round trip; base-only install skips cleanly.
  • nox: typecheck-and-lint, test-3.11, new-dependencies, commit-identities, docs-llms-drift, pip-audit; site builds.

Post-deploy steps

  • Acceptance follow-up: Donkey-Development-Kit/donkey-development-kit-acceptance#74 — the extras check for the first build with [a2a], a serve test against the installed package, coverage.toml wording.

🤖 Generated with Claude Code

donkey.serve(handler) serves a @donkey.agent handler over A2A in one line.
The a2a-sdk does the protocol (DefaultRequestHandler, InMemoryTaskStore,
TaskUpdater, its routes); DDK adds the agent card generated from the
@donkey.agent record donkey scan reads, a 127.0.0.1 default bind, and a
handler failure that fails the task with the exception type only.

- New top-level donkey_kit.a2a package, an independent sibling of
  integrations in the layers contract (ADR 0014). A2ATask / A2AResult are
  exported from donkey_kit; build_app() gives the same server as an ASGI app.
- New [a2a] extra (a2a-sdk[http-server]>=1.2.0, uvicorn>=0.30), in [all].
  1.2.0 is the first release with DefaultRequestHandler.aclose(), wired into
  the app lifespan so shutdown drains in-flight tasks. Floor run with
  lowest-direct on Python 3.10 (verified-apis §8.3); wrapped names in §8.5.
- The PR test matrix installs [a2a]; test locks regenerated.
- Docs: a2a.mdx leads with "Why not have users call the a2a-sdk directly?"
  and the setup it replaces; serve is Offline-verified, expose/dev Roadmap.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the enhancement New feature or request label Oct 24, 2026
Picks up the google-adk 2.13 last_call fix (#1214) and the lock refreshes
(#1206, #1213); the test locks are recompiled on develop's with [a2a].

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@tommasobolis
tommasobolis merged commit 5f88330 into develop Oct 25, 2026
86 of 88 checks passed
@tommasobolis
tommasobolis deleted the feat/224-donkey-serve branch October 25, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

a2a: donkey.serve() — an A2A listener in one line, wrapping the official a2a-sdk

1 participant