@hamsa-ai/voice-agents-sdk 0.4.1 → 0.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hamsa-ai/voice-agents-sdk",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Hamsa AI - Voice Agents JavaScript SDK",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
package/types/main.d.ts CHANGED
@@ -302,6 +302,8 @@ declare class HamsaVoiceAgent extends EventEmitter {
302
302
  private static readonly DEFAULT_OUTPUT_VOLUME;
303
303
  /** Default fallback input volume when not connected */
304
304
  private static readonly DEFAULT_INPUT_VOLUME;
305
+ /** Delay in milliseconds before auto-disconnect when agent leaves (allows LiveKit cleanup) */
306
+ private static readonly AGENT_DISCONNECT_DELAY_MS;
305
307
  /** Internal LiveKit manager instance for WebRTC communication */
306
308
  liveKitManager: LiveKitManager | null;
307
309
  /** Hamsa API key for authentication */
@@ -314,7 +316,7 @@ declare class HamsaVoiceAgent extends EventEmitter {
314
316
  jobId: string | null;
315
317
  /** Screen wake lock manager to prevent device sleep during calls */
316
318
  wakeLockManager: ScreenWakeLock;
317
- /** Flag to track if the user initiated the call end */
319
+ /** Flag to track if the user initiated the call end to prevent duplicate disconnection logic */
318
320
  private userInitiatedEnd;
319
321
  /**
320
322
  * Creates a new HamsaVoiceAgent instance