proposit-core
    Preparing search index...

    Function executeStage

    • Run a single stage of pipeline against the caller-supplied upstream records, without re-running the whole DAG. The upstream map carries each dependency's { outcome, output? } so ctx.get / ctx.stageStatus reproduce monolithic-run semantics exactly. input is validated + transformed via Value.Parse(pipeline.inputSchema, input) (a schema mismatch throws, same as executePipeline) and the PARSED value seeds ctx.input.

      Emits the per-stage events only (stage:start, stage:llm-request, stage:llm-response-created, stage:llm-call, stage:retry, stage:end) — no pipeline:* bookends. Throws PipelineConfigurationError (UNKNOWN_STAGE) when stageId is not in pipeline.stages, and throws a PipelineConfigurationError (GET_OUTSIDE_DEPS / STATUS_OUTSIDE_DEPS) out directly when the stage reads a non-dependency — both are caller bugs, surfaced rather than swallowed into the result.

      The caller may pass a superset of upstream records; executeStage uses the stage's own dependsOn to pick the relevant ones. It does NOT decide whether the stage SHOULD run given its upstream outcomes — a required-failed upstream just means ctx.get returns undefined; the skip decision belongs to the caller's scheduler.

      Parameters

      Returns Promise<TExecuteStageResult>