nexus-agents - v2.80.0
    Preparing search index...

    Function createDelegatePipeline

    • Creates a compiled V2 pipeline for delegate_to_model from a TaskContract.

      The pipeline has a single 'route' stage that selects the optimal model. This is intentionally minimal — the routing logic lives in the stage handler (placeholder here, real handler injected by the MCP tool).

      Parameters

      • task: {
            id: string;
            description: string;
            status:
                | "failed"
                | "planning"
                | "executing"
                | "approved"
                | "done"
                | "intake"
                | "clarifying"
                | "validating";
            analysis: { complexity: string; taskType: string; ambiguityScore: number };
            constraints: { time?: string; quality?: string; scope: string[] };
            requiredCapabilities: { tools: string[]; experts: string[] };
            capabilityGaps: {
                available: { tools: string[]; experts: string[] };
                gaps: unknown[];
                allSatisfied: boolean;
            };
            parentId?: string;
            artifacts: {
                id: string;
                type: | "code"
                | "plan"
                | "analysis"
                | "review"
                | "test"
                | "spec"
                | "report"
                | "vote";
            }[];
            metadata: Record<string, unknown>;
            createdAt: number;
            updatedAt: number;
            completedAt?: number;
            error?: string;
        }

      Returns DelegatePipelineResult