import { PersonaProtocol, ProtocolStatus, AgentState } from '../types'; import { PersonaMessage } from '../types'; import { PersonaWebRTCProtocol } from '../protocol'; export type PersonaRuntimeContextType = { protocols: PersonaProtocol[]; protocolsStatus: Map; agentState: AgentState; getMessages: () => PersonaMessage[]; renameThread: (threadId: string, name: string) => void; steerAgent: (text: string) => Promise; }; export declare const PersonaRuntimeContext: import("react").Context; /** * Hook to access the PersonaRuntime context */ export declare function usePersonaRuntime(): PersonaRuntimeContextType; /** * Retrieves a specific protocol instance from the PersonaRuntimeContext. * * @param protocol - The name of the protocol to use. * @returns {PersonaProtocol | null} - The protocol instance or null if not found. * @throws {Error} - If the hook is used outside of a PersonaRuntimeProvider. */ export declare function usePersonaRuntimeProtocol(protocol: string): PersonaProtocol | null; /** * Gets the endpoint URL of the first available protocol */ export declare function usePersonaRuntimeEndpoint(): string | null; /** * Gets the WebRTC protocol instance */ export declare function usePersonaRuntimeWebRTCProtocol(): PersonaWebRTCProtocol | null; /** * Renames a thread by calling the Persona sessions API */ export declare function usePersonaRenameThread(): (threadId: string, name: string) => void; /** * Gets all messages from the current conversation */ export declare function usePersonaRuntimeMessages(): PersonaMessage[]; /** * Gets the current agent execution state */ export declare function useAgentState(): AgentState; /** * Returns a function to steer the currently running agent */ export declare function useSteerAgent(): (text: string) => Promise; //# sourceMappingURL=context.d.ts.map