@glydeunity/voice-sdk 1.5.23 → 1.5.24
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 +11 -11
- package/dist/glyde-chat.umd.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/voice-sdk.es.js +4 -2
- package/dist/voice-sdk.es.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -805,6 +805,7 @@ export declare class GlydeVoice {
|
|
|
805
805
|
contextId?: string;
|
|
806
806
|
contextType?: VoiceContextType_2;
|
|
807
807
|
currentJobUuid?: string;
|
|
808
|
+
candidateUuid?: string;
|
|
808
809
|
}): void;
|
|
809
810
|
/**
|
|
810
811
|
* If a context reinit was pending (after context_switch), run it now. Called when the agent
|
package/dist/voice-sdk.es.js
CHANGED
|
@@ -157,7 +157,7 @@ class ku {
|
|
|
157
157
|
static PENDING_REINIT_FALLBACK_MS = 3e4;
|
|
158
158
|
// Conversation history
|
|
159
159
|
conversationHistory = [];
|
|
160
|
-
// Session context for function calls (passed to backend for data controls)
|
|
160
|
+
// Session context for function calls (passed to backend for data controls and auth body when known)
|
|
161
161
|
sessionContext = {};
|
|
162
162
|
/**
|
|
163
163
|
* Create a new GlydeVoice instance
|
|
@@ -218,9 +218,10 @@ class ku {
|
|
|
218
218
|
this.serverConfig = await this.fetchConfig(), console.log("[GlydeVoice] Fetched config:", this.serverConfig);
|
|
219
219
|
const f = {
|
|
220
220
|
context_id: this.config.contextId,
|
|
221
|
+
context_type: this.config.contextType,
|
|
221
222
|
domain: typeof window < "u" ? window.location.hostname : "localhost"
|
|
222
223
|
};
|
|
223
|
-
this.config.deepgramConfig && (f.deepgram_config = this.config.deepgramConfig), this.conversationHistory.length > 0 && (f.conversation_history = this.conversationHistory), this.config.skipContinuityLimit === !0 && (f.skip_continuity_limit = !0);
|
|
224
|
+
this.sessionContext?.clientUuid && (f.client_uuid = this.sessionContext.clientUuid), this.config.contextType === "candidate_discover" && this.config.contextId ? f.candidate_uuid = this.config.contextId : this.sessionContext?.candidateUuid && (f.candidate_uuid = this.sessionContext.candidateUuid), this.sessionContext?.currentJobUuid && (f.job_uuid = this.sessionContext.currentJobUuid), this.config.deepgramConfig && (f.deepgram_config = this.config.deepgramConfig), this.conversationHistory.length > 0 && (f.conversation_history = this.conversationHistory), this.config.skipContinuityLimit === !0 && (f.skip_continuity_limit = !0);
|
|
224
225
|
const h = await fetch(`${this.unityUrl}/api/unity/voice/auth`, {
|
|
225
226
|
method: "POST",
|
|
226
227
|
headers: this.getAuthHeaders(),
|
|
@@ -667,6 +668,7 @@ class ku {
|
|
|
667
668
|
this.sessionContext = { ...this.sessionContext, ...f }, console.log("[GlydeVoice] Session context updated:", {
|
|
668
669
|
hasContextId: !!f.contextId,
|
|
669
670
|
contextType: f.contextType,
|
|
671
|
+
hasCandidateUuid: !!this.sessionContext.candidateUuid,
|
|
670
672
|
hasJobUuid: !!f.currentJobUuid
|
|
671
673
|
});
|
|
672
674
|
}
|