import type { AgentLike } from "./AgentLike"; import type { CachePolicy } from "./CachePolicy"; import type { RetryPolicy } from "./RetryPolicy"; import type { ScorersMap } from "./scorers/types"; import type { VoiceProvider } from "./voice/types"; import type { TaskMemoryConfig } from "./memory/types"; export type TaskDescriptor = { nodeId: string; ordinal: number; iteration: number; ralphId?: string; dependsOn?: string[]; needs?: Record; worktreeId?: string; worktreePath?: string; worktreeBranch?: string; worktreeBaseBranch?: string; outputTable: any | null; outputTableName: string; /** Zod schema reference from the Task output prop (used for schema resolution). */ outputRef?: import("zod").ZodObject; outputSchema?: import("zod").ZodObject; parallelGroupId?: string; parallelMaxConcurrency?: number; needsApproval: boolean; waitAsync?: boolean; approvalMode?: "gate" | "decision" | "select" | "rank"; approvalOnDeny?: "fail" | "continue" | "skip"; approvalOptions?: Array<{ key: string; label: string; summary?: string; metadata?: Record; }>; approvalAllowedScopes?: string[]; approvalAllowedUsers?: string[]; approvalAutoApprove?: { after?: number; audit?: boolean; conditionMet?: boolean; revertOnMet?: boolean; }; skipIf: boolean; /** Number of retries after the initial attempt. Infinity is allowed. */ retries: number; retryPolicy?: RetryPolicy; timeoutMs: number | null; heartbeatTimeoutMs: number | null; continueOnFail: boolean; cachePolicy?: CachePolicy; /** Agent or array of agents [primary, fallback1, fallback2, ...]. Tries in order until one succeeds. */ agent?: AgentLike | AgentLike[]; prompt?: string; staticPayload?: unknown; computeFn?: () => unknown | Promise; label?: string; meta?: Record; /** Optional scorers map attached to this task. */ scorers?: ScorersMap; /** Voice provider propagated from a ancestor. */ voice?: VoiceProvider; /** Default speaker/voice ID propagated from a ancestor. */ voiceSpeaker?: string; /** Optional cross-run memory configuration. */ memoryConfig?: TaskMemoryConfig; };