import { ProviderNeutralStructuredCaller } from '../../../agents/structured-caller.js'; import type { WorkflowConfig } from '../../../core/models/index.js'; import type { InternalAgentSeats, ProviderRoutingEntry, ProviderLadderConfig, ResolvedObservabilityConfig, TagRoutingConflictPolicy } from '../../../core/models/config-types.js'; import type { RateLimitFallbackConfig } from '../../../core/models/workflow-types.js'; import type { PermissionMode } from '../../../core/models/types.js'; import { buildRunPaths } from '../../../core/workflow/run/run-paths.js'; import type { WorkflowOperationJournalContext } from '../../../core/workflow/types.js'; import type { ProviderResolutionSource } from '../../../core/workflow/provider-options-trace.js'; import { type WorkflowTraceDiscovery } from '../../../core/workflow/observability/traceDiscovery.js'; import { type SessionLog } from '../../../infra/fs/index.js'; import { isQuietMode } from '../../../shared/context.js'; import { StreamDisplay } from '../../../shared/ui/index.js'; import { TaskPrefixWriter } from '../../../shared/ui/TaskPrefixWriter.js'; import { createProviderEventLogger } from '../../../core/logging/providerEventLogger.js'; import { createUsageEventLogger } from '../../../core/logging/usageEventLogger.js'; import { type OtelFoundationHandle } from '../../../infra/observability/otelFoundation.js'; import { AnalyticsEmitter } from './analyticsEmitter.js'; import { createOutputFns } from './outputFns.js'; import type { RunMetaManager } from './runMeta.js'; import { SessionLogger } from './sessionLogger.js'; import type { TraceReportMode } from './traceReport.js'; import type { WorkflowExecutionOptions } from './types.js'; import type { CompanionFixPolicy, CompanionReviewMode } from '../../../core/models/companion-types.js'; import type { McpAssignmentSection } from '../../../infra/config/runtime-provider/mcp-assignment.js'; import { detectStepType } from './workflowExecutionUtils.js'; import type { WorkflowRunBootstrap } from './workflowRunLifecycle.js'; type DisplayStreamEvent = Parameters>[0]; export interface WorkflowExecutionBootstrap { interactiveUserInput: boolean; prefixWriter: TaskPrefixWriter | undefined; out: ReturnType; displayRef: { current: StreamDisplay | null; }; handlerRef: { current: ReturnType | null; }; streamHandler: (event: DisplayStreamEvent) => void; isRetry: boolean; isWorktree: boolean; runSlug: string; runPaths: ReturnType; runMetaManager: RunMetaManager; traceDiscovery?: WorkflowTraceDiscovery; sessionLog: SessionLog; ndjsonLogPath: string; sessionLogger: SessionLogger; sanitizeObservabilityText: (text: string) => string; shouldNotifyIterationLimit: boolean; shouldNotifyRateLimit: boolean; shouldNotifyWorkflowComplete: boolean; shouldNotifyWorkflowAbort: boolean; currentProvider: WorkflowExecutionOptions['provider']; currentProviderSource: ProviderResolutionSource; configuredModel: string | undefined; configuredModelSource: ProviderResolutionSource; personaProviders: WorkflowExecutionOptions['personaProviders']; providerRouting: WorkflowExecutionOptions['providerRouting']; providerLadders: ProviderLadderConfig | undefined; internalAgentSeats: InternalAgentSeats | undefined; selectorProvider: WorkflowExecutionOptions['selectorProvider']; companionEnabled: boolean; companionReviewMode: CompanionReviewMode; companionFixPolicy: CompanionFixPolicy; companionProviders: Readonly>; providerRoutingTagConflictPolicy: TagRoutingConflictPolicy; providerOptions: WorkflowExecutionOptions['providerOptions']; configProviderOptions: WorkflowExecutionOptions['providerOptions']; providerOptionsProviderSource: ProviderResolutionSource | undefined; providerPermissionMode: PermissionMode | undefined; autoRouting: WorkflowExecutionOptions['autoRouting']; rateLimitFallback: RateLimitFallbackConfig | undefined; effectiveWorkflowConfig: WorkflowConfig; autoStrategyOverride: WorkflowExecutionOptions['autoStrategy']; onEffectiveAutoRoutingReached: () => void; warnIfAutoStrategyUnused: () => void; providerEventLogger: ReturnType; usageEventLogger: ReturnType; observability: ResolvedObservabilityConfig; observabilityHandle: OtelFoundationHandle; analyticsEmitter: AnalyticsEmitter; structuredCaller: ProviderNeutralStructuredCaller; savedSessions: Record; sessionUpdateHandler: (persona: string, sessionId: string | undefined) => void; traceReportMode: TraceReportMode; promptLogPath?: string; operationJournal: WorkflowOperationJournalContext; /** * Runtime MCP assignment section (runtime-v1 only, issue #1137). Passed to * the workflow engine so `OptionsBuilder` can resolve effective MCP servers * per agent step. */ mcpAssignment: McpAssignmentSection | undefined; } export interface WorkflowExecutionResumeLineage { /** Best-effort report/artifact inheritance source, not operation ancestry. */ readonly sourceRunSlug?: string; /** Runtime-only resume source for report/artifact fallback in the engine. */ readonly artifactResumeSource?: WorkflowExecutionOptions['resumeSource']; /** Verified operation ancestry source to persist in run metadata. */ readonly publishedResumeSource?: WorkflowExecutionOptions['resumeSource']; readonly operationJournalRunSlug: string; readonly operationClaimToken: string; readonly sourceOperationClaimTokens?: ReadonlySet; } export declare function resolveWorkflowExecutionResumeLineage(cwd: string, runSlug: string, resumeSource: WorkflowExecutionOptions['resumeSource'], runsDirectory?: string): WorkflowExecutionResumeLineage; export declare function resolveWorkflowExecutionResumeSourceLineage(cwd: string, resumeSource: NonNullable, runsDirectory?: string): WorkflowExecutionResumeLineage; export declare function createWorkflowExecutionBootstrap(workflowConfig: WorkflowConfig, task: string, cwd: string, options: WorkflowExecutionOptions, runBootstrap: WorkflowRunBootstrap, resumeLineage: WorkflowExecutionResumeLineage): Promise; export { detectStepType, isQuietMode }; //# sourceMappingURL=workflowExecutionBootstrap.d.ts.map