import type { ToolCall } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/message_pb";
import { ToolKind } from "@stigmer/sdk";
/**
 * Discriminated tool categories for type-aware rendering.
 *
 * This is the presentation taxonomy. Classification (name -> kind) lives in
 * `@stigmer/sdk`'s `resolveToolKind` (single source of truth, shared with the
 * runner and Go CLI); this file maps each {@link ToolKind} to its presentation
 * metadata (label, primary argument). `"mcp"` covers tools originating from an
 * MCP server, whose names are dynamic.
 */
export type ToolCategory = "shell" | "read" | "write" | "edit" | "delete" | "search" | "list" | "fetch" | "web-search" | "think" | "sub-agent" | "internal" | "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[];
}
/**
 * Returns true if the tool is an internal state-management tool that should not
 * appear in the message thread (todos are rendered through a dedicated surface).
 */
export declare function isInternalTool(toolName: string): boolean;
/** Maps a {@link ToolKind} to its presentation metadata. */
export declare function toolKindToCategoryInfo(kind: ToolKind, toolName: string): ToolCategoryInfo;
/**
 * Resolves a tool's presentation category from its name + MCP slug.
 *
 * Classification is delegated to `@stigmer/sdk`'s name-based resolver (the same
 * table the runner and Go CLI use), then mapped to presentation metadata. When
 * the caller has the full {@link ToolCall}, prefer {@link resolveToolCategoryFromCall},
 * which also honours the wire `tool_kind` for forward compatibility.
 */
export declare function resolveToolCategory(toolName: string, mcpServerSlug?: string): ToolCategoryInfo;
/**
 * Like {@link resolveToolCategory} but uses the wire `tool_kind` when present,
 * falling back to name-based resolution for legacy executions.
 */
export declare function resolveToolCategoryFromCall(toolCall: ToolCall): ToolCategoryInfo;
/**
 * Resolves presentation metadata from an explicit wire {@link ToolKind} plus the
 * tool name and MCP slug. Used by surfaces that carry a denormalized `tool_kind`
 * but not a full {@link ToolCall} — notably `PendingApproval`. Falls back to
 * name-based resolution when the kind is unset (legacy executions).
 */
export declare function resolveToolCategoryFromKind(toolKind: ToolKind, 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