/** * Pure formatting functions for TUI delegation notifications. * * Converts delegation completion data into compact notification strings * for thin-line injection, toast display, and full system reminder blocks. * No side effects, no SDK calls, no state — pure functions only. */ import type { DelegationNotificationType } from "./types.js"; export interface NotificationFormatOptions { delegationId: string; agent: string; status: "completed" | "error" | "timeout" | "cancelled" | "running"; elapsedMs: number; toolCount?: number; summaryPreview?: string; /** Path to working directory or result file */ path?: string; /** List of modified/created files detected by completion detector */ fileChanges?: string[]; /** ISO 8601 completion timestamp */ completedAt?: string; } /** * Format a full system reminder block for session prompt delivery. * Wraps output in tags with all available fields. */ export declare function formatDelegationNotification(opts: NotificationFormatOptions): string; /** * Format a compact thin-line string for TUI prompt append. * Omits summary preview to keep the line short and scannable. */ export declare function formatCompactLine(opts: NotificationFormatOptions): string; /** * Format a toast-style notification line. * Minimal format suitable for transient UI toast displays. */ export declare function formatToastLine(opts: NotificationFormatOptions): string; /** * Format a duration in milliseconds into a human-readable string. * <1000ms → "Xms", <60s → "X.Xs", <60m → "Xm Ys", >=60m → "Xh Ym" */ export declare function formatDuration(ms: number): string; export interface FailureNotificationOptions { delegationId: string; agent: string; failureLevel: number; elapsedSeconds: number; actionCount: number; isExecutedRunning: boolean; } /** * Format a failure checkpoint notification line. * * Distinguishes between sessions that ran tools but stalled * (executed-running-fail) and sessions that never executed (fail-from-threshold). */ export declare function formatFailureNotification(opts: FailureNotificationOptions): string; /** * Format a final failure notification (level 4, 300s). */ export declare function formatFinalFailure(opts: FailureNotificationOptions): string; /** * Format an urgent failure notification that requires the orchestrator to respond. * * For early failures (30s/60s/120s checkpoints) where no actions were detected, * this creates a prompt that the orchestrator MUST respond to with a decision: * resume, change-agent, steer, or cancel. */ export declare function formatUrgentFailureNotification(opts: FailureNotificationOptions): string; /** * Map a DelegationNotificationType to the corresponding status string * used by the formatter functions. */ export declare function typeToStatus(type: DelegationNotificationType): "completed" | "error" | "timeout" | "cancelled" | "running"; //# sourceMappingURL=notification-formatter.d.ts.map