authority
Module: authority
Section titled “Module: authority”Contents
Section titled “Contents”Modules
bootstrap- First-run interactive bootstrap for the local Mini Authority.config- User-levelfirma.tomlreader.prompt- TTY-aware y/N prompt for Authority bootstrap.selection- ResolveAuthoritySelectionfrom CLI args andfirma.toml.supervisor- Per-run autostarted Mini Authority: spawn, scrapeready, tee logs,
Module: bootstrap
Section titled “Module: bootstrap”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).
Module: config
Section titled “Module: config”User-level firma.toml reader.
Path resolution is delegated to the shared firma-config-loader crate so
every binary discovers the same firma.toml.
Module: prompt
Section titled “Module: prompt”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.
Module: selection
Section titled “Module: selection”Resolve AuthoritySelection from CLI args and firma.toml.
Precedence: CLI > firma.toml. Selection rule:
[authority]present infirma.toml→Local(autostart).[sidecar.authority].urlpresent →Remote(url).- Neither → [
RunError::MissingAuthority].
Module: supervisor
Section titled “Module: supervisor”Per-run autostarted Mini Authority: spawn, scrape ready, tee logs,
kill on Drop. Mirrors firma-run/src/sidecar/supervisor.rs (FIR-102).