@copilotkitnext/react 0.0.33 → 0.0.34-pr.fix-express-endpoint

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.d.mts CHANGED
@@ -400,6 +400,88 @@ interface CopilotKitInspectorProps extends CopilotKitInspectorBaseProps {
400
400
  }
401
401
  declare const CopilotKitInspector: React$1.FC<CopilotKitInspectorProps>;
402
402
 
403
+ /**
404
+ * Activity type for MCP Apps events - must match the middleware's MCPAppsActivityType
405
+ */
406
+ declare const MCPAppsActivityType = "mcp-apps";
407
+ declare const MCPAppsActivityContentSchema: z.ZodObject<{
408
+ result: z.ZodObject<{
409
+ content: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
410
+ structuredContent: z.ZodOptional<z.ZodAny>;
411
+ isError: z.ZodOptional<z.ZodBoolean>;
412
+ }, "strip", z.ZodTypeAny, {
413
+ content?: any[] | undefined;
414
+ structuredContent?: any;
415
+ isError?: boolean | undefined;
416
+ }, {
417
+ content?: any[] | undefined;
418
+ structuredContent?: any;
419
+ isError?: boolean | undefined;
420
+ }>;
421
+ resource: z.ZodObject<{
422
+ uri: z.ZodString;
423
+ mimeType: z.ZodOptional<z.ZodString>;
424
+ text: z.ZodOptional<z.ZodString>;
425
+ blob: z.ZodOptional<z.ZodString>;
426
+ }, "strip", z.ZodTypeAny, {
427
+ uri: string;
428
+ text?: string | undefined;
429
+ mimeType?: string | undefined;
430
+ blob?: string | undefined;
431
+ }, {
432
+ uri: string;
433
+ text?: string | undefined;
434
+ mimeType?: string | undefined;
435
+ blob?: string | undefined;
436
+ }>;
437
+ serverId: z.ZodOptional<z.ZodString>;
438
+ toolInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
439
+ }, "strip", z.ZodTypeAny, {
440
+ resource: {
441
+ uri: string;
442
+ text?: string | undefined;
443
+ mimeType?: string | undefined;
444
+ blob?: string | undefined;
445
+ };
446
+ result: {
447
+ content?: any[] | undefined;
448
+ structuredContent?: any;
449
+ isError?: boolean | undefined;
450
+ };
451
+ serverId?: string | undefined;
452
+ toolInput?: Record<string, unknown> | undefined;
453
+ }, {
454
+ resource: {
455
+ uri: string;
456
+ text?: string | undefined;
457
+ mimeType?: string | undefined;
458
+ blob?: string | undefined;
459
+ };
460
+ result: {
461
+ content?: any[] | undefined;
462
+ structuredContent?: any;
463
+ isError?: boolean | undefined;
464
+ };
465
+ serverId?: string | undefined;
466
+ toolInput?: Record<string, unknown> | undefined;
467
+ }>;
468
+ type MCPAppsActivityContent = z.infer<typeof MCPAppsActivityContentSchema>;
469
+ /**
470
+ * Props for the activity renderer component
471
+ */
472
+ interface MCPAppsActivityRendererProps {
473
+ activityType: string;
474
+ content: MCPAppsActivityContent;
475
+ message: unknown;
476
+ agent: AbstractAgent | undefined;
477
+ }
478
+ /**
479
+ * MCP Apps Extension Activity Renderer
480
+ *
481
+ * Renders MCP Apps UI in a sandboxed iframe with full protocol support.
482
+ */
483
+ declare const MCPAppsActivityRenderer: React__default.FC<MCPAppsActivityRendererProps>;
484
+
403
485
  interface UseRenderToolCallProps {
404
486
  toolCall: ToolCall;
405
487
  toolMessage?: ToolMessage;
@@ -627,6 +709,12 @@ declare class CopilotKitCoreReact extends CopilotKitCore {
627
709
 
628
710
  interface CopilotKitContextValue {
629
711
  copilotkit: CopilotKitCoreReact;
712
+ /**
713
+ * Set of tool call IDs currently being executed.
714
+ * This is tracked at the provider level to ensure tool execution events
715
+ * are captured even before child components mount.
716
+ */
717
+ executingToolCallIds: ReadonlySet<string>;
630
718
  }
631
719
  interface CopilotKitProviderProps {
632
720
  children: ReactNode;
@@ -653,4 +741,4 @@ interface CopilotKitProviderProps {
653
741
  declare const CopilotKitProvider: React__default.FC<CopilotKitProviderProps>;
654
742
  declare const useCopilotKit: () => CopilotKitContextValue;
655
743
 
656
- export { type AgentContextInput, AudioRecorderError, type AudioRecorderState, CopilotChat, CopilotChatAssistantMessage, type CopilotChatAssistantMessageProps, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, type CopilotChatConfigurationProviderProps, type CopilotChatConfigurationValue, CopilotChatInput, type CopilotChatInputProps, type CopilotChatLabels, CopilotChatMessageView, type CopilotChatMessageViewProps, type CopilotChatProps, CopilotChatSuggestionPill, type CopilotChatSuggestionPillProps, CopilotChatSuggestionView, type CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, type CopilotChatToggleButtonProps, CopilotChatToolCallsView, type CopilotChatToolCallsViewProps, CopilotChatUserMessage, type CopilotChatUserMessageProps, CopilotChatView, type CopilotChatViewProps, type CopilotKitContextValue, CopilotKitCoreReact, type CopilotKitCoreReactConfig, type CopilotKitCoreReactSubscriber, CopilotKitInspector, type CopilotKitInspectorProps, CopilotKitProvider, type CopilotKitProviderProps, CopilotModalHeader, type CopilotModalHeaderProps, CopilotPopup, type CopilotPopupProps, CopilotPopupView, type CopilotPopupViewProps, CopilotSidebar, type CopilotSidebarProps, CopilotSidebarView, type CopilotSidebarViewProps, type JsonSerializable, type ReactActivityMessageRenderer, type ReactCustomMessageRenderer, type ReactCustomMessageRendererPosition, type ReactFrontendTool, type ReactHumanInTheLoop, type ReactToolCallRenderer, type ToolsMenuItem, WildcardToolCallRender, defineToolCallRenderer, useAgent, useAgentContext, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useFrontendTool, useHumanInTheLoop, useRenderActivityMessage, useRenderCustomMessages, useRenderToolCall, useSuggestions };
744
+ export { type AgentContextInput, AudioRecorderError, type AudioRecorderState, CopilotChat, CopilotChatAssistantMessage, type CopilotChatAssistantMessageProps, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, type CopilotChatConfigurationProviderProps, type CopilotChatConfigurationValue, CopilotChatInput, type CopilotChatInputProps, type CopilotChatLabels, CopilotChatMessageView, type CopilotChatMessageViewProps, type CopilotChatProps, CopilotChatSuggestionPill, type CopilotChatSuggestionPillProps, CopilotChatSuggestionView, type CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, type CopilotChatToggleButtonProps, CopilotChatToolCallsView, type CopilotChatToolCallsViewProps, CopilotChatUserMessage, type CopilotChatUserMessageProps, CopilotChatView, type CopilotChatViewProps, type CopilotKitContextValue, CopilotKitCoreReact, type CopilotKitCoreReactConfig, type CopilotKitCoreReactSubscriber, CopilotKitInspector, type CopilotKitInspectorProps, CopilotKitProvider, type CopilotKitProviderProps, CopilotModalHeader, type CopilotModalHeaderProps, CopilotPopup, type CopilotPopupProps, CopilotPopupView, type CopilotPopupViewProps, CopilotSidebar, type CopilotSidebarProps, CopilotSidebarView, type CopilotSidebarViewProps, type JsonSerializable, type MCPAppsActivityContent, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, type ReactActivityMessageRenderer, type ReactCustomMessageRenderer, type ReactCustomMessageRendererPosition, type ReactFrontendTool, type ReactHumanInTheLoop, type ReactToolCallRenderer, type ToolsMenuItem, UseAgentUpdate, WildcardToolCallRender, defineToolCallRenderer, useAgent, useAgentContext, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useFrontendTool, useHumanInTheLoop, useRenderActivityMessage, useRenderCustomMessages, useRenderToolCall, useSuggestions };
package/dist/index.d.ts CHANGED
@@ -400,6 +400,88 @@ interface CopilotKitInspectorProps extends CopilotKitInspectorBaseProps {
400
400
  }
401
401
  declare const CopilotKitInspector: React$1.FC<CopilotKitInspectorProps>;
402
402
 
403
+ /**
404
+ * Activity type for MCP Apps events - must match the middleware's MCPAppsActivityType
405
+ */
406
+ declare const MCPAppsActivityType = "mcp-apps";
407
+ declare const MCPAppsActivityContentSchema: z.ZodObject<{
408
+ result: z.ZodObject<{
409
+ content: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
410
+ structuredContent: z.ZodOptional<z.ZodAny>;
411
+ isError: z.ZodOptional<z.ZodBoolean>;
412
+ }, "strip", z.ZodTypeAny, {
413
+ content?: any[] | undefined;
414
+ structuredContent?: any;
415
+ isError?: boolean | undefined;
416
+ }, {
417
+ content?: any[] | undefined;
418
+ structuredContent?: any;
419
+ isError?: boolean | undefined;
420
+ }>;
421
+ resource: z.ZodObject<{
422
+ uri: z.ZodString;
423
+ mimeType: z.ZodOptional<z.ZodString>;
424
+ text: z.ZodOptional<z.ZodString>;
425
+ blob: z.ZodOptional<z.ZodString>;
426
+ }, "strip", z.ZodTypeAny, {
427
+ uri: string;
428
+ text?: string | undefined;
429
+ mimeType?: string | undefined;
430
+ blob?: string | undefined;
431
+ }, {
432
+ uri: string;
433
+ text?: string | undefined;
434
+ mimeType?: string | undefined;
435
+ blob?: string | undefined;
436
+ }>;
437
+ serverId: z.ZodOptional<z.ZodString>;
438
+ toolInput: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
439
+ }, "strip", z.ZodTypeAny, {
440
+ resource: {
441
+ uri: string;
442
+ text?: string | undefined;
443
+ mimeType?: string | undefined;
444
+ blob?: string | undefined;
445
+ };
446
+ result: {
447
+ content?: any[] | undefined;
448
+ structuredContent?: any;
449
+ isError?: boolean | undefined;
450
+ };
451
+ serverId?: string | undefined;
452
+ toolInput?: Record<string, unknown> | undefined;
453
+ }, {
454
+ resource: {
455
+ uri: string;
456
+ text?: string | undefined;
457
+ mimeType?: string | undefined;
458
+ blob?: string | undefined;
459
+ };
460
+ result: {
461
+ content?: any[] | undefined;
462
+ structuredContent?: any;
463
+ isError?: boolean | undefined;
464
+ };
465
+ serverId?: string | undefined;
466
+ toolInput?: Record<string, unknown> | undefined;
467
+ }>;
468
+ type MCPAppsActivityContent = z.infer<typeof MCPAppsActivityContentSchema>;
469
+ /**
470
+ * Props for the activity renderer component
471
+ */
472
+ interface MCPAppsActivityRendererProps {
473
+ activityType: string;
474
+ content: MCPAppsActivityContent;
475
+ message: unknown;
476
+ agent: AbstractAgent | undefined;
477
+ }
478
+ /**
479
+ * MCP Apps Extension Activity Renderer
480
+ *
481
+ * Renders MCP Apps UI in a sandboxed iframe with full protocol support.
482
+ */
483
+ declare const MCPAppsActivityRenderer: React__default.FC<MCPAppsActivityRendererProps>;
484
+
403
485
  interface UseRenderToolCallProps {
404
486
  toolCall: ToolCall;
405
487
  toolMessage?: ToolMessage;
@@ -627,6 +709,12 @@ declare class CopilotKitCoreReact extends CopilotKitCore {
627
709
 
628
710
  interface CopilotKitContextValue {
629
711
  copilotkit: CopilotKitCoreReact;
712
+ /**
713
+ * Set of tool call IDs currently being executed.
714
+ * This is tracked at the provider level to ensure tool execution events
715
+ * are captured even before child components mount.
716
+ */
717
+ executingToolCallIds: ReadonlySet<string>;
630
718
  }
631
719
  interface CopilotKitProviderProps {
632
720
  children: ReactNode;
@@ -653,4 +741,4 @@ interface CopilotKitProviderProps {
653
741
  declare const CopilotKitProvider: React__default.FC<CopilotKitProviderProps>;
654
742
  declare const useCopilotKit: () => CopilotKitContextValue;
655
743
 
656
- export { type AgentContextInput, AudioRecorderError, type AudioRecorderState, CopilotChat, CopilotChatAssistantMessage, type CopilotChatAssistantMessageProps, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, type CopilotChatConfigurationProviderProps, type CopilotChatConfigurationValue, CopilotChatInput, type CopilotChatInputProps, type CopilotChatLabels, CopilotChatMessageView, type CopilotChatMessageViewProps, type CopilotChatProps, CopilotChatSuggestionPill, type CopilotChatSuggestionPillProps, CopilotChatSuggestionView, type CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, type CopilotChatToggleButtonProps, CopilotChatToolCallsView, type CopilotChatToolCallsViewProps, CopilotChatUserMessage, type CopilotChatUserMessageProps, CopilotChatView, type CopilotChatViewProps, type CopilotKitContextValue, CopilotKitCoreReact, type CopilotKitCoreReactConfig, type CopilotKitCoreReactSubscriber, CopilotKitInspector, type CopilotKitInspectorProps, CopilotKitProvider, type CopilotKitProviderProps, CopilotModalHeader, type CopilotModalHeaderProps, CopilotPopup, type CopilotPopupProps, CopilotPopupView, type CopilotPopupViewProps, CopilotSidebar, type CopilotSidebarProps, CopilotSidebarView, type CopilotSidebarViewProps, type JsonSerializable, type ReactActivityMessageRenderer, type ReactCustomMessageRenderer, type ReactCustomMessageRendererPosition, type ReactFrontendTool, type ReactHumanInTheLoop, type ReactToolCallRenderer, type ToolsMenuItem, WildcardToolCallRender, defineToolCallRenderer, useAgent, useAgentContext, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useFrontendTool, useHumanInTheLoop, useRenderActivityMessage, useRenderCustomMessages, useRenderToolCall, useSuggestions };
744
+ export { type AgentContextInput, AudioRecorderError, type AudioRecorderState, CopilotChat, CopilotChatAssistantMessage, type CopilotChatAssistantMessageProps, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, type CopilotChatConfigurationProviderProps, type CopilotChatConfigurationValue, CopilotChatInput, type CopilotChatInputProps, type CopilotChatLabels, CopilotChatMessageView, type CopilotChatMessageViewProps, type CopilotChatProps, CopilotChatSuggestionPill, type CopilotChatSuggestionPillProps, CopilotChatSuggestionView, type CopilotChatSuggestionViewProps, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, type CopilotChatToggleButtonProps, CopilotChatToolCallsView, type CopilotChatToolCallsViewProps, CopilotChatUserMessage, type CopilotChatUserMessageProps, CopilotChatView, type CopilotChatViewProps, type CopilotKitContextValue, CopilotKitCoreReact, type CopilotKitCoreReactConfig, type CopilotKitCoreReactSubscriber, CopilotKitInspector, type CopilotKitInspectorProps, CopilotKitProvider, type CopilotKitProviderProps, CopilotModalHeader, type CopilotModalHeaderProps, CopilotPopup, type CopilotPopupProps, CopilotPopupView, type CopilotPopupViewProps, CopilotSidebar, type CopilotSidebarProps, CopilotSidebarView, type CopilotSidebarViewProps, type JsonSerializable, type MCPAppsActivityContent, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, type ReactActivityMessageRenderer, type ReactCustomMessageRenderer, type ReactCustomMessageRendererPosition, type ReactFrontendTool, type ReactHumanInTheLoop, type ReactToolCallRenderer, type ToolsMenuItem, UseAgentUpdate, WildcardToolCallRender, defineToolCallRenderer, useAgent, useAgentContext, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useFrontendTool, useHumanInTheLoop, useRenderActivityMessage, useRenderCustomMessages, useRenderToolCall, useSuggestions };