adk_context_capability (erlang_adk v0.7.0)
View SourceOwner-bound, scope-bound authority used by invocation contexts.
The service handles remain in this process. Tools receive only a random token granting a validated subset of operations. Effects are correlated by call ID and may be drained only by the invocation owner for event commit.
Summary
Types
Functions
-spec abort_effects(capability(), reference()) -> ok | {error, term()}.
-spec call(capability(), atom(), term(), pos_integer()) -> term().
-spec commit_effects(capability(), reference()) -> ok | {error, term()}.
-spec delegate(capability(), [atom()], term(), pos_integer()) -> {ok, capability()} | {error, term()}.
-spec prepare_effects(capability(), term()) -> {ok, none | reference(), [map()]} | {error, term()}.
-spec resolve_attachment(capability(), binary(), pos_integer(), pos_integer()) -> {ok, map()} | {error, term()}.
-spec root(pid()) -> {ok, capability()} | {error, term()}.
-spec start(pid(), map()) -> gen_server:start_ret().
-spec start_link(pid(), map()) -> gen_server:start_ret().
-spec stop(pid()) -> ok.
-spec take_effects(capability(), term()) -> {ok, [map()]} | {error, term()}.