@copilotkit/react-core 1.64.1 → 1.64.2-canary.1785366148

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/v2/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
- const require_copilotkit = require('../copilotkit-DiLTL1ZM.cjs');
4
+ const require_copilotkit = require('../copilotkit-2v7ami2b.cjs');
5
5
  require("./index.css");
6
6
  let _copilotkit_a2ui_renderer = require("@copilotkit/a2ui-renderer");
7
7
 
@@ -1,4 +1,4 @@
1
- import { $ as useComponent, $t as CopilotSidebarView, A as useAttachments, An as CopilotChatAssistantMessageProps, At as ɵMcpFollowUpHost, B as UseInterruptConfig, Bn as useCopilotChatConfiguration, Bt as CopilotThreadsDrawer, C as NewMemory, Cn as CopilotChatSuggestionPill, Ct as OpenGenerativeUIContent, D as useLearningContainers, Dn as CopilotChatUserMessage, Dt as MCPAppsActivityContentSchema, E as UseLearningContainersArgs, En as CopilotChatReasoningMessageProps, Et as MCPAppsActivityContent, F as LearnFromUserActionResult, Fn as ToolsMenuItem, Ft as Attachment, G as JsonSerializable, Gt as UseThreadsResult, H as useConfigureSuggestions, Hn as AudioRecorderState, Ht as CopilotThreadsDrawerRowRenderer, I as UseLearnFromUserActionRecorder, In as CopilotChatConfigurationProvider, It as AttachmentModality, J as UseAgentUpdate, Jt as CopilotPopupProps, K as useAgentContext, Kt as useThreads, L as useLearnFromUserAction, Ln as CopilotChatConfigurationProviderProps, Lt as AttachmentsConfig, M as UseLearnFromUserActionInCurrentThreadRecorder, Mn as CopilotChatToolCallsViewProps, Mt as CopilotKitInspector, N as useLearnFromUserActionInCurrentThread, Nn as CopilotChatInput, Nt as CopilotKitInspectorProps, O as UseAttachmentsProps, On as CopilotChatUserMessageProps, Ot as MCPAppsActivityRenderer, P as LearnFromUserActionInput, Pn as CopilotChatInputProps, Pt as WildcardToolCallRender, Q as useRenderTool, Qt as CopilotPopupViewProps, R as UseMemoriesResult, Rn as CopilotChatConfigurationValue, Rt as CopilotChatAttachmentRenderer, S as MemoryScope, Sn as CopilotChatSuggestionViewProps, St as OpenGenerativeUIActivityType, T as useLearningContainersInCurrentThread, Tn as CopilotChatReasoningMessage, Tt as OpenGenerativeUIToolRenderer, U as useSuggestions, Un as CopilotChatAudioRecorder, Ut as Thread, V as useInterrupt, Vn as AudioRecorderError, Vt as CopilotThreadsDrawerProps, W as AgentContextInput, Wt as UseThreadsInput, X as useHumanInTheLoop, Xt as CopilotSidebarProps, Y as useAgent, Yt as CopilotSidebar, Z as useDefaultRenderTool, Zt as CopilotPopupView, _ as CopilotKitCoreReactConfig, _n as getIntelligenceTurnAnchors, _t as ReactCustomMessageRendererPosition, a as A2UIMessageRendererOptions, an as DefaultCloseIcon, at as InterruptEvent, b as MemoryChanges, bn as IntelligenceIndicatorViewProps, bt as GenerateSandboxedUiArgsSchema, c as InspectorAnchor, cn as CopilotChatProps, ct as InterruptResolveFn, d as CopilotKitProvider, dn as AutoScrollMode, dt as ReactHumanInTheLoop, en as CopilotSidebarViewProps, et as useFrontendTool, f as CopilotKitProviderProps, fn as CopilotChatMessageView, ft as ReactFrontendTool, g as CopilotKitCoreReact, gn as IntelligenceIndicatorProps, gt as ReactCustomMessageRenderer, h as useCopilotKit, hn as IntelligenceIndicator, ht as useRenderCustomMessages, i as A2UIActionInterceptor, in as CopilotChatToggleButtonProps, it as InterruptCancelFn, j as LearnFromUserActionInCurrentThreadInput, jn as CopilotChatToolCallsView, jt as ɵrunMcpFollowUp, k as UseAttachmentsReturn, kn as CopilotChatAssistantMessage, kt as MCPAppsActivityType, l as SandboxFunctionsContext, ln as CopilotChatView, lt as ResumeEntry, m as CopilotKitContextValue, mn as INTELLIGENCE_TURN_HEAD, mt as ReactToolCallRenderer, nn as CopilotModalHeaderProps, nt as SandboxFunction, o as A2UIUserAction, on as DefaultOpenIcon, ot as InterruptHandlerProps, p as A2UIRecoveryRendererOptions, pn as CopilotChatMessageViewProps, pt as ReactActivityMessageRenderer, q as useCapabilities, qt as CopilotPopup, r as CopilotKitProps, rn as CopilotChatToggleButton, rt as Interrupt, s as createA2UIMessageRenderer, sn as CopilotChat, st as InterruptRenderProps, t as CopilotKit, tn as CopilotModalHeader, tt as useRenderActivityMessage, u as useSandboxFunctions, un as CopilotChatViewProps, ut as defineToolCallRenderer, v as CopilotKitCoreReactSubscriber, vn as IntelligenceIndicatorStatus, vt as useRenderToolCall, w as UseLearningContainersInCurrentThreadArgs, wn as CopilotChatSuggestionPillProps, wt as OpenGenerativeUIContentSchema, x as MemoryKind, xn as CopilotChatSuggestionView, xt as OpenGenerativeUIActivityRenderer, y as Memory, yn as IntelligenceIndicatorView, yt as GenerateSandboxedUiArgs, z as useMemories, zn as CopilotChatLabels, zt as CopilotChatAttachmentQueue } from "../copilotkit-CXvuYw_F.cjs";
1
+ import { $ as useComponent, $t as CopilotSidebarView, A as useAttachments, An as CopilotChatAssistantMessageProps, At as ɵMcpFollowUpHost, B as UseInterruptConfig, Bn as useCopilotChatConfiguration, Bt as CopilotThreadsDrawer, C as NewMemory, Cn as CopilotChatSuggestionPill, Ct as OpenGenerativeUIContent, D as useLearningContainers, Dn as CopilotChatUserMessage, Dt as MCPAppsActivityContentSchema, E as UseLearningContainersArgs, En as CopilotChatReasoningMessageProps, Et as MCPAppsActivityContent, F as LearnFromUserActionResult, Fn as ToolsMenuItem, Ft as Attachment, G as JsonSerializable, Gt as UseThreadsResult, H as useConfigureSuggestions, Hn as AudioRecorderState, Ht as CopilotThreadsDrawerRowRenderer, I as UseLearnFromUserActionRecorder, In as CopilotChatConfigurationProvider, It as AttachmentModality, J as UseAgentUpdate, Jt as CopilotPopupProps, K as useAgentContext, Kt as useThreads, L as useLearnFromUserAction, Ln as CopilotChatConfigurationProviderProps, Lt as AttachmentsConfig, M as UseLearnFromUserActionInCurrentThreadRecorder, Mn as CopilotChatToolCallsViewProps, Mt as CopilotKitInspector, N as useLearnFromUserActionInCurrentThread, Nn as CopilotChatInput, Nt as CopilotKitInspectorProps, O as UseAttachmentsProps, On as CopilotChatUserMessageProps, Ot as MCPAppsActivityRenderer, P as LearnFromUserActionInput, Pn as CopilotChatInputProps, Pt as WildcardToolCallRender, Q as useRenderTool, Qt as CopilotPopupViewProps, R as UseMemoriesResult, Rn as CopilotChatConfigurationValue, Rt as CopilotChatAttachmentRenderer, S as MemoryScope, Sn as CopilotChatSuggestionViewProps, St as OpenGenerativeUIActivityType, T as useLearningContainersInCurrentThread, Tn as CopilotChatReasoningMessage, Tt as OpenGenerativeUIToolRenderer, U as useSuggestions, Un as CopilotChatAudioRecorder, Ut as Thread, V as useInterrupt, Vn as AudioRecorderError, Vt as CopilotThreadsDrawerProps, W as AgentContextInput, Wt as UseThreadsInput, X as useHumanInTheLoop, Xt as CopilotSidebarProps, Y as useAgent, Yt as CopilotSidebar, Z as useDefaultRenderTool, Zt as CopilotPopupView, _ as CopilotKitCoreReactConfig, _n as getIntelligenceTurnAnchors, _t as ReactCustomMessageRendererPosition, a as A2UIMessageRendererOptions, an as DefaultCloseIcon, at as InterruptEvent, b as MemoryChanges, bn as IntelligenceIndicatorViewProps, bt as GenerateSandboxedUiArgsSchema, c as InspectorAnchor, cn as CopilotChatProps, ct as InterruptResolveFn, d as CopilotKitProvider, dn as AutoScrollMode, dt as ReactHumanInTheLoop, en as CopilotSidebarViewProps, et as useFrontendTool, f as CopilotKitProviderProps, fn as CopilotChatMessageView, ft as ReactFrontendTool, g as CopilotKitCoreReact, gn as IntelligenceIndicatorProps, gt as ReactCustomMessageRenderer, h as useCopilotKit, hn as IntelligenceIndicator, ht as useRenderCustomMessages, i as A2UIActionInterceptor, in as CopilotChatToggleButtonProps, it as InterruptCancelFn, j as LearnFromUserActionInCurrentThreadInput, jn as CopilotChatToolCallsView, jt as ɵrunMcpFollowUp, k as UseAttachmentsReturn, kn as CopilotChatAssistantMessage, kt as MCPAppsActivityType, l as SandboxFunctionsContext, ln as CopilotChatView, lt as ResumeEntry, m as CopilotKitContextValue, mn as INTELLIGENCE_TURN_HEAD, mt as ReactToolCallRenderer, nn as CopilotModalHeaderProps, nt as SandboxFunction, o as A2UIUserAction, on as DefaultOpenIcon, ot as InterruptHandlerProps, p as A2UIRecoveryRendererOptions, pn as CopilotChatMessageViewProps, pt as ReactActivityMessageRenderer, q as useCapabilities, qt as CopilotPopup, r as CopilotKitProps, rn as CopilotChatToggleButton, rt as Interrupt, s as createA2UIMessageRenderer, sn as CopilotChat, st as InterruptRenderProps, t as CopilotKit, tn as CopilotModalHeader, tt as useRenderActivityMessage, u as useSandboxFunctions, un as CopilotChatViewProps, ut as defineToolCallRenderer, v as CopilotKitCoreReactSubscriber, vn as IntelligenceIndicatorStatus, vt as useRenderToolCall, w as UseLearningContainersInCurrentThreadArgs, wn as CopilotChatSuggestionPillProps, wt as OpenGenerativeUIContentSchema, x as MemoryKind, xn as CopilotChatSuggestionView, xt as OpenGenerativeUIActivityRenderer, y as Memory, yn as IntelligenceIndicatorView, yt as GenerateSandboxedUiArgs, z as useMemories, zn as CopilotChatLabels, zt as CopilotChatAttachmentQueue } from "../copilotkit-CBCT7BlL.cjs";
2
2
  import { Theme as A2UITheme, defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
3
3
  export * from "@copilotkit/core";
4
4
  export * from "@ag-ui/client";
@@ -1,4 +1,4 @@
1
- import { $ as useComponent, $t as CopilotSidebarView, A as useAttachments, An as CopilotChatAssistantMessageProps, At as ɵMcpFollowUpHost, B as UseInterruptConfig, Bn as useCopilotChatConfiguration, Bt as CopilotThreadsDrawer, C as NewMemory, Cn as CopilotChatSuggestionPill, Ct as OpenGenerativeUIContent, D as useLearningContainers, Dn as CopilotChatUserMessage, Dt as MCPAppsActivityContentSchema, E as UseLearningContainersArgs, En as CopilotChatReasoningMessageProps, Et as MCPAppsActivityContent, F as LearnFromUserActionResult, Fn as ToolsMenuItem, Ft as Attachment, G as JsonSerializable, Gt as UseThreadsResult, H as useConfigureSuggestions, Hn as AudioRecorderState, Ht as CopilotThreadsDrawerRowRenderer, I as UseLearnFromUserActionRecorder, In as CopilotChatConfigurationProvider, It as AttachmentModality, J as UseAgentUpdate, Jt as CopilotPopupProps, K as useAgentContext, Kt as useThreads, L as useLearnFromUserAction, Ln as CopilotChatConfigurationProviderProps, Lt as AttachmentsConfig, M as UseLearnFromUserActionInCurrentThreadRecorder, Mn as CopilotChatToolCallsViewProps, Mt as CopilotKitInspector, N as useLearnFromUserActionInCurrentThread, Nn as CopilotChatInput, Nt as CopilotKitInspectorProps, O as UseAttachmentsProps, On as CopilotChatUserMessageProps, Ot as MCPAppsActivityRenderer, P as LearnFromUserActionInput, Pn as CopilotChatInputProps, Pt as WildcardToolCallRender, Q as useRenderTool, Qt as CopilotPopupViewProps, R as UseMemoriesResult, Rn as CopilotChatConfigurationValue, Rt as CopilotChatAttachmentRenderer, S as MemoryScope, Sn as CopilotChatSuggestionViewProps, St as OpenGenerativeUIActivityType, T as useLearningContainersInCurrentThread, Tn as CopilotChatReasoningMessage, Tt as OpenGenerativeUIToolRenderer, U as useSuggestions, Un as CopilotChatAudioRecorder, Ut as Thread, V as useInterrupt, Vn as AudioRecorderError, Vt as CopilotThreadsDrawerProps, W as AgentContextInput, Wt as UseThreadsInput, X as useHumanInTheLoop, Xt as CopilotSidebarProps, Y as useAgent, Yt as CopilotSidebar, Z as useDefaultRenderTool, Zt as CopilotPopupView, _ as CopilotKitCoreReactConfig, _n as getIntelligenceTurnAnchors, _t as ReactCustomMessageRendererPosition, a as A2UIMessageRendererOptions, an as DefaultCloseIcon, at as InterruptEvent, b as MemoryChanges, bn as IntelligenceIndicatorViewProps, bt as GenerateSandboxedUiArgsSchema, c as InspectorAnchor, cn as CopilotChatProps, ct as InterruptResolveFn, d as CopilotKitProvider, dn as AutoScrollMode, dt as ReactHumanInTheLoop, en as CopilotSidebarViewProps, et as useFrontendTool, f as CopilotKitProviderProps, fn as CopilotChatMessageView, ft as ReactFrontendTool, g as CopilotKitCoreReact, gn as IntelligenceIndicatorProps, gt as ReactCustomMessageRenderer, h as useCopilotKit, hn as IntelligenceIndicator, ht as useRenderCustomMessages, i as A2UIActionInterceptor, in as CopilotChatToggleButtonProps, it as InterruptCancelFn, j as LearnFromUserActionInCurrentThreadInput, jn as CopilotChatToolCallsView, jt as ɵrunMcpFollowUp, k as UseAttachmentsReturn, kn as CopilotChatAssistantMessage, kt as MCPAppsActivityType, l as SandboxFunctionsContext, ln as CopilotChatView, lt as ResumeEntry, m as CopilotKitContextValue, mn as INTELLIGENCE_TURN_HEAD, mt as ReactToolCallRenderer, nn as CopilotModalHeaderProps, nt as SandboxFunction, o as A2UIUserAction, on as DefaultOpenIcon, ot as InterruptHandlerProps, p as A2UIRecoveryRendererOptions, pn as CopilotChatMessageViewProps, pt as ReactActivityMessageRenderer, q as useCapabilities, qt as CopilotPopup, r as CopilotKitProps, rn as CopilotChatToggleButton, rt as Interrupt, s as createA2UIMessageRenderer, sn as CopilotChat, st as InterruptRenderProps, t as CopilotKit, tn as CopilotModalHeader, tt as useRenderActivityMessage, u as useSandboxFunctions, un as CopilotChatViewProps, ut as defineToolCallRenderer, v as CopilotKitCoreReactSubscriber, vn as IntelligenceIndicatorStatus, vt as useRenderToolCall, w as UseLearningContainersInCurrentThreadArgs, wn as CopilotChatSuggestionPillProps, wt as OpenGenerativeUIContentSchema, x as MemoryKind, xn as CopilotChatSuggestionView, xt as OpenGenerativeUIActivityRenderer, y as Memory, yn as IntelligenceIndicatorView, yt as GenerateSandboxedUiArgs, z as useMemories, zn as CopilotChatLabels, zt as CopilotChatAttachmentQueue } from "../copilotkit-BE1n5tSI.mjs";
1
+ import { $ as useComponent, $t as CopilotSidebarView, A as useAttachments, An as CopilotChatAssistantMessageProps, At as ɵMcpFollowUpHost, B as UseInterruptConfig, Bn as useCopilotChatConfiguration, Bt as CopilotThreadsDrawer, C as NewMemory, Cn as CopilotChatSuggestionPill, Ct as OpenGenerativeUIContent, D as useLearningContainers, Dn as CopilotChatUserMessage, Dt as MCPAppsActivityContentSchema, E as UseLearningContainersArgs, En as CopilotChatReasoningMessageProps, Et as MCPAppsActivityContent, F as LearnFromUserActionResult, Fn as ToolsMenuItem, Ft as Attachment, G as JsonSerializable, Gt as UseThreadsResult, H as useConfigureSuggestions, Hn as AudioRecorderState, Ht as CopilotThreadsDrawerRowRenderer, I as UseLearnFromUserActionRecorder, In as CopilotChatConfigurationProvider, It as AttachmentModality, J as UseAgentUpdate, Jt as CopilotPopupProps, K as useAgentContext, Kt as useThreads, L as useLearnFromUserAction, Ln as CopilotChatConfigurationProviderProps, Lt as AttachmentsConfig, M as UseLearnFromUserActionInCurrentThreadRecorder, Mn as CopilotChatToolCallsViewProps, Mt as CopilotKitInspector, N as useLearnFromUserActionInCurrentThread, Nn as CopilotChatInput, Nt as CopilotKitInspectorProps, O as UseAttachmentsProps, On as CopilotChatUserMessageProps, Ot as MCPAppsActivityRenderer, P as LearnFromUserActionInput, Pn as CopilotChatInputProps, Pt as WildcardToolCallRender, Q as useRenderTool, Qt as CopilotPopupViewProps, R as UseMemoriesResult, Rn as CopilotChatConfigurationValue, Rt as CopilotChatAttachmentRenderer, S as MemoryScope, Sn as CopilotChatSuggestionViewProps, St as OpenGenerativeUIActivityType, T as useLearningContainersInCurrentThread, Tn as CopilotChatReasoningMessage, Tt as OpenGenerativeUIToolRenderer, U as useSuggestions, Un as CopilotChatAudioRecorder, Ut as Thread, V as useInterrupt, Vn as AudioRecorderError, Vt as CopilotThreadsDrawerProps, W as AgentContextInput, Wt as UseThreadsInput, X as useHumanInTheLoop, Xt as CopilotSidebarProps, Y as useAgent, Yt as CopilotSidebar, Z as useDefaultRenderTool, Zt as CopilotPopupView, _ as CopilotKitCoreReactConfig, _n as getIntelligenceTurnAnchors, _t as ReactCustomMessageRendererPosition, a as A2UIMessageRendererOptions, an as DefaultCloseIcon, at as InterruptEvent, b as MemoryChanges, bn as IntelligenceIndicatorViewProps, bt as GenerateSandboxedUiArgsSchema, c as InspectorAnchor, cn as CopilotChatProps, ct as InterruptResolveFn, d as CopilotKitProvider, dn as AutoScrollMode, dt as ReactHumanInTheLoop, en as CopilotSidebarViewProps, et as useFrontendTool, f as CopilotKitProviderProps, fn as CopilotChatMessageView, ft as ReactFrontendTool, g as CopilotKitCoreReact, gn as IntelligenceIndicatorProps, gt as ReactCustomMessageRenderer, h as useCopilotKit, hn as IntelligenceIndicator, ht as useRenderCustomMessages, i as A2UIActionInterceptor, in as CopilotChatToggleButtonProps, it as InterruptCancelFn, j as LearnFromUserActionInCurrentThreadInput, jn as CopilotChatToolCallsView, jt as ɵrunMcpFollowUp, k as UseAttachmentsReturn, kn as CopilotChatAssistantMessage, kt as MCPAppsActivityType, l as SandboxFunctionsContext, ln as CopilotChatView, lt as ResumeEntry, m as CopilotKitContextValue, mn as INTELLIGENCE_TURN_HEAD, mt as ReactToolCallRenderer, nn as CopilotModalHeaderProps, nt as SandboxFunction, o as A2UIUserAction, on as DefaultOpenIcon, ot as InterruptHandlerProps, p as A2UIRecoveryRendererOptions, pn as CopilotChatMessageViewProps, pt as ReactActivityMessageRenderer, q as useCapabilities, qt as CopilotPopup, r as CopilotKitProps, rn as CopilotChatToggleButton, rt as Interrupt, s as createA2UIMessageRenderer, sn as CopilotChat, st as InterruptRenderProps, t as CopilotKit, tn as CopilotModalHeader, tt as useRenderActivityMessage, u as useSandboxFunctions, un as CopilotChatViewProps, ut as defineToolCallRenderer, v as CopilotKitCoreReactSubscriber, vn as IntelligenceIndicatorStatus, vt as useRenderToolCall, w as UseLearningContainersInCurrentThreadArgs, wn as CopilotChatSuggestionPillProps, wt as OpenGenerativeUIContentSchema, x as MemoryKind, xn as CopilotChatSuggestionView, xt as OpenGenerativeUIActivityRenderer, y as Memory, yn as IntelligenceIndicatorView, yt as GenerateSandboxedUiArgs, z as useMemories, zn as CopilotChatLabels, zt as CopilotChatAttachmentQueue } from "../copilotkit-D0aAnD3i.mjs";
2
2
  import { Theme as A2UITheme, defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
3
3
  export * from "@copilotkit/core";
4
4
  export * from "@ag-ui/client";
package/dist/v2/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import { $ as useCapabilities, A as CopilotChatMessageView, At as CopilotChatConfigurationProvider, B as CopilotChatAssistantMessage_default, C as CopilotModalHeader, Ct as CopilotKitInspector, D as CopilotChat, Dt as CopilotChatInput_default, E as DefaultOpenIcon, Et as CopilotKitCoreReact, F as CopilotChatSuggestionView, G as useLearnFromUserActionInCurrentThread, H as useLearningContainersInCurrentThread, I as CopilotChatSuggestionPill, J as useThreads, K as useLearnFromUserAction, L as CopilotChatReasoningMessage_default, M as IntelligenceIndicator, N as getIntelligenceTurnAnchors, O as CopilotChatView_default, Ot as AudioRecorderError, P as IntelligenceIndicatorView, Q as useAgentContext, R as CopilotChatUserMessage_default, S as CopilotSidebarView, St as ɵrunMcpFollowUp, T as DefaultCloseIcon, Tt as useCopilotKit, U as useLearningContainers, V as CopilotChatToolCallsView, W as useAttachments, X as useConfigureSuggestions, Y as useInterrupt, Z as useSuggestions, _ as WildcardToolCallRender, _t as SandboxFunctionsContext, at as useComponent, b as CopilotSidebar, bt as MCPAppsActivityRenderer, ct as useRenderCustomMessages, dt as createA2UIMessageRenderer, et as UseAgentUpdate, ft as GenerateSandboxedUiArgsSchema, gt as OpenGenerativeUIToolRenderer, ht as OpenGenerativeUIContentSchema, it as useRenderTool, j as INTELLIGENCE_TURN_HEAD, jt as useCopilotChatConfiguration, k as CopilotChatAttachmentQueue, kt as CopilotChatAudioRecorder, lt as CopilotKitProvider, mt as OpenGenerativeUIActivityType, nt as useHumanInTheLoop, ot as useFrontendTool, pt as OpenGenerativeUIActivityRenderer, q as useMemories, rt as useDefaultRenderTool, st as useRenderActivityMessage, t as CopilotKit, tt as useAgent, ut as defineToolCallRenderer, v as CopilotThreadsDrawer, vt as useSandboxFunctions, w as CopilotChatToggleButton, wt as useRenderToolCall, x as CopilotPopupView, xt as MCPAppsActivityType, y as CopilotPopup, yt as MCPAppsActivityContentSchema, z as CopilotChatAttachmentRenderer } from "../copilotkit-D_Ao1X-u.mjs";
3
+ import { $ as useCapabilities, A as CopilotChatMessageView, At as CopilotChatConfigurationProvider, B as CopilotChatAssistantMessage_default, C as CopilotModalHeader, Ct as CopilotKitInspector, D as CopilotChat, Dt as CopilotChatInput_default, E as DefaultOpenIcon, Et as CopilotKitCoreReact, F as CopilotChatSuggestionView, G as useLearnFromUserActionInCurrentThread, H as useLearningContainersInCurrentThread, I as CopilotChatSuggestionPill, J as useThreads, K as useLearnFromUserAction, L as CopilotChatReasoningMessage_default, M as IntelligenceIndicator, N as getIntelligenceTurnAnchors, O as CopilotChatView_default, Ot as AudioRecorderError, P as IntelligenceIndicatorView, Q as useAgentContext, R as CopilotChatUserMessage_default, S as CopilotSidebarView, St as ɵrunMcpFollowUp, T as DefaultCloseIcon, Tt as useCopilotKit, U as useLearningContainers, V as CopilotChatToolCallsView, W as useAttachments, X as useConfigureSuggestions, Y as useInterrupt, Z as useSuggestions, _ as WildcardToolCallRender, _t as SandboxFunctionsContext, at as useComponent, b as CopilotSidebar, bt as MCPAppsActivityRenderer, ct as useRenderCustomMessages, dt as createA2UIMessageRenderer, et as UseAgentUpdate, ft as GenerateSandboxedUiArgsSchema, gt as OpenGenerativeUIToolRenderer, ht as OpenGenerativeUIContentSchema, it as useRenderTool, j as INTELLIGENCE_TURN_HEAD, jt as useCopilotChatConfiguration, k as CopilotChatAttachmentQueue, kt as CopilotChatAudioRecorder, lt as CopilotKitProvider, mt as OpenGenerativeUIActivityType, nt as useHumanInTheLoop, ot as useFrontendTool, pt as OpenGenerativeUIActivityRenderer, q as useMemories, rt as useDefaultRenderTool, st as useRenderActivityMessage, t as CopilotKit, tt as useAgent, ut as defineToolCallRenderer, v as CopilotThreadsDrawer, vt as useSandboxFunctions, w as CopilotChatToggleButton, wt as useRenderToolCall, x as CopilotPopupView, xt as MCPAppsActivityType, y as CopilotPopup, yt as MCPAppsActivityContentSchema, z as CopilotChatAttachmentRenderer } from "../copilotkit-DnlgZWST.mjs";
4
4
  import "./index.css";
5
5
  import { defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
6
6
 
@@ -2101,6 +2101,8 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
2101
2101
  iframe.style.backgroundColor = "transparent";
2102
2102
  iframe.style.display = "block";
2103
2103
  iframe.setAttribute("sandbox", "allow-scripts allow-same-origin allow-forms");
2104
+ iframe.setAttribute("data-testid", "mcp-app-iframe");
2105
+ iframe.setAttribute("title", "Interactive MCP application");
2104
2106
  const sandboxReady = new Promise((resolve) => {
2105
2107
  initialListener = (event) => {
2106
2108
  if (event.source === iframe.contentWindow) {
@@ -3507,6 +3509,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
3507
3509
  const [shouldRenderInspector, setShouldRenderInspector] = (0, react.useState)(false);
3508
3510
  const [runtimeA2UIEnabled, setRuntimeA2UIEnabled] = (0, react.useState)(false);
3509
3511
  const [runtimeOpenGenUIEnabled, setRuntimeOpenGenUIEnabled] = (0, react.useState)(false);
3512
+ const [catalogToggleVersion, setCatalogToggleVersion] = (0, react.useState)(0);
3510
3513
  const openGenUIActive = runtimeOpenGenUIEnabled || !!openGenerativeUI;
3511
3514
  const a2uiCatalogProvided = !!a2ui?.catalog;
3512
3515
  const a2uiActive = runtimeA2UIEnabled || a2uiCatalogProvided;
@@ -3529,6 +3532,14 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
3529
3532
  });
3530
3533
  const renderCustomMessagesList = useStableArrayProp(renderCustomMessages, "renderCustomMessages must be a stable array.");
3531
3534
  const renderActivityMessagesList = useStableArrayProp(renderActivityMessages, "renderActivityMessages must be a stable array.");
3535
+ const copilotkitRef = (0, react.useRef)(null);
3536
+ const rawCatalog = a2ui?.catalog;
3537
+ const filteredCatalog = (0, react.useMemo)(() => {
3538
+ if (!rawCatalog) return rawCatalog;
3539
+ if (!(rawCatalog instanceof _copilotkit_a2ui_renderer.Catalog)) return rawCatalog;
3540
+ const core = copilotkitRef.current;
3541
+ return (0, _copilotkit_a2ui_renderer.filterCatalog)(rawCatalog, (name) => core ? core.isCatalogComponentEnabled(name) : true);
3542
+ }, [rawCatalog, catalogToggleVersion]);
3532
3543
  const builtInActivityRenderers = (0, react.useMemo)(() => {
3533
3544
  const renderers = [{
3534
3545
  activityType: MCPAppsActivityType,
@@ -3542,7 +3553,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
3542
3553
  });
3543
3554
  if (a2uiActive) renderers.unshift(createA2UIMessageRenderer({
3544
3555
  theme: a2ui?.theme ?? _copilotkit_a2ui_renderer.viewerTheme,
3545
- catalog: a2ui?.catalog,
3556
+ catalog: filteredCatalog,
3546
3557
  loadingComponent: a2ui?.loadingComponent,
3547
3558
  recovery: a2ui?.recovery
3548
3559
  }));
@@ -3550,7 +3561,8 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
3550
3561
  }, [
3551
3562
  a2uiActive,
3552
3563
  openGenUIActive,
3553
- a2ui
3564
+ a2ui,
3565
+ filteredCatalog
3554
3566
  ]);
3555
3567
  const allActivityRenderers = (0, react.useMemo)(() => {
3556
3568
  return [...renderActivityMessagesList, ...builtInActivityRenderers];
@@ -3655,7 +3667,6 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
3655
3667
  builtInFrontendTools,
3656
3668
  processedHumanInTheLoopTools
3657
3669
  ]);
3658
- const copilotkitRef = (0, react.useRef)(null);
3659
3670
  if (copilotkitRef.current === null) {
3660
3671
  copilotkitRef.current = new CopilotKitCoreReact({
3661
3672
  runtimeUrl: chatApiEndpoint,
@@ -3674,6 +3685,20 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
3674
3685
  if (defaultThrottleMs !== void 0) copilotkitRef.current.setDefaultThrottleMs(defaultThrottleMs);
3675
3686
  }
3676
3687
  const copilotkit = copilotkitRef.current;
3688
+ (0, react.useEffect)(() => {
3689
+ if (!rawCatalog) return;
3690
+ if (!(rawCatalog instanceof _copilotkit_a2ui_renderer.Catalog)) return;
3691
+ const components = Array.from(rawCatalog.components.values()).map((comp) => ({
3692
+ name: comp.name,
3693
+ description: void 0,
3694
+ schema: comp.schema
3695
+ }));
3696
+ copilotkit.setCatalogComponents(components);
3697
+ const subscription = copilotkit.subscribe({ onCatalogComponentsChanged: () => {
3698
+ setCatalogToggleVersion((v) => v + 1);
3699
+ } });
3700
+ return () => subscription.unsubscribe();
3701
+ }, [copilotkit, rawCatalog]);
3677
3702
  (0, react.useEffect)(() => {
3678
3703
  const syncRuntimeInfo = () => {
3679
3704
  setRuntimeA2UIEnabled(copilotkit.a2uiEnabled);
@@ -3829,7 +3854,7 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
3829
3854
  children: [
3830
3855
  a2uiActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(A2UIBuiltInToolCallRenderer, {}),
3831
3856
  a2uiActive && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(A2UICatalogContext, {
3832
- catalog: a2ui?.catalog,
3857
+ catalog: filteredCatalog,
3833
3858
  includeSchema: a2ui?.includeSchema
3834
3859
  }),
3835
3860
  children,
@@ -4407,7 +4432,10 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
4407
4432
  UseAgentUpdate.OnStateChanged,
4408
4433
  UseAgentUpdate.OnRunStatusChanged
4409
4434
  ];
4410
- function useAgent({ agentId, updates, throttleMs } = {}) {
4435
+ function useAgent({ agentId, threadId, runtimeAgentId, updates, throttleMs } = {}) {
4436
+ if (threadId != null && runtimeAgentId == null) throw new Error(`useAgent: \`threadId\` requires \`runtimeAgentId\`. A threadId is written onto a single agent, but an agent resolved by agentId alone is shared, so scoping a thread to it would clobber other useAgent callers. Pass a distinct local \`agentId\` and the runtime agent to route to, e.g. useAgent({ agentId: "chat-1", runtimeAgentId: "${agentId ?? "default"}", threadId }).`);
4437
+ if (runtimeAgentId != null && threadId == null) throw new Error(`useAgent: \`runtimeAgentId\` requires \`threadId\`. A proxied agent exists to scope a thread to a private instance; without a threadId it behaves like the shared agent while adding a registration and a local agentId to keep unique. Either pass the thread, e.g. useAgent({ agentId: "${agentId ?? "chat-1"}", runtimeAgentId: "${runtimeAgentId}", threadId }), or bind to the agent directly with useAgent({ agentId: "${runtimeAgentId}" }).`);
4438
+ if (runtimeAgentId != null && agentId == null) throw new Error(`useAgent: \`runtimeAgentId\` requires an explicit \`agentId\`. The proxied agent is registered under \`agentId\`, and the usual fallbacks (chat configuration, then "${_copilotkit_shared.DEFAULT_AGENT_ID}") name agents that already exist — registering over one throws or shadows it. Pick a local id for this hook, e.g. useAgent({ agentId: "chat-1", runtimeAgentId: "${runtimeAgentId}", threadId }).`);
4411
4439
  const chatConfig = useCopilotChatConfiguration();
4412
4440
  const resolvedAgentId = agentId ?? chatConfig?.agentId ?? _copilotkit_shared.DEFAULT_AGENT_ID;
4413
4441
  const { copilotkit } = useCopilotKit();
@@ -4415,7 +4443,58 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
4415
4443
  const [, forceUpdate] = (0, react.useReducer)((x) => x + 1, 0);
4416
4444
  const updateFlags = (0, react.useMemo)(() => updates ?? ALL_UPDATES, [JSON.stringify(updates)]);
4417
4445
  const provisionalAgentCache = (0, react.useRef)(/* @__PURE__ */ new Map());
4446
+ const [registeredProxyAgent, setRegisteredProxyAgent] = (0, react.useState)(null);
4447
+ (0, react.useEffect)(() => {
4448
+ if (runtimeAgentId == null) {
4449
+ setRegisteredProxyAgent(null);
4450
+ return;
4451
+ }
4452
+ const { agent: proxy, unregister } = copilotkit.registerProxiedAgent({
4453
+ agentId: resolvedAgentId,
4454
+ runtimeAgentId
4455
+ });
4456
+ provisionalAgentCache.current.delete(resolvedAgentId);
4457
+ setRegisteredProxyAgent(proxy);
4458
+ return () => {
4459
+ unregister();
4460
+ setRegisteredProxyAgent(null);
4461
+ };
4462
+ }, [
4463
+ copilotkit,
4464
+ resolvedAgentId,
4465
+ runtimeAgentId
4466
+ ]);
4418
4467
  const { agent, isReady } = (0, react.useMemo)(() => {
4468
+ if (runtimeAgentId != null) {
4469
+ if (registeredProxyAgent) {
4470
+ provisionalAgentCache.current.delete(resolvedAgentId);
4471
+ return {
4472
+ agent: registeredProxyAgent,
4473
+ isReady: true
4474
+ };
4475
+ }
4476
+ const cached = provisionalAgentCache.current.get(resolvedAgentId);
4477
+ if (cached) {
4478
+ copilotkit.applyHeadersToAgent(cached);
4479
+ return {
4480
+ agent: cached,
4481
+ isReady: false
4482
+ };
4483
+ }
4484
+ const provisional = new _copilotkit_core.ProxiedCopilotRuntimeAgent({
4485
+ runtimeUrl: copilotkit.runtimeUrl,
4486
+ agentId: resolvedAgentId,
4487
+ runtimeAgentId,
4488
+ transport: copilotkit.runtimeTransport,
4489
+ runtimeMode: "pending"
4490
+ });
4491
+ copilotkit.applyHeadersToAgent(provisional);
4492
+ provisionalAgentCache.current.set(resolvedAgentId, provisional);
4493
+ return {
4494
+ agent: provisional,
4495
+ isReady: false
4496
+ };
4497
+ }
4419
4498
  const existing = copilotkit.getAgent(resolvedAgentId);
4420
4499
  if (existing) {
4421
4500
  provisionalAgentCache.current.delete(resolvedAgentId);
@@ -4471,6 +4550,8 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
4471
4550
  throw new Error(`useAgent: Agent '${resolvedAgentId}' not found after runtime sync (${runtimePart}). ` + (knownAgents.length ? `Known agents: [${knownAgents.join(", ")}]` : "No agents registered.") + " Verify your runtime /info and/or agents__unsafe_dev_only.");
4472
4551
  }, [
4473
4552
  resolvedAgentId,
4553
+ runtimeAgentId,
4554
+ registeredProxyAgent,
4474
4555
  copilotkit.agents,
4475
4556
  copilotkit.runtimeConnectionStatus,
4476
4557
  copilotkit.runtimeUrl,
@@ -4523,14 +4604,11 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
4523
4604
  ]);
4524
4605
  const configThreadId = chatConfig?.threadId;
4525
4606
  const configHasExplicitThreadId = chatConfig?.hasExplicitThreadId;
4607
+ const resolvedThreadId = threadId ?? (configHasExplicitThreadId ? configThreadId : void 0);
4526
4608
  (0, react.useEffect)(() => {
4527
- if (!configHasExplicitThreadId || !configThreadId) return;
4528
- agent.threadId = configThreadId;
4529
- }, [
4530
- agent,
4531
- configThreadId,
4532
- configHasExplicitThreadId
4533
- ]);
4609
+ if (!resolvedThreadId) return;
4610
+ agent.threadId = resolvedThreadId;
4611
+ }, [agent, resolvedThreadId]);
4534
4612
  return {
4535
4613
  agent,
4536
4614
  isReady