adk_web_gateway (erlang_adk v0.7.0)

View Source

Production UI boundary for authenticated Phoenix/HTTP applications.

The gateway is deliberately not an HTTP server. A Phoenix LiveView (or another trusted boundary) authenticates a request, passes the resulting adk_jwt_policy identity here, and never accepts app/user identifiers from the browser. Agent runners are resolved from a server-owned immutable catalog. Long-running work remains in independently supervised adk_run processes; the gateway performs only short authorization/catalog lookups.

Summary

Functions

ack(Server, Identity, RunId, Subscriber, Sequence)

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

cancel(Server, Identity, RunId)

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

child_spec(Opts)

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

code_change(OldVsn, State, Extra)

format_status(Status)

handle_call(Request, From, State)

handle_cast(Message, State)

handle_info(Message, State)

init(Opts)

list_agents(Server, Identity)

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

resume(Server, Identity, RunId, Decision)

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

start_link(Opts)

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

start_run(Server, Identity, AgentId, SessionId, Message)

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

status(Server, Identity, RunId)

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

subscribe_credit(Server, Identity, RunId, Subscriber, Cursor)

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

terminate(Reason, State)

unsubscribe(Server, Identity, RunId, Subscriber)

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