@jambonz/sdk 0.1.5 → 0.1.6
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/client/index.d.cts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/index.cjs +78 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +78 -7
- package/dist/index.js.map +1 -1
- package/dist/{rest-BF9HKZrA.d.ts → rest-Ct1hlTMi.d.ts} +1 -1
- package/dist/{rest-v8weIueZ.d.cts → rest-CtGvvaaV.d.cts} +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/{verb-builder-DkHAJrk4.d.cts → verb-builder-BJalSF8p.d.cts} +15 -1
- package/dist/{verb-builder-Dg_IPC4I.d.ts → verb-builder-CclNap8d.d.ts} +15 -1
- package/dist/{verbs-fjJjfGEt.d.cts → verbs-boTMgOLb.d.cts} +83 -9
- package/dist/{verbs-fjJjfGEt.d.ts → verbs-boTMgOLb.d.ts} +83 -9
- package/dist/webhook/index.cjs +36 -0
- package/dist/webhook/index.cjs.map +1 -1
- package/dist/webhook/index.d.cts +2 -2
- package/dist/webhook/index.d.ts +2 -2
- package/dist/webhook/index.js +36 -0
- package/dist/webhook/index.js.map +1 -1
- package/dist/websocket/index.cjs +78 -7
- package/dist/websocket/index.cjs.map +1 -1
- package/dist/websocket/index.d.cts +17 -3
- package/dist/websocket/index.d.ts +17 -3
- package/dist/websocket/index.js +78 -7
- package/dist/websocket/index.js.map +1 -1
- package/package.json +2 -2
- package/schema/components/llm-base.schema.json +94 -0
- package/schema/jambonz-app.schema.json +8 -2
- package/schema/verbs/deepgram_s2s.schema.json +22 -0
- package/schema/verbs/dialogflow.schema.json +120 -0
- package/schema/verbs/elevenlabs_s2s.schema.json +22 -0
- package/schema/verbs/google_s2s.schema.json +23 -0
- package/schema/verbs/llm.schema.json +1 -101
- package/schema/verbs/openai_s2s.schema.json +23 -0
- package/schema/verbs/pipeline.schema.json +2 -1
- package/schema/verbs/s2s.schema.json +26 -0
- package/schema/verbs/stream.schema.json +2 -1
- package/schema/verbs/ultravox_s2s.schema.json +22 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/dialogflow",
|
|
4
|
+
"title": "Dialogflow",
|
|
5
|
+
"description": "Connects the caller to a Google Dialogflow agent for a voice conversation. Supports Dialogflow ES, CX, and CES models. The caller speaks and Dialogflow handles intent detection and response generation.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"verb": {
|
|
9
|
+
"const": "dialogflow",
|
|
10
|
+
"description": "The verb name."
|
|
11
|
+
},
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "An optional unique identifier for this verb instance."
|
|
15
|
+
},
|
|
16
|
+
"credentials": {
|
|
17
|
+
"oneOf": [
|
|
18
|
+
{ "type": "object", "additionalProperties": true },
|
|
19
|
+
{ "type": "string" }
|
|
20
|
+
],
|
|
21
|
+
"description": "Google service account credentials as a JSON object or stringified JSON."
|
|
22
|
+
},
|
|
23
|
+
"project": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "The Google Cloud project ID."
|
|
26
|
+
},
|
|
27
|
+
"agent": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "The Dialogflow agent ID. Required for CX agents."
|
|
30
|
+
},
|
|
31
|
+
"environment": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "The Dialogflow environment to use."
|
|
34
|
+
},
|
|
35
|
+
"region": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "The Google Cloud region for the Dialogflow API endpoint."
|
|
38
|
+
},
|
|
39
|
+
"model": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": ["es", "cx", "ces"],
|
|
42
|
+
"description": "The Dialogflow model type: 'es' for Dialogflow ES, 'cx' for Dialogflow CX, 'ces' for Dialogflow CES."
|
|
43
|
+
},
|
|
44
|
+
"lang": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "The language code for the conversation (e.g. 'en-US')."
|
|
47
|
+
},
|
|
48
|
+
"actionHook": {
|
|
49
|
+
"$ref": "../components/actionHook",
|
|
50
|
+
"description": "A webhook invoked when the Dialogflow session ends."
|
|
51
|
+
},
|
|
52
|
+
"eventHook": {
|
|
53
|
+
"$ref": "../components/actionHook",
|
|
54
|
+
"description": "A webhook invoked for Dialogflow events during the conversation."
|
|
55
|
+
},
|
|
56
|
+
"events": {
|
|
57
|
+
"type": "array",
|
|
58
|
+
"items": { "type": "string" },
|
|
59
|
+
"description": "List of event types to receive via the eventHook."
|
|
60
|
+
},
|
|
61
|
+
"welcomeEvent": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"description": "A Dialogflow event to trigger at the start of the conversation (e.g. 'welcome')."
|
|
64
|
+
},
|
|
65
|
+
"welcomeEventParams": {
|
|
66
|
+
"type": "object",
|
|
67
|
+
"description": "Parameters to pass with the welcome event.",
|
|
68
|
+
"additionalProperties": true
|
|
69
|
+
},
|
|
70
|
+
"noInputTimeout": {
|
|
71
|
+
"type": "number",
|
|
72
|
+
"description": "Seconds to wait for caller input before triggering the no-input event."
|
|
73
|
+
},
|
|
74
|
+
"noInputEvent": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "Dialogflow event to trigger when no input is received within the timeout."
|
|
77
|
+
},
|
|
78
|
+
"passDtmfAsTextInput": {
|
|
79
|
+
"type": "boolean",
|
|
80
|
+
"description": "If true, pass DTMF digits to Dialogflow as text input."
|
|
81
|
+
},
|
|
82
|
+
"thinkingMusic": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"description": "URL of an audio file to play while waiting for Dialogflow to respond."
|
|
85
|
+
},
|
|
86
|
+
"tts": {
|
|
87
|
+
"$ref": "../components/synthesizer",
|
|
88
|
+
"description": "TTS configuration for Dialogflow responses."
|
|
89
|
+
},
|
|
90
|
+
"bargein": {
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"description": "If true, allow the caller to interrupt Dialogflow responses with speech."
|
|
93
|
+
},
|
|
94
|
+
"queryInput": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"description": "Initial query input to send to Dialogflow.",
|
|
97
|
+
"properties": {
|
|
98
|
+
"text": { "type": "string", "description": "Text input." },
|
|
99
|
+
"intent": { "type": "string", "description": "Intent to trigger." },
|
|
100
|
+
"event": { "type": "string", "description": "Event to trigger." },
|
|
101
|
+
"dtmf": { "type": "string", "description": "DTMF input." }
|
|
102
|
+
},
|
|
103
|
+
"additionalProperties": false
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"required": ["project", "credentials", "lang"],
|
|
107
|
+
"examples": [
|
|
108
|
+
{
|
|
109
|
+
"verb": "dialogflow",
|
|
110
|
+
"project": "my-gcp-project",
|
|
111
|
+
"credentials": "{\"type\": \"service_account\", \"project_id\": \"my-gcp-project\"}",
|
|
112
|
+
"lang": "en-US",
|
|
113
|
+
"model": "cx",
|
|
114
|
+
"agent": "my-agent-id",
|
|
115
|
+
"welcomeEvent": "welcome",
|
|
116
|
+
"actionHook": "/dialogflow-action",
|
|
117
|
+
"eventHook": "/dialogflow-event"
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/elevenlabs_s2s",
|
|
4
|
+
"title": "ElevenLabs S2S",
|
|
5
|
+
"description": "Shortcut for 'llm' with vendor automatically set to 'elevenlabs'. Connects the caller to an ElevenLabs model for real-time speech-to-speech voice conversation.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"allOf": [{ "$ref": "../components/llm-base" }],
|
|
8
|
+
"properties": {
|
|
9
|
+
"verb": { "const": "elevenlabs_s2s", "description": "The verb name." },
|
|
10
|
+
"vendor": { "type": "string", "const": "elevenlabs", "description": "The LLM vendor (always 'elevenlabs' for this shortcut)." }
|
|
11
|
+
},
|
|
12
|
+
"required": ["llmOptions"],
|
|
13
|
+
"examples": [
|
|
14
|
+
{
|
|
15
|
+
"verb": "elevenlabs_s2s",
|
|
16
|
+
"llmOptions": {
|
|
17
|
+
"messages": [{ "role": "system", "content": "You are a helpful voice assistant." }]
|
|
18
|
+
},
|
|
19
|
+
"actionHook": "/s2s-complete"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/google_s2s",
|
|
4
|
+
"title": "Google S2S",
|
|
5
|
+
"description": "Shortcut for 'llm' with vendor automatically set to 'google'. Connects the caller to a Google model for real-time speech-to-speech voice conversation.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"allOf": [{ "$ref": "../components/llm-base" }],
|
|
8
|
+
"properties": {
|
|
9
|
+
"verb": { "const": "google_s2s", "description": "The verb name." },
|
|
10
|
+
"vendor": { "type": "string", "const": "google", "description": "The LLM vendor (always 'google' for this shortcut)." }
|
|
11
|
+
},
|
|
12
|
+
"required": ["llmOptions"],
|
|
13
|
+
"examples": [
|
|
14
|
+
{
|
|
15
|
+
"verb": "google_s2s",
|
|
16
|
+
"model": "gemini-2.0-flash",
|
|
17
|
+
"llmOptions": {
|
|
18
|
+
"messages": [{ "role": "system", "content": "You are a helpful voice assistant." }]
|
|
19
|
+
},
|
|
20
|
+
"actionHook": "/s2s-complete"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -4,111 +4,11 @@
|
|
|
4
4
|
"title": "LLM",
|
|
5
5
|
"description": "Connects the caller to a large language model for a real-time voice conversation. Handles the complete STT → LLM → TTS pipeline, including turn detection, interruption handling, and tool/function calling. The caller speaks naturally and the LLM responds via synthesized speech. This is the primary verb for building AI voice agents on jambonz.",
|
|
6
6
|
"type": "object",
|
|
7
|
+
"allOf": [{ "$ref": "../components/llm-base" }],
|
|
7
8
|
"properties": {
|
|
8
9
|
"verb": {
|
|
9
10
|
"const": "llm",
|
|
10
11
|
"description": "The verb name."
|
|
11
|
-
},
|
|
12
|
-
"id": {
|
|
13
|
-
"type": "string",
|
|
14
|
-
"description": "An optional unique identifier for this verb instance."
|
|
15
|
-
},
|
|
16
|
-
"vendor": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"description": "The LLM vendor to use.",
|
|
19
|
-
"examples": ["openai", "anthropic", "google", "groq", "deepseek", "deepgram", "ultravox", "custom"]
|
|
20
|
-
},
|
|
21
|
-
"model": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"description": "The specific model to use from the vendor.",
|
|
24
|
-
"examples": ["gpt-4o", "claude-sonnet-4-20250514", "gemini-2.0-flash"]
|
|
25
|
-
},
|
|
26
|
-
"auth": {
|
|
27
|
-
"type": "object",
|
|
28
|
-
"description": "Authentication credentials for the LLM vendor API.",
|
|
29
|
-
"properties": {
|
|
30
|
-
"apiKey": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"description": "The API key for the LLM vendor."
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"additionalProperties": true
|
|
36
|
-
},
|
|
37
|
-
"connectOptions": {
|
|
38
|
-
"type": "object",
|
|
39
|
-
"description": "Additional connection options for the LLM vendor, such as custom base URLs or API versions.",
|
|
40
|
-
"additionalProperties": true
|
|
41
|
-
},
|
|
42
|
-
"llmOptions": {
|
|
43
|
-
"type": "object",
|
|
44
|
-
"description": "Configuration passed to the LLM including the system prompt, temperature, tools/functions, and other model parameters. The structure varies by vendor but typically includes 'messages' (conversation history), 'temperature', 'tools' (function definitions), and 'maxTokens'.",
|
|
45
|
-
"additionalProperties": true,
|
|
46
|
-
"examples": [
|
|
47
|
-
{
|
|
48
|
-
"messages": [
|
|
49
|
-
{ "role": "system", "content": "You are a helpful customer service agent for Acme Corp." }
|
|
50
|
-
],
|
|
51
|
-
"temperature": 0.7,
|
|
52
|
-
"tools": [
|
|
53
|
-
{
|
|
54
|
-
"type": "function",
|
|
55
|
-
"function": {
|
|
56
|
-
"name": "lookupOrder",
|
|
57
|
-
"description": "Look up an order by order number",
|
|
58
|
-
"parameters": {
|
|
59
|
-
"type": "object",
|
|
60
|
-
"properties": {
|
|
61
|
-
"orderNumber": { "type": "string" }
|
|
62
|
-
},
|
|
63
|
-
"required": ["orderNumber"]
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
]
|
|
68
|
-
}
|
|
69
|
-
]
|
|
70
|
-
},
|
|
71
|
-
"mcpServers": {
|
|
72
|
-
"type": "array",
|
|
73
|
-
"items": {
|
|
74
|
-
"type": "object",
|
|
75
|
-
"properties": {
|
|
76
|
-
"url": {
|
|
77
|
-
"type": "string",
|
|
78
|
-
"format": "uri",
|
|
79
|
-
"description": "The URL of the MCP server."
|
|
80
|
-
},
|
|
81
|
-
"auth": {
|
|
82
|
-
"type": "object",
|
|
83
|
-
"description": "Authentication for the MCP server.",
|
|
84
|
-
"additionalProperties": true
|
|
85
|
-
},
|
|
86
|
-
"roots": {
|
|
87
|
-
"type": "array",
|
|
88
|
-
"items": { "type": "object" },
|
|
89
|
-
"description": "MCP root definitions."
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
"required": ["url"]
|
|
93
|
-
},
|
|
94
|
-
"description": "Model Context Protocol servers to connect to. MCP servers provide tools that the LLM can invoke during the conversation."
|
|
95
|
-
},
|
|
96
|
-
"actionHook": {
|
|
97
|
-
"$ref": "../components/actionHook",
|
|
98
|
-
"description": "A webhook invoked when the LLM conversation ends. Receives conversation details and should return the next verbs to execute."
|
|
99
|
-
},
|
|
100
|
-
"eventHook": {
|
|
101
|
-
"$ref": "../components/actionHook",
|
|
102
|
-
"description": "A webhook invoked for real-time events during the LLM conversation (e.g. tool calls, transcription events)."
|
|
103
|
-
},
|
|
104
|
-
"toolHook": {
|
|
105
|
-
"$ref": "../components/actionHook",
|
|
106
|
-
"description": "A webhook invoked when the LLM calls a tool/function. Receives the tool name and arguments, and should return the tool result."
|
|
107
|
-
},
|
|
108
|
-
"events": {
|
|
109
|
-
"type": "array",
|
|
110
|
-
"items": { "type": "string" },
|
|
111
|
-
"description": "List of event types to receive via the eventHook."
|
|
112
12
|
}
|
|
113
13
|
},
|
|
114
14
|
"required": ["vendor", "llmOptions"],
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/openai_s2s",
|
|
4
|
+
"title": "OpenAI S2S",
|
|
5
|
+
"description": "Shortcut for 'llm' with vendor automatically set to 'openai'. Connects the caller to an OpenAI model for real-time speech-to-speech voice conversation.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"allOf": [{ "$ref": "../components/llm-base" }],
|
|
8
|
+
"properties": {
|
|
9
|
+
"verb": { "const": "openai_s2s", "description": "The verb name." },
|
|
10
|
+
"vendor": { "type": "string", "const": "openai", "description": "The LLM vendor (always 'openai' for this shortcut)." }
|
|
11
|
+
},
|
|
12
|
+
"required": ["llmOptions"],
|
|
13
|
+
"examples": [
|
|
14
|
+
{
|
|
15
|
+
"verb": "openai_s2s",
|
|
16
|
+
"model": "gpt-4o-realtime",
|
|
17
|
+
"llmOptions": {
|
|
18
|
+
"messages": [{ "role": "system", "content": "You are a helpful voice assistant." }]
|
|
19
|
+
},
|
|
20
|
+
"actionHook": "/s2s-complete"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
"description": "If true, establish the LLM connection before the call starts to reduce latency on the first interaction."
|
|
40
40
|
},
|
|
41
41
|
"actionHook": { "$ref": "../components/actionHook", "description": "A webhook invoked when the pipeline ends." },
|
|
42
|
-
"eventHook": { "$ref": "../components/actionHook", "description": "A webhook invoked for pipeline events." }
|
|
42
|
+
"eventHook": { "$ref": "../components/actionHook", "description": "A webhook invoked for pipeline events." },
|
|
43
|
+
"toolHook": { "$ref": "../components/actionHook", "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." }
|
|
43
44
|
},
|
|
44
45
|
"required": ["stt", "llm", "tts"],
|
|
45
46
|
"examples": [
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/s2s",
|
|
4
|
+
"title": "S2S",
|
|
5
|
+
"description": "Synonym for 'llm'. Connects the caller to a large language model for a real-time speech-to-speech voice conversation. Requires 'vendor' to be specified explicitly.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"allOf": [{ "$ref": "../components/llm-base" }],
|
|
8
|
+
"properties": {
|
|
9
|
+
"verb": {
|
|
10
|
+
"const": "s2s",
|
|
11
|
+
"description": "The verb name."
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"required": ["vendor", "llmOptions"],
|
|
15
|
+
"examples": [
|
|
16
|
+
{
|
|
17
|
+
"verb": "s2s",
|
|
18
|
+
"vendor": "openai",
|
|
19
|
+
"model": "gpt-4o-realtime",
|
|
20
|
+
"llmOptions": {
|
|
21
|
+
"messages": [{ "role": "system", "content": "You are a helpful voice assistant." }]
|
|
22
|
+
},
|
|
23
|
+
"actionHook": "/s2s-complete"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"bidirectionalAudio": { "$ref": "../components/bidirectionalAudio", "description": "Bidirectional audio configuration." },
|
|
22
22
|
"timeout": { "type": "number", "description": "Inactivity timeout in seconds." },
|
|
23
23
|
"transcribe": { "$ref": "transcribe", "description": "Nested transcribe verb — enables simultaneous real-time transcription of the streamed audio." },
|
|
24
|
-
"earlyMedia": { "type": "boolean", "description": "Stream audio before the call is answered." }
|
|
24
|
+
"earlyMedia": { "type": "boolean", "description": "Stream audio before the call is answered." },
|
|
25
|
+
"channel": { "type": "number", "description": "Specific audio channel to stream. Used when streaming a single channel of a multi-channel call." }
|
|
25
26
|
},
|
|
26
27
|
"required": ["url"],
|
|
27
28
|
"examples": [
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/ultravox_s2s",
|
|
4
|
+
"title": "Ultravox S2S",
|
|
5
|
+
"description": "Shortcut for 'llm' with vendor automatically set to 'ultravox'. Connects the caller to an Ultravox model for real-time speech-to-speech voice conversation.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"allOf": [{ "$ref": "../components/llm-base" }],
|
|
8
|
+
"properties": {
|
|
9
|
+
"verb": { "const": "ultravox_s2s", "description": "The verb name." },
|
|
10
|
+
"vendor": { "type": "string", "const": "ultravox", "description": "The LLM vendor (always 'ultravox' for this shortcut)." }
|
|
11
|
+
},
|
|
12
|
+
"required": ["llmOptions"],
|
|
13
|
+
"examples": [
|
|
14
|
+
{
|
|
15
|
+
"verb": "ultravox_s2s",
|
|
16
|
+
"llmOptions": {
|
|
17
|
+
"messages": [{ "role": "system", "content": "You are a helpful voice assistant." }]
|
|
18
|
+
},
|
|
19
|
+
"actionHook": "/s2s-complete"
|
|
20
|
+
}
|
|
21
|
+
]
|
|
22
|
+
}
|