@glydeunity/voice-sdk 1.5.3 → 1.5.6
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/glyde-chat.umd.js +21 -21
- package/dist/glyde-chat.umd.js.map +1 -1
- package/dist/index.d.ts +92 -8
- package/dist/voice-sdk.es.js +3945 -3917
- package/dist/voice-sdk.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -318,6 +318,18 @@ export declare const componentStyles: {
|
|
|
318
318
|
};
|
|
319
319
|
};
|
|
320
320
|
|
|
321
|
+
/**
|
|
322
|
+
* Conversation summary from Unity API
|
|
323
|
+
*/
|
|
324
|
+
declare interface ConversationSummaryResponse {
|
|
325
|
+
application_uuid: string;
|
|
326
|
+
has_history: boolean;
|
|
327
|
+
message_count: number;
|
|
328
|
+
last_message_date: string | null;
|
|
329
|
+
summary_text: string;
|
|
330
|
+
greeting: string;
|
|
331
|
+
}
|
|
332
|
+
|
|
321
333
|
/**
|
|
322
334
|
* Deepgram agent configuration for LLM and voice settings
|
|
323
335
|
*/
|
|
@@ -507,6 +519,9 @@ export declare const GlydeChat: {
|
|
|
507
519
|
*
|
|
508
520
|
* Connects to GLYDE Unity API for text-based conversations.
|
|
509
521
|
* Uses the screening chat endpoints for candidate interactions.
|
|
522
|
+
*
|
|
523
|
+
* Note: By default, initializes with a summary instead of loading full history.
|
|
524
|
+
* The AI greeting will acknowledge previous conversations when resuming.
|
|
510
525
|
*/
|
|
511
526
|
export declare class GlydeText {
|
|
512
527
|
private config;
|
|
@@ -514,6 +529,7 @@ export declare class GlydeText {
|
|
|
514
529
|
private history;
|
|
515
530
|
private isTyping;
|
|
516
531
|
private initialized;
|
|
532
|
+
private conversationSummary;
|
|
517
533
|
/**
|
|
518
534
|
* Create a new GlydeText instance
|
|
519
535
|
* @param config - Configuration options
|
|
@@ -533,10 +549,22 @@ export declare class GlydeText {
|
|
|
533
549
|
*/
|
|
534
550
|
private setTyping;
|
|
535
551
|
/**
|
|
536
|
-
* Initialize the chat session
|
|
537
|
-
*
|
|
552
|
+
* Initialize the chat session with a summary (not full history).
|
|
553
|
+
* Returns the greeting message to show the user.
|
|
554
|
+
*
|
|
555
|
+
* The summary includes:
|
|
556
|
+
* - has_history: whether there's previous conversation
|
|
557
|
+
* - message_count: number of previous messages
|
|
558
|
+
* - summary_text: brief summary of previous conversation
|
|
559
|
+
* - greeting: personalized greeting for the candidate
|
|
560
|
+
*
|
|
561
|
+
* @returns Array with the greeting message
|
|
538
562
|
*/
|
|
539
563
|
initialize(): Promise<ChatMessage[]>;
|
|
564
|
+
/**
|
|
565
|
+
* Get the conversation summary (available after initialize)
|
|
566
|
+
*/
|
|
567
|
+
getSummary(): ConversationSummaryResponse | null;
|
|
540
568
|
/**
|
|
541
569
|
* Send a message and get the agent's response
|
|
542
570
|
* @param message - The message content to send
|
|
@@ -545,7 +573,12 @@ export declare class GlydeText {
|
|
|
545
573
|
sendMessage(message: string): Promise<ChatMessage>;
|
|
546
574
|
/**
|
|
547
575
|
* Get the current conversation history
|
|
548
|
-
*
|
|
576
|
+
*
|
|
577
|
+
* IMPORTANT: System messages are filtered out - they contain AI context
|
|
578
|
+
* (summaries, instructions) that should never be displayed to users.
|
|
579
|
+
* Only user and assistant messages are returned.
|
|
580
|
+
*
|
|
581
|
+
* @returns Array of chat messages (user and assistant only)
|
|
549
582
|
*/
|
|
550
583
|
getHistory(): ChatMessage[];
|
|
551
584
|
/**
|
|
@@ -775,9 +808,27 @@ declare interface GlydeVoiceConfig_2 {
|
|
|
775
808
|
apiKey?: string;
|
|
776
809
|
/** JWT token for GLYDEBuddy passthrough (Teams app) */
|
|
777
810
|
authToken?: string;
|
|
778
|
-
/**
|
|
811
|
+
/**
|
|
812
|
+
* Voice context type - determines which prompt and tools to use
|
|
813
|
+
*
|
|
814
|
+
* - 'screening': Screening interview for known application (contextId = application_uuid)
|
|
815
|
+
* - 'recruiter': Internal recruiter copilot (no contextId needed)
|
|
816
|
+
* - 'custom': Custom context with overridden prompts
|
|
817
|
+
* - 'phone': Phone agent context
|
|
818
|
+
* - 'discovery': Unknown candidate exploring opportunities (no contextId needed)
|
|
819
|
+
* - 'job_apply': Unknown candidate applying to specific job (contextId = job_uuid)
|
|
820
|
+
* - 'candidate_discover': OTP-verified candidate exploring (contextId = candidate_uuid)
|
|
821
|
+
* - 'candidate_apply': Known candidate applying to job (contextId = candidate_uuid:job_uuid)
|
|
822
|
+
*/
|
|
779
823
|
contextType: VoiceContextType_2;
|
|
780
|
-
/**
|
|
824
|
+
/**
|
|
825
|
+
* Context identifier - format depends on contextType:
|
|
826
|
+
* - screening: application_uuid (required)
|
|
827
|
+
* - job_apply: job_uuid (required)
|
|
828
|
+
* - candidate_discover: candidate_uuid (required)
|
|
829
|
+
* - candidate_apply: "candidate_uuid:job_uuid" (required)
|
|
830
|
+
* - discovery, recruiter, custom, phone: optional
|
|
831
|
+
*/
|
|
781
832
|
contextId?: string;
|
|
782
833
|
/** Unity API base URL - defaults to https://api.glydeunity.com */
|
|
783
834
|
unityBaseUrl?: string;
|
|
@@ -1176,8 +1227,18 @@ export declare type VoiceContextType = 'screening' | 'recruiter' | 'custom' | 'p
|
|
|
1176
1227
|
* Provides voice interaction capabilities with GLYDE AI agents through Deepgram Voice API.
|
|
1177
1228
|
* Supports multiple authentication methods: publishableKey, apiKey, and JWT token.
|
|
1178
1229
|
*
|
|
1230
|
+
* Context Types:
|
|
1231
|
+
* - screening: Known candidate with application_uuid - screening interview
|
|
1232
|
+
* - recruiter: Internal recruiter copilot
|
|
1233
|
+
* - custom: Custom context with overridden prompts
|
|
1234
|
+
* - phone: Phone agent context
|
|
1235
|
+
* - discovery: Unknown candidate, no job - guide to opportunities (publishable_key only)
|
|
1236
|
+
* - job_apply: Unknown candidate, known job - apply to specific job (contextId = job_uuid)
|
|
1237
|
+
* - candidate_discover: Known candidate (OTP verified), no job - explore opportunities (contextId = candidate_uuid)
|
|
1238
|
+
* - candidate_apply: Known candidate, known job - apply and start screening (contextId = candidate_uuid:job_uuid)
|
|
1239
|
+
*
|
|
1179
1240
|
* @example
|
|
1180
|
-
* //
|
|
1241
|
+
* // Screening interview for existing application
|
|
1181
1242
|
* const voice = new GlydeVoice({
|
|
1182
1243
|
* publishableKey: 'pk_...',
|
|
1183
1244
|
* contextType: 'screening',
|
|
@@ -1185,6 +1246,21 @@ export declare type VoiceContextType = 'screening' | 'recruiter' | 'custom' | 'p
|
|
|
1185
1246
|
* });
|
|
1186
1247
|
*
|
|
1187
1248
|
* @example
|
|
1249
|
+
* // Discovery mode - unknown candidate exploring opportunities
|
|
1250
|
+
* const voice = new GlydeVoice({
|
|
1251
|
+
* publishableKey: 'pk_...',
|
|
1252
|
+
* contextType: 'discovery'
|
|
1253
|
+
* });
|
|
1254
|
+
*
|
|
1255
|
+
* @example
|
|
1256
|
+
* // Job apply - unknown candidate applying to specific job
|
|
1257
|
+
* const voice = new GlydeVoice({
|
|
1258
|
+
* publishableKey: 'pk_...',
|
|
1259
|
+
* contextType: 'job_apply',
|
|
1260
|
+
* contextId: 'job-uuid'
|
|
1261
|
+
* });
|
|
1262
|
+
*
|
|
1263
|
+
* @example
|
|
1188
1264
|
* // Using JWT token (GLYDEBuddy Teams app)
|
|
1189
1265
|
* const voice = new GlydeVoice({
|
|
1190
1266
|
* authToken: userSession.accessToken,
|
|
@@ -1193,8 +1269,16 @@ export declare type VoiceContextType = 'screening' | 'recruiter' | 'custom' | 'p
|
|
|
1193
1269
|
*/
|
|
1194
1270
|
/**
|
|
1195
1271
|
* Voice context types supported by the voice agent
|
|
1196
|
-
|
|
1197
|
-
|
|
1272
|
+
* - screening: Known candidate with application_uuid - screening interview
|
|
1273
|
+
* - recruiter: Internal recruiter copilot
|
|
1274
|
+
* - custom: Custom context with overridden prompts
|
|
1275
|
+
* - phone: Phone agent context
|
|
1276
|
+
* - discovery: Unknown candidate, no job - guide to opportunities
|
|
1277
|
+
* - job_apply: Unknown candidate, known job - apply to specific job
|
|
1278
|
+
* - candidate_discover: Known candidate (OTP verified), no job - explore opportunities
|
|
1279
|
+
* - candidate_apply: Known candidate, known job - apply and start screening
|
|
1280
|
+
*/
|
|
1281
|
+
declare type VoiceContextType_2 = 'screening' | 'recruiter' | 'custom' | 'phone' | 'discovery' | 'job_apply' | 'candidate_discover' | 'candidate_apply';
|
|
1198
1282
|
|
|
1199
1283
|
/**
|
|
1200
1284
|
* Voice events emitted by the agent
|