@copilotkit/react-core 2.0.0-rc.62 → 2.0.0-rc.64

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
@@ -805,7 +805,7 @@ function ɵuseOwnedCore(ref, create) {
805
805
 
806
806
  //#endregion
807
807
  //#region package.json
808
- var version$1 = "2.0.0-rc.62";
808
+ var version$1 = "2.0.0-rc.64";
809
809
 
810
810
  //#endregion
811
811
  //#region src/components/CopilotKitInspector.tsx
@@ -8119,6 +8119,159 @@ const WildcardToolCallRender = require_chat.defineToolCallRenderer({
8119
8119
  render: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DefaultToolCallRenderer, { ...adaptRendererProps(props) })
8120
8120
  });
8121
8121
 
8122
+ //#endregion
8123
+ //#region src/removed-exports.ts
8124
+ /** @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 */
8125
+ const CoAgentStateRendersProvider = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8126
+ name: "CoAgentStateRendersProvider",
8127
+ use: "Delete it. Render agent.state from useAgent from @copilotkit/react-core in your component.",
8128
+ docs: "/migrate/v2#hook-mapping"
8129
+ });
8130
+ /** @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 */
8131
+ const CopilotTask = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8132
+ name: "CopilotTask",
8133
+ 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.",
8134
+ docs: "/programmatic-control#sending-a-message-from-code"
8135
+ });
8136
+ /** @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 */
8137
+ const createA2UIMessageRenderer = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8138
+ name: "createA2UIMessageRenderer",
8139
+ 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.",
8140
+ docs: "/migrate/generative-ui-2.0#a2ui-v09-renderer"
8141
+ });
8142
+ /** @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 */
8143
+ const shouldShowDevConsole = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8144
+ name: "shouldShowDevConsole",
8145
+ use: "Delete the call. To turn the Inspector on or off, set enableInspector on CopilotKitProvider.",
8146
+ docs: "/migrate/removed-apis-2.0#showdevconsole"
8147
+ });
8148
+ /** @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 */
8149
+ const ThreadsProvider = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8150
+ name: "ThreadsProvider",
8151
+ use: "Delete it. Pass threadId to CopilotChat (or to CopilotChatConfigurationProvider around the chat), and list the threads with useThreads, from @copilotkit/react-core.",
8152
+ docs: "/migrate/chat-2.0#thread-lists"
8153
+ });
8154
+ /** @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 */
8155
+ const useCoAgent = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8156
+ name: "useCoAgent",
8157
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
8158
+ docs: "/migrate/v2#hook-mapping"
8159
+ });
8160
+ /** @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 */
8161
+ const useCoAgentStateRender = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8162
+ name: "useCoAgentStateRender",
8163
+ use: "Use useAgent from @copilotkit/react-core, and render agent.state in your component.",
8164
+ docs: "/migrate/v2#hook-mapping"
8165
+ });
8166
+ /** @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 */
8167
+ const useCoAgentStateRenders = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8168
+ name: "useCoAgentStateRenders",
8169
+ use: "Use useAgent from @copilotkit/react-core, and render agent.state in your component.",
8170
+ docs: "/migrate/v2#hook-mapping"
8171
+ });
8172
+ /** @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 */
8173
+ const useCopilotAction = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8174
+ name: "useCopilotAction",
8175
+ use: "Use useFrontendTool from @copilotkit/react-core (parameters are now a Zod 4 / Standard Schema), or useHumanInTheLoop when the action waits for the user.",
8176
+ docs: "/migrate/v2#hook-mapping"
8177
+ });
8178
+ /** @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 */
8179
+ const useCopilotAdditionalInstructions = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8180
+ name: "useCopilotAdditionalInstructions",
8181
+ use: "Use useAgentContext from @copilotkit/react-core to give the agent the instructions.",
8182
+ docs: "/migrate/v2#hook-mapping"
8183
+ });
8184
+ /** @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 */
8185
+ const useCopilotAuthenticatedAction_c = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8186
+ name: "useCopilotAuthenticatedAction_c",
8187
+ use: "Use useFrontendTool from @copilotkit/react-core, and check the user in its handler.",
8188
+ docs: "/migrate/v2#hook-mapping"
8189
+ });
8190
+ /** @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 */
8191
+ const useCopilotChat = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8192
+ name: "useCopilotChat",
8193
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent with its messages. For a chat UI of your own, see Headless UI.",
8194
+ docs: "/migrate/v2#hook-mapping"
8195
+ });
8196
+ /** @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 */
8197
+ const useCopilotChatHeadless_c = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8198
+ name: "useCopilotChatHeadless_c",
8199
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
8200
+ docs: "/migrate/v2#hook-mapping"
8201
+ });
8202
+ /** @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 */
8203
+ const useCopilotChatInternal = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8204
+ name: "useCopilotChatInternal",
8205
+ use: "Use useAgent from @copilotkit/react-core. It returns the agent, with its messages and its state.",
8206
+ docs: "/migrate/v2#hook-mapping"
8207
+ });
8208
+ /** @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 */
8209
+ const useCopilotChatSuggestions = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8210
+ name: "useCopilotChatSuggestions",
8211
+ use: "Use useConfigureSuggestions from @copilotkit/react-core.",
8212
+ docs: "/migrate/v2#hook-mapping"
8213
+ });
8214
+ /** @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 */
8215
+ const useCopilotContext = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8216
+ name: "useCopilotContext",
8217
+ use: "Use useCopilotKit from @copilotkit/react-core. It returns the CopilotKit core.",
8218
+ docs: "/programmatic-control#sending-a-message-from-code"
8219
+ });
8220
+ /** @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 */
8221
+ const useCopilotMessagesContext = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8222
+ name: "useCopilotMessagesContext",
8223
+ use: "Read agent.messages from useAgent from @copilotkit/react-core.",
8224
+ docs: "/migrate/v2#hook-mapping"
8225
+ });
8226
+ /** @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 */
8227
+ const useCopilotReadable = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8228
+ name: "useCopilotReadable",
8229
+ use: "Use useAgentContext from @copilotkit/react-core.",
8230
+ docs: "/migrate/v2#hook-mapping"
8231
+ });
8232
+ /** @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 */
8233
+ const useCopilotRuntimeClient = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8234
+ name: "useCopilotRuntimeClient",
8235
+ use: "CopilotKit 2.0 has no GraphQL runtime client. Use useAgent or useCopilotKit from @copilotkit/react-core.",
8236
+ docs: "/migrate/v2#update-the-runtime"
8237
+ });
8238
+ /** @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 */
8239
+ const useDefaultTool = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8240
+ name: "useDefaultTool",
8241
+ use: "Use useDefaultRenderTool from @copilotkit/react-core.",
8242
+ docs: "/migrate/v2#hook-mapping"
8243
+ });
8244
+ /** @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 */
8245
+ const useLangGraphInterrupt = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8246
+ name: "useLangGraphInterrupt",
8247
+ use: "Use useInterrupt from @copilotkit/react-core.",
8248
+ docs: "/migrate/v2#hook-mapping"
8249
+ });
8250
+ /** @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 */
8251
+ const useLazyToolRenderer = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8252
+ name: "useLazyToolRenderer",
8253
+ use: "Use useRenderToolCall from @copilotkit/react-core. It returns a function that renders a tool call.",
8254
+ docs: "/migrate/v2#gotchas"
8255
+ });
8256
+ /** @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 */
8257
+ const useLearningContainers = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8258
+ name: "useLearningContainers",
8259
+ use: "Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime.",
8260
+ docs: "/migrate/chat-2.0#removed-exports"
8261
+ });
8262
+ /** @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 */
8263
+ const useLearningContainersInCurrentThread = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8264
+ name: "useLearningContainersInCurrentThread",
8265
+ use: "Set getLearningContainerId on CopilotKitIntelligence from @copilotkit/runtime.",
8266
+ docs: "/migrate/chat-2.0#removed-exports"
8267
+ });
8268
+ /** @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 */
8269
+ const useMakeCopilotDocumentReadable = /* @__PURE__ */ (0, _copilotkit_shared.removedApi)({
8270
+ name: "useMakeCopilotDocumentReadable",
8271
+ use: "Use useAgentContext from @copilotkit/react-core, with the document text as the value.",
8272
+ docs: "/migrate/v2#hook-mapping"
8273
+ });
8274
+
8122
8275
  //#endregion
8123
8276
  Object.defineProperty(exports, 'A2UI_FENCE_LANGUAGE', {
8124
8277
  enumerable: true,
@@ -8270,6 +8423,7 @@ Object.defineProperty(exports, 'BaseMessageSchema', {
8270
8423
  return _ag_ui_core_schemas.BaseMessageSchema;
8271
8424
  }
8272
8425
  });
8426
+ exports.CoAgentStateRendersProvider = CoAgentStateRendersProvider;
8273
8427
  Object.defineProperty(exports, 'CompatibilityBoundary', {
8274
8428
  enumerable: true,
8275
8429
  get: function () {
@@ -8373,6 +8527,7 @@ Object.defineProperty(exports, 'CopilotSidebarView', {
8373
8527
  return CopilotSidebarView;
8374
8528
  }
8375
8529
  });
8530
+ exports.CopilotTask = CopilotTask;
8376
8531
  exports.CopilotThreadsDrawer = CopilotThreadsDrawer;
8377
8532
  Object.defineProperty(exports, 'CopyOperationSchema', {
8378
8533
  enumerable: true,
@@ -9022,6 +9177,7 @@ Object.defineProperty(exports, 'TextPartSchema', {
9022
9177
  return _ag_ui_core_schemas.TextPartSchema;
9023
9178
  }
9024
9179
  });
9180
+ exports.ThreadsProvider = ThreadsProvider;
9025
9181
  Object.defineProperty(exports, 'TokenUsageSchema', {
9026
9182
  enumerable: true,
9027
9183
  get: function () {
@@ -9198,6 +9354,7 @@ Object.defineProperty(exports, 'convertToLegacyEvents', {
9198
9354
  return _ag_ui_client.convertToLegacyEvents;
9199
9355
  }
9200
9356
  });
9357
+ exports.createA2UIMessageRenderer = createA2UIMessageRenderer;
9201
9358
  Object.defineProperty(exports, 'createActionGroup', {
9202
9359
  enumerable: true,
9203
9360
  get: function () {
@@ -9484,6 +9641,7 @@ Object.defineProperty(exports, 'select', {
9484
9641
  return _copilotkit_core.select;
9485
9642
  }
9486
9643
  });
9644
+ exports.shouldShowDevConsole = shouldShowDevConsole;
9487
9645
  Object.defineProperty(exports, 'splitA2UIMarkdown', {
9488
9646
  enumerable: true,
9489
9647
  get: function () {
@@ -9524,28 +9682,48 @@ exports.useAgent = useAgent;
9524
9682
  exports.useAgentContext = useAgentContext;
9525
9683
  exports.useAttachments = useAttachments;
9526
9684
  exports.useCapabilities = useCapabilities;
9685
+ exports.useCoAgent = useCoAgent;
9686
+ exports.useCoAgentStateRender = useCoAgentStateRender;
9687
+ exports.useCoAgentStateRenders = useCoAgentStateRenders;
9527
9688
  exports.useComponent = useComponent;
9528
9689
  exports.useConfigureSuggestions = useConfigureSuggestions;
9690
+ exports.useCopilotAction = useCopilotAction;
9691
+ exports.useCopilotAdditionalInstructions = useCopilotAdditionalInstructions;
9692
+ exports.useCopilotAuthenticatedAction_c = useCopilotAuthenticatedAction_c;
9693
+ exports.useCopilotChat = useCopilotChat;
9529
9694
  exports.useCopilotChatConfiguration = require_chat.useCopilotChatConfiguration;
9695
+ exports.useCopilotChatHeadless_c = useCopilotChatHeadless_c;
9696
+ exports.useCopilotChatInternal = useCopilotChatInternal;
9697
+ exports.useCopilotChatSuggestions = useCopilotChatSuggestions;
9698
+ exports.useCopilotContext = useCopilotContext;
9530
9699
  Object.defineProperty(exports, 'useCopilotKit', {
9531
9700
  enumerable: true,
9532
9701
  get: function () {
9533
9702
  return _copilotkit_react_core_context.useCopilotKit;
9534
9703
  }
9535
9704
  });
9705
+ exports.useCopilotMessagesContext = useCopilotMessagesContext;
9706
+ exports.useCopilotReadable = useCopilotReadable;
9707
+ exports.useCopilotRuntimeClient = useCopilotRuntimeClient;
9536
9708
  exports.useDefaultRenderTool = useDefaultRenderTool;
9709
+ exports.useDefaultTool = useDefaultTool;
9537
9710
  exports.useFrontendTool = useFrontendTool;
9538
9711
  exports.useFrontendTools = useFrontendTools;
9539
9712
  exports.useHumanInTheLoop = useHumanInTheLoop;
9540
9713
  exports.useInterrupt = useInterrupt;
9714
+ exports.useLangGraphInterrupt = useLangGraphInterrupt;
9715
+ exports.useLazyToolRenderer = useLazyToolRenderer;
9541
9716
  exports.useLearnFromUserAction = useLearnFromUserAction;
9542
9717
  exports.useLearnFromUserActionInCurrentThread = useLearnFromUserActionInCurrentThread;
9718
+ exports.useLearningContainers = useLearningContainers;
9719
+ exports.useLearningContainersInCurrentThread = useLearningContainersInCurrentThread;
9543
9720
  Object.defineProperty(exports, 'useLicenseContext', {
9544
9721
  enumerable: true,
9545
9722
  get: function () {
9546
9723
  return _copilotkit_react_core_context.useLicenseContext;
9547
9724
  }
9548
9725
  });
9726
+ exports.useMakeCopilotDocumentReadable = useMakeCopilotDocumentReadable;
9549
9727
  exports.useMarkdownRenderer = require_ProviderMarkdown.useMarkdownRenderer;
9550
9728
  exports.useMemories = useMemories;
9551
9729
  exports.useRenderActivityMessage = useRenderActivityMessage;