@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.umd.js CHANGED
@@ -1287,9 +1287,18 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1287
1287
  * Hook that returns a function to render tool calls based on the render functions
1288
1288
  * defined in CopilotKitProvider.
1289
1289
  *
1290
+ * @param removedArguments - None. In 1.x, `useRenderToolCall(tool, deps)`
1291
+ * registered a renderer for a tool. That call throws a
1292
+ * `CopilotKitRemovedApiError` in 2.0: register a renderer with `useRenderTool`.
1293
+ * See https://docs.copilotkit.ai/migrate/removed-apis-2.0#userendertoolcall-with-arguments
1290
1294
  * @returns A function that takes a tool call and optional tool message and returns the rendered component
1291
1295
  */
1292
- function useRenderToolCall() {
1296
+ function useRenderToolCall(...removedArguments) {
1297
+ if (removedArguments.length > 0) throw new _copilotkit_shared.CopilotKitRemovedApiError({
1298
+ what: "\"useRenderToolCall(tool, deps)\"",
1299
+ 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.",
1300
+ docs: "/migrate/removed-apis-2.0#userendertoolcall-with-arguments"
1301
+ });
1293
1302
  const { copilotkit, executingToolCallIds } = useCopilotKit();
1294
1303
  const agentId = (0, _copilotkit_core.ɵresolveToolCallAgentId)(useCopilotChatConfiguration()?.agentId, void 0);
1295
1304
  const unrenderedToolNames = (0, react.useRef)(/* @__PURE__ */ new Set());
@@ -1377,7 +1386,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
1377
1386
 
1378
1387
  //#endregion
1379
1388
  //#region package.json
1380
- var version$1 = "2.0.0-rc.63";
1389
+ var version$1 = "2.0.0-rc.65";
1381
1390
 
1382
1391
  //#endregion
1383
1392
  //#region src/components/CopilotKitInspector.tsx
@@ -9259,7 +9268,8 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9259
9268
  return value;
9260
9269
  }
9261
9270
  /** Provide a shared core instance and synchronize runtime, tool, and UI configuration. */
9262
- 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 }) => {
9271
+ 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 }) => {
9272
+ (0, _copilotkit_core.ɵcheckRemovedProviderProps)(otherProps);
9263
9273
  const learningConfig = (0, react.useMemo)(() => (0, _copilotkit_core.ɵtoLearningConfig)(learning), [learning]);
9264
9274
  const [shouldRenderInspector, setShouldRenderInspector] = (0, react.useState)(false);
9265
9275
  const [inspectorVisible, setInspectorVisible] = (0, react.useState)(false);
@@ -9753,6 +9763,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
9753
9763
  * ```
9754
9764
  */
9755
9765
  function useFrontendTool(tool, deps) {
9766
+ (0, _copilotkit_core.ɵcheckToolParameters)("useFrontendTool", tool.parameters);
9756
9767
  const { copilotkit } = useCopilotKit();
9757
9768
  const depsVersion = useDepsVersion(deps);
9758
9769
  (0, react.useLayoutEffect)(() => {
@@ -10488,6 +10499,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
10488
10499
  //#endregion
10489
10500
  //#region src/hooks/use-human-in-the-loop.tsx
10490
10501
  function useHumanInTheLoop(tool, deps) {
10502
+ (0, _copilotkit_core.ɵcheckToolParameters)("useHumanInTheLoop", tool.parameters);
10491
10503
  const { copilotkit } = useCopilotKit();
10492
10504
  const registry = copilotkit.ɵhumanInTheLoop;
10493
10505
  const RenderComponent = (0, react.useCallback)((props) => react.default.createElement(tool.render, (0, _copilotkit_core.ɵhitlRenderProps)(props, tool, registry)), [
@@ -10827,6 +10839,11 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
10827
10839
  * `deleteThread`) return promises that resolve once the platform confirms the
10828
10840
  * operation and reject with an `Error` on failure.
10829
10841
  *
10842
+ * In 1.x, `useThreads()` returned the current thread. A call without
10843
+ * arguments throws a `CopilotKitRemovedApiError`, and so does a read of
10844
+ * `threadId`, `setThreadId`, or `isThreadIdExplicit` on the result. Read the
10845
+ * current thread from `useCopilotChatConfiguration()`.
10846
+ *
10830
10847
  * @param input - Agent identifier and optional list controls.
10831
10848
  * @returns Thread list state and stable mutation callbacks.
10832
10849
  *
@@ -10855,7 +10872,9 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
10855
10872
  * }
10856
10873
  * ```
10857
10874
  */
10858
- function useThreads({ agentId, includeArchived, limit, enabled = true }) {
10875
+ function useThreads(input) {
10876
+ checkThreadsInput(input);
10877
+ const { agentId, includeArchived, limit, enabled = true } = input;
10859
10878
  const { copilotkit } = useCopilotKit();
10860
10879
  const [controller] = (0, react.useState)(() => new _copilotkit_core.ɵThreadsController((0, _copilotkit_core.ɵcreateThreadStore)({ fetch: copilotkit.ɵruntimeFetch }), {
10861
10880
  core: copilotkit,
@@ -10889,7 +10908,7 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
10889
10908
  copilotkit.threadEndpoints?.mutations
10890
10909
  ]);
10891
10910
  const { fetchMoreThreads, refetchThreads, startNewThread, renameThread, archiveThread, unarchiveThread, deleteThread } = controller;
10892
- return {
10911
+ return withRemovedThreadFields({
10893
10912
  threads,
10894
10913
  isLoading,
10895
10914
  error,
@@ -10905,7 +10924,42 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
10905
10924
  archiveThread,
10906
10925
  unarchiveThread,
10907
10926
  deleteThread
10908
- };
10927
+ });
10928
+ }
10929
+ const USE_THREADS_SECTION = "/migrate/removed-apis-2.0#usethreads";
10930
+ /** Throws for the 1.x call `useThreads()`, which has no input. */
10931
+ function checkThreadsInput(input) {
10932
+ if (input !== void 0) return;
10933
+ throw new _copilotkit_shared.CopilotKitRemovedApiError({
10934
+ what: "\"useThreads()\" without arguments",
10935
+ use: "useThreads({ agentId }) lists the threads of an agent. To read or set the current thread, use useCopilotChatConfiguration() from @copilotkit/react-core.",
10936
+ docs: USE_THREADS_SECTION
10937
+ });
10938
+ }
10939
+ /** The fields of the 1.x `useThreads()` result, and what to use in 2.0. */
10940
+ const REMOVED_THREAD_FIELDS = {
10941
+ threadId: "Read threadId from useCopilotChatConfiguration() of @copilotkit/react-core.",
10942
+ setThreadId: "Call setActiveThreadId(threadId) on useCopilotChatConfiguration() of @copilotkit/react-core.",
10943
+ isThreadIdExplicit: "Read hasExplicitThreadId from useCopilotChatConfiguration() of @copilotkit/react-core."
10944
+ };
10945
+ /**
10946
+ * Adds a getter that throws a `CopilotKitRemovedApiError` for each field of
10947
+ * the 1.x result. The getters are not enumerable, so a spread, a JSON copy,
10948
+ * or devtools do not call them.
10949
+ */
10950
+ function withRemovedThreadFields(result) {
10951
+ const fields = Object.entries(REMOVED_THREAD_FIELDS);
10952
+ for (const [field, use] of fields) Object.defineProperty(result, field, {
10953
+ enumerable: false,
10954
+ get() {
10955
+ throw new _copilotkit_shared.CopilotKitRemovedApiError({
10956
+ what: `"${field}" from useThreads`,
10957
+ use: `${use} useThreads({ agentId }) lists the threads of an agent.`,
10958
+ docs: USE_THREADS_SECTION
10959
+ });
10960
+ }
10961
+ });
10962
+ return result;
10909
10963
  }
10910
10964
 
10911
10965
  //#endregion
@@ -16216,6 +16270,159 @@ _radix_ui_react_popover = __toESM(_radix_ui_react_popover);
16216
16270
  render: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DefaultToolCallRenderer, { ...adaptRendererProps(props) })
16217
16271
  });
16218
16272
 
16273
+ //#endregion
16274
+ //#region src/removed-exports.ts
16275
+ /** @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 */
16276
+ const CoAgentStateRendersProvider = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16277
+ name: "CoAgentStateRendersProvider",
16278
+ use: "Delete it. Render agent.state from useAgent from @copilotkit/react-core in your component.",
16279
+ docs: "/migrate/v2#hook-mapping"
16280
+ });
16281
+ /** @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 */
16282
+ const CopilotTask = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16283
+ name: "CopilotTask",
16284
+ 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.",
16285
+ docs: "/programmatic-control#sending-a-message-from-code"
16286
+ });
16287
+ /** @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 */
16288
+ const createA2UIMessageRenderer = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16289
+ name: "createA2UIMessageRenderer",
16290
+ 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.",
16291
+ docs: "/migrate/generative-ui-2.0#a2ui-v09-renderer"
16292
+ });
16293
+ /** @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 */
16294
+ const shouldShowDevConsole = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16295
+ name: "shouldShowDevConsole",
16296
+ use: "Delete the call. To turn the Inspector on or off, set enableInspector on CopilotKitProvider.",
16297
+ docs: "/migrate/removed-apis-2.0#showdevconsole"
16298
+ });
16299
+ /** @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 */
16300
+ const ThreadsProvider = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16301
+ name: "ThreadsProvider",
16302
+ use: "Delete it. Pass threadId to CopilotChat (or to CopilotChatConfigurationProvider around the chat), and list the threads with useThreads, from @copilotkit/react-core.",
16303
+ docs: "/migrate/chat-2.0#thread-lists"
16304
+ });
16305
+ /** @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 */
16306
+ const useCoAgent = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16307
+ name: "useCoAgent",
16308
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
16309
+ docs: "/migrate/v2#hook-mapping"
16310
+ });
16311
+ /** @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 */
16312
+ const useCoAgentStateRender = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16313
+ name: "useCoAgentStateRender",
16314
+ use: "Use useAgent from @copilotkit/react-core, and render agent.state in your component.",
16315
+ docs: "/migrate/v2#hook-mapping"
16316
+ });
16317
+ /** @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 */
16318
+ const useCoAgentStateRenders = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16319
+ name: "useCoAgentStateRenders",
16320
+ use: "Use useAgent from @copilotkit/react-core, and render agent.state in your component.",
16321
+ docs: "/migrate/v2#hook-mapping"
16322
+ });
16323
+ /** @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 */
16324
+ const useCopilotAction = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16325
+ name: "useCopilotAction",
16326
+ use: "Use useFrontendTool from @copilotkit/react-core (parameters are now a Zod 4 / Standard Schema), or useHumanInTheLoop when the action waits for the user.",
16327
+ docs: "/migrate/v2#hook-mapping"
16328
+ });
16329
+ /** @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 */
16330
+ const useCopilotAdditionalInstructions = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16331
+ name: "useCopilotAdditionalInstructions",
16332
+ use: "Use useAgentContext from @copilotkit/react-core to give the agent the instructions.",
16333
+ docs: "/migrate/v2#hook-mapping"
16334
+ });
16335
+ /** @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 */
16336
+ const useCopilotAuthenticatedAction_c = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16337
+ name: "useCopilotAuthenticatedAction_c",
16338
+ use: "Use useFrontendTool from @copilotkit/react-core, and check the user in its handler.",
16339
+ docs: "/migrate/v2#hook-mapping"
16340
+ });
16341
+ /** @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 */
16342
+ const useCopilotChat = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16343
+ name: "useCopilotChat",
16344
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent with its messages. For a chat UI of your own, see Headless UI.",
16345
+ docs: "/migrate/v2#hook-mapping"
16346
+ });
16347
+ /** @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 */
16348
+ const useCopilotChatHeadless_c = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16349
+ name: "useCopilotChatHeadless_c",
16350
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
16351
+ docs: "/migrate/v2#hook-mapping"
16352
+ });
16353
+ /** @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 */
16354
+ const useCopilotChatInternal = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16355
+ name: "useCopilotChatInternal",
16356
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
16357
+ docs: "/migrate/v2#hook-mapping"
16358
+ });
16359
+ /** @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 */
16360
+ const useCopilotChatSuggestions = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16361
+ name: "useCopilotChatSuggestions",
16362
+ use: "Use useConfigureSuggestions from @copilotkit/react-core.",
16363
+ docs: "/migrate/v2#hook-mapping"
16364
+ });
16365
+ /** @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 */
16366
+ const useCopilotContext = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16367
+ name: "useCopilotContext",
16368
+ use: "Use useCopilotKit from @copilotkit/react-core. It returns the CopilotKit core.",
16369
+ docs: "/programmatic-control#sending-a-message-from-code"
16370
+ });
16371
+ /** @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 */
16372
+ const useCopilotMessagesContext = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16373
+ name: "useCopilotMessagesContext",
16374
+ use: "Read agent.messages from useAgent from @copilotkit/react-core.",
16375
+ docs: "/migrate/v2#hook-mapping"
16376
+ });
16377
+ /** @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 */
16378
+ const useCopilotReadable = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16379
+ name: "useCopilotReadable",
16380
+ use: "Use useAgentContext from @copilotkit/react-core.",
16381
+ docs: "/migrate/v2#hook-mapping"
16382
+ });
16383
+ /** @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 */
16384
+ const useCopilotRuntimeClient = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16385
+ name: "useCopilotRuntimeClient",
16386
+ use: "CopilotKit 2.0 has no GraphQL runtime client. Use useAgent or useCopilotKit from @copilotkit/react-core.",
16387
+ docs: "/migrate/v2#update-the-runtime"
16388
+ });
16389
+ /** @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 */
16390
+ const useDefaultTool = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16391
+ name: "useDefaultTool",
16392
+ use: "Use useDefaultRenderTool from @copilotkit/react-core.",
16393
+ docs: "/migrate/v2#hook-mapping"
16394
+ });
16395
+ /** @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 */
16396
+ const useLangGraphInterrupt = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16397
+ name: "useLangGraphInterrupt",
16398
+ use: "Use useInterrupt from @copilotkit/react-core.",
16399
+ docs: "/migrate/v2#hook-mapping"
16400
+ });
16401
+ /** @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 */
16402
+ const useLazyToolRenderer = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16403
+ name: "useLazyToolRenderer",
16404
+ use: "Use useRenderToolCall from @copilotkit/react-core. It returns a function that renders a tool call.",
16405
+ docs: "/migrate/v2#gotchas"
16406
+ });
16407
+ /** @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 */
16408
+ const useLearningContainers = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16409
+ name: "useLearningContainers",
16410
+ use: "Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime.",
16411
+ docs: "/migrate/chat-2.0#removed-exports"
16412
+ });
16413
+ /** @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 */
16414
+ const useLearningContainersInCurrentThread = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16415
+ name: "useLearningContainersInCurrentThread",
16416
+ use: "Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime.",
16417
+ docs: "/migrate/chat-2.0#removed-exports"
16418
+ });
16419
+ /** @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 */
16420
+ const useMakeCopilotDocumentReadable = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
16421
+ name: "useMakeCopilotDocumentReadable",
16422
+ use: "Use useAgentContext from @copilotkit/react-core, with the document text as the value.",
16423
+ docs: "/migrate/v2#hook-mapping"
16424
+ });
16425
+
16219
16426
  //#endregion
16220
16427
  Object.defineProperty(exports, 'A2UI_FENCE_LANGUAGE', {
16221
16428
  enumerable: true,
@@ -16367,6 +16574,7 @@ Object.defineProperty(exports, 'BaseMessageSchema', {
16367
16574
  return _ag_ui_core_schemas.BaseMessageSchema;
16368
16575
  }
16369
16576
  });
16577
+ exports.CoAgentStateRendersProvider = CoAgentStateRendersProvider;
16370
16578
  Object.defineProperty(exports, 'CompatibilityBoundary', {
16371
16579
  enumerable: true,
16372
16580
  get: function () {
@@ -16470,6 +16678,7 @@ Object.defineProperty(exports, 'CopilotSidebarView', {
16470
16678
  return CopilotSidebarView;
16471
16679
  }
16472
16680
  });
16681
+ exports.CopilotTask = CopilotTask;
16473
16682
  exports.CopilotThreadsDrawer = CopilotThreadsDrawer;
16474
16683
  Object.defineProperty(exports, 'CopyOperationSchema', {
16475
16684
  enumerable: true,
@@ -17119,6 +17328,7 @@ Object.defineProperty(exports, 'TextPartSchema', {
17119
17328
  return _ag_ui_core_schemas.TextPartSchema;
17120
17329
  }
17121
17330
  });
17331
+ exports.ThreadsProvider = ThreadsProvider;
17122
17332
  Object.defineProperty(exports, 'TokenUsageSchema', {
17123
17333
  enumerable: true,
17124
17334
  get: function () {
@@ -17295,6 +17505,7 @@ Object.defineProperty(exports, 'convertToLegacyEvents', {
17295
17505
  return _ag_ui_client.convertToLegacyEvents;
17296
17506
  }
17297
17507
  });
17508
+ exports.createA2UIMessageRenderer = createA2UIMessageRenderer;
17298
17509
  Object.defineProperty(exports, 'createActionGroup', {
17299
17510
  enumerable: true,
17300
17511
  get: function () {
@@ -17581,6 +17792,7 @@ Object.defineProperty(exports, 'select', {
17581
17792
  return _copilotkit_core.select;
17582
17793
  }
17583
17794
  });
17795
+ exports.shouldShowDevConsole = shouldShowDevConsole;
17584
17796
  Object.defineProperty(exports, 'splitA2UIMarkdown', {
17585
17797
  enumerable: true,
17586
17798
  get: function () {
@@ -17621,18 +17833,38 @@ exports.useAgent = useAgent;
17621
17833
  exports.useAgentContext = useAgentContext;
17622
17834
  exports.useAttachments = useAttachments;
17623
17835
  exports.useCapabilities = useCapabilities;
17836
+ exports.useCoAgent = useCoAgent;
17837
+ exports.useCoAgentStateRender = useCoAgentStateRender;
17838
+ exports.useCoAgentStateRenders = useCoAgentStateRenders;
17624
17839
  exports.useComponent = useComponent;
17625
17840
  exports.useConfigureSuggestions = useConfigureSuggestions;
17841
+ exports.useCopilotAction = useCopilotAction;
17842
+ exports.useCopilotAdditionalInstructions = useCopilotAdditionalInstructions;
17843
+ exports.useCopilotAuthenticatedAction_c = useCopilotAuthenticatedAction_c;
17844
+ exports.useCopilotChat = useCopilotChat;
17626
17845
  exports.useCopilotChatConfiguration = useCopilotChatConfiguration;
17846
+ exports.useCopilotChatHeadless_c = useCopilotChatHeadless_c;
17847
+ exports.useCopilotChatInternal = useCopilotChatInternal;
17848
+ exports.useCopilotChatSuggestions = useCopilotChatSuggestions;
17849
+ exports.useCopilotContext = useCopilotContext;
17627
17850
  exports.useCopilotKit = useCopilotKit;
17851
+ exports.useCopilotMessagesContext = useCopilotMessagesContext;
17852
+ exports.useCopilotReadable = useCopilotReadable;
17853
+ exports.useCopilotRuntimeClient = useCopilotRuntimeClient;
17628
17854
  exports.useDefaultRenderTool = useDefaultRenderTool;
17855
+ exports.useDefaultTool = useDefaultTool;
17629
17856
  exports.useFrontendTool = useFrontendTool;
17630
17857
  exports.useFrontendTools = useFrontendTools;
17631
17858
  exports.useHumanInTheLoop = useHumanInTheLoop;
17632
17859
  exports.useInterrupt = useInterrupt;
17860
+ exports.useLangGraphInterrupt = useLangGraphInterrupt;
17861
+ exports.useLazyToolRenderer = useLazyToolRenderer;
17633
17862
  exports.useLearnFromUserAction = useLearnFromUserAction;
17634
17863
  exports.useLearnFromUserActionInCurrentThread = useLearnFromUserActionInCurrentThread;
17864
+ exports.useLearningContainers = useLearningContainers;
17865
+ exports.useLearningContainersInCurrentThread = useLearningContainersInCurrentThread;
17635
17866
  exports.useLicenseContext = useLicenseContext;
17867
+ exports.useMakeCopilotDocumentReadable = useMakeCopilotDocumentReadable;
17636
17868
  exports.useMarkdownRenderer = useMarkdownRenderer;
17637
17869
  exports.useMemories = useMemories;
17638
17870
  exports.useRenderActivityMessage = useRenderActivityMessage;
@@ -18176,6 +18408,18 @@ Object.defineProperty(exports, 'ɵcanPreviewDocument', {
18176
18408
  return _copilotkit_core.ɵcanPreviewDocument;
18177
18409
  }
18178
18410
  });
18411
+ Object.defineProperty(exports, 'ɵcheckRemovedProviderProps', {
18412
+ enumerable: true,
18413
+ get: function () {
18414
+ return _copilotkit_core.ɵcheckRemovedProviderProps;
18415
+ }
18416
+ });
18417
+ Object.defineProperty(exports, 'ɵcheckToolParameters', {
18418
+ enumerable: true,
18419
+ get: function () {
18420
+ return _copilotkit_core.ɵcheckToolParameters;
18421
+ }
18422
+ });
18179
18423
  Object.defineProperty(exports, 'ɵclampSlashIndex', {
18180
18424
  enumerable: true,
18181
18425
  get: function () {