/** Source-defined prompt suggestion shown by chat surfaces. */ export type AgentMetadataPromptSuggestion = { type: "prompt"; title?: string; prompt: string; } | { id: string; type: "prompt"; }; /** Source-defined task suggestion shown by chat surfaces. */ export type AgentMetadataTaskSuggestion = { type: "task"; id: string; }; /** Source-defined agent suggestion. */ export type AgentMetadataSuggestion = AgentMetadataPromptSuggestion | AgentMetadataTaskSuggestion; /** Source-defined suggestion group for an agent. */ export interface AgentMetadataSuggestions { welcomeMessage?: string; suggestions: AgentMetadataSuggestion[]; } /** Browser-safe source-defined agent metadata. */ export interface AgentMetadata { id: string; name: string; description: string | null; avatarUrl: string | null; suggestions?: AgentMetadataSuggestions; } /** Result returned from useAgentMetadata. */ export interface UseAgentMetadataResult { agent: AgentMetadata | null; isLoading: boolean; error: Error | null; } /** * Normalize a single browser-safe agent record (the `agent` object inside the * `/api/agents/:id` response, or one entry of the `/api/agents` list). */ export declare function normalizeAgentMetadata(value: unknown): AgentMetadata; /** Normalize the wire response from /api/agents/:id. */ export declare function normalizeAgentMetadataResponse(value: unknown): AgentMetadata; /** Return prompt text suggestions that the current Chat component can render. */ export declare function getAgentPromptSuggestions(agent: AgentMetadata | null): string[]; /** * A prompt suggestion normalized for rendering: the short `label` shown on the * chip and the full `prompt` sent when it is clicked. */ export interface PromptSuggestion { /** Short chip label — the agent's `title`, falling back to the prompt. */ label: string; /** Full text sent to the agent when the chip is clicked. */ prompt: string; } /** * Normalize an agent's prompt suggestions to `{ label, prompt }[]`, ready to * render — the chip shows the short `title` while the click sends the full * `prompt`. Saves consumers from flat-mapping `agent.suggestions.suggestions` * and reconciling the `title`/`prompt` fields themselves. */ export declare function getAgentPromptSuggestionItems(agent: AgentMetadata | null): PromptSuggestion[]; /** React hook for browser-safe source-defined agent metadata. */ export declare function useAgentMetadata(agentId: string | null | undefined): UseAgentMetadataResult; //# sourceMappingURL=use-agent-metadata.d.ts.map