import type { Step } from '@workflow/world'; import type { ModelMessage } from 'ai'; /** * Formats a duration in milliseconds to a human-readable string. * * @param ms - Duration in milliseconds * @param compact - If true, returns a single-unit format (e.g., "45s", "2.5m"). * If false (default), returns multi-part format (e.g., "1h 30m", "2d 5h"). * * Compact format: * - < 1s: shows milliseconds (e.g., "500ms") * - < 1m: shows seconds (e.g., "45s") * - < 1h: shows minutes (e.g., "45m") * - >= 1h: shows hours (e.g., "2.5h") * * Full format: * - < 1s: shows milliseconds (e.g., "500ms") * - < 1m: shows seconds (e.g., "45.5s") * - >= 1m: shows human-readable format (e.g., "1h 30m", "2d 5h") */ export declare function formatDuration(ms: number, compact?: boolean): string; /** * Returns a formatted pagination display string * @param currentPage - The current page number * @param totalPages - The total number of pages visited so far * @param hasMore - Whether there are more pages available * @returns Formatted string like "Page 1 of 3+" or "Page 2 of 2" */ export declare function getPaginationDisplay(currentPage: number, totalPages: number, hasMore: boolean): string; /** * Check if a step is a doStreamStep (LLM call with conversation input) */ export declare function isDoStreamStep(stepName: string): boolean; /** * Extract the conversation from a hydrated doStreamStep input. * doStreamStep signature: (conversationPrompt, model, writable, tools, options) * So input[0] is the conversation. */ export declare function extractConversation(stepInput: unknown): ModelMessage[] | null; /** * A doStreamStep with its conversation input extracted */ export interface StreamStep { stepId: string; stepName: string; displayName: string; conversation: ModelMessage[]; } /** * Identifies all stream steps (doStreamStep) in a run and extracts their conversations. */ export declare function identifyStreamSteps(steps: Step[]): StreamStep[]; //# sourceMappingURL=utils.d.ts.map