import { ReactCustomMessageRenderer } from "../types/react-custom-message-renderer.mjs"; import { ReactToolCallRenderer } from "../types/react-tool-call-renderer.mjs"; import { ReactActivityMessageRenderer } from "../types/react-activity-message-renderer.mjs"; import { ReactFrontendTool } from "../types/frontend-tool.mjs"; import { ReactHumanInTheLoop } from "../types/human-in-the-loop.mjs"; import "../types/index.mjs"; import { CopilotKitCoreReact } from "../lib/react-core.mjs"; import { AbstractAgent } from "@ag-ui/client"; import React, { ReactNode } from "react"; import { CopilotKitCoreErrorCode } from "@copilotkitnext/core"; import { Theme } from "@copilotkit/a2ui-renderer"; //#region src/providers/CopilotKitProvider.d.ts interface CopilotKitContextValue { copilotkit: CopilotKitCoreReact; /** * Set of tool call IDs currently being executed. * This is tracked at the provider level to ensure tool execution events * are captured even before child components mount. */ executingToolCallIds: ReadonlySet; } interface CopilotKitProviderProps { children: ReactNode; runtimeUrl?: string; headers?: Record; /** * Credentials mode for fetch requests (e.g., "include" for HTTP-only cookies in cross-origin requests). */ credentials?: RequestCredentials; /** * The Copilot Cloud public API key. */ publicApiKey?: string; /** * Alias for `publicApiKey` **/ publicLicenseKey?: string; properties?: Record; useSingleEndpoint?: boolean; agents__unsafe_dev_only?: Record; selfManagedAgents?: Record; renderToolCalls?: ReactToolCallRenderer[]; renderActivityMessages?: ReactActivityMessageRenderer[]; renderCustomMessages?: ReactCustomMessageRenderer[]; frontendTools?: ReactFrontendTool[]; humanInTheLoop?: ReactHumanInTheLoop[]; showDevConsole?: boolean | "auto"; /** * Error handler called when CopilotKit encounters an error. * Fires for all error types (runtime connection failures, agent errors, tool errors). */ onError?: (event: { error: Error; code: CopilotKitCoreErrorCode; context: Record; }) => void | Promise; /** * Configuration for the A2UI (Agent-to-UI) renderer. * The built-in A2UI renderer is activated automatically when the runtime reports * that `a2ui` is configured in `CopilotRuntime`. This prop is optional and only * needed if you want to override the default theme. * * @example * ```tsx * * {children} * * ``` */ a2ui?: { /** * Override the default A2UI viewer theme. * When omitted, the built-in `viewerTheme` from `@copilotkit/a2ui-renderer` is used. */ theme?: Theme; }; } declare const CopilotKitProvider: React.FC; declare const useCopilotKit: () => CopilotKitContextValue; //#endregion export { CopilotKitContextValue, CopilotKitProvider, CopilotKitProviderProps, useCopilotKit }; //# sourceMappingURL=CopilotKitProvider.d.mts.map