WorkflowContext
Defined in: packages/core/src/workflow/types.ts:34
Workflow execution scope. Implemented by WorkflowContextImpl (class); prefer
ctx.step(...) on the instance — do not destructure methods off a plain object host.
Passed to the workflow author’s run function. Callers may pass WorkflowRunStartOptions.parentCtx
on Workflow.run to nest under a parent run; otherwise the runtime supplies context.
apps/docs — core/runtime
Properties
Section titled “Properties”memoryScope
Section titled “memoryScope”
readonlymemoryScope: (suffix) =>string
Defined in: packages/core/src/workflow/types.ts:47
Parameters
Section titled “Parameters”suffix
Section titled “suffix”string
Returns
Section titled “Returns”string
parentStepId
Section titled “parentStepId”
readonlyparentStepId:string|null
Defined in: packages/core/src/workflow/types.ts:39
step:
StepFn
Defined in: packages/core/src/workflow/types.ts:45
Run a named, cacheable unit of work. Child contexts are built from the parent host
(this). Agent/tool bridge uses scoped ALS only inside step bodies and the workflow body.
stepId
Section titled “stepId”
readonlystepId:string|null
Defined in: packages/core/src/workflow/types.ts:37
stepPath
Section titled “stepPath”
readonlystepPath:string[]
Defined in: packages/core/src/workflow/types.ts:38
workflowRunId
Section titled “workflowRunId”
readonlyworkflowRunId:string
Defined in: packages/core/src/workflow/types.ts:36
Id of this workflow invocation (shared by all steps/agents in the run).
Methods
Section titled “Methods”emit()
Section titled “emit()”emit(
event):void
Defined in: packages/core/src/workflow/types.ts:53
Emit a custom run event. stepId on the persisted event is omitted at workflow root
(when stepId is null).
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void