adk_a2a_v1_server (erlang_adk v0.7.0)

View Source

Bounded, supervised A2A 1.0 task store and execution coordinator.

Protocol tasks are durable for a configured retention window while their work runs as independent adk_task children. The store retains only a hash of the authenticated principal id. Raw headers, credentials, and principal terms are captured only by the short-lived execution closure and are redacted before any result enters task history, artifacts, or events.

Summary

Functions

cancel_task(Server, Scope, Params)

-spec cancel_task(gen_server:server_ref(), binary(), map()) -> {ok, map()} | {error, term()}.

card(Server)

-spec card(gen_server:server_ref()) -> {ok, map()}.

child_spec(Options)

-spec child_spec(map()) -> supervisor:child_spec().

code_change(OldVersion, State, Extra)

get_task(Server, Scope, Params)

-spec get_task(gen_server:server_ref(), binary(), map()) -> {ok, map()} | {error, term()}.

handle_call(Request, From, State)

handle_cast(Message, State)

handle_info(Info, State0)

init(Options)

inspect_task(Server, TaskId)

-spec inspect_task(gen_server:server_ref(), binary()) -> {ok, map()} | {error, not_found}.

Test/diagnostic view. It intentionally exposes only the public Task.

list_tasks(Server, Scope, Params)

-spec list_tasks(gen_server:server_ref(), binary(), map()) -> {ok, map()} | {error, term()}.

progress(Server, TaskId, Scope, Event)

-spec progress(gen_server:server_ref(), binary(), binary(), term()) -> ok | {error, term()}.

send_message(Server, AuthContext, Params)

-spec send_message(gen_server:server_ref(), map(), map()) -> {ok, map()} | {error, term()}.

send_message(Server, AuthContext, Params, Subscriber)

-spec send_message(gen_server:server_ref(), map(), map(), undefined | pid()) ->
                      {ok, map()} | {error, term()}.

start_link()

-spec start_link() -> gen_server:start_ret().

start_link(Options)

-spec start_link(map()) -> gen_server:start_ret().

subscribe(Server, Scope, Params, Subscriber)

-spec subscribe(gen_server:server_ref(), binary(), map(), pid()) ->
                   {ok, binary(), [{non_neg_integer(), map()}]} | {error, term()}.

terminate(Reason, State)

unsubscribe(Server, TaskId, Subscriber)

-spec unsubscribe(gen_server:server_ref(), binary(), pid()) -> ok.