pub struct AgentContext {
pub schema_version: u32,
pub repository: String,
pub release_tool: String,
pub detection_hints: Vec<String>,
pub safe_commands: Vec<AgentCommand>,
pub gated_commands: Vec<AgentCommand>,
pub release_policy: Vec<String>,
pub owners_policy: Vec<String>,
pub dry_run_workflow: Vec<String>,
pub exit_codes: Vec<ExitCodeInfo>,
pub schema_paths: Vec<String>,
}Expand description
Machine-readable repository context for coding agents.
Fields§
§schema_version: u32Stable schema version for the context payload.
repository: StringRepository identifier.
release_tool: StringTool this repo uses for releases.
detection_hints: Vec<String>How an agent can detect the tool.
safe_commands: Vec<AgentCommand>Read-only commands agents can run freely.
gated_commands: Vec<AgentCommand>Mutating commands with guidance.
release_policy: Vec<String>Important release guarantees and caveats.
owners_policy: Vec<String>Important owners-management guarantees and caveats.
dry_run_workflow: Vec<String>Recommended dry-run workflow for agents.
exit_codes: Vec<ExitCodeInfo>Important exit codes.
schema_paths: Vec<String>Schema documents an agent can fetch.
Implementations§
Source§impl AgentContext
impl AgentContext
Sourcepub fn cargo_governor() -> Self
pub fn cargo_governor() -> Self
Build the default context for cargo-governor repositories.
Sourcepub fn to_markdown(&self) -> String
pub fn to_markdown(&self) -> String
Render the context in markdown form.
Trait Implementations§
Source§impl Clone for AgentContext
impl Clone for AgentContext
Source§fn clone(&self) -> AgentContext
fn clone(&self) -> AgentContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentContext
impl Debug for AgentContext
Auto Trait Implementations§
impl Freeze for AgentContext
impl RefUnwindSafe for AgentContext
impl Send for AgentContext
impl Sync for AgentContext
impl Unpin for AgentContext
impl UnsafeUnpin for AgentContext
impl UnwindSafe for AgentContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more