Skip to main content

Module method

Module method 

Source
Expand description

AcpMethod — every method the ACP v1.25.0 schema names.

§Why this is a flat enum, not a MethodTable trait

The protocol-neutral core (MCP and A2A) lives in crate::domain::jsonrpc. The method table is the per-protocol translation layer between the wire and the application handler. A flat enum over a MethodTable trait is match-friendly for the dispatcher, serde-friendly for the wire, and the same shape every per-protocol module uses. Mirroring that shape here keeps the dispatcher generic.

§Why the wire names are slash-separated

ACP’s meta.json (vendored at crates/protocol-droid-schema/spec/acp/v1.25.0/meta.json) names methods as session/prompt, session/cancel, and so on. The slash is part of the wire name, not a separator this crate invented; a peer that receives a method without the slash is a wire violation. The as_wire_name and FromStr impls keep the slash visible at every boundary.

Structs§

AcpMethodParseError
The error returned by AcpMethod::from_str.

Enums§

AcpMethod
A method on the ACP wire. Carries the direction (agent-side or client-side) and the slash-separated wire name.
AgentMethod
The 13 methods an ACP agent publishes, as named in meta.json::agentMethods. The wire names are the slash-separated form.
ClientMethod
The 11 methods an ACP editor (client) publishes.
ProtocolMethod
A JSON-RPC standard method, prefixed $/. The v1 schema names only $/cancel_request.