import type { AgentResponse, CompanionFinding, Language, PermissionMode, PartDefinition } from '../core/models/types.js'; import type { ProviderUsageSnapshot } from '../core/models/response.js'; import type { ProviderType } from '../core/workflow/types.js'; import type { RunAgentOptions, StreamCallback } from './runner.js'; import type { StepProviderOptions } from '../core/models/workflow-types.js'; import { type RejectedTeamLeaderDecomposition } from './team-leader-decomposition-regeneration.js'; export interface TeamLeaderPartFeedbackResult { id: string; title: string; status: string; content: string; } export interface DecomposeTaskOptions { cwd: string; persona?: string; personaPath?: string; workflowBundleResourceRoot?: string; language?: Language; model?: string; provider?: ProviderType; resolvedModel?: string; resolvedProvider?: ProviderType; resolvedProviderOptions?: StepProviderOptions; permissionMode?: PermissionMode; projectCwd?: string; onStream?: StreamCallback; onActivity?: RunAgentOptions['onActivity']; workflowMeta?: RunAgentOptions['workflowMeta']; childProcessEnv?: RunAgentOptions['childProcessEnv']; abortSignal?: RunAgentOptions['abortSignal']; failureDir?: RunAgentOptions['failureDir']; mcpServers?: RunAgentOptions['mcpServers']; mcpAssignment?: RunAgentOptions['mcpAssignment']; mcpServerIdentity?: RunAgentOptions['mcpServerIdentity']; sessionId?: string; inspectTools?: string[]; inspectGuidance?: boolean; onPromptResolved?: (promptParts: { systemPrompt: string; userInstruction: string; }) => void; onDispatch?: RunAgentOptions['onDispatch']; onAgentResponse?: (response: AgentResponse) => void; onAgentError?: (error: unknown) => void; } export type MorePartsOptions = Omit & { cancellablePartIds: readonly string[]; /** Known IDs tolerated in model output but removed before the response is returned. */ ignoredCancelPartIds?: readonly string[]; companionFindings?: readonly CompanionFinding[]; }; export interface MorePartsResponse { done: boolean; reasoning: string; cancelPartIds: string[]; parts: PartDefinition[]; sessionId?: string; providerUsage?: ProviderUsageSnapshot; } export interface DecomposeTaskResponse { parts: PartDefinition[]; sessionId?: string; providerUsage?: ProviderUsageSnapshot; } export declare function requestDecompositionRawResponse(instruction: string, maxInitialParts: number | undefined, options: DecomposeTaskOptions, rejectedDecomposition?: RejectedTeamLeaderDecomposition): Promise; export declare function decomposeTask(instruction: string, maxInitialParts: number | undefined, options: DecomposeTaskOptions): Promise; export declare function requestMorePartsRawResponse(originalInstruction: string, allResults: TeamLeaderPartFeedbackResult[], existingIds: string[], options: MorePartsOptions): Promise; export declare function requestMoreParts(originalInstruction: string, allResults: TeamLeaderPartFeedbackResult[], existingIds: string[], options: MorePartsOptions): Promise; //# sourceMappingURL=decompose-task-usecase.d.ts.map