MCPcopy
hub / github.com/simstudioai/sim / addBlockState

Function addBlockState

packages/testing/src/factories/executor-context.factory.ts:176–189  ·  view source on GitHub ↗
(
  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 */
176export 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

Calls 2

setMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected