pub struct SessionRpcWorkflow<'a> { /* private fields */ }Expand description
session.workflow.* RPCs.
Implementations§
Source§impl<'a> SessionRpcWorkflow<'a>
impl<'a> SessionRpcWorkflow<'a>
Sourcepub fn journal(&self) -> SessionRpcWorkflowJournal<'a>
pub fn journal(&self) -> SessionRpcWorkflowJournal<'a>
session.workflow.journal.* sub-namespace.
Sourcepub async fn run(
&self,
params: WorkflowRunRequest,
) -> Result<WorkflowRunResult, Error>
pub async fn run( &self, params: WorkflowRunRequest, ) -> Result<WorkflowRunResult, Error>
Runs a registered dynamic workflow by name at the top level.
Wire method: session.workflow.run.
§Parameters
params- Parameters for invoking a registered workflow.
§Returns
Complete current or terminal workflow run envelope.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn resume(
&self,
params: WorkflowResumeRequest,
) -> Result<WorkflowResumeResult, Error>
pub async fn resume( &self, params: WorkflowResumeRequest, ) -> Result<WorkflowResumeResult, Error>
Resumes a dynamic workflow run using its persisted name, arguments, journal, and accounting.
Wire method: session.workflow.resume.
§Parameters
params- Parameters for resuming a workflow run from its persisted identity.
§Returns
Resolved persisted workflow identity and resumed run envelope.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn get_run(
&self,
params: WorkflowGetRunRequest,
) -> Result<WorkflowRunResult, Error>
pub async fn get_run( &self, params: WorkflowGetRunRequest, ) -> Result<WorkflowRunResult, Error>
Gets the current or settled envelope for a dynamic workflow run.
Wire method: session.workflow.getRun.
§Parameters
params- Parameters for retrieving a workflow run.
§Returns
Complete current or terminal workflow run envelope.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn list_runs(
&self,
params: WorkflowListRunsRequest,
) -> Result<WorkflowListRunsResult, Error>
pub async fn list_runs( &self, params: WorkflowListRunsRequest, ) -> Result<WorkflowListRunsResult, Error>
Lists durable dynamic workflow runs for this session in creation order.
Wire method: session.workflow.listRuns.
§Parameters
params- Parameters for paging workflow runs.
§Returns
A page of workflow runs in durable creation order.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn get_run_detail(
&self,
params: WorkflowGetRunRequest,
) -> Result<WorkflowRunDetail, Error>
pub async fn get_run_detail( &self, params: WorkflowGetRunRequest, ) -> Result<WorkflowRunDetail, Error>
Gets durable and live observability detail for one dynamic workflow run.
Wire method: session.workflow.getRunDetail.
§Parameters
params- Parameters for retrieving a workflow run.
§Returns
Full workflow run observability detail.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn get_run_progress(
&self,
params: WorkflowGetRunProgressRequest,
) -> Result<WorkflowProgressPage, Error>
pub async fn get_run_progress( &self, params: WorkflowGetRunProgressRequest, ) -> Result<WorkflowProgressPage, Error>
Pages durable progress for one dynamic workflow run.
Wire method: session.workflow.getRunProgress.
§Parameters
params- Parameters for paging workflow progress.
§Returns
A bidirectional page of workflow progress.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn cancel(
&self,
params: WorkflowCancelRequest,
) -> Result<WorkflowRunResult, Error>
pub async fn cancel( &self, params: WorkflowCancelRequest, ) -> Result<WorkflowRunResult, Error>
Requests cancellation of a dynamic workflow run and returns its run envelope.
Wire method: session.workflow.cancel.
§Parameters
params- Parameters for cancelling a workflow run.
§Returns
Complete current or terminal workflow run envelope.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn pause(
&self,
params: WorkflowPauseRequest,
) -> Result<WorkflowRunResult, Error>
pub async fn pause( &self, params: WorkflowPauseRequest, ) -> Result<WorkflowRunResult, Error>
Pauses a running dynamic workflow and returns its settled run envelope.
Wire method: session.workflow.pause.
§Parameters
params- Parameters for pausing a running workflow.
§Returns
Complete current or terminal workflow run envelope.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn log(
&self,
params: WorkflowLogRequest,
) -> Result<WorkflowAckResult, Error>
pub async fn log( &self, params: WorkflowLogRequest, ) -> Result<WorkflowAckResult, Error>
Records a batch of ordered dynamic workflow progress lines.
Wire method: session.workflow.log.
§Parameters
params- Parameters for recording workflow progress.
§Returns
Acknowledgement that a workflow request was accepted.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn agent(
&self,
params: WorkflowAgentRequest,
) -> Result<WorkflowAgentResult, Error>
pub async fn agent( &self, params: WorkflowAgentRequest, ) -> Result<WorkflowAgentResult, Error>
Runs one dynamic-workflow-scoped subagent and returns its result.
Wire method: session.workflow.agent.
§Parameters
params- Parameters for one workflow-scoped subagent call.
§Returns
Result of one workflow-scoped subagent call.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.