Class CompiledMission

Execution wrapper for a compiled mission.

Lazily re-compiles the IR on each call so that changes to the underlying config are reflected without needing to rebuild the mission object. In production callers typically compile once and reuse the CompiledMission for many invocations.

Constructors

Methods

  • Execute the mission to completion and return the final artifacts.

    Parameters

    • input: unknown

      Input payload conforming to the mission's inputSchema.

    Returns Promise<unknown>

    The final GraphState.artifacts value once all nodes have completed.

  • Execute the mission while yielding GraphEvent values at each step.

    Useful for streaming progress updates to a UI or logging pipeline.

    Parameters

    • input: unknown

      Input payload conforming to the mission's inputSchema.

    Returns AsyncIterable<GraphEvent, any, any>

    Yields

    GraphEvent objects emitted by the runtime at each node lifecycle point.

  • Resume a previously interrupted run from its latest checkpoint.

    Parameters

    • checkpointId: string

      Either the original run id or an exact checkpoint id.

    • Optional _patch: Partial<GraphState<unknown, unknown, unknown>>

      Optional partial GraphState to merge before resuming (reserved).

    Returns Promise<unknown>

    The final GraphState.artifacts value once execution completes.

  • Retrieve a diagnostic snapshot of a completed or in-progress run.

    Parameters

    • _runId: string

      Run id assigned by the runtime at invocation time.

    Returns Promise<unknown>

    A RunInspection-shaped object (stub — full implementation in Task 17+).

  • Return a human-readable execution plan without actually running the mission.

    Useful for debugging, testing, and displaying "what will happen" summaries in UIs.

    Parameters

    • _input: unknown

      Input payload (currently unused; reserved for future goal interpolation).

    Returns Promise<{
        steps: any[];
        ir: CompiledExecutionGraph;
    }>

    An object containing:

    • steps: flat array of { id, type, config } descriptors for each node.
    • ir: the full CompiledExecutionGraph for deeper inspection.