import { E as EADKAgent, R as RunConfig, b as RunResult, c as RunEvent } from '../../types-Ks98Z0E_.mjs'; import * as react_jsx_runtime from 'react/jsx-runtime'; import React from 'react'; import 'zod'; /** * useAgent Hook * * React hook for running agents with state management. */ interface UseAgentOptions { /** Agent to use */ agent: EADKAgent; /** Default run config */ config?: RunConfig; /** Callback when run completes */ onComplete?: (result: RunResult) => void; /** Callback on error */ onError?: (error: Error) => void; } interface UseAgentReturn { /** Run the agent with input */ run: (input: string, config?: RunConfig) => Promise; /** Whether the agent is currently running */ isRunning: boolean; /** Last result */ result: RunResult | null; /** Last error */ error: Error | null; /** Abort the current run */ abort: () => void; /** Reset state */ reset: () => void; } declare function useAgent(options: UseAgentOptions): UseAgentReturn; /** * useAgentStream Hook * * React hook for streaming agent events with real-time updates. */ interface UseAgentStreamOptions { /** Agent to use */ agent: EADKAgent; /** Default run config */ config?: RunConfig; /** Callback for each event */ onEvent?: (event: RunEvent) => void; /** Callback when stream completes */ onComplete?: (result: RunResult | null) => void; /** Callback on error */ onError?: (error: Error) => void; } interface UseAgentStreamReturn { /** Start streaming */ stream: (input: string, config?: RunConfig) => Promise; /** Whether streaming is active */ isStreaming: boolean; /** Accumulated text output */ text: string; /** All events received */ events: RunEvent[]; /** Final result (when stream completes) */ result: RunResult | null; /** Error if any */ error: Error | null; /** Abort the stream */ abort: () => void; /** Reset state */ reset: () => void; } declare function useAgentStream(options: UseAgentStreamOptions): UseAgentStreamReturn; interface AgentContextValue { /** Registered agents by name */ agents: Record; /** Default run configuration */ defaultConfig?: RunConfig; /** Get an agent by name */ getAgent: (name: string) => EADKAgent | undefined; } interface AgentProviderProps { /** Agents to make available */ agents: EADKAgent[]; /** Default run configuration */ defaultConfig?: RunConfig; /** Children */ children: React.ReactNode; } declare function AgentProvider({ agents, defaultConfig, children, }: AgentProviderProps): react_jsx_runtime.JSX.Element; /** * Hook to access agent context. */ declare function useAgentContext(): AgentContextValue; /** * Hook to get a specific agent by name from the provider. */ declare function useAgentByName(name: string): EADKAgent | undefined; export { type AgentContextValue, AgentProvider, type AgentProviderProps, type UseAgentOptions, type UseAgentReturn, type UseAgentStreamOptions, type UseAgentStreamReturn, useAgent, useAgentByName, useAgentContext, useAgentStream };