@jambonz/sdk 0.1.18 → 0.1.20

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-HNzc9abq.cjs';
2
- import { A as ActionHook, y as Verb } from '../verbs-pPRZK2ME.cjs';
1
+ import { b as CreateCallRequest, L as ListCallsFilter, a as CallInfo, C as CallCount, U as UpdateCallRequest, Q as QueueInfo } from '../rest-Bzyv1yYU.cjs';
2
+ import { A as ActionHook, y as Verb } from '../verbs-CzMS9-Cg.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-Ca2Zw6QX.js';
2
- import { A as ActionHook, y as Verb } from '../verbs-pPRZK2ME.js';
1
+ import { b as CreateCallRequest, L as ListCallsFilter, a as CallInfo, C as CallCount, U as UpdateCallRequest, Q as QueueInfo } from '../rest-8k251TFT.js';
2
+ import { A as ActionHook, y as Verb } from '../verbs-CzMS9-Cg.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 AlertVerb, d as Amd, e as AmdTimers, f as AnswerVerb, g as Auth, B as BidirectionalAudio, C as ConferenceVerb, h as ConfigVerb, D as DequeueVerb, i as DialVerb, j as DtmfVerb, k as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as HangupVerb, J as JambonzApp, L as LeaveVerb, l as ListenVerb, m as LlmVerb, M as McpServerConfig, n as MessageVerb, P as PauseVerb, o as PipelineVerb, p as PlayVerb, R as Recognizer, q as RedirectVerb, S as SayVerb, r as SipDeclineVerb, s as SipReferVerb, t as SipRequestVerb, u as StreamVerb, v as Synthesizer, T as TagVerb, w as Target, x as TranscribeVerb, V as Vad, y as Verb, z as VerbName } from './verbs-pPRZK2ME.cjs';
1
+ export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AlertVerb, d as Amd, e as AmdTimers, f as AnswerVerb, g as Auth, B as BidirectionalAudio, C as ConferenceVerb, h as ConfigVerb, D as DequeueVerb, i as DialVerb, j as DtmfVerb, k as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as HangupVerb, J as JambonzApp, L as LeaveVerb, l as ListenVerb, m as LlmVerb, M as McpServerConfig, n as MessageVerb, P as PauseVerb, o as PipelineVerb, p as PlayVerb, R as Recognizer, q as RedirectVerb, S as SayVerb, r as SipDeclineVerb, s as SipReferVerb, t as SipRequestVerb, u as StreamVerb, v as Synthesizer, T as TagVerb, w as Target, x as TranscribeVerb, V as Vad, y as Verb, z as VerbName } from './verbs-CzMS9-Cg.cjs';
2
2
  export { C as CallSession, T as TtsStreamingEvent, a as TtsStreamingEventType, W as WsMessage, b as WsMessageType, c as WsResponse } from './session-DHc6G_9y.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-HNzc9abq.cjs';
5
- export { J as JambonzValidator, V as ValidationError, a as ValidationResult, b as VerbBuilder, c as VerbBuilderOptions, g as getValidator } from './verb-builder-CZ3oXfC7.cjs';
4
+ export { C as CallCount, a as CallInfo, b as CreateCallRequest, L as ListCallsFilter, Q as QueueInfo, U as UpdateCallRequest } from './rest-Bzyv1yYU.cjs';
5
+ export { J as JambonzValidator, V as ValidationError, a as ValidationResult, b as VerbBuilder, c as VerbBuilderOptions, g as getValidator } from './verb-builder-APl3-OHv.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 AlertVerb, d as Amd, e as AmdTimers, f as AnswerVerb, g as Auth, B as BidirectionalAudio, C as ConferenceVerb, h as ConfigVerb, D as DequeueVerb, i as DialVerb, j as DtmfVerb, k as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as HangupVerb, J as JambonzApp, L as LeaveVerb, l as ListenVerb, m as LlmVerb, M as McpServerConfig, n as MessageVerb, P as PauseVerb, o as PipelineVerb, p as PlayVerb, R as Recognizer, q as RedirectVerb, S as SayVerb, r as SipDeclineVerb, s as SipReferVerb, t as SipRequestVerb, u as StreamVerb, v as Synthesizer, T as TagVerb, w as Target, x as TranscribeVerb, V as Vad, y as Verb, z as VerbName } from './verbs-pPRZK2ME.js';
1
+ export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AlertVerb, d as Amd, e as AmdTimers, f as AnswerVerb, g as Auth, B as BidirectionalAudio, C as ConferenceVerb, h as ConfigVerb, D as DequeueVerb, i as DialVerb, j as DtmfVerb, k as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as HangupVerb, J as JambonzApp, L as LeaveVerb, l as ListenVerb, m as LlmVerb, M as McpServerConfig, n as MessageVerb, P as PauseVerb, o as PipelineVerb, p as PlayVerb, R as Recognizer, q as RedirectVerb, S as SayVerb, r as SipDeclineVerb, s as SipReferVerb, t as SipRequestVerb, u as StreamVerb, v as Synthesizer, T as TagVerb, w as Target, x as TranscribeVerb, V as Vad, y as Verb, z as VerbName } from './verbs-CzMS9-Cg.js';
2
2
  export { C as CallSession, T as TtsStreamingEvent, a as TtsStreamingEventType, W as WsMessage, b as WsMessageType, c as WsResponse } from './session-DHc6G_9y.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-Ca2Zw6QX.js';
5
- export { J as JambonzValidator, V as ValidationError, a as ValidationResult, b as VerbBuilder, c as VerbBuilderOptions, g as getValidator } from './verb-builder-BvWA5lVf.js';
4
+ export { C as CallCount, a as CallInfo, b as CreateCallRequest, L as ListCallsFilter, Q as QueueInfo, U as UpdateCallRequest } from './rest-8k251TFT.js';
5
+ export { J as JambonzValidator, V as ValidationError, a as ValidationResult, b as VerbBuilder, c as VerbBuilderOptions, g as getValidator } from './verb-builder-C6wyGbPc.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, y as Verb } from './verbs-pPRZK2ME.js';
1
+ import { A as ActionHook, y as Verb } from './verbs-CzMS9-Cg.js';
2
2
 
3
3
  /**
4
4
  * Types for the jambonz REST API client.
@@ -1,4 +1,4 @@
1
- import { A as ActionHook, y as Verb } from './verbs-pPRZK2ME.cjs';
1
+ import { A as ActionHook, y as Verb } from './verbs-CzMS9-Cg.cjs';
2
2
 
3
3
  /**
4
4
  * Types for the jambonz REST API client.
@@ -1,4 +1,4 @@
1
- export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AlertVerb, d as Amd, e as AmdTimers, f as AnswerVerb, g as Auth, B as BidirectionalAudio, C as ConferenceVerb, h as ConfigVerb, D as DequeueVerb, i as DialVerb, j as DtmfVerb, k as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as HangupVerb, J as JambonzApp, L as LeaveVerb, l as ListenVerb, m as LlmVerb, M as McpServerConfig, n as MessageVerb, P as PauseVerb, o as PipelineVerb, p as PlayVerb, R as Recognizer, q as RedirectVerb, S as SayVerb, r as SipDeclineVerb, s as SipReferVerb, t as SipRequestVerb, u as StreamVerb, v as Synthesizer, T as TagVerb, w as Target, x as TranscribeVerb, V as Vad, y as Verb, z as VerbName } from '../verbs-pPRZK2ME.cjs';
1
+ export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AlertVerb, d as Amd, e as AmdTimers, f as AnswerVerb, g as Auth, B as BidirectionalAudio, C as ConferenceVerb, h as ConfigVerb, D as DequeueVerb, i as DialVerb, j as DtmfVerb, k as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as HangupVerb, J as JambonzApp, L as LeaveVerb, l as ListenVerb, m as LlmVerb, M as McpServerConfig, n as MessageVerb, P as PauseVerb, o as PipelineVerb, p as PlayVerb, R as Recognizer, q as RedirectVerb, S as SayVerb, r as SipDeclineVerb, s as SipReferVerb, t as SipRequestVerb, u as StreamVerb, v as Synthesizer, T as TagVerb, w as Target, x as TranscribeVerb, V as Vad, y as Verb, z as VerbName } from '../verbs-CzMS9-Cg.cjs';
2
2
  export { C as CallSession, T as TtsStreamingEvent, a as TtsStreamingEventType, W as WsMessage, b as WsMessageType, c as WsResponse } from '../session-DHc6G_9y.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-HNzc9abq.cjs';
4
+ export { C as CallCount, a as CallInfo, b as CreateCallRequest, L as ListCallsFilter, Q as QueueInfo, U as UpdateCallRequest } from '../rest-Bzyv1yYU.cjs';
@@ -1,4 +1,4 @@
1
- export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AlertVerb, d as Amd, e as AmdTimers, f as AnswerVerb, g as Auth, B as BidirectionalAudio, C as ConferenceVerb, h as ConfigVerb, D as DequeueVerb, i as DialVerb, j as DtmfVerb, k as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as HangupVerb, J as JambonzApp, L as LeaveVerb, l as ListenVerb, m as LlmVerb, M as McpServerConfig, n as MessageVerb, P as PauseVerb, o as PipelineVerb, p as PlayVerb, R as Recognizer, q as RedirectVerb, S as SayVerb, r as SipDeclineVerb, s as SipReferVerb, t as SipRequestVerb, u as StreamVerb, v as Synthesizer, T as TagVerb, w as Target, x as TranscribeVerb, V as Vad, y as Verb, z as VerbName } from '../verbs-pPRZK2ME.js';
1
+ export { A as ActionHook, a as ActionHookDelayAction, b as ActionHookObject, c as AlertVerb, d as Amd, e as AmdTimers, f as AnswerVerb, g as Auth, B as BidirectionalAudio, C as ConferenceVerb, h as ConfigVerb, D as DequeueVerb, i as DialVerb, j as DtmfVerb, k as DubVerb, E as EnqueueVerb, F as FillerNoise, G as GatherVerb, H as HangupVerb, J as JambonzApp, L as LeaveVerb, l as ListenVerb, m as LlmVerb, M as McpServerConfig, n as MessageVerb, P as PauseVerb, o as PipelineVerb, p as PlayVerb, R as Recognizer, q as RedirectVerb, S as SayVerb, r as SipDeclineVerb, s as SipReferVerb, t as SipRequestVerb, u as StreamVerb, v as Synthesizer, T as TagVerb, w as Target, x as TranscribeVerb, V as Vad, y as Verb, z as VerbName } from '../verbs-CzMS9-Cg.js';
2
2
  export { C as CallSession, T as TtsStreamingEvent, a as TtsStreamingEventType, W as WsMessage, b as WsMessageType, c as WsResponse } from '../session-DHc6G_9y.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-Ca2Zw6QX.js';
4
+ export { C as CallCount, a as CallInfo, b as CreateCallRequest, L as ListCallsFilter, Q as QueueInfo, U as UpdateCallRequest } from '../rest-8k251TFT.js';
@@ -1,4 +1,4 @@
1
- import { y as Verb, S as SayVerb, p as PlayVerb, G as GatherVerb, m as LlmVerb, I as S2sVerb, K as LlmBaseOptions, N as DialogflowVerb, o as PipelineVerb, l as ListenVerb, u as StreamVerb, x as TranscribeVerb, i as DialVerb, C as ConferenceVerb, E as EnqueueVerb, D as DequeueVerb, H as HangupVerb, q as RedirectVerb, P as PauseVerb, L as LeaveVerb, r as SipDeclineVerb, t as SipRequestVerb, s as SipReferVerb, h as ConfigVerb, f as AnswerVerb, c as AlertVerb, T as TagVerb, j as DtmfVerb, k as DubVerb, n as MessageVerb } from './verbs-pPRZK2ME.cjs';
1
+ import { y as Verb, S as SayVerb, p as PlayVerb, G as GatherVerb, m as LlmVerb, I as S2sVerb, K as LlmBaseOptions, N as DialogflowVerb, o as PipelineVerb, l as ListenVerb, u as StreamVerb, x as TranscribeVerb, i as DialVerb, C as ConferenceVerb, E as EnqueueVerb, D as DequeueVerb, H as HangupVerb, q as RedirectVerb, P as PauseVerb, L as LeaveVerb, r as SipDeclineVerb, t as SipRequestVerb, s as SipReferVerb, h as ConfigVerb, f as AnswerVerb, c as AlertVerb, T as TagVerb, j as DtmfVerb, k as DubVerb, n as MessageVerb } from './verbs-CzMS9-Cg.cjs';
2
2
 
3
3
  /**
4
4
  * Schema-based validation using AJV.
@@ -1,4 +1,4 @@
1
- import { y as Verb, S as SayVerb, p as PlayVerb, G as GatherVerb, m as LlmVerb, I as S2sVerb, K as LlmBaseOptions, N as DialogflowVerb, o as PipelineVerb, l as ListenVerb, u as StreamVerb, x as TranscribeVerb, i as DialVerb, C as ConferenceVerb, E as EnqueueVerb, D as DequeueVerb, H as HangupVerb, q as RedirectVerb, P as PauseVerb, L as LeaveVerb, r as SipDeclineVerb, t as SipRequestVerb, s as SipReferVerb, h as ConfigVerb, f as AnswerVerb, c as AlertVerb, T as TagVerb, j as DtmfVerb, k as DubVerb, n as MessageVerb } from './verbs-pPRZK2ME.js';
1
+ import { y as Verb, S as SayVerb, p as PlayVerb, G as GatherVerb, m as LlmVerb, I as S2sVerb, K as LlmBaseOptions, N as DialogflowVerb, o as PipelineVerb, l as ListenVerb, u as StreamVerb, x as TranscribeVerb, i as DialVerb, C as ConferenceVerb, E as EnqueueVerb, D as DequeueVerb, H as HangupVerb, q as RedirectVerb, P as PauseVerb, L as LeaveVerb, r as SipDeclineVerb, t as SipRequestVerb, s as SipReferVerb, h as ConfigVerb, f as AnswerVerb, c as AlertVerb, T as TagVerb, j as DtmfVerb, k as DubVerb, n as MessageVerb } from './verbs-CzMS9-Cg.js';
2
2
 
3
3
  /**
4
4
  * Schema-based validation using AJV.
@@ -464,6 +464,10 @@ interface PipelineVerb {
464
464
  eventHook?: ActionHook;
465
465
  /** Webhook when the LLM requests a tool/function call. */
466
466
  toolHook?: ActionHook;
467
+ /** Whether the LLM generates an initial greeting before the user speaks. Default: true. */
468
+ greeting?: boolean;
469
+ /** Speculatively prompt the LLM on final transcript before Krisp end-of-turn. Default: false. */
470
+ earlyGeneration?: boolean;
467
471
  }
468
472
  interface ListenVerb {
469
473
  verb: 'listen';
@@ -464,6 +464,10 @@ interface PipelineVerb {
464
464
  eventHook?: ActionHook;
465
465
  /** Webhook when the LLM requests a tool/function call. */
466
466
  toolHook?: ActionHook;
467
+ /** Whether the LLM generates an initial greeting before the user speaks. Default: true. */
468
+ greeting?: boolean;
469
+ /** Speculatively prompt the LLM on final transcript before Krisp end-of-turn. Default: false. */
470
+ earlyGeneration?: boolean;
467
471
  }
468
472
  interface ListenVerb {
469
473
  verb: 'listen';
@@ -1,5 +1,5 @@
1
- import { b as VerbBuilder, c as VerbBuilderOptions } from '../verb-builder-CZ3oXfC7.cjs';
2
- import { J as JambonzApp } from '../verbs-pPRZK2ME.cjs';
1
+ import { b as VerbBuilder, c as VerbBuilderOptions } from '../verb-builder-APl3-OHv.cjs';
2
+ import { J as JambonzApp } from '../verbs-CzMS9-Cg.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-BvWA5lVf.js';
2
- import { J as JambonzApp } from '../verbs-pPRZK2ME.js';
1
+ import { b as VerbBuilder, c as VerbBuilderOptions } from '../verb-builder-C6wyGbPc.js';
2
+ import { J as JambonzApp } from '../verbs-CzMS9-Cg.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-DHc6G_9y.cjs';
6
- import { y as Verb } from '../verbs-pPRZK2ME.cjs';
7
- import { c as VerbBuilderOptions, b as VerbBuilder } from '../verb-builder-CZ3oXfC7.cjs';
6
+ import { y as Verb } from '../verbs-CzMS9-Cg.cjs';
7
+ import { c as VerbBuilderOptions, b as VerbBuilder } from '../verb-builder-APl3-OHv.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-DHc6G_9y.js';
6
- import { y as Verb } from '../verbs-pPRZK2ME.js';
7
- import { c as VerbBuilderOptions, b as VerbBuilder } from '../verb-builder-BvWA5lVf.js';
6
+ import { y as Verb } from '../verbs-CzMS9-Cg.js';
7
+ import { c as VerbBuilderOptions, b as VerbBuilder } from '../verb-builder-C6wyGbPc.js';
8
8
 
9
9
  /**
10
10
  * WebSocket Session — represents a single call over a persistent WebSocket connection.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jambonz/sdk",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "description": "jambonz SDK for building voice applications — optimized for AI agents",
5
5
  "author": "Dave Horton",
6
6
  "license": "MIT",
@@ -0,0 +1,104 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://jambonz.org/schema/callbacks/pipeline-turn",
4
+ "title": "Pipeline Turn End Event",
5
+ "description": "Payload sent to the pipeline verb's eventHook at the end of each conversational turn. Provides the user transcript, assistant response, and per-component latency metrics for the turn.",
6
+ "type": "object",
7
+ "properties": {
8
+ "type": {
9
+ "const": "turn_end",
10
+ "description": "Event type identifier."
11
+ },
12
+ "transcript": {
13
+ "type": "string",
14
+ "description": "The user's final speech-to-text transcript for this turn. May be '(none)' if no transcript was captured (e.g. an interrupted turn before STT completed)."
15
+ },
16
+ "response": {
17
+ "type": "string",
18
+ "description": "The assistant's full text response for this turn. May be empty or partial if the turn was interrupted."
19
+ },
20
+ "interrupted": {
21
+ "type": "boolean",
22
+ "description": "True if this turn was interrupted by the user barging in before the assistant finished speaking.",
23
+ "default": false
24
+ },
25
+ "latency": {
26
+ "type": "object",
27
+ "description": "Per-component latency metrics for this turn. All values are in milliseconds relative to the start of the turn (when the user began speaking). Fields are absent when not applicable.",
28
+ "properties": {
29
+ "total_ms": {
30
+ "type": "integer",
31
+ "description": "Total turn duration from start of user speech to LLM response completion."
32
+ },
33
+ "stt": {
34
+ "type": "object",
35
+ "description": "Speech-to-text latency metrics.",
36
+ "properties": {
37
+ "final_transcript_ms": {
38
+ "type": "integer",
39
+ "description": "Time from turn start until the final transcript was received from the STT engine."
40
+ }
41
+ },
42
+ "additionalProperties": false
43
+ },
44
+ "llm": {
45
+ "type": "object",
46
+ "description": "LLM latency metrics.",
47
+ "properties": {
48
+ "prompted_ms": {
49
+ "type": "integer",
50
+ "description": "Time from turn start until the LLM was prompted."
51
+ },
52
+ "ttft_ms": {
53
+ "type": "integer",
54
+ "description": "Time-to-first-token: time from LLM prompt to first token received."
55
+ }
56
+ },
57
+ "additionalProperties": false
58
+ },
59
+ "tts": {
60
+ "type": "object",
61
+ "description": "Text-to-speech latency metrics.",
62
+ "properties": {
63
+ "first_buffered_ms": {
64
+ "type": "integer",
65
+ "description": "Time from turn start until the first LLM token was buffered for TTS."
66
+ },
67
+ "first_send_ms": {
68
+ "type": "integer",
69
+ "description": "Time from turn start until audio was first sent to the TTS engine."
70
+ },
71
+ "buffer_delay_ms": {
72
+ "type": "integer",
73
+ "description": "Delay between first token buffered and first send to TTS engine."
74
+ }
75
+ },
76
+ "additionalProperties": false
77
+ },
78
+ "preflight": {
79
+ "type": "object",
80
+ "description": "Early generation (preflight) metrics. Only present when earlyGeneration is enabled.",
81
+ "properties": {
82
+ "ms": {
83
+ "type": "integer",
84
+ "description": "Time from turn start until the preflight prompt was sent."
85
+ },
86
+ "result": {
87
+ "type": "string",
88
+ "enum": ["hit", "miss", "pending"],
89
+ "description": "Whether the preflight transcript matched the final transcript ('hit'), did not match ('miss'), or was still in progress ('pending')."
90
+ },
91
+ "tokens": {
92
+ "type": "integer",
93
+ "description": "Number of preflight tokens that were buffered. Only present on a 'hit'."
94
+ }
95
+ },
96
+ "additionalProperties": false
97
+ }
98
+ },
99
+ "additionalProperties": false
100
+ }
101
+ },
102
+ "required": ["type", "transcript", "response", "interrupted", "latency"],
103
+ "additionalProperties": false
104
+ }
@@ -89,11 +89,21 @@
89
89
  },
90
90
  "eventHook": {
91
91
  "$ref": "../components/actionHook",
92
- "description": "A webhook invoked for pipeline events."
92
+ "description": "A webhook invoked for pipeline events. Receives event types: 'user_transcript' (user speech recognized), 'agent_response' (assistant reply), 'user_interruption' (barge-in detected), and 'turn_end' (end-of-turn summary with transcript, response, and latency metrics)."
93
93
  },
94
94
  "toolHook": {
95
95
  "$ref": "../components/actionHook",
96
96
  "description": "A webhook invoked when the LLM requests a tool/function call. The payload includes the tool name and arguments; the response provides the tool result."
97
+ },
98
+ "greeting": {
99
+ "type": "boolean",
100
+ "description": "Whether the LLM should generate an initial greeting before the user speaks. Default: true.",
101
+ "default": true
102
+ },
103
+ "earlyGeneration": {
104
+ "type": "boolean",
105
+ "description": "When using Krisp turn detection, speculatively prompt the LLM with the final transcript before end-of-turn is confirmed. If the transcript matches when turn ends, buffered tokens are released immediately — reducing response latency. Only effective with Krisp turn detection; ignored when the STT vendor has native turn-taking. Default: false.",
106
+ "default": false
97
107
  }
98
108
  },
99
109
  "required": [