adk_live_provider behaviour (erlang_adk v0.7.0)
View SourceProvider adapter contract for bidirectional Live sessions.
Provider adapters validate an immutable setup, produce one setup frame, encode admitted client actions, and decode each provider frame into an ordered list of provider-neutral event specifications. They do not own sockets or process lifetimes.
Summary
Types
-type client_action() :: {text, binary()} | {audio, adk_live_media:media()} | {video_frame, adk_live_media:media()} | activity_start | activity_end | audio_stream_end | {tool_response, binary(), binary(), map()}.
Callbacks
-callback capabilities() -> map().
-callback decode_server(binary(), map()) -> {ok, [event_spec()]} | {error, term()}.
-callback encode_client(client_action(), map()) -> {ok, binary()} | {error, term()}.