Skip to main content

Module run

Module run 

Source
Expand description

bn run — Dispatch ready beans to agents.

Finds ready beans, groups them into waves by dependency order, and spawns agents for each wave.

Modes:

  • bn run — one-shot: dispatch all ready beans, then exit
  • bn run 5.1 — dispatch a single bean (or its ready children if parent)
  • bn run --dry-run — show plan without spawning
  • bn run --loop — keep running until no ready beans remain
  • bn run --json-stream — emit JSON stream events to stdout

Spawning modes:

  • Template mode (backward compat): If config.run is set, spawn via sh -c <template>.
  • Direct mode: If no template is configured but pi is on PATH, spawn pi directly with --mode json --print --no-session, monitoring with timeouts and parsing events.

Structs§

DispatchPlan
Result from planning dispatch.
RunArgs
Arguments for cmd_run, matching the CLI definition.
SizedBean
A bean with sizing and dispatch action.
Wave
A wave of beans that can be dispatched in parallel.

Enums§

BeanAction
What action to take for a bean.

Functions§

cmd_run
Execute the bn run command.
find_bean_file
Find the bean file path. Public wrapper for use in other commands.