package a2a-client
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
A2A (Agent2Agent) protocol client for OCaml 5 / Eio (v1.0, v0.3 compatible)
Install
dune-project
Dependency
Authors
Maintainers
Sources
v0.3.0.tar.gz
md5=7bf58c1e200b0edbe84dc0f5d305dd2c
sha512=6c4f24e96ddea9a9c8664916323f1f8f3f970cf7714de2182cf849c8c0a983539b0364d019daf3648f42b1d90c357f69993b68c9df8117319709e2f415832c12
doc/a2a-client.testing/A2a_client_testing/index.html
Module A2a_client_testingSource
A scripted A2A agent behind an A2a_client.Transport.t, for testing code that uses the client without a network.
Replies are given as typed values and encoded in the wire format of the agent's protocol version and binding (JSON-RPC envelopes with the request's id, REST bodies, SSE framing), so tests contain no hand-written JSON.
let agent =
A2a_client_testing.agent ~clock (fun _req ->
Reply.stream [ Step.event (Task task); Step.event (Status_update done_) ])
in
let client =
A2a_client.create ~clock ~transport:(A2a_client_testing.transport agent) endpoint
in
...Source
val agent :
?protocol:A2a_client.Protocol.t ->
clock:_ Eio.Time.Mono.t ->
(A2a_client.Transport.request -> Reply.t) ->
agentAn agent that answers each request with the handler's reply, in the wire format of protocol (default A2a_client.Protocol.default). Create the client with the same protocol.
The requests received so far, oldest first.
The JSON-RPC method of a request, e.g. "SendStreamingMessage" or "message/stream"; None for REST requests.
The JSON-RPC params, or the REST body; `Null if there is none.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>