import type { ToolCall } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/message_pb";
/**
 * Discriminated tool categories for type-aware rendering.
 *
 * Mirrors the CLI's `toolDisplayMap` in
 * `client-apps/cli/pkg/toolrender/render.go`.
 *
 * `"mcp"` covers tools originating from an MCP server whose
 * names are dynamic and cannot be statically listed in
 * {@link TOOL_DISPLAY_MAP}.
 */
export type ToolCategory = "shell" | "read" | "write" | "edit" | "delete" | "search" | "list" | "think" | "sub-agent" | "mcp" | "unknown";
/** Resolved display metadata for a tool call, returned by {@link resolveToolCategory}. */
export interface ToolCategoryInfo {
    /** Semantic category of the tool. */
    readonly category: ToolCategory;
    /** Human-readable label for the tool (e.g., `"Shell"`, `"Read"`). */
    readonly label: string;
    /** JSON argument key that provides the primary display value (e.g., `"command"` for shell). */
    readonly primaryArgField: string;
    /** Fallback argument keys tried when the primary key is absent. */
    readonly fallbackArgFields: readonly string[];
}
/**
 * Resolves a tool name to its category metadata for type-aware
 * rendering.
 *
 * When `mcpServerSlug` is provided and the tool name is not a
 * known built-in, the tool is categorised as `"mcp"` with a
 * human-readable label derived from the raw tool name.
 *
 * Falls back to `"unknown"` only when the tool is neither
 * built-in nor MCP-originated.
 */
export declare function resolveToolCategory(toolName: string, mcpServerSlug?: string): ToolCategoryInfo;
/**
 * Converts a snake_case or camelCase tool name into a
 * human-readable title.
 *
 * @example
 * humanizeToolName("apply_mcp_server") // "Apply MCP Server"
 * humanizeToolName("deleteAgent")      // "Delete Agent"
 */
export declare function humanizeToolName(name: string): string;
/**
 * Extracts the most relevant argument value from a tool call
 * based on its category (command for shell tools, path for file
 * tools, slug for MCP tools, etc.).
 *
 * Returns `null` when the tool has no recognised arguments.
 */
export declare function extractPrimaryArg(toolCall: ToolCall): string | null;
/**
 * Extracts the primary argument value from a JSON string
 * (typically `PendingApproval.argsPreview`). Returns `null` if
 * parsing fails or the expected field is not found.
 */
export declare function extractPrimaryArgFromPreview(toolName: string, argsPreview: string, mcpServerSlug?: string): string | null;
/**
 * Extracts the file content body from a JSON `argsPreview` string
 * for write/edit tool categories. Scans the same field names used
 * by the post-execution {@link ToolCallDetail} renderer so that
 * the approval preview matches the completed tool call display.
 *
 * Returns `null` if parsing fails or no content field is found.
 */
export declare function extractWriteContentFromPreview(argsPreview: string): string | null;
//# sourceMappingURL=tool-categories.d.ts.map