Function
addBlockState
(
ctx: ExecutorContext,
blockId: string,
output: Record<string, any>,
executionTime = 100
)
Source from the content-addressed store, hash-verified
| 174 | * Returns the context for chaining. |
| 175 | */ |
| 176 | export function addBlockState( |
| 177 | ctx: ExecutorContext, |
| 178 | blockId: string, |
| 179 | output: Record<string, any>, |
| 180 | executionTime = 100 |
| 181 | ): ExecutorContext { |
| 182 | ;(ctx.blockStates as Map<string, ExecutorBlockState>).set(blockId, { |
| 183 | output, |
| 184 | executed: true, |
| 185 | executionTime, |
| 186 | }) |
| 187 | ;(ctx.executedBlocks as Set<string>).add(blockId) |
| 188 | return ctx |
| 189 | } |
| 190 | |
| 191 | /** |
| 192 | * Creates a minimal workflow for context. |
Callers
nothing calls this directly
Tested by
no test coverage detected