package a2a-client

  1. Overview
  2. Docs

Module A2a_client_testing.ReplySource

How the agent answers one request.

Sourcetype t
Sourceval stream : Step.t list -> t

200 with text/event-stream. The agent closes the stream after the last step, unless that is Step.drop or Step.hang.

Sourceval send_message_response : A2a_client.Send_message_response.t -> t

The result of SendMessage.

The result of GetTask or CancelTask, or a non-streamed answer to a streaming request.

Sourceval error : ?status:int -> A2a_client.Error.Code.t -> string -> t

An agent error: a JSON-RPC error response, or with the REST binding a google.rpc.Status body with HTTP status (default 400).

Sourceval http : status:int -> ?content_type:string -> string -> t

Any HTTP response, e.g. http ~status:500 "boom" from a proxy. Default content type text/plain.

Sourceval refuse : t

No response: the transport raises, as when a connection is refused.

Sourceval after : float -> t -> t

The same reply, sent after that many seconds.