datarobot_genai.dragent.frontends.tool_call_registry
tool_call_registry
Per-run handoff of LLM-issued tool_call_id from converter to adaptor.
Two-phase correlation tolerates parallel same-name calls completing out of
order: register (converter) appends to a per-name FIFO; bind (adaptor,
FUNCTION_START) pops the head into a UUID-keyed map; pop (adaptor,
FUNCTION_END) drains by UUID.
Deferred end events prevent ToolCallEndEvent from racing ahead of
ToolCallArgsEvent chunks still being streamed by the converter.
mark_args_done
Mark argument streaming complete for tool_call_id.
Returns (and removes) any end/result events that the step adaptor deferred while arguments were still in flight.
Source code in datarobot_genai/dragent/frontends/tool_call_registry.py
is_args_done
Check whether the stream converter has finished emitting args for this call.
defer_tool_end
Stash end/result events until argument streaming finishes.