/**
 * Parse the persisted content of a tool-event chat message.
 *
 * `persistToolEvent` in the interactive session service writes
 * messages in one of two shapes:
 *
 *   1. `**<Label>** \`<detail>\``    — most tool calls, detail usually JSON
 *   2. `**<Label>**`                  — label-only events (e.g. "Session started")
 *
 * Anything that doesn't match either shape is not a tool event and
 * should fall through to regular markdown rendering.
 */
export type ToolEvent = {
    kind: 'tool';
    /** Tool name, e.g. "Bash", "Read", "Write", "Edit", "Glob", "Grep" */
    name: string;
    /** Raw detail string as persisted (may be JSON). */
    detail: string;
    /** Parsed object if `detail` was valid JSON, otherwise null. */
    parsed: Record<string, unknown> | null;
} | {
    kind: 'label-only';
    name: string;
};
export declare function parseToolEvent(text: string): ToolEvent | null;
/** True when the tool is a file mutation (Write / Edit / MultiEdit). */
export declare function isFileWriteTool(name: string): boolean;
/** Extract the file path from a parsed tool payload, if present. */
export declare function extractFilePath(parsed: Record<string, unknown> | null): string | null;
/** Extract the file content from a parsed tool payload, if present. */
export declare function extractFileContent(parsed: Record<string, unknown> | null): string | null;
/**
 * Build a short one-line summary from a parsed tool payload, e.g. the
 * command for Bash, the file_path for Read, the pattern for Grep.
 * Falls back to a truncated version of the raw detail string.
 */
export declare function summarizeToolDetail(parsed: Record<string, unknown> | null, fallback: string, maxLen?: number): string;
//# sourceMappingURL=detect.d.ts.map