export interface ApprovalDetailContext { workspaceDir?: string; device?: { host: string; user?: string; port?: number; } | null; } /** * Compute a unified-diff-style output for files being edited/written. * Uses longest-common-subsequence (LCS) for compact diff generation. * * Returns null if: * - oldText or newText exceeds MAX_DIFF_INPUT_LINES (400 lines) * → Indicates file is too large for inline diff; caller will show summary instead * * Each diff line is prefixed with: * - '- ' for deleted lines * - '+ ' for added lines * - ' … (N unchanged lines)' for runs of unchanged context * * @param oldText Previous file content * @param newText New file content * @returns Diff lines formatted for approval display, or null if inputs too large */ export declare function diffLinesForApproval(oldText: string, newText: string): string[] | null; /** * Build formatted detail lines for tool approval display. * * Generates visual summary of what a tool will do based on side effect class and tool name. * Calls specialized detail generators (deviceDetail, diffLinesForApproval, etc.) which return: * - Null: no details available for this tool * - Empty array: tool matches but has no relevant inputs * - Lines: formatted strings ready for display * * All lines are: * - Sanitized (secrets removed) * - Truncated at MAX_LINE_CHARS characters with ellipsis * - Capped at MAX_DETAIL_LINES total (excess lines replaced with "… +N more lines" marker) * * @param toolName Tool identifier (e.g., 'edit_file', 'apply_patch', 'ssh_command') * @param sideEffect Side effect class (readonly, local_write, device_mutation, etc.) * @param input Tool input parameters * @param ctx Approval detail context (workspace path, connected device) * @returns Formatted lines ready for display in approval prompt */ export declare function buildApprovalDetailLines(toolName: string, sideEffect: string, input: Record, ctx?: ApprovalDetailContext): string[]; //# sourceMappingURL=approval-detail.d.ts.map