Skip to content

Sequence

Defined in: Sequence.ts:15

Builds a chain of Processes that run in order. Supports sequential steps, waits, callbacks, and parallel groups.

new Sequence(): Sequence

Sequence

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.

Process


call(fn): this

Defined in: Sequence.ts:46

Add an instant callback.

() => void

this


loop(): this

Defined in: Sequence.ts:74

Loop the sequence indefinitely.

this


parallel(…steps): this

Defined in: Sequence.ts:63

Run steps in parallel (all must complete before sequence continues).

…(Process | StepFactory)[]

this


repeat(times): this

Defined in: Sequence.ts:80

Repeat the sequence a fixed number of times (1 = play once, 2 = play twice, etc.).

number

this


then(step): this

Defined in: Sequence.ts:21

Add a step (Process or factory function).

Process | StepFactory

this


wait(seconds): this

Defined in: Sequence.ts:30

Add a delay in seconds. Must be finite and > 0.

number

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.