@copilotkit/react-core 1.60.2 → 1.61.0

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.
@@ -3612,6 +3612,10 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
3612
3612
  ...selfManagedAgents
3613
3613
  }), [agents, selfManagedAgents]);
3614
3614
  const hasLocalAgents = mergedAgents && Object.keys(mergedAgents).length > 0;
3615
+ const hasSelfManagedAgents = Object.keys(selfManagedAgents).length > 0;
3616
+ useEffect(() => {
3617
+ if (hasSelfManagedAgents && !resolvedPublicKey) console.warn("[CopilotKit] `selfManagedAgents` is part of CopilotKit's Enterprise Intelligence offering. Provide a `publicLicenseKey` for production use — contact the CopilotKit team about licensing.");
3618
+ }, [hasSelfManagedAgents, resolvedPublicKey]);
3615
3619
  const headers = typeof headersProp === "function" ? headersProp() : headersProp;
3616
3620
  const mergedHeaders = useMemo(() => {
3617
3621
  if (!resolvedPublicKey) return headers;
@@ -4089,36 +4093,40 @@ function useHumanInTheLoop(tool, deps) {
4089
4093
  }, []);
4090
4094
  const RenderComponent = useCallback((props) => {
4091
4095
  const ToolComponent = tool.render;
4092
- if (props.status === "inProgress") {
4096
+ if (props.status === ToolCallStatus.InProgress) {
4093
4097
  const enhancedProps = {
4094
4098
  ...props,
4095
4099
  name: tool.name,
4096
4100
  description: tool.description || "",
4101
+ agentId: tool.agentId,
4097
4102
  respond: void 0
4098
4103
  };
4099
4104
  return React.createElement(ToolComponent, enhancedProps);
4100
- } else if (props.status === "executing") {
4105
+ } else if (props.status === ToolCallStatus.Executing) {
4101
4106
  const enhancedProps = {
4102
4107
  ...props,
4103
4108
  name: tool.name,
4104
4109
  description: tool.description || "",
4110
+ agentId: tool.agentId,
4105
4111
  respond
4106
4112
  };
4107
4113
  return React.createElement(ToolComponent, enhancedProps);
4108
- } else if (props.status === "complete") {
4114
+ } else if (props.status === ToolCallStatus.Complete) {
4109
4115
  const enhancedProps = {
4110
4116
  ...props,
4111
4117
  name: tool.name,
4112
4118
  description: tool.description || "",
4119
+ agentId: tool.agentId,
4113
4120
  respond: void 0
4114
4121
  };
4115
4122
  return React.createElement(ToolComponent, enhancedProps);
4116
4123
  }
4117
- return React.createElement(ToolComponent, props);
4124
+ return props;
4118
4125
  }, [
4119
4126
  tool.render,
4120
4127
  tool.name,
4121
4128
  tool.description,
4129
+ tool.agentId,
4122
4130
  respond
4123
4131
  ]);
4124
4132
  useFrontendTool({
@@ -10080,21 +10088,6 @@ function CopilotListeners() {
10080
10088
 
10081
10089
  //#endregion
10082
10090
  //#region src/components/copilot-provider/copilotkit.tsx
10083
- /**
10084
- * This component will typically wrap your entire application (or a sub-tree of your application where you want to have a copilot). It provides the copilot context to all other components and hooks.
10085
- *
10086
- * ## Example
10087
- *
10088
- * You can find more information about self-hosting CopilotKit [here](/guides/self-hosting).
10089
- *
10090
- * ```tsx
10091
- * import { CopilotKit } from "@copilotkit/react-core";
10092
- *
10093
- * <CopilotKit runtimeUrl="<your-runtime-url>">
10094
- * // ... your app ...
10095
- * </CopilotKit>
10096
- * ```
10097
- */
10098
10091
  function CopilotKit({ children, ...props }) {
10099
10092
  const enabled = shouldShowDevConsole(props.showDevConsole);
10100
10093
  const showInspector = shouldShowDevConsole(props.enableInspector);
@@ -10583,10 +10576,14 @@ function formatFeatureName(featureName) {
10583
10576
  function validateProps(props) {
10584
10577
  const cloudFeatures = Object.keys(props).filter((key) => key.endsWith("_c"));
10585
10578
  const hasApiKey = props.publicApiKey || props.publicLicenseKey;
10586
- if (!props.runtimeUrl && !hasApiKey) throw new ConfigurationError("Missing required prop: 'runtimeUrl' or 'publicApiKey' or 'publicLicenseKey'");
10579
+ const hasLocalAgents = Object.keys({
10580
+ ...props.agents__unsafe_dev_only,
10581
+ ...props.selfManagedAgents
10582
+ }).length > 0;
10583
+ if (!props.runtimeUrl && !hasApiKey && !hasLocalAgents) throw new ConfigurationError("Missing required prop: 'runtimeUrl' or 'publicApiKey' or 'publicLicenseKey'");
10587
10584
  if (cloudFeatures.length > 0 && !hasApiKey) throw new MissingPublicApiKeyError(`Missing required prop: 'publicApiKey' or 'publicLicenseKey' to use cloud features: ${cloudFeatures.map(formatFeatureName).join(", ")}`);
10588
10585
  }
10589
10586
 
10590
10587
  //#endregion
10591
10588
  export { useAgent as $, INTELLIGENCE_TURN_HEAD as A, CopilotChatToolCallsView as B, CopilotChatToggleButton as C, useCopilotChatConfiguration as Ct, CopilotChatView_default as D, CopilotChat as E, CopilotChatSuggestionPill as F, useLearnFromUserAction as G, useLearningContainers as H, CopilotChatReasoningMessage_default as I, useConfigureSuggestions as J, useThreads$1 as K, CopilotChatUserMessage_default as L, getIntelligenceTurnAnchors as M, IntelligenceIndicatorView as N, CopilotChatAttachmentQueue as O, CopilotChatSuggestionView as P, UseAgentUpdate as Q, CopilotChatAttachmentRenderer as R, CopilotModalHeader as S, CopilotChatConfigurationProvider as St, DefaultOpenIcon as T, useAttachments as U, useLearningContainersInCurrentThread as V, useLearnFromUserActionInCurrentThread as W, useAgentContext as X, useSuggestions as Y, useCapabilities as Z, WildcardToolCallRender as _, useCopilotKit as _t, ThreadsProvider as a, CopilotKitProvider as at, CopilotPopupView as b, AudioRecorderError as bt, CoAgentStateRendersProvider as c, useSandboxFunctions as ct, shouldShowDevConsole as d, MCPAppsActivityType as dt, useHumanInTheLoop as et, useToast as f, CopilotKitInspector as ft, useCopilotContext as g, defineToolCallRenderer as gt, CopilotContext as h, useRenderTool as ht, ThreadsContext as i, useRenderCustomMessages as it, IntelligenceIndicator as j, CopilotChatMessageView as k, useCoAgentStateRenders as l, MCPAppsActivityContentSchema as lt, useCopilotMessagesContext as m, useDefaultRenderTool as mt, defaultCopilotContextCategories as n, useFrontendTool as nt, useThreads as o, createA2UIMessageRenderer as ot, CopilotMessagesContext as p, useRenderToolCall as pt, useInterrupt as q, CoAgentStateRenderBridge as r, useRenderActivityMessage as rt, CoAgentStateRendersContext as s, SandboxFunctionsContext as st, CopilotKit as t, useComponent as tt, useAsyncCallback as u, MCPAppsActivityRenderer as ut, CopilotPopup as v, CopilotKitCoreReact as vt, DefaultCloseIcon as w, CopilotSidebarView as x, CopilotChatAudioRecorder as xt, CopilotSidebar as y, CopilotChatInput_default as yt, CopilotChatAssistantMessage_default as z };
10592
- //# sourceMappingURL=copilotkit-DheptEiV.mjs.map
10589
+ //# sourceMappingURL=copilotkit-BCxdKlMw.mjs.map