import type { MaybeRefOrGetter } from "vue"; import type { AbstractAgent } from "@ag-ui/client"; export declare enum UseAgentUpdate { OnMessagesChanged = "OnMessagesChanged", OnStateChanged = "OnStateChanged", OnRunStatusChanged = "OnRunStatusChanged" } export interface UseAgentProps { agentId?: MaybeRefOrGetter; threadId?: MaybeRefOrGetter; updates?: UseAgentUpdate[]; /** * Throttle interval (in milliseconds) for re-renders triggered by * `onMessagesChanged` and `onStateChanged` notifications. Useful to reduce * re-render frequency during high-frequency streaming updates. * * Uses a leading+trailing pattern with a shared window — first update * fires immediately, subsequent updates within the window are coalesced, * and a trailing timer ensures the most recent update fires after the * window expires. See `CopilotKitCore.subscribeToAgentWithOptions` in * `@copilotkit/core` for details. * * Resolved as: `throttleMs ?? provider defaultThrottleMs ?? 0`. * Passing `throttleMs: 0` explicitly disables throttling even when the * provider specifies a non-zero `defaultThrottleMs`. * * Run lifecycle callbacks (`onRunInitialized`, `onRunFinalized`, * `onRunFailed`, `onRunErrorEvent`) always fire immediately. * * @default undefined * When unset, inherits from the provider's `defaultThrottleMs`; * if that is also unset, the effective value is `0` (no throttle). */ throttleMs?: MaybeRefOrGetter; } export declare const globalThreadCloneMap: WeakMap>; export declare function getThreadClone(registryAgent: AbstractAgent | undefined | null, threadId: string | undefined | null): AbstractAgent | undefined; /** * Resolves and subscribes to a CopilotKit agent for the current Vue scope. * * It returns a reactive `agent` ref that updates when the selected agent * changes, when runtime connection state changes, or when subscribed update * events fire. * * @example * ```ts * const { agent } = useAgent({ agentId: "default" }); * ``` */ export declare function useAgent(props?: UseAgentProps): { agent: import("vue").ShallowRef; }; //# sourceMappingURL=use-agent.d.ts.map