@jambonz/sdk 0.1.5 → 0.1.7
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 +63 -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
package/dist/client/index.d.cts
CHANGED
|
@@ -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-
|
|
2
|
-
import { A as ActionHook, y as Verb } from '../verbs-
|
|
1
|
+
import { b as CreateCallRequest, L as ListCallsFilter, a as CallInfo, C as CallCount, U as UpdateCallRequest, Q as QueueInfo } from '../rest-CtGvvaaV.cjs';
|
|
2
|
+
import { A as ActionHook, y as Verb } from '../verbs-boTMgOLb.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* JambonzClient — REST API client for the jambonz platform.
|
package/dist/client/index.d.ts
CHANGED
|
@@ -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-
|
|
2
|
-
import { A as ActionHook, y as Verb } from '../verbs-
|
|
1
|
+
import { b as CreateCallRequest, L as ListCallsFilter, a as CallInfo, C as CallCount, U as UpdateCallRequest, Q as QueueInfo } from '../rest-Ct1hlTMi.js';
|
|
2
|
+
import { A as ActionHook, y as Verb } from '../verbs-boTMgOLb.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* JambonzClient — REST API client for the jambonz platform.
|
package/dist/index.cjs
CHANGED
|
@@ -41,6 +41,7 @@ var COMPONENT_SCHEMAS = [
|
|
|
41
41
|
"recognizer-sonioxOptions",
|
|
42
42
|
"recognizer-speechmaticsOptions",
|
|
43
43
|
"recognizer-verbioOptions",
|
|
44
|
+
"llm-base",
|
|
44
45
|
"synthesizer",
|
|
45
46
|
"target",
|
|
46
47
|
"vad"
|
|
@@ -56,6 +57,13 @@ var VERB_SCHEMAS = [
|
|
|
56
57
|
"listen",
|
|
57
58
|
"stream",
|
|
58
59
|
"llm",
|
|
60
|
+
"s2s",
|
|
61
|
+
"openai_s2s",
|
|
62
|
+
"google_s2s",
|
|
63
|
+
"elevenlabs_s2s",
|
|
64
|
+
"deepgram_s2s",
|
|
65
|
+
"ultravox_s2s",
|
|
66
|
+
"dialogflow",
|
|
59
67
|
"pipeline",
|
|
60
68
|
"conference",
|
|
61
69
|
"transcribe",
|
|
@@ -181,6 +189,34 @@ var VerbBuilder = class {
|
|
|
181
189
|
llm(opts) {
|
|
182
190
|
return this.addVerb({ verb: "llm", ...opts });
|
|
183
191
|
}
|
|
192
|
+
/** Synonym for {@link llm}. Requires vendor to be specified. */
|
|
193
|
+
s2s(opts) {
|
|
194
|
+
return this.addVerb({ verb: "s2s", ...opts });
|
|
195
|
+
}
|
|
196
|
+
/** Shortcut for s2s with vendor='openai'. */
|
|
197
|
+
openai_s2s(opts) {
|
|
198
|
+
return this.addVerb({ verb: "openai_s2s", ...opts });
|
|
199
|
+
}
|
|
200
|
+
/** Shortcut for s2s with vendor='google'. */
|
|
201
|
+
google_s2s(opts) {
|
|
202
|
+
return this.addVerb({ verb: "google_s2s", ...opts });
|
|
203
|
+
}
|
|
204
|
+
/** Shortcut for s2s with vendor='elevenlabs'. */
|
|
205
|
+
elevenlabs_s2s(opts) {
|
|
206
|
+
return this.addVerb({ verb: "elevenlabs_s2s", ...opts });
|
|
207
|
+
}
|
|
208
|
+
/** Shortcut for s2s with vendor='deepgram'. */
|
|
209
|
+
deepgram_s2s(opts) {
|
|
210
|
+
return this.addVerb({ verb: "deepgram_s2s", ...opts });
|
|
211
|
+
}
|
|
212
|
+
/** Shortcut for s2s with vendor='ultravox'. */
|
|
213
|
+
ultravox_s2s(opts) {
|
|
214
|
+
return this.addVerb({ verb: "ultravox_s2s", ...opts });
|
|
215
|
+
}
|
|
216
|
+
/** Connect the caller to a Google Dialogflow agent (ES, CX, or CES). */
|
|
217
|
+
dialogflow(opts) {
|
|
218
|
+
return this.addVerb({ verb: "dialogflow", ...opts });
|
|
219
|
+
}
|
|
184
220
|
/** Voice AI pipeline with integrated turn detection. */
|
|
185
221
|
pipeline(opts) {
|
|
186
222
|
return this.addVerb({ verb: "pipeline", ...opts });
|
|
@@ -458,11 +494,46 @@ var Session = class extends events.EventEmitter {
|
|
|
458
494
|
this.builder.gather(opts);
|
|
459
495
|
return this;
|
|
460
496
|
}
|
|
461
|
-
/** Connect the caller to an LLM for real-time voice conversation. */
|
|
497
|
+
/** Connect the caller to an LLM for real-time voice conversation (deprecated — use vendor shortcuts). */
|
|
462
498
|
llm(opts) {
|
|
463
499
|
this.builder.llm(opts);
|
|
464
500
|
return this;
|
|
465
501
|
}
|
|
502
|
+
/** Connect the caller to a speech-to-speech LLM. */
|
|
503
|
+
s2s(opts) {
|
|
504
|
+
this.builder.s2s(opts);
|
|
505
|
+
return this;
|
|
506
|
+
}
|
|
507
|
+
/** Shortcut for s2s with vendor='openai'. */
|
|
508
|
+
openai_s2s(opts) {
|
|
509
|
+
this.builder.openai_s2s(opts);
|
|
510
|
+
return this;
|
|
511
|
+
}
|
|
512
|
+
/** Shortcut for s2s with vendor='google'. */
|
|
513
|
+
google_s2s(opts) {
|
|
514
|
+
this.builder.google_s2s(opts);
|
|
515
|
+
return this;
|
|
516
|
+
}
|
|
517
|
+
/** Shortcut for s2s with vendor='elevenlabs'. */
|
|
518
|
+
elevenlabs_s2s(opts) {
|
|
519
|
+
this.builder.elevenlabs_s2s(opts);
|
|
520
|
+
return this;
|
|
521
|
+
}
|
|
522
|
+
/** Shortcut for s2s with vendor='deepgram'. */
|
|
523
|
+
deepgram_s2s(opts) {
|
|
524
|
+
this.builder.deepgram_s2s(opts);
|
|
525
|
+
return this;
|
|
526
|
+
}
|
|
527
|
+
/** Shortcut for s2s with vendor='ultravox'. */
|
|
528
|
+
ultravox_s2s(opts) {
|
|
529
|
+
this.builder.ultravox_s2s(opts);
|
|
530
|
+
return this;
|
|
531
|
+
}
|
|
532
|
+
/** Connect the caller to a Google Dialogflow agent. */
|
|
533
|
+
dialogflow(opts) {
|
|
534
|
+
this.builder.dialogflow(opts);
|
|
535
|
+
return this;
|
|
536
|
+
}
|
|
466
537
|
/** Voice AI pipeline with integrated turn detection. */
|
|
467
538
|
pipeline(opts) {
|
|
468
539
|
this.builder.pipeline(opts);
|
|
@@ -687,10 +758,12 @@ var Session = class extends events.EventEmitter {
|
|
|
687
758
|
}
|
|
688
759
|
/** Send tool output to an active LLM conversation. */
|
|
689
760
|
sendToolOutput(toolCallId, data) {
|
|
761
|
+
const payload = typeof data === "object" && data !== null ? data : { result: data };
|
|
690
762
|
this.wsSend({
|
|
691
763
|
type: "command",
|
|
692
|
-
command: "llm:tool-
|
|
693
|
-
|
|
764
|
+
command: "llm:tool-output",
|
|
765
|
+
tool_call_id: toolCallId,
|
|
766
|
+
data: payload
|
|
694
767
|
});
|
|
695
768
|
}
|
|
696
769
|
/** Update an active LLM conversation. */
|
|
@@ -1074,10 +1147,8 @@ var WsRouter = class {
|
|
|
1074
1147
|
var WS_PROTOCOL = "ws.jambonz.org";
|
|
1075
1148
|
var AUDIO_PROTOCOL = "audio.drachtio.org";
|
|
1076
1149
|
var defaultLogger = {
|
|
1077
|
-
info: () =>
|
|
1078
|
-
|
|
1079
|
-
error: () => {
|
|
1080
|
-
},
|
|
1150
|
+
info: (...args) => console.log(...args),
|
|
1151
|
+
error: (...args) => console.error(...args),
|
|
1081
1152
|
debug: () => {
|
|
1082
1153
|
}
|
|
1083
1154
|
};
|