Create cooperative control for asynchronous ReAct execution
Source:R/react-async.R
react_async_control.RdThe control can report ordered progress events and request cooperative cancellation. Cancellation is checked between provider requests and tool calls; it does not interrupt a request or tool that is already running. Progress callback errors reject the async call after cleanup. A failed or cancelled call can leave partial native history; requested tool calls and actual tool results are recorded separately, without replaying tools.
Value
A one-invocation control object. Call $cancel(reason) to request
cancellation while a run_async() promise is pending. Repeated cancel
requests after the first are ignored.