adk_tool_executor (erlang_adk v0.7.0)
View SourceBounded execution for already-resolved tool calls.
A resolved call is a map containing name, args, and either module or an internal zero-arity execute function. Optional thought_signature and call_id values are copied unchanged to the result. Toolsets may also attach validated internal confirmation metadata; the executor preserves it but does not interpret or expose it to providers. Serial execution is the default. In parallel mode, only calls explicitly marked parallel_safe (or whose module opts in through parallel_safe/0 or schema metadata) overlap; an unsafe call is a barrier.
Summary
Types
-type resolved_call() :: #{index => pos_integer(), name := binary(), args := map(), module => module(), execute => fun(() -> term()), thought_signature => term(), call_id => term(), context => map(), parallel_safe => boolean(), pause_capable => boolean(), confirmation => #{required := boolean(), hint => binary()}, timeout => non_neg_integer() | infinity, deadline => integer() | infinity}.
Functions
-spec await(adk_task:task_ref()) -> {ok, [call_result()]} | {error, term()}.
-spec await(adk_task:task_ref(), timeout()) -> {ok, [call_result()]} | {error, term()}.
-spec cancel(adk_task:task_ref()) -> ok | {error, term()}.
-spec cancel(adk_task:task_ref(), term()) -> ok | {error, term()}.
-spec execute([resolved_call()]) -> {ok, [call_result()]} | {error, term()}.
-spec execute([resolved_call()], map()) -> {ok, [call_result()]} | {error, term()}.
-spec execute([resolved_call()], map(), map()) -> {ok, [call_result()]} | {error, term()}.
-spec is_parallel_safe(resolved_call()) -> boolean().
-spec is_pause_capable(resolved_call()) -> boolean().
-spec start([resolved_call()]) -> {ok, adk_task:task_ref()} | {error, term()}.
-spec start([resolved_call()], map()) -> {ok, adk_task:task_ref()} | {error, term()}.
-spec start([resolved_call()], map(), map()) -> {ok, adk_task:task_ref()} | {error, term()}.