pub struct DistroHint {
pub id: String,
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), distinguish Ubuntu-only
mechanisms (id), and produce human-readable output (version). Detection 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§
§id: StringDetected distribution ID, e.g. ubuntu or debian. Family membership
alone cannot authorize an Ubuntu-only mechanism. Never derive this from
the human-readable version string.
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.