pub struct WorkflowRecorder { /* private fields */ }Expand description
In-memory recorder for semantic workflow drafts.
Implementations§
Source§impl WorkflowRecorder
impl WorkflowRecorder
Sourcepub fn new(name: impl Into<String>, workflow_version: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, workflow_version: impl Into<String>) -> Self
Start a bounded recorder draft. Recording is local and does not attach to Chrome or intercept browser traffic.
Sourcepub fn record_click(
&mut self,
id: impl Into<String>,
role: impl Into<String>,
name: impl Into<String>,
expect: Option<VerificationPredicate>,
) -> Result<(), WorkflowValidationError>
pub fn record_click( &mut self, id: impl Into<String>, role: impl Into<String>, name: impl Into<String>, expect: Option<VerificationPredicate>, ) -> Result<(), WorkflowValidationError>
Record a semantic click draft using an explicit role and accessible name.
Sourcepub fn record_type_input(
&mut self,
id: impl Into<String>,
role: impl Into<String>,
name: impl Into<String>,
input_name: impl Into<String>,
) -> Result<(), WorkflowValidationError>
pub fn record_type_input( &mut self, id: impl Into<String>, role: impl Into<String>, name: impl Into<String>, input_name: impl Into<String>, ) -> Result<(), WorkflowValidationError>
Record text as a typed input placeholder, never as a literal value.
Sourcepub fn record_observe(
&mut self,
id: impl Into<String>,
) -> Result<(), WorkflowValidationError>
pub fn record_observe( &mut self, id: impl Into<String>, ) -> Result<(), WorkflowValidationError>
Record a read-only observation draft.
Sourcepub fn record_semantic_intent(
&mut self,
id: impl Into<String>,
request: &SemanticIntentRequest,
result: &SemanticIntentResult,
input_name: Option<impl Into<String>>,
transaction: WorkflowTransactionClass,
expect: Option<VerificationPredicate>,
) -> Result<(), WorkflowValidationError>
pub fn record_semantic_intent( &mut self, id: impl Into<String>, request: &SemanticIntentRequest, result: &SemanticIntentResult, input_name: Option<impl Into<String>>, transaction: WorkflowTransactionClass, expect: Option<VerificationPredicate>, ) -> Result<(), WorkflowValidationError>
Record a semantic resolution as a reviewable workflow intent step.
The result may be ambiguous, rejected, or lack a selected candidate; those states are retained as evidence and never turned into a replay target. Value-bearing actions receive an input placeholder only.
pub fn draft(&self) -> &WorkflowDraft
Sourcepub fn inferred_inputs(&self) -> BTreeMap<String, WorkflowInput>
pub fn inferred_inputs(&self) -> BTreeMap<String, WorkflowInput>
Infer declarations for the placeholders observed in the draft.
No value is retained. Names that look sensitive are marked sensitive; callers still decide whether the resulting declaration is appropriate before compiling the final workflow.
Sourcepub fn into_definition(
self,
inputs: BTreeMap<String, WorkflowInput>,
budgets: WorkflowBudgets,
terminal_condition: VerificationPredicate,
outputs: BTreeMap<String, WorkflowOutputDeclaration>,
) -> Result<WorkflowDefinition, WorkflowValidationError>
pub fn into_definition( self, inputs: BTreeMap<String, WorkflowInput>, budgets: WorkflowBudgets, terminal_condition: VerificationPredicate, outputs: BTreeMap<String, WorkflowOutputDeclaration>, ) -> Result<WorkflowDefinition, WorkflowValidationError>
Convert a reviewed draft into the normal validated workflow contract.
Trait Implementations§
Source§impl Clone for WorkflowRecorder
impl Clone for WorkflowRecorder
Source§fn clone(&self) -> WorkflowRecorder
fn clone(&self) -> WorkflowRecorder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for WorkflowRecorder
impl RefUnwindSafe for WorkflowRecorder
impl Send for WorkflowRecorder
impl Sync for WorkflowRecorder
impl Unpin for WorkflowRecorder
impl UnsafeUnpin for WorkflowRecorder
impl UnwindSafe for WorkflowRecorder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more