@copilotkit/react-core 0.0.0-0.0.0-max-changeset-10101010101010-20260109191632
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4188 -0
- package/LICENSE +21 -0
- package/README.md +141 -0
- package/dist/chunk-2IDV5OHF.mjs +11 -0
- package/dist/chunk-2IDV5OHF.mjs.map +1 -0
- package/dist/chunk-336QEM3A.mjs +349 -0
- package/dist/chunk-336QEM3A.mjs.map +1 -0
- package/dist/chunk-36KQV2NA.mjs +1 -0
- package/dist/chunk-36KQV2NA.mjs.map +1 -0
- package/dist/chunk-3MHWEKFN.mjs +759 -0
- package/dist/chunk-3MHWEKFN.mjs.map +1 -0
- package/dist/chunk-4CEQJ2X6.mjs +31 -0
- package/dist/chunk-4CEQJ2X6.mjs.map +1 -0
- package/dist/chunk-4RRMC7L2.mjs +32 -0
- package/dist/chunk-4RRMC7L2.mjs.map +1 -0
- package/dist/chunk-6ESSSQ7Q.mjs +134 -0
- package/dist/chunk-6ESSSQ7Q.mjs.map +1 -0
- package/dist/chunk-6PUNP7CD.mjs +102 -0
- package/dist/chunk-6PUNP7CD.mjs.map +1 -0
- package/dist/chunk-6YOKPWQ7.mjs +1 -0
- package/dist/chunk-6YOKPWQ7.mjs.map +1 -0
- package/dist/chunk-6ZLPNY7X.mjs +225 -0
- package/dist/chunk-6ZLPNY7X.mjs.map +1 -0
- package/dist/chunk-7DTB7S5V.mjs +83 -0
- package/dist/chunk-7DTB7S5V.mjs.map +1 -0
- package/dist/chunk-7IBF6RBW.mjs +23 -0
- package/dist/chunk-7IBF6RBW.mjs.map +1 -0
- package/dist/chunk-7X3E6GHT.mjs +83 -0
- package/dist/chunk-7X3E6GHT.mjs.map +1 -0
- package/dist/chunk-A6NKSGH3.mjs +1 -0
- package/dist/chunk-A6NKSGH3.mjs.map +1 -0
- package/dist/chunk-ABWT4DRT.mjs +24 -0
- package/dist/chunk-ABWT4DRT.mjs.map +1 -0
- package/dist/chunk-AFNWX62Q.mjs +110 -0
- package/dist/chunk-AFNWX62Q.mjs.map +1 -0
- package/dist/chunk-BUSWSDYO.mjs +17 -0
- package/dist/chunk-BUSWSDYO.mjs.map +1 -0
- package/dist/chunk-CDUIA2WM.mjs +60 -0
- package/dist/chunk-CDUIA2WM.mjs.map +1 -0
- package/dist/chunk-CYDWEPFL.mjs +1 -0
- package/dist/chunk-CYDWEPFL.mjs.map +1 -0
- package/dist/chunk-DMLQZG75.mjs +25 -0
- package/dist/chunk-DMLQZG75.mjs.map +1 -0
- package/dist/chunk-E7SE25ZU.mjs +59 -0
- package/dist/chunk-E7SE25ZU.mjs.map +1 -0
- package/dist/chunk-EFL5OBKN.mjs +310 -0
- package/dist/chunk-EFL5OBKN.mjs.map +1 -0
- package/dist/chunk-F555TVE4.mjs +33 -0
- package/dist/chunk-F555TVE4.mjs.map +1 -0
- package/dist/chunk-FD6FGKYY.mjs +1 -0
- package/dist/chunk-FD6FGKYY.mjs.map +1 -0
- package/dist/chunk-FDOMAPJY.mjs +59 -0
- package/dist/chunk-FDOMAPJY.mjs.map +1 -0
- package/dist/chunk-GJOR3RI6.mjs +120 -0
- package/dist/chunk-GJOR3RI6.mjs.map +1 -0
- package/dist/chunk-GPEJNVE5.mjs +80 -0
- package/dist/chunk-GPEJNVE5.mjs.map +1 -0
- package/dist/chunk-HM6ON7AM.mjs +86 -0
- package/dist/chunk-HM6ON7AM.mjs.map +1 -0
- package/dist/chunk-I76HKHPJ.mjs +32 -0
- package/dist/chunk-I76HKHPJ.mjs.map +1 -0
- package/dist/chunk-ICIK2BSB.mjs +17 -0
- package/dist/chunk-ICIK2BSB.mjs.map +1 -0
- package/dist/chunk-JD7BAH7U.mjs +1 -0
- package/dist/chunk-JD7BAH7U.mjs.map +1 -0
- package/dist/chunk-LUGEI4YQ.mjs +1 -0
- package/dist/chunk-LUGEI4YQ.mjs.map +1 -0
- package/dist/chunk-N7FZFIWO.mjs +551 -0
- package/dist/chunk-N7FZFIWO.mjs.map +1 -0
- package/dist/chunk-NB2FKV2V.mjs +1 -0
- package/dist/chunk-NB2FKV2V.mjs.map +1 -0
- package/dist/chunk-NBK4KBLX.mjs +54 -0
- package/dist/chunk-NBK4KBLX.mjs.map +1 -0
- package/dist/chunk-O7ARI5CV.mjs +31 -0
- package/dist/chunk-O7ARI5CV.mjs.map +1 -0
- package/dist/chunk-P2YEE2ZI.mjs +36 -0
- package/dist/chunk-P2YEE2ZI.mjs.map +1 -0
- package/dist/chunk-PIF5KJYI.mjs +103 -0
- package/dist/chunk-PIF5KJYI.mjs.map +1 -0
- package/dist/chunk-PMAFHQ7P.mjs +65 -0
- package/dist/chunk-PMAFHQ7P.mjs.map +1 -0
- package/dist/chunk-QNUAXSDP.mjs +166 -0
- package/dist/chunk-QNUAXSDP.mjs.map +1 -0
- package/dist/chunk-RKTVJRK7.mjs +143 -0
- package/dist/chunk-RKTVJRK7.mjs.map +1 -0
- package/dist/chunk-SKC7AJIV.mjs +61 -0
- package/dist/chunk-SKC7AJIV.mjs.map +1 -0
- package/dist/chunk-SPCZTZCY.mjs +1 -0
- package/dist/chunk-SPCZTZCY.mjs.map +1 -0
- package/dist/chunk-SQDOUMPZ.mjs +125 -0
- package/dist/chunk-SQDOUMPZ.mjs.map +1 -0
- package/dist/chunk-WF65O6HX.mjs +66 -0
- package/dist/chunk-WF65O6HX.mjs.map +1 -0
- package/dist/chunk-XDFVCQD3.mjs +27 -0
- package/dist/chunk-XDFVCQD3.mjs.map +1 -0
- package/dist/chunk-YJ2KZDZJ.mjs +186 -0
- package/dist/chunk-YJ2KZDZJ.mjs.map +1 -0
- package/dist/chunk-YTQHRJUA.mjs +86 -0
- package/dist/chunk-YTQHRJUA.mjs.map +1 -0
- package/dist/chunk-YYN33GSG.mjs +73 -0
- package/dist/chunk-YYN33GSG.mjs.map +1 -0
- package/dist/chunk-Z6JV2LRY.mjs +37 -0
- package/dist/chunk-Z6JV2LRY.mjs.map +1 -0
- package/dist/chunk-ZVF5Q6IH.mjs +29 -0
- package/dist/chunk-ZVF5Q6IH.mjs.map +1 -0
- package/dist/chunk-ZYTXB6HH.mjs +151 -0
- package/dist/chunk-ZYTXB6HH.mjs.map +1 -0
- package/dist/components/CopilotListeners.d.ts +3 -0
- package/dist/components/CopilotListeners.js +101 -0
- package/dist/components/CopilotListeners.js.map +1 -0
- package/dist/components/CopilotListeners.mjs +9 -0
- package/dist/components/CopilotListeners.mjs.map +1 -0
- package/dist/components/copilot-provider/copilot-messages.d.ts +24 -0
- package/dist/components/copilot-provider/copilot-messages.js +351 -0
- package/dist/components/copilot-provider/copilot-messages.js.map +1 -0
- package/dist/components/copilot-provider/copilot-messages.mjs +16 -0
- package/dist/components/copilot-provider/copilot-messages.mjs.map +1 -0
- package/dist/components/copilot-provider/copilotkit-props.d.ts +160 -0
- package/dist/components/copilot-provider/copilotkit-props.js +19 -0
- package/dist/components/copilot-provider/copilotkit-props.js.map +1 -0
- package/dist/components/copilot-provider/copilotkit-props.mjs +1 -0
- package/dist/components/copilot-provider/copilotkit-props.mjs.map +1 -0
- package/dist/components/copilot-provider/copilotkit.d.ts +19 -0
- package/dist/components/copilot-provider/copilotkit.js +1960 -0
- package/dist/components/copilot-provider/copilotkit.js.map +1 -0
- package/dist/components/copilot-provider/copilotkit.mjs +31 -0
- package/dist/components/copilot-provider/copilotkit.mjs.map +1 -0
- package/dist/components/copilot-provider/index.d.ts +14 -0
- package/dist/components/copilot-provider/index.js +1960 -0
- package/dist/components/copilot-provider/index.js.map +1 -0
- package/dist/components/copilot-provider/index.mjs +30 -0
- package/dist/components/copilot-provider/index.mjs.map +1 -0
- package/dist/components/dev-console/console-trigger.d.ts +8 -0
- package/dist/components/dev-console/console-trigger.js +1202 -0
- package/dist/components/dev-console/console-trigger.js.map +1 -0
- package/dist/components/dev-console/console-trigger.mjs +233 -0
- package/dist/components/dev-console/console-trigger.mjs.map +1 -0
- package/dist/components/dev-console/developer-console-modal.d.ts +10 -0
- package/dist/components/dev-console/developer-console-modal.js +987 -0
- package/dist/components/dev-console/developer-console-modal.js.map +1 -0
- package/dist/components/dev-console/developer-console-modal.mjs +12 -0
- package/dist/components/dev-console/developer-console-modal.mjs.map +1 -0
- package/dist/components/dev-console/icons.d.ts +9 -0
- package/dist/components/dev-console/icons.js +131 -0
- package/dist/components/dev-console/icons.js.map +1 -0
- package/dist/components/dev-console/icons.mjs +16 -0
- package/dist/components/dev-console/icons.mjs.map +1 -0
- package/dist/components/error-boundary/error-boundary.d.ts +31 -0
- package/dist/components/error-boundary/error-boundary.js +500 -0
- package/dist/components/error-boundary/error-boundary.js.map +1 -0
- package/dist/components/error-boundary/error-boundary.mjs +15 -0
- package/dist/components/error-boundary/error-boundary.mjs.map +1 -0
- package/dist/components/error-boundary/error-utils.d.ts +11 -0
- package/dist/components/error-boundary/error-utils.js +190 -0
- package/dist/components/error-boundary/error-utils.js.map +1 -0
- package/dist/components/error-boundary/error-utils.mjs +14 -0
- package/dist/components/error-boundary/error-utils.mjs.map +1 -0
- package/dist/components/index.d.ts +14 -0
- package/dist/components/index.js +1960 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +31 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/components/toast/exclamation-mark-icon.d.ts +9 -0
- package/dist/components/toast/exclamation-mark-icon.js +55 -0
- package/dist/components/toast/exclamation-mark-icon.js.map +1 -0
- package/dist/components/toast/exclamation-mark-icon.mjs +8 -0
- package/dist/components/toast/exclamation-mark-icon.mjs.map +1 -0
- package/dist/components/toast/toast-provider.d.ts +27 -0
- package/dist/components/toast/toast-provider.js +347 -0
- package/dist/components/toast/toast-provider.js.map +1 -0
- package/dist/components/toast/toast-provider.mjs +10 -0
- package/dist/components/toast/toast-provider.mjs.map +1 -0
- package/dist/components/usage-banner.d.ts +29 -0
- package/dist/components/usage-banner.js +247 -0
- package/dist/components/usage-banner.js.map +1 -0
- package/dist/components/usage-banner.mjs +12 -0
- package/dist/components/usage-banner.mjs.map +1 -0
- package/dist/context/coagent-state-renders-context.d.ts +24 -0
- package/dist/context/coagent-state-renders-context.js +91 -0
- package/dist/context/coagent-state-renders-context.js.map +1 -0
- package/dist/context/coagent-state-renders-context.mjs +12 -0
- package/dist/context/coagent-state-renders-context.mjs.map +1 -0
- package/dist/context/copilot-context.d.ts +10 -0
- package/dist/context/copilot-context.js +161 -0
- package/dist/context/copilot-context.js.map +1 -0
- package/dist/context/copilot-context.mjs +10 -0
- package/dist/context/copilot-context.mjs.map +1 -0
- package/dist/context/copilot-messages-context.d.ts +18 -0
- package/dist/context/copilot-messages-context.js +60 -0
- package/dist/context/copilot-messages-context.js.map +1 -0
- package/dist/context/copilot-messages-context.mjs +10 -0
- package/dist/context/copilot-messages-context.mjs.map +1 -0
- package/dist/context/index.d.ts +15 -0
- package/dist/context/index.js +285 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/index.mjs +33 -0
- package/dist/context/index.mjs.map +1 -0
- package/dist/context/threads-context.d.ts +16 -0
- package/dist/context/threads-context.js +59 -0
- package/dist/context/threads-context.js.map +1 -0
- package/dist/context/threads-context.mjs +12 -0
- package/dist/context/threads-context.mjs.map +1 -0
- package/dist/copilot-context-ec77e921.d.ts +209 -0
- package/dist/hooks/index.d.ts +33 -0
- package/dist/hooks/index.js +1774 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.mjs +91 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/hooks/use-agent-nodename.d.ts +3 -0
- package/dist/hooks/use-agent-nodename.js +56 -0
- package/dist/hooks/use-agent-nodename.js.map +1 -0
- package/dist/hooks/use-agent-nodename.mjs +8 -0
- package/dist/hooks/use-agent-nodename.mjs.map +1 -0
- package/dist/hooks/use-coagent-state-render-bridge.d.ts +100 -0
- package/dist/hooks/use-coagent-state-render-bridge.js +214 -0
- package/dist/hooks/use-coagent-state-render-bridge.js.map +1 -0
- package/dist/hooks/use-coagent-state-render-bridge.mjs +15 -0
- package/dist/hooks/use-coagent-state-render-bridge.mjs.map +1 -0
- package/dist/hooks/use-coagent-state-render.d.ts +55 -0
- package/dist/hooks/use-coagent-state-render.js +255 -0
- package/dist/hooks/use-coagent-state-render.js.map +1 -0
- package/dist/hooks/use-coagent-state-render.mjs +11 -0
- package/dist/hooks/use-coagent-state-render.mjs.map +1 -0
- package/dist/hooks/use-coagent.d.ts +192 -0
- package/dist/hooks/use-coagent.js +233 -0
- package/dist/hooks/use-coagent.js.map +1 -0
- package/dist/hooks/use-coagent.mjs +9 -0
- package/dist/hooks/use-coagent.mjs.map +1 -0
- package/dist/hooks/use-configure-chat-suggestions.d.ts +36 -0
- package/dist/hooks/use-configure-chat-suggestions.js +79 -0
- package/dist/hooks/use-configure-chat-suggestions.js.map +1 -0
- package/dist/hooks/use-configure-chat-suggestions.mjs +47 -0
- package/dist/hooks/use-configure-chat-suggestions.mjs.map +1 -0
- package/dist/hooks/use-copilot-action.d.ts +103 -0
- package/dist/hooks/use-copilot-action.js +295 -0
- package/dist/hooks/use-copilot-action.js.map +1 -0
- package/dist/hooks/use-copilot-action.mjs +11 -0
- package/dist/hooks/use-copilot-action.mjs.map +1 -0
- package/dist/hooks/use-copilot-additional-instructions.d.ts +26 -0
- package/dist/hooks/use-copilot-additional-instructions.js +177 -0
- package/dist/hooks/use-copilot-additional-instructions.js.map +1 -0
- package/dist/hooks/use-copilot-additional-instructions.mjs +9 -0
- package/dist/hooks/use-copilot-additional-instructions.mjs.map +1 -0
- package/dist/hooks/use-copilot-authenticated-action.d.ts +18 -0
- package/dist/hooks/use-copilot-authenticated-action.js +462 -0
- package/dist/hooks/use-copilot-authenticated-action.js.map +1 -0
- package/dist/hooks/use-copilot-authenticated-action.mjs +13 -0
- package/dist/hooks/use-copilot-authenticated-action.mjs.map +1 -0
- package/dist/hooks/use-copilot-chat-headless_c.d.ts +25 -0
- package/dist/hooks/use-copilot-chat-headless_c.js +1044 -0
- package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -0
- package/dist/hooks/use-copilot-chat-headless_c.mjs +24 -0
- package/dist/hooks/use-copilot-chat-headless_c.mjs.map +1 -0
- package/dist/hooks/use-copilot-chat-suggestions.d.ts +35 -0
- package/dist/hooks/use-copilot-chat-suggestions.js +60 -0
- package/dist/hooks/use-copilot-chat-suggestions.js.map +1 -0
- package/dist/hooks/use-copilot-chat-suggestions.mjs +8 -0
- package/dist/hooks/use-copilot-chat-suggestions.mjs.map +1 -0
- package/dist/hooks/use-copilot-chat.d.ts +92 -0
- package/dist/hooks/use-copilot-chat.js +978 -0
- package/dist/hooks/use-copilot-chat.js.map +1 -0
- package/dist/hooks/use-copilot-chat.mjs +21 -0
- package/dist/hooks/use-copilot-chat.mjs.map +1 -0
- package/dist/hooks/use-copilot-chat_internal.d.ts +244 -0
- package/dist/hooks/use-copilot-chat_internal.js +976 -0
- package/dist/hooks/use-copilot-chat_internal.js.map +1 -0
- package/dist/hooks/use-copilot-chat_internal.mjs +22 -0
- package/dist/hooks/use-copilot-chat_internal.mjs.map +1 -0
- package/dist/hooks/use-copilot-readable.d.ts +37 -0
- package/dist/hooks/use-copilot-readable.js +61 -0
- package/dist/hooks/use-copilot-readable.js.map +1 -0
- package/dist/hooks/use-copilot-readable.mjs +8 -0
- package/dist/hooks/use-copilot-readable.mjs.map +1 -0
- package/dist/hooks/use-copilot-runtime-client.d.ts +10 -0
- package/dist/hooks/use-copilot-runtime-client.js +203 -0
- package/dist/hooks/use-copilot-runtime-client.js.map +1 -0
- package/dist/hooks/use-copilot-runtime-client.mjs +9 -0
- package/dist/hooks/use-copilot-runtime-client.mjs.map +1 -0
- package/dist/hooks/use-default-tool.d.ts +8 -0
- package/dist/hooks/use-default-tool.js +302 -0
- package/dist/hooks/use-default-tool.js.map +1 -0
- package/dist/hooks/use-default-tool.mjs +12 -0
- package/dist/hooks/use-default-tool.mjs.map +1 -0
- package/dist/hooks/use-flat-category-store.d.ts +9 -0
- package/dist/hooks/use-flat-category-store.js +93 -0
- package/dist/hooks/use-flat-category-store.js.map +1 -0
- package/dist/hooks/use-flat-category-store.mjs +8 -0
- package/dist/hooks/use-flat-category-store.mjs.map +1 -0
- package/dist/hooks/use-frontend-tool.d.ts +11 -0
- package/dist/hooks/use-frontend-tool.js +104 -0
- package/dist/hooks/use-frontend-tool.js.map +1 -0
- package/dist/hooks/use-frontend-tool.mjs +8 -0
- package/dist/hooks/use-frontend-tool.mjs.map +1 -0
- package/dist/hooks/use-human-in-the-loop.d.ts +13 -0
- package/dist/hooks/use-human-in-the-loop.js +122 -0
- package/dist/hooks/use-human-in-the-loop.js.map +1 -0
- package/dist/hooks/use-human-in-the-loop.mjs +8 -0
- package/dist/hooks/use-human-in-the-loop.mjs.map +1 -0
- package/dist/hooks/use-langgraph-interrupt-render.d.ts +6 -0
- package/dist/hooks/use-langgraph-interrupt-render.js +318 -0
- package/dist/hooks/use-langgraph-interrupt-render.js.map +1 -0
- package/dist/hooks/use-langgraph-interrupt-render.mjs +14 -0
- package/dist/hooks/use-langgraph-interrupt-render.mjs.map +1 -0
- package/dist/hooks/use-langgraph-interrupt.d.ts +14 -0
- package/dist/hooks/use-langgraph-interrupt.js +201 -0
- package/dist/hooks/use-langgraph-interrupt.js.map +1 -0
- package/dist/hooks/use-langgraph-interrupt.mjs +10 -0
- package/dist/hooks/use-langgraph-interrupt.mjs.map +1 -0
- package/dist/hooks/use-lazy-tool-renderer.d.ts +6 -0
- package/dist/hooks/use-lazy-tool-renderer.js +53 -0
- package/dist/hooks/use-lazy-tool-renderer.js.map +1 -0
- package/dist/hooks/use-lazy-tool-renderer.mjs +8 -0
- package/dist/hooks/use-lazy-tool-renderer.mjs.map +1 -0
- package/dist/hooks/use-make-copilot-document-readable.d.ts +12 -0
- package/dist/hooks/use-make-copilot-document-readable.js +176 -0
- package/dist/hooks/use-make-copilot-document-readable.js.map +1 -0
- package/dist/hooks/use-make-copilot-document-readable.mjs +9 -0
- package/dist/hooks/use-make-copilot-document-readable.mjs.map +1 -0
- package/dist/hooks/use-render-tool-call.d.ts +12 -0
- package/dist/hooks/use-render-tool-call.js +90 -0
- package/dist/hooks/use-render-tool-call.js.map +1 -0
- package/dist/hooks/use-render-tool-call.mjs +8 -0
- package/dist/hooks/use-render-tool-call.mjs.map +1 -0
- package/dist/hooks/use-tree.d.ts +19 -0
- package/dist/hooks/use-tree.js +175 -0
- package/dist/hooks/use-tree.js.map +1 -0
- package/dist/hooks/use-tree.mjs +8 -0
- package/dist/hooks/use-tree.mjs.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +3528 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +149 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/copilot-task.d.ts +97 -0
- package/dist/lib/copilot-task.js +194 -0
- package/dist/lib/copilot-task.js.map +1 -0
- package/dist/lib/copilot-task.mjs +31 -0
- package/dist/lib/copilot-task.mjs.map +1 -0
- package/dist/lib/index.d.ts +11 -0
- package/dist/lib/index.js +196 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/index.mjs +32 -0
- package/dist/lib/index.mjs.map +1 -0
- package/dist/lib/status-checker.d.ts +17 -0
- package/dist/lib/status-checker.js +102 -0
- package/dist/lib/status-checker.js.map +1 -0
- package/dist/lib/status-checker.mjs +8 -0
- package/dist/lib/status-checker.mjs.map +1 -0
- package/dist/setupTests.d.ts +2 -0
- package/dist/setupTests.js +26 -0
- package/dist/setupTests.js.map +1 -0
- package/dist/setupTests.mjs +24 -0
- package/dist/setupTests.mjs.map +1 -0
- package/dist/types/chat-suggestion-configuration.d.ts +22 -0
- package/dist/types/chat-suggestion-configuration.js +19 -0
- package/dist/types/chat-suggestion-configuration.js.map +1 -0
- package/dist/types/chat-suggestion-configuration.mjs +1 -0
- package/dist/types/chat-suggestion-configuration.mjs.map +1 -0
- package/dist/types/coagent-action.d.ts +29 -0
- package/dist/types/coagent-action.js +19 -0
- package/dist/types/coagent-action.js.map +1 -0
- package/dist/types/coagent-action.mjs +1 -0
- package/dist/types/coagent-action.mjs.map +1 -0
- package/dist/types/coagent-state.d.ts +15 -0
- package/dist/types/coagent-state.js +19 -0
- package/dist/types/coagent-state.js.map +1 -0
- package/dist/types/coagent-state.mjs +1 -0
- package/dist/types/coagent-state.mjs.map +1 -0
- package/dist/types/crew.d.ts +79 -0
- package/dist/types/crew.js +19 -0
- package/dist/types/crew.js.map +1 -0
- package/dist/types/crew.mjs +2 -0
- package/dist/types/crew.mjs.map +1 -0
- package/dist/types/document-pointer.d.ts +9 -0
- package/dist/types/document-pointer.js +19 -0
- package/dist/types/document-pointer.js.map +1 -0
- package/dist/types/document-pointer.mjs +1 -0
- package/dist/types/document-pointer.mjs.map +1 -0
- package/dist/types/frontend-action.d.ts +127 -0
- package/dist/types/frontend-action.js +53 -0
- package/dist/types/frontend-action.js.map +1 -0
- package/dist/types/frontend-action.mjs +8 -0
- package/dist/types/frontend-action.mjs.map +1 -0
- package/dist/types/index.d.ts +12 -0
- package/dist/types/index.js +19 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/index.mjs +4 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/types/interrupt-action.d.ts +10 -0
- package/dist/types/interrupt-action.js +19 -0
- package/dist/types/interrupt-action.js.map +1 -0
- package/dist/types/interrupt-action.mjs +2 -0
- package/dist/types/interrupt-action.mjs.map +1 -0
- package/dist/types/system-message.d.ts +3 -0
- package/dist/types/system-message.js +19 -0
- package/dist/types/system-message.js.map +1 -0
- package/dist/types/system-message.mjs +1 -0
- package/dist/types/system-message.mjs.map +1 -0
- package/dist/utils/dev-console.d.ts +3 -0
- package/dist/utils/dev-console.js +41 -0
- package/dist/utils/dev-console.js.map +1 -0
- package/dist/utils/dev-console.mjs +8 -0
- package/dist/utils/dev-console.mjs.map +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +52 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/index.mjs +13 -0
- package/dist/utils/index.mjs.map +1 -0
- package/dist/utils/suggestions-constants.d.ts +9 -0
- package/dist/utils/suggestions-constants.js +35 -0
- package/dist/utils/suggestions-constants.js.map +1 -0
- package/dist/utils/suggestions-constants.mjs +8 -0
- package/dist/utils/suggestions-constants.mjs.map +1 -0
- package/dist/utils/utils.d.ts +2 -0
- package/dist/utils/utils.js +19 -0
- package/dist/utils/utils.js.map +1 -0
- package/dist/utils/utils.mjs +1 -0
- package/dist/utils/utils.mjs.map +1 -0
- package/dist/v2/index.css +4 -0
- package/dist/v2/index.css.map +1 -0
- package/dist/v2/index.d.ts +2 -0
- package/dist/v2/index.js +27 -0
- package/dist/v2/index.js.map +1 -0
- package/dist/v2/index.mjs +6 -0
- package/dist/v2/index.mjs.map +1 -0
- package/jest.config.js +25 -0
- package/package.json +92 -0
- package/src/components/CopilotListeners.tsx +81 -0
- package/src/components/copilot-provider/__tests__/copilotkit-error.test.tsx +75 -0
- package/src/components/copilot-provider/copilot-messages.tsx +274 -0
- package/src/components/copilot-provider/copilotkit-props.tsx +169 -0
- package/src/components/copilot-provider/copilotkit.tsx +671 -0
- package/src/components/copilot-provider/index.ts +3 -0
- package/src/components/dev-console/console-trigger.tsx +254 -0
- package/src/components/dev-console/developer-console-modal.tsx +866 -0
- package/src/components/dev-console/icons.tsx +101 -0
- package/src/components/error-boundary/error-boundary.tsx +91 -0
- package/src/components/error-boundary/error-utils.tsx +100 -0
- package/src/components/index.ts +1 -0
- package/src/components/toast/exclamation-mark-icon.tsx +27 -0
- package/src/components/toast/toast-provider.tsx +363 -0
- package/src/components/usage-banner.tsx +259 -0
- package/src/context/coagent-state-renders-context.tsx +76 -0
- package/src/context/copilot-context.tsx +332 -0
- package/src/context/copilot-messages-context.tsx +35 -0
- package/src/context/index.ts +16 -0
- package/src/context/threads-context.tsx +41 -0
- package/src/hooks/__tests__/use-coagent-config.test.ts +351 -0
- package/src/hooks/index.ts +34 -0
- package/src/hooks/use-agent-nodename.ts +30 -0
- package/src/hooks/use-coagent-state-render-bridge.tsx +293 -0
- package/src/hooks/use-coagent-state-render.ts +152 -0
- package/src/hooks/use-coagent.ts +366 -0
- package/src/hooks/use-configure-chat-suggestions.tsx +86 -0
- package/src/hooks/use-copilot-action.ts +236 -0
- package/src/hooks/use-copilot-additional-instructions.ts +85 -0
- package/src/hooks/use-copilot-authenticated-action.ts +70 -0
- package/src/hooks/use-copilot-chat-headless_c.ts +258 -0
- package/src/hooks/use-copilot-chat-suggestions.tsx +124 -0
- package/src/hooks/use-copilot-chat.ts +130 -0
- package/src/hooks/use-copilot-chat_internal.ts +696 -0
- package/src/hooks/use-copilot-readable.ts +135 -0
- package/src/hooks/use-copilot-runtime-client.ts +164 -0
- package/src/hooks/use-default-tool.ts +7 -0
- package/src/hooks/use-flat-category-store.ts +105 -0
- package/src/hooks/use-frontend-tool.ts +96 -0
- package/src/hooks/use-human-in-the-loop.ts +122 -0
- package/src/hooks/use-langgraph-interrupt-render.ts +136 -0
- package/src/hooks/use-langgraph-interrupt.ts +36 -0
- package/src/hooks/use-lazy-tool-renderer.tsx +30 -0
- package/src/hooks/use-make-copilot-document-readable.ts +30 -0
- package/src/hooks/use-render-tool-call.ts +80 -0
- package/src/hooks/use-tree.ts +207 -0
- package/src/index.tsx +7 -0
- package/src/lib/copilot-task.ts +201 -0
- package/src/lib/index.ts +1 -0
- package/src/lib/status-checker.ts +64 -0
- package/src/setupTests.ts +26 -0
- package/src/types/chat-suggestion-configuration.ts +23 -0
- package/src/types/coagent-action.ts +31 -0
- package/src/types/coagent-state.ts +13 -0
- package/src/types/crew.ts +89 -0
- package/src/types/document-pointer.ts +7 -0
- package/src/types/frontend-action.ts +202 -0
- package/src/types/index.ts +17 -0
- package/src/types/interrupt-action.ts +43 -0
- package/src/types/system-message.ts +4 -0
- package/src/utils/dev-console.ts +19 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/suggestions-constants.ts +8 -0
- package/src/utils/utils.test.ts +7 -0
- package/src/utils/utils.ts +8 -0
- package/src/v2/index.css +1 -0
- package/src/v2/index.ts +4 -0
- package/tsconfig.json +8 -0
- package/tsup.config.ts +16 -0
- package/typedoc.json +4 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An internal context to separate the messages state (which is constantly changing) from the rest of CopilotKit context
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
ReactNode,
|
|
7
|
+
useEffect,
|
|
8
|
+
useState,
|
|
9
|
+
useRef,
|
|
10
|
+
useCallback,
|
|
11
|
+
useMemo,
|
|
12
|
+
createContext,
|
|
13
|
+
useContext,
|
|
14
|
+
} from "react";
|
|
15
|
+
import { CopilotMessagesContext } from "../../context/copilot-messages-context";
|
|
16
|
+
import {
|
|
17
|
+
loadMessagesFromJsonRepresentation,
|
|
18
|
+
Message,
|
|
19
|
+
GraphQLError,
|
|
20
|
+
} from "@copilotkit/runtime-client-gql";
|
|
21
|
+
import { useCopilotContext } from "../../context/copilot-context";
|
|
22
|
+
import { useToast } from "../toast/toast-provider";
|
|
23
|
+
import { shouldShowDevConsole } from "../../utils/dev-console";
|
|
24
|
+
import {
|
|
25
|
+
ErrorVisibility,
|
|
26
|
+
CopilotKitApiDiscoveryError,
|
|
27
|
+
CopilotKitRemoteEndpointDiscoveryError,
|
|
28
|
+
CopilotKitAgentDiscoveryError,
|
|
29
|
+
CopilotKitError,
|
|
30
|
+
CopilotKitErrorCode,
|
|
31
|
+
} from "@copilotkit/shared";
|
|
32
|
+
import { Suggestion } from "@copilotkitnext/core";
|
|
33
|
+
|
|
34
|
+
// Helper to determine if error should show as banner based on visibility and legacy patterns
|
|
35
|
+
function shouldShowAsBanner(gqlError: GraphQLError): boolean {
|
|
36
|
+
const extensions = gqlError.extensions;
|
|
37
|
+
if (!extensions) return false;
|
|
38
|
+
|
|
39
|
+
// Priority 1: Check error code for discovery errors (these should always be banners)
|
|
40
|
+
const code = extensions.code as CopilotKitErrorCode;
|
|
41
|
+
if (
|
|
42
|
+
code === CopilotKitErrorCode.AGENT_NOT_FOUND ||
|
|
43
|
+
code === CopilotKitErrorCode.API_NOT_FOUND ||
|
|
44
|
+
code === CopilotKitErrorCode.REMOTE_ENDPOINT_NOT_FOUND ||
|
|
45
|
+
code === CopilotKitErrorCode.CONFIGURATION_ERROR ||
|
|
46
|
+
code === CopilotKitErrorCode.MISSING_PUBLIC_API_KEY_ERROR ||
|
|
47
|
+
code === CopilotKitErrorCode.UPGRADE_REQUIRED_ERROR
|
|
48
|
+
) {
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Priority 2: Check banner visibility
|
|
53
|
+
if (extensions.visibility === ErrorVisibility.BANNER) {
|
|
54
|
+
return true;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Priority 3: Check for critical errors that should be banners regardless of formal classification
|
|
58
|
+
const errorMessage = gqlError.message.toLowerCase();
|
|
59
|
+
if (
|
|
60
|
+
errorMessage.includes("api key") ||
|
|
61
|
+
errorMessage.includes("401") ||
|
|
62
|
+
errorMessage.includes("unauthorized") ||
|
|
63
|
+
errorMessage.includes("authentication") ||
|
|
64
|
+
errorMessage.includes("incorrect api key")
|
|
65
|
+
) {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
// Priority 4: Legacy stack trace detection for discovery errors
|
|
70
|
+
const originalError = extensions.originalError as any;
|
|
71
|
+
if (originalError?.stack) {
|
|
72
|
+
return (
|
|
73
|
+
originalError.stack.includes("CopilotApiDiscoveryError") ||
|
|
74
|
+
originalError.stack.includes("CopilotKitRemoteEndpointDiscoveryError") ||
|
|
75
|
+
originalError.stack.includes("CopilotKitAgentDiscoveryError")
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* MessagesTap is used to mitigate performance issues when we only need
|
|
84
|
+
* a snapshot of the messages, not a continuously updating stream of messages.
|
|
85
|
+
*/
|
|
86
|
+
|
|
87
|
+
export type MessagesTap = {
|
|
88
|
+
getMessagesFromTap: () => Message[];
|
|
89
|
+
updateTapMessages: (messages: Message[]) => void;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const MessagesTapContext = createContext<MessagesTap | null>(null);
|
|
93
|
+
|
|
94
|
+
export function useMessagesTap() {
|
|
95
|
+
const tap = useContext(MessagesTapContext);
|
|
96
|
+
if (!tap) throw new Error("useMessagesTap must be used inside <MessagesTapProvider>");
|
|
97
|
+
return tap;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function MessagesTapProvider({ children }: { children: React.ReactNode }) {
|
|
101
|
+
const messagesRef = useRef<Message[]>([]);
|
|
102
|
+
|
|
103
|
+
const tapRef = useRef<MessagesTap>({
|
|
104
|
+
getMessagesFromTap: () => messagesRef.current,
|
|
105
|
+
updateTapMessages: (messages: Message[]) => {
|
|
106
|
+
messagesRef.current = messages;
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<MessagesTapContext.Provider value={tapRef.current}>{children}</MessagesTapContext.Provider>
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* CopilotKit messages context.
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
export function CopilotMessages({ children }: { children: ReactNode }) {
|
|
120
|
+
const [messages, setMessages] = useState<Message[]>([]);
|
|
121
|
+
const lastLoadedThreadId = useRef<string>(undefined!);
|
|
122
|
+
const lastLoadedAgentName = useRef<string>(undefined!);
|
|
123
|
+
const lastLoadedMessages = useRef<string>(undefined!);
|
|
124
|
+
|
|
125
|
+
const { updateTapMessages } = useMessagesTap();
|
|
126
|
+
|
|
127
|
+
const { threadId, agentSession, showDevConsole, onError, copilotApiConfig } = useCopilotContext();
|
|
128
|
+
const { setBannerError } = useToast();
|
|
129
|
+
|
|
130
|
+
// Helper function to trace UI errors (similar to useCopilotRuntimeClient)
|
|
131
|
+
const traceUIError = useCallback(
|
|
132
|
+
async (error: CopilotKitError, originalError?: any) => {
|
|
133
|
+
// Just check if onError and publicApiKey are defined
|
|
134
|
+
if (!onError || !copilotApiConfig.publicApiKey) return;
|
|
135
|
+
|
|
136
|
+
try {
|
|
137
|
+
const traceEvent = {
|
|
138
|
+
type: "error" as const,
|
|
139
|
+
timestamp: Date.now(),
|
|
140
|
+
context: {
|
|
141
|
+
source: "ui" as const,
|
|
142
|
+
request: {
|
|
143
|
+
operation: "loadAgentState",
|
|
144
|
+
url: copilotApiConfig.chatApiEndpoint,
|
|
145
|
+
startTime: Date.now(),
|
|
146
|
+
},
|
|
147
|
+
technical: {
|
|
148
|
+
environment: "browser",
|
|
149
|
+
userAgent: typeof navigator !== "undefined" ? navigator.userAgent : undefined,
|
|
150
|
+
stackTrace: originalError instanceof Error ? originalError.stack : undefined,
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
error,
|
|
154
|
+
};
|
|
155
|
+
await onError(traceEvent);
|
|
156
|
+
} catch (traceError) {
|
|
157
|
+
console.error("Error in CopilotMessages onError handler:", traceError);
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
[onError, copilotApiConfig.publicApiKey, copilotApiConfig.chatApiEndpoint],
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
const createStructuredError = (gqlError: GraphQLError): CopilotKitError | null => {
|
|
164
|
+
const extensions = gqlError.extensions;
|
|
165
|
+
const originalError = extensions?.originalError as any;
|
|
166
|
+
|
|
167
|
+
// Priority: Check stack trace for discovery errors first
|
|
168
|
+
if (originalError?.stack) {
|
|
169
|
+
if (originalError.stack.includes("CopilotApiDiscoveryError")) {
|
|
170
|
+
return new CopilotKitApiDiscoveryError({ message: originalError.message });
|
|
171
|
+
}
|
|
172
|
+
if (originalError.stack.includes("CopilotKitRemoteEndpointDiscoveryError")) {
|
|
173
|
+
return new CopilotKitRemoteEndpointDiscoveryError({ message: originalError.message });
|
|
174
|
+
}
|
|
175
|
+
if (originalError.stack.includes("CopilotKitAgentDiscoveryError")) {
|
|
176
|
+
return new CopilotKitAgentDiscoveryError({
|
|
177
|
+
agentName: "",
|
|
178
|
+
availableAgents: [],
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Fallback: Use the formal error code if available
|
|
184
|
+
const message = originalError?.message || gqlError.message;
|
|
185
|
+
const code = extensions?.code as CopilotKitErrorCode;
|
|
186
|
+
|
|
187
|
+
if (code) {
|
|
188
|
+
return new CopilotKitError({ message, code });
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
return null;
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const handleGraphQLErrors = useCallback(
|
|
195
|
+
(error: any) => {
|
|
196
|
+
if (error.graphQLErrors?.length) {
|
|
197
|
+
const graphQLErrors = error.graphQLErrors as GraphQLError[];
|
|
198
|
+
|
|
199
|
+
// Route all errors to banners for consistent UI
|
|
200
|
+
const routeError = (gqlError: GraphQLError) => {
|
|
201
|
+
const extensions = gqlError.extensions;
|
|
202
|
+
const visibility = extensions?.visibility as ErrorVisibility;
|
|
203
|
+
const isDev = shouldShowDevConsole(showDevConsole);
|
|
204
|
+
|
|
205
|
+
if (!isDev) {
|
|
206
|
+
console.error("CopilotKit Error (hidden in production):", gqlError.message);
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
// Silent errors - just log
|
|
211
|
+
if (visibility === ErrorVisibility.SILENT) {
|
|
212
|
+
console.error("CopilotKit Silent Error:", gqlError.message);
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// All other errors (including DEV_ONLY) show as banners for consistency
|
|
217
|
+
const ckError = createStructuredError(gqlError);
|
|
218
|
+
if (ckError) {
|
|
219
|
+
setBannerError(ckError);
|
|
220
|
+
// Trace the structured error
|
|
221
|
+
traceUIError(ckError, gqlError);
|
|
222
|
+
} else {
|
|
223
|
+
// Fallback: create a generic error for unstructured GraphQL errors
|
|
224
|
+
const fallbackError = new CopilotKitError({
|
|
225
|
+
message: gqlError.message,
|
|
226
|
+
code: CopilotKitErrorCode.UNKNOWN,
|
|
227
|
+
});
|
|
228
|
+
setBannerError(fallbackError);
|
|
229
|
+
// Trace the fallback error
|
|
230
|
+
traceUIError(fallbackError, gqlError);
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
// Process all errors as banners
|
|
235
|
+
graphQLErrors.forEach(routeError);
|
|
236
|
+
} else {
|
|
237
|
+
const isDev = shouldShowDevConsole(showDevConsole);
|
|
238
|
+
if (!isDev) {
|
|
239
|
+
console.error("CopilotKit Error (hidden in production):", error);
|
|
240
|
+
} else {
|
|
241
|
+
// Route non-GraphQL errors to banner as well
|
|
242
|
+
const fallbackError = new CopilotKitError({
|
|
243
|
+
message: error?.message || String(error),
|
|
244
|
+
code: CopilotKitErrorCode.UNKNOWN,
|
|
245
|
+
});
|
|
246
|
+
setBannerError(fallbackError);
|
|
247
|
+
// Trace the non-GraphQL error
|
|
248
|
+
traceUIError(fallbackError, error);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
[setBannerError, showDevConsole, traceUIError],
|
|
253
|
+
);
|
|
254
|
+
|
|
255
|
+
useEffect(() => {
|
|
256
|
+
updateTapMessages(messages);
|
|
257
|
+
}, [messages, updateTapMessages]);
|
|
258
|
+
|
|
259
|
+
const memoizedChildren = useMemo(() => children, [children]);
|
|
260
|
+
const [suggestions, setSuggestions] = useState<Suggestion[]>([]);
|
|
261
|
+
|
|
262
|
+
return (
|
|
263
|
+
<CopilotMessagesContext.Provider
|
|
264
|
+
value={{
|
|
265
|
+
messages,
|
|
266
|
+
setMessages,
|
|
267
|
+
suggestions,
|
|
268
|
+
setSuggestions,
|
|
269
|
+
}}
|
|
270
|
+
>
|
|
271
|
+
{memoizedChildren}
|
|
272
|
+
</CopilotMessagesContext.Provider>
|
|
273
|
+
);
|
|
274
|
+
}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { ForwardedParametersInput } from "@copilotkit/runtime-client-gql";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
import { AuthState } from "../../context/copilot-context";
|
|
4
|
+
import { CopilotErrorHandler } from "@copilotkit/shared";
|
|
5
|
+
import { CopilotKitProviderProps } from "@copilotkitnext/react";
|
|
6
|
+
/**
|
|
7
|
+
* Props for CopilotKit.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* We shouldn't need this `Omit` here, but using it because `CopilotKitProps`
|
|
12
|
+
* and `CopilotKitProviderProps` have non-identical `children` types
|
|
13
|
+
*
|
|
14
|
+
* TODO: Remove this `Omit` once this is resolved.
|
|
15
|
+
*/
|
|
16
|
+
export interface CopilotKitProps extends Omit<CopilotKitProviderProps, "children"> {
|
|
17
|
+
/**
|
|
18
|
+
* Your Copilot Cloud API key.
|
|
19
|
+
*
|
|
20
|
+
* Don't have it yet? Go to https://cloud.copilotkit.ai and get one for free.
|
|
21
|
+
*/
|
|
22
|
+
publicApiKey?: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Your public license key for accessing premium CopilotKit features.
|
|
26
|
+
*
|
|
27
|
+
* Don't have it yet? Go to https://cloud.copilotkit.ai and get one for free.
|
|
28
|
+
*/
|
|
29
|
+
publicLicenseKey?: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Restrict input to a specific topic.
|
|
33
|
+
* @deprecated Use `guardrails_c` instead to control input restrictions
|
|
34
|
+
*/
|
|
35
|
+
cloudRestrictToTopic?: {
|
|
36
|
+
validTopics?: string[];
|
|
37
|
+
invalidTopics?: string[];
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Restrict input to specific topics using guardrails.
|
|
42
|
+
* @remarks
|
|
43
|
+
*
|
|
44
|
+
* This feature is only available when using CopilotKit's hosted cloud service. To use this feature, sign up at https://cloud.copilotkit.ai to get your publicApiKey. The feature allows restricting chat conversations to specific topics.
|
|
45
|
+
*/
|
|
46
|
+
guardrails_c?: {
|
|
47
|
+
validTopics?: string[];
|
|
48
|
+
invalidTopics?: string[];
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The endpoint for the Copilot Runtime instance. [Click here for more information](/concepts/copilot-runtime).
|
|
53
|
+
*/
|
|
54
|
+
runtimeUrl?: string;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The endpoint for the Copilot transcribe audio service.
|
|
58
|
+
*/
|
|
59
|
+
transcribeAudioUrl?: string;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The endpoint for the Copilot text to speech service.
|
|
63
|
+
*/
|
|
64
|
+
textToSpeechUrl?: string;
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Additional headers to be sent with the request.
|
|
68
|
+
*
|
|
69
|
+
* For example:
|
|
70
|
+
* ```json
|
|
71
|
+
* {
|
|
72
|
+
* "Authorization": "Bearer X"
|
|
73
|
+
* }
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
headers?: Record<string, string>;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The children to be rendered within the CopilotKit.
|
|
80
|
+
*/
|
|
81
|
+
children: ReactNode;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Custom properties to be sent with the request.
|
|
85
|
+
* Can include threadMetadata for thread creation and authorization for LangGraph Platform authentication.
|
|
86
|
+
* For example:
|
|
87
|
+
* ```js
|
|
88
|
+
* {
|
|
89
|
+
* 'user_id': 'users_id',
|
|
90
|
+
* 'authorization': 'your-auth-token', // For LangGraph Platform authentication
|
|
91
|
+
* threadMetadata: {
|
|
92
|
+
* 'account_id': '123',
|
|
93
|
+
* 'user_type': 'premium'
|
|
94
|
+
* }
|
|
95
|
+
* }
|
|
96
|
+
* ```
|
|
97
|
+
*
|
|
98
|
+
* **Note**: The `authorization` property is automatically forwarded to LangGraph agents. See the [LangGraph Agent Authentication Guide](/coagents/shared/guides/langgraph-platform-authentication) for details.
|
|
99
|
+
*/
|
|
100
|
+
properties?: Record<string, any>;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Indicates whether the user agent should send or receive cookies from the other domain
|
|
104
|
+
* in the case of cross-origin requests.
|
|
105
|
+
*/
|
|
106
|
+
credentials?: RequestCredentials;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Whether to show the dev console.
|
|
110
|
+
*
|
|
111
|
+
* Set to `true` to show error banners and toasts, `false` to hide all error UI.
|
|
112
|
+
* Defaults to `false` for production safety.
|
|
113
|
+
*/
|
|
114
|
+
showDevConsole?: boolean;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The name of the agent to use.
|
|
118
|
+
*/
|
|
119
|
+
agent?: string;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* The forwarded parameters to use for the task.
|
|
123
|
+
*/
|
|
124
|
+
forwardedParameters?: Pick<ForwardedParametersInput, "temperature">;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* The auth config to use for the CopilotKit.
|
|
128
|
+
* @remarks
|
|
129
|
+
*
|
|
130
|
+
* This feature is only available when using CopilotKit's hosted cloud service. To use this feature, sign up at https://cloud.copilotkit.ai to get your publicApiKey. The feature allows restricting chat conversations to specific topics.
|
|
131
|
+
*/
|
|
132
|
+
authConfig_c?: {
|
|
133
|
+
SignInComponent: React.ComponentType<{
|
|
134
|
+
onSignInComplete: (authState: AuthState) => void;
|
|
135
|
+
}>;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* The thread id to use for the CopilotKit.
|
|
140
|
+
*/
|
|
141
|
+
threadId?: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Optional error handler for comprehensive debugging and observability.
|
|
145
|
+
*
|
|
146
|
+
* **Requires publicApiKey**: Error handling only works when publicApiKey is provided.
|
|
147
|
+
* This is a premium Copilot Cloud feature.
|
|
148
|
+
*
|
|
149
|
+
* @param errorEvent - Structured error event with rich debugging context
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```typescript
|
|
153
|
+
* <CopilotKit
|
|
154
|
+
* publicApiKey="ck_pub_your_key"
|
|
155
|
+
* onError={(errorEvent) => {
|
|
156
|
+
* debugDashboard.capture(errorEvent);
|
|
157
|
+
* }}
|
|
158
|
+
* >
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
161
|
+
onError?: CopilotErrorHandler;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Enable or disable the CopilotKit Inspector, letting you inspect AG-UI events,
|
|
165
|
+
* view agent messages, check agent state, and visualize agent context. Defaults
|
|
166
|
+
* to enabled.
|
|
167
|
+
*/
|
|
168
|
+
enableInspector?: boolean;
|
|
169
|
+
}
|