Sequence
Defined in: Sequence.ts:15
Builds a chain of Processes that run in order. Supports sequential steps, waits, callbacks, and parallel groups.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Sequence():
Sequence
Returns
Section titled “Returns”Sequence
Methods
Section titled “Methods”build()
Section titled “build()”build():
Process
Defined in: Sequence.ts:92
Compile the steps into the single Process that drives them.
Nothing runs until a runner drives that process: pass it to
ProcessComponent.run for entity-scoped work, or to a queue’s run.
Cancelling the returned process cancels the step it is on.
Returns
Section titled “Returns”call()
Section titled “call()”call(
fn):this
Defined in: Sequence.ts:46
Add an instant callback.
Parameters
Section titled “Parameters”() => void
Returns
Section titled “Returns”this
loop()
Section titled “loop()”loop():
this
Defined in: Sequence.ts:74
Loop the sequence indefinitely.
Returns
Section titled “Returns”this
parallel()
Section titled “parallel()”parallel(…
steps):this
Defined in: Sequence.ts:63
Run steps in parallel (all must complete before sequence continues).
Parameters
Section titled “Parameters”…(Process | StepFactory)[]
Returns
Section titled “Returns”this
repeat()
Section titled “repeat()”repeat(
times):this
Defined in: Sequence.ts:80
Repeat the sequence a fixed number of times (1 = play once, 2 = play twice, etc.).
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”this
then()
Section titled “then()”then(
step):this
Defined in: Sequence.ts:21
Add a step (Process or factory function).
Parameters
Section titled “Parameters”Process | StepFactory
Returns
Section titled “Returns”this
wait()
Section titled “wait()”wait(
seconds):this
Defined in: Sequence.ts:30
Add a delay in seconds. Must be finite and > 0.
Parameters
Section titled “Parameters”seconds
Section titled “seconds”number
Returns
Section titled “Returns”this
Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/core.md.