import type { ToolCall } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/message_pb";
import { ToolKind } from "@stigmer/sdk";
import type { ToolResultView } from "@stigmer/sdk";
import type { ToolCategory } from "./tool-categories";
/** Optional per-kind overrides for label and summary. */
export interface ToolPresenter {
    /** Overrides the display label (e.g. "Shell" -> "Run command"). */
    readonly label?: (toolCall: ToolCall) => string;
    /** Overrides the one-line result summary suffix. */
    readonly summary?: (toolCall: ToolCall, result: ToolResultView) => string | null;
}
/**
 * Registers a custom presenter for a {@link ToolKind}, overriding the default
 * label and/or summary. Call once at app startup. This is the extension point
 * for platform builders embedding the execution UI who want product-specific
 * wording without forking the components.
 *
 * Returns a disposer that unregisters the presenter, restoring the previous one
 * for that kind (or the default). Most apps register once at startup and ignore
 * it; tests and dynamic hosts use it to avoid leaking global state.
 *
 * @example
 * ```ts
 * import { registerToolPresenter, ToolKind } from "@stigmer/react";
 *
 * const dispose = registerToolPresenter(ToolKind.SHELL, {
 *   label: () => "Run command",
 *   summary: (_tc, result) =>
 *     result.type === "terminal" && result.exitCode ? `failed (${result.exitCode})` : null,
 * });
 * // later: dispose();
 * ```
 */
export declare function registerToolPresenter(kind: ToolKind, presenter: ToolPresenter): () => void;
/** Returns the registered presenter for a kind, if any. */
export declare function getToolPresenter(kind: ToolKind): ToolPresenter | undefined;
/** The fully-resolved presentation for a tool call, returned by {@link useToolPresentation}. */
export interface ToolPresentation {
    /** Harness-agnostic kind (wire field, with name fallback). */
    readonly kind: ToolKind;
    /** Presentation category (1:1 with kind). */
    readonly category: ToolCategory;
    /** Display label, e.g. "Edit", "Shell". */
    readonly label: string;
    /** Primary argument (path, command, pattern...), or null. */
    readonly primaryArg: string | null;
    /** Normalized result view for rendering with {@link ResultView}. */
    readonly result: ToolResultView;
    /** One-line result summary suffix for the collapsed row (e.g. "+40 -0"). */
    readonly resultSummary: string | null;
}
/**
 * Resolves the complete, render-ready presentation for a tool call.
 *
 * Headless and memoized: the returned object is referentially stable across
 * renders for the same `toolCall`, so it is safe to depend on in `React.memo`
 * leaves of the streaming thread.
 */
export declare function useToolPresentation(toolCall: ToolCall): ToolPresentation;
//# sourceMappingURL=tool-presenter.d.ts.map