Class MissionCompiler

Static compiler that transforms a MissionConfig into a CompiledExecutionGraph.

The compiler is intentionally stateless — call MissionCompiler.compile() as many times as needed; each invocation is fully isolated.

Example

const ir = MissionCompiler.compile({
name: 'research-mission',
inputSchema: z.object({ topic: z.string() }),
goalTemplate: 'Research {{topic}} and produce a summary',
returnsSchema: z.object({ summary: z.string() }),
plannerConfig: { strategy: 'linear', maxSteps: 5 },
anchors: [],
});

Constructors

Methods

Constructors

Methods

  • Compile a mission config into a CompiledExecutionGraph.

    Uses the current stub planner that generates a simple phase-ordered plan based on the mission goal template. Planner-backed decomposition is not wired into this compiler yet.

    Parameters

    • config: MissionConfig

      Fully-populated MissionConfig object produced by MissionBuilder.

    Returns CompiledExecutionGraph

    A validated CompiledExecutionGraph ready for GraphRuntime.

    Throws

    When GraphValidator.validate() reports structural errors.