pub struct ProtocolGuidance {Show 14 fields
pub schema: &'static str,
pub command: &'static str,
pub status: ProtocolStatus,
pub snapshot_at: String,
pub valid_for_sec: u32,
pub revalidate_cmd: Option<String>,
pub bone: Option<BoneRef>,
pub workspace: Option<String>,
pub review: Option<ReviewRef>,
pub steps: Vec<String>,
pub diagnostics: Vec<String>,
pub advice: Option<String>,
pub executed: bool,
pub execution_report: Option<ExecutionReport>,
}Expand description
A rendered protocol guidance output.
Provides a snapshot of agent state (bones, workspaces, reviews) with next steps as shell commands agents can execute.
Freshness Semantics:
snapshot_at: UTC timestamp when this guidance was generatedvalid_for_sec: How long this guidance remains fresh (in seconds)revalidate_cmd: If present, run this command to refresh guidance
Agents receiving stale guidance (snapshot_at + valid_for_sec < now) should re-run the revalidate_cmd to get fresh state before executing steps.
Fields§
§schema: &'static strSchema version for machine parsing
command: &'static strCommand type: “start”, “finish”, “review”, “cleanup”, “resume”
status: ProtocolStatusStatus indicating readiness or blocker
snapshot_at: StringUTC ISO 8601 snapshot timestamp
valid_for_sec: u32Validity duration in seconds (how long this guidance is fresh)
revalidate_cmd: Option<String>Command to re-fetch fresh guidance if stale (e.g., “edict protocol start”)
bone: Option<BoneRef>Bone context (if applicable)
workspace: Option<String>Workspace name (if applicable)
review: Option<ReviewRef>Review context (if applicable)
steps: Vec<String>Rendered shell commands (ready to copy-paste)
diagnostics: Vec<String>Diagnostic messages if blocked or errored
advice: Option<String>Human-readable summary
executed: boolWhether commands were executed (–execute mode)
execution_report: Option<ExecutionReport>Execution report (if –execute was used)
Implementations§
Source§impl ProtocolGuidance
impl ProtocolGuidance
Sourcepub fn new(command: &'static str) -> Self
pub fn new(command: &'static str) -> Self
Create a new guidance with ready status. Default freshness: 300 seconds (5 minutes)
Sourcepub fn set_freshness(
&mut self,
valid_for_sec: u32,
revalidate_cmd: Option<String>,
)
pub fn set_freshness( &mut self, valid_for_sec: u32, revalidate_cmd: Option<String>, )
Set the validity duration and optional revalidate command. Use this to control how long guidance remains fresh.
Sourcepub fn diagnostic(&mut self, msg: String)
pub fn diagnostic(&mut self, msg: String)
Add a diagnostic message (e.g., reason for blocked status).
Trait Implementations§
Source§impl Clone for ProtocolGuidance
impl Clone for ProtocolGuidance
Source§fn clone(&self) -> ProtocolGuidance
fn clone(&self) -> ProtocolGuidance
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more