@hamsa-ai/voice-agents-sdk 0.5.3 → 0.5.5-beta.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/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/types/classes/livekit-tool-registry.d.ts +19 -0
- package/types/main.d.ts +2 -3
package/package.json
CHANGED
|
@@ -195,6 +195,8 @@ export declare class LiveKitToolRegistry extends EventEmitter {
|
|
|
195
195
|
private room;
|
|
196
196
|
/** Array of client-side tools available for agent execution */
|
|
197
197
|
private tools;
|
|
198
|
+
/** Set of currently registered RPC method names for cleanup */
|
|
199
|
+
private readonly registeredMethods;
|
|
198
200
|
/** Debug logger instance for conditional logging */
|
|
199
201
|
private readonly logger;
|
|
200
202
|
/**
|
|
@@ -328,6 +330,23 @@ export declare class LiveKitToolRegistry extends EventEmitter {
|
|
|
328
330
|
* 5. Tools become immediately available for agent calls
|
|
329
331
|
*/
|
|
330
332
|
registerTools(): void;
|
|
333
|
+
/**
|
|
334
|
+
* Unregisters all currently registered RPC methods
|
|
335
|
+
*
|
|
336
|
+
* Removes all tool RPC handlers from the LiveKit room.
|
|
337
|
+
* This is called automatically before re-registering tools to prevent
|
|
338
|
+
* duplicate registration errors.
|
|
339
|
+
*
|
|
340
|
+
* @example
|
|
341
|
+
* ```typescript
|
|
342
|
+
* // Manually unregister all tools
|
|
343
|
+
* registry.unregisterAllTools();
|
|
344
|
+
*
|
|
345
|
+
* // Tools are no longer available to the agent
|
|
346
|
+
* console.log('All tools unregistered');
|
|
347
|
+
* ```
|
|
348
|
+
*/
|
|
349
|
+
unregisterAllTools(): void;
|
|
331
350
|
/**
|
|
332
351
|
* Processes incoming data messages from voice agents and participants
|
|
333
352
|
*
|
package/types/main.d.ts
CHANGED
|
@@ -559,9 +559,8 @@ declare class HamsaVoiceAgent extends EventEmitter {
|
|
|
559
559
|
* browser-based call testing with DTMF input simulation, allowing users to
|
|
560
560
|
* test IVR flows and DTMF transitions without making actual phone calls.
|
|
561
561
|
*
|
|
562
|
-
*
|
|
563
|
-
*
|
|
564
|
-
* in the agent flow.
|
|
562
|
+
* Uses LiveKit's native DTMF API (publishDtmf) which properly integrates with
|
|
563
|
+
* telephony systems and SIP infrastructure per RFC 4733 standard.
|
|
565
564
|
*
|
|
566
565
|
* @param digit - A single DTMF digit: '0'-'9', '*', or '#'
|
|
567
566
|
* @throws {Error} If called when not connected (no active call)
|