import type { RunAgentOptions } from '../../../agents/types.js'; import type { NormalAgentWorkflowStep, PartDefinition, PartResult, WorkflowStep, AgentResponse, WorkflowResumePointEntry } from '../../models/types.js'; import type { RuntimeStepResolution } from '../types.js'; import type { OptionsBuilder } from './OptionsBuilder.js'; import type { ParallelLogger } from './parallel-logger.js'; import type { ProviderType } from '../../../shared/types/provider.js'; import type { StepProviderInfo } from '../types.js'; import { ExplicitPartFailureError } from '../operations/operation-recovery-error.js'; import type { CompanionStepRuntime } from '../companion/step-runtime.js'; export interface TeamLeaderPartObservability { readonly enabled: boolean; readonly runId?: string; readonly workflowName: string; readonly iteration: number; readonly workflowStack?: WorkflowResumePointEntry[]; readonly sanitizeText?: (text: string) => string; } export interface TeamLeaderPartExecutionOptions { readonly forceNewSession: boolean; readonly skipCompanionReview?: boolean; readonly onDispatch?: RunAgentOptions['onDispatch']; readonly composeOptions?: (options: RunAgentOptions) => RunAgentOptions; readonly deadlineSignal?: AbortSignal; readonly providerInfo: StepProviderInfo; readonly createCompanionRuntime?: (partStep: NormalAgentWorkflowStep, abortSignal: AbortSignal) => Promise; readonly completeCompanionReview?: (input: { readonly partStep: NormalAgentWorkflowStep; readonly initialResponse: AgentResponse; readonly agentOptions: RunAgentOptions; readonly companionRuntime: CompanionStepRuntime; readonly abortSignal: AbortSignal; }) => Promise; } export declare function buildPartScopedSessionKey(partStep: WorkflowStep, resolvedTarget: { provider: ProviderType | undefined; model: string | undefined; }): string; export declare function runTeamLeaderPart(optionsBuilder: OptionsBuilder, step: WorkflowStep, leaderWorkflowMeta: RunAgentOptions['workflowMeta'] | undefined, part: PartDefinition, partIndex: number, defaultTimeoutMs: number, updatePersonaSession: (persona: string, sessionId: string | undefined) => void, parallelLogger: ParallelLogger | undefined, observability: TeamLeaderPartObservability, buildInstruction: (partStep: WorkflowStep) => string, runtime?: RuntimeStepResolution, executionAbortSignal?: AbortSignal, executionOptions?: TeamLeaderPartExecutionOptions): Promise; export declare function buildTeamLeaderErrorPartResult(step: WorkflowStep, part: PartDefinition, error: unknown, abortSignal?: AbortSignal): PartResult; export declare function createExplicitPartFailure(boundaryId: string, result: PartResult): ExplicitPartFailureError; //# sourceMappingURL=team-leader-part-runner.d.ts.map