pub struct SkillGrant {
pub schema: String,
pub skill_id: String,
pub skill_version: String,
pub authorized_steps: Vec<String>,
pub max_executions: Option<u32>,
pub budget_envelope: Option<MonetaryAmount>,
pub max_duration_secs: Option<u64>,
pub strict_ordering: bool,
}Expand description
A capability grant for a multi-step skill.
This extends the standard Chio capability model by authorizing an ordered sequence of tool invocations rather than individual tools.
Fields§
§schema: StringSchema version.
skill_id: StringUnique skill identifier (e.g. “search-and-summarize”).
skill_version: StringVersion of the skill manifest this grant authorizes.
Tool steps authorized by this grant, in declared order. Each entry is “server_id:tool_name”.
max_executions: Option<u32>Maximum number of complete skill executions.
budget_envelope: Option<MonetaryAmount>Budget envelope for the entire skill execution.
max_duration_secs: Option<u64>Maximum wall-clock duration for a single skill execution (seconds).
strict_ordering: boolWhether steps must execute in declared order. Defaults to true (strict ordering).
Implementations§
Source§impl SkillGrant
impl SkillGrant
Sourcepub fn new(
skill_id: String,
skill_version: String,
authorized_steps: Vec<String>,
) -> Self
pub fn new( skill_id: String, skill_version: String, authorized_steps: Vec<String>, ) -> Self
Create a new skill grant.
Check whether a tool step is authorized by this grant.
Sourcepub fn is_step_in_order(
&self,
step_index: usize,
completed_steps: usize,
) -> bool
pub fn is_step_in_order( &self, step_index: usize, completed_steps: usize, ) -> bool
Check whether a step index is valid for strict ordering.
completed_steps is the number of steps already completed.
Returns true if the proposed step at the given index follows
the expected order.
Trait Implementations§
Source§impl Clone for SkillGrant
impl Clone for SkillGrant
Source§fn clone(&self) -> SkillGrant
fn clone(&self) -> SkillGrant
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more