import { type ReactNode } from 'react'; export type ToolDisplayNamesState = { readonly status: 'loading'; } | { readonly status: 'ready'; readonly names: Readonly>; } | { readonly status: 'failed'; readonly error: unknown; }; export interface ToolDisplayNamesContextValue { readonly state: ToolDisplayNamesState; /** Re-fetch the overlay (drives the app-level refresh after a display-name edit). */ readonly reload: () => void; } /** * Fetch the tool-meta overlay once the caller is authenticated and hold its * display-name map as SDK state. Gated on `isAuthenticated` (the overlay is an authed * read), so the login screen never fires a doomed request; a fetch failure settles * into `failed` QUIETLY, because the consuming pickers fall back to the bare raw name. * `reload` re-fetches on demand, so an app-level display-name write refreshes every * picker without a remount. */ export declare function ToolDisplayNamesProvider({ children }: { children: ReactNode; }): import("react").FunctionComponentElement>; /** * The live raw-name → display-name map — `{}` while the overlay is loading/failed, no * provider is mounted, or no row carries a display name. A tool picker folds this into * its option labels; an unmapped name reads the bare raw name. */ export declare function useToolDisplayNames(): Readonly>; /** * Re-fetch the display-name overlay. A surface that writes a display name calls this * so the app-level provider — and every picker reading it — refreshes alongside the * surface's own list invalidation. A no-op when no provider is mounted. */ export declare function useReloadToolDisplayNames(): () => void; /** * The option label for a raw tool name under a display-name map: `Display (raw)` when * a display name maps the name and is non-empty AND differs from the raw name, else * the bare raw name. Shared so every tool picker labels identically. * * @param names - the raw-name → display-name map (from {@link useToolDisplayNames}). * @param rawName - the raw tool name to label. * @returns `Display (raw)` for a distinct non-empty display name, else `rawName`. */ export declare function toolDisplayLabel(names: Readonly>, rawName: string): string; /** * Serve a FIXED display-name map — the test seam for a consumer that renders a tool * picker without a live fetch. `reload` defaults to a no-op; a test that exercises the * reload wiring passes a spy. Re-exported from the testing entry. */ export declare function StaticToolDisplayNamesProvider({ names, reload, children, }: { readonly names: Readonly>; readonly reload?: () => void; readonly children: ReactNode; }): import("react").FunctionComponentElement>; //# sourceMappingURL=useToolDisplayNames.d.ts.map