pub struct WorkflowAuthority { /* private fields */ }Expand description
Workflow authority that validates and manages skill executions.
Implementations§
Source§impl WorkflowAuthority
impl WorkflowAuthority
Sourcepub fn new(signing_key: Keypair) -> Self
pub fn new(signing_key: Keypair) -> Self
Create a new workflow authority with the given signing key.
Sourcepub fn begin(
&self,
manifest: &SkillManifest,
grant: &SkillGrant,
agent_id: String,
capability_id: String,
session_id: Option<String>,
) -> Result<WorkflowExecution, WorkflowError>
pub fn begin( &self, manifest: &SkillManifest, grant: &SkillGrant, agent_id: String, capability_id: String, session_id: Option<String>, ) -> Result<WorkflowExecution, WorkflowError>
Begin a new workflow execution.
Validates the grant against the manifest before starting.
Sourcepub fn validate_step(
&self,
execution: &WorkflowExecution,
step: &SkillStep,
grant: &SkillGrant,
) -> Result<(), WorkflowError>
pub fn validate_step( &self, execution: &WorkflowExecution, step: &SkillStep, grant: &SkillGrant, ) -> Result<(), WorkflowError>
Validate a step before execution.
Checks authorization, ordering, budget, and time constraints.
Sourcepub fn record_step(
&self,
execution: &mut WorkflowExecution,
step: &SkillStep,
input: StepExecutionRecordInput,
) -> Result<(), WorkflowError>
pub fn record_step( &self, execution: &mut WorkflowExecution, step: &SkillStep, input: StepExecutionRecordInput, ) -> Result<(), WorkflowError>
Record the result of a step execution.
Sourcepub fn finalize(
&self,
execution: WorkflowExecution,
) -> Result<WorkflowReceipt, WorkflowError>
pub fn finalize( &self, execution: WorkflowExecution, ) -> Result<WorkflowReceipt, WorkflowError>
Finalize a workflow execution and produce a signed receipt.
Sourcepub fn execution_count(&self) -> u32
pub fn execution_count(&self) -> u32
Return the number of workflow executions successfully started.
Auto Trait Implementations§
impl !Freeze for WorkflowAuthority
impl RefUnwindSafe for WorkflowAuthority
impl Send for WorkflowAuthority
impl Sync for WorkflowAuthority
impl Unpin for WorkflowAuthority
impl UnsafeUnpin for WorkflowAuthority
impl UnwindSafe for WorkflowAuthority
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