stepWithResult method

void stepWithResult({
  1. required String toolCallId,
  2. required String resultJson,
  3. required String error,
})

Forward a tool result so commons continues the loop. Runs the next generation turn IN THE SESSION WORKER — never blocks the calling isolate. The worker fills in its own session id, so callers need not await it.

Implementation

void stepWithResult({
  required String toolCallId,
  required String resultJson,
  required String error,
}) {
  _toWorker?.send(<dynamic>['step', toolCallId, resultJson, error]);
}