Jido.Composer.Node.HumanNode (Jido Composer v0.4.0)

Copy Markdown View Source

A Node representing a point where a human must provide input.

When run/2 is called, a HumanNode evaluates its prompt, filters the context, constructs an ApprovalRequest, places it in context under __approval_request__, and returns {:ok, context, :suspend}.

The HumanNode never blocks or waits. The strategy layer interprets the :suspend outcome to pause the flow and emit a SuspendForHuman directive.

Summary

Types

t()

@type t() :: %Jido.Composer.Node.HumanNode{
  allowed_responses: [atom()],
  context_keys: [atom()] | nil,
  description: String.t(),
  metadata: map(),
  name: String.t(),
  prompt: String.t() | (map() -> String.t()),
  response_schema: keyword() | nil,
  timeout: pos_integer() | :infinity,
  timeout_outcome: atom()
}

Functions

new(attrs)

@spec new(keyword()) :: {:ok, t()} | {:error, String.t()}