Jido.AI.Reasoning.ReAct.PendingInput (Jido AI v2.2.0)

Copy Markdown View Source

Pending-input helpers for delegated ReAct runs.

This module keeps the acceptance rules and queue lifecycle for steer and inject control input out of the main ReAct strategy so the public orchestration path stays easier to follow.

Summary

Functions

Attempts to queue a steer or inject control input and records the outcome.

Returns whether the current strategy state still accepts queued user input.

Starts a queue owned by the calling strategy process for the given request.

Stops the tracked queue server, if any, and clears it from strategy state.

Types

control_kind()

@type control_kind() :: :steer | :inject

strategy_state()

@type strategy_state() :: map()

Functions

accept_control(state, params, kind)

@spec accept_control(strategy_state(), map(), control_kind()) ::
  {:ok, strategy_state()} | {:error, strategy_state()}

Attempts to queue a steer or inject control input and records the outcome.

open?(state)

@spec open?(strategy_state()) :: boolean()

Returns whether the current strategy state still accepts queued user input.

start(request_id, owner \\ self())

@spec start(String.t(), pid()) :: {:ok, pid()} | {:error, :pending_input_unavailable}

Starts a queue owned by the calling strategy process for the given request.

stop(state)

@spec stop(strategy_state()) :: strategy_state()

Stops the tracked queue server, if any, and clears it from strategy state.