import { type ReactNode } from "react"; import { PortalClient, type PortalClientConfig } from "./portal.js"; import { AgentError } from "../shared/error-types.js"; interface AgentContextValue { portal: PortalClient | null; isConnected: boolean; isViewing: boolean; executeIntent: (intent: string) => Promise; } export interface AgentProviderProps { children: ReactNode; serverUrl?: string; config?: PortalClientConfig; } export declare function AgentProvider({ children, serverUrl, config, }: AgentProviderProps): import("react/jsx-runtime").JSX.Element; export declare function useAgent(): AgentContextValue; export declare function useIntent(): { execute: (intent: string) => Promise; loading: boolean; result: string | null; error: AgentError | null; isConnected: boolean; isBudgetError: boolean; isIterationError: boolean; isToolError: boolean; isPermissionError: boolean; }; export type AgentStatus = "idle" | "thinking" | "responding" | "tool" | "error"; export interface StreamingMessage { role: "user" | "assistant"; content: string; } export declare function useAgentRPC(agentProxy: { chat: (messages: { role: string; content: string | null; }[], context?: Record) => AsyncGenerator<{ type: string; data: unknown; }>; }): { messages: StreamingMessage[]; status: AgentStatus; isStreaming: boolean; sendMessage: (content: string, context?: Record) => Promise; reset: () => void; }; export {}; //# sourceMappingURL=hooks.d.ts.map