pub struct AgentRequest {
pub id: Value,
pub method: String,
pub params: Value,
}Expand description
A JSON-RPC 2.0 request the agent receives from the client.
The wire form is { jsonrpc, id, method, params }. The peer decodes the envelope
and hands the application the typed shape;
the application decodes the params into
the concrete request type the method
expects (InitializeRequest,
NewSessionRequest, etc.).
Fields§
§id: ValueThe JSON-RPC 2.0 id. The application
passes it back unchanged in the reply
envelope so the client can correlate
the reply with the request. The id is
a serde_json::Value because the wire
spec allows string, number, or null;
the agent peer passes it through
verbatim.
method: StringThe method name. The schema’s method
names are dotted slugs
(session/new, session/prompt); the
application routes by this string.
params: ValueThe raw params. The application decodes into the typed request for the method; the peer does not attempt any routing.