@copilotkit/react-core 2.0.0-rc.8 → 2.0.0-rc.9

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.
Files changed (29) hide show
  1. package/dist/{MarkdownRendererContext-DAuVISwv.d.cts → MarkdownRendererContext-CS35epe1.d.mts} +5 -5
  2. package/dist/{MarkdownRendererContext-DAuVISwv.d.cts.map → MarkdownRendererContext-CS35epe1.d.mts.map} +1 -1
  3. package/dist/{MarkdownRendererContext-XWC2OXD5.d.mts → MarkdownRendererContext-CfTh92vk.d.cts} +5 -5
  4. package/dist/{MarkdownRendererContext-XWC2OXD5.d.mts.map → MarkdownRendererContext-CfTh92vk.d.cts.map} +1 -1
  5. package/dist/{MarkdownSurfaces-DQZM4lSI.cjs → MarkdownSurfaces-Ije2ZQh0.cjs} +16 -17
  6. package/dist/MarkdownSurfaces-Ije2ZQh0.cjs.map +1 -0
  7. package/dist/{MarkdownSurfaces-BXaxgpm_.mjs → MarkdownSurfaces-iFKorV2w.mjs} +5 -7
  8. package/dist/MarkdownSurfaces-iFKorV2w.mjs.map +1 -0
  9. package/dist/generative-ui.cjs +507 -506
  10. package/dist/generative-ui.cjs.map +1 -1
  11. package/dist/generative-ui.d.cts +2137 -4178
  12. package/dist/generative-ui.d.cts.map +1 -1
  13. package/dist/generative-ui.d.mts +2137 -4178
  14. package/dist/generative-ui.d.mts.map +1 -1
  15. package/dist/generative-ui.mjs +3 -3
  16. package/dist/generative-ui.mjs.map +1 -1
  17. package/dist/index.cjs +102 -335
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +13 -51
  20. package/dist/index.d.cts.map +1 -1
  21. package/dist/index.d.mts +13 -51
  22. package/dist/index.d.mts.map +1 -1
  23. package/dist/index.mjs +31 -307
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/index.umd.js +118 -351
  26. package/dist/index.umd.js.map +1 -1
  27. package/package.json +14 -14
  28. package/dist/MarkdownSurfaces-BXaxgpm_.mjs.map +0 -1
  29. package/dist/MarkdownSurfaces-DQZM4lSI.cjs.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
- import { A as GenerativeUIError, B as renderSlot, C as issueKey, D as getMarkdownSurfaceSource, E as containsDynamicValue, F as toJsonSchema, G as CopilotIcon, H as CopilotChatConfigurationProvider, I as defineToolCallRenderer, J as StreamingMarkdownDefaultRenderer, L as MarkdownRendererProvider, M as catalogIdsOf, N as componentCatalogIds, O as BASIC_FUNCTIONS, R as useMarkdownRenderer, S as isAsyncIssue, T as withoutRejectedNulls, U as useCopilotChatConfiguration, V as ControlledModalOpenScope, W as useShallowStableRef, a as GenerativeUIToolCallRenderer, i as GenerativeUIChatSlotContext, j as isRecord, k as ExpressionError, o as createGenerativeUIActivityRenderer, q as cn, s as createGenerativeUIFunctionCallActivityRenderer, t as MarkdownSurfaces, v as GenerativeUIRuntimeContext, w as validateSchemaSync, x as formatIssues, y as useGenerativeUIRuntime, z as isReactComponentType } from "./MarkdownSurfaces-BXaxgpm_.mjs";
4
- import { A2UI_FENCE_LANGUAGE, AgentRegistry, AgentThreadLockedError, ContextStore, CopilotChatDefaultLabels, CopilotChatDefaultLabels as CopilotChatDefaultLabels$1, CopilotKitCore, CopilotKitCore as CopilotKitCore$1, CopilotKitCoreErrorCode, CopilotKitCoreErrorCode as CopilotKitCoreErrorCode$1, CopilotKitCoreRuntimeConnectionStatus, CopilotKitCoreRuntimeConnectionStatus as CopilotKitCoreRuntimeConnectionStatus$1, CopilotKitHeaderResolutionError, INSPECTOR_THREAD_BRIDGE_PLUGIN_ID, INTERRUPT_EVENT_NAME, IntelligenceAgent, MEMORY_ERROR_REGISTRY, MemoryError, ProxiedCopilotRuntimeAgent, ProxiedCopilotRuntimeAgent as ProxiedCopilotRuntimeAgent$1, RunHandler, StateManager, SuggestionEngine, ToolCallStatus, ToolCallStatus as ToolCallStatus$1, TranscriptionError, TranscriptionError as TranscriptionError$1, TranscriptionErrorCode, WebMCPRegistry, classifySurfaceCards, completePartialMarkdown, createActionGroup, createEffect, createInspectorThreadRequestId, createReducer, createSelector, createStore, emitInspectorActiveThread, emitInspectorActiveThread as emitInspectorActiveThread$1, emitInspectorStopViewing, emitInspectorViewThread, emitInspectorViewThreadResult, emitInspectorViewThreadResult as emitInspectorViewThreadResult$1, empty, ensureObjectArgs, extractCompleteArrayItems, extractFenceOperations, extractStringField, flattenInformationalCards, getMarkdownOperationSurfaceId, getWebMCPModelContext, isAbortError, isInspectorThreadBridgeEnabled, isInspectorThreadBridgeEnabled as isInspectorThreadBridgeEnabled$1, isRunCompletionAware, isRunCompletionAware as isRunCompletionAware$1, ofType, on, onInspectorActiveThread, onInspectorStopViewing, onInspectorStopViewing as onInspectorStopViewing$1, onInspectorViewThread, onInspectorViewThread as onInspectorViewThread$1, onInspectorViewThreadResult, parseToolArguments, prepareSurfaceOperations, props, segmentSurfaceProse, select, splitA2UIMarkdown, ɵCOPILOTKIT_FEATURES, ɵInterruptState, ɵInterruptState as ɵInterruptState$1, ɵMAX_SOCKET_RETRIES, ɵRUNTIME_PROBE_TIMEOUT_MS, ɵTHREAD_REQUEST_TIMEOUT_MS, ɵclearAgentInterruptState, ɵclearAgentInterruptState as ɵclearAgentInterruptState$1, ɵcomposerButtonState, ɵcomposerButtonState as ɵcomposerButtonState$1, ɵcopilotIconSvgAttributes, ɵcopilotIcons, ɵcountFailedToolCalls, ɵcountFailedToolCalls as ɵcountFailedToolCalls$1, ɵcreateMemoryStore, ɵcreateThreadSelectors, ɵcreateThreadStore, ɵcreateThreadStore as ɵcreateThreadStore$1, ɵdeduplicateMessages, ɵdeduplicateMessages as ɵdeduplicateMessages$1, ɵformatCountLabel, ɵformatCountLabel as ɵformatCountLabel$1, ɵformatLabel, ɵformatLabel as ɵformatLabel$1, ɵformatReasoningDuration, ɵformatReasoningDuration as ɵformatReasoningDuration$1, ɵformatToolNames, ɵformatToolNames as ɵformatToolNames$1, ɵformatWorkDuration, ɵformatWorkDuration as ɵformatWorkDuration$1, ɵgetAgentInterruptState, ɵgetAgentInterruptState as ɵgetAgentInterruptState$1, ɵgetArgumentPreview, ɵgetArgumentPreview as ɵgetArgumentPreview$1, ɵgetLatestTurnKey, ɵgetLatestTurnKey as ɵgetLatestTurnKey$1, ɵgetToolCallLayouts, ɵgetToolCallLayouts as ɵgetToolCallLayouts$1, ɵgetToolCallPreview, ɵgetToolCallPreview as ɵgetToolCallPreview$1, ɵgetToolCallRendererNames, ɵgetToolCallRendererNames as ɵgetToolCallRendererNames$1, ɵgetToolCallRowStatus, ɵgetToolCallRowStatus as ɵgetToolCallRowStatus$1, ɵgetToolResults, ɵgetTurnWork, ɵgetTurnWork as ɵgetTurnWork$1, ɵgetWorkOpenState, ɵgetWorkOpenState as ɵgetWorkOpenState$1, ɵisCopilotKitFeature, ɵisHttpAgent, ɵisHttpAgent as ɵisHttpAgent$1, ɵisRetryableMemoryStatus, ɵisTurnWorkOpen, ɵisTurnWorkOpen as ɵisTurnWorkOpen$1, ɵisTurnWorking, ɵisTurnWorking as ɵisTurnWorking$1, ɵjoinPhoenixChannel$, ɵmapMemoryMetadataEvent, ɵmemoryAdapterEvents, ɵmemoryDomainEvents, ɵmemoryReducer, ɵmemoryRestEvents, ɵmessagesFingerprint, ɵmessagesFingerprint as ɵmessagesFingerprint$1, ɵobservePhoenixEvent$, ɵobservePhoenixJoinOutcome$, ɵobservePhoenixSocketHealth$, ɵobservePhoenixSocketSignals$, ɵphoenixChannel$, ɵphoenixSocket$, ɵpluralize, ɵrecordWorkTime, ɵrecordWorkTime as ɵrecordWorkTime$1, ɵresolveActivityRenderer, ɵresolveActivityRenderer as ɵresolveActivityRenderer$1, ɵresolveComposerKey, ɵresolveComposerKey as ɵresolveComposerKey$1, ɵresolveCustomMessageRenderers, ɵresolveCustomMessageRenderers as ɵresolveCustomMessageRenderers$1, ɵresolveLicenseState, ɵresolveLicenseState as ɵresolveLicenseState$1, ɵresolveThreadsLicense, ɵresolveToolCallRenderer, ɵresolveToolCallRenderer as ɵresolveToolCallRenderer$1, ɵselectFetchMoreError, ɵselectFetchMoreError as ɵselectFetchMoreError$1, ɵselectHasNextPage, ɵselectHasNextPage as ɵselectHasNextPage$1, ɵselectIsFetchingNextPage, ɵselectIsFetchingNextPage as ɵselectIsFetchingNextPage$1, ɵselectIsMutating, ɵselectIsMutating as ɵselectIsMutating$1, ɵselectMemories, ɵselectMemories as ɵselectMemories$1, ɵselectMemoriesAvailable, ɵselectMemoriesAvailable as ɵselectMemoriesAvailable$1, ɵselectMemoriesError, ɵselectMemoriesError as ɵselectMemoriesError$1, ɵselectMemoriesIsLoading, ɵselectMemoriesIsLoading as ɵselectMemoriesIsLoading$1, ɵselectMemoriesIsMutating, ɵselectMemoriesRealtimeStatus, ɵselectMemoriesRealtimeStatus as ɵselectMemoriesRealtimeStatus$1, ɵselectThreads, ɵselectThreads as ɵselectThreads$1, ɵselectThreadsError, ɵselectThreadsError as ɵselectThreadsError$1, ɵselectThreadsIsLoading, ɵselectThreadsIsLoading as ɵselectThreadsIsLoading$1, ɵstringifyToolCallPayload, ɵstringifyToolCallPayload as ɵstringifyToolCallPayload$1, ɵthreadAdapterEvents, ɵtranscribeAudio, ɵtranscribeAudio as ɵtranscribeAudio$1, ɵtranscriptionErrorMessageKey, ɵtranscriptionErrorMessageKey as ɵtranscriptionErrorMessageKey$1, ɵwithHeaderDefaults, ɵwithHeaderDefaults as ɵwithHeaderDefaults$1 } from "@copilotkit/core";
3
+ import { A as GenerativeUIError, B as renderSlot, C as issueKey, D as getMarkdownSurfaceSource, E as containsDynamicValue, F as toJsonSchema, G as CopilotIcon, H as CopilotChatConfigurationProvider, I as defineToolCallRenderer, J as StreamingMarkdownDefaultRenderer, L as MarkdownRendererProvider, M as catalogIdsOf, N as componentCatalogIds, O as BASIC_FUNCTIONS, R as useMarkdownRenderer, S as isAsyncIssue, T as withoutRejectedNulls, U as useCopilotChatConfiguration, V as ControlledModalOpenScope, W as useShallowStableRef, a as GenerativeUIToolCallRenderer, i as GenerativeUIChatSlotContext, j as isRecord, k as ExpressionError, o as createGenerativeUIActivityRenderer, q as cn, s as createGenerativeUIFunctionCallActivityRenderer, t as MarkdownSurfaces, v as GenerativeUIRuntimeContext, w as validateSchemaSync, x as formatIssues, y as useGenerativeUIRuntime, z as isReactComponentType } from "./MarkdownSurfaces-iFKorV2w.mjs";
4
+ import { A2UI_FENCE_LANGUAGE, AgentRegistry, AgentThreadLockedError, ContextStore, CopilotChatDefaultLabels, CopilotChatDefaultLabels as CopilotChatDefaultLabels$1, CopilotKitCore, CopilotKitCore as CopilotKitCore$1, CopilotKitCoreErrorCode, CopilotKitCoreErrorCode as CopilotKitCoreErrorCode$1, CopilotKitCoreRuntimeConnectionStatus, CopilotKitCoreRuntimeConnectionStatus as CopilotKitCoreRuntimeConnectionStatus$1, CopilotKitHeaderResolutionError, DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL, DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL as DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL$1, GENERATE_SANDBOXED_UI_TOOL_NAME, GENERATE_SANDBOXED_UI_TOOL_NAME as GENERATE_SANDBOXED_UI_TOOL_NAME$1, INSPECTOR_THREAD_BRIDGE_PLUGIN_ID, INTERRUPT_EVENT_NAME, IntelligenceAgent, MEMORY_ERROR_REGISTRY, MemoryError, OPEN_GENERATIVE_UI_ACTIVITY_TYPE, OPEN_GENERATIVE_UI_ACTIVITY_TYPE as OPEN_GENERATIVE_UI_ACTIVITY_TYPE$1, ProxiedCopilotRuntimeAgent, ProxiedCopilotRuntimeAgent as ProxiedCopilotRuntimeAgent$1, RunHandler, StateManager, SuggestionEngine, ToolCallStatus, ToolCallStatus as ToolCallStatus$1, TranscriptionError, TranscriptionError as TranscriptionError$1, TranscriptionErrorCode, WebMCPRegistry, classifySurfaceCards, completePartialMarkdown, createActionGroup, createEffect, createInspectorThreadRequestId, createReducer, createSelector, createStore, emitInspectorActiveThread, emitInspectorActiveThread as emitInspectorActiveThread$1, emitInspectorStopViewing, emitInspectorViewThread, emitInspectorViewThreadResult, emitInspectorViewThreadResult as emitInspectorViewThreadResult$1, empty, ensureObjectArgs, extractCompleteArrayItems, extractFenceOperations, extractStringField, flattenInformationalCards, getMarkdownOperationSurfaceId, getWebMCPModelContext, isAbortError, isInspectorThreadBridgeEnabled, isInspectorThreadBridgeEnabled as isInspectorThreadBridgeEnabled$1, isRunCompletionAware, isRunCompletionAware as isRunCompletionAware$1, ofType, on, onInspectorActiveThread, onInspectorStopViewing, onInspectorStopViewing as onInspectorStopViewing$1, onInspectorViewThread, onInspectorViewThread as onInspectorViewThread$1, onInspectorViewThreadResult, parseToolArguments, prepareSurfaceOperations, props, segmentSurfaceProse, select, splitA2UIMarkdown, ɵCOPILOTKIT_FEATURES, ɵInterruptState, ɵInterruptState as ɵInterruptState$1, ɵMAX_SOCKET_RETRIES, ɵOpenGenerativeUIController, ɵOpenGenerativeUIController as ɵOpenGenerativeUIController$1, ɵRUNTIME_PROBE_TIMEOUT_MS, ɵTHREAD_REQUEST_TIMEOUT_MS, ɵclearAgentInterruptState, ɵclearAgentInterruptState as ɵclearAgentInterruptState$1, ɵcomposerButtonState, ɵcomposerButtonState as ɵcomposerButtonState$1, ɵcopilotIconSvgAttributes, ɵcopilotIcons, ɵcountFailedToolCalls, ɵcountFailedToolCalls as ɵcountFailedToolCalls$1, ɵcreateMemoryStore, ɵcreateThreadSelectors, ɵcreateThreadStore, ɵcreateThreadStore as ɵcreateThreadStore$1, ɵdeduplicateMessages, ɵdeduplicateMessages as ɵdeduplicateMessages$1, ɵextractCompleteStyles, ɵformatCountLabel, ɵformatCountLabel as ɵformatCountLabel$1, ɵformatLabel, ɵformatLabel as ɵformatLabel$1, ɵformatReasoningDuration, ɵformatReasoningDuration as ɵformatReasoningDuration$1, ɵformatToolNames, ɵformatToolNames as ɵformatToolNames$1, ɵformatWorkDuration, ɵformatWorkDuration as ɵformatWorkDuration$1, ɵgetAgentInterruptState, ɵgetAgentInterruptState as ɵgetAgentInterruptState$1, ɵgetArgumentPreview, ɵgetArgumentPreview as ɵgetArgumentPreview$1, ɵgetLatestTurnKey, ɵgetLatestTurnKey as ɵgetLatestTurnKey$1, ɵgetToolCallLayouts, ɵgetToolCallLayouts as ɵgetToolCallLayouts$1, ɵgetToolCallPreview, ɵgetToolCallPreview as ɵgetToolCallPreview$1, ɵgetToolCallRendererNames, ɵgetToolCallRendererNames as ɵgetToolCallRendererNames$1, ɵgetToolCallRowStatus, ɵgetToolCallRowStatus as ɵgetToolCallRowStatus$1, ɵgetToolResults, ɵgetTurnWork, ɵgetTurnWork as ɵgetTurnWork$1, ɵgetWorkOpenState, ɵgetWorkOpenState as ɵgetWorkOpenState$1, ɵisCopilotKitFeature, ɵisHttpAgent, ɵisHttpAgent as ɵisHttpAgent$1, ɵisRetryableMemoryStatus, ɵisTurnWorkOpen, ɵisTurnWorkOpen as ɵisTurnWorkOpen$1, ɵisTurnWorking, ɵisTurnWorking as ɵisTurnWorking$1, ɵjoinPhoenixChannel$, ɵloadWebsandbox, ɵmapMemoryMetadataEvent, ɵmemoryAdapterEvents, ɵmemoryDomainEvents, ɵmemoryReducer, ɵmemoryRestEvents, ɵmessagesFingerprint, ɵmessagesFingerprint as ɵmessagesFingerprint$1, ɵobservePhoenixEvent$, ɵobservePhoenixJoinOutcome$, ɵobservePhoenixSocketHealth$, ɵobservePhoenixSocketSignals$, ɵphoenixChannel$, ɵphoenixSocket$, ɵpluralize, ɵprocessPartialHtml, ɵrecordWorkTime, ɵrecordWorkTime as ɵrecordWorkTime$1, ɵresolveActivityRenderer, ɵresolveActivityRenderer as ɵresolveActivityRenderer$1, ɵresolveComposerKey, ɵresolveComposerKey as ɵresolveComposerKey$1, ɵresolveCustomMessageRenderers, ɵresolveCustomMessageRenderers as ɵresolveCustomMessageRenderers$1, ɵresolveLicenseState, ɵresolveLicenseState as ɵresolveLicenseState$1, ɵresolveThreadsLicense, ɵresolveToolCallRenderer, ɵresolveToolCallRenderer as ɵresolveToolCallRenderer$1, ɵselectFetchMoreError, ɵselectFetchMoreError as ɵselectFetchMoreError$1, ɵselectHasNextPage, ɵselectHasNextPage as ɵselectHasNextPage$1, ɵselectIsFetchingNextPage, ɵselectIsFetchingNextPage as ɵselectIsFetchingNextPage$1, ɵselectIsMutating, ɵselectIsMutating as ɵselectIsMutating$1, ɵselectMemories, ɵselectMemories as ɵselectMemories$1, ɵselectMemoriesAvailable, ɵselectMemoriesAvailable as ɵselectMemoriesAvailable$1, ɵselectMemoriesError, ɵselectMemoriesError as ɵselectMemoriesError$1, ɵselectMemoriesIsLoading, ɵselectMemoriesIsLoading as ɵselectMemoriesIsLoading$1, ɵselectMemoriesIsMutating, ɵselectMemoriesRealtimeStatus, ɵselectMemoriesRealtimeStatus as ɵselectMemoriesRealtimeStatus$1, ɵselectThreads, ɵselectThreads as ɵselectThreads$1, ɵselectThreadsError, ɵselectThreadsError as ɵselectThreadsError$1, ɵselectThreadsIsLoading, ɵselectThreadsIsLoading as ɵselectThreadsIsLoading$1, ɵstringifyToolCallPayload, ɵstringifyToolCallPayload as ɵstringifyToolCallPayload$1, ɵthreadAdapterEvents, ɵtranscribeAudio, ɵtranscribeAudio as ɵtranscribeAudio$1, ɵtranscriptionErrorMessageKey, ɵtranscriptionErrorMessageKey as ɵtranscriptionErrorMessageKey$1, ɵwithHeaderDefaults, ɵwithHeaderDefaults as ɵwithHeaderDefaults$1 } from "@copilotkit/core";
5
5
  import { ACTIVITY_HISTORY_METADATA, AGUIConnectNotImplementedError, AGUIError, AGUI_METADATA_KEY, AbstractAgent, BackwardCompatibility_0_0_39, BackwardCompatibility_0_0_45, BackwardCompatibility_0_0_57, CompatibilityBoundary, DebugLogger, EventType, FilterToolCallsMiddleware, FunctionMiddleware, HttpAgent, Middleware, PROTOCOL_VERSION, aggregateTokenUsage, authoritativeActivityTypes, buildResumeArray, compactEvents, contentHasMedia, contentToText, convertToLegacyEvents, createDebugLogger, defaultApplyEvents, enforceEvents, enforceOutgoingInput, getRunOutcome, isInterruptExpired, isRecognizedEvent, mergeMetadata, omitOptionalNulls, parseProtoStream, parseSSEStream, randomUUID, randomUUID as randomUUID$1, resolveAgentDebugConfig, resolveDebugLogger, runHttpRequest, structuredClone_, tokenUsageFromAiSdkUsage, tokenUsageFromLangChainMetadata, transformChunks, transformHttpEventStream, verifyEvents, withAuthoritativeActivityTypes } from "@ag-ui/client";
6
6
  import { ActivityDeltaEventSchema, ActivityMessageSchema, ActivitySnapshotEventSchema, AddOperationSchema, AgentCapabilitiesSchema, AssistantMessageSchema, AttributableSchema, AudioInputContentSchema, AudioInputPartSchema, AudioPartSchema, BaseEventSchema, BaseMessageSchema, ContentPartSchema, ContextSchema, CopyOperationSchema, CustomEventSchema, DataSourceSchema, DeveloperMessageSchema, DocumentInputContentSchema, DocumentInputPartSchema, DocumentPartSchema, EventSchema, EventSchemas, EventTypeSchema, ExecutionCapabilitiesSchema, FileSourceSchema, FunctionCallSchema, HumanInTheLoopCapabilitiesSchema, IdentityCapabilitiesSchema, ImageInputContentSchema, ImageInputPartSchema, ImagePartSchema, InputContentDataSourceSchema, InputContentSchema, InputContentSourceSchema, InputContentUrlSourceSchema, InterruptSchema, JsonPatchOperationSchema, JsonPatchSchema, JsonPointerSchema, MessageSchema, MessagesSnapshotEventSchema, MetadataSchema, MoveOperationSchema, MultiAgentCapabilitiesSchema, MultimodalCapabilitiesSchema, MultimodalInputCapabilitiesSchema, MultimodalOutputCapabilitiesSchema, OptionalMetadataSchema, OutputCapabilitiesSchema, PartSourceSchema, RawEventSchema, ReasoningCapabilitiesSchema, ReasoningEncryptedValueEventSchema, ReasoningEncryptedValueSubtypeSchema, ReasoningEndEventSchema, ReasoningMessageChunkEventSchema, ReasoningMessageContentEventSchema, ReasoningMessageEndEventSchema, ReasoningMessageSchema, ReasoningMessageStartEventSchema, ReasoningStartEventSchema, RemoveOperationSchema, ReplaceOperationSchema, ResumeEntrySchema, RoleSchema, RunAgentInputSchema, RunErrorEventSchema, RunFinishedCancelledOutcomeSchema, RunFinishedEventSchema, RunFinishedInterruptOutcomeSchema, RunFinishedOutcomeSchema, RunFinishedSuccessOutcomeSchema, RunStartedEventSchema, StateCapabilitiesSchema, StateDeltaEventSchema, StateSchema, StateSnapshotEventSchema, StepFinishedEventSchema, StepStartedEventSchema, SubagentErrorEventSchema, SubagentFinishedEventSchema, SubagentFinishedOutcomeSchema, SubagentFinishedSuccessOutcomeSchema, SubagentFinishedSuspendedOutcomeSchema, SubagentInfoSchema, SubagentRunIdSchema, SubagentStartedEventSchema, SystemMessageSchema, TestOperationSchema, TextInputContentSchema, TextMessageChunkEventSchema, TextMessageContentEventSchema, TextMessageEndEventSchema, TextMessageRoleSchema, TextMessageStartEventSchema, TextPartSchema, TokenUsageSchema, ToolCallArgsEventSchema, ToolCallChunkEventSchema, ToolCallEndEventSchema, ToolCallResultEventSchema, ToolCallSchema, ToolCallStartEventSchema, ToolMessageSchema, ToolSchema, ToolsCapabilitiesSchema, TransportCapabilitiesSchema, UrlSourceSchema, UserMessageSchema, VideoInputContentSchema, VideoInputPartSchema, VideoPartSchema } from "@ag-ui/core/schemas";
7
7
  import * as React$1 from "react";
@@ -13,9 +13,8 @@ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
13
13
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
14
14
  import { contentToText as contentToText$1 } from "@ag-ui/core";
15
15
  import { MCPAppsActivityContentSchema, MCPAppsActivityType, ɵrunMcpFollowUp } from "@copilotkit/mcp-apps-renderer/activity";
16
- import { z } from "zod";
16
+ import * as z from "zod";
17
17
  import { A2UIProvider, A2UIRenderer, A2UI_SCHEMA_CONTEXT_DESCRIPTION, Catalog, DEFAULT_SURFACE_ID, ROOT_COMPONENT_ID, buildCatalogContextValue, defaultTheme as a2uiDefaultTheme, extractCatalogComponentSchemas, filterCatalog, initializeDefaultCatalog, injectStyles, useA2UIActions, useA2UIError, viewerTheme } from "@copilotkit/a2ui-renderer";
18
- import { zodToJsonSchema } from "zod-to-json-schema";
19
18
  import { Catalog as Catalog$1, ComponentModel, DataModel, SurfaceModel } from "@a2ui/web_core/v0_9";
20
19
  import { stylesheet } from "@copilotkit/core/styles";
21
20
  import * as PopoverPrimitive from "@radix-ui/react-popover";
@@ -1238,7 +1237,7 @@ function useRenderToolCall() {
1238
1237
 
1239
1238
  //#endregion
1240
1239
  //#region package.json
1241
- var version$1 = "2.0.0-rc.8";
1240
+ var version$1 = "2.0.0-rc.9";
1242
1241
 
1243
1242
  //#endregion
1244
1243
  //#region src/components/CopilotKitInspector.tsx
@@ -1628,44 +1627,9 @@ function useSandboxFunctions() {
1628
1627
  return useContext(SandboxFunctionsContext);
1629
1628
  }
1630
1629
 
1631
- //#endregion
1632
- //#region src/lib/processPartialHtml.ts
1633
- /**
1634
- * Extracts all complete `<style>` blocks from the raw HTML.
1635
- * Returns the concatenated style tags, suitable for injection into `<head>`.
1636
- */
1637
- function extractCompleteStyles(html) {
1638
- const matches = html.match(/<style\b[^>]*>[\s\S]*?<\/style>/gi);
1639
- return matches ? matches.join("") : "";
1640
- }
1641
- /**
1642
- * Processes raw accumulated HTML for safe preview via innerHTML injection.
1643
- * Pure function, no DOM dependencies.
1644
- *
1645
- * Pipeline (order matters):
1646
- * 1. Strip incomplete tag at end
1647
- * 2. Strip complete <style>, <script>, and <head> blocks
1648
- * 3. Strip incomplete <style>/<script>/<head> blocks
1649
- * 4. Strip incomplete HTML entities
1650
- * 5. Extract body content (or use full string if no <body>)
1651
- */
1652
- function processPartialHtml(html) {
1653
- let result = html;
1654
- result = result.replace(/<[^>]*$/, "");
1655
- result = result.replace(/<(style|script|head)\b[^>]*>[\s\S]*?<\/\1>/gi, "");
1656
- result = result.replace(/<(style|script|head)\b[^>]*>[\s\S]*$/gi, "");
1657
- result = result.replace(/&[a-zA-Z0-9#]*$/, "");
1658
- const bodyMatch = result.match(/<body[^>]*>([\s\S]*)/i);
1659
- if (bodyMatch) {
1660
- result = bodyMatch[1];
1661
- result = result.replace(/<\/body>[\s\S]*/i, "");
1662
- }
1663
- return result;
1664
- }
1665
-
1666
1630
  //#endregion
1667
1631
  //#region src/components/OpenGenerativeUIRenderer.tsx
1668
- const OpenGenerativeUIActivityType = "open-generative-ui";
1632
+ const OpenGenerativeUIActivityType = OPEN_GENERATIVE_UI_ACTIVITY_TYPE$1;
1669
1633
  const OpenGenerativeUIContentSchema = z.object({
1670
1634
  initialHeight: z.number().optional(),
1671
1635
  generating: z.boolean().optional(),
@@ -1690,262 +1654,36 @@ const GenerateSandboxedUiArgsSchema = z.object({
1690
1654
  jsFunctions: z.string().optional(),
1691
1655
  jsExpressions: z.array(z.string()).optional()
1692
1656
  });
1693
- const THROTTLE_MS = 1e3;
1694
1657
  /**
1695
- * Returns true when the inner component should re-render immediately
1696
- * (no throttle delay).
1697
- */
1698
- function shouldFlushImmediately(prev, next) {
1699
- if (next.cssComplete && (!prev || !prev.cssComplete)) return true;
1700
- if (next.htmlComplete) return true;
1701
- if (next.generating === false) return true;
1702
- if (next.jsFunctions && (!prev || !prev.jsFunctions)) return true;
1703
- if ((next.jsExpressions?.length ?? 0) > (prev?.jsExpressions?.length ?? 0)) return true;
1704
- if (next.html?.length && (!prev || !prev.html?.length)) return true;
1705
- return false;
1706
- }
1707
- /**
1708
- * Outer wrapper — absorbs every parent re-render but only forwards
1709
- * throttled content snapshots to the memoized inner component.
1658
+ * Renders an Open Generative UI activity. The core controller throttles the
1659
+ * content and runs the websandbox iframes inside the container div.
1710
1660
  */
1711
1661
  const OpenGenerativeUIActivityRenderer = function OpenGenerativeUIActivityRenderer({ content }) {
1712
- const latestContentRef = useRef(content);
1713
- latestContentRef.current = content;
1714
- const [throttledContent, setThrottledContent] = useState(content);
1715
- const throttledContentRef = useRef(throttledContent);
1716
- const timerRef = useRef(null);
1717
- if (throttledContentRef.current !== content) {
1718
- if (shouldFlushImmediately(throttledContentRef.current, content)) {
1719
- if (timerRef.current !== null) {
1720
- clearTimeout(timerRef.current);
1721
- timerRef.current = null;
1722
- }
1723
- throttledContentRef.current = content;
1724
- setThrottledContent(content);
1725
- }
1726
- }
1727
- const flush = useCallback(() => {
1728
- timerRef.current = null;
1729
- const latest = latestContentRef.current;
1730
- throttledContentRef.current = latest;
1731
- setThrottledContent(latest);
1732
- }, []);
1733
- useEffect(() => {
1734
- if (throttledContentRef.current === content) return;
1735
- if (timerRef.current === null) timerRef.current = setTimeout(flush, THROTTLE_MS);
1736
- }, [content, flush]);
1737
- useEffect(() => {
1738
- return () => {
1739
- if (timerRef.current !== null) clearTimeout(timerRef.current);
1740
- };
1741
- }, []);
1742
- return /* @__PURE__ */ jsx(OpenGenerativeUIActivityRendererInner, { content: throttledContent });
1743
- };
1744
- function ensureHead(html) {
1745
- if (/<head[\s>]/i.test(html)) return html;
1746
- return `<head></head>${html}`;
1747
- }
1748
- function injectCssIntoHtml(html, css) {
1749
- const headCloseIdx = html.indexOf("</head>");
1750
- if (headCloseIdx !== -1) return html.slice(0, headCloseIdx) + `<style>${css}</style>` + html.slice(headCloseIdx);
1751
- return `<head><style>${css}</style></head>${html}`;
1752
- }
1753
- const OpenGenerativeUIActivityRendererInner = React.memo(function OpenGenerativeUIActivityRendererInner({ content }) {
1754
- const initialHeight = content.initialHeight ?? 200;
1755
- const [autoHeight, setAutoHeight] = useState(null);
1662
+ const [controller] = useState(() => {
1663
+ const created = new ɵOpenGenerativeUIController$1();
1664
+ created.setContent(content);
1665
+ return created;
1666
+ });
1756
1667
  const sandboxFunctions = useSandboxFunctions();
1757
- const localApi = useMemo(() => {
1758
- const api = {};
1759
- for (const fn of sandboxFunctions) api[fn.name] = fn.handler;
1760
- return api;
1761
- }, [sandboxFunctions]);
1762
- const fullHtml = content.htmlComplete && content.html?.length ? content.html.join("") : void 0;
1763
- const css = content.cssComplete ? content.css : void 0;
1764
- const cssReady = !!content.cssComplete;
1765
- const partialHtml = !content.htmlComplete && content.html?.length ? content.html.join("") : void 0;
1766
- const previewBody = partialHtml ? processPartialHtml(partialHtml) : void 0;
1767
- const previewStyles = partialHtml ? extractCompleteStyles(partialHtml) : "";
1768
- const hasPreview = cssReady && !!previewBody?.trim();
1769
- const hasVisibleSandbox = !!fullHtml || hasPreview;
1770
1668
  const containerRef = useRef(null);
1771
- const sandboxRef = useRef(null);
1772
- const previewSandboxRef = useRef(null);
1773
- const previewReadyRef = useRef(false);
1774
- const sandboxReadyRef = useRef(false);
1775
- const executedIndexRef = useRef(0);
1776
- const pendingQueueRef = useRef([]);
1777
- const jsFunctionsInjectedRef = useRef(false);
1669
+ const state = useSyncExternalStore(controller.subscribe, controller.getState, controller.getState);
1778
1670
  useEffect(() => {
1779
- const container = containerRef.current;
1780
- if (!container || fullHtml || !hasPreview || previewSandboxRef.current) return;
1781
- let cancelled = false;
1782
- import("@jetbrains/websandbox").then((mod) => {
1783
- if (cancelled) return;
1784
- const sandbox = (mod.default?.default ?? mod.default).create({}, {
1785
- frameContainer: container,
1786
- frameContent: "<head></head><body></body>",
1787
- allowAdditionalAttributes: ""
1788
- });
1789
- previewSandboxRef.current = sandbox;
1790
- sandbox.iframe.style.width = "100%";
1791
- sandbox.iframe.style.height = "100%";
1792
- sandbox.iframe.style.border = "none";
1793
- sandbox.iframe.style.backgroundColor = "transparent";
1794
- sandbox.promise.then(() => {
1795
- if (cancelled) return;
1796
- previewReadyRef.current = true;
1797
- sandbox.run(`
1798
- var s = document.createElement('style');
1799
- s.textContent = 'html, body { overflow: hidden !important; }';
1800
- document.head.appendChild(s);
1801
- `);
1802
- const headParts = [];
1803
- if (css) headParts.push(`<style>${css}</style>`);
1804
- if (previewStyles) headParts.push(previewStyles);
1805
- if (headParts.length) sandbox.run(`document.head.innerHTML = ${JSON.stringify(headParts.join(""))}`);
1806
- if (previewBody) sandbox.run(`document.body.innerHTML = ${JSON.stringify(previewBody)}`);
1807
- });
1808
- }).catch((err) => {
1809
- console.error("[OpenGenerativeUI] Failed to load sandbox module:", err);
1810
- });
1811
- return () => {
1812
- cancelled = true;
1813
- };
1814
- }, [hasPreview, fullHtml]);
1671
+ controller.setSandboxFunctions(sandboxFunctions);
1672
+ }, [controller, sandboxFunctions]);
1815
1673
  useEffect(() => {
1816
- if (!previewSandboxRef.current || !previewReadyRef.current) return;
1817
- const headParts = [];
1818
- if (css) headParts.push(`<style>${css}</style>`);
1819
- if (previewStyles) headParts.push(previewStyles);
1820
- if (headParts.length) previewSandboxRef.current.run(`document.head.innerHTML = ${JSON.stringify(headParts.join(""))}`);
1821
- if (!previewBody) return;
1822
- previewSandboxRef.current.run(`document.body.innerHTML = ${JSON.stringify(previewBody)}`);
1823
- }, [
1824
- previewBody,
1825
- previewStyles,
1826
- css
1827
- ]);
1674
+ controller.setContent(content);
1675
+ }, [controller, content]);
1828
1676
  useEffect(() => {
1829
- const container = containerRef.current;
1830
- if (!container || !fullHtml) return;
1831
- if (previewSandboxRef.current) {
1832
- previewSandboxRef.current.destroy();
1833
- previewSandboxRef.current = null;
1834
- previewReadyRef.current = false;
1835
- }
1836
- let cancelled = false;
1837
- executedIndexRef.current = 0;
1838
- jsFunctionsInjectedRef.current = false;
1839
- sandboxReadyRef.current = false;
1840
- pendingQueueRef.current = [];
1841
- const htmlContent = css ? injectCssIntoHtml(fullHtml, css) : fullHtml;
1842
- import("@jetbrains/websandbox").then((mod) => {
1843
- if (cancelled) return;
1844
- const sandbox = (mod.default?.default ?? mod.default).create(localApi, {
1845
- frameContainer: container,
1846
- frameContent: ensureHead(htmlContent),
1847
- allowAdditionalAttributes: ""
1848
- });
1849
- sandboxRef.current = sandbox;
1850
- sandbox.iframe.style.width = "100%";
1851
- sandbox.iframe.style.height = "100%";
1852
- sandbox.iframe.style.border = "none";
1853
- sandbox.iframe.style.backgroundColor = "transparent";
1854
- sandbox.promise.then(() => {
1855
- if (cancelled) return;
1856
- sandboxReadyRef.current = true;
1857
- sandbox.run(`
1858
- var s = document.createElement('style');
1859
- s.textContent = 'html, body { overflow: hidden !important; }';
1860
- document.head.appendChild(s);
1861
- `);
1862
- const queue = pendingQueueRef.current;
1863
- pendingQueueRef.current = [];
1864
- for (const code of queue) sandbox.run(code);
1865
- });
1866
- }).catch((err) => {
1867
- console.error("[OpenGenerativeUI] Failed to load sandbox module:", err);
1868
- });
1869
- return () => {
1870
- cancelled = true;
1871
- if (previewSandboxRef.current) {
1872
- previewSandboxRef.current.destroy();
1873
- previewSandboxRef.current = null;
1874
- previewReadyRef.current = false;
1875
- }
1876
- if (sandboxRef.current) {
1877
- sandboxRef.current.destroy();
1878
- sandboxRef.current = null;
1879
- }
1880
- sandboxReadyRef.current = false;
1881
- setAutoHeight(null);
1882
- };
1883
- }, [
1884
- fullHtml,
1885
- css,
1886
- localApi
1887
- ]);
1888
- useEffect(() => {
1889
- if (!content.jsFunctions || jsFunctionsInjectedRef.current) return;
1890
- jsFunctionsInjectedRef.current = true;
1891
- const sandbox = sandboxRef.current;
1892
- if (sandboxReadyRef.current && sandbox) sandbox.run(content.jsFunctions);
1893
- else pendingQueueRef.current.push(content.jsFunctions);
1894
- }, [content.jsFunctions]);
1895
- useEffect(() => {
1896
- const expressions = content.jsExpressions;
1897
- if (!expressions || expressions.length === 0) return;
1898
- const startIndex = executedIndexRef.current;
1899
- if (startIndex >= expressions.length) return;
1900
- const newExprs = expressions.slice(startIndex);
1901
- executedIndexRef.current = expressions.length;
1902
- const sandbox = sandboxRef.current;
1903
- if (sandboxReadyRef.current && sandbox) (async () => {
1904
- for (const expr of newExprs) await sandbox.run(expr);
1905
- })();
1906
- else pendingQueueRef.current.push(...newExprs);
1907
- }, [content.jsExpressions?.length]);
1908
- const generationDone = content.generating === false;
1909
- useEffect(() => {
1910
- const sandbox = sandboxRef.current;
1911
- if (!generationDone || !sandbox) return;
1912
- let handled = false;
1913
- const onMessage = (e) => {
1914
- if (handled) return;
1915
- if (e.source === sandbox.iframe.contentWindow && e.data?.type === "__ck_resize") {
1916
- handled = true;
1917
- setAutoHeight(e.data.height);
1918
- window.removeEventListener("message", onMessage);
1919
- }
1920
- };
1921
- window.addEventListener("message", onMessage);
1922
- const measureOnce = `
1923
- (function() {
1924
- var s = document.createElement('style');
1925
- s.textContent = 'body { height: auto !important; min-height: 0 !important; }';
1926
- document.head.appendChild(s);
1927
- var h = document.body.scrollHeight;
1928
- var cs = getComputedStyle(document.body);
1929
- h += parseFloat(cs.marginTop) || 0;
1930
- h += parseFloat(cs.marginBottom) || 0;
1931
- s.remove();
1932
- parent.postMessage({ type: "__ck_resize", height: Math.ceil(h) }, "*");
1933
- })();
1934
- `;
1935
- if (sandboxReadyRef.current) sandbox.run(measureOnce);
1936
- else pendingQueueRef.current.push(measureOnce);
1937
- return () => {
1938
- window.removeEventListener("message", onMessage);
1939
- };
1940
- }, [generationDone]);
1941
- const height = autoHeight ?? initialHeight;
1942
- const isGenerating = content.generating !== false;
1677
+ controller.setHost(containerRef.current);
1678
+ return () => controller.destroy();
1679
+ }, [controller]);
1680
+ const hasVisibleSandbox = state.phase !== "placeholder";
1943
1681
  return /* @__PURE__ */ jsx("div", {
1944
1682
  ref: containerRef,
1945
1683
  style: {
1946
1684
  position: "relative",
1947
1685
  width: "100%",
1948
- height: `${height}px`,
1686
+ height: `${state.height}px`,
1949
1687
  borderRadius: "8px",
1950
1688
  backgroundColor: hasVisibleSandbox ? "transparent" : "#f5f5f5",
1951
1689
  border: hasVisibleSandbox ? "none" : "1px solid #e0e0e0",
@@ -1954,7 +1692,7 @@ const OpenGenerativeUIActivityRendererInner = React.memo(function OpenGenerative
1954
1692
  justifyContent: hasVisibleSandbox ? void 0 : "center",
1955
1693
  overflow: "hidden"
1956
1694
  },
1957
- children: isGenerating && /* @__PURE__ */ jsxs("div", {
1695
+ children: state.generating && /* @__PURE__ */ jsxs("div", {
1958
1696
  style: {
1959
1697
  position: "absolute",
1960
1698
  inset: 0,
@@ -1986,7 +1724,7 @@ const OpenGenerativeUIActivityRendererInner = React.memo(function OpenGenerative
1986
1724
  }), /* @__PURE__ */ jsx("style", { children: `@keyframes ck-spin { to { transform: rotate(360deg) } }` })]
1987
1725
  })
1988
1726
  });
1989
- }, (prev, next) => prev.content === next.content);
1727
+ };
1990
1728
  /**
1991
1729
  * Frontend tool renderer for generateSandboxedUi.
1992
1730
  * Displays placeholder messages while the UI is being generated.
@@ -2023,7 +1761,7 @@ const OpenGenerativeUIToolRenderer = function OpenGenerativeUIToolRenderer(props
2023
1761
  //#region src/a2ui/A2UIRecoveryStates.tsx
2024
1762
  /**
2025
1763
  * The pre-paint lifecycle fields the middleware stamps onto the `a2ui-surface`
2026
- * activity content (alongside `a2ui_operations` on paint). `.passthrough()` keeps
1764
+ * activity content (alongside `a2ui_operations` on paint). `.loose()` keeps
2027
1765
  * `a2ui_operations` and any future fields intact.
2028
1766
  */
2029
1767
  const A2UILifecycleFields = {
@@ -2429,12 +2167,12 @@ function ensureInitialized() {
2429
2167
  * stable messageId (OSS-162): pre-paint `status` ("building" | "retrying" |
2430
2168
  * "failed") with recovery detail, then `a2ui_operations` on paint. The states
2431
2169
  * swap in place, so the painted surface replaces the skeleton with no extra
2432
- * coordination. `.passthrough()` preserves operations + any future fields.
2170
+ * coordination. `.loose()` preserves operations + any future fields.
2433
2171
  */
2434
2172
  const A2UISurfaceContentSchema = z.object({
2435
2173
  a2ui_operations: z.array(z.any()).optional(),
2436
2174
  ...A2UILifecycleFields
2437
- }).passthrough();
2175
+ }).loose();
2438
2176
  const IS_DEVELOPMENT = process.env.NODE_ENV !== "production";
2439
2177
  /**
2440
2178
  * How long to wait for a surface to report its first paint before giving up on
@@ -4823,10 +4561,6 @@ function CopilotKitStyles() {
4823
4561
 
4824
4562
  //#endregion
4825
4563
  //#region src/providers/CopilotKitProvider.tsx
4826
- const zodToJsonSchemaAdapter = (schema, options) => {
4827
- const refStrategy = options?.$refStrategy;
4828
- return zodToJsonSchema(schema, refStrategy === "root" || refStrategy === "relative" || refStrategy === "none" || refStrategy === "seen" ? { $refStrategy: refStrategy } : {});
4829
- };
4830
4564
  const HEADER_NAME = "X-CopilotCloud-Public-Api-Key";
4831
4565
  const COPILOT_CLOUD_CHAT_URL = "https://api.cloud.copilotkit.ai/copilotkit/v1";
4832
4566
  const EMPTY_HEADERS = Object.freeze({});
@@ -4835,16 +4569,6 @@ const EMPTY_AGENTS = Object.freeze({});
4835
4569
  /** Registration name of a catch-all tool: handles any otherwise-unhandled call. */
4836
4570
  const WILDCARD_TOOL_NAME$1 = "*";
4837
4571
  const HUMAN_IN_THE_LOOP_ABORTED_MESSAGE = "Human-in-the-loop interaction aborted";
4838
- const DEFAULT_DESIGN_SKILL = `When generating UI with generateSandboxedUi, follow these design principles inspired by shadcn/ui:
4839
-
4840
- - Use a minimal, flat aesthetic. Avoid drop shadows and gradients — rely on subtle borders (1px solid, light gray like #e5e7eb) to define surfaces.
4841
- - Neutral base palette: white backgrounds, zinc/slate gray text (#09090b for headings, #71717a for secondary text). One accent color for interactive elements.
4842
- - Use system font stacks (system-ui, -apple-system, sans-serif) at readable sizes (14px body, 600 weight for headings). Tight line-heights.
4843
- - Small, consistent border-radius (6–8px). Cards and containers use border, not shadow, for separation.
4844
- - Buttons: solid fill for primary (dark bg, white text), outline for secondary (border + transparent bg). Subtle hover state (slight opacity or background shift).
4845
- - Use CSS Grid or Flexbox for layout. Ensure the UI looks good at any width.
4846
- - Minimal transitions (150ms) for hover/focus states only. No decorative animations.
4847
- - Keep the UI focused and dense — avoid excessive padding. Use compact spacing (8–12px gaps, 10–14px padding in controls).`;
4848
4572
  /** The MCP Apps renderer with `mcpApps.allowSameOriginFallback` applied. */
4849
4573
  const SameOriginMCPAppsActivityRenderer = (props) => /* @__PURE__ */ jsx(MCPAppsActivityRenderer, {
4850
4574
  ...props,
@@ -5055,7 +4779,7 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
5055
4779
  const builtInFrontendTools = useMemo(() => {
5056
4780
  if (!openGenUIActive) return [];
5057
4781
  return [{
5058
- name: "generateSandboxedUi",
4782
+ name: GENERATE_SANDBOXED_UI_TOOL_NAME$1,
5059
4783
  description: GENERATE_SANDBOXED_UI_DESCRIPTION,
5060
4784
  parameters: GenerateSandboxedUiArgsSchema,
5061
4785
  handler: async () => "UI generated",
@@ -5280,7 +5004,7 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
5280
5004
  useEffect(() => {
5281
5005
  copilotkit.setDefaultThrottleMs(defaultThrottleMs);
5282
5006
  }, [copilotkit, defaultThrottleMs]);
5283
- const designSkill = openGenerativeUI?.designSkill ?? DEFAULT_DESIGN_SKILL;
5007
+ const designSkill = openGenerativeUI?.designSkill ?? DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL$1;
5284
5008
  useLayoutEffect(() => {
5285
5009
  if (!copilotkit || !openGenUIActive) return;
5286
5010
  const id = copilotkit.addContext({
@@ -5300,7 +5024,7 @@ const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY
5300
5024
  return JSON.stringify(sandboxFunctionsList.map((fn) => ({
5301
5025
  name: fn.name,
5302
5026
  description: fn.description,
5303
- parameters: schemaToJsonSchema(fn.parameters, { zodToJsonSchema: zodToJsonSchemaAdapter })
5027
+ parameters: schemaToJsonSchema(fn.parameters)
5304
5028
  })));
5305
5029
  }, [sandboxFunctionsList]);
5306
5030
  useLayoutEffect(() => {
@@ -13411,5 +13135,5 @@ const WildcardToolCallRender = defineToolCallRenderer({
13411
13135
  });
13412
13136
 
13413
13137
  //#endregion
13414
- export { A2UI_FENCE_LANGUAGE, ACTIVITY_HISTORY_METADATA, AGUIConnectNotImplementedError, AGUIError, AGUI_METADATA_KEY, AbstractAgent, ActivityDeltaEventSchema, ActivityMessageSchema, ActivitySnapshotEventSchema, AddOperationSchema, AgentCapabilitiesSchema, AgentRegistry, AgentThreadLockedError, AssistantMessageSchema, AttributableSchema, AudioInputContentSchema, AudioInputPartSchema, AudioPartSchema, AudioRecorderError, BackwardCompatibility_0_0_39, BackwardCompatibility_0_0_45, BackwardCompatibility_0_0_57, BaseEventSchema, BaseMessageSchema, CompatibilityBoundary, ContentPartSchema, ContextSchema, ContextStore, CopilotChat, CopilotChatAssistantMessage_default as CopilotChatAssistantMessage, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatDefaultLabels, CopilotChatInput_default as CopilotChatInput, CopilotChatMessageView, CopilotChatReasoningMessage_default as CopilotChatReasoningMessage, CopilotChatSuggestionPill, CopilotChatSuggestionView, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToolCallGroup, CopilotChatToolCallsView, CopilotChatUserMessage_default as CopilotChatUserMessage, CopilotChatView_default as CopilotChatView, CopilotChatWorkSummary, CopilotKitCore, CopilotKitCoreErrorCode, CopilotKitCoreReact, CopilotKitCoreRuntimeConnectionStatus, CopilotKitHeaderResolutionError, CopilotKitInspector, CopilotKitProvider, CopilotKitStyles, CopilotModalHeader, CopilotPopup, CopilotPopupView, CopilotSidebar, CopilotSidebarView, CopilotThreadsDrawer, CopyOperationSchema, CustomEventSchema, DataSourceSchema, DebugLogger, DeveloperMessageSchema, DocumentInputContentSchema, DocumentInputPartSchema, DocumentPartSchema, EventSchema, EventSchemas, EventType, EventTypeSchema, ExecutionCapabilitiesSchema, FileSourceSchema, FilterToolCallsMiddleware, FunctionCallSchema, FunctionMiddleware, GenerateSandboxedUiArgsSchema, HttpAgent, HumanInTheLoopCapabilitiesSchema, INSPECTOR_THREAD_BRIDGE_PLUGIN_ID, INTELLIGENCE_TURN_HEAD, INTERRUPT_EVENT_NAME, IdentityCapabilitiesSchema, ImageInputContentSchema, ImageInputPartSchema, ImagePartSchema, InputContentDataSourceSchema, InputContentSchema, InputContentSourceSchema, InputContentUrlSourceSchema, IntelligenceAgent, IntelligenceIndicator, IntelligenceIndicatorView, InterruptSchema, JsonPatchOperationSchema, JsonPatchSchema, JsonPointerSchema, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, MEMORY_ERROR_REGISTRY, MarkdownRendererProvider, MemoryError, MessageSchema, MessagesSnapshotEventSchema, MetadataSchema, Middleware, MoveOperationSchema, MultiAgentCapabilitiesSchema, MultimodalCapabilitiesSchema, MultimodalInputCapabilitiesSchema, MultimodalOutputCapabilitiesSchema, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, OptionalMetadataSchema, OutputCapabilitiesSchema, PROTOCOL_VERSION, PartSourceSchema, ProxiedCopilotRuntimeAgent, RawEventSchema, ReasoningCapabilitiesSchema, ReasoningEncryptedValueEventSchema, ReasoningEncryptedValueSubtypeSchema, ReasoningEndEventSchema, ReasoningMessageChunkEventSchema, ReasoningMessageContentEventSchema, ReasoningMessageEndEventSchema, ReasoningMessageSchema, ReasoningMessageStartEventSchema, ReasoningStartEventSchema, RemoveOperationSchema, ReplaceOperationSchema, ResumeEntrySchema, RoleSchema, RunAgentInputSchema, RunErrorEventSchema, RunFinishedCancelledOutcomeSchema, RunFinishedEventSchema, RunFinishedInterruptOutcomeSchema, RunFinishedOutcomeSchema, RunFinishedSuccessOutcomeSchema, RunHandler, RunStartedEventSchema, SandboxFunctionsContext, StateCapabilitiesSchema, StateDeltaEventSchema, StateManager, StateSchema, StateSnapshotEventSchema, StepFinishedEventSchema, StepStartedEventSchema, StreamingMarkdownDefaultRenderer, SubagentErrorEventSchema, SubagentFinishedEventSchema, SubagentFinishedOutcomeSchema, SubagentFinishedSuccessOutcomeSchema, SubagentFinishedSuspendedOutcomeSchema, SubagentInfoSchema, SubagentRunIdSchema, SubagentStartedEventSchema, SuggestionEngine, SystemMessageSchema, TestOperationSchema, TextInputContentSchema, TextMessageChunkEventSchema, TextMessageContentEventSchema, TextMessageEndEventSchema, TextMessageRoleSchema, TextMessageStartEventSchema, TextPartSchema, TokenUsageSchema, ToolCallArgsEventSchema, ToolCallChunkEventSchema, ToolCallEndEventSchema, ToolCallResultEventSchema, ToolCallSchema, ToolCallStartEventSchema, ToolCallStatus, ToolMessageSchema, ToolSchema, ToolsCapabilitiesSchema, TranscriptionError, TranscriptionErrorCode, TransportCapabilitiesSchema, UrlSourceSchema, UseAgentUpdate, UserMessageSchema, VideoInputContentSchema, VideoInputPartSchema, VideoPartSchema, WebMCPRegistry, WildcardToolCallRender, a2uiDefaultTheme, aggregateTokenUsage, authoritativeActivityTypes, buildResumeArray, classifySurfaceCards, compactEvents, completePartialMarkdown, contentHasMedia, contentToText, convertToLegacyEvents, createA2UIMessageRenderer, createActionGroup, createDebugLogger, createEffect, createInspectorThreadRequestId, createReducer, createSelector, createStore, defaultApplyEvents, defineToolCallRenderer, emitInspectorActiveThread, emitInspectorStopViewing, emitInspectorViewThread, emitInspectorViewThreadResult, empty, enforceEvents, enforceOutgoingInput, ensureObjectArgs, extractCompleteArrayItems, extractFenceOperations, extractStringField, flattenInformationalCards, getIntelligenceTurnAnchors, getMarkdownOperationSurfaceId, getRunOutcome, getWebMCPModelContext, isAbortError, isInspectorThreadBridgeEnabled, isInterruptExpired, isRecognizedEvent, isRunCompletionAware, mergeMetadata, messageGroup, messageRow, ofType, omitOptionalNulls, on, onInspectorActiveThread, onInspectorStopViewing, onInspectorViewThread, onInspectorViewThreadResult, parseProtoStream, parseSSEStream, parseToolArguments, prepareSurfaceOperations, props, randomUUID, resolveAgentDebugConfig, resolveDebugLogger, runHttpRequest, segmentSurfaceProse, select, splitA2UIMarkdown, structuredClone_, tokenUsageFromAiSdkUsage, tokenUsageFromLangChainMetadata, transformChunks, transformHttpEventStream, useAgent, useAgentContext, useAttachments, useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useDefaultRenderTool, useFrontendTool, useFrontendTools, useHumanInTheLoop, useInterrupt, useLearnFromUserAction, useLearnFromUserActionInCurrentThread, useLicenseContext, useMarkdownRenderer, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSuggestions, useThreads, verifyEvents, withAuthoritativeActivityTypes, ɵCOPILOTKIT_FEATURES, ɵInterruptState, ɵMAX_SOCKET_RETRIES, ɵRUNTIME_PROBE_TIMEOUT_MS, ɵTHREAD_REQUEST_TIMEOUT_MS, ɵclearAgentInterruptState, ɵcomposerButtonState, ɵcopilotIconSvgAttributes, ɵcopilotIcons, ɵcountFailedToolCalls, ɵcreateMemoryStore, ɵcreateThreadSelectors, ɵcreateThreadStore, ɵdeduplicateMessages, ɵformatCountLabel, ɵformatLabel, ɵformatReasoningDuration, ɵformatToolNames, ɵformatWorkDuration, ɵgetAgentInterruptState, ɵgetArgumentPreview, ɵgetLatestTurnKey, ɵgetToolCallLayouts, ɵgetToolCallPreview, ɵgetToolCallRendererNames, ɵgetToolCallRowStatus, ɵgetToolResults, ɵgetTurnWork, ɵgetWorkOpenState, ɵisCopilotKitFeature, ɵisHttpAgent, ɵisRetryableMemoryStatus, ɵisTurnWorkOpen, ɵisTurnWorking, ɵjoinPhoenixChannel$, ɵmapMemoryMetadataEvent, ɵmemoryAdapterEvents, ɵmemoryDomainEvents, ɵmemoryReducer, ɵmemoryRestEvents, ɵmessagesFingerprint, ɵobservePhoenixEvent$, ɵobservePhoenixJoinOutcome$, ɵobservePhoenixSocketHealth$, ɵobservePhoenixSocketSignals$, ɵphoenixChannel$, ɵphoenixSocket$, ɵpluralize, ɵrecordWorkTime, ɵresolveActivityRenderer, ɵresolveComposerKey, ɵresolveCustomMessageRenderers, ɵresolveLicenseState, ɵresolveThreadsLicense, ɵresolveToolCallRenderer, ɵrunMcpFollowUp, ɵselectFetchMoreError, ɵselectHasNextPage, ɵselectIsFetchingNextPage, ɵselectIsMutating, ɵselectMemories, ɵselectMemoriesAvailable, ɵselectMemoriesError, ɵselectMemoriesIsLoading, ɵselectMemoriesIsMutating, ɵselectMemoriesRealtimeStatus, ɵselectThreads, ɵselectThreadsError, ɵselectThreadsIsLoading, ɵstringifyToolCallPayload, ɵthreadAdapterEvents, ɵtranscribeAudio, ɵtranscriptionErrorMessageKey, ɵwithHeaderDefaults };
13138
+ export { A2UI_FENCE_LANGUAGE, ACTIVITY_HISTORY_METADATA, AGUIConnectNotImplementedError, AGUIError, AGUI_METADATA_KEY, AbstractAgent, ActivityDeltaEventSchema, ActivityMessageSchema, ActivitySnapshotEventSchema, AddOperationSchema, AgentCapabilitiesSchema, AgentRegistry, AgentThreadLockedError, AssistantMessageSchema, AttributableSchema, AudioInputContentSchema, AudioInputPartSchema, AudioPartSchema, AudioRecorderError, BackwardCompatibility_0_0_39, BackwardCompatibility_0_0_45, BackwardCompatibility_0_0_57, BaseEventSchema, BaseMessageSchema, CompatibilityBoundary, ContentPartSchema, ContextSchema, ContextStore, CopilotChat, CopilotChatAssistantMessage_default as CopilotChatAssistantMessage, CopilotChatAttachmentQueue, CopilotChatAttachmentRenderer, CopilotChatAudioRecorder, CopilotChatConfigurationProvider, CopilotChatDefaultLabels, CopilotChatInput_default as CopilotChatInput, CopilotChatMessageView, CopilotChatReasoningMessage_default as CopilotChatReasoningMessage, CopilotChatSuggestionPill, CopilotChatSuggestionView, CopilotChatToggleButton, DefaultCloseIcon as CopilotChatToggleButtonCloseIcon, DefaultOpenIcon as CopilotChatToggleButtonOpenIcon, CopilotChatToolCallGroup, CopilotChatToolCallsView, CopilotChatUserMessage_default as CopilotChatUserMessage, CopilotChatView_default as CopilotChatView, CopilotChatWorkSummary, CopilotKitCore, CopilotKitCoreErrorCode, CopilotKitCoreReact, CopilotKitCoreRuntimeConnectionStatus, CopilotKitHeaderResolutionError, CopilotKitInspector, CopilotKitProvider, CopilotKitStyles, CopilotModalHeader, CopilotPopup, CopilotPopupView, CopilotSidebar, CopilotSidebarView, CopilotThreadsDrawer, CopyOperationSchema, CustomEventSchema, DEFAULT_OPEN_GENERATIVE_UI_DESIGN_SKILL, DataSourceSchema, DebugLogger, DeveloperMessageSchema, DocumentInputContentSchema, DocumentInputPartSchema, DocumentPartSchema, EventSchema, EventSchemas, EventType, EventTypeSchema, ExecutionCapabilitiesSchema, FileSourceSchema, FilterToolCallsMiddleware, FunctionCallSchema, FunctionMiddleware, GENERATE_SANDBOXED_UI_TOOL_NAME, GenerateSandboxedUiArgsSchema, HttpAgent, HumanInTheLoopCapabilitiesSchema, INSPECTOR_THREAD_BRIDGE_PLUGIN_ID, INTELLIGENCE_TURN_HEAD, INTERRUPT_EVENT_NAME, IdentityCapabilitiesSchema, ImageInputContentSchema, ImageInputPartSchema, ImagePartSchema, InputContentDataSourceSchema, InputContentSchema, InputContentSourceSchema, InputContentUrlSourceSchema, IntelligenceAgent, IntelligenceIndicator, IntelligenceIndicatorView, InterruptSchema, JsonPatchOperationSchema, JsonPatchSchema, JsonPointerSchema, MCPAppsActivityContentSchema, MCPAppsActivityRenderer, MCPAppsActivityType, MEMORY_ERROR_REGISTRY, MarkdownRendererProvider, MemoryError, MessageSchema, MessagesSnapshotEventSchema, MetadataSchema, Middleware, MoveOperationSchema, MultiAgentCapabilitiesSchema, MultimodalCapabilitiesSchema, MultimodalInputCapabilitiesSchema, MultimodalOutputCapabilitiesSchema, OPEN_GENERATIVE_UI_ACTIVITY_TYPE, OpenGenerativeUIActivityRenderer, OpenGenerativeUIActivityType, OpenGenerativeUIContentSchema, OpenGenerativeUIToolRenderer, OptionalMetadataSchema, OutputCapabilitiesSchema, PROTOCOL_VERSION, PartSourceSchema, ProxiedCopilotRuntimeAgent, RawEventSchema, ReasoningCapabilitiesSchema, ReasoningEncryptedValueEventSchema, ReasoningEncryptedValueSubtypeSchema, ReasoningEndEventSchema, ReasoningMessageChunkEventSchema, ReasoningMessageContentEventSchema, ReasoningMessageEndEventSchema, ReasoningMessageSchema, ReasoningMessageStartEventSchema, ReasoningStartEventSchema, RemoveOperationSchema, ReplaceOperationSchema, ResumeEntrySchema, RoleSchema, RunAgentInputSchema, RunErrorEventSchema, RunFinishedCancelledOutcomeSchema, RunFinishedEventSchema, RunFinishedInterruptOutcomeSchema, RunFinishedOutcomeSchema, RunFinishedSuccessOutcomeSchema, RunHandler, RunStartedEventSchema, SandboxFunctionsContext, StateCapabilitiesSchema, StateDeltaEventSchema, StateManager, StateSchema, StateSnapshotEventSchema, StepFinishedEventSchema, StepStartedEventSchema, StreamingMarkdownDefaultRenderer, SubagentErrorEventSchema, SubagentFinishedEventSchema, SubagentFinishedOutcomeSchema, SubagentFinishedSuccessOutcomeSchema, SubagentFinishedSuspendedOutcomeSchema, SubagentInfoSchema, SubagentRunIdSchema, SubagentStartedEventSchema, SuggestionEngine, SystemMessageSchema, TestOperationSchema, TextInputContentSchema, TextMessageChunkEventSchema, TextMessageContentEventSchema, TextMessageEndEventSchema, TextMessageRoleSchema, TextMessageStartEventSchema, TextPartSchema, TokenUsageSchema, ToolCallArgsEventSchema, ToolCallChunkEventSchema, ToolCallEndEventSchema, ToolCallResultEventSchema, ToolCallSchema, ToolCallStartEventSchema, ToolCallStatus, ToolMessageSchema, ToolSchema, ToolsCapabilitiesSchema, TranscriptionError, TranscriptionErrorCode, TransportCapabilitiesSchema, UrlSourceSchema, UseAgentUpdate, UserMessageSchema, VideoInputContentSchema, VideoInputPartSchema, VideoPartSchema, WebMCPRegistry, WildcardToolCallRender, a2uiDefaultTheme, aggregateTokenUsage, authoritativeActivityTypes, buildResumeArray, classifySurfaceCards, compactEvents, completePartialMarkdown, contentHasMedia, contentToText, convertToLegacyEvents, createA2UIMessageRenderer, createActionGroup, createDebugLogger, createEffect, createInspectorThreadRequestId, createReducer, createSelector, createStore, defaultApplyEvents, defineToolCallRenderer, emitInspectorActiveThread, emitInspectorStopViewing, emitInspectorViewThread, emitInspectorViewThreadResult, empty, enforceEvents, enforceOutgoingInput, ensureObjectArgs, extractCompleteArrayItems, extractFenceOperations, extractStringField, flattenInformationalCards, getIntelligenceTurnAnchors, getMarkdownOperationSurfaceId, getRunOutcome, getWebMCPModelContext, isAbortError, isInspectorThreadBridgeEnabled, isInterruptExpired, isRecognizedEvent, isRunCompletionAware, mergeMetadata, messageGroup, messageRow, ofType, omitOptionalNulls, on, onInspectorActiveThread, onInspectorStopViewing, onInspectorViewThread, onInspectorViewThreadResult, parseProtoStream, parseSSEStream, parseToolArguments, prepareSurfaceOperations, props, randomUUID, resolveAgentDebugConfig, resolveDebugLogger, runHttpRequest, segmentSurfaceProse, select, splitA2UIMarkdown, structuredClone_, tokenUsageFromAiSdkUsage, tokenUsageFromLangChainMetadata, transformChunks, transformHttpEventStream, useAgent, useAgentContext, useAttachments, useCapabilities, useComponent, useConfigureSuggestions, useCopilotChatConfiguration, useCopilotKit, useDefaultRenderTool, useFrontendTool, useFrontendTools, useHumanInTheLoop, useInterrupt, useLearnFromUserAction, useLearnFromUserActionInCurrentThread, useLicenseContext, useMarkdownRenderer, useMemories, useRenderActivityMessage, useRenderCustomMessages, useRenderTool, useRenderToolCall, useSandboxFunctions, useSuggestions, useThreads, verifyEvents, withAuthoritativeActivityTypes, ɵCOPILOTKIT_FEATURES, ɵInterruptState, ɵMAX_SOCKET_RETRIES, ɵOpenGenerativeUIController, ɵRUNTIME_PROBE_TIMEOUT_MS, ɵTHREAD_REQUEST_TIMEOUT_MS, ɵclearAgentInterruptState, ɵcomposerButtonState, ɵcopilotIconSvgAttributes, ɵcopilotIcons, ɵcountFailedToolCalls, ɵcreateMemoryStore, ɵcreateThreadSelectors, ɵcreateThreadStore, ɵdeduplicateMessages, ɵextractCompleteStyles, ɵformatCountLabel, ɵformatLabel, ɵformatReasoningDuration, ɵformatToolNames, ɵformatWorkDuration, ɵgetAgentInterruptState, ɵgetArgumentPreview, ɵgetLatestTurnKey, ɵgetToolCallLayouts, ɵgetToolCallPreview, ɵgetToolCallRendererNames, ɵgetToolCallRowStatus, ɵgetToolResults, ɵgetTurnWork, ɵgetWorkOpenState, ɵisCopilotKitFeature, ɵisHttpAgent, ɵisRetryableMemoryStatus, ɵisTurnWorkOpen, ɵisTurnWorking, ɵjoinPhoenixChannel$, ɵloadWebsandbox, ɵmapMemoryMetadataEvent, ɵmemoryAdapterEvents, ɵmemoryDomainEvents, ɵmemoryReducer, ɵmemoryRestEvents, ɵmessagesFingerprint, ɵobservePhoenixEvent$, ɵobservePhoenixJoinOutcome$, ɵobservePhoenixSocketHealth$, ɵobservePhoenixSocketSignals$, ɵphoenixChannel$, ɵphoenixSocket$, ɵpluralize, ɵprocessPartialHtml, ɵrecordWorkTime, ɵresolveActivityRenderer, ɵresolveComposerKey, ɵresolveCustomMessageRenderers, ɵresolveLicenseState, ɵresolveThreadsLicense, ɵresolveToolCallRenderer, ɵrunMcpFollowUp, ɵselectFetchMoreError, ɵselectHasNextPage, ɵselectIsFetchingNextPage, ɵselectIsMutating, ɵselectMemories, ɵselectMemoriesAvailable, ɵselectMemoriesError, ɵselectMemoriesIsLoading, ɵselectMemoriesIsMutating, ɵselectMemoriesRealtimeStatus, ɵselectThreads, ɵselectThreadsError, ɵselectThreadsIsLoading, ɵstringifyToolCallPayload, ɵthreadAdapterEvents, ɵtranscribeAudio, ɵtranscriptionErrorMessageKey, ɵwithHeaderDefaults };
13415
13139
  //# sourceMappingURL=index.mjs.map