Expand description
Bridge adapters (SPEC.md roadmap item 3): map ACL semantics to the protocols agents already speak — A2A task lifecycle and MCP tools.
A2A v1.0: Task states SUBMITTED, WORKING, INPUT_REQUIRED, COMPLETED,
CANCELED, FAILED, REJECTED (spec: a2a-protocol.org).
MCP: JSON-RPC 2.0 methods tools/list and tools/call.
Enums§
- A2aState
- A2A TaskState (subset used by the bridge).
Functions§
- a2a_
state_ to_ acl - Map an A2A task-state JSON object back to the ACL performative it implies.
- a2a_
task_ to_ acl - §13bis: full A2A task JSON -> ACL Envelope (the inverse of
acl_to_a2a_task). Rebuilds the performative from the task state and the body from artifacts/metadata.Nonewhen the state is unknown. - acl_
result_ to_ mcp - An ACL inform/Result → MCP
tools/callresult. - acl_
to_ a2a_ state - Map an ACL (performative, body) pair to the A2A task state it represents.
None= performative has no A2A equivalent (e.g. propose/hello). - acl_
to_ a2a_ task - A2A-shaped task object (JSON, mirroring the A2A v1.0 Task structure).
- card_
has_ capability - capability name lookup on a card (used when routing tools/call)
- card_
to_ mcp_ tools - AgentCard capabilities → MCP
tools/listresult. - mcp_
call_ to_ acl_ body - MCP
tools/callparams → an ACL request body (name = capability name). - validate_
arguments - §13bis: validate an MCP call’s arguments against the card’s declared
input schema — JSON-schema-lite:
requiredfields must be present with non-null values, andtypeis checked when declared.