import type { WorkflowTraceDiscovery } from '../../../core/workflow/observability/traceDiscovery.js'; import type { RunFailure } from '../../../core/workflow/run/run-meta.js'; import type { SessionState } from '../../../infra/config/index.js'; import type { SessionLog } from '../../../infra/fs/index.js'; import type { NdjsonRecord } from '../../../shared/utils/types.js'; import type { TraceReportMode } from './traceReport.js'; type TerminalSessionRecord = Extract; export interface WorkflowTerminalPublicationContext { readonly runSlug: string; readonly projectCwd: string; readonly sessionStorageDirectory?: string; readonly task: string; readonly workflowName: string; readonly sessionLog: SessionLog; readonly sessionId: string; readonly ndjsonLogPath: string; readonly traceReportMode: TraceReportMode; readonly promptLogPath?: string; readonly traceDiscovery?: WorkflowTraceDiscovery; } export interface WorkflowTerminalPublicationPayload { readonly runSlug: string; readonly projectCwd: string; readonly sessionStorageDirectory?: string; readonly task: string; readonly workflowName: string; readonly status: 'completed' | 'aborted' | 'failed'; readonly iterations: number; readonly reason?: string; readonly failure?: RunFailure; readonly endTime: string; readonly sessionLog: SessionLog; readonly sessionState: SessionState; readonly sessionRecord: TerminalSessionRecord; readonly ndjsonLogFile: string; readonly traceReportMode: TraceReportMode; readonly promptLogPath?: string; readonly traceDiscovery?: WorkflowTraceDiscovery; } export interface WorkflowTerminalPayloadFactory { create(input: { readonly status: 'completed' | 'aborted' | 'failed'; readonly iterations: number; readonly reason?: string; readonly failure?: RunFailure; readonly lastStepContent: string | undefined; readonly lastStepName: string | undefined; readonly sessionLog?: SessionLog; readonly endTime: string; }): WorkflowTerminalPublicationPayload; assertIdentity(payload: WorkflowTerminalPublicationPayload): void; } export declare function createWorkflowTerminalPayloadFactory(context: WorkflowTerminalPublicationContext): WorkflowTerminalPayloadFactory; export declare function requireTerminalReason(reason: string | undefined): string; export {}; //# sourceMappingURL=workflowTerminalPayload.d.ts.map