@cuekit-ai/react 1.2.3 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-UD3LZUJ2.mjs → chunk-PLOG3DEN.mjs} +494 -24
- package/dist/index.d.mts +6 -100
- package/dist/index.d.ts +6 -100
- package/dist/index.js +635 -832
- package/dist/index.mjs +120 -807
- package/dist/{webrtc-service-UYILN4PB.mjs → webrtc-service-BHI4M7YJ.mjs} +3 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -149,7 +149,7 @@ interface NavigationCommand {
|
|
|
149
149
|
duration?: number;
|
|
150
150
|
timestamp?: number;
|
|
151
151
|
}
|
|
152
|
-
declare function sendData(data:
|
|
152
|
+
declare function sendData(data: string, reliable?: boolean): Promise<void>;
|
|
153
153
|
declare function sendScreenStatus(screenData: any): Promise<void>;
|
|
154
154
|
declare function sendUserCommand(command: string): Promise<void>;
|
|
155
155
|
declare function sendStaticData(componentData: any, appId?: string): Promise<{
|
|
@@ -162,97 +162,6 @@ declare function sendStaticData(componentData: any, appId?: string): Promise<{
|
|
|
162
162
|
data?: undefined;
|
|
163
163
|
}>;
|
|
164
164
|
|
|
165
|
-
interface UserSpeechChunkData {
|
|
166
|
-
text_chunk: string;
|
|
167
|
-
is_final: boolean;
|
|
168
|
-
}
|
|
169
|
-
interface AISpeechChunkData {
|
|
170
|
-
text_chunk: string;
|
|
171
|
-
is_final: boolean;
|
|
172
|
-
}
|
|
173
|
-
interface AIIntentData {
|
|
174
|
-
intent: string;
|
|
175
|
-
routeName: string | null;
|
|
176
|
-
actionType: string;
|
|
177
|
-
confidence: number;
|
|
178
|
-
actionMetadata: {
|
|
179
|
-
elementId: string | null;
|
|
180
|
-
routeName: string | null;
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
interface AIInterruptedData {
|
|
184
|
-
message: string;
|
|
185
|
-
}
|
|
186
|
-
interface RequestRuntimeData {
|
|
187
|
-
session_id: string;
|
|
188
|
-
}
|
|
189
|
-
interface StaticDataReadyData {
|
|
190
|
-
[key: string]: any;
|
|
191
|
-
}
|
|
192
|
-
interface ToolLogData {
|
|
193
|
-
[key: string]: any;
|
|
194
|
-
}
|
|
195
|
-
type SSEActionEvent = {
|
|
196
|
-
type: 'user_speech_chunk';
|
|
197
|
-
timestamp?: number;
|
|
198
|
-
data: UserSpeechChunkData;
|
|
199
|
-
} | {
|
|
200
|
-
type: 'ai_speech_chunk';
|
|
201
|
-
timestamp?: number;
|
|
202
|
-
data: AISpeechChunkData;
|
|
203
|
-
} | {
|
|
204
|
-
type: 'ai_intent';
|
|
205
|
-
timestamp?: number;
|
|
206
|
-
data: AIIntentData;
|
|
207
|
-
} | {
|
|
208
|
-
type: 'ai_interrupted';
|
|
209
|
-
timestamp?: number;
|
|
210
|
-
data: AIInterruptedData;
|
|
211
|
-
} | {
|
|
212
|
-
type: 'request_runtime_data';
|
|
213
|
-
timestamp?: number;
|
|
214
|
-
data: RequestRuntimeData;
|
|
215
|
-
} | {
|
|
216
|
-
type: 'static_data_ready';
|
|
217
|
-
data: StaticDataReadyData;
|
|
218
|
-
} | {
|
|
219
|
-
type: 'tool_log';
|
|
220
|
-
data: ToolLogData;
|
|
221
|
-
} | {
|
|
222
|
-
type: 'connection';
|
|
223
|
-
status: 'connected';
|
|
224
|
-
app_id?: string;
|
|
225
|
-
} | {
|
|
226
|
-
type: 'keepalive';
|
|
227
|
-
timestamp?: number;
|
|
228
|
-
};
|
|
229
|
-
interface SSEServiceCallbacks {
|
|
230
|
-
onActionEvent?: (event: SSEActionEvent) => void;
|
|
231
|
-
onConnectionChange?: (isConnected: boolean) => void;
|
|
232
|
-
onConversationUpdate?: (entry: {
|
|
233
|
-
speaker: 'user' | 'ai';
|
|
234
|
-
text: string;
|
|
235
|
-
is_final: boolean;
|
|
236
|
-
}) => void;
|
|
237
|
-
onIntentUpdate?: (intent: AIIntentData) => void;
|
|
238
|
-
onToolStatusUpdate?: (status: any) => void;
|
|
239
|
-
onStaticDataUpdate?: (data: any) => void;
|
|
240
|
-
onError?: (error: string) => void;
|
|
241
|
-
}
|
|
242
|
-
declare function setSSECallbacks(newCallbacks: SSEServiceCallbacks): void;
|
|
243
|
-
declare function connectSSE(newSessionId: string): Promise<void>;
|
|
244
|
-
declare function sendRuntimeData(): Promise<void>;
|
|
245
|
-
declare function sendDashboardData(dashboardData: any): Promise<void>;
|
|
246
|
-
declare function sendElementData(appId?: string): Promise<{
|
|
247
|
-
app_id: string;
|
|
248
|
-
current_page: string;
|
|
249
|
-
dom_structure: FullDOMStructure;
|
|
250
|
-
timestamp: number;
|
|
251
|
-
}>;
|
|
252
|
-
declare function disconnectSSE(): void;
|
|
253
|
-
declare function getSSEConnectionStatus(): boolean;
|
|
254
|
-
declare function getSSEConnectionState(): string;
|
|
255
|
-
|
|
256
165
|
interface ChatMessage {
|
|
257
166
|
id: string;
|
|
258
167
|
role: 'user' | 'ai';
|
|
@@ -269,8 +178,6 @@ declare const useCuekit: (options?: {
|
|
|
269
178
|
onAISpeechEnd?: (trackId: string) => void;
|
|
270
179
|
appId?: string;
|
|
271
180
|
}) => {
|
|
272
|
-
isSseConnected: boolean;
|
|
273
|
-
lastActionEvent: SSEActionEvent | null;
|
|
274
181
|
messages: ChatMessage[];
|
|
275
182
|
micState: MicState;
|
|
276
183
|
setMicState: React.Dispatch<React.SetStateAction<MicState>>;
|
|
@@ -358,6 +265,10 @@ type FullDOMStructure = {
|
|
|
358
265
|
components: DOMNodeData[];
|
|
359
266
|
};
|
|
360
267
|
|
|
268
|
+
/**
|
|
269
|
+
* Capture the full DOM structure as a flat list of interactive elements
|
|
270
|
+
*/
|
|
271
|
+
declare function captureFullDOMStructure(): FullDOMStructure;
|
|
361
272
|
interface ElementAction {
|
|
362
273
|
action_type: 'click' | 'navigate' | 'input' | 'focus' | 'toggle';
|
|
363
274
|
target_element?: string;
|
|
@@ -367,9 +278,4 @@ interface ElementAction {
|
|
|
367
278
|
declare function executeAction(action: ElementAction): boolean;
|
|
368
279
|
declare function getFullDOMStructure(): FullDOMStructure;
|
|
369
280
|
|
|
370
|
-
|
|
371
|
-
* Capture the full DOM structure as a flat list of interactive elements
|
|
372
|
-
*/
|
|
373
|
-
declare function captureFullDOMStructure(): FullDOMStructure;
|
|
374
|
-
|
|
375
|
-
export { BorderGlow, ChatPopup, type ChatPopupProps, CuekitProvider, type DOMNodeData, type ElementAction, type FullDOMStructure, InitCuekit, MicButton, type MicButtonProps, type MicState$1 as MicState, type NavigationCommand, type SSEActionEvent, type SSEServiceCallbacks, type ServerConfig, type TokenRequest, type TokenResponse, VoiceIntensityVisualizer, type WebRTCServerConfig, captureFullDOMStructure, configureWebRTCServer, connectSSE, disconnectSSE, executeAction, getFullDOMStructure, getSSEConnectionState, getSSEConnectionStatus, getWebRTCServerConfig, initWebRTC, initWebRTCWithDeployedBackend, sendDashboardData, sendElementData, sendRuntimeData, setSSECallbacks, useCuekit, useQubeContext, useWebRTC };
|
|
281
|
+
export { BorderGlow, ChatPopup, type ChatPopupProps, CuekitProvider, type DOMNodeData, type ElementAction, type FullDOMStructure, InitCuekit, MicButton, type MicButtonProps, type MicState$1 as MicState, type NavigationCommand, type ServerConfig, type TokenRequest, type TokenResponse, VoiceIntensityVisualizer, type WebRTCServerConfig, captureFullDOMStructure, configureWebRTCServer, executeAction, getFullDOMStructure, getWebRTCServerConfig, initWebRTC, initWebRTCWithDeployedBackend, useCuekit, useQubeContext, useWebRTC };
|
package/dist/index.d.ts
CHANGED
|
@@ -149,7 +149,7 @@ interface NavigationCommand {
|
|
|
149
149
|
duration?: number;
|
|
150
150
|
timestamp?: number;
|
|
151
151
|
}
|
|
152
|
-
declare function sendData(data:
|
|
152
|
+
declare function sendData(data: string, reliable?: boolean): Promise<void>;
|
|
153
153
|
declare function sendScreenStatus(screenData: any): Promise<void>;
|
|
154
154
|
declare function sendUserCommand(command: string): Promise<void>;
|
|
155
155
|
declare function sendStaticData(componentData: any, appId?: string): Promise<{
|
|
@@ -162,97 +162,6 @@ declare function sendStaticData(componentData: any, appId?: string): Promise<{
|
|
|
162
162
|
data?: undefined;
|
|
163
163
|
}>;
|
|
164
164
|
|
|
165
|
-
interface UserSpeechChunkData {
|
|
166
|
-
text_chunk: string;
|
|
167
|
-
is_final: boolean;
|
|
168
|
-
}
|
|
169
|
-
interface AISpeechChunkData {
|
|
170
|
-
text_chunk: string;
|
|
171
|
-
is_final: boolean;
|
|
172
|
-
}
|
|
173
|
-
interface AIIntentData {
|
|
174
|
-
intent: string;
|
|
175
|
-
routeName: string | null;
|
|
176
|
-
actionType: string;
|
|
177
|
-
confidence: number;
|
|
178
|
-
actionMetadata: {
|
|
179
|
-
elementId: string | null;
|
|
180
|
-
routeName: string | null;
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
interface AIInterruptedData {
|
|
184
|
-
message: string;
|
|
185
|
-
}
|
|
186
|
-
interface RequestRuntimeData {
|
|
187
|
-
session_id: string;
|
|
188
|
-
}
|
|
189
|
-
interface StaticDataReadyData {
|
|
190
|
-
[key: string]: any;
|
|
191
|
-
}
|
|
192
|
-
interface ToolLogData {
|
|
193
|
-
[key: string]: any;
|
|
194
|
-
}
|
|
195
|
-
type SSEActionEvent = {
|
|
196
|
-
type: 'user_speech_chunk';
|
|
197
|
-
timestamp?: number;
|
|
198
|
-
data: UserSpeechChunkData;
|
|
199
|
-
} | {
|
|
200
|
-
type: 'ai_speech_chunk';
|
|
201
|
-
timestamp?: number;
|
|
202
|
-
data: AISpeechChunkData;
|
|
203
|
-
} | {
|
|
204
|
-
type: 'ai_intent';
|
|
205
|
-
timestamp?: number;
|
|
206
|
-
data: AIIntentData;
|
|
207
|
-
} | {
|
|
208
|
-
type: 'ai_interrupted';
|
|
209
|
-
timestamp?: number;
|
|
210
|
-
data: AIInterruptedData;
|
|
211
|
-
} | {
|
|
212
|
-
type: 'request_runtime_data';
|
|
213
|
-
timestamp?: number;
|
|
214
|
-
data: RequestRuntimeData;
|
|
215
|
-
} | {
|
|
216
|
-
type: 'static_data_ready';
|
|
217
|
-
data: StaticDataReadyData;
|
|
218
|
-
} | {
|
|
219
|
-
type: 'tool_log';
|
|
220
|
-
data: ToolLogData;
|
|
221
|
-
} | {
|
|
222
|
-
type: 'connection';
|
|
223
|
-
status: 'connected';
|
|
224
|
-
app_id?: string;
|
|
225
|
-
} | {
|
|
226
|
-
type: 'keepalive';
|
|
227
|
-
timestamp?: number;
|
|
228
|
-
};
|
|
229
|
-
interface SSEServiceCallbacks {
|
|
230
|
-
onActionEvent?: (event: SSEActionEvent) => void;
|
|
231
|
-
onConnectionChange?: (isConnected: boolean) => void;
|
|
232
|
-
onConversationUpdate?: (entry: {
|
|
233
|
-
speaker: 'user' | 'ai';
|
|
234
|
-
text: string;
|
|
235
|
-
is_final: boolean;
|
|
236
|
-
}) => void;
|
|
237
|
-
onIntentUpdate?: (intent: AIIntentData) => void;
|
|
238
|
-
onToolStatusUpdate?: (status: any) => void;
|
|
239
|
-
onStaticDataUpdate?: (data: any) => void;
|
|
240
|
-
onError?: (error: string) => void;
|
|
241
|
-
}
|
|
242
|
-
declare function setSSECallbacks(newCallbacks: SSEServiceCallbacks): void;
|
|
243
|
-
declare function connectSSE(newSessionId: string): Promise<void>;
|
|
244
|
-
declare function sendRuntimeData(): Promise<void>;
|
|
245
|
-
declare function sendDashboardData(dashboardData: any): Promise<void>;
|
|
246
|
-
declare function sendElementData(appId?: string): Promise<{
|
|
247
|
-
app_id: string;
|
|
248
|
-
current_page: string;
|
|
249
|
-
dom_structure: FullDOMStructure;
|
|
250
|
-
timestamp: number;
|
|
251
|
-
}>;
|
|
252
|
-
declare function disconnectSSE(): void;
|
|
253
|
-
declare function getSSEConnectionStatus(): boolean;
|
|
254
|
-
declare function getSSEConnectionState(): string;
|
|
255
|
-
|
|
256
165
|
interface ChatMessage {
|
|
257
166
|
id: string;
|
|
258
167
|
role: 'user' | 'ai';
|
|
@@ -269,8 +178,6 @@ declare const useCuekit: (options?: {
|
|
|
269
178
|
onAISpeechEnd?: (trackId: string) => void;
|
|
270
179
|
appId?: string;
|
|
271
180
|
}) => {
|
|
272
|
-
isSseConnected: boolean;
|
|
273
|
-
lastActionEvent: SSEActionEvent | null;
|
|
274
181
|
messages: ChatMessage[];
|
|
275
182
|
micState: MicState;
|
|
276
183
|
setMicState: React.Dispatch<React.SetStateAction<MicState>>;
|
|
@@ -358,6 +265,10 @@ type FullDOMStructure = {
|
|
|
358
265
|
components: DOMNodeData[];
|
|
359
266
|
};
|
|
360
267
|
|
|
268
|
+
/**
|
|
269
|
+
* Capture the full DOM structure as a flat list of interactive elements
|
|
270
|
+
*/
|
|
271
|
+
declare function captureFullDOMStructure(): FullDOMStructure;
|
|
361
272
|
interface ElementAction {
|
|
362
273
|
action_type: 'click' | 'navigate' | 'input' | 'focus' | 'toggle';
|
|
363
274
|
target_element?: string;
|
|
@@ -367,9 +278,4 @@ interface ElementAction {
|
|
|
367
278
|
declare function executeAction(action: ElementAction): boolean;
|
|
368
279
|
declare function getFullDOMStructure(): FullDOMStructure;
|
|
369
280
|
|
|
370
|
-
|
|
371
|
-
* Capture the full DOM structure as a flat list of interactive elements
|
|
372
|
-
*/
|
|
373
|
-
declare function captureFullDOMStructure(): FullDOMStructure;
|
|
374
|
-
|
|
375
|
-
export { BorderGlow, ChatPopup, type ChatPopupProps, CuekitProvider, type DOMNodeData, type ElementAction, type FullDOMStructure, InitCuekit, MicButton, type MicButtonProps, type MicState$1 as MicState, type NavigationCommand, type SSEActionEvent, type SSEServiceCallbacks, type ServerConfig, type TokenRequest, type TokenResponse, VoiceIntensityVisualizer, type WebRTCServerConfig, captureFullDOMStructure, configureWebRTCServer, connectSSE, disconnectSSE, executeAction, getFullDOMStructure, getSSEConnectionState, getSSEConnectionStatus, getWebRTCServerConfig, initWebRTC, initWebRTCWithDeployedBackend, sendDashboardData, sendElementData, sendRuntimeData, setSSECallbacks, useCuekit, useQubeContext, useWebRTC };
|
|
281
|
+
export { BorderGlow, ChatPopup, type ChatPopupProps, CuekitProvider, type DOMNodeData, type ElementAction, type FullDOMStructure, InitCuekit, MicButton, type MicButtonProps, type MicState$1 as MicState, type NavigationCommand, type ServerConfig, type TokenRequest, type TokenResponse, VoiceIntensityVisualizer, type WebRTCServerConfig, captureFullDOMStructure, configureWebRTCServer, executeAction, getFullDOMStructure, getWebRTCServerConfig, initWebRTC, initWebRTCWithDeployedBackend, useCuekit, useQubeContext, useWebRTC };
|