Oi.Dispatch.Options (oi v0.6.1)

Copy Markdown

Summary

Types

Unified user-facing data for Oi.execute/2.

Functions

Assemble the keyword list passed to Orchid.run/3.

Splits unified data into {memory, interventions} by topology.

Types

data()

@type data() ::
  %{
    optional({Oi.Topology.Graph.Node.id(), Oi.Topology.Graph.Node.node_port()}) =>
      term()
  }
  | %{
      optional(Oi.Topology.Graph.Node.id()) => %{
        optional(Oi.Topology.Graph.Node.node_port()) => term()
      }
    }

Unified user-facing data for Oi.execute/2.

Replaces the separate :inputs / :interventions opts.

Format A — tuple keys

%{{:step1, :in} => "foo", {:step2, :result} => {:override, "bar"}}

Format B — nested

%{step1: %{in: "foo"}, step2: %{result: {:override, "bar"}}}

Functions

assemble_run_opts(opts, conf, drafting)

@spec assemble_run_opts(keyword(), Oi.Dispatch.Config.t(), Oi.Dispatch.Drafting.t()) ::
  keyword()

Assemble the keyword list passed to Orchid.run/3.

Merges interventions from Drafting, user baggage from Config, and resolves scope_id. Does NOT inject OrchidSymbiont.Hooks.Injector — use Oi.Adapters.orchid_symbiont/1 in the :orchid_adapters chain instead.

build_drafting_inputs(compiled, opts)

resolve_data(data, edges)

Splits unified data into {memory, interventions} by topology.

For each {node, port}:

  • has incoming edge → intervention (data originates inside the graph)
  • no incoming edge → memory (external input, no upstream producer)

Values pass through as-is — no wrapping, no io_key conversion.