diff --git a/typescript/package-lock.json b/typescript/package-lock.json index e9bcae7..f5fbea5 100644 --- a/typescript/package-lock.json +++ b/typescript/package-lock.json @@ -1,15 +1,15 @@ { "name": "@jambonz/sdk", - "version": "0.8.0", + "version": "0.8.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@jambonz/sdk", - "version": "0.8.0", + "version": "0.8.1", "license": "MIT", "dependencies": { - "@jambonz/schema": "^0.3.16", + "@jambonz/schema": "^0.3.18", "ajv": "^8.17.1", "ws": "^8.18.0" }, @@ -582,9 +582,9 @@ } }, "node_modules/@jambonz/schema": { - "version": "0.3.16", - "resolved": "https://registry.npmjs.org/@jambonz/schema/-/schema-0.3.16.tgz", - "integrity": "sha512-7XIEcJzEFmJ1e73uMNT+iE6NFbpaq2beoZ5Kv16bTtt1LYq5TJ6OHIfyCvAqG3WB4cVbJKTXHs0aKibCdLCLOw==", + "version": "0.3.18", + "resolved": "https://registry.npmjs.org/@jambonz/schema/-/schema-0.3.18.tgz", + "integrity": "sha512-N6wS1hWoVXaRksAOl6Yf6OnhReelrHA8+gdMCCwwZczDYBrpxEoRI7/WcZ8rgMH5KF8006Zoo1yw0noHdcpnSw==", "license": "MIT", "dependencies": { "ajv": "^8.17.1", diff --git a/typescript/package.json b/typescript/package.json index 632f1d5..bf1f70e 100644 --- a/typescript/package.json +++ b/typescript/package.json @@ -98,7 +98,7 @@ "postpublish": "npm run clean-docs" }, "dependencies": { - "@jambonz/schema": "^0.3.16", + "@jambonz/schema": "^0.3.18", "ajv": "^8.17.1", "ws": "^8.18.0" }, diff --git a/typescript/src/types/llm-vendors.generated.ts b/typescript/src/types/llm-vendors.generated.ts index d9c0554..f4080a5 100644 --- a/typescript/src/types/llm-vendors.generated.ts +++ b/typescript/src/types/llm-vendors.generated.ts @@ -1,5 +1,5 @@ // AUTO-GENERATED — DO NOT EDIT BY HAND. -// Source of truth: @jambonz/schema@0.3.16 verbs/agent.schema.json (llm.vendor.enum) +// Source of truth: @jambonz/schema@0.3.18 verbs/agent.schema.json (llm.vendor.enum) // Regenerate with: npm run gen:types // // This file derives the LLM vendor list from the JSON schema so the SDK's @@ -18,6 +18,8 @@ export const LLM_VENDORS = [ 'azure-openai', 'groq', 'huggingface', + 'moonshot', + 'zai', ] as const; /** Union of LLM vendor ids accepted by the agent verb's `llm.vendor`. */ diff --git a/typescript/src/types/verbs.ts b/typescript/src/types/verbs.ts index a9f6b83..ddbc634 100644 --- a/typescript/src/types/verbs.ts +++ b/typescript/src/types/verbs.ts @@ -201,6 +201,14 @@ export interface LlmBaseOptions { events?: string[]; /** Declarative transfer-to-human: injects a transfer tool and runs the packaged transfer when the model calls it. */ handoff?: Handoff; + /** 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). */ + hangup?: { reason?: string }; + /** 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). */ + responseTimeoutMs?: number; + /** When a response stall is detected (see responseTimeoutMs), cancel the in-progress server-side response. Has no effect unless responseTimeoutMs is set. */ + cancelOnResponseTimeout?: boolean; + /** On caller barge-in, cancel the in-progress server-side response (app-driven turn-taking configurations). */ + cancelOnBargeIn?: boolean; } export interface LlmVerb extends LlmBaseOptions { @@ -316,6 +324,8 @@ export interface AgentVerb { toolHook?: ActionHook; /** Declarative transfer-to-human: injects a transfer tool and runs the packaged transfer when the model calls it. */ handoff?: Handoff; + /** 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). */ + hangup?: { reason?: string }; /** Configuration for playing filler audio while tool calls are in progress. Prevents silence during long-running tool executions. */ toolFiller?: false | { /** Filler mode. 'audio' plays a looping audio file. 'backchannel' uses TTS to speak short phrases. */