# Function orchestrateInputToTaskContract

- orchestrateInputToTaskContract(
  input: OrchestrateInputLike,
  ): {
  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;
  }

  Converts orchestrate input to a TaskContract.

  #### Parameters

  - input: OrchestrateInputLike

  #### Returns {
  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;
  }

  - Defined in packages/nexus-agents/src/pipeline/v2-orchestrate.ts:40