pub struct DistroHint {
pub family: &'static str,
pub version: Option<String>,
}Expand description
Planner-facing distro snapshot injected into the system prompt.
This is a deliberately lightweight type: it captures only what the planner
needs to pick the right action family (family) and to produce accurate
human-readable output (version). Heavy detection logic and the full
DistroId enum stay in sysknife-core; the CLI converts DistroId →
DistroHint at startup so the brain never depends on sysknife-core.
§Design rationale
Moving DistroId to sysknife-types would add proto-bridge boilerplate
and force every crate that imports types to compile the detection logic.
A thin snapshot type is smaller-diff and still gives the planner everything
it needs.
Fields§
§family: &'static strBroad distro family: "fedora", "debian", or "other".
Use DISTRO_FAMILY_FEDORA, DISTRO_FAMILY_DEBIAN, and
DISTRO_FAMILY_OTHER for comparison to avoid magic strings.
version: Option<String>Human-readable version string, e.g. "Fedora 41", "Ubuntu 24.04".
None when the version could not be determined.
Trait Implementations§
Source§impl Clone for DistroHint
impl Clone for DistroHint
Source§fn clone(&self) -> DistroHint
fn clone(&self) -> DistroHint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more