feat(io): add the hooks a desktop front end needs

A front end can now classify one input the way a single-file run
dispatches it, count targets while a folder scan runs, read one package
entry under the archive ceilings, splice a loader with its companion for
viewing, and stamp live log lines with milliseconds. A RunObserver also
sees each input's report before an inspection or dry run drops its
outputs, so it can keep the restored bytes it wants. The CLI uses none
of these, and its output is unchanged.
This commit is contained in:
Momoko-Ayase committed 2026-11-10 02:07:58 +08:00
1 parent 7ab381438f
commit f0140cbf2b
6 files changed
+168 -6

No files matched your search

+6
View File
@@ -22,6 +22,12 @@ pub trait RunObserver: Send + Sync {
/// the run was started with `verbose`.
fn progress(&self, _event: &senbei_engine::progress::Event) {}
/// One input finished, as recorded before a dry run or an inspection
/// drops its outputs. The files named by `outputs` and by each entry's
/// `output` exist for the duration of this call; a dry run or an
/// inspection deletes them when the run ends.
fn produced(&self, _input: &InputReport) {}
/// One input finished. This is the report the run keeps for it.
fn input_finished(&self, _input: &InputReport) {}
}