@copilotkit/react-core 2.0.0-rc.63 → 2.0.0-rc.65

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/dist/index.cjs CHANGED
@@ -715,9 +715,18 @@ function useToolCallRendererNames() {
715
715
  * Hook that returns a function to render tool calls based on the render functions
716
716
  * defined in CopilotKitProvider.
717
717
  *
718
+ * @param removedArguments - None. In 1.x, `useRenderToolCall(tool, deps)`
719
+ * registered a renderer for a tool. That call throws a
720
+ * `CopilotKitRemovedApiError` in 2.0: register a renderer with `useRenderTool`.
721
+ * See https://docs.copilotkit.ai/migrate/removed-apis-2.0#userendertoolcall-with-arguments
718
722
  * @returns A function that takes a tool call and optional tool message and returns the rendered component
719
723
  */
720
- function useRenderToolCall() {
724
+ function useRenderToolCall(...removedArguments) {
725
+ if (removedArguments.length > 0) throw new _copilotkit_shared.CopilotKitRemovedApiError({
726
+ what: "\"useRenderToolCall(tool, deps)\"",
727
+ use: "To register a renderer for a tool, use useRenderTool from @copilotkit/react-core. useRenderToolCall() takes no arguments: it returns a function that renders a tool call.",
728
+ docs: "/migrate/removed-apis-2.0#userendertoolcall-with-arguments"
729
+ });
721
730
  const { copilotkit, executingToolCallIds } = (0, _copilotkit_react_core_context.useCopilotKit)();
722
731
  const agentId = (0, _copilotkit_core.ɵresolveToolCallAgentId)(require_chat.useCopilotChatConfiguration()?.agentId, void 0);
723
732
  const unrenderedToolNames = (0, react.useRef)(/* @__PURE__ */ new Set());
@@ -805,7 +814,7 @@ function ɵuseOwnedCore(ref, create) {
805
814
 
806
815
  //#endregion
807
816
  //#region package.json
808
- var version$1 = "2.0.0-rc.63";
817
+ var version$1 = "2.0.0-rc.65";
809
818
 
810
819
  //#endregion
811
820
  //#region src/components/CopilotKitInspector.tsx
@@ -1335,7 +1344,8 @@ function useStableArrayProp(prop, name) {
1335
1344
  return value;
1336
1345
  }
1337
1346
  /** Provide a shared core instance and synchronize runtime, tool, and UI configuration. */
1338
- const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY_HEADERS, credentials, nonce, injectStyles = true, messageFilter, publicApiKey, publicLicenseKey, properties = EMPTY_PROPERTIES, agents__unsafe_dev_only: agents = EMPTY_AGENTS, selfManagedAgents = EMPTY_AGENTS, renderToolCalls, renderActivityMessages, renderCustomMessages, markdownRenderer, frontendTools, humanInTheLoop, openGenerativeUI, enableInspector, agentId, showIntelligenceIndicator = true, useSingleEndpoint, onError, generativeUI, a2ui, mcpApps, defaultThrottleMs, debug, learning }) => {
1347
+ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY_HEADERS, credentials, nonce, injectStyles = true, messageFilter, publicApiKey, publicLicenseKey, properties = EMPTY_PROPERTIES, agents__unsafe_dev_only: agents = EMPTY_AGENTS, selfManagedAgents = EMPTY_AGENTS, renderToolCalls, renderActivityMessages, renderCustomMessages, markdownRenderer, frontendTools, humanInTheLoop, openGenerativeUI, enableInspector, agentId, showIntelligenceIndicator = true, useSingleEndpoint, onError, generativeUI, a2ui, mcpApps, defaultThrottleMs, debug, learning, ...otherProps }) => {
1348
+ (0, _copilotkit_core.ɵcheckRemovedProviderProps)(otherProps);
1339
1349
  const learningConfig = (0, react.useMemo)(() => (0, _copilotkit_core.ɵtoLearningConfig)(learning), [learning]);
1340
1350
  const [shouldRenderInspector, setShouldRenderInspector] = (0, react.useState)(false);
1341
1351
  const [inspectorVisible, setInspectorVisible] = (0, react.useState)(false);
@@ -1829,6 +1839,7 @@ function useDepsVersion(deps) {
1829
1839
  * ```
1830
1840
  */
1831
1841
  function useFrontendTool(tool, deps) {
1842
+ (0, _copilotkit_core.ɵcheckToolParameters)("useFrontendTool", tool.parameters);
1832
1843
  const { copilotkit } = (0, _copilotkit_react_core_context.useCopilotKit)();
1833
1844
  const depsVersion = useDepsVersion(deps);
1834
1845
  (0, react.useLayoutEffect)(() => {
@@ -2561,6 +2572,7 @@ function DefaultToolCallRenderer({ name, toolCallId, parameters, status, result
2561
2572
  //#endregion
2562
2573
  //#region src/hooks/use-human-in-the-loop.tsx
2563
2574
  function useHumanInTheLoop(tool, deps) {
2575
+ (0, _copilotkit_core.ɵcheckToolParameters)("useHumanInTheLoop", tool.parameters);
2564
2576
  const { copilotkit } = (0, _copilotkit_react_core_context.useCopilotKit)();
2565
2577
  const registry = copilotkit.ɵhumanInTheLoop;
2566
2578
  const RenderComponent = (0, react.useCallback)((props) => react.default.createElement(tool.render, (0, _copilotkit_core.ɵhitlRenderProps)(props, tool, registry)), [
@@ -2900,6 +2912,11 @@ function useInterrupt(config) {
2900
2912
  * `deleteThread`) return promises that resolve once the platform confirms the
2901
2913
  * operation and reject with an `Error` on failure.
2902
2914
  *
2915
+ * In 1.x, `useThreads()` returned the current thread. A call without
2916
+ * arguments throws a `CopilotKitRemovedApiError`, and so does a read of
2917
+ * `threadId`, `setThreadId`, or `isThreadIdExplicit` on the result. Read the
2918
+ * current thread from `useCopilotChatConfiguration()`.
2919
+ *
2903
2920
  * @param input - Agent identifier and optional list controls.
2904
2921
  * @returns Thread list state and stable mutation callbacks.
2905
2922
  *
@@ -2928,7 +2945,9 @@ function useInterrupt(config) {
2928
2945
  * }
2929
2946
  * ```
2930
2947
  */
2931
- function useThreads({ agentId, includeArchived, limit, enabled = true }) {
2948
+ function useThreads(input) {
2949
+ checkThreadsInput(input);
2950
+ const { agentId, includeArchived, limit, enabled = true } = input;
2932
2951
  const { copilotkit } = (0, _copilotkit_react_core_context.useCopilotKit)();
2933
2952
  const [controller] = (0, react.useState)(() => new _copilotkit_core.ɵThreadsController((0, _copilotkit_core.ɵcreateThreadStore)({ fetch: copilotkit.ɵruntimeFetch }), {
2934
2953
  core: copilotkit,
@@ -2962,7 +2981,7 @@ function useThreads({ agentId, includeArchived, limit, enabled = true }) {
2962
2981
  copilotkit.threadEndpoints?.mutations
2963
2982
  ]);
2964
2983
  const { fetchMoreThreads, refetchThreads, startNewThread, renameThread, archiveThread, unarchiveThread, deleteThread } = controller;
2965
- return {
2984
+ return withRemovedThreadFields({
2966
2985
  threads,
2967
2986
  isLoading,
2968
2987
  error,
@@ -2978,7 +2997,42 @@ function useThreads({ agentId, includeArchived, limit, enabled = true }) {
2978
2997
  archiveThread,
2979
2998
  unarchiveThread,
2980
2999
  deleteThread
2981
- };
3000
+ });
3001
+ }
3002
+ const USE_THREADS_SECTION = "/migrate/removed-apis-2.0#usethreads";
3003
+ /** Throws for the 1.x call `useThreads()`, which has no input. */
3004
+ function checkThreadsInput(input) {
3005
+ if (input !== void 0) return;
3006
+ throw new _copilotkit_shared.CopilotKitRemovedApiError({
3007
+ what: "\"useThreads()\" without arguments",
3008
+ use: "useThreads({ agentId }) lists the threads of an agent. To read or set the current thread, use useCopilotChatConfiguration() from @copilotkit/react-core.",
3009
+ docs: USE_THREADS_SECTION
3010
+ });
3011
+ }
3012
+ /** The fields of the 1.x `useThreads()` result, and what to use in 2.0. */
3013
+ const REMOVED_THREAD_FIELDS = {
3014
+ threadId: "Read threadId from useCopilotChatConfiguration() of @copilotkit/react-core.",
3015
+ setThreadId: "Call setActiveThreadId(threadId) on useCopilotChatConfiguration() of @copilotkit/react-core.",
3016
+ isThreadIdExplicit: "Read hasExplicitThreadId from useCopilotChatConfiguration() of @copilotkit/react-core."
3017
+ };
3018
+ /**
3019
+ * Adds a getter that throws a `CopilotKitRemovedApiError` for each field of
3020
+ * the 1.x result. The getters are not enumerable, so a spread, a JSON copy,
3021
+ * or devtools do not call them.
3022
+ */
3023
+ function withRemovedThreadFields(result) {
3024
+ const fields = Object.entries(REMOVED_THREAD_FIELDS);
3025
+ for (const [field, use] of fields) Object.defineProperty(result, field, {
3026
+ enumerable: false,
3027
+ get() {
3028
+ throw new _copilotkit_shared.CopilotKitRemovedApiError({
3029
+ what: `"${field}" from useThreads`,
3030
+ use: `${use} useThreads({ agentId }) lists the threads of an agent.`,
3031
+ docs: USE_THREADS_SECTION
3032
+ });
3033
+ }
3034
+ });
3035
+ return result;
2982
3036
  }
2983
3037
 
2984
3038
  //#endregion
@@ -8119,6 +8173,159 @@ const WildcardToolCallRender = require_chat.defineToolCallRenderer({
8119
8173
  render: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DefaultToolCallRenderer, { ...adaptRendererProps(props) })
8120
8174
  });
8121
8175
 
8176
+ //#endregion
8177
+ //#region src/removed-exports.ts
8178
+ /** @deprecated "CoAgentStateRendersProvider" was removed in CopilotKit 2.0. Delete it. Render agent.state from useAgent from @copilotkit/react-core in your component. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8179
+ const CoAgentStateRendersProvider = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8180
+ name: "CoAgentStateRendersProvider",
8181
+ use: "Delete it. Render agent.state from useAgent from @copilotkit/react-core in your component.",
8182
+ docs: "/migrate/v2#hook-mapping"
8183
+ });
8184
+ /** @deprecated "CopilotTask" was removed in CopilotKit 2.0. Run the agent from code: add a message with agent.addMessage from useAgent, then call copilotkit.runAgent({ agent }) from useCopilotKit, both from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/programmatic-control#sending-a-message-from-code */
8185
+ const CopilotTask = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8186
+ name: "CopilotTask",
8187
+ use: "Run the agent from code: add a message with agent.addMessage from useAgent, then call copilotkit.runAgent({ agent }) from useCopilotKit, both from @copilotkit/react-core.",
8188
+ docs: "/programmatic-control#sending-a-message-from-code"
8189
+ });
8190
+ /** @deprecated "createA2UIMessageRenderer" was removed in CopilotKit 2.0. The A2UI v0.9 renderer was removed, and CopilotKitProvider renders A2UI with generative UI. Pass generativeUI={{ ui }} with a UI from createGenerativeUI in @copilotkit/react-core/generative-ui. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/generative-ui-2.0#a2ui-v09-renderer */
8191
+ const createA2UIMessageRenderer = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8192
+ name: "createA2UIMessageRenderer",
8193
+ use: "The A2UI v0.9 renderer was removed, and CopilotKitProvider renders A2UI with generative UI. Pass generativeUI={{ ui }} with a UI from createGenerativeUI in @copilotkit/react-core/generative-ui.",
8194
+ docs: "/migrate/generative-ui-2.0#a2ui-v09-renderer"
8195
+ });
8196
+ /** @deprecated "shouldShowDevConsole" was removed in CopilotKit 2.0. Delete the call. To turn the Inspector on or off, set enableInspector on CopilotKitProvider. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/removed-apis-2.0#showdevconsole */
8197
+ const shouldShowDevConsole = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8198
+ name: "shouldShowDevConsole",
8199
+ use: "Delete the call. To turn the Inspector on or off, set enableInspector on CopilotKitProvider.",
8200
+ docs: "/migrate/removed-apis-2.0#showdevconsole"
8201
+ });
8202
+ /** @deprecated "ThreadsProvider" was removed in CopilotKit 2.0. Delete it. Pass threadId to CopilotChat (or to CopilotChatConfigurationProvider around the chat), and list the threads with useThreads, from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/chat-2.0#thread-lists */
8203
+ const ThreadsProvider = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8204
+ name: "ThreadsProvider",
8205
+ use: "Delete it. Pass threadId to CopilotChat (or to CopilotChatConfigurationProvider around the chat), and list the threads with useThreads, from @copilotkit/react-core.",
8206
+ docs: "/migrate/chat-2.0#thread-lists"
8207
+ });
8208
+ /** @deprecated "useCoAgent" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8209
+ const useCoAgent = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8210
+ name: "useCoAgent",
8211
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
8212
+ docs: "/migrate/v2#hook-mapping"
8213
+ });
8214
+ /** @deprecated "useCoAgentStateRender" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core, and render agent.state in your component. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8215
+ const useCoAgentStateRender = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8216
+ name: "useCoAgentStateRender",
8217
+ use: "Use useAgent from @copilotkit/react-core, and render agent.state in your component.",
8218
+ docs: "/migrate/v2#hook-mapping"
8219
+ });
8220
+ /** @deprecated "useCoAgentStateRenders" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core, and render agent.state in your component. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8221
+ const useCoAgentStateRenders = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8222
+ name: "useCoAgentStateRenders",
8223
+ use: "Use useAgent from @copilotkit/react-core, and render agent.state in your component.",
8224
+ docs: "/migrate/v2#hook-mapping"
8225
+ });
8226
+ /** @deprecated "useCopilotAction" was removed in CopilotKit 2.0. Use useFrontendTool from @copilotkit/react-core (parameters are now a Zod 4 / Standard Schema), or useHumanInTheLoop when the action waits for the user. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8227
+ const useCopilotAction = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8228
+ name: "useCopilotAction",
8229
+ use: "Use useFrontendTool from @copilotkit/react-core (parameters are now a Zod 4 / Standard Schema), or useHumanInTheLoop when the action waits for the user.",
8230
+ docs: "/migrate/v2#hook-mapping"
8231
+ });
8232
+ /** @deprecated "useCopilotAdditionalInstructions" was removed in CopilotKit 2.0. Use useAgentContext from @copilotkit/react-core to give the agent the instructions. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8233
+ const useCopilotAdditionalInstructions = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8234
+ name: "useCopilotAdditionalInstructions",
8235
+ use: "Use useAgentContext from @copilotkit/react-core to give the agent the instructions.",
8236
+ docs: "/migrate/v2#hook-mapping"
8237
+ });
8238
+ /** @deprecated "useCopilotAuthenticatedAction_c" was removed in CopilotKit 2.0. Use useFrontendTool from @copilotkit/react-core, and check the user in its handler. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8239
+ const useCopilotAuthenticatedAction_c = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8240
+ name: "useCopilotAuthenticatedAction_c",
8241
+ use: "Use useFrontendTool from @copilotkit/react-core, and check the user in its handler.",
8242
+ docs: "/migrate/v2#hook-mapping"
8243
+ });
8244
+ /** @deprecated "useCopilotChat" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core. It returns the agent with its messages. For a chat UI of your own, see Headless UI. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8245
+ const useCopilotChat = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8246
+ name: "useCopilotChat",
8247
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent with its messages. For a chat UI of your own, see Headless UI.",
8248
+ docs: "/migrate/v2#hook-mapping"
8249
+ });
8250
+ /** @deprecated "useCopilotChatHeadless_c" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8251
+ const useCopilotChatHeadless_c = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8252
+ name: "useCopilotChatHeadless_c",
8253
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
8254
+ docs: "/migrate/v2#hook-mapping"
8255
+ });
8256
+ /** @deprecated "useCopilotChatInternal" was removed in CopilotKit 2.0. Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8257
+ const useCopilotChatInternal = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8258
+ name: "useCopilotChatInternal",
8259
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
8260
+ docs: "/migrate/v2#hook-mapping"
8261
+ });
8262
+ /** @deprecated "useCopilotChatSuggestions" was removed in CopilotKit 2.0. Use useConfigureSuggestions from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8263
+ const useCopilotChatSuggestions = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8264
+ name: "useCopilotChatSuggestions",
8265
+ use: "Use useConfigureSuggestions from @copilotkit/react-core.",
8266
+ docs: "/migrate/v2#hook-mapping"
8267
+ });
8268
+ /** @deprecated "useCopilotContext" was removed in CopilotKit 2.0. Use useCopilotKit from @copilotkit/react-core. It returns the CopilotKit core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/programmatic-control#sending-a-message-from-code */
8269
+ const useCopilotContext = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8270
+ name: "useCopilotContext",
8271
+ use: "Use useCopilotKit from @copilotkit/react-core. It returns the CopilotKit core.",
8272
+ docs: "/programmatic-control#sending-a-message-from-code"
8273
+ });
8274
+ /** @deprecated "useCopilotMessagesContext" was removed in CopilotKit 2.0. Read agent.messages from useAgent from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8275
+ const useCopilotMessagesContext = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8276
+ name: "useCopilotMessagesContext",
8277
+ use: "Read agent.messages from useAgent from @copilotkit/react-core.",
8278
+ docs: "/migrate/v2#hook-mapping"
8279
+ });
8280
+ /** @deprecated "useCopilotReadable" was removed in CopilotKit 2.0. Use useAgentContext from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8281
+ const useCopilotReadable = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8282
+ name: "useCopilotReadable",
8283
+ use: "Use useAgentContext from @copilotkit/react-core.",
8284
+ docs: "/migrate/v2#hook-mapping"
8285
+ });
8286
+ /** @deprecated "useCopilotRuntimeClient" was removed in CopilotKit 2.0. CopilotKit 2.0 has no GraphQL runtime client. Use useAgent or useCopilotKit from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#update-the-runtime */
8287
+ const useCopilotRuntimeClient = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8288
+ name: "useCopilotRuntimeClient",
8289
+ use: "CopilotKit 2.0 has no GraphQL runtime client. Use useAgent or useCopilotKit from @copilotkit/react-core.",
8290
+ docs: "/migrate/v2#update-the-runtime"
8291
+ });
8292
+ /** @deprecated "useDefaultTool" was removed in CopilotKit 2.0. Use useDefaultRenderTool from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8293
+ const useDefaultTool = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8294
+ name: "useDefaultTool",
8295
+ use: "Use useDefaultRenderTool from @copilotkit/react-core.",
8296
+ docs: "/migrate/v2#hook-mapping"
8297
+ });
8298
+ /** @deprecated "useLangGraphInterrupt" was removed in CopilotKit 2.0. Use useInterrupt from @copilotkit/react-core. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8299
+ const useLangGraphInterrupt = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8300
+ name: "useLangGraphInterrupt",
8301
+ use: "Use useInterrupt from @copilotkit/react-core.",
8302
+ docs: "/migrate/v2#hook-mapping"
8303
+ });
8304
+ /** @deprecated "useLazyToolRenderer" was removed in CopilotKit 2.0. Use useRenderToolCall from @copilotkit/react-core. It returns a function that renders a tool call. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#gotchas */
8305
+ const useLazyToolRenderer = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8306
+ name: "useLazyToolRenderer",
8307
+ use: "Use useRenderToolCall from @copilotkit/react-core. It returns a function that renders a tool call.",
8308
+ docs: "/migrate/v2#gotchas"
8309
+ });
8310
+ /** @deprecated "useLearningContainers" was removed in CopilotKit 2.0. Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/chat-2.0#removed-exports */
8311
+ const useLearningContainers = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8312
+ name: "useLearningContainers",
8313
+ use: "Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime.",
8314
+ docs: "/migrate/chat-2.0#removed-exports"
8315
+ });
8316
+ /** @deprecated "useLearningContainersInCurrentThread" was removed in CopilotKit 2.0. Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/chat-2.0#removed-exports */
8317
+ const useLearningContainersInCurrentThread = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8318
+ name: "useLearningContainersInCurrentThread",
8319
+ use: "Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime.",
8320
+ docs: "/migrate/chat-2.0#removed-exports"
8321
+ });
8322
+ /** @deprecated "useMakeCopilotDocumentReadable" was removed in CopilotKit 2.0. Use useAgentContext from @copilotkit/react-core, with the document text as the value. Run `npx codemod @copilotkit/v2-migration` to update your code. See https://docs.copilotkit.ai/migrate/v2#hook-mapping */
8323
+ const useMakeCopilotDocumentReadable = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8324
+ name: "useMakeCopilotDocumentReadable",
8325
+ use: "Use useAgentContext from @copilotkit/react-core, with the document text as the value.",
8326
+ docs: "/migrate/v2#hook-mapping"
8327
+ });
8328
+
8122
8329
  //#endregion
8123
8330
  Object.defineProperty(exports, 'A2UI_FENCE_LANGUAGE', {
8124
8331
  enumerable: true,
@@ -8270,6 +8477,7 @@ Object.defineProperty(exports, 'BaseMessageSchema', {
8270
8477
  return _ag_ui_core_schemas.BaseMessageSchema;
8271
8478
  }
8272
8479
  });
8480
+ exports.CoAgentStateRendersProvider = CoAgentStateRendersProvider;
8273
8481
  Object.defineProperty(exports, 'CompatibilityBoundary', {
8274
8482
  enumerable: true,
8275
8483
  get: function () {
@@ -8373,6 +8581,7 @@ Object.defineProperty(exports, 'CopilotSidebarView', {
8373
8581
  return CopilotSidebarView;
8374
8582
  }
8375
8583
  });
8584
+ exports.CopilotTask = CopilotTask;
8376
8585
  exports.CopilotThreadsDrawer = CopilotThreadsDrawer;
8377
8586
  Object.defineProperty(exports, 'CopyOperationSchema', {
8378
8587
  enumerable: true,
@@ -9022,6 +9231,7 @@ Object.defineProperty(exports, 'TextPartSchema', {
9022
9231
  return _ag_ui_core_schemas.TextPartSchema;
9023
9232
  }
9024
9233
  });
9234
+ exports.ThreadsProvider = ThreadsProvider;
9025
9235
  Object.defineProperty(exports, 'TokenUsageSchema', {
9026
9236
  enumerable: true,
9027
9237
  get: function () {
@@ -9198,6 +9408,7 @@ Object.defineProperty(exports, 'convertToLegacyEvents', {
9198
9408
  return _ag_ui_client.convertToLegacyEvents;
9199
9409
  }
9200
9410
  });
9411
+ exports.createA2UIMessageRenderer = createA2UIMessageRenderer;
9201
9412
  Object.defineProperty(exports, 'createActionGroup', {
9202
9413
  enumerable: true,
9203
9414
  get: function () {
@@ -9484,6 +9695,7 @@ Object.defineProperty(exports, 'select', {
9484
9695
  return _copilotkit_core.select;
9485
9696
  }
9486
9697
  });
9698
+ exports.shouldShowDevConsole = shouldShowDevConsole;
9487
9699
  Object.defineProperty(exports, 'splitA2UIMarkdown', {
9488
9700
  enumerable: true,
9489
9701
  get: function () {
@@ -9524,28 +9736,48 @@ exports.useAgent = useAgent;
9524
9736
  exports.useAgentContext = useAgentContext;
9525
9737
  exports.useAttachments = useAttachments;
9526
9738
  exports.useCapabilities = useCapabilities;
9739
+ exports.useCoAgent = useCoAgent;
9740
+ exports.useCoAgentStateRender = useCoAgentStateRender;
9741
+ exports.useCoAgentStateRenders = useCoAgentStateRenders;
9527
9742
  exports.useComponent = useComponent;
9528
9743
  exports.useConfigureSuggestions = useConfigureSuggestions;
9744
+ exports.useCopilotAction = useCopilotAction;
9745
+ exports.useCopilotAdditionalInstructions = useCopilotAdditionalInstructions;
9746
+ exports.useCopilotAuthenticatedAction_c = useCopilotAuthenticatedAction_c;
9747
+ exports.useCopilotChat = useCopilotChat;
9529
9748
  exports.useCopilotChatConfiguration = require_chat.useCopilotChatConfiguration;
9749
+ exports.useCopilotChatHeadless_c = useCopilotChatHeadless_c;
9750
+ exports.useCopilotChatInternal = useCopilotChatInternal;
9751
+ exports.useCopilotChatSuggestions = useCopilotChatSuggestions;
9752
+ exports.useCopilotContext = useCopilotContext;
9530
9753
  Object.defineProperty(exports, 'useCopilotKit', {
9531
9754
  enumerable: true,
9532
9755
  get: function () {
9533
9756
  return _copilotkit_react_core_context.useCopilotKit;
9534
9757
  }
9535
9758
  });
9759
+ exports.useCopilotMessagesContext = useCopilotMessagesContext;
9760
+ exports.useCopilotReadable = useCopilotReadable;
9761
+ exports.useCopilotRuntimeClient = useCopilotRuntimeClient;
9536
9762
  exports.useDefaultRenderTool = useDefaultRenderTool;
9763
+ exports.useDefaultTool = useDefaultTool;
9537
9764
  exports.useFrontendTool = useFrontendTool;
9538
9765
  exports.useFrontendTools = useFrontendTools;
9539
9766
  exports.useHumanInTheLoop = useHumanInTheLoop;
9540
9767
  exports.useInterrupt = useInterrupt;
9768
+ exports.useLangGraphInterrupt = useLangGraphInterrupt;
9769
+ exports.useLazyToolRenderer = useLazyToolRenderer;
9541
9770
  exports.useLearnFromUserAction = useLearnFromUserAction;
9542
9771
  exports.useLearnFromUserActionInCurrentThread = useLearnFromUserActionInCurrentThread;
9772
+ exports.useLearningContainers = useLearningContainers;
9773
+ exports.useLearningContainersInCurrentThread = useLearningContainersInCurrentThread;
9543
9774
  Object.defineProperty(exports, 'useLicenseContext', {
9544
9775
  enumerable: true,
9545
9776
  get: function () {
9546
9777
  return _copilotkit_react_core_context.useLicenseContext;
9547
9778
  }
9548
9779
  });
9780
+ exports.useMakeCopilotDocumentReadable = useMakeCopilotDocumentReadable;
9549
9781
  exports.useMarkdownRenderer = require_ProviderMarkdown.useMarkdownRenderer;
9550
9782
  exports.useMemories = useMemories;
9551
9783
  exports.useRenderActivityMessage = useRenderActivityMessage;
@@ -10089,6 +10321,18 @@ Object.defineProperty(exports, 'ɵcanPreviewDocument', {
10089
10321
  return _copilotkit_core.ɵcanPreviewDocument;
10090
10322
  }
10091
10323
  });
10324
+ Object.defineProperty(exports, 'ɵcheckRemovedProviderProps', {
10325
+ enumerable: true,
10326
+ get: function () {
10327
+ return _copilotkit_core.ɵcheckRemovedProviderProps;
10328
+ }
10329
+ });
10330
+ Object.defineProperty(exports, 'ɵcheckToolParameters', {
10331
+ enumerable: true,
10332
+ get: function () {
10333
+ return _copilotkit_core.ɵcheckToolParameters;
10334
+ }
10335
+ });
10092
10336
  Object.defineProperty(exports, 'ɵclampSlashIndex', {
10093
10337
  enumerable: true,
10094
10338
  get: function () {