import * as React from 'react'; /** A structured tool result shown under an agent reply. */ export interface AgentResult { /** Result type, e.g. record | view | count | chart | image | plan | proposal | action. */ kind: string; /** Model key the result belongs to, when it has one. */ model?: string; [key: string]: unknown; } export interface AgentResultRendererProps { result: R; /** * Interactive results (approve a plan, launch a guide) report back through * here; the host decides what an action means. */ onAction?: (action: string, payload?: unknown) => void; /** Host is processing an action for this result. */ busy?: boolean; } export type AgentResultRenderer = React.ComponentType>; export interface AgentResultRendererOptions { /** Only for results of this model (overrides the generic renderer of the kind). */ model?: string; } /** * Registers the component that renders results of `kind` (optionally only * for one model). Returns an unregister function; a later registration for * the same key replaces the earlier one. */ export declare function registerAgentResultRenderer(kind: string, renderer: AgentResultRenderer, options?: AgentResultRendererOptions): () => void; /** Most specific renderer for a result: kind+model, then kind. */ export declare function resolveAgentResultRenderer(result: Pick): AgentResultRenderer | undefined; /** Registered keys (`kind` or `kind:model`), for diagnostics. */ export declare function listAgentResultRenderers(): string[]; export declare function clearAgentResultRenderers(): void; /** Re-renders the caller whenever a renderer is (un)registered. */ export declare function useAgentResultRegistryVersion(): number; export interface AgentResultViewProps extends AgentResultRendererProps { /** Rendered when no renderer matches. Defaults to nothing. */ fallback?: React.ReactNode; } /** Renders one agent result through the registry. */ export declare function AgentResultView({ result, fallback, ...rest }: AgentResultViewProps): React.JSX.Element; //# sourceMappingURL=agent-result-registry.d.ts.map