@absolutejs/voice 0.0.22-beta.547 → 0.0.22-beta.549
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/index.js +10 -0
- package/dist/telephony/twilio.d.ts +8 -0
- package/dist/testing/index.js +10 -0
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -24498,9 +24498,15 @@ var createTwilioMediaStreamBridge = (socket, options) => {
|
|
|
24498
24498
|
const normalizedOnTurn = normalizeOnTurn(options.onTurn);
|
|
24499
24499
|
const route = {
|
|
24500
24500
|
correctTurn: options.correctTurn,
|
|
24501
|
+
onCallEnd: options.onCallEnd,
|
|
24502
|
+
onCallStart: options.onCallStart,
|
|
24501
24503
|
onComplete: options.onComplete,
|
|
24502
24504
|
onError: options.onError,
|
|
24505
|
+
onEscalation: options.onEscalation,
|
|
24506
|
+
onNoAnswer: options.onNoAnswer,
|
|
24503
24507
|
onSession: options.onSession,
|
|
24508
|
+
onTransfer: options.onTransfer,
|
|
24509
|
+
onVoicemail: options.onVoicemail,
|
|
24504
24510
|
onTurn: async (input) => {
|
|
24505
24511
|
bridgeState.reviewRecorder?.recordVoiceMessage({
|
|
24506
24512
|
turn: input.turn,
|
|
@@ -24521,7 +24527,9 @@ var createTwilioMediaStreamBridge = (socket, options) => {
|
|
|
24521
24527
|
sessionHandle = createVoiceSession({
|
|
24522
24528
|
audioConditioning,
|
|
24523
24529
|
context: options.context,
|
|
24530
|
+
costAccountant: options.costAccountant,
|
|
24524
24531
|
costTelemetry: options.costTelemetry,
|
|
24532
|
+
costTelephony: options.costTelephony,
|
|
24525
24533
|
greeting: options.greeting,
|
|
24526
24534
|
id: bridgeState.sessionId,
|
|
24527
24535
|
languageStrategy: options.languageStrategy,
|
|
@@ -24529,6 +24537,7 @@ var createTwilioMediaStreamBridge = (socket, options) => {
|
|
|
24529
24537
|
logger,
|
|
24530
24538
|
phraseHints,
|
|
24531
24539
|
reconnect,
|
|
24540
|
+
recording: options.recording,
|
|
24532
24541
|
route,
|
|
24533
24542
|
scenarioId: bridgeState.scenarioId ?? undefined,
|
|
24534
24543
|
socket: voiceSocket,
|
|
@@ -24536,6 +24545,7 @@ var createTwilioMediaStreamBridge = (socket, options) => {
|
|
|
24536
24545
|
stt: options.stt,
|
|
24537
24546
|
sttFallback: resolveSTTFallbackConfig(options.sttFallback),
|
|
24538
24547
|
sttLifecycle: options.sttLifecycle ?? runtimePreset.sttLifecycle,
|
|
24548
|
+
trace: options.trace,
|
|
24539
24549
|
tts: options.tts,
|
|
24540
24550
|
turnDetection
|
|
24541
24551
|
});
|
|
@@ -107,6 +107,14 @@ export type TwilioMediaStreamBridgeOptions<TContext = unknown, TSession extends
|
|
|
107
107
|
sessionId?: string;
|
|
108
108
|
stt: STTAdapter;
|
|
109
109
|
telephonyMediaCarrier?: "plivo" | "telnyx" | "twilio";
|
|
110
|
+
/** Capture call audio (per-channel) to a recording store. */
|
|
111
|
+
recording?: import("../core/types").VoiceSessionRecordingConfig;
|
|
112
|
+
/** Per-call cost accounting (STT/LLM/TTS) — emits turn.cost/cost.ready traces. */
|
|
113
|
+
costAccountant?: import("../core/costAccounting").VoiceCostAccountant;
|
|
114
|
+
/** Telephony cost provider for the accountant (e.g. "twilio"). */
|
|
115
|
+
costTelephony?: {
|
|
116
|
+
provider?: string;
|
|
117
|
+
};
|
|
110
118
|
};
|
|
111
119
|
export type TwilioMediaStreamBridge = {
|
|
112
120
|
close: (reason?: string) => Promise<void>;
|
package/dist/testing/index.js
CHANGED
|
@@ -13034,9 +13034,15 @@ var createTwilioMediaStreamBridge = (socket, options) => {
|
|
|
13034
13034
|
const normalizedOnTurn = normalizeOnTurn(options.onTurn);
|
|
13035
13035
|
const route = {
|
|
13036
13036
|
correctTurn: options.correctTurn,
|
|
13037
|
+
onCallEnd: options.onCallEnd,
|
|
13038
|
+
onCallStart: options.onCallStart,
|
|
13037
13039
|
onComplete: options.onComplete,
|
|
13038
13040
|
onError: options.onError,
|
|
13041
|
+
onEscalation: options.onEscalation,
|
|
13042
|
+
onNoAnswer: options.onNoAnswer,
|
|
13039
13043
|
onSession: options.onSession,
|
|
13044
|
+
onTransfer: options.onTransfer,
|
|
13045
|
+
onVoicemail: options.onVoicemail,
|
|
13040
13046
|
onTurn: async (input) => {
|
|
13041
13047
|
bridgeState.reviewRecorder?.recordVoiceMessage({
|
|
13042
13048
|
turn: input.turn,
|
|
@@ -13057,7 +13063,9 @@ var createTwilioMediaStreamBridge = (socket, options) => {
|
|
|
13057
13063
|
sessionHandle = createVoiceSession({
|
|
13058
13064
|
audioConditioning,
|
|
13059
13065
|
context: options.context,
|
|
13066
|
+
costAccountant: options.costAccountant,
|
|
13060
13067
|
costTelemetry: options.costTelemetry,
|
|
13068
|
+
costTelephony: options.costTelephony,
|
|
13061
13069
|
greeting: options.greeting,
|
|
13062
13070
|
id: bridgeState.sessionId,
|
|
13063
13071
|
languageStrategy: options.languageStrategy,
|
|
@@ -13065,6 +13073,7 @@ var createTwilioMediaStreamBridge = (socket, options) => {
|
|
|
13065
13073
|
logger,
|
|
13066
13074
|
phraseHints,
|
|
13067
13075
|
reconnect,
|
|
13076
|
+
recording: options.recording,
|
|
13068
13077
|
route,
|
|
13069
13078
|
scenarioId: bridgeState.scenarioId ?? undefined,
|
|
13070
13079
|
socket: voiceSocket,
|
|
@@ -13072,6 +13081,7 @@ var createTwilioMediaStreamBridge = (socket, options) => {
|
|
|
13072
13081
|
stt: options.stt,
|
|
13073
13082
|
sttFallback: resolveSTTFallbackConfig(options.sttFallback),
|
|
13074
13083
|
sttLifecycle: options.sttLifecycle ?? runtimePreset.sttLifecycle,
|
|
13084
|
+
trace: options.trace,
|
|
13075
13085
|
tts: options.tts,
|
|
13076
13086
|
turnDetection
|
|
13077
13087
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@absolutejs/voice",
|
|
3
|
-
"version": "0.0.22-beta.
|
|
3
|
+
"version": "0.0.22-beta.549",
|
|
4
4
|
"description": "Voice primitives and Elysia plugin for AbsoluteJS",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
"author": "Alex Kahn",
|
|
17
17
|
"scripts": {
|
|
18
18
|
"build": "rm -rf dist && bun build ./src/index.ts ./src/client/index.ts ./src/react/index.ts ./src/vue/index.ts ./src/svelte/index.ts ./src/angular/index.ts ./src/testing/index.ts ./src/drizzle/index.ts --outdir dist --target bun --external elysia --external react --external vue --external @angular/core --external @absolutejs/absolute --external @absolutejs/ai --external @absolutejs/media --external drizzle-orm && bun build ./src/client/htmxBootstrap.ts --outdir dist/client --target browser --format esm && bun build ./src/embed/index.ts --outfile dist/embed/voice-widget.js --target browser --format iife --minify && bun build ./src/embed/index.ts --outdir dist/embed --target browser --format esm && tsc --emitDeclarationOnly --project tsconfig.json",
|
|
19
|
+
"config": "absolute config",
|
|
19
20
|
"format": "absolute prettier --write",
|
|
20
21
|
"knip": "knip",
|
|
21
22
|
"lint": "absolute eslint",
|