Interface MissionConfig

Top-level configuration object consumed by MissionCompiler.compile(). Produced internally by MissionBuilder.compile().

interface MissionConfig {
    name: string;
    inputSchema: any;
    goalTemplate: string;
    returnsSchema: any;
    plannerConfig: {
        strategy: string;
        maxSteps: number;
        maxIterationsPerNode?: number;
        parallelTools?: boolean;
    };
    policyConfig?: {
        memory?: {
            consistency?: MemoryConsistencyMode;
            read?: any;
            write?: any;
        };
        discovery?: {
            kind?: string;
            fallback?: string;
        };
        personality?: {
            traitRouting?: boolean;
            adaptStyle?: boolean;
            mood?: string;
        };
        guardrails?: string[];
    };
    anchors: {
        id: string;
        node: GraphNode;
        constraints: {
            required: boolean;
            phase?: "gather" | "process" | "validate" | "deliver";
            after?: any;
            before?: any;
        };
    }[];
}

Properties

name: string

Human-readable mission name; becomes the compiled graph's display name.

inputSchema: any

Zod schema (or plain JSON-Schema object) describing the mission's input payload.

goalTemplate: string

Goal prompt template. Supports {{variable}} placeholders (e.g. {{topic}}). The current stub compiler passes it through to generated reasoning nodes.

returnsSchema: any

Zod schema (or plain JSON-Schema object) describing the mission's output artifacts.

plannerConfig: {
    strategy: string;
    maxSteps: number;
    maxIterationsPerNode?: number;
    parallelTools?: boolean;
}

Planner configuration controlling step generation and execution budgets.

Type declaration

  • strategy: string

    Routing/planning strategy identifier (e.g. 'linear', 'react', 'tree-of-thought').

  • maxSteps: number

    Hard cap on the total number of plan steps the planner may emit.

  • Optional maxIterationsPerNode?: number

    Maximum LLM iterations a single gmi node may consume per invocation. Forwarded to gmiNode as maxInternalIterations.

  • Optional parallelTools?: boolean

    When true, gmi nodes are configured to issue multiple tool calls per turn. Forwarded to gmiNode as parallelTools.

policyConfig?: {
    memory?: {
        consistency?: MemoryConsistencyMode;
        read?: any;
        write?: any;
    };
    discovery?: {
        kind?: string;
        fallback?: string;
    };
    personality?: {
        traitRouting?: boolean;
        adaptStyle?: boolean;
        mood?: string;
    };
    guardrails?: string[];
}

Optional mission-level policy overrides. When set, they are applied to all compiled nodes unless a node already declares its own policy.

Type declaration

  • Optional memory?: {
        consistency?: MemoryConsistencyMode;
        read?: any;
        write?: any;
    }
  • Optional discovery?: {
        kind?: string;
        fallback?: string;
    }
    • Optional kind?: string
    • Optional fallback?: string
  • Optional personality?: {
        traitRouting?: boolean;
        adaptStyle?: boolean;
        mood?: string;
    }
    • Optional traitRouting?: boolean
    • Optional adaptStyle?: boolean
    • Optional mood?: string
  • Optional guardrails?: string[]

    Guardrail identifiers applied as output guardrails on every node.

anchors: {
    id: string;
    node: GraphNode;
    constraints: {
        required: boolean;
        phase?: "gather" | "process" | "validate" | "deliver";
        after?: any;
        before?: any;
    };
}[]

Declarative anchor nodes that must be spliced into the execution order at specific phases. Anchors allow callers to inject pre-built GraphNode objects (e.g. specialised tools or human-in-the-loop checkpoints) without modifying the planner output.

Type declaration

  • id: string

    Node id assigned to the anchor inside the compiled graph.

  • node: GraphNode

    Pre-built GraphNode to splice in. The compiler overwrites node.id with anchor.id.

  • constraints: {
        required: boolean;
        phase?: "gather" | "process" | "validate" | "deliver";
        after?: any;
        before?: any;
    }

    Placement constraints that control where in the phase sequence the anchor is inserted.

    • required: boolean

      When true the compiler will throw if the anchor cannot be placed.

    • Optional phase?: "gather" | "process" | "validate" | "deliver"

      Execution phase the anchor belongs to. Phases are ordered: gatherprocessvalidatedeliver.

    • Optional after?: any

      Insert the anchor after this node id (sibling anchor id or plan step id). When the referenced id is not found the anchor is appended to the phase tail.

    • Optional before?: any

      Insert the anchor before this node id. Currently reserved for future use; has no effect in this compiler version.