docs(reference): align A2A facade API with implementation
CI / push-validation (push) Successful in 18s
CI / lint (push) Successful in 19s
CI / build (push) Successful in 37s
CI / helm (push) Successful in 37s
CI / quality (push) Successful in 46s
CI / typecheck (push) Successful in 53s
CI / e2e_tests (push) Successful in 4m10s
CI / integration_tests (push) Successful in 4m15s
CI / security (push) Successful in 4m16s
CI / unit_tests (push) Successful in 5m28s
CI / docker (push) Successful in 10s
CI / coverage (push) Successful in 11m7s
CI / status-check (push) Successful in 1s
CI / benchmark-regression (push) Has been skipped
CI / benchmark-publish (push) Successful in 1h13m43s

Fixes docs/reference/a2a.md Local Facade section. Issues #6620 and #6624.

Fixes #6620
Fixes #6624

Automatically merged by PR Merge Pool Supervisor [AUTO-PRMRG-SUP]

---
**Automated by CleverAgents Bot**
Supervisor: PR Merge | Agent: pr-merge-pool-supervisor
Co-authored-by: CleverThis <hal9000@cleverthis.com>
Co-committed-by: CleverThis <hal9000@cleverthis.com>
This commit was merged in pull request #6638.
This commit is contained in:
2026-04-13 08:10:03 +00:00
committed by Forgejo
parent 2005b8ef82
commit 978849412d
+11 -7
View File
@@ -259,6 +259,7 @@ resuming the task.
```python
from cleveragents.a2a import A2aLocalFacade
from cleveragents.a2a.models import A2aRequest
facade = A2aLocalFacade(services={
"session_service": my_session_service,
@@ -267,8 +268,11 @@ facade = A2aLocalFacade(services={
"resource_registry_service": my_resource_registry_service,
})
# Extension methods are dispatched to in-process services
result = await facade.dispatch("_cleveragents/plan/status", {"plan_id": "01J..."})
# Extension methods are dispatched to in-process services (synchronous)
response = facade.dispatch(A2aRequest(
method="_cleveragents/plan/status",
params={"plan_id": "01J..."}
))
```
### Constructor
@@ -279,11 +283,11 @@ result = await facade.dispatch("_cleveragents/plan/status", {"plan_id": "01J..."
### Methods
| Method | Returns | Description |
|----------------------------|-------------------|--------------------------------------|
| `dispatch(method, params)` | `dict` | Route extension method to handler |
| `register_service` | `None` | Register a named service |
| `list_methods` | `list[str]` | All supported extension method names |
| Method | Returns | Description |
|---------------------------------|-------------------|--------------------------------------|
| `dispatch(request: A2aRequest)` | `A2aResponse` | Route extension method to handler |
| `register_service` | `None` | Register a named service |
| `list_operations()` | `list[str]` | All supported extension method names |
---