import { type AgentMetadata } from "./use-agent-metadata.js"; /** Options accepted by {@link useAgents}. */ export interface UseAgentsOptions { /** * When `false`, the request is skipped and the hook stays idle with an empty * list. Flip it to `true` to fetch (or refetch). Defaults to `true`. */ enabled?: boolean; } /** Result returned from {@link useAgents}. */ export interface UseAgentsResult { /** Browser-safe metadata for every agent the project exposes, sorted by name. */ agents: AgentMetadata[]; /** `true` while the list request is in flight. */ isLoading: boolean; /** The last request error, or `null`. */ error: Error | null; /** Re-run the request, bypassing nothing — always hits the network. */ refetch: () => void; } /** Normalize the wire response from `GET /api/agents`. */ export declare function normalizeAgentsListResponse(value: unknown): AgentMetadata[]; /** * React hook that lists the browser-safe agents a project exposes, via * `GET /api/agents`. Companion to {@link useAgentMetadata} (single agent) — use * it to drive an agent switcher, e.g. only rendering a picker when * `agents.length > 1`. * * The in-flight request is aborted on unmount, on option change, and before a * `refetch`, so state never lands from a stale response. */ export declare function useAgents(options?: UseAgentsOptions): UseAgentsResult; //# sourceMappingURL=use-agents.d.ts.map