@lokutor/sdk 1.1.20 → 1.1.21

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.d.mts CHANGED
@@ -611,6 +611,8 @@ interface ConversationalPanelConfig {
611
611
  connectingSoundSrc?: string;
612
612
  /** Background image for the curtain, e.g. '/background_gradient.jpeg' */
613
613
  curtainBgSrc?: string;
614
+ /** Tool definitions for LLM function calling */
615
+ tools?: any[];
614
616
  }
615
617
  declare class ConversationalPanel {
616
618
  private cfg;
package/dist/index.d.ts CHANGED
@@ -611,6 +611,8 @@ interface ConversationalPanelConfig {
611
611
  connectingSoundSrc?: string;
612
612
  /** Background image for the curtain, e.g. '/background_gradient.jpeg' */
613
613
  curtainBgSrc?: string;
614
+ /** Tool definitions for LLM function calling */
615
+ tools?: any[];
614
616
  }
615
617
  declare class ConversationalPanel {
616
618
  private cfg;
package/dist/index.js CHANGED
@@ -950,6 +950,7 @@ var VoiceAgentClient = class {
950
950
  }
951
951
  case "tool_call":
952
952
  console.log(`\u{1F6E0}\uFE0F Tool Call: ${msg.name}(${msg.arguments})`);
953
+ this.emit("tool_call", msg);
953
954
  break;
954
955
  }
955
956
  } catch (e) {
@@ -1617,6 +1618,7 @@ var ConversationalPanel = class {
1617
1618
  }
1618
1619
  const agentHandle = new ConvoAgent({
1619
1620
  apiKey: this.cfg.apiKey,
1621
+ tools: this.cfg.tools,
1620
1622
  prompt: this.cfg.prompt,
1621
1623
  voice: this.cfg.voice || "M1",
1622
1624
  language: this.cfg.language || "en",
package/dist/index.mjs CHANGED
@@ -903,6 +903,7 @@ var VoiceAgentClient = class {
903
903
  }
904
904
  case "tool_call":
905
905
  console.log(`\u{1F6E0}\uFE0F Tool Call: ${msg.name}(${msg.arguments})`);
906
+ this.emit("tool_call", msg);
906
907
  break;
907
908
  }
908
909
  } catch (e) {
@@ -1570,6 +1571,7 @@ var ConversationalPanel = class {
1570
1571
  }
1571
1572
  const agentHandle = new ConvoAgent({
1572
1573
  apiKey: this.cfg.apiKey,
1574
+ tools: this.cfg.tools,
1573
1575
  prompt: this.cfg.prompt,
1574
1576
  voice: this.cfg.voice || "M1",
1575
1577
  language: this.cfg.language || "en",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokutor/sdk",
3
- "version": "1.1.20",
3
+ "version": "1.1.21",
4
4
  "description": "JavaScript/TypeScript SDK for Lokutor Real-time Voice AI",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
package/src/client.ts CHANGED
@@ -517,6 +517,7 @@ export class VoiceAgentClient {
517
517
  }
518
518
  case 'tool_call':
519
519
  console.log(`🛠️ Tool Call: ${msg.name}(${msg.arguments})`);
520
+ this.emit('tool_call', msg);
520
521
  break;
521
522
  }
522
523
  } catch (e) {
@@ -247,6 +247,8 @@ export interface ConversationalPanelConfig {
247
247
  connectingSoundSrc?: string;
248
248
  /** Background image for the curtain, e.g. '/background_gradient.jpeg' */
249
249
  curtainBgSrc?: string;
250
+ /** Tool definitions for LLM function calling */
251
+ tools?: any[];
250
252
  }
251
253
 
252
254
  export class ConversationalPanel {
@@ -401,6 +403,7 @@ export class ConversationalPanel {
401
403
 
402
404
  const agentHandle = new ConvoAgent({
403
405
  apiKey: this.cfg.apiKey,
406
+ tools: this.cfg.tools,
404
407
  prompt: this.cfg.prompt,
405
408
  voice: this.cfg.voice || 'M1',
406
409
  language: this.cfg.language || 'en',