report: add BuildView/Prompter ports and drive pkh build through them
Core flows no longer reach into the terminal UI: build_source_package takes a BuildSourceOptions struct (source tree, domain options, view, prompter) and reports phases, messages and outcomes through the environment-agnostic ports in the new report module. The classifiers move from ui/logfmt to the core logfmt module, DebUi becomes a BuildView adapter, the re-vendor retry asks the prompter instead of checking for a TTY, and artifact/success printing moves to the CLI. Headless consumers pass report::Quiet; an embedding (e.g. a builder server forwarding events to a web frontend) implements BuildView and maps the plain-data events onto its own wire format.
This commit is contained in:
@@ -34,6 +34,15 @@ pub mod put;
|
||||
/// Handle package-specific quirks and workarounds
|
||||
pub mod quirks;
|
||||
|
||||
/// Line classifiers rewriting raw subprocess output into display actions
|
||||
/// and countable progress (pure logic, shared by build views)
|
||||
pub mod logfmt;
|
||||
|
||||
/// Reporting ports: environment-agnostic build observation ([`BuildView`])
|
||||
/// and question answering ([`Prompter`]), implemented by terminal views,
|
||||
/// server bridges or the inert [`Quiet`]
|
||||
pub mod report;
|
||||
|
||||
/// Terminal UI helpers (progress bars, live build views, prompts)
|
||||
pub mod ui;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user