pub struct Host {
pub namespace: String,
pub command: String,
pub cargo_package: String,
pub skills_directory: PathBuf,
}Expand description
One repository’s identity to this crate.
The fields are public and there is no constructor, so adding one here is a compile error at every host rather than a silent default. There are no invariants to protect: each field is a name this crate repeats back, and a wrong one is visible in the first line of output.
Fields§
§namespace: StringPrefixes every schema identity in a receipt, e.g. playbench in
playbench.skill-evidence.record.v1.
command: StringThe binary an operator actually types. Usually, but not necessarily,
the same word as namespace.
cargo_package: StringThe Cargo package that provides command, as cargo run -p wants it.
Installed skill packages quote it in their runnable examples.
skills_directory: PathBufWhere this repository keeps its own skill packages.
Resolve it however the host resolves it — typically from the host’s own
CARGO_MANIFEST_DIR at compile time. It is deliberately not derived
from the audited --root:
lifecycle_self_target_checks_canonical_paths_instead_of_basenames
pins that a same-named package in the audited tree is a different
package, not a self-target.
Implementations§
Source§impl Host
impl Host
Sourcepub fn hash_schema(&self) -> String
pub fn hash_schema(&self) -> String
The schema identity on a hash receipt.
Sourcepub fn record_schema(&self) -> String
pub fn record_schema(&self) -> String
The schema identity on a record receipt.
Sourcepub fn method_gap_inventory_schema(&self) -> String
pub fn method_gap_inventory_schema(&self) -> String
The schema identity on a method-gap research inventory.
Sourcepub fn operator_skill(&self, operator_skill_name: &str) -> PathBuf
pub fn operator_skill(&self, operator_skill_name: &str) -> PathBuf
The package this repository would be running when it drives
operator_skill_name, used to refuse a workflow that targets itself.
Sourcepub fn skills_directory(&self) -> &Path
pub fn skills_directory(&self) -> &Path
Where this repository keeps its own skill packages.
Sourcepub fn recovery_instruction(&self, recovery: Recovery) -> String
pub fn recovery_instruction(&self, recovery: Recovery) -> String
Renders the sentence that tells an operator how to finish an operation that stopped part-way.
This is the half of an Error the library deliberately
does not write: it knows the action, and only the host knows what to call
the binary that performs it.