Skip to content
1 min read · 267 words

Interface: StepContext

Defined in: src/batteries/media/runtime.ts:49

The mutable execution context threaded through interceptors and step impls.

Properties

PropertyModifierTypeDescriptionDefined in
enginesreadonlyEngineRegistryThe deployment's engine registry — ordered, capability-filtered dispatch.src/batteries/media/runtime.ts:68
payloadpublicStepPayloadThe input payload for this step.src/batteries/media/runtime.ts:57
planreadonlyMediaPlanThe whole plan being executed.src/batteries/media/runtime.ts:51
signal?readonlyAbortSignalAbort signal threaded from the caller.src/batteries/media/runtime.ts:59
stashreadonlyMap<string, unknown>Scratchpad shared across the execution (interceptors may stash timings, hashes…).src/batteries/media/runtime.ts:61
stepreadonlyMediaStepThe current step.src/batteries/media/runtime.ts:55
stepIndexreadonlynumberZero-based index of the current step.src/batteries/media/runtime.ts:53

Methods

resolveRef()

ts
resolveRef(id: string): Promise<StepPayload>;

Defined in: src/batteries/media/runtime.ts:73

Resolve another media participating in this step (merge/diff targets), by ref id. Supplied by the pipeline from its configured media resolver.

Parameters

ParameterType
idstring

Returns

Promise<StepPayload>


shortCircuit()

ts
shortCircuit(payload: StepPayload): never;

Defined in: src/batteries/media/runtime.ts:66

Short-circuit this step: skip the implementation and continue the chain with bytes (the cache idiom). Throws internally — call it, don't return it.

Parameters

ParameterType
payloadStepPayload

Returns

never