diff --git a/typescript/package-lock.json b/typescript/package-lock.json index 843dc78..e4a8932 100644 --- a/typescript/package-lock.json +++ b/typescript/package-lock.json @@ -9,7 +9,7 @@ "version": "0.10.1", "license": "MIT", "dependencies": { - "@jambonz/schema": "^0.4.2", + "@jambonz/schema": "^0.4.26", "ajv": "^8.17.1", "ws": "^8.18.0" }, @@ -582,9 +582,9 @@ } }, "node_modules/@jambonz/schema": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@jambonz/schema/-/schema-0.4.2.tgz", - "integrity": "sha512-UEM+LN1nMaCmwYv/EiLD+MDS5wF8pCEXz7Oe44n27REmtW/Ndh5qOHJPuFfhiHSnsybt+MngqIgnRXaPx5rXtA==", + "version": "0.4.26", + "resolved": "https://registry.npmjs.org/@jambonz/schema/-/schema-0.4.26.tgz", + "integrity": "sha512-IJEyeDWwxibOAcWjAPgYE+AR+tVECobpD8q/1NOjdHbyYVktcHV7NITjcrmQiV62H8InkcSTFcV+k5VqQ2F2jQ==", "license": "MIT", "dependencies": { "ajv": "^8.17.1", diff --git a/typescript/package.json b/typescript/package.json index ffb0efd..b05ba35 100644 --- a/typescript/package.json +++ b/typescript/package.json @@ -95,7 +95,7 @@ "postpublish": "npm run clean-docs" }, "dependencies": { - "@jambonz/schema": "^0.4.2", + "@jambonz/schema": "^0.4.26", "ajv": "^8.17.1", "ws": "^8.18.0" }, diff --git a/typescript/src/types/components.ts b/typescript/src/types/components.ts index 99a8232..40bba02 100644 --- a/typescript/src/types/components.ts +++ b/typescript/src/types/components.ts @@ -146,6 +146,10 @@ export interface Recognizer { gladiaOptions?: Record; elevenlabsOptions?: Record; verbioOptions?: Record; + gradiumOptions?: Record; + mistralOptions?: Record; + modulateOptions?: Record; + zoomOptions?: Record; customOptions?: Record; } diff --git a/typescript/src/types/verbs.ts b/typescript/src/types/verbs.ts index 3e44ec8..ef6583d 100644 --- a/typescript/src/types/verbs.ts +++ b/typescript/src/types/verbs.ts @@ -266,8 +266,24 @@ export interface QwenS2sVerb extends LlmBaseOptions { }; } +export interface GptliveS2sVerb extends LlmBaseOptions { + verb: 'gptlive_s2s'; +} + +export interface NovaS2sVerb extends LlmBaseOptions { + verb: 'nova_s2s'; +} + +export interface VoiceliveS2sVerb extends LlmBaseOptions { + verb: 'voicelive_s2s'; +} + export interface DialogflowVerb { verb: 'dialogflow'; + /** The deployment to use (CES). Omit to use the app's default. */ + deployment?: string; + /** Names the conversation on the Dialogflow side; reuse it on a later dialogflow verb in the same call to resume the same conversation. */ + sessionId?: string; id?: string; /** Google service account credentials as JSON object or stringified JSON. */ credentials: Record | string; @@ -371,6 +387,10 @@ export interface AgentVerb { greeting?: boolean; /** Speculatively prompt the LLM on final transcript before Krisp end-of-turn. Default: false. */ earlyGeneration?: boolean; + /** false: the agent's text is never sent to TTS (e.g. an agent that drives a DTMF-only phone menu with tools). Text is still kept in history and llm_response events; toolFiller and earlyGeneration are turned off. Default: true. */ + speak?: boolean; + /** Keep stage-direction-only paragraphs ('(silence)', '[No response needed]', '*pauses*') and // blocks out of TTS. History and events keep the raw text. Default: true. */ + speechCleanup?: boolean; /** Enable server-side noise isolation to reduce background noise on call audio. Defaults to inbound (caller) audio; set direction to 'write' for outbound. */ noiseIsolation?: 'krisp' | 'rnnoise' | { mode: string; @@ -380,8 +400,10 @@ export interface AgentVerb { }; /** External MCP servers that provide tools to the LLM. */ mcpServers?: McpServerConfig[]; - /** Seconds to wait after assistant finishes speaking before prompting user to respond. 0 disables. Default: 0. */ + /** Seconds to wait after assistant finishes speaking before prompting user to respond. 0 disables. Default: 12. */ noResponseTimeout?: number; + /** End the agent after this many unanswered no-response prompts in a row (actionHook completionReason 'no_response'). Resets when the user speaks. 0 or unset: no limit. */ + noResponseMaxPrompts?: number; /** Auto-adjust STT/TTS based on detected language. true=lock on first, 'always'=adapt every turn. */ autoLockLanguage?: boolean | 'always'; /** Per-language TTS overrides. Keys are BCP-47 codes (e.g., 'es', 'fr'). */ @@ -538,6 +560,8 @@ export interface DialVerb { tag?: Record; /** Forward P-Asserted-Identity header. */ forwardPAI?: boolean; + /** Codec names, in preference order, to offer on the outbound INVITE (e.g. ['G722', 'PCMU']). */ + codecs?: string[]; } export interface ConferenceVerb { @@ -948,6 +972,9 @@ export type Verb = | DeepgramS2sVerb | UltravoxS2sVerb | QwenS2sVerb + | GptliveS2sVerb + | NovaS2sVerb + | VoiceliveS2sVerb | DialogflowVerb | AgentVerb | ConferenceVerb diff --git a/typescript/src/verb-builder.ts b/typescript/src/verb-builder.ts index befdb2b..da47d63 100644 --- a/typescript/src/verb-builder.ts +++ b/typescript/src/verb-builder.ts @@ -103,6 +103,18 @@ export class VerbBuilder { return this.addVerb({ verb: 'qwen_s2s', ...opts }); } + gptlive_s2s(opts: Omit): this { + return this.addVerb({ verb: 'gptlive_s2s', ...opts }); + } + + nova_s2s(opts: Omit): this { + return this.addVerb({ verb: 'nova_s2s', ...opts }); + } + + voicelive_s2s(opts: Omit): this { + return this.addVerb({ verb: 'voicelive_s2s', ...opts }); + } + /** Shortcut for s2s with vendor='google'. */ google_s2s(opts: Omit): this { return this.addVerb({ verb: 'google_s2s', ...opts }); diff --git a/typescript/src/websocket/session.ts b/typescript/src/websocket/session.ts index 77eb6a9..afb95f1 100644 --- a/typescript/src/websocket/session.ts +++ b/typescript/src/websocket/session.ts @@ -119,6 +119,9 @@ export class Session extends EventEmitter { /** Shortcut for s2s with vendor='openai'. */ openai_s2s(opts: Parameters[0]): this { this.builder.openai_s2s(opts); return this; } qwen_s2s(opts: Parameters[0]): this { this.builder.qwen_s2s(opts); return this; } + gptlive_s2s(opts: Parameters[0]): this { this.builder.gptlive_s2s(opts); return this; } + nova_s2s(opts: Parameters[0]): this { this.builder.nova_s2s(opts); return this; } + voicelive_s2s(opts: Parameters[0]): this { this.builder.voicelive_s2s(opts); return this; } /** Shortcut for s2s with vendor='google'. */ google_s2s(opts: Parameters[0]): this { this.builder.google_s2s(opts); return this; } /** Shortcut for s2s with vendor='elevenlabs'. */