/**
 * Message formatting utilities
 * Helpers for creating and formatting messages
 */
import type { InternalMessage, ToolPresentationSnapshotV1 } from '@dexto/core';
import type { Message, ExternalTriggerStyledData } from '../state/types.js';
import { type TuiAgentBackend } from '../agent-backend.js';
export declare function normalizeToolName(toolName: string): string;
export declare function shouldHideTool(toolName: string | undefined): boolean;
export declare function extractAutomationTriggerInfo(content: string): {
    label: string;
    timestamp: string | null;
    source: ExternalTriggerStyledData['source'];
} | null;
export declare function stripAutomationTriggerTags(content: string): string;
/**
 * Convert absolute path to display-friendly relative path.
 * Strategy:
 * 1. If path is under cwd → relative from cwd (e.g., "src/file.ts")
 * 2. If path is under home → use tilde (e.g., "~/Projects/file.ts")
 * 3. Otherwise → return absolute path
 */
export declare function makeRelativePath(absolutePath: string, cwd?: string): string;
/**
 * Format a path for display: relative + center-truncate if needed.
 * @param absolutePath - The absolute file path
 * @param maxWidth - Maximum display width (default 60)
 * @param cwd - Current working directory for relative path calculation
 */
export declare function formatPathForDisplay(absolutePath: string, maxWidth?: number, cwd?: string): string;
/**
 * Center-truncate a file path to keep the filename visible.
 * e.g., "/Users/karaj/Projects/very/long/path/to/file.ts" → "/Users/karaj/…/to/file.ts"
 *
 * Strategy:
 * 1. If path fits within maxWidth, return as-is
 * 2. Keep first segment (root/home) and last 2 segments (parent + filename)
 * 3. Add "…" in the middle
 */
export declare function centerTruncatePath(filePath: string, maxWidth: number): string;
export declare function getToolDisplayName(toolName: string): string;
/**
 * Gets the tool type badge for display.
 * Returns: 'local' or MCP server name.
 */
export declare function getToolTypeBadge(toolName: string): string;
/**
 * Result of formatting a tool header for display
 */
export interface FormattedToolHeader {
    /** User-friendly display name (e.g., "Explore", "Read") */
    displayName: string;
    /** Formatted arguments string (e.g., "file.ts" or "pattern, path: /src") */
    argsFormatted: string;
    /** Tool type badge (e.g., "internal", "custom", "MCP: github") */
    badge: string;
    /** Full formatted header string (e.g., "Explore(task) [custom]") */
    header: string;
}
/**
 * Formats a tool call header for consistent display across CLI.
 * Used by both tool messages and approval prompts.
 *
 * Handles special cases like spawn_agent (uses agentId as display name).
 *
 * @param toolName - Tool name (local tool id or `mcp--...`)
 * @param args - Tool arguments object
 * @returns Formatted header components and full string
 */
export declare function formatToolHeader(options: {
    toolName: string;
    args: Record<string, unknown>;
    presentationSnapshot?: ToolPresentationSnapshotV1;
}): FormattedToolHeader;
/**
 * Creates a user message
 */
export declare function createUserMessage(content: string): Message;
/**
 * Creates a queued user message (shown when message is queued while processing)
 */
export declare function createQueuedUserMessage(content: string, queuePosition: number): Message;
/**
 * Creates a system message
 */
export declare function createSystemMessage(content: string): Message;
/**
 * Creates an error message
 */
export declare function createErrorMessage(error: Error | string): Message;
/**
 * Creates a tool call message
 */
export declare function createToolMessage(toolName: string): Message;
/**
 * Formats a streaming placeholder message
 */
export declare function createStreamingMessage(): Message;
/**
 * Generates a preview of tool result content for display
 */
export declare function formatToolResultPreview(result: string): string;
/**
 * Converts session history messages to UI messages
 */
export declare function convertHistoryToUIMessages(history: InternalMessage[], sessionId: string): Message[];
/**
 * Collects startup information for display in header
 */
export declare function getStartupInfo(agent: TuiAgentBackend, sessionId: string | null): Promise<{
    connectedServers: {
        count: number;
        names: string[];
    };
    failedConnections: string[];
    toolCount: number;
    logFile: string | null;
}>;
//# sourceMappingURL=messageFormatting.d.ts.map