@convai/web-sdk 1.7.0-beta.0 → 1.7.0-beta.2
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/README.md +40 -6
- package/dist/core/AudioManager.js.map +1 -1
- package/dist/core/BlendshapeQueue.js.map +1 -1
- package/dist/core/ConnectionStateHandler.js.map +1 -1
- package/dist/core/ConvaiClient.d.ts +1 -31
- package/dist/core/ConvaiClient.d.ts.map +1 -1
- package/dist/core/ConvaiClient.js +8 -200
- package/dist/core/ConvaiClient.js.map +1 -1
- package/dist/core/EventEmitter.js.map +1 -1
- package/dist/core/MemoryManager.js.map +1 -1
- package/dist/core/MessageHandler.d.ts.map +1 -1
- package/dist/core/MessageHandler.js +4 -26
- package/dist/core/MessageHandler.js.map +1 -1
- package/dist/core/ScreenShareManager.js.map +1 -1
- package/dist/core/VideoManager.js.map +1 -1
- package/dist/core/connectRequest.d.ts +2 -2
- package/dist/core/connectRequest.js +3 -3
- package/dist/core/connectRequest.js.map +1 -1
- package/dist/core/contextUpdateRequest.js.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/types.d.ts +9 -163
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/core/videoSourceState.js.map +1 -1
- package/dist/core/visionRequest.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lipsync-helpers/arkitOrder61.js.map +1 -1
- package/dist/lipsync-helpers/createBlendshapeQueue.js.map +1 -1
- package/dist/lipsync-helpers/declarativeMapping.js.map +1 -1
- package/dist/lipsync-helpers/index.js.map +1 -1
- package/dist/lipsync-helpers/mappingTypes.js.map +1 -1
- package/dist/lipsync-helpers/metahumanOrder251.js.map +1 -1
- package/dist/lipsync-helpers/mhaLimitDrivers.js.map +1 -1
- package/dist/lipsync-helpers/naturalness/processor.js.map +1 -1
- package/dist/lipsync-helpers/naturalness/profiles/mha.js.map +1 -1
- package/dist/lipsync-helpers/naturalness/types.js.map +1 -1
- package/dist/lipsync-helpers/presetMappers.js.map +1 -1
- package/dist/react/components/ConvaiWidget.js.map +1 -1
- package/dist/react/components/index.js.map +1 -1
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js.map +1 -1
- package/dist/react/components/rtc-widget/components/AudioVisualizer.js.map +1 -1
- package/dist/react/components/rtc-widget/components/ConviMessage.js.map +1 -1
- package/dist/react/components/rtc-widget/components/FloatingVideo.js.map +1 -1
- package/dist/react/components/rtc-widget/components/MarkdownRenderer.js.map +1 -1
- package/dist/react/components/rtc-widget/components/MessageBubble.js.map +1 -1
- package/dist/react/components/rtc-widget/components/MessageList.js.map +1 -1
- package/dist/react/components/rtc-widget/components/UserMessage.js.map +1 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js.map +1 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js.map +1 -1
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js.map +1 -1
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js.map +1 -1
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js.map +1 -1
- package/dist/react/components/rtc-widget/components/conviComponents/index.js.map +1 -1
- package/dist/react/components/rtc-widget/components/index.js.map +1 -1
- package/dist/react/components/rtc-widget/index.js.map +1 -1
- package/dist/react/components/rtc-widget/styles/framerConfig.js.map +1 -1
- package/dist/react/components/rtc-widget/styles/icons.js.map +1 -1
- package/dist/react/components/rtc-widget/styles/index.js.map +1 -1
- package/dist/react/components/rtc-widget/styles/styledComponents.js.map +1 -1
- package/dist/react/components/rtc-widget/styles/theme.js.map +1 -1
- package/dist/react/components/rtc-widget/types/index.js.map +1 -1
- package/dist/react/hooks/index.js.map +1 -1
- package/dist/react/hooks/useCharacterInfo.js.map +1 -1
- package/dist/react/hooks/useConvaiClient.d.ts.map +1 -1
- package/dist/react/hooks/useConvaiClient.js +0 -3
- package/dist/react/hooks/useConvaiClient.js.map +1 -1
- package/dist/react/hooks/useLocalCameraTrack.js.map +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/utils/logger.js.map +1 -1
- package/dist/vanilla/AudioRenderer.js.map +1 -1
- package/dist/vanilla/ConvaiWidget.js.map +1 -1
- package/dist/vanilla/WebSocketSession.js.map +1 -1
- package/dist/vanilla/icons.js.map +1 -1
- package/dist/vanilla/index.js.map +1 -1
- package/dist/vanilla/styles.js.map +1 -1
- package/dist/vanilla/types.d.ts +2 -2
- package/dist/vanilla/types.d.ts.map +1 -1
- package/dist/vanilla/types.js.map +1 -1
- package/dist/vanilla/websocket.js.map +1 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +4 -0
- package/dist/version.js.map +1 -0
- package/package.json +13 -6
- package/dist/core/CharacterRoster.d.ts +0 -68
- package/dist/core/CharacterRoster.d.ts.map +0 -1
- package/dist/core/CharacterRoster.js +0 -235
- package/dist/core/CharacterRoster.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/vanilla/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,+CAA+C;AAC/C,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,MAAM,EAAE;QACN,OAAO,EAAE;YACP,EAAE,EAAE,SAAS;YACb,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;SACf;QACD,MAAM,EAAE;YACN,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,SAAS;SAChB;QACD,OAAO,EAAE;YACP,EAAE,EAAE,SAAS;YACb,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAA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EAAE,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;QAC5D,OAAO,GAAG,MAAM,KAAK,KAAK,EAAE,CAAC;IAC/B,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC,CAAC","sourcesContent":["/**\n * Vanilla Styles - Port of React theme system for vanilla implementations\n */\n\n// Theme configuration (matching React version)\nexport const aeroTheme = {\n colors: {\n primary: {\n 50: \"#f0f9ff\",\n 100: \"#e0f2fe\",\n 200: \"#bae6fd\",\n 300: \"#7dd3fc\",\n 400: \"#38bdf8\",\n 500: \"#0ea5e9\",\n 600: \"#0284c7\",\n 700: \"#0369a1\",\n 800: \"#075985\",\n 900: \"#0c4a6e\",\n },\n convai: {\n light: \"#1EB453\",\n medium: \"#0b6049\",\n dark: \"#084c3a\",\n },\n neutral: {\n 50: \"#fafafa\",\n 100: \"#f5f5f5\",\n 200: \"#e5e5e5\",\n 300: \"#d4d4d4\",\n 400: \"#a3a3a3\",\n 500: \"#737373\",\n 600: \"#525252\",\n 700: \"#404040\",\n 800: \"#262626\",\n 900: \"#171717\",\n },\n glass: {\n light: \"rgba(255, 255, 255, 0.1)\",\n medium: \"rgba(255, 255, 255, 0.15)\",\n dark: \"rgba(0, 0, 0, 0.1)\",\n backdrop: \"rgba(255, 255, 255, 0.8)\",\n card: \"rgba(255, 255, 255, 0.9)\",\n backdropLight: \"blur(20px)\",\n borderLight: \"1px solid rgba(255, 255, 255, 0.2)\",\n },\n accent: {\n purple: \"#8b5cf6\",\n green: \"#10b981\",\n blue: \"#3b82f6\",\n orange: \"#f59e0b\",\n red: \"#ef4444\",\n },\n error: {\n 50: \"#fef2f2\",\n 100: \"#fee2e2\",\n 200: \"#fecaca\",\n 300: \"#fca5a5\",\n 400: \"#f87171\",\n 500: \"#ef4444\",\n 600: \"#dc2626\",\n 700: \"#b91c1c\",\n 800: \"#991b1b\",\n 900: \"#7f1d1d\",\n },\n text: {\n primary: \"#1f2937\",\n secondary: \"#6b7280\",\n tertiary: \"#9ca3af\",\n inverse: \"#ffffff\",\n },\n },\n typography: {\n fontFamily: {\n primary: '\"Noto Sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n body: '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n mono: 'SF Mono, Monaco, \"Cascadia Code\", \"Roboto Mono\", Consolas, \"Courier New\", monospace',\n },\n fontSize: {\n xs: \"0.75rem\",\n sm: \"0.875rem\",\n base: \"1rem\",\n lg: \"1.125rem\",\n xl: \"1.25rem\",\n \"2xl\": \"1.5rem\",\n \"3xl\": \"1.875rem\",\n \"4xl\": \"2.25rem\",\n },\n fontWeight: {\n normal: 400,\n medium: 500,\n semibold: 600,\n bold: 700,\n },\n },\n spacing: {\n xs: \"0.25rem\",\n sm: \"0.5rem\",\n md: \"1rem\",\n lg: \"1.5rem\",\n xl: \"2rem\",\n \"2xl\": \"3rem\",\n \"3xl\": \"4rem\",\n },\n borderRadius: {\n none: \"0\",\n sm: \"0.25rem\",\n md: \"0.5rem\",\n lg: \"0.75rem\",\n xl: \"1rem\",\n \"2xl\": \"1.5rem\",\n full: \"9999px\",\n },\n shadows: {\n sm: \"0 1px 2px 0 rgba(0, 0, 0, 0.05)\",\n md: \"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)\",\n lg: \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)\",\n xl: \"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)\",\n glass: \"0 8px 32px rgba(0, 0, 0, 0.1)\",\n },\n glass: {\n backdrop: \"blur(20px)\",\n backdropLight: \"blur(10px)\",\n backdropHeavy: \"blur(40px)\",\n border: \"1px solid rgba(255, 255, 255, 0.2)\",\n borderLight: \"1px solid rgba(255, 255, 255, 0.1)\",\n },\n transitions: {\n fast: \"0.15s ease-in-out\",\n normal: \"0.2s ease-in-out\",\n slow: \"0.3s ease-in-out\",\n spring: \"0.4s cubic-bezier(0.4, 0, 0.2, 1)\",\n snappy: \"all 0.1s ease-out\",\n },\n zIndex: {\n base: 1,\n dropdown: 1000,\n sticky: 1020,\n fixed: 1030,\n modal: 1040,\n popover: 1050,\n tooltip: 1060,\n },\n};\n\n/**\n * Global CSS styles for the Convai widget\n * This should be injected once into the document head\n */\nexport const getGlobalStyles = (): string => `\n @keyframes convai-pulse {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n }\n\n @keyframes convai-spin {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n @keyframes convai-bounce {\n 0%, 100% {\n transform: translateY(0);\n }\n 50% {\n transform: translateY(-10px);\n }\n }\n\n @keyframes convai-slide-up {\n from {\n transform: translateY(20px);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n }\n\n @keyframes convai-slide-down {\n from {\n transform: translateY(-20px);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n }\n\n @keyframes convai-fade-in {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes convai-scale-in {\n from {\n transform: scale(0.8);\n opacity: 0;\n }\n to {\n transform: scale(1);\n opacity: 1;\n }\n }\n\n .convai-widget * {\n box-sizing: border-box;\n }\n\n .convai-widget {\n font-family: ${aeroTheme.typography.fontFamily.primary};\n color: ${aeroTheme.colors.text.primary};\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n .convai-widget button {\n font-family: inherit;\n cursor: pointer;\n border: none;\n outline: none;\n background: none;\n padding: 0;\n margin: 0;\n }\n\n .convai-widget input {\n font-family: inherit;\n border: none;\n outline: none;\n background: none;\n }\n\n .convai-widget::-webkit-scrollbar {\n width: 6px;\n }\n\n .convai-widget::-webkit-scrollbar-track {\n background: rgba(0, 0, 0, 0.05);\n border-radius: 3px;\n }\n\n .convai-widget::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.2);\n border-radius: 3px;\n }\n\n .convai-widget::-webkit-scrollbar-thumb:hover {\n background: rgba(0, 0, 0, 0.3);\n }\n`;\n\n/**\n * Inject global styles into the document head\n */\nlet stylesInjected = false;\nexport const injectGlobalStyles = (): void => {\n if (stylesInjected) return;\n\n const styleElement = document.createElement('style');\n styleElement.id = 'convai-widget-styles';\n styleElement.textContent = getGlobalStyles();\n document.head.appendChild(styleElement);\n \n stylesInjected = true;\n};\n\n/**\n * Helper to create inline styles object from theme\n */\nexport const createStyles = (styles: Record<string, any>): string => {\n return Object.entries(styles)\n .map(([key, value]) => {\n const cssKey = key.replace(/([A-Z])/g, '-$1').toLowerCase();\n return `${cssKey}: ${value}`;\n })\n .join('; ');\n};\n\n"]}
|
package/dist/vanilla/types.d.ts
CHANGED
|
@@ -35,9 +35,9 @@ export interface VanillaWidgetOptions {
|
|
|
35
35
|
format?: "arkit" | "mha";
|
|
36
36
|
/** Custom mapper function to transform incoming blendshapes */
|
|
37
37
|
customMapper?: (input: number[] | Float32Array) => Float32Array;
|
|
38
|
-
/** Indexed NeuroSync ahead-delivery. Defaults to
|
|
38
|
+
/** Indexed NeuroSync ahead-delivery. Defaults to true; set false for the legacy paced path. */
|
|
39
39
|
deliver_chunks_ahead?: boolean;
|
|
40
|
-
/** Ahead-delivery timeline FPS override; ignored
|
|
40
|
+
/** Ahead-delivery timeline FPS override; ignored when deliver_chunks_ahead is false. */
|
|
41
41
|
output_fps?: number;
|
|
42
42
|
/** Seconds the server buffers blendshapes before releasing them. */
|
|
43
43
|
frames_buffer_duration?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/vanilla/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,WAAW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AAK,IAAI,CAAC;CAC3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/vanilla/types.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/vanilla/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { IConvaiClient, ChatMessage } from '../core/types';\n\n/**\n * Options for creating a vanilla ConvaiWidget\n * \n * You can either:\n * 1. Pass an existing convaiClient instance, OR\n * 2. Pass connection config (apiKey, characterId, etc.) directly\n */\nexport interface VanillaWidgetOptions {\n /** \n * Option 1: Pass an existing Convai client instance.\n * Should be initialized with config: new ConvaiClient({ apiKey, characterId, ... })\n * The widget will auto-connect on first click.\n */\n convaiClient?: IConvaiClient & { activity?: string; chatMessages: ChatMessage[] };\n \n /** Option 2: Pass connection config directly (convenience shortcut). Either apiKey or authToken is required. */\n apiKey?: string;\n /** Auth token for realtime API (alternative to apiKey). See https://realtime-api.convai.com/docs */\n authToken?: string;\n characterId?: string;\n enableVideo?: boolean;\n startWithVideoOn?: boolean;\n /** Enable lipsync/facial animation blendshapes (default: false) */\n enableLipsync?: boolean;\n /** Enable emotion detection and bot-emotion updates (default: false) */\n enableEmotion?: boolean;\n /** Log incoming and outgoing decoded RTVI data messages to the browser console (default: true) */\n logRtviMessages?: boolean;\n /** Blendshape configuration for facial animation format */\n blendshapeConfig?: {\n /** Format of blendshapes: \"arkit\" or \"mha\" (Meta Human Animation, default: \"mha\") */\n format?: \"arkit\" | \"mha\";\n /** Custom mapper function to transform incoming blendshapes */\n customMapper?: (input: number[] | Float32Array) => Float32Array;\n /** Indexed NeuroSync ahead-delivery. Defaults to true; set false for the legacy paced path. */\n deliver_chunks_ahead?: boolean;\n /** Ahead-delivery timeline FPS override; ignored when deliver_chunks_ahead is false. */\n output_fps?: number;\n /** Seconds the server buffers blendshapes before releasing them. */\n frames_buffer_duration?: number;\n };\n \n /** \n * Show video toggle button in settings (default: true).\n * Only works if connection type is \"video\". If false, hides the video button.\n */\n showVideo?: boolean;\n /** \n * Show screen share toggle button in settings (default: true).\n * Only works if connection type is \"video\". If false, hides the screen share button.\n */\n showScreenShare?: boolean;\n /**\n * Start in voice mode by default when widget opens (default: true).\n * When true, the widget will open directly in voice mode with microphone enabled.\n */\n defaultVoiceMode?: boolean;\n \n /** Optional callbacks */\n onConnect?: () => void;\n onDisconnect?: () => void;\n onMessage?: (message: ChatMessage) => void;\n}\n\n/**\n * Vanilla ConvaiWidget instance with cleanup method\n */\nexport interface VanillaWidget {\n /** Root DOM element of the widget */\n element: HTMLElement;\n /** Cleanup and destroy the widget */\n destroy: () => void;\n /** The Convai client instance */\n client: IConvaiClient & { activity?: string; chatMessages: ChatMessage[] };\n /** Update widget state (for future extensions) */\n update?: (options: Partial<VanillaWidgetOptions>) => void;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"websocket.js","sourceRoot":"","sources":["../../src/vanilla/websocket.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,sEAAsE;AACtE,6EAA6E;AAC7E,YAAY,CAAC,0BAA0B,CACrC,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,IAAI,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CACrE,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"websocket.js","sourceRoot":"","sources":["../../src/vanilla/websocket.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,sEAAsE;AACtE,6EAA6E;AAC7E,YAAY,CAAC,0BAA0B,CACrC,CAAC,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,IAAI,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,CACrE,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["/**\n * @convai/web-sdk/vanilla/websocket\n *\n * Optional subpath for the WebSocket (Pipecat) transport.\n * Import this module as a side-effect BEFORE calling connect() when using\n * `transport: \"websocket\"` in ConvaiConfig. Without this import, the\n * @pipecat-ai packages are never bundled — even by aggressive bundlers.\n *\n * @example\n * ```typescript\n * import { ConvaiClient } from '@convai/web-sdk/vanilla';\n * import '@convai/web-sdk/vanilla/websocket'; // registers WebSocket transport\n *\n * const client = new ConvaiClient({ transport: 'websocket', ... });\n * ```\n */\nimport { ConvaiClient } from \"../core/ConvaiClient\";\nimport { WebSocketSession } from \"./WebSocketSession\";\n\n// Side-effect: register the Pipecat-backed factory with ConvaiClient.\n// After this runs, any ConvaiClient instance can use transport: \"websocket\".\nConvaiClient.registerWebSocketTransport(\n (onMessage, enableMic) => new WebSocketSession(onMessage, enableMic),\n);\n\nexport { WebSocketSession };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,iBAAiB,CAAC"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,gDAAgD;AAChD,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAC","sourcesContent":["// GENERATED by scripts/sync-version.mjs — do not edit by hand.\n// Regenerated from package.json on every build.\nexport const SDK_VERSION = \"1.7.0-beta.2\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@convai/web-sdk",
|
|
3
|
-
"version": "1.7.0-beta.
|
|
3
|
+
"version": "1.7.0-beta.2",
|
|
4
4
|
"description": "Build web apps with lifelike AI characters. The Convai Web SDK gives you real-time voice, lipsync, emotions, and dynamic context — with first-class support for React and vanilla TypeScript.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
"./lipsync-helpers": {
|
|
32
32
|
"import": "./dist/lipsync-helpers/index.js",
|
|
33
33
|
"types": "./dist/lipsync-helpers/index.d.ts"
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
|
+
"./package.json": "./package.json"
|
|
35
36
|
},
|
|
36
37
|
"sideEffects": [
|
|
37
38
|
"./dist/vanilla/websocket.js",
|
|
@@ -41,9 +42,9 @@
|
|
|
41
42
|
"access": "public"
|
|
42
43
|
},
|
|
43
44
|
"scripts": {
|
|
44
|
-
"build": "tsc && pnpm typecheck:downstream",
|
|
45
|
-
"build:fast": "tsc",
|
|
46
|
-
"build:prod": "NODE_ENV=production tsc && pnpm typecheck:downstream",
|
|
45
|
+
"build": "node scripts/sync-version.mjs && tsc && pnpm typecheck:downstream",
|
|
46
|
+
"build:fast": "node scripts/sync-version.mjs && tsc",
|
|
47
|
+
"build:prod": "node scripts/sync-version.mjs && NODE_ENV=production tsc && pnpm typecheck:downstream",
|
|
47
48
|
"dev": "tsc --watch",
|
|
48
49
|
"clean": "rimraf dist",
|
|
49
50
|
"typecheck": "tsc --noEmit",
|
|
@@ -69,7 +70,12 @@
|
|
|
69
70
|
"examples:dev": "pnpm example:react",
|
|
70
71
|
"examples:build": "pnpm example:react:build && pnpm example:vanilla:build && pnpm example:chatbot-testing:build && pnpm example:lipsync-testing:build",
|
|
71
72
|
"examples:install": "pnpm install && cd examples/react && pnpm install && cd ../vanilla && pnpm install && cd ../chatbot-testing && pnpm install && cd ../lipsync-testing && pnpm install",
|
|
72
|
-
"examples:clean": "pnpm clean && cd examples/react && pnpm clean && cd ../vanilla && pnpm clean && cd ../chatbot-testing && pnpm clean && cd ../lipsync-testing && pnpm clean"
|
|
73
|
+
"examples:clean": "pnpm clean && cd examples/react && pnpm clean && cd ../vanilla && pnpm clean && cd ../chatbot-testing && pnpm clean && cd ../lipsync-testing && pnpm clean",
|
|
74
|
+
"sync-version": "node scripts/sync-version.mjs",
|
|
75
|
+
"verify:release": "node scripts/verify-release.mjs",
|
|
76
|
+
"check:docs": "node scripts/check-docs.mjs",
|
|
77
|
+
"check:contract": "node scripts/check-api-contract.mjs",
|
|
78
|
+
"check:packaging": "node scripts/check-packaging.mjs"
|
|
73
79
|
},
|
|
74
80
|
"keywords": [
|
|
75
81
|
"convai",
|
|
@@ -113,6 +119,7 @@
|
|
|
113
119
|
"@types/react": "^18.3.18",
|
|
114
120
|
"@types/react-dom": "^18.3.5",
|
|
115
121
|
"@types/styled-components": "^5.1.34",
|
|
122
|
+
"esbuild": "^0.28.2",
|
|
116
123
|
"rimraf": "^5.0.0",
|
|
117
124
|
"typescript": "^5.7.3"
|
|
118
125
|
},
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import type { ActiveCharacterChange, CharacterRosterChange, ConvaiCharacterInstance, ServerResponseExtras, UpdateCharacterRosterOptions } from "./types";
|
|
2
|
-
/**
|
|
3
|
-
* Roster state for a multi-character room: which character instances exist,
|
|
4
|
-
* which one receives user turns, and the routing/roster epochs that fence
|
|
5
|
-
* concurrent changes.
|
|
6
|
-
*
|
|
7
|
-
* Pure state plus command construction — it owns no transport. ConvaiClient
|
|
8
|
-
* feeds it from three sources (the connect response, per-instance bot-ready,
|
|
9
|
-
* and server responses) and publishes the commands it builds.
|
|
10
|
-
*/
|
|
11
|
-
export declare class CharacterRoster {
|
|
12
|
-
private _characters;
|
|
13
|
-
private _activeMembershipId;
|
|
14
|
-
private _roomSessionId;
|
|
15
|
-
private _routeEpoch;
|
|
16
|
-
private _rosterEpoch;
|
|
17
|
-
/** Character instances in roster order. Empty in single-character mode. */
|
|
18
|
-
get characters(): ConvaiCharacterInstance[];
|
|
19
|
-
/** Membership currently receiving user turns, or null. */
|
|
20
|
-
get activeMembershipId(): string | null;
|
|
21
|
-
/** Room session the roster belongs to. */
|
|
22
|
-
get roomSessionId(): string | null;
|
|
23
|
-
get routeEpoch(): number;
|
|
24
|
-
get rosterEpoch(): number;
|
|
25
|
-
/** True once a multi-character connect response has been applied. */
|
|
26
|
-
get isMultiCharacter(): boolean;
|
|
27
|
-
find(membershipId: string): ConvaiCharacterInstance | undefined;
|
|
28
|
-
reset(): void;
|
|
29
|
-
/**
|
|
30
|
-
* Seed the roster from the /connect response. A response without a
|
|
31
|
-
* `characters` array is a single-character session and leaves the roster
|
|
32
|
-
* empty.
|
|
33
|
-
*/
|
|
34
|
-
applyConnectResponse(data: Record<string, unknown>): boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Fill in details from a per-instance bot-ready `about` block. Instances are
|
|
37
|
-
* already known from the connect response; this refreshes session ids and
|
|
38
|
-
* catches instances added by a roster update.
|
|
39
|
-
*/
|
|
40
|
-
applyBotReady(about: Record<string, unknown> | undefined): boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Pick a survivor to take over routing when the active instance is being
|
|
43
|
-
* removed. The server refuses an instance that has not sent bot-ready
|
|
44
|
-
* (`replacement_target_unavailable`), so prefer ready ones.
|
|
45
|
-
*/
|
|
46
|
-
pickReplacement(removing: string[]): string | undefined;
|
|
47
|
-
/** Build the data-channel payload that switches the active character. */
|
|
48
|
-
buildInteractionTarget(membershipId: string, commandId: string): Record<string, unknown>;
|
|
49
|
-
/** Build the data-channel payload that adds/removes instances. */
|
|
50
|
-
buildRosterUpdate(options: UpdateCharacterRosterOptions, commandId: string): Record<string, unknown>;
|
|
51
|
-
/**
|
|
52
|
-
* Adopt the server's authoritative epochs from any response, including
|
|
53
|
-
* errors — a `stale_route_epoch` rejection carries the real value, which is
|
|
54
|
-
* what makes a retry meaningful.
|
|
55
|
-
*/
|
|
56
|
-
adoptEpochs(extras: ServerResponseExtras | null): void;
|
|
57
|
-
/**
|
|
58
|
-
* Apply a successful interaction-target response. Returns the change, or
|
|
59
|
-
* null when the active character did not move.
|
|
60
|
-
*/
|
|
61
|
-
applyInteractionTarget(extras: ServerResponseExtras | null): ActiveCharacterChange | null;
|
|
62
|
-
/**
|
|
63
|
-
* Apply a successful character-roster-update response, mutating the roster
|
|
64
|
-
* to match. Returns the change, or null when nothing moved.
|
|
65
|
-
*/
|
|
66
|
-
applyRosterUpdate(extras: ServerResponseExtras | null): CharacterRosterChange | null;
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=CharacterRoster.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterRoster.d.ts","sourceRoot":"","sources":["../../src/core/CharacterRoster.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EAEvB,oBAAoB,EACpB,4BAA4B,EAC7B,MAAM,SAAS,CAAC;AA+BjB;;;;;;;;GAQG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,mBAAmB,CAAuB;IAClD,OAAO,CAAC,cAAc,CAAuB;IAC7C,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,YAAY,CAAK;IAEzB,2EAA2E;IAC3E,IAAI,UAAU,IAAI,uBAAuB,EAAE,CAE1C;IAED,0DAA0D;IAC1D,IAAI,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAEtC;IAED,0CAA0C;IAC1C,IAAI,aAAa,IAAI,MAAM,GAAG,IAAI,CAEjC;IAED,IAAI,UAAU,IAAI,MAAM,CAEvB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,qEAAqE;IACrE,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,uBAAuB,GAAG,SAAS;IAI/D,KAAK,IAAI,IAAI;IAQb;;;;OAIG;IACH,oBAAoB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO;IAkB5D;;;;OAIG;IACH,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,GAAG,OAAO;IAwClE;;;;OAIG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS;IAWvD,yEAAyE;IACzE,sBAAsB,CACpB,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,GAChB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAS1B,kEAAkE;IAClE,iBAAiB,CACf,OAAO,EAAE,4BAA4B,EACrC,SAAS,EAAE,MAAM,GAChB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAgB1B;;;;OAIG;IACH,WAAW,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI,GAAG,IAAI;IAatD;;;OAGG;IACH,sBAAsB,CACpB,MAAM,EAAE,oBAAoB,GAAG,IAAI,GAClC,qBAAqB,GAAG,IAAI;IAW/B;;;OAGG;IACH,iBAAiB,CACf,MAAM,EAAE,oBAAoB,GAAG,IAAI,GAClC,qBAAqB,GAAG,IAAI;CAoDhC"}
|
|
@@ -1,235 +0,0 @@
|
|
|
1
|
-
function toInstance(raw) {
|
|
2
|
-
if (!raw?.membership_id)
|
|
3
|
-
return null;
|
|
4
|
-
return {
|
|
5
|
-
membershipId: raw.membership_id,
|
|
6
|
-
characterId: raw.character_id ?? "",
|
|
7
|
-
characterSessionId: raw.character_session_id ?? null,
|
|
8
|
-
participantIdentity: raw.participant_identity ?? `character:${raw.membership_id}`,
|
|
9
|
-
isInitial: raw.is_initial === true,
|
|
10
|
-
provisioningStatus: raw.provisioning_status ?? "unknown",
|
|
11
|
-
failureCode: raw.failure_code ?? null,
|
|
12
|
-
isReady: false,
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Roster state for a multi-character room: which character instances exist,
|
|
17
|
-
* which one receives user turns, and the routing/roster epochs that fence
|
|
18
|
-
* concurrent changes.
|
|
19
|
-
*
|
|
20
|
-
* Pure state plus command construction — it owns no transport. ConvaiClient
|
|
21
|
-
* feeds it from three sources (the connect response, per-instance bot-ready,
|
|
22
|
-
* and server responses) and publishes the commands it builds.
|
|
23
|
-
*/
|
|
24
|
-
export class CharacterRoster {
|
|
25
|
-
constructor() {
|
|
26
|
-
this._characters = [];
|
|
27
|
-
this._activeMembershipId = null;
|
|
28
|
-
this._roomSessionId = null;
|
|
29
|
-
this._routeEpoch = 0;
|
|
30
|
-
this._rosterEpoch = 0;
|
|
31
|
-
}
|
|
32
|
-
/** Character instances in roster order. Empty in single-character mode. */
|
|
33
|
-
get characters() {
|
|
34
|
-
return this._characters;
|
|
35
|
-
}
|
|
36
|
-
/** Membership currently receiving user turns, or null. */
|
|
37
|
-
get activeMembershipId() {
|
|
38
|
-
return this._activeMembershipId;
|
|
39
|
-
}
|
|
40
|
-
/** Room session the roster belongs to. */
|
|
41
|
-
get roomSessionId() {
|
|
42
|
-
return this._roomSessionId;
|
|
43
|
-
}
|
|
44
|
-
get routeEpoch() {
|
|
45
|
-
return this._routeEpoch;
|
|
46
|
-
}
|
|
47
|
-
get rosterEpoch() {
|
|
48
|
-
return this._rosterEpoch;
|
|
49
|
-
}
|
|
50
|
-
/** True once a multi-character connect response has been applied. */
|
|
51
|
-
get isMultiCharacter() {
|
|
52
|
-
return this._characters.length > 0;
|
|
53
|
-
}
|
|
54
|
-
find(membershipId) {
|
|
55
|
-
return this._characters.find((c) => c.membershipId === membershipId);
|
|
56
|
-
}
|
|
57
|
-
reset() {
|
|
58
|
-
this._characters = [];
|
|
59
|
-
this._activeMembershipId = null;
|
|
60
|
-
this._roomSessionId = null;
|
|
61
|
-
this._routeEpoch = 0;
|
|
62
|
-
this._rosterEpoch = 0;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Seed the roster from the /connect response. A response without a
|
|
66
|
-
* `characters` array is a single-character session and leaves the roster
|
|
67
|
-
* empty.
|
|
68
|
-
*/
|
|
69
|
-
applyConnectResponse(data) {
|
|
70
|
-
const raw = data?.characters;
|
|
71
|
-
this._roomSessionId = data?.room_session_id ?? null;
|
|
72
|
-
if (!Array.isArray(raw) || raw.length === 0)
|
|
73
|
-
return false;
|
|
74
|
-
this._characters = raw
|
|
75
|
-
.map((c) => toInstance(c))
|
|
76
|
-
.filter((c) => c !== null);
|
|
77
|
-
this._activeMembershipId =
|
|
78
|
-
data?.active_membership_id ??
|
|
79
|
-
this._characters.find((c) => c.isInitial)?.membershipId ??
|
|
80
|
-
this._characters[0]?.membershipId ??
|
|
81
|
-
null;
|
|
82
|
-
this._routeEpoch = data?.route_epoch ?? 0;
|
|
83
|
-
this._rosterEpoch = data?.roster_epoch ?? 0;
|
|
84
|
-
return true;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Fill in details from a per-instance bot-ready `about` block. Instances are
|
|
88
|
-
* already known from the connect response; this refreshes session ids and
|
|
89
|
-
* catches instances added by a roster update.
|
|
90
|
-
*/
|
|
91
|
-
applyBotReady(about) {
|
|
92
|
-
if (!about)
|
|
93
|
-
return false;
|
|
94
|
-
const incoming = toInstance(about);
|
|
95
|
-
if (!incoming)
|
|
96
|
-
return false;
|
|
97
|
-
const index = this._characters.findIndex((c) => c.membershipId === incoming.membershipId);
|
|
98
|
-
if (index === -1) {
|
|
99
|
-
// Only track instances once we know this is a multi-character room;
|
|
100
|
-
// a single-character bot-ready also carries these fields.
|
|
101
|
-
if (!this.isMultiCharacter)
|
|
102
|
-
return false;
|
|
103
|
-
this._characters = [...this._characters, { ...incoming, isReady: true }];
|
|
104
|
-
return true;
|
|
105
|
-
}
|
|
106
|
-
const existing = this._characters[index];
|
|
107
|
-
const merged = {
|
|
108
|
-
...existing,
|
|
109
|
-
characterSessionId: incoming.characterSessionId ?? existing.characterSessionId,
|
|
110
|
-
participantIdentity: incoming.participantIdentity || existing.participantIdentity,
|
|
111
|
-
isReady: true,
|
|
112
|
-
};
|
|
113
|
-
if (merged.characterSessionId === existing.characterSessionId &&
|
|
114
|
-
merged.participantIdentity === existing.participantIdentity &&
|
|
115
|
-
existing.isReady) {
|
|
116
|
-
return false;
|
|
117
|
-
}
|
|
118
|
-
this._characters = [
|
|
119
|
-
...this._characters.slice(0, index),
|
|
120
|
-
merged,
|
|
121
|
-
...this._characters.slice(index + 1),
|
|
122
|
-
];
|
|
123
|
-
return true;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Pick a survivor to take over routing when the active instance is being
|
|
127
|
-
* removed. The server refuses an instance that has not sent bot-ready
|
|
128
|
-
* (`replacement_target_unavailable`), so prefer ready ones.
|
|
129
|
-
*/
|
|
130
|
-
pickReplacement(removing) {
|
|
131
|
-
const removed = new Set(removing);
|
|
132
|
-
const survivors = this._characters.filter((c) => !removed.has(c.membershipId));
|
|
133
|
-
return (survivors.find((c) => c.isReady)?.membershipId ??
|
|
134
|
-
survivors[0]?.membershipId);
|
|
135
|
-
}
|
|
136
|
-
/** Build the data-channel payload that switches the active character. */
|
|
137
|
-
buildInteractionTarget(membershipId, commandId) {
|
|
138
|
-
return {
|
|
139
|
-
room_session_id: this._roomSessionId,
|
|
140
|
-
target_membership_id: membershipId,
|
|
141
|
-
expected_route_epoch: this._routeEpoch,
|
|
142
|
-
command_id: commandId,
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
/** Build the data-channel payload that adds/removes instances. */
|
|
146
|
-
buildRosterUpdate(options, commandId) {
|
|
147
|
-
const add = (options.add ?? []).map((spec) => ({
|
|
148
|
-
character_id: spec.characterId,
|
|
149
|
-
}));
|
|
150
|
-
return {
|
|
151
|
-
room_session_id: this._roomSessionId,
|
|
152
|
-
expected_roster_epoch: this._rosterEpoch,
|
|
153
|
-
command_id: commandId,
|
|
154
|
-
...(add.length > 0 && { add }),
|
|
155
|
-
...(options.remove?.length && { remove_membership_ids: options.remove }),
|
|
156
|
-
...(options.replacementTarget && {
|
|
157
|
-
replacement_target_membership_id: options.replacementTarget,
|
|
158
|
-
}),
|
|
159
|
-
};
|
|
160
|
-
}
|
|
161
|
-
/**
|
|
162
|
-
* Adopt the server's authoritative epochs from any response, including
|
|
163
|
-
* errors — a `stale_route_epoch` rejection carries the real value, which is
|
|
164
|
-
* what makes a retry meaningful.
|
|
165
|
-
*/
|
|
166
|
-
adoptEpochs(extras) {
|
|
167
|
-
if (!extras)
|
|
168
|
-
return;
|
|
169
|
-
if (typeof extras.route_epoch === "number") {
|
|
170
|
-
this._routeEpoch = extras.route_epoch;
|
|
171
|
-
}
|
|
172
|
-
if (typeof extras.roster_epoch === "number") {
|
|
173
|
-
this._rosterEpoch = extras.roster_epoch;
|
|
174
|
-
}
|
|
175
|
-
if (typeof extras.active_membership_id === "string") {
|
|
176
|
-
this._activeMembershipId = extras.active_membership_id;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Apply a successful interaction-target response. Returns the change, or
|
|
181
|
-
* null when the active character did not move.
|
|
182
|
-
*/
|
|
183
|
-
applyInteractionTarget(extras) {
|
|
184
|
-
if (!extras)
|
|
185
|
-
return null;
|
|
186
|
-
const previous = extras.previous_membership_id ?? this._activeMembershipId;
|
|
187
|
-
const active = extras.active_membership_id ?? this._activeMembershipId;
|
|
188
|
-
this.adoptEpochs(extras);
|
|
189
|
-
if (previous === active)
|
|
190
|
-
return null;
|
|
191
|
-
return { previous, active, routeEpoch: this._routeEpoch };
|
|
192
|
-
}
|
|
193
|
-
/**
|
|
194
|
-
* Apply a successful character-roster-update response, mutating the roster
|
|
195
|
-
* to match. Returns the change, or null when nothing moved.
|
|
196
|
-
*/
|
|
197
|
-
applyRosterUpdate(extras) {
|
|
198
|
-
if (!extras)
|
|
199
|
-
return null;
|
|
200
|
-
const added = (Array.isArray(extras.added) ? extras.added : [])
|
|
201
|
-
.map((c) => toInstance(c))
|
|
202
|
-
.filter((c) => c !== null);
|
|
203
|
-
const removedRaw = Array.isArray(extras.removed) ? extras.removed : [];
|
|
204
|
-
const removedIds = new Set((Array.isArray(extras.removed_membership_ids)
|
|
205
|
-
? extras.removed_membership_ids
|
|
206
|
-
: removedRaw
|
|
207
|
-
.map((c) => c?.membership_id)
|
|
208
|
-
.filter((id) => typeof id === "string")));
|
|
209
|
-
// Prefer the roster's own records for removed instances — the response
|
|
210
|
-
// echoes only a subset of each instance's fields.
|
|
211
|
-
const removed = [...removedIds].map((id) => this.find(id) ??
|
|
212
|
-
toInstance(removedRaw.find((c) => c?.membership_id === id)) ?? {
|
|
213
|
-
membershipId: id,
|
|
214
|
-
characterId: "",
|
|
215
|
-
characterSessionId: null,
|
|
216
|
-
participantIdentity: `character:${id}`,
|
|
217
|
-
isInitial: false,
|
|
218
|
-
provisioningStatus: "removed",
|
|
219
|
-
failureCode: null,
|
|
220
|
-
isReady: false,
|
|
221
|
-
});
|
|
222
|
-
if (added.length === 0 && removed.length === 0) {
|
|
223
|
-
this.adoptEpochs(extras);
|
|
224
|
-
return null;
|
|
225
|
-
}
|
|
226
|
-
const addedIds = new Set(added.map((c) => c.membershipId));
|
|
227
|
-
this._characters = [
|
|
228
|
-
...this._characters.filter((c) => !removedIds.has(c.membershipId) && !addedIds.has(c.membershipId)),
|
|
229
|
-
...added,
|
|
230
|
-
];
|
|
231
|
-
this.adoptEpochs(extras);
|
|
232
|
-
return { added, removed, characters: this._characters };
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
//# sourceMappingURL=CharacterRoster.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CharacterRoster.js","sourceRoot":"","sources":["../../src/core/CharacterRoster.ts"],"names":[],"mappings":"AAuBA,SAAS,UAAU,CAAC,GAAiB;IACnC,IAAI,CAAC,GAAG,EAAE,aAAa;QAAE,OAAO,IAAI,CAAC;IACrC,OAAO;QACL,YAAY,EAAE,GAAG,CAAC,aAAa;QAC/B,WAAW,EAAE,GAAG,CA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