@jambonz/sdk 0.8.1 → 0.8.3

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.
@@ -1,5 +1,5 @@
1
- import { b as CreateCallRequest, L as ListCallsFilter, a as CallInfo, C as CallCount, U as UpdateCallRequest, Q as QueueInfo } from '../rest-C4J_YJN5.cjs';
2
- import { A as ActionHook, $ as Verb } from '../verbs-DXbSDMKR.cjs';
1
+ import { b as CreateCallRequest, L as ListCallsFilter, a as CallInfo, C as CallCount, U as UpdateCallRequest, Q as QueueInfo } from '../rest-C1bMbs6-.cjs';
2
+ import { A as ActionHook, $ as Verb } from '../verbs-Bq-MRFKt.cjs';
3
3
 
4
4
  /**
5
5
  * JambonzClient — REST API client for the jambonz platform.
@@ -1,5 +1,5 @@
1
- import { b as CreateCallRequest, L as ListCallsFilter, a as CallInfo, C as CallCount, U as UpdateCallRequest, Q as QueueInfo } from '../rest-DVExRUxz.js';
2
- import { A as ActionHook, $ as Verb } from '../verbs-DXbSDMKR.js';
1
+ import { b as CreateCallRequest, L as ListCallsFilter, a as CallInfo, C as CallCount, U as UpdateCallRequest, Q as QueueInfo } from '../rest-arm-pIoj.js';
2
+ import { A as ActionHook, $ as Verb } from '../verbs-Bq-MRFKt.js';
3
3
 
4
4
  /**
5
5
  * JambonzClient — REST API client for the jambonz platform.
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
- export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AgentLlm, d as AgentLlmOptions, e as AgentVerb, f as AlertVerb, g as Amd, h as AmdTimers, i as AnswerVerb, j as Auth, B as BidirectionalAudio, C as ConferenceVerb, k as ConfigVerb, D as DequeueVerb, l as DialVerb, m as DtmfVerb, n as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as Handoff, o as HangupVerb, J as JambonzApp, L as LLM_VENDORS, p as LeaveVerb, q as ListenVerb, r as LlmMessage, s as LlmTool, t as LlmToolOpenAIWrapped, u as LlmToolOutputData, v as LlmVendor, w as LlmVerb, M as McpServerConfig, x as MessageVerb, P as PauseVerb, y as PlayVerb, R as Recognizer, z as RedirectVerb, S as SayVerb, I as SipDeclineVerb, K as SipReferVerb, N as SipRequestVerb, O as StreamVerb, Q as Synthesizer, T as TagVerb, U as Target, V as TranscribeVerb, W as TransferConfirm, X as TransferDisposition, Y as TransferOptions, Z as TransferVerb, _ as Vad, $ as Verb, a0 as VerbName } from './verbs-DXbSDMKR.cjs';
1
+ export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AgentLlm, d as AgentLlmOptions, e as AgentVerb, f as AlertVerb, g as Amd, h as AmdTimers, i as AnswerVerb, j as Auth, B as BidirectionalAudio, C as ConferenceVerb, k as ConfigVerb, D as DequeueVerb, l as DialVerb, m as DtmfVerb, n as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as Handoff, o as HangupVerb, J as JambonzApp, L as LLM_VENDORS, p as LeaveVerb, q as ListenVerb, r as LlmMessage, s as LlmTool, t as LlmToolOpenAIWrapped, u as LlmToolOutputData, v as LlmVendor, w as LlmVerb, M as McpServerConfig, x as MessageVerb, P as PauseVerb, y as PlayVerb, R as Recognizer, z as RedirectVerb, S as SayVerb, I as SipDeclineVerb, K as SipReferVerb, N as SipRequestVerb, O as StreamVerb, Q as Synthesizer, T as TagVerb, U as Target, V as TranscribeVerb, W as TransferConfirm, X as TransferDisposition, Y as TransferOptions, Z as TransferVerb, _ as Vad, $ as Verb, a0 as VerbName } from './verbs-Bq-MRFKt.cjs';
2
2
  export { A as AgentEvent, a as AgentEventType, b as AgentLlmResponseEvent, c as AgentPreflightMetrics, d as AgentTurnEndEvent, e as AgentTurnLatency, f as AgentUserInterruptionEvent, g as AgentUserTranscriptEvent, C as CallSession, T as TtsStreamingEvent, h as TtsStreamingEventType, W as WsMessage, i as WsMessageType, j as WsResponse } from './session-DKaSRkIo.cjs';
3
3
  export { E as EnvVarDef, a as EnvVarSchema, L as Logger } from './common-BSJZX7WO.cjs';
4
- export { C as CallCount, a as CallInfo, b as CreateCallRequest, L as ListCallsFilter, Q as QueueInfo, U as UpdateCallRequest } from './rest-C4J_YJN5.cjs';
5
- export { J as JambonzValidator, V as ValidationError, a as ValidationResult, b as VerbBuilder, c as VerbBuilderOptions, g as getValidator } from './verb-builder-BjrRSray.cjs';
4
+ export { C as CallCount, a as CallInfo, b as CreateCallRequest, L as ListCallsFilter, Q as QueueInfo, U as UpdateCallRequest } from './rest-C1bMbs6-.cjs';
5
+ export { J as JambonzValidator, V as ValidationError, a as ValidationResult, b as VerbBuilder, c as VerbBuilderOptions, g as getValidator } from './verb-builder-DpeNsmyP.cjs';
6
6
  export { WebhookResponse, envVarsMiddleware } from './webhook/index.cjs';
7
7
  export { AudioClient, AudioClientEvents, AudioStream, AudioStreamEvents, AudioStreamMetadata, EndpointOptions, MakeService, Middleware, PlayAudioOptions, Session, WsClient, WsClientEvents, WsRouter, createEndpoint } from './websocket/index.cjs';
8
8
  export { CallsResource, ClientOptions, ConferencesResource, JambonzClient, QueuesResource } from './client/index.cjs';
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AgentLlm, d as AgentLlmOptions, e as AgentVerb, f as AlertVerb, g as Amd, h as AmdTimers, i as AnswerVerb, j as Auth, B as BidirectionalAudio, C as ConferenceVerb, k as ConfigVerb, D as DequeueVerb, l as DialVerb, m as DtmfVerb, n as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as Handoff, o as HangupVerb, J as JambonzApp, L as LLM_VENDORS, p as LeaveVerb, q as ListenVerb, r as LlmMessage, s as LlmTool, t as LlmToolOpenAIWrapped, u as LlmToolOutputData, v as LlmVendor, w as LlmVerb, M as McpServerConfig, x as MessageVerb, P as PauseVerb, y as PlayVerb, R as Recognizer, z as RedirectVerb, S as SayVerb, I as SipDeclineVerb, K as SipReferVerb, N as SipRequestVerb, O as StreamVerb, Q as Synthesizer, T as TagVerb, U as Target, V as TranscribeVerb, W as TransferConfirm, X as TransferDisposition, Y as TransferOptions, Z as TransferVerb, _ as Vad, $ as Verb, a0 as VerbName } from './verbs-DXbSDMKR.js';
1
+ export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AgentLlm, d as AgentLlmOptions, e as AgentVerb, f as AlertVerb, g as Amd, h as AmdTimers, i as AnswerVerb, j as Auth, B as BidirectionalAudio, C as ConferenceVerb, k as ConfigVerb, D as DequeueVerb, l as DialVerb, m as DtmfVerb, n as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as Handoff, o as HangupVerb, J as JambonzApp, L as LLM_VENDORS, p as LeaveVerb, q as ListenVerb, r as LlmMessage, s as LlmTool, t as LlmToolOpenAIWrapped, u as LlmToolOutputData, v as LlmVendor, w as LlmVerb, M as McpServerConfig, x as MessageVerb, P as PauseVerb, y as PlayVerb, R as Recognizer, z as RedirectVerb, S as SayVerb, I as SipDeclineVerb, K as SipReferVerb, N as SipRequestVerb, O as StreamVerb, Q as Synthesizer, T as TagVerb, U as Target, V as TranscribeVerb, W as TransferConfirm, X as TransferDisposition, Y as TransferOptions, Z as TransferVerb, _ as Vad, $ as Verb, a0 as VerbName } from './verbs-Bq-MRFKt.js';
2
2
  export { A as AgentEvent, a as AgentEventType, b as AgentLlmResponseEvent, c as AgentPreflightMetrics, d as AgentTurnEndEvent, e as AgentTurnLatency, f as AgentUserInterruptionEvent, g as AgentUserTranscriptEvent, C as CallSession, T as TtsStreamingEvent, h as TtsStreamingEventType, W as WsMessage, i as WsMessageType, j as WsResponse } from './session-DKaSRkIo.js';
3
3
  export { E as EnvVarDef, a as EnvVarSchema, L as Logger } from './common-BSJZX7WO.js';
4
- export { C as CallCount, a as CallInfo, b as CreateCallRequest, L as ListCallsFilter, Q as QueueInfo, U as UpdateCallRequest } from './rest-DVExRUxz.js';
5
- export { J as JambonzValidator, V as ValidationError, a as ValidationResult, b as VerbBuilder, c as VerbBuilderOptions, g as getValidator } from './verb-builder-C5tteeud.js';
4
+ export { C as CallCount, a as CallInfo, b as CreateCallRequest, L as ListCallsFilter, Q as QueueInfo, U as UpdateCallRequest } from './rest-arm-pIoj.js';
5
+ export { J as JambonzValidator, V as ValidationError, a as ValidationResult, b as VerbBuilder, c as VerbBuilderOptions, g as getValidator } from './verb-builder-BcM7Cth-.js';
6
6
  export { WebhookResponse, envVarsMiddleware } from './webhook/index.js';
7
7
  export { AudioClient, AudioClientEvents, AudioStream, AudioStreamEvents, AudioStreamMetadata, EndpointOptions, MakeService, Middleware, PlayAudioOptions, Session, WsClient, WsClientEvents, WsRouter, createEndpoint } from './websocket/index.js';
8
8
  export { CallsResource, ClientOptions, ConferencesResource, JambonzClient, QueuesResource } from './client/index.js';
@@ -1,4 +1,4 @@
1
- import { A as ActionHook, $ as Verb, S as SayVerb, Z as TransferVerb } from './verbs-DXbSDMKR.cjs';
1
+ import { A as ActionHook, $ as Verb, S as SayVerb, Z as TransferVerb } from './verbs-Bq-MRFKt.cjs';
2
2
 
3
3
  /**
4
4
  * Types for the jambonz REST API client.
@@ -1,4 +1,4 @@
1
- import { A as ActionHook, $ as Verb, S as SayVerb, Z as TransferVerb } from './verbs-DXbSDMKR.js';
1
+ import { A as ActionHook, $ as Verb, S as SayVerb, Z as TransferVerb } from './verbs-Bq-MRFKt.js';
2
2
 
3
3
  /**
4
4
  * Types for the jambonz REST API client.
@@ -12,7 +12,9 @@ var LLM_VENDORS = [
12
12
  "baseten",
13
13
  "azure-openai",
14
14
  "groq",
15
- "huggingface"
15
+ "huggingface",
16
+ "moonshot",
17
+ "zai"
16
18
  ];
17
19
 
18
20
  exports.LLM_VENDORS = LLM_VENDORS;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/llm-vendors.generated.ts"],"names":[],"mappings":";;;AAQO,IAAM,WAAA,GAAc;AAAA,EACzB,QAAA;AAAA,EACA,WAAA;AAAA,EACA,QAAA;AAAA,EACA,eAAA;AAAA,EACA,eAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF","file":"index.cjs","sourcesContent":["// AUTO-GENERATED — DO NOT EDIT BY HAND.\n// Source of truth: @jambonz/schema@0.3.16 verbs/agent.schema.json (llm.vendor.enum)\n// Regenerate with: npm run gen:types\n//\n// This file derives the LLM vendor list from the JSON schema so the SDK's\n// types never drift from the schema when a new vendor is added.\n\n/** Supported LLM vendors for the agent verb, derived from the schema enum. */\nexport const LLM_VENDORS = [\n 'openai',\n 'anthropic',\n 'google',\n 'vertex-gemini',\n 'vertex-openai',\n 'bedrock',\n 'deepseek',\n 'baseten',\n 'azure-openai',\n 'groq',\n 'huggingface',\n] as const;\n\n/** Union of LLM vendor ids accepted by the agent verb's `llm.vendor`. */\nexport type LlmVendor = (typeof LLM_VENDORS)[number];\n"]}
1
+ {"version":3,"sources":["../../src/types/llm-vendors.generated.ts"],"names":[],"mappings":";;;AAQO,IAAM,WAAA,GAAc;AAAA,EACzB,QAAA;AAAA,EACA,WAAA;AAAA,EACA,QAAA;AAAA,EACA,eAAA;AAAA,EACA,eAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,aAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF","file":"index.cjs","sourcesContent":["// AUTO-GENERATED — DO NOT EDIT BY HAND.\n// Source of truth: @jambonz/schema@0.3.19 verbs/agent.schema.json (llm.vendor.enum)\n// Regenerate with: npm run gen:types\n//\n// This file derives the LLM vendor list from the JSON schema so the SDK's\n// types never drift from the schema when a new vendor is added.\n\n/** Supported LLM vendors for the agent verb, derived from the schema enum. */\nexport const LLM_VENDORS = [\n 'openai',\n 'anthropic',\n 'google',\n 'vertex-gemini',\n 'vertex-openai',\n 'bedrock',\n 'deepseek',\n 'baseten',\n 'azure-openai',\n 'groq',\n 'huggingface',\n 'moonshot',\n 'zai',\n] as const;\n\n/** Union of LLM vendor ids accepted by the agent verb's `llm.vendor`. */\nexport type LlmVendor = (typeof LLM_VENDORS)[number];\n"]}
@@ -1,4 +1,4 @@
1
- export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AgentLlm, d as AgentLlmOptions, e as AgentVerb, f as AlertVerb, g as Amd, h as AmdTimers, i as AnswerVerb, j as Auth, B as BidirectionalAudio, C as ConferenceVerb, k as ConfigVerb, D as DequeueVerb, l as DialVerb, m as DtmfVerb, n as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as Handoff, o as HangupVerb, J as JambonzApp, L as LLM_VENDORS, p as LeaveVerb, q as ListenVerb, r as LlmMessage, s as LlmTool, t as LlmToolOpenAIWrapped, u as LlmToolOutputData, v as LlmVendor, w as LlmVerb, M as McpServerConfig, x as MessageVerb, P as PauseVerb, y as PlayVerb, R as Recognizer, z as RedirectVerb, S as SayVerb, I as SipDeclineVerb, K as SipReferVerb, N as SipRequestVerb, O as StreamVerb, Q as Synthesizer, T as TagVerb, U as Target, V as TranscribeVerb, W as TransferConfirm, X as TransferDisposition, Y as TransferOptions, Z as TransferVerb, _ as Vad, $ as Verb, a0 as VerbName } from '../verbs-DXbSDMKR.cjs';
1
+ export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AgentLlm, d as AgentLlmOptions, e as AgentVerb, f as AlertVerb, g as Amd, h as AmdTimers, i as AnswerVerb, j as Auth, B as BidirectionalAudio, C as ConferenceVerb, k as ConfigVerb, D as DequeueVerb, l as DialVerb, m as DtmfVerb, n as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as Handoff, o as HangupVerb, J as JambonzApp, L as LLM_VENDORS, p as LeaveVerb, q as ListenVerb, r as LlmMessage, s as LlmTool, t as LlmToolOpenAIWrapped, u as LlmToolOutputData, v as LlmVendor, w as LlmVerb, M as McpServerConfig, x as MessageVerb, P as PauseVerb, y as PlayVerb, R as Recognizer, z as RedirectVerb, S as SayVerb, I as SipDeclineVerb, K as SipReferVerb, N as SipRequestVerb, O as StreamVerb, Q as Synthesizer, T as TagVerb, U as Target, V as TranscribeVerb, W as TransferConfirm, X as TransferDisposition, Y as TransferOptions, Z as TransferVerb, _ as Vad, $ as Verb, a0 as VerbName } from '../verbs-Bq-MRFKt.cjs';
2
2
  export { A as AgentEvent, a as AgentEventType, b as AgentLlmResponseEvent, c as AgentPreflightMetrics, d as AgentTurnEndEvent, e as AgentTurnLatency, f as AgentUserInterruptionEvent, g as AgentUserTranscriptEvent, C as CallSession, T as TtsStreamingEvent, h as TtsStreamingEventType, W as WsMessage, i as WsMessageType, j as WsResponse } from '../session-DKaSRkIo.cjs';
3
3
  export { E as EnvVarDef, a as EnvVarSchema, L as Logger } from '../common-BSJZX7WO.cjs';
4
- export { C as CallCount, a as CallInfo, b as CreateCallRequest, L as ListCallsFilter, Q as QueueInfo, U as UpdateCallRequest } from '../rest-C4J_YJN5.cjs';
4
+ export { C as CallCount, a as CallInfo, b as CreateCallRequest, L as ListCallsFilter, Q as QueueInfo, U as UpdateCallRequest } from '../rest-C1bMbs6-.cjs';
@@ -1,4 +1,4 @@
1
- export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AgentLlm, d as AgentLlmOptions, e as AgentVerb, f as AlertVerb, g as Amd, h as AmdTimers, i as AnswerVerb, j as Auth, B as BidirectionalAudio, C as ConferenceVerb, k as ConfigVerb, D as DequeueVerb, l as DialVerb, m as DtmfVerb, n as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as Handoff, o as HangupVerb, J as JambonzApp, L as LLM_VENDORS, p as LeaveVerb, q as ListenVerb, r as LlmMessage, s as LlmTool, t as LlmToolOpenAIWrapped, u as LlmToolOutputData, v as LlmVendor, w as LlmVerb, M as McpServerConfig, x as MessageVerb, P as PauseVerb, y as PlayVerb, R as Recognizer, z as RedirectVerb, S as SayVerb, I as SipDeclineVerb, K as SipReferVerb, N as SipRequestVerb, O as StreamVerb, Q as Synthesizer, T as TagVerb, U as Target, V as TranscribeVerb, W as TransferConfirm, X as TransferDisposition, Y as TransferOptions, Z as TransferVerb, _ as Vad, $ as Verb, a0 as VerbName } from '../verbs-DXbSDMKR.js';
1
+ export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AgentLlm, d as AgentLlmOptions, e as AgentVerb, f as AlertVerb, g as Amd, h as AmdTimers, i as AnswerVerb, j as Auth, B as BidirectionalAudio, C as ConferenceVerb, k as ConfigVerb, D as DequeueVerb, l as DialVerb, m as DtmfVerb, n as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as Handoff, o as HangupVerb, J as JambonzApp, L as LLM_VENDORS, p as LeaveVerb, q as ListenVerb, r as LlmMessage, s as LlmTool, t as LlmToolOpenAIWrapped, u as LlmToolOutputData, v as LlmVendor, w as LlmVerb, M as McpServerConfig, x as MessageVerb, P as PauseVerb, y as PlayVerb, R as Recognizer, z as RedirectVerb, S as SayVerb, I as SipDeclineVerb, K as SipReferVerb, N as SipRequestVerb, O as StreamVerb, Q as Synthesizer, T as TagVerb, U as Target, V as TranscribeVerb, W as TransferConfirm, X as TransferDisposition, Y as TransferOptions, Z as TransferVerb, _ as Vad, $ as Verb, a0 as VerbName } from '../verbs-Bq-MRFKt.js';
2
2
  export { A as AgentEvent, a as AgentEventType, b as AgentLlmResponseEvent, c as AgentPreflightMetrics, d as AgentTurnEndEvent, e as AgentTurnLatency, f as AgentUserInterruptionEvent, g as AgentUserTranscriptEvent, C as CallSession, T as TtsStreamingEvent, h as TtsStreamingEventType, W as WsMessage, i as WsMessageType, j as WsResponse } from '../session-DKaSRkIo.js';
3
3
  export { E as EnvVarDef, a as EnvVarSchema, L as Logger } from '../common-BSJZX7WO.js';
4
- export { C as CallCount, a as CallInfo, b as CreateCallRequest, L as ListCallsFilter, Q as QueueInfo, U as UpdateCallRequest } from '../rest-DVExRUxz.js';
4
+ export { C as CallCount, a as CallInfo, b as CreateCallRequest, L as ListCallsFilter, Q as QueueInfo, U as UpdateCallRequest } from '../rest-arm-pIoj.js';
@@ -10,7 +10,9 @@ var LLM_VENDORS = [
10
10
  "baseten",
11
11
  "azure-openai",
12
12
  "groq",
13
- "huggingface"
13
+ "huggingface",
14
+ "moonshot",
15
+ "zai"
14
16
  ];
15
17
 
16
18
  export { LLM_VENDORS };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/types/llm-vendors.generated.ts"],"names":[],"mappings":";AAQO,IAAM,WAAA,GAAc;AAAA,EACzB,QAAA;AAAA,EACA,WAAA;AAAA,EACA,QAAA;AAAA,EACA,eAAA;AAAA,EACA,eAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF","file":"index.js","sourcesContent":["// AUTO-GENERATED — DO NOT EDIT BY HAND.\n// Source of truth: @jambonz/schema@0.3.16 verbs/agent.schema.json (llm.vendor.enum)\n// Regenerate with: npm run gen:types\n//\n// This file derives the LLM vendor list from the JSON schema so the SDK's\n// types never drift from the schema when a new vendor is added.\n\n/** Supported LLM vendors for the agent verb, derived from the schema enum. */\nexport const LLM_VENDORS = [\n 'openai',\n 'anthropic',\n 'google',\n 'vertex-gemini',\n 'vertex-openai',\n 'bedrock',\n 'deepseek',\n 'baseten',\n 'azure-openai',\n 'groq',\n 'huggingface',\n] as const;\n\n/** Union of LLM vendor ids accepted by the agent verb's `llm.vendor`. */\nexport type LlmVendor = (typeof LLM_VENDORS)[number];\n"]}
1
+ {"version":3,"sources":["../../src/types/llm-vendors.generated.ts"],"names":[],"mappings":";AAQO,IAAM,WAAA,GAAc;AAAA,EACzB,QAAA;AAAA,EACA,WAAA;AAAA,EACA,QAAA;AAAA,EACA,eAAA;AAAA,EACA,eAAA;AAAA,EACA,SAAA;AAAA,EACA,UAAA;AAAA,EACA,SAAA;AAAA,EACA,cAAA;AAAA,EACA,MAAA;AAAA,EACA,aAAA;AAAA,EACA,UAAA;AAAA,EACA;AACF","file":"index.js","sourcesContent":["// AUTO-GENERATED — DO NOT EDIT BY HAND.\n// Source of truth: @jambonz/schema@0.3.19 verbs/agent.schema.json (llm.vendor.enum)\n// Regenerate with: npm run gen:types\n//\n// This file derives the LLM vendor list from the JSON schema so the SDK's\n// types never drift from the schema when a new vendor is added.\n\n/** Supported LLM vendors for the agent verb, derived from the schema enum. */\nexport const LLM_VENDORS = [\n 'openai',\n 'anthropic',\n 'google',\n 'vertex-gemini',\n 'vertex-openai',\n 'bedrock',\n 'deepseek',\n 'baseten',\n 'azure-openai',\n 'groq',\n 'huggingface',\n 'moonshot',\n 'zai',\n] as const;\n\n/** Union of LLM vendor ids accepted by the agent verb's `llm.vendor`. */\nexport type LlmVendor = (typeof LLM_VENDORS)[number];\n"]}
@@ -1,4 +1,4 @@
1
- import { $ as Verb, S as SayVerb, y as PlayVerb, G as GatherVerb, w as LlmVerb, a1 as S2sVerb, a2 as LlmBaseOptions, a3 as DialogflowVerb, e as AgentVerb, q as ListenVerb, O as StreamVerb, V as TranscribeVerb, l as DialVerb, C as ConferenceVerb, a4 as RoomVerb, E as EnqueueVerb, D as DequeueVerb, o as HangupVerb, z as RedirectVerb, P as PauseVerb, p as LeaveVerb, I as SipDeclineVerb, N as SipRequestVerb, K as SipReferVerb, Z as TransferVerb, k as ConfigVerb, i as AnswerVerb, f as AlertVerb, T as TagVerb, m as DtmfVerb, n as DubVerb, x as MessageVerb } from './verbs-DXbSDMKR.js';
1
+ import { $ as Verb, S as SayVerb, y as PlayVerb, G as GatherVerb, w as LlmVerb, a1 as S2sVerb, a2 as LlmBaseOptions, a3 as DialogflowVerb, e as AgentVerb, q as ListenVerb, O as StreamVerb, V as TranscribeVerb, l as DialVerb, C as ConferenceVerb, a4 as RoomVerb, E as EnqueueVerb, D as DequeueVerb, o as HangupVerb, z as RedirectVerb, P as PauseVerb, p as LeaveVerb, I as SipDeclineVerb, N as SipRequestVerb, K as SipReferVerb, Z as TransferVerb, k as ConfigVerb, i as AnswerVerb, f as AlertVerb, T as TagVerb, m as DtmfVerb, n as DubVerb, x as MessageVerb } from './verbs-Bq-MRFKt.js';
2
2
 
3
3
  /**
4
4
  * Schema-based validation using AJV.
@@ -1,4 +1,4 @@
1
- import { $ as Verb, S as SayVerb, y as PlayVerb, G as GatherVerb, w as LlmVerb, a1 as S2sVerb, a2 as LlmBaseOptions, a3 as DialogflowVerb, e as AgentVerb, q as ListenVerb, O as StreamVerb, V as TranscribeVerb, l as DialVerb, C as ConferenceVerb, a4 as RoomVerb, E as EnqueueVerb, D as DequeueVerb, o as HangupVerb, z as RedirectVerb, P as PauseVerb, p as LeaveVerb, I as SipDeclineVerb, N as SipRequestVerb, K as SipReferVerb, Z as TransferVerb, k as ConfigVerb, i as AnswerVerb, f as AlertVerb, T as TagVerb, m as DtmfVerb, n as DubVerb, x as MessageVerb } from './verbs-DXbSDMKR.cjs';
1
+ import { $ as Verb, S as SayVerb, y as PlayVerb, G as GatherVerb, w as LlmVerb, a1 as S2sVerb, a2 as LlmBaseOptions, a3 as DialogflowVerb, e as AgentVerb, q as ListenVerb, O as StreamVerb, V as TranscribeVerb, l as DialVerb, C as ConferenceVerb, a4 as RoomVerb, E as EnqueueVerb, D as DequeueVerb, o as HangupVerb, z as RedirectVerb, P as PauseVerb, p as LeaveVerb, I as SipDeclineVerb, N as SipRequestVerb, K as SipReferVerb, Z as TransferVerb, k as ConfigVerb, i as AnswerVerb, f as AlertVerb, T as TagVerb, m as DtmfVerb, n as DubVerb, x as MessageVerb } from './verbs-Bq-MRFKt.cjs';
2
2
 
3
3
  /**
4
4
  * Schema-based validation using AJV.
@@ -252,7 +252,7 @@ interface Amd {
252
252
  }
253
253
 
254
254
  /** Supported LLM vendors for the agent verb, derived from the schema enum. */
255
- declare const LLM_VENDORS: readonly ["openai", "anthropic", "google", "vertex-gemini", "vertex-openai", "bedrock", "deepseek", "baseten", "azure-openai", "groq", "huggingface"];
255
+ declare const LLM_VENDORS: readonly ["openai", "anthropic", "google", "vertex-gemini", "vertex-openai", "bedrock", "deepseek", "baseten", "azure-openai", "groq", "huggingface", "moonshot", "zai"];
256
256
  /** Union of LLM vendor ids accepted by the agent verb's `llm.vendor`. */
257
257
  type LlmVendor = (typeof LLM_VENDORS)[number];
258
258
 
@@ -428,6 +428,16 @@ interface LlmBaseOptions {
428
428
  events?: string[];
429
429
  /** Declarative transfer-to-human: injects a transfer tool and runs the packaged transfer when the model calls it. */
430
430
  handoff?: Handoff;
431
+ /** Enable the built-in hangup tool for s2s verbs. When present, the runtime injects a 'hangup' tool; when the model calls it the call ends with the reason placed in an X-Reason SIP header (LLM-supplied reason wins, falling back to hangup.reason). */
432
+ hangup?: {
433
+ reason?: string;
434
+ };
435
+ /** Opt-in per-response stall watchdog (ms) for s2s vendors that support app-driven turn-taking. Omit or set to 0 to disable (the default). */
436
+ responseTimeoutMs?: number;
437
+ /** When a response stall is detected (see responseTimeoutMs), cancel the in-progress server-side response. Has no effect unless responseTimeoutMs is set. */
438
+ cancelOnResponseTimeout?: boolean;
439
+ /** On caller barge-in, cancel the in-progress server-side response (app-driven turn-taking configurations). */
440
+ cancelOnBargeIn?: boolean;
431
441
  }
432
442
  interface LlmVerb extends LlmBaseOptions {
433
443
  verb: 'llm';
@@ -534,6 +544,10 @@ interface AgentVerb {
534
544
  toolHook?: ActionHook;
535
545
  /** Declarative transfer-to-human: injects a transfer tool and runs the packaged transfer when the model calls it. */
536
546
  handoff?: Handoff;
547
+ /** Enable the built-in hangup tool. When present, the runtime injects a 'hangup' tool; when the model calls it the call ends with the reason placed in an X-Reason SIP header (LLM-supplied reason wins, falling back to hangup.reason). */
548
+ hangup?: {
549
+ reason?: string;
550
+ };
537
551
  /** Configuration for playing filler audio while tool calls are in progress. Prevents silence during long-running tool executions. */
538
552
  toolFiller?: false | {
539
553
  /** Filler mode. 'audio' plays a looping audio file. 'backchannel' uses TTS to speak short phrases. */
@@ -252,7 +252,7 @@ interface Amd {
252
252
  }
253
253
 
254
254
  /** Supported LLM vendors for the agent verb, derived from the schema enum. */
255
- declare const LLM_VENDORS: readonly ["openai", "anthropic", "google", "vertex-gemini", "vertex-openai", "bedrock", "deepseek", "baseten", "azure-openai", "groq", "huggingface"];
255
+ declare const LLM_VENDORS: readonly ["openai", "anthropic", "google", "vertex-gemini", "vertex-openai", "bedrock", "deepseek", "baseten", "azure-openai", "groq", "huggingface", "moonshot", "zai"];
256
256
  /** Union of LLM vendor ids accepted by the agent verb's `llm.vendor`. */
257
257
  type LlmVendor = (typeof LLM_VENDORS)[number];
258
258
 
@@ -428,6 +428,16 @@ interface LlmBaseOptions {
428
428
  events?: string[];
429
429
  /** Declarative transfer-to-human: injects a transfer tool and runs the packaged transfer when the model calls it. */
430
430
  handoff?: Handoff;
431
+ /** Enable the built-in hangup tool for s2s verbs. When present, the runtime injects a 'hangup' tool; when the model calls it the call ends with the reason placed in an X-Reason SIP header (LLM-supplied reason wins, falling back to hangup.reason). */
432
+ hangup?: {
433
+ reason?: string;
434
+ };
435
+ /** Opt-in per-response stall watchdog (ms) for s2s vendors that support app-driven turn-taking. Omit or set to 0 to disable (the default). */
436
+ responseTimeoutMs?: number;
437
+ /** When a response stall is detected (see responseTimeoutMs), cancel the in-progress server-side response. Has no effect unless responseTimeoutMs is set. */
438
+ cancelOnResponseTimeout?: boolean;
439
+ /** On caller barge-in, cancel the in-progress server-side response (app-driven turn-taking configurations). */
440
+ cancelOnBargeIn?: boolean;
431
441
  }
432
442
  interface LlmVerb extends LlmBaseOptions {
433
443
  verb: 'llm';
@@ -534,6 +544,10 @@ interface AgentVerb {
534
544
  toolHook?: ActionHook;
535
545
  /** Declarative transfer-to-human: injects a transfer tool and runs the packaged transfer when the model calls it. */
536
546
  handoff?: Handoff;
547
+ /** Enable the built-in hangup tool. When present, the runtime injects a 'hangup' tool; when the model calls it the call ends with the reason placed in an X-Reason SIP header (LLM-supplied reason wins, falling back to hangup.reason). */
548
+ hangup?: {
549
+ reason?: string;
550
+ };
537
551
  /** Configuration for playing filler audio while tool calls are in progress. Prevents silence during long-running tool executions. */
538
552
  toolFiller?: false | {
539
553
  /** Filler mode. 'audio' plays a looping audio file. 'backchannel' uses TTS to speak short phrases. */
@@ -1,5 +1,5 @@
1
- import { b as VerbBuilder, c as VerbBuilderOptions } from '../verb-builder-BjrRSray.cjs';
2
- import { J as JambonzApp } from '../verbs-DXbSDMKR.cjs';
1
+ import { b as VerbBuilder, c as VerbBuilderOptions } from '../verb-builder-DpeNsmyP.cjs';
2
+ import { J as JambonzApp } from '../verbs-Bq-MRFKt.cjs';
3
3
  import { IncomingMessage, ServerResponse } from 'http';
4
4
  import { a as EnvVarSchema } from '../common-BSJZX7WO.cjs';
5
5
 
@@ -1,5 +1,5 @@
1
- import { b as VerbBuilder, c as VerbBuilderOptions } from '../verb-builder-C5tteeud.js';
2
- import { J as JambonzApp } from '../verbs-DXbSDMKR.js';
1
+ import { b as VerbBuilder, c as VerbBuilderOptions } from '../verb-builder-BcM7Cth-.js';
2
+ import { J as JambonzApp } from '../verbs-Bq-MRFKt.js';
3
3
  import { IncomingMessage, ServerResponse } from 'http';
4
4
  import { a as EnvVarSchema } from '../common-BSJZX7WO.js';
5
5
 
@@ -3,8 +3,8 @@ import { L as Logger, a as EnvVarSchema } from '../common-BSJZX7WO.cjs';
3
3
  import { EventEmitter } from 'events';
4
4
  import { WebSocket } from 'ws';
5
5
  import { C as CallSession, W as WsMessage } from '../session-DKaSRkIo.cjs';
6
- import { $ as Verb, S as SayVerb, u as LlmToolOutputData } from '../verbs-DXbSDMKR.cjs';
7
- import { c as VerbBuilderOptions, b as VerbBuilder } from '../verb-builder-BjrRSray.cjs';
6
+ import { $ as Verb, S as SayVerb, u as LlmToolOutputData } from '../verbs-Bq-MRFKt.cjs';
7
+ import { c as VerbBuilderOptions, b as VerbBuilder } from '../verb-builder-DpeNsmyP.cjs';
8
8
 
9
9
  /**
10
10
  * WebSocket Session — represents a single call over a persistent WebSocket connection.
@@ -3,8 +3,8 @@ import { L as Logger, a as EnvVarSchema } from '../common-BSJZX7WO.js';
3
3
  import { EventEmitter } from 'events';
4
4
  import { WebSocket } from 'ws';
5
5
  import { C as CallSession, W as WsMessage } from '../session-DKaSRkIo.js';
6
- import { $ as Verb, S as SayVerb, u as LlmToolOutputData } from '../verbs-DXbSDMKR.js';
7
- import { c as VerbBuilderOptions, b as VerbBuilder } from '../verb-builder-C5tteeud.js';
6
+ import { $ as Verb, S as SayVerb, u as LlmToolOutputData } from '../verbs-Bq-MRFKt.js';
7
+ import { c as VerbBuilderOptions, b as VerbBuilder } from '../verb-builder-BcM7Cth-.js';
8
8
 
9
9
  /**
10
10
  * WebSocket Session — represents a single call over a persistent WebSocket connection.
@@ -0,0 +1,61 @@
1
+ # Conference Supervision
2
+
3
+ Monitor, coach, and barge into live conferences, and tap a room's audio for
4
+ transcription — the core patterns behind a call-center supervision tool,
5
+ distilled into two small files.
6
+
7
+ A complete reference application built on these patterns (React console,
8
+ diarized live transcript, closed-loop e2e tests) is at
9
+ https://github.com/jambonz/room-monitor — see its `docs/ADAPTING.md`.
10
+
11
+ ## What It Demonstrates
12
+
13
+ - **Tagging members** — `memberTag: 'agent'` at join, and mid-call
14
+ `tag`/`untag` via `injectCommand('conf:participant-action', ...)`
15
+ - **The supervisor leg** — one conference member whose join options and
16
+ participant actions produce three modes: silent monitor (`joinMuted`),
17
+ coach (audio delivered only to `agent`-tagged members), and barge-in
18
+ - **Mid-call mode switching** — `conferenceParticipantAction`
19
+ (`coach`/`uncoach`) + `conf_mute_status` via the REST client: no re-dial,
20
+ the room is never interrupted
21
+ - **Conference listen fork** — jambonz streams the room's mixed audio (L16
22
+ PCM) to your WebSocket for transcription/AI; your `metadata` arrives
23
+ verbatim as the fork's first text frame
24
+ - **Application env vars** — the caller flow's room name (`ROOM_NAME`) is
25
+ declared via OPTIONS discovery so operators edit it from the jambonz portal
26
+
27
+ ## Prerequisites
28
+
29
+ - A jambonz account with API credentials
30
+ - Three applications pointed at this app's paths (or one application and
31
+ custom `X-` headers — see the reference app): `/caller`, `/agent`,
32
+ `/supervisor`
33
+ - Conference-level listen (`/Conferences/{name}/listen`) requires a jambonz
34
+ release with MediaJam-based conferencing that includes it
35
+
36
+ ## Environment Variables
37
+
38
+ - `JAMBONZ_BASE_URL` — jambonz API URL (default: `https://api.jambonz.us`)
39
+ - `JAMBONZ_ACCOUNT_SID` — your account SID
40
+ - `JAMBONZ_API_KEY` — your API key
41
+ - `FORK_URL` — public ws(s):// URL of this app's `/fork` path (the media
42
+ server dials out to it)
43
+
44
+ ## Files
45
+
46
+ - `ws-app.ts` — the jambonz application: caller/agent/supervisor call flows +
47
+ the audio-fork sink
48
+ - `monitor.ts` — REST-side supervision driver: list live rooms, switch the
49
+ supervisor's mode (monitor → coach → barge), tag/untag a participant,
50
+ start/stop the transcription fork
51
+
52
+ ## Try It
53
+
54
+ ```bash
55
+ npm install @jambonz/sdk tsx
56
+ npx tsx ws-app.ts # the application (port 3000)
57
+ npx tsx monitor.ts # walk a live room through the supervision modes
58
+ ```
59
+
60
+ Place two calls into a room (one via `/agent`, one via `/caller`), then run
61
+ `monitor.ts` with the supervisor's call_sid to step through the modes.
@@ -0,0 +1,93 @@
1
+ import { JambonzClient } from '@jambonz/sdk/client';
2
+
3
+ /*
4
+ * Conference supervision — the REST-side driver.
5
+ *
6
+ * Walks a live room through the supervision modes using mid-call commands on
7
+ * the supervisor's existing leg (started via ws-app.ts /supervisor). Nothing
8
+ * here re-dials or interrupts the room.
9
+ *
10
+ * Usage:
11
+ * JAMBONZ_ACCOUNT_SID=... JAMBONZ_API_KEY=... \
12
+ * npx tsx monitor.ts <supervisor_call_sid> [room_name]
13
+ */
14
+
15
+ const baseUrl = process.env.JAMBONZ_BASE_URL || 'https://api.jambonz.us';
16
+ const accountSid = process.env.JAMBONZ_ACCOUNT_SID || '';
17
+ const apiKey = process.env.JAMBONZ_API_KEY || '';
18
+ const forkUrl = process.env.FORK_URL || 'wss://your-host/fork';
19
+
20
+ const supervisorCallSid = process.argv[2];
21
+ const roomName = process.argv[3] || 'support-room';
22
+ if (!accountSid || !apiKey || !supervisorCallSid) {
23
+ console.error('usage: JAMBONZ_ACCOUNT_SID=.. JAMBONZ_API_KEY=.. npx tsx monitor.ts <supervisor_call_sid> [room]');
24
+ process.exit(1);
25
+ }
26
+
27
+ const client = new JambonzClient({ baseUrl, accountSid, apiKey });
28
+ const pause = (ms: number) => new Promise((r) => setTimeout(r, ms));
29
+
30
+ /* -- discovery: what rooms are live? --------------------------------------- */
31
+ const conferences = await client.conferences.list();
32
+ console.log('live conferences:', conferences);
33
+
34
+ // On releases with the enriched listing, get participants + tags in one call:
35
+ // GET /Accounts/{sid}/Conferences?expand=participants
36
+ // → [{ id, name, durationSec, participants: [{ call_sid, label, memberTag, isAgent }] }]
37
+ // Derive agent counts (and whether Coach should be offered) from memberTag,
38
+ // and filter out memberTag === 'supervisor' legs before displaying counts.
39
+
40
+ /* -- transcription tap: stream the room mix to our websocket --------------- */
41
+ // jambonz only transports audio — the consumer (ws-app.ts /fork) decides what
42
+ // to do with it. The fork needs no participant leg, is excluded from counts,
43
+ // and is torn down automatically when the room ends.
44
+ const res = await fetch(
45
+ `${baseUrl}/v1/Accounts/${accountSid}/Conferences/${encodeURIComponent(roomName)}/listen`, {
46
+ method: 'POST',
47
+ headers: { Authorization: `Bearer ${apiKey}`, 'Content-Type': 'application/json' },
48
+ body: JSON.stringify({
49
+ url: forkUrl,
50
+ sampleRate: 16000,
51
+ metadata: { room: roomName, sampleRate: 16000 }, // delivered verbatim to the sink
52
+ }),
53
+ });
54
+ console.log(`listen fork: ${res.status}`);
55
+
56
+ /* -- the three supervision modes, as mid-call commands --------------------- */
57
+
58
+ // COACH: audio delivered only to members tagged 'agent'; the caller — and the
59
+ // audio fork — cannot hear it
60
+ console.log('coach mode: only agents hear the supervisor');
61
+ await client.calls.update(supervisorCallSid, {
62
+ conferenceParticipantAction: { action: 'coach', tag: 'agent' },
63
+ });
64
+ await client.calls.update(supervisorCallSid, { conf_mute_status: 'unmute' });
65
+ await pause(10000);
66
+
67
+ // BARGE-IN: heard by everyone
68
+ console.log('barge-in: everyone hears the supervisor');
69
+ await client.calls.update(supervisorCallSid, {
70
+ conferenceParticipantAction: { action: 'uncoach' },
71
+ });
72
+ await pause(10000);
73
+
74
+ // back to SILENT MONITOR
75
+ console.log('silent monitor: heard by no one');
76
+ await client.calls.update(supervisorCallSid, { conf_mute_status: 'mute' });
77
+
78
+ /* -- tags are dynamic too --------------------------------------------------
79
+ // promote/demote any live participant without a re-join; an active coach
80
+ // starts/stops reaching them immediately:
81
+ // await client.calls.update(someCallSid, {
82
+ // conferenceParticipantAction: { action: 'tag', tag: 'agent' },
83
+ // });
84
+ // await client.calls.update(someCallSid, {
85
+ // conferenceParticipantAction: { action: 'untag' },
86
+ // });
87
+ --------------------------------------------------------------------------- */
88
+
89
+ /* -- stop the transcription tap -------------------------------------------- */
90
+ await fetch(
91
+ `${baseUrl}/v1/Accounts/${accountSid}/Conferences/${encodeURIComponent(roomName)}/listen`,
92
+ { method: 'DELETE', headers: { Authorization: `Bearer ${apiKey}` } });
93
+ console.log('listen fork stopped');
@@ -0,0 +1,100 @@
1
+ import http from 'http';
2
+ import { createEndpoint } from '@jambonz/sdk/websocket';
3
+ import type { Session, AudioStream } from '@jambonz/sdk/websocket';
4
+
5
+ /*
6
+ * Conference supervision — the jambonz application side.
7
+ *
8
+ * Three call flows on one endpoint (point one jambonz application at each
9
+ * path), plus the audio sink that receives a conference listen fork:
10
+ *
11
+ * /caller a normal participant; which room they join is the
12
+ * application's ROOM_NAME env var (portal-editable via
13
+ * OPTIONS discovery)
14
+ * /agent joins the same room tagged 'agent' — the coach target
15
+ * /supervisor joins muted (silent monitor); mode changes come later as
16
+ * mid-call participant actions (see monitor.ts)
17
+ * /fork receives the room's mixed audio (L16 PCM) when a
18
+ * conference listen fork is started (see monitor.ts)
19
+ *
20
+ * Full reference app: https://github.com/jambonz/room-monitor
21
+ */
22
+
23
+ const envVars = {
24
+ ROOM_NAME: {
25
+ type: 'string' as const,
26
+ description: 'Conference room inbound callers join',
27
+ default: 'support-room',
28
+ },
29
+ };
30
+
31
+ const server = http.createServer();
32
+ const makeService = createEndpoint({ server, port: 3000, envVars });
33
+
34
+ const room = (session: Session): string =>
35
+ (session.data.env_vars as Record<string, string> | undefined)?.ROOM_NAME || 'support-room';
36
+
37
+ /* -- a normal caller ------------------------------------------------------ */
38
+ makeService({ path: '/caller' }).on('session:new', (session) => {
39
+ session
40
+ .answer()
41
+ .say({ text: 'Connecting you now.' })
42
+ .conference({
43
+ name: room(session),
44
+ startConferenceOnEnter: true,
45
+ endConferenceOnExit: false,
46
+ })
47
+ .send();
48
+ });
49
+
50
+ /* -- an agent: tagged, so coaching reaches them ---------------------------- */
51
+ makeService({ path: '/agent' }).on('session:new', (session) => {
52
+ session
53
+ .answer()
54
+ .conference({
55
+ name: room(session),
56
+ memberTag: 'agent', // <- the coach target; also drives supervision UIs
57
+ startConferenceOnEnter: true,
58
+ endConferenceOnExit: false,
59
+ })
60
+ .send();
61
+
62
+ // Tags are dynamic: promote/demote a live member without re-joining, e.g.
63
+ // session.injectCommand('conf:participant-action', { action: 'untag' });
64
+ // session.injectCommand('conf:participant-action', { action: 'tag', tag: 'agent' });
65
+ });
66
+
67
+ /* -- the supervisor: joins silent; modes switch mid-call ------------------- */
68
+ makeService({ path: '/supervisor' }).on('session:new', (session) => {
69
+ console.log(`supervisor leg ${session.callSid} — use this call_sid with monitor.ts`);
70
+ session
71
+ .answer()
72
+ .conference({
73
+ name: room(session),
74
+ joinMuted: true, // hears everything, heard by no one
75
+ memberTag: 'supervisor', // lets tooling filter this leg out of counts
76
+ startConferenceOnEnter: false, // never create/destroy the room being watched
77
+ endConferenceOnExit: false,
78
+ actionHook: '/conf-done',
79
+ })
80
+ .send();
81
+
82
+ session.on('/conf-done', () => {
83
+ session.hangup().reply();
84
+ });
85
+ });
86
+
87
+ /* -- the audio fork sink: the room mix arrives here ------------------------ */
88
+ makeService.audio({ path: '/fork' }).on('connection', (stream: AudioStream) => {
89
+ // the metadata you passed when starting the fork arrives verbatim as the
90
+ // first text frame — make it self-describing (room, sampleRate)
91
+ console.log('fork connected:', stream.metadata);
92
+
93
+ let bytes = 0;
94
+ stream.on('audio', (pcm: Buffer) => {
95
+ bytes += pcm.length;
96
+ // feed your STT / AI / recorder here — this is raw L16 PCM of the room
97
+ // mix. Note: coached (whispered) audio is never present in this stream.
98
+ });
99
+ stream.on('close', () => console.log(`fork closed after ${bytes} bytes`));
100
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jambonz/sdk",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "jambonz SDK for building voice applications — optimized for AI agents",
5
5
  "author": "Dave Horton",
6
6
  "license": "MIT",
@@ -98,7 +98,7 @@
98
98
  "postpublish": "npm run clean-docs"
99
99
  },
100
100
  "dependencies": {
101
- "@jambonz/schema": "^0.3.16",
101
+ "@jambonz/schema": "^0.3.19",
102
102
  "ajv": "^8.17.1",
103
103
  "ws": "^8.18.0"
104
104
  },