Skip to content

authority

Modules

  • bootstrap - First-run interactive bootstrap for the local Mini Authority.
  • config - User-level firma.toml reader.
  • prompt - TTY-aware y/N prompt for Authority bootstrap.
  • selection - Resolve AuthoritySelection from CLI args and firma.toml.
  • supervisor - Per-run autostarted Mini Authority: spawn, scrape ready, tee logs,

First-run interactive bootstrap for the local Mini Authority.

Triggered from routing::resolve_authority when no committed choice exists (no --authority CLI value, no [authority] / [sidecar.authority] section in firma.toml) and no local Authority is reachable.

On Y the [authority] table is merged into firma.toml so subsequent runs skip the prompt. The persisted section configures an ephemeral port (listen_addr = "[::1]:0") — the supervisor picks a free port on each spawn (select_loopback_v6_port).

User-level firma.toml reader.

Path resolution is delegated to the shared firma-config-loader crate so every binary discovers the same firma.toml.

TTY-aware y/N prompt for Authority bootstrap.

Backed by dialoguer for consistency with firma config prompts. The [AuthorityPromptIo] trait keeps the call site mockable so unit tests can drive selection logic without touching real stdin.

Resolve AuthoritySelection from CLI args and firma.toml.

Precedence: CLI > firma.toml. Selection rule:

  • [authority] present in firma.tomlLocal (autostart).
  • [sidecar.authority].url present → Remote(url).
  • Neither → [RunError::MissingAuthority].

Per-run autostarted Mini Authority: spawn, scrape ready, tee logs, kill on Drop. Mirrors firma-run/src/sidecar/supervisor.rs (FIR-102).