@copilotkit/react-core 1.64.0 → 1.64.2-canary.1785346263
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/{copilotkit-DiLTL1ZM.cjs → copilotkit-BrNiD3wI.cjs} +64 -9
- package/dist/copilotkit-BrNiD3wI.cjs.map +1 -0
- package/dist/{copilotkit-D_Ao1X-u.mjs → copilotkit-BrZGzZw6.mjs} +64 -9
- package/dist/copilotkit-BrZGzZw6.mjs.map +1 -0
- package/dist/{copilotkit-CXvuYw_F.d.cts → copilotkit-CBCT7BlL.d.cts} +90 -7
- package/dist/{copilotkit-BE1n5tSI.d.mts.map → copilotkit-CBCT7BlL.d.cts.map} +1 -1
- package/dist/{copilotkit-BE1n5tSI.d.mts → copilotkit-D0aAnD3i.d.mts} +90 -7
- package/dist/{copilotkit-CXvuYw_F.d.cts.map → copilotkit-D0aAnD3i.d.mts.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.umd.js +63 -8
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/headless.cjs +61 -8
- package/dist/v2/headless.cjs.map +1 -1
- package/dist/v2/headless.d.cts +89 -6
- package/dist/v2/headless.d.cts.map +1 -1
- package/dist/v2/headless.d.mts +89 -6
- package/dist/v2/headless.d.mts.map +1 -1
- package/dist/v2/headless.mjs +61 -8
- package/dist/v2/headless.mjs.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.d.cts +1 -1
- package/dist/v2/index.d.mts +1 -1
- package/dist/v2/index.mjs +1 -1
- package/dist/v2/index.umd.js +63 -8
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +7 -7
- package/dist/copilotkit-D_Ao1X-u.mjs.map +0 -1
- package/dist/copilotkit-DiLTL1ZM.cjs.map +0 -1
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-
|
|
4
|
+
const require_copilotkit = require('../copilotkit-BrNiD3wI.cjs');
|
|
5
5
|
require("./index.css");
|
|
6
6
|
let _copilotkit_a2ui_renderer = require("@copilotkit/a2ui-renderer");
|
|
7
7
|
|
package/dist/v2/index.d.cts
CHANGED
|
@@ -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-
|
|
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";
|
package/dist/v2/index.d.mts
CHANGED
|
@@ -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-
|
|
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-
|
|
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-BrZGzZw6.mjs";
|
|
4
4
|
import "./index.css";
|
|
5
5
|
import { defaultTheme as a2uiDefaultTheme } from "@copilotkit/a2ui-renderer";
|
|
6
6
|
|
package/dist/v2/index.umd.js
CHANGED
|
@@ -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) {
|
|
@@ -4407,7 +4409,10 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4407
4409
|
UseAgentUpdate.OnStateChanged,
|
|
4408
4410
|
UseAgentUpdate.OnRunStatusChanged
|
|
4409
4411
|
];
|
|
4410
|
-
function useAgent({ agentId, updates, throttleMs } = {}) {
|
|
4412
|
+
function useAgent({ agentId, threadId, runtimeAgentId, updates, throttleMs } = {}) {
|
|
4413
|
+
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 }).`);
|
|
4414
|
+
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}" }).`);
|
|
4415
|
+
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
4416
|
const chatConfig = useCopilotChatConfiguration();
|
|
4412
4417
|
const resolvedAgentId = agentId ?? chatConfig?.agentId ?? _copilotkit_shared.DEFAULT_AGENT_ID;
|
|
4413
4418
|
const { copilotkit } = useCopilotKit();
|
|
@@ -4415,7 +4420,58 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4415
4420
|
const [, forceUpdate] = (0, react.useReducer)((x) => x + 1, 0);
|
|
4416
4421
|
const updateFlags = (0, react.useMemo)(() => updates ?? ALL_UPDATES, [JSON.stringify(updates)]);
|
|
4417
4422
|
const provisionalAgentCache = (0, react.useRef)(/* @__PURE__ */ new Map());
|
|
4423
|
+
const [registeredProxyAgent, setRegisteredProxyAgent] = (0, react.useState)(null);
|
|
4424
|
+
(0, react.useEffect)(() => {
|
|
4425
|
+
if (runtimeAgentId == null) {
|
|
4426
|
+
setRegisteredProxyAgent(null);
|
|
4427
|
+
return;
|
|
4428
|
+
}
|
|
4429
|
+
const { agent: proxy, unregister } = copilotkit.registerProxiedAgent({
|
|
4430
|
+
agentId: resolvedAgentId,
|
|
4431
|
+
runtimeAgentId
|
|
4432
|
+
});
|
|
4433
|
+
provisionalAgentCache.current.delete(resolvedAgentId);
|
|
4434
|
+
setRegisteredProxyAgent(proxy);
|
|
4435
|
+
return () => {
|
|
4436
|
+
unregister();
|
|
4437
|
+
setRegisteredProxyAgent(null);
|
|
4438
|
+
};
|
|
4439
|
+
}, [
|
|
4440
|
+
copilotkit,
|
|
4441
|
+
resolvedAgentId,
|
|
4442
|
+
runtimeAgentId
|
|
4443
|
+
]);
|
|
4418
4444
|
const { agent, isReady } = (0, react.useMemo)(() => {
|
|
4445
|
+
if (runtimeAgentId != null) {
|
|
4446
|
+
if (registeredProxyAgent) {
|
|
4447
|
+
provisionalAgentCache.current.delete(resolvedAgentId);
|
|
4448
|
+
return {
|
|
4449
|
+
agent: registeredProxyAgent,
|
|
4450
|
+
isReady: true
|
|
4451
|
+
};
|
|
4452
|
+
}
|
|
4453
|
+
const cached = provisionalAgentCache.current.get(resolvedAgentId);
|
|
4454
|
+
if (cached) {
|
|
4455
|
+
copilotkit.applyHeadersToAgent(cached);
|
|
4456
|
+
return {
|
|
4457
|
+
agent: cached,
|
|
4458
|
+
isReady: false
|
|
4459
|
+
};
|
|
4460
|
+
}
|
|
4461
|
+
const provisional = new _copilotkit_core.ProxiedCopilotRuntimeAgent({
|
|
4462
|
+
runtimeUrl: copilotkit.runtimeUrl,
|
|
4463
|
+
agentId: resolvedAgentId,
|
|
4464
|
+
runtimeAgentId,
|
|
4465
|
+
transport: copilotkit.runtimeTransport,
|
|
4466
|
+
runtimeMode: "pending"
|
|
4467
|
+
});
|
|
4468
|
+
copilotkit.applyHeadersToAgent(provisional);
|
|
4469
|
+
provisionalAgentCache.current.set(resolvedAgentId, provisional);
|
|
4470
|
+
return {
|
|
4471
|
+
agent: provisional,
|
|
4472
|
+
isReady: false
|
|
4473
|
+
};
|
|
4474
|
+
}
|
|
4419
4475
|
const existing = copilotkit.getAgent(resolvedAgentId);
|
|
4420
4476
|
if (existing) {
|
|
4421
4477
|
provisionalAgentCache.current.delete(resolvedAgentId);
|
|
@@ -4471,6 +4527,8 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4471
4527
|
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
4528
|
}, [
|
|
4473
4529
|
resolvedAgentId,
|
|
4530
|
+
runtimeAgentId,
|
|
4531
|
+
registeredProxyAgent,
|
|
4474
4532
|
copilotkit.agents,
|
|
4475
4533
|
copilotkit.runtimeConnectionStatus,
|
|
4476
4534
|
copilotkit.runtimeUrl,
|
|
@@ -4523,14 +4581,11 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
4523
4581
|
]);
|
|
4524
4582
|
const configThreadId = chatConfig?.threadId;
|
|
4525
4583
|
const configHasExplicitThreadId = chatConfig?.hasExplicitThreadId;
|
|
4584
|
+
const resolvedThreadId = threadId ?? (configHasExplicitThreadId ? configThreadId : void 0);
|
|
4526
4585
|
(0, react.useEffect)(() => {
|
|
4527
|
-
if (!
|
|
4528
|
-
agent.threadId =
|
|
4529
|
-
}, [
|
|
4530
|
-
agent,
|
|
4531
|
-
configThreadId,
|
|
4532
|
-
configHasExplicitThreadId
|
|
4533
|
-
]);
|
|
4586
|
+
if (!resolvedThreadId) return;
|
|
4587
|
+
agent.threadId = resolvedThreadId;
|
|
4588
|
+
}, [agent, resolvedThreadId]);
|
|
4534
4589
|
return {
|
|
4535
4590
|
agent,
|
|
4536
4591
|
isReady
|