/** * Replay Formatters - Response formatting for replay tool actions */ import type { RecordedCommand, CommandSequence, ActiveSequenceState } from '../command-recorder.js'; import type { StepResult, DebugState, BreakpointHitInfo, ClickValidationFailure } from './replay-executor.js'; import type { InputEvent } from '../interaction-recorder.js'; /** * Format execution results for display */ export declare function formatExecutionResults(sequenceName: string, results: StepResult[], totalCommands: number, durationMs: number, /** * Reported in its own section, never folded into the counts above. Teardown * is cleanup, so a failure in it must not turn a passing run red - or make a * failing one look like it failed somewhere it didn't. */ teardown?: { results: StepResult[]; failed?: boolean; }): string; /** * Format paused sequence response */ export declare function formatPausedResponse(sequence: CommandSequence, results: StepResult[], pausedAtStep: number, durationMs: number): string; /** * Format click validation failure response (paused for inspection/retry) */ export declare function formatClickValidationFailure(sequence: CommandSequence, results: StepResult[], pausedAtStep: number, durationMs: number, failure: ClickValidationFailure, connectionReason: string): string; /** * Format breakpoint hit response */ export declare function formatBreakpointHit(sequenceName: string, results: StepResult[], totalCommands: number, durationMs: number, breakpointInfo: BreakpointHitInfo, connectionReason: string): string; /** * Format debug state section */ export declare function formatDebugState(debugState: DebugState, connectionReason: string): string; interface ExtractedVariable { value: string; locations: string[]; } /** * Extract customizable text variables from sequence commands */ export declare function extractTextVariables(commands: RecordedCommand[]): Record; /** * Format variable prompt for user to customize values before execution */ export declare function formatVariablePrompt(sequenceName: string, sequenceIdOrName: string, variables: Record, connectionReason: string | undefined): string; interface HistoryCommand { index: number; tool: string; params: Record; delay?: number; comment?: string; } /** * Format command history listing */ export declare function formatHistory(history: HistoryCommand[], totalCount: number): string; /** * Format sequence created response */ export declare function formatSequenceCreated(sequence: CommandSequence): string; /** * Format sequence list */ export declare function formatSequenceList(sequences: CommandSequence[]): string; /** * Format sequence details */ export declare function formatSequenceDetails(sequence: CommandSequence): string; /** * Format saved sequences on disk listing * Categories: * - Saved: Regular sequences in .cdp-tools/sequences/ * - Issues: Issue sequences that are in_progress (or all if showAll) * - Abandoned: Issue sequences without a linked issue (orphaned) */ export declare function formatSavedSequencesList(sequences: Array<{ filename: string; name: string; id: string; commandCount: number; description?: string; expectedOutcome?: string; startUrl?: string; location?: string; fullPath?: string; }>, issueSequences?: Array<{ filename: string; name: string; id: string; commandCount: number; description?: string; expectedOutcome?: string; startUrl?: string; location?: string; fullPath?: string; issueId?: number; issueType?: string; issueStatus?: string; }>, showAll?: boolean): string; /** * Format active sequence status */ export declare function formatActiveStatus(activeSeq: ActiveSequenceState, commandsSincePause: HistoryCommand[]): string; /** * Format step execution results */ export declare function formatStepResults(sequenceName: string, results: StepResult[], startStep: number, totalCommands: number, failed: boolean): string; /** * Format recorded input events for human review. * * This is the `outputFormat: 'review'` implementation - a readable walk of what * the recorder actually captured, showing both the coordinates and the selector * it found for each interaction so a human can judge which one a command should * use. Noise (mousemove, keyup) is dropped; every other event variant - * including navigation, paste and comment events - gets its own entry. */ export declare function formatEventsForReview(events: InputEvent[]): string; /** * Format insert prompt (when no indices provided) */ export declare function formatInsertPrompt(sequenceName: string, commandsSincePause: HistoryCommand[], currentStep: number, totalSteps: number): string; /** * Format insert result */ export declare function formatInsertResult(sequenceName: string, sequenceId: string, insertedCount: number, insertAfter: number, newTotal: number, isOverwrite: boolean): string; /** * Format the result of adding a `conditional` step. */ export declare function formatConditionalAdded(info: { sequenceName: string; condition: string; thenSequence: string; position: number; totalSteps: number; persistedTo?: string; }): string; /** * What a sequence now declares, after `declare` has set it. * * Reads back the whole statement rather than just the change: each list * replaces its field, so "what does this sequence declare now" is the only * question the caller can act on. */ export declare function formatDeclarations(sequence: CommandSequence, persistedTo?: string): string; export {}; //# sourceMappingURL=replay-formatters.d.ts.map