@absolutejs/voice 0.0.22-beta.3 → 0.0.22-beta.31
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/angular/index.d.ts +1 -0
- package/dist/angular/index.js +172 -2
- package/dist/angular/voice-provider-status.service.d.ts +12 -0
- package/dist/angular/voice-stream.service.d.ts +2 -0
- package/dist/assistant.d.ts +20 -0
- package/dist/assistantHealth.d.ts +81 -0
- package/dist/assistantMemory.d.ts +63 -0
- package/dist/client/actions.d.ts +22 -0
- package/dist/client/connection.d.ts +3 -0
- package/dist/client/htmxBootstrap.js +44 -2
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.js +125 -2
- package/dist/client/providerStatus.d.ts +19 -0
- package/dist/fileStore.d.ts +5 -2
- package/dist/handoff.d.ts +54 -0
- package/dist/handoffHealth.d.ts +94 -0
- package/dist/index.d.ts +20 -4
- package/dist/index.js +2509 -21
- package/dist/modelAdapters.d.ts +93 -0
- package/dist/opsWebhook.d.ts +126 -0
- package/dist/providerHealth.d.ts +78 -0
- package/dist/queue.d.ts +52 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +148 -2
- package/dist/react/useVoiceController.d.ts +2 -0
- package/dist/react/useVoiceProviderStatus.d.ts +8 -0
- package/dist/react/useVoiceStream.d.ts +2 -0
- package/dist/sessionReplay.d.ts +175 -0
- package/dist/svelte/createVoiceProviderStatus.d.ts +8 -0
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +127 -2
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.js +1310 -7
- package/dist/testing/providerSimulator.d.ts +44 -0
- package/dist/trace.d.ts +1 -1
- package/dist/types.d.ts +84 -2
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.js +161 -2
- package/dist/vue/useVoiceProviderStatus.d.ts +9 -0
- package/dist/vue/useVoiceStream.d.ts +2 -0
- package/package.json +1 -1
|
@@ -188,6 +188,12 @@ var serverMessageToAction = (message) => {
|
|
|
188
188
|
sessionId: message.sessionId,
|
|
189
189
|
type: "complete"
|
|
190
190
|
};
|
|
191
|
+
case "call_lifecycle":
|
|
192
|
+
return {
|
|
193
|
+
event: message.event,
|
|
194
|
+
sessionId: message.sessionId,
|
|
195
|
+
type: "call_lifecycle"
|
|
196
|
+
};
|
|
191
197
|
case "error":
|
|
192
198
|
return {
|
|
193
199
|
message: normalizeErrorMessage(message.message),
|
|
@@ -231,7 +237,7 @@ var DEFAULT_SCENARIO_QUERY_PARAM = "scenarioId";
|
|
|
231
237
|
var noop = () => {};
|
|
232
238
|
var noopUnsubscribe = () => noop;
|
|
233
239
|
var NOOP_CONNECTION = {
|
|
234
|
-
|
|
240
|
+
callControl: noop,
|
|
235
241
|
close: noop,
|
|
236
242
|
endTurn: noop,
|
|
237
243
|
getReadyState: () => WS_CLOSED,
|
|
@@ -239,6 +245,7 @@ var NOOP_CONNECTION = {
|
|
|
239
245
|
getSessionId: () => "",
|
|
240
246
|
send: noop,
|
|
241
247
|
sendAudio: noop,
|
|
248
|
+
start: () => {},
|
|
242
249
|
subscribe: noopUnsubscribe
|
|
243
250
|
};
|
|
244
251
|
var createSessionId = () => crypto.randomUUID();
|
|
@@ -260,6 +267,7 @@ var isVoiceServerMessage = (value) => {
|
|
|
260
267
|
switch (value.type) {
|
|
261
268
|
case "audio":
|
|
262
269
|
case "assistant":
|
|
270
|
+
case "call_lifecycle":
|
|
263
271
|
case "complete":
|
|
264
272
|
case "error":
|
|
265
273
|
case "final":
|
|
@@ -400,6 +408,12 @@ var createVoiceConnection = (path, options = {}) => {
|
|
|
400
408
|
const endTurn = () => {
|
|
401
409
|
send({ type: "end_turn" });
|
|
402
410
|
};
|
|
411
|
+
const callControl = (message) => {
|
|
412
|
+
send({
|
|
413
|
+
...message,
|
|
414
|
+
type: "call_control"
|
|
415
|
+
});
|
|
416
|
+
};
|
|
403
417
|
const close = () => {
|
|
404
418
|
clearTimers();
|
|
405
419
|
if (state.ws) {
|
|
@@ -417,7 +431,7 @@ var createVoiceConnection = (path, options = {}) => {
|
|
|
417
431
|
};
|
|
418
432
|
connect();
|
|
419
433
|
return {
|
|
420
|
-
|
|
434
|
+
callControl,
|
|
421
435
|
close,
|
|
422
436
|
endTurn,
|
|
423
437
|
getReadyState: () => state.ws?.readyState ?? WS_CLOSED,
|
|
@@ -425,6 +439,7 @@ var createVoiceConnection = (path, options = {}) => {
|
|
|
425
439
|
getSessionId: () => state.sessionId,
|
|
426
440
|
send,
|
|
427
441
|
sendAudio,
|
|
442
|
+
start,
|
|
428
443
|
subscribe
|
|
429
444
|
};
|
|
430
445
|
};
|
|
@@ -433,6 +448,7 @@ var createVoiceConnection = (path, options = {}) => {
|
|
|
433
448
|
var createInitialState = () => ({
|
|
434
449
|
assistantAudio: [],
|
|
435
450
|
assistantTexts: [],
|
|
451
|
+
call: null,
|
|
436
452
|
error: null,
|
|
437
453
|
isConnected: false,
|
|
438
454
|
scenarioId: null,
|
|
@@ -476,6 +492,20 @@ var createVoiceStreamStore = () => {
|
|
|
476
492
|
status: "completed"
|
|
477
493
|
};
|
|
478
494
|
break;
|
|
495
|
+
case "call_lifecycle":
|
|
496
|
+
state = {
|
|
497
|
+
...state,
|
|
498
|
+
call: {
|
|
499
|
+
...state.call,
|
|
500
|
+
disposition: action.event.type === "end" ? action.event.disposition : state.call?.disposition,
|
|
501
|
+
endedAt: action.event.type === "end" ? action.event.at : state.call?.endedAt,
|
|
502
|
+
events: [...state.call?.events ?? [], action.event],
|
|
503
|
+
lastEventAt: action.event.at,
|
|
504
|
+
startedAt: state.call?.startedAt ?? action.event.at
|
|
505
|
+
},
|
|
506
|
+
sessionId: action.sessionId
|
|
507
|
+
};
|
|
508
|
+
break;
|
|
479
509
|
case "connected":
|
|
480
510
|
state = {
|
|
481
511
|
...state,
|
|
@@ -562,6 +592,9 @@ var createVoiceStream = (path, options = {}) => {
|
|
|
562
592
|
}
|
|
563
593
|
});
|
|
564
594
|
return {
|
|
595
|
+
callControl(message) {
|
|
596
|
+
connection.callControl(message);
|
|
597
|
+
},
|
|
565
598
|
close() {
|
|
566
599
|
unsubscribeConnection();
|
|
567
600
|
connection.close();
|
|
@@ -605,6 +638,9 @@ var createVoiceStream = (path, options = {}) => {
|
|
|
605
638
|
get assistantAudio() {
|
|
606
639
|
return store.getSnapshot().assistantAudio;
|
|
607
640
|
},
|
|
641
|
+
get call() {
|
|
642
|
+
return store.getSnapshot().call;
|
|
643
|
+
},
|
|
608
644
|
sendAudio(audio) {
|
|
609
645
|
connection.sendAudio(audio);
|
|
610
646
|
},
|
|
@@ -900,6 +936,7 @@ var resolveVoiceRuntimePreset = (name = "default") => {
|
|
|
900
936
|
var createInitialState2 = (stream) => ({
|
|
901
937
|
assistantAudio: [...stream.assistantAudio],
|
|
902
938
|
assistantTexts: [...stream.assistantTexts],
|
|
939
|
+
call: stream.call,
|
|
903
940
|
error: stream.error,
|
|
904
941
|
isConnected: stream.isConnected,
|
|
905
942
|
isRecording: false,
|
|
@@ -929,6 +966,7 @@ var createVoiceController = (path, options = {}) => {
|
|
|
929
966
|
...state,
|
|
930
967
|
assistantAudio: [...stream.assistantAudio],
|
|
931
968
|
assistantTexts: [...stream.assistantTexts],
|
|
969
|
+
call: stream.call,
|
|
932
970
|
error: stream.error,
|
|
933
971
|
isConnected: stream.isConnected,
|
|
934
972
|
partial: stream.partial,
|
|
@@ -1006,6 +1044,7 @@ var createVoiceController = (path, options = {}) => {
|
|
|
1006
1044
|
bindHTMX(bindingOptions) {
|
|
1007
1045
|
return bindVoiceHTMX(stream, bindingOptions);
|
|
1008
1046
|
},
|
|
1047
|
+
callControl: (message) => stream.callControl(message),
|
|
1009
1048
|
close,
|
|
1010
1049
|
endTurn: () => stream.endTurn(),
|
|
1011
1050
|
get error() {
|
|
@@ -1058,6 +1097,9 @@ var createVoiceController = (path, options = {}) => {
|
|
|
1058
1097
|
},
|
|
1059
1098
|
get assistantAudio() {
|
|
1060
1099
|
return state.assistantAudio;
|
|
1100
|
+
},
|
|
1101
|
+
get call() {
|
|
1102
|
+
return state.call;
|
|
1061
1103
|
}
|
|
1062
1104
|
};
|
|
1063
1105
|
};
|
package/dist/client/index.d.ts
CHANGED
|
@@ -5,3 +5,5 @@ export { createVoiceController } from './controller';
|
|
|
5
5
|
export { bindVoiceBargeIn, createVoiceDuplexController } from './duplex';
|
|
6
6
|
export { bindVoiceHTMX } from './htmx';
|
|
7
7
|
export { createMicrophoneCapture } from './microphone';
|
|
8
|
+
export { createVoiceProviderStatusStore, fetchVoiceProviderStatus } from './providerStatus';
|
|
9
|
+
export type { VoiceProviderStatusClientOptions, VoiceProviderStatusSnapshot } from './providerStatus';
|
package/dist/client/index.js
CHANGED
|
@@ -80,7 +80,7 @@ var DEFAULT_SCENARIO_QUERY_PARAM = "scenarioId";
|
|
|
80
80
|
var noop = () => {};
|
|
81
81
|
var noopUnsubscribe = () => noop;
|
|
82
82
|
var NOOP_CONNECTION = {
|
|
83
|
-
|
|
83
|
+
callControl: noop,
|
|
84
84
|
close: noop,
|
|
85
85
|
endTurn: noop,
|
|
86
86
|
getReadyState: () => WS_CLOSED,
|
|
@@ -88,6 +88,7 @@ var NOOP_CONNECTION = {
|
|
|
88
88
|
getSessionId: () => "",
|
|
89
89
|
send: noop,
|
|
90
90
|
sendAudio: noop,
|
|
91
|
+
start: () => {},
|
|
91
92
|
subscribe: noopUnsubscribe
|
|
92
93
|
};
|
|
93
94
|
var createSessionId = () => crypto.randomUUID();
|
|
@@ -109,6 +110,7 @@ var isVoiceServerMessage = (value) => {
|
|
|
109
110
|
switch (value.type) {
|
|
110
111
|
case "audio":
|
|
111
112
|
case "assistant":
|
|
113
|
+
case "call_lifecycle":
|
|
112
114
|
case "complete":
|
|
113
115
|
case "error":
|
|
114
116
|
case "final":
|
|
@@ -249,6 +251,12 @@ var createVoiceConnection = (path, options = {}) => {
|
|
|
249
251
|
const endTurn = () => {
|
|
250
252
|
send({ type: "end_turn" });
|
|
251
253
|
};
|
|
254
|
+
const callControl = (message) => {
|
|
255
|
+
send({
|
|
256
|
+
...message,
|
|
257
|
+
type: "call_control"
|
|
258
|
+
});
|
|
259
|
+
};
|
|
252
260
|
const close = () => {
|
|
253
261
|
clearTimers();
|
|
254
262
|
if (state.ws) {
|
|
@@ -266,7 +274,7 @@ var createVoiceConnection = (path, options = {}) => {
|
|
|
266
274
|
};
|
|
267
275
|
connect();
|
|
268
276
|
return {
|
|
269
|
-
|
|
277
|
+
callControl,
|
|
270
278
|
close,
|
|
271
279
|
endTurn,
|
|
272
280
|
getReadyState: () => state.ws?.readyState ?? WS_CLOSED,
|
|
@@ -274,6 +282,7 @@ var createVoiceConnection = (path, options = {}) => {
|
|
|
274
282
|
getSessionId: () => state.sessionId,
|
|
275
283
|
send,
|
|
276
284
|
sendAudio,
|
|
285
|
+
start,
|
|
277
286
|
subscribe
|
|
278
287
|
};
|
|
279
288
|
};
|
|
@@ -671,6 +680,12 @@ var serverMessageToAction = (message) => {
|
|
|
671
680
|
sessionId: message.sessionId,
|
|
672
681
|
type: "complete"
|
|
673
682
|
};
|
|
683
|
+
case "call_lifecycle":
|
|
684
|
+
return {
|
|
685
|
+
event: message.event,
|
|
686
|
+
sessionId: message.sessionId,
|
|
687
|
+
type: "call_lifecycle"
|
|
688
|
+
};
|
|
674
689
|
case "error":
|
|
675
690
|
return {
|
|
676
691
|
message: normalizeErrorMessage(message.message),
|
|
@@ -707,6 +722,7 @@ var serverMessageToAction = (message) => {
|
|
|
707
722
|
var createInitialState2 = () => ({
|
|
708
723
|
assistantAudio: [],
|
|
709
724
|
assistantTexts: [],
|
|
725
|
+
call: null,
|
|
710
726
|
error: null,
|
|
711
727
|
isConnected: false,
|
|
712
728
|
scenarioId: null,
|
|
@@ -750,6 +766,20 @@ var createVoiceStreamStore = () => {
|
|
|
750
766
|
status: "completed"
|
|
751
767
|
};
|
|
752
768
|
break;
|
|
769
|
+
case "call_lifecycle":
|
|
770
|
+
state = {
|
|
771
|
+
...state,
|
|
772
|
+
call: {
|
|
773
|
+
...state.call,
|
|
774
|
+
disposition: action.event.type === "end" ? action.event.disposition : state.call?.disposition,
|
|
775
|
+
endedAt: action.event.type === "end" ? action.event.at : state.call?.endedAt,
|
|
776
|
+
events: [...state.call?.events ?? [], action.event],
|
|
777
|
+
lastEventAt: action.event.at,
|
|
778
|
+
startedAt: state.call?.startedAt ?? action.event.at
|
|
779
|
+
},
|
|
780
|
+
sessionId: action.sessionId
|
|
781
|
+
};
|
|
782
|
+
break;
|
|
753
783
|
case "connected":
|
|
754
784
|
state = {
|
|
755
785
|
...state,
|
|
@@ -836,6 +866,9 @@ var createVoiceStream = (path, options = {}) => {
|
|
|
836
866
|
}
|
|
837
867
|
});
|
|
838
868
|
return {
|
|
869
|
+
callControl(message) {
|
|
870
|
+
connection.callControl(message);
|
|
871
|
+
},
|
|
839
872
|
close() {
|
|
840
873
|
unsubscribeConnection();
|
|
841
874
|
connection.close();
|
|
@@ -879,6 +912,9 @@ var createVoiceStream = (path, options = {}) => {
|
|
|
879
912
|
get assistantAudio() {
|
|
880
913
|
return store.getSnapshot().assistantAudio;
|
|
881
914
|
},
|
|
915
|
+
get call() {
|
|
916
|
+
return store.getSnapshot().call;
|
|
917
|
+
},
|
|
882
918
|
sendAudio(audio) {
|
|
883
919
|
connection.sendAudio(audio);
|
|
884
920
|
},
|
|
@@ -1352,6 +1388,7 @@ var resolveVoiceRuntimePreset = (name = "default") => {
|
|
|
1352
1388
|
var createInitialState3 = (stream) => ({
|
|
1353
1389
|
assistantAudio: [...stream.assistantAudio],
|
|
1354
1390
|
assistantTexts: [...stream.assistantTexts],
|
|
1391
|
+
call: stream.call,
|
|
1355
1392
|
error: stream.error,
|
|
1356
1393
|
isConnected: stream.isConnected,
|
|
1357
1394
|
isRecording: false,
|
|
@@ -1381,6 +1418,7 @@ var createVoiceController = (path, options = {}) => {
|
|
|
1381
1418
|
...state,
|
|
1382
1419
|
assistantAudio: [...stream.assistantAudio],
|
|
1383
1420
|
assistantTexts: [...stream.assistantTexts],
|
|
1421
|
+
call: stream.call,
|
|
1384
1422
|
error: stream.error,
|
|
1385
1423
|
isConnected: stream.isConnected,
|
|
1386
1424
|
partial: stream.partial,
|
|
@@ -1458,6 +1496,7 @@ var createVoiceController = (path, options = {}) => {
|
|
|
1458
1496
|
bindHTMX(bindingOptions) {
|
|
1459
1497
|
return bindVoiceHTMX(stream, bindingOptions);
|
|
1460
1498
|
},
|
|
1499
|
+
callControl: (message) => stream.callControl(message),
|
|
1461
1500
|
close,
|
|
1462
1501
|
endTurn: () => stream.endTurn(),
|
|
1463
1502
|
get error() {
|
|
@@ -1510,6 +1549,9 @@ var createVoiceController = (path, options = {}) => {
|
|
|
1510
1549
|
},
|
|
1511
1550
|
get assistantAudio() {
|
|
1512
1551
|
return state.assistantAudio;
|
|
1552
|
+
},
|
|
1553
|
+
get call() {
|
|
1554
|
+
return state.call;
|
|
1513
1555
|
}
|
|
1514
1556
|
};
|
|
1515
1557
|
};
|
|
@@ -1581,9 +1623,90 @@ var createVoiceDuplexController = (path, options = {}) => {
|
|
|
1581
1623
|
}
|
|
1582
1624
|
};
|
|
1583
1625
|
};
|
|
1626
|
+
// src/client/providerStatus.ts
|
|
1627
|
+
var fetchVoiceProviderStatus = async (path = "/api/provider-status", options = {}) => {
|
|
1628
|
+
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
1629
|
+
const response = await fetchImpl(path);
|
|
1630
|
+
if (!response.ok) {
|
|
1631
|
+
throw new Error(`Voice provider status failed: HTTP ${response.status}`);
|
|
1632
|
+
}
|
|
1633
|
+
return await response.json();
|
|
1634
|
+
};
|
|
1635
|
+
var createVoiceProviderStatusStore = (path = "/api/provider-status", options = {}) => {
|
|
1636
|
+
const listeners = new Set;
|
|
1637
|
+
let closed = false;
|
|
1638
|
+
let timer;
|
|
1639
|
+
let snapshot = {
|
|
1640
|
+
error: null,
|
|
1641
|
+
isLoading: false,
|
|
1642
|
+
providers: []
|
|
1643
|
+
};
|
|
1644
|
+
const emit = () => {
|
|
1645
|
+
for (const listener of listeners) {
|
|
1646
|
+
listener();
|
|
1647
|
+
}
|
|
1648
|
+
};
|
|
1649
|
+
const refresh = async () => {
|
|
1650
|
+
if (closed) {
|
|
1651
|
+
return snapshot.providers;
|
|
1652
|
+
}
|
|
1653
|
+
snapshot = {
|
|
1654
|
+
...snapshot,
|
|
1655
|
+
error: null,
|
|
1656
|
+
isLoading: true
|
|
1657
|
+
};
|
|
1658
|
+
emit();
|
|
1659
|
+
try {
|
|
1660
|
+
const providers = await fetchVoiceProviderStatus(path, options);
|
|
1661
|
+
snapshot = {
|
|
1662
|
+
error: null,
|
|
1663
|
+
isLoading: false,
|
|
1664
|
+
providers,
|
|
1665
|
+
updatedAt: Date.now()
|
|
1666
|
+
};
|
|
1667
|
+
emit();
|
|
1668
|
+
return providers;
|
|
1669
|
+
} catch (error) {
|
|
1670
|
+
snapshot = {
|
|
1671
|
+
...snapshot,
|
|
1672
|
+
error: error instanceof Error ? error.message : String(error),
|
|
1673
|
+
isLoading: false
|
|
1674
|
+
};
|
|
1675
|
+
emit();
|
|
1676
|
+
throw error;
|
|
1677
|
+
}
|
|
1678
|
+
};
|
|
1679
|
+
const close = () => {
|
|
1680
|
+
closed = true;
|
|
1681
|
+
if (timer) {
|
|
1682
|
+
clearInterval(timer);
|
|
1683
|
+
timer = undefined;
|
|
1684
|
+
}
|
|
1685
|
+
listeners.clear();
|
|
1686
|
+
};
|
|
1687
|
+
if (options.intervalMs && options.intervalMs > 0) {
|
|
1688
|
+
timer = setInterval(() => {
|
|
1689
|
+
refresh().catch(() => {});
|
|
1690
|
+
}, options.intervalMs);
|
|
1691
|
+
}
|
|
1692
|
+
return {
|
|
1693
|
+
close,
|
|
1694
|
+
getServerSnapshot: () => snapshot,
|
|
1695
|
+
getSnapshot: () => snapshot,
|
|
1696
|
+
refresh,
|
|
1697
|
+
subscribe: (listener) => {
|
|
1698
|
+
listeners.add(listener);
|
|
1699
|
+
return () => {
|
|
1700
|
+
listeners.delete(listener);
|
|
1701
|
+
};
|
|
1702
|
+
}
|
|
1703
|
+
};
|
|
1704
|
+
};
|
|
1584
1705
|
export {
|
|
1706
|
+
fetchVoiceProviderStatus,
|
|
1585
1707
|
decodeVoiceAudioChunk,
|
|
1586
1708
|
createVoiceStream,
|
|
1709
|
+
createVoiceProviderStatusStore,
|
|
1587
1710
|
createVoiceDuplexController,
|
|
1588
1711
|
createVoiceController,
|
|
1589
1712
|
createVoiceConnection,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { VoiceProviderHealthSummary } from '../providerHealth';
|
|
2
|
+
export type VoiceProviderStatusClientOptions = {
|
|
3
|
+
fetch?: typeof fetch;
|
|
4
|
+
intervalMs?: number;
|
|
5
|
+
};
|
|
6
|
+
export type VoiceProviderStatusSnapshot<TProvider extends string = string> = {
|
|
7
|
+
error: string | null;
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
providers: VoiceProviderHealthSummary<TProvider>[];
|
|
10
|
+
updatedAt?: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const fetchVoiceProviderStatus: <TProvider extends string = string>(path?: string, options?: Pick<VoiceProviderStatusClientOptions, "fetch">) => Promise<VoiceProviderHealthSummary<TProvider>[]>;
|
|
13
|
+
export declare const createVoiceProviderStatusStore: <TProvider extends string = string>(path?: string, options?: VoiceProviderStatusClientOptions) => {
|
|
14
|
+
close: () => void;
|
|
15
|
+
getServerSnapshot: () => VoiceProviderStatusSnapshot<TProvider>;
|
|
16
|
+
getSnapshot: () => VoiceProviderStatusSnapshot<TProvider>;
|
|
17
|
+
refresh: () => Promise<VoiceProviderHealthSummary<TProvider>[]>;
|
|
18
|
+
subscribe: (listener: () => void) => () => void;
|
|
19
|
+
};
|
package/dist/fileStore.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type VoiceAssistantMemoryRecord, type VoiceAssistantMemoryStore } from './assistantMemory';
|
|
1
2
|
import { type StoredVoiceTraceEvent, type VoiceTraceSinkDeliveryRecord, type VoiceTraceSinkDeliveryStore, type VoiceTraceEventStore } from './trace';
|
|
2
3
|
import type { StoredVoiceIntegrationEvent, StoredVoiceExternalObjectMap, StoredVoiceOpsTask, VoiceExternalObjectMap, VoiceExternalObjectMapStore, VoiceIntegrationEvent, VoiceIntegrationEventStore, VoiceOpsTask, VoiceOpsTaskStore } from './ops';
|
|
3
4
|
import type { StoredVoiceCallReviewArtifact, VoiceCallReviewArtifact, VoiceCallReviewStore } from './testing/review';
|
|
@@ -6,9 +7,10 @@ export type VoiceFileStoreOptions = {
|
|
|
6
7
|
directory: string;
|
|
7
8
|
pretty?: boolean;
|
|
8
9
|
};
|
|
9
|
-
export type VoiceFileRuntimeStorage<TSession extends VoiceSessionRecord = VoiceSessionRecord, TReview extends StoredVoiceCallReviewArtifact = StoredVoiceCallReviewArtifact, TTask extends StoredVoiceOpsTask = StoredVoiceOpsTask, TEvent extends StoredVoiceIntegrationEvent = StoredVoiceIntegrationEvent, TMapping extends StoredVoiceExternalObjectMap = StoredVoiceExternalObjectMap, TTrace extends StoredVoiceTraceEvent = StoredVoiceTraceEvent, TTraceDelivery extends VoiceTraceSinkDeliveryRecord = VoiceTraceSinkDeliveryRecord> = {
|
|
10
|
+
export type VoiceFileRuntimeStorage<TSession extends VoiceSessionRecord = VoiceSessionRecord, TReview extends StoredVoiceCallReviewArtifact = StoredVoiceCallReviewArtifact, TTask extends StoredVoiceOpsTask = StoredVoiceOpsTask, TEvent extends StoredVoiceIntegrationEvent = StoredVoiceIntegrationEvent, TMapping extends StoredVoiceExternalObjectMap = StoredVoiceExternalObjectMap, TTrace extends StoredVoiceTraceEvent = StoredVoiceTraceEvent, TTraceDelivery extends VoiceTraceSinkDeliveryRecord = VoiceTraceSinkDeliveryRecord, TMemory extends VoiceAssistantMemoryRecord = VoiceAssistantMemoryRecord> = {
|
|
10
11
|
events: VoiceIntegrationEventStore<TEvent>;
|
|
11
12
|
externalObjects: VoiceExternalObjectMapStore<TMapping>;
|
|
13
|
+
memories: VoiceAssistantMemoryStore<TMemory>;
|
|
12
14
|
reviews: VoiceCallReviewStore<TReview>;
|
|
13
15
|
session: VoiceSessionStore<TSession>;
|
|
14
16
|
tasks: VoiceOpsTaskStore<TTask>;
|
|
@@ -22,7 +24,8 @@ export declare const createVoiceFileIntegrationEventStore: <TEvent extends Store
|
|
|
22
24
|
export declare const createVoiceFileExternalObjectMapStore: <TMapping extends StoredVoiceExternalObjectMap = StoredVoiceExternalObjectMap>(options: VoiceFileStoreOptions) => VoiceExternalObjectMapStore<TMapping>;
|
|
23
25
|
export declare const createVoiceFileTraceEventStore: <TEvent extends StoredVoiceTraceEvent = StoredVoiceTraceEvent>(options: VoiceFileStoreOptions) => VoiceTraceEventStore<TEvent>;
|
|
24
26
|
export declare const createVoiceFileTraceSinkDeliveryStore: <TDelivery extends VoiceTraceSinkDeliveryRecord = VoiceTraceSinkDeliveryRecord>(options: VoiceFileStoreOptions) => VoiceTraceSinkDeliveryStore<TDelivery>;
|
|
25
|
-
export declare const
|
|
27
|
+
export declare const createVoiceFileAssistantMemoryStore: <TRecord extends VoiceAssistantMemoryRecord = VoiceAssistantMemoryRecord>(options: VoiceFileStoreOptions) => VoiceAssistantMemoryStore<TRecord>;
|
|
28
|
+
export declare const createVoiceFileRuntimeStorage: <TSession extends VoiceSessionRecord = VoiceSessionRecord, TReview extends StoredVoiceCallReviewArtifact = StoredVoiceCallReviewArtifact, TTask extends StoredVoiceOpsTask = StoredVoiceOpsTask, TEvent extends StoredVoiceIntegrationEvent = StoredVoiceIntegrationEvent, TMapping extends StoredVoiceExternalObjectMap = StoredVoiceExternalObjectMap, TTrace extends StoredVoiceTraceEvent = StoredVoiceTraceEvent, TTraceDelivery extends VoiceTraceSinkDeliveryRecord = VoiceTraceSinkDeliveryRecord, TMemory extends VoiceAssistantMemoryRecord = VoiceAssistantMemoryRecord>(options: VoiceFileStoreOptions) => VoiceFileRuntimeStorage<TSession, TReview, TTask, TEvent, TMapping, TTrace, TTraceDelivery, TMemory>;
|
|
26
29
|
export declare const createStoredVoiceCallReviewArtifact: <TArtifact extends VoiceCallReviewArtifact = VoiceCallReviewArtifact>(id: string, artifact: TArtifact) => TArtifact & {
|
|
27
30
|
id: string;
|
|
28
31
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { VoiceHandoffAction, VoiceHandoffAdapter, VoiceHandoffConfig, VoiceHandoffDeliveryStore, VoiceHandoffInput, VoiceHandoffResult, VoiceSessionRecord, StoredVoiceHandoffDelivery } from './types';
|
|
2
|
+
type MaybePromise<T> = T | Promise<T>;
|
|
3
|
+
export type VoiceHandoffDelivery = VoiceHandoffResult & {
|
|
4
|
+
adapterId: string;
|
|
5
|
+
adapterKind?: string;
|
|
6
|
+
};
|
|
7
|
+
export type VoiceHandoffDeliveryRecord<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = StoredVoiceHandoffDelivery<TContext, TSession, TResult>;
|
|
8
|
+
export type VoiceHandoffFanoutResult = {
|
|
9
|
+
action: VoiceHandoffAction;
|
|
10
|
+
deliveries: Record<string, VoiceHandoffDelivery>;
|
|
11
|
+
status: VoiceHandoffResult['status'];
|
|
12
|
+
};
|
|
13
|
+
export type VoiceHandoffDeliveryRecordInput<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = Omit<VoiceHandoffInput<TContext, TSession, TResult>, 'api'> & {
|
|
14
|
+
id?: string;
|
|
15
|
+
};
|
|
16
|
+
export type VoiceQueuedHandoffDeliveryOptions<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
17
|
+
adapters: VoiceHandoffAdapter<TContext, TSession, TResult>[];
|
|
18
|
+
api: VoiceHandoffInput<TContext, TSession, TResult>['api'];
|
|
19
|
+
delivery: VoiceHandoffDeliveryRecord<TContext, TSession, TResult>;
|
|
20
|
+
failMode?: VoiceHandoffConfig<TContext, TSession, TResult>['failMode'];
|
|
21
|
+
};
|
|
22
|
+
export type VoiceWebhookHandoffAdapterOptions<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
23
|
+
actions?: VoiceHandoffAction[];
|
|
24
|
+
body?: (input: VoiceHandoffInput<TContext, TSession, TResult>) => MaybePromise<Record<string, unknown>>;
|
|
25
|
+
fetch?: typeof fetch;
|
|
26
|
+
headers?: Record<string, string>;
|
|
27
|
+
id: string;
|
|
28
|
+
kind?: string;
|
|
29
|
+
method?: 'POST' | 'PUT' | 'PATCH';
|
|
30
|
+
signingSecret?: string;
|
|
31
|
+
timeoutMs?: number;
|
|
32
|
+
url: string;
|
|
33
|
+
};
|
|
34
|
+
export type VoiceTwilioRedirectHandoffAdapterOptions<TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown> = {
|
|
35
|
+
accountSid: string;
|
|
36
|
+
actions?: VoiceHandoffAction[];
|
|
37
|
+
authToken: string;
|
|
38
|
+
buildTwiML?: (input: VoiceHandoffInput<TContext, TSession, TResult>) => MaybePromise<string>;
|
|
39
|
+
callSid?: string | ((input: VoiceHandoffInput<TContext, TSession, TResult>) => MaybePromise<string | undefined>);
|
|
40
|
+
fetch?: typeof fetch;
|
|
41
|
+
id?: string;
|
|
42
|
+
timeoutMs?: number;
|
|
43
|
+
};
|
|
44
|
+
export declare const deliverVoiceHandoff: <TContext, TSession extends VoiceSessionRecord, TResult>(input: {
|
|
45
|
+
config?: VoiceHandoffConfig<TContext, TSession, TResult>;
|
|
46
|
+
handoff: VoiceHandoffInput<TContext, TSession, TResult>;
|
|
47
|
+
}) => Promise<VoiceHandoffFanoutResult | undefined>;
|
|
48
|
+
export declare const createVoiceHandoffDeliveryRecord: <TContext, TSession extends VoiceSessionRecord, TResult>(input: VoiceHandoffDeliveryRecordInput<TContext, TSession, TResult>) => VoiceHandoffDeliveryRecord<TContext, TSession, TResult>;
|
|
49
|
+
export declare const applyVoiceHandoffDeliveryResult: <TContext, TSession extends VoiceSessionRecord, TResult>(delivery: VoiceHandoffDeliveryRecord<TContext, TSession, TResult>, result: VoiceHandoffFanoutResult) => VoiceHandoffDeliveryRecord<TContext, TSession, TResult>;
|
|
50
|
+
export declare const deliverVoiceHandoffDelivery: <TContext, TSession extends VoiceSessionRecord, TResult>(options: VoiceQueuedHandoffDeliveryOptions<TContext, TSession, TResult>) => Promise<VoiceHandoffDeliveryRecord<TContext, TSession, TResult>>;
|
|
51
|
+
export declare const createVoiceMemoryHandoffDeliveryStore: <TDelivery extends VoiceHandoffDeliveryRecord = VoiceHandoffDeliveryRecord>() => VoiceHandoffDeliveryStore<TDelivery>;
|
|
52
|
+
export declare const createVoiceWebhookHandoffAdapter: <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown>(options: VoiceWebhookHandoffAdapterOptions<TContext, TSession, TResult>) => VoiceHandoffAdapter<TContext, TSession, TResult>;
|
|
53
|
+
export declare const createVoiceTwilioRedirectHandoffAdapter: <TContext = unknown, TSession extends VoiceSessionRecord = VoiceSessionRecord, TResult = unknown>(options: VoiceTwilioRedirectHandoffAdapterOptions<TContext, TSession, TResult>) => VoiceHandoffAdapter<TContext, TSession, TResult>;
|
|
54
|
+
export {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import type { StoredVoiceTraceEvent, VoiceTraceEventStore } from './trace';
|
|
3
|
+
export type VoiceHandoffHealthStatus = 'delivered' | 'failed' | 'skipped';
|
|
4
|
+
export type VoiceHandoffHealthDelivery = {
|
|
5
|
+
adapterId: string;
|
|
6
|
+
adapterKind?: string;
|
|
7
|
+
deliveredAt?: number;
|
|
8
|
+
deliveredTo?: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
status: VoiceHandoffHealthStatus;
|
|
11
|
+
};
|
|
12
|
+
export type VoiceHandoffHealthEvent = {
|
|
13
|
+
action?: string;
|
|
14
|
+
at: number;
|
|
15
|
+
deliveries: VoiceHandoffHealthDelivery[];
|
|
16
|
+
reason?: string;
|
|
17
|
+
replayHref?: string;
|
|
18
|
+
sessionId: string;
|
|
19
|
+
status: VoiceHandoffHealthStatus;
|
|
20
|
+
target?: string;
|
|
21
|
+
};
|
|
22
|
+
export type VoiceHandoffHealthSummary = {
|
|
23
|
+
byAction: Record<string, number>;
|
|
24
|
+
byAdapter: Record<string, Record<VoiceHandoffHealthStatus, number>>;
|
|
25
|
+
byStatus: Record<VoiceHandoffHealthStatus, number>;
|
|
26
|
+
events: VoiceHandoffHealthEvent[];
|
|
27
|
+
failed: number;
|
|
28
|
+
total: number;
|
|
29
|
+
};
|
|
30
|
+
export type VoiceHandoffHealthSummaryOptions = {
|
|
31
|
+
events?: StoredVoiceTraceEvent[];
|
|
32
|
+
limit?: number;
|
|
33
|
+
q?: string;
|
|
34
|
+
replayHref?: false | string | ((event: Omit<VoiceHandoffHealthEvent, 'replayHref'>) => string);
|
|
35
|
+
status?: VoiceHandoffHealthStatus | 'all';
|
|
36
|
+
store?: VoiceTraceEventStore;
|
|
37
|
+
};
|
|
38
|
+
export type VoiceHandoffHealthHTMLHandlerOptions = VoiceHandoffHealthSummaryOptions & {
|
|
39
|
+
headers?: HeadersInit;
|
|
40
|
+
render?: (summary: VoiceHandoffHealthSummary) => string | Promise<string>;
|
|
41
|
+
};
|
|
42
|
+
export type VoiceHandoffHealthRoutesOptions = VoiceHandoffHealthHTMLHandlerOptions & {
|
|
43
|
+
htmlPath?: false | string;
|
|
44
|
+
name?: string;
|
|
45
|
+
path?: string;
|
|
46
|
+
};
|
|
47
|
+
export declare const summarizeVoiceHandoffHealth: (options?: VoiceHandoffHealthSummaryOptions) => Promise<VoiceHandoffHealthSummary>;
|
|
48
|
+
export declare const renderVoiceHandoffHealthHTML: (summary: VoiceHandoffHealthSummary) => string;
|
|
49
|
+
export declare const createVoiceHandoffHealthJSONHandler: (options?: VoiceHandoffHealthSummaryOptions) => ({ query }: {
|
|
50
|
+
query?: Record<string, string | undefined>;
|
|
51
|
+
}) => Promise<VoiceHandoffHealthSummary>;
|
|
52
|
+
export declare const createVoiceHandoffHealthHTMLHandler: (options?: VoiceHandoffHealthHTMLHandlerOptions) => ({ query }: {
|
|
53
|
+
query?: Record<string, string | undefined>;
|
|
54
|
+
}) => Promise<Response>;
|
|
55
|
+
export declare const createVoiceHandoffHealthRoutes: (options?: VoiceHandoffHealthRoutesOptions) => Elysia<"", {
|
|
56
|
+
decorator: {};
|
|
57
|
+
store: {};
|
|
58
|
+
derive: {};
|
|
59
|
+
resolve: {};
|
|
60
|
+
}, {
|
|
61
|
+
typebox: {};
|
|
62
|
+
error: {};
|
|
63
|
+
}, {
|
|
64
|
+
schema: {};
|
|
65
|
+
standaloneSchema: {};
|
|
66
|
+
macro: {};
|
|
67
|
+
macroFn: {};
|
|
68
|
+
parser: {};
|
|
69
|
+
response: {};
|
|
70
|
+
}, {
|
|
71
|
+
[x: string]: {
|
|
72
|
+
get: {
|
|
73
|
+
body: unknown;
|
|
74
|
+
params: {};
|
|
75
|
+
query: unknown;
|
|
76
|
+
headers: unknown;
|
|
77
|
+
response: {
|
|
78
|
+
200: VoiceHandoffHealthSummary;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
}, {
|
|
83
|
+
derive: {};
|
|
84
|
+
resolve: {};
|
|
85
|
+
schema: {};
|
|
86
|
+
standaloneSchema: {};
|
|
87
|
+
response: {};
|
|
88
|
+
}, {
|
|
89
|
+
derive: {};
|
|
90
|
+
resolve: {};
|
|
91
|
+
schema: {};
|
|
92
|
+
standaloneSchema: {};
|
|
93
|
+
response: {};
|
|
94
|
+
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
export { voice } from './plugin';
|
|
2
2
|
export { createVoiceAssistant, createVoiceExperiment, summarizeVoiceAssistantRuns } from './assistant';
|
|
3
|
+
export { createVoiceAssistantHealthHTMLHandler, createVoiceAssistantHealthJSONHandler, createVoiceAssistantHealthRoutes, renderVoiceAssistantHealthHTML, summarizeVoiceAssistantHealth } from './assistantHealth';
|
|
4
|
+
export { createVoiceSessionListRoutes, createVoiceSessionReplayHTMLHandler, createVoiceSessionReplayJSONHandler, createVoiceSessionReplayRoutes, createVoiceSessionsHTMLHandler, createVoiceSessionsJSONHandler, renderVoiceSessionsHTML, summarizeVoiceSessions, summarizeVoiceSessionReplay } from './sessionReplay';
|
|
3
5
|
export { createVoiceAgent, createVoiceAgentSquad, createVoiceAgentTool } from './agent';
|
|
4
|
-
export { createStoredVoiceCallReviewArtifact, createStoredVoiceExternalObjectMap, createStoredVoiceIntegrationEvent, createStoredVoiceOpsTask, createVoiceFileExternalObjectMapStore, createVoiceFileIntegrationEventStore, createVoiceFileReviewStore, createVoiceFileRuntimeStorage, createVoiceFileSessionStore, createVoiceFileTaskStore, createVoiceFileTraceSinkDeliveryStore, createVoiceFileTraceEventStore } from './fileStore';
|
|
6
|
+
export { createStoredVoiceCallReviewArtifact, createStoredVoiceExternalObjectMap, createStoredVoiceIntegrationEvent, createStoredVoiceOpsTask, createVoiceFileExternalObjectMapStore, createVoiceFileAssistantMemoryStore, createVoiceFileIntegrationEventStore, createVoiceFileReviewStore, createVoiceFileRuntimeStorage, createVoiceFileSessionStore, createVoiceFileTaskStore, createVoiceFileTraceSinkDeliveryStore, createVoiceFileTraceEventStore } from './fileStore';
|
|
7
|
+
export { createVoiceAssistantMemoryHandle, createVoiceAssistantMemoryRecord, createVoiceMemoryAssistantMemoryStore, resolveVoiceAssistantMemoryNamespace } from './assistantMemory';
|
|
8
|
+
export { createAnthropicVoiceAssistantModel, createGeminiVoiceAssistantModel, createJSONVoiceAssistantModel, createOpenAIVoiceAssistantModel, createVoiceProviderRouter } from './modelAdapters';
|
|
9
|
+
export { createVoiceProviderHealthHTMLHandler, createVoiceProviderHealthJSONHandler, createVoiceProviderHealthRoutes, renderVoiceProviderHealthHTML, summarizeVoiceProviderHealth } from './providerHealth';
|
|
5
10
|
export { buildVoiceTraceReplay, createVoiceMemoryTraceSinkDeliveryStore, createVoiceTraceHTTPSink, createVoiceMemoryTraceEventStore, createVoiceTraceSinkDeliveryId, createVoiceTraceSinkDeliveryRecord, createVoiceTraceSinkStore, createVoiceTraceEvent, createVoiceTraceEventId, deliverVoiceTraceEventsToSinks, evaluateVoiceTrace, exportVoiceTrace, filterVoiceTraceEvents, pruneVoiceTraceEvents, redactVoiceTraceEvent, redactVoiceTraceEvents, redactVoiceTraceText, renderVoiceTraceHTML, renderVoiceTraceMarkdown, resolveVoiceTraceRedactionOptions, selectVoiceTraceEventsForPrune, summarizeVoiceTrace } from './trace';
|
|
6
11
|
export { createVoiceSQLiteExternalObjectMapStore, createVoiceSQLiteIntegrationEventStore, createVoiceSQLiteReviewStore, createVoiceSQLiteRuntimeStorage, createVoiceSQLiteSessionStore, createVoiceSQLiteTaskStore, createVoiceSQLiteTraceSinkDeliveryStore, createVoiceSQLiteTraceEventStore } from './sqliteStore';
|
|
7
12
|
export { createVoicePostgresExternalObjectMapStore, createVoicePostgresIntegrationEventStore, createVoicePostgresReviewStore, createVoicePostgresRuntimeStorage, createVoicePostgresSessionStore, createVoicePostgresTaskStore, createVoicePostgresTraceSinkDeliveryStore, createVoicePostgresTraceEventStore } from './postgresStore';
|
|
8
13
|
export { createVoiceS3ReviewStore } from './s3Store';
|
|
9
14
|
export { createVoiceMemoryStore } from './memoryStore';
|
|
10
15
|
export { createVoiceCRMActivitySink, createVoiceHelpdeskTicketSink, createVoiceIntegrationHTTPSink, createVoiceHubSpotTaskSink, createVoiceHubSpotTaskSyncSinks, createVoiceHubSpotTaskUpdateSink, createVoiceLinearIssueSink, createVoiceLinearIssueSyncSinks, createVoiceLinearIssueUpdateSink, createVoiceZendeskTicketSink, createVoiceZendeskTicketSyncSinks, createVoiceZendeskTicketUpdateSink, deliverVoiceIntegrationEventToSinks } from './opsSinks';
|
|
11
|
-
export {
|
|
16
|
+
export { createVoiceOpsWebhookEnvelope, createVoiceOpsWebhookReceiverRoutes, createVoiceOpsWebhookSink, verifyVoiceOpsWebhookSignature } from './opsWebhook';
|
|
17
|
+
export { applyVoiceHandoffDeliveryResult, createVoiceHandoffDeliveryRecord, createVoiceMemoryHandoffDeliveryStore, createVoiceTwilioRedirectHandoffAdapter, createVoiceWebhookHandoffAdapter, deliverVoiceHandoff, deliverVoiceHandoffDelivery } from './handoff';
|
|
18
|
+
export { createVoiceHandoffHealthHTMLHandler, createVoiceHandoffHealthJSONHandler, createVoiceHandoffHealthRoutes, renderVoiceHandoffHealthHTML, summarizeVoiceHandoffHealth } from './handoffHealth';
|
|
19
|
+
export { createVoiceHandoffDeliveryWorker, createVoiceHandoffDeliveryWorkerLoop, createVoiceIntegrationSinkWorker, createVoiceIntegrationSinkWorkerLoop, createVoiceOpsTaskWorker, createVoiceOpsTaskProcessorWorker, createVoiceOpsTaskProcessorWorkerLoop, createVoiceRedisIdempotencyStore, createVoiceRedisTaskLeaseCoordinator, createVoiceTraceSinkDeliveryWorker, createVoiceTraceSinkDeliveryWorkerLoop, createVoiceWebhookDeliveryWorker, createVoiceWebhookDeliveryWorkerLoop, summarizeVoiceHandoffDeliveries, summarizeVoiceTraceSinkDeliveries, summarizeVoiceOpsTaskQueue, summarizeVoiceIntegrationEvents } from './queue';
|
|
12
20
|
export { assignVoiceOpsTask, applyVoiceOpsTaskAssignmentRule, applyVoiceOpsTaskPolicy, buildVoiceOpsTaskFromReview, buildVoiceOpsTaskFromSLABreach, claimVoiceOpsTask, completeVoiceOpsTask, createVoiceExternalObjectMap, createVoiceExternalObjectMapId, createVoiceCallCompletedEvent, createVoiceTaskSLABreachedEvent, deadLetterVoiceOpsTask, deliverVoiceIntegrationEvent, failVoiceOpsTask, hasVoiceOpsTaskSLABreach, heartbeatVoiceOpsTask, isVoiceOpsTaskOverdue, markVoiceOpsTaskSLABreached, matchesVoiceOpsTaskAssignmentRule, resolveVoiceOpsTaskAgeBucket, createVoiceIntegrationEvent, createVoiceReviewSavedEvent, resolveVoiceOpsTaskAssignment, resolveVoiceOpsTaskPolicy, requeueVoiceOpsTask, createVoiceTaskCreatedEvent, createVoiceTaskUpdatedEvent, listVoiceOpsTasks, reopenVoiceOpsTask, startVoiceOpsTask, summarizeVoiceOpsTaskAnalytics, summarizeVoiceOpsTasks, withVoiceIntegrationEventId, withVoiceOpsTaskId } from './ops';
|
|
13
21
|
export { createVoiceSession } from './session';
|
|
14
22
|
export { createVoiceCallReviewFromSession, recordVoiceRuntimeOps } from './runtimeOps';
|
|
@@ -22,17 +30,25 @@ export { conditionAudioChunk, resolveAudioConditioningConfig } from './audioCond
|
|
|
22
30
|
export { resolveVoiceRuntimePreset } from './presets';
|
|
23
31
|
export { resolveTurnDetectionConfig, TURN_PROFILE_DEFAULTS } from './turnProfiles';
|
|
24
32
|
export { createVoiceCallReviewFromLiveTelephonyReport, createVoiceCallReviewRecorder, renderVoiceCallReviewHTML, renderVoiceCallReviewMarkdown } from './testing/review';
|
|
25
|
-
export type { VoiceAssistant, VoiceAssistantArtifactPlan, VoiceAssistantExperiment, VoiceAssistantExperimentOptions, VoiceAssistantGuardrailInput, VoiceAssistantGuardrails, VoiceAssistantOptions, VoiceAssistantOutputGuardrailInput, VoiceAssistantPreset, VoiceAssistantRunsSummary, VoiceAssistantRunSummary, VoiceAssistantVariant } from './assistant';
|
|
33
|
+
export type { VoiceAssistant, VoiceAssistantArtifactPlan, VoiceAssistantExperiment, VoiceAssistantExperimentOptions, VoiceAssistantGuardrailInput, VoiceAssistantGuardrails, VoiceAssistantMemoryLifecycle, VoiceAssistantMemoryLifecycleInput, VoiceAssistantOptions, VoiceAssistantOutputGuardrailInput, VoiceAssistantPreset, VoiceAssistantRunsSummary, VoiceAssistantRunSummary, VoiceAssistantVariant } from './assistant';
|
|
34
|
+
export type { VoiceAssistantHealthFailure, VoiceAssistantHealthHTMLHandlerOptions, VoiceAssistantHealthRoutesOptions, VoiceAssistantHealthSummary, VoiceAssistantHealthSummaryOptions } from './assistantHealth';
|
|
35
|
+
export type { VoiceAssistantMemoryBinding, VoiceAssistantMemoryHandle, VoiceAssistantMemoryOptions, VoiceAssistantMemoryRecord, VoiceAssistantMemoryStore } from './assistantMemory';
|
|
36
|
+
export type { VoiceSessionListHTMLHandlerOptions, VoiceSessionListItem, VoiceSessionListOptions, VoiceSessionListRoutesOptions, VoiceSessionListStatus, VoiceSessionReplay, VoiceSessionReplayHTMLHandlerOptions, VoiceSessionReplayOptions, VoiceSessionReplayRoutesOptions, VoiceSessionReplayTurn } from './sessionReplay';
|
|
37
|
+
export type { AnthropicVoiceAssistantModelOptions, GeminiVoiceAssistantModelOptions, OpenAIVoiceAssistantModelOptions, VoiceProviderRouterEvent, VoiceProviderRouterFallbackMode, VoiceProviderRouterHealthOptions, VoiceProviderRouterOptions, VoiceProviderRouterPolicy, VoiceProviderRouterProviderHealth, VoiceProviderRouterProviderProfile, VoiceJSONAssistantModelHandler, VoiceJSONAssistantModelOptions } from './modelAdapters';
|
|
38
|
+
export type { VoiceProviderHealthStatus, VoiceProviderHealthSummary, VoiceProviderHealthSummaryOptions } from './providerHealth';
|
|
26
39
|
export type { VoiceAgent, VoiceAgentMessage, VoiceAgentMessageRole, VoiceAgentModel, VoiceAgentModelInput, VoiceAgentModelOutput, VoiceAgentOptions, VoiceAgentRunResult, VoiceAgentSquadOptions, VoiceAgentTool, VoiceAgentToolCall, VoiceAgentToolResult } from './agent';
|
|
27
40
|
export type { VoiceOpsRuntime, VoiceOpsRuntimeConfig, VoiceOpsRuntimeSummary, VoiceOpsRuntimeSinkWorkerConfig, VoiceOpsRuntimeTaskWorkerConfig, VoiceOpsRuntimeTickResult, VoiceOpsRuntimeWebhookWorkerConfig } from './opsRuntime';
|
|
28
41
|
export type { VoiceOpsPresetName, VoiceOpsPresetOverrides, VoiceResolvedOpsPreset } from './opsPresets';
|
|
29
42
|
export type { VoiceOutcomeRecipe, VoiceOutcomeRecipeName, VoiceOutcomeRecipeOptions } from './outcomeRecipes';
|
|
30
43
|
export type { VoiceCRMActivitySinkOptions, VoiceHubSpotTaskSinkOptions, VoiceHubSpotTaskUpdateSinkOptions, VoiceHelpdeskTicketSinkOptions, VoiceIntegrationHTTPSinkOptions, VoiceIntegrationSink, VoiceIntegrationSinkDeliveryResult, VoiceLinearIssueSinkOptions, VoiceLinearIssueUpdateSinkOptions, VoiceZendeskTicketSinkOptions, VoiceZendeskTicketUpdateSinkOptions } from './opsSinks';
|
|
44
|
+
export type { VoiceOpsWebhookEnvelope, VoiceOpsWebhookEntity, VoiceOpsWebhookLinkResolver, VoiceOpsWebhookReceiverRoutesOptions, VoiceOpsWebhookSinkOptions, VoiceOpsWebhookVerificationResult } from './opsWebhook';
|
|
45
|
+
export type { VoiceHandoffDelivery, VoiceHandoffDeliveryRecord, VoiceHandoffDeliveryRecordInput, VoiceHandoffFanoutResult, VoiceQueuedHandoffDeliveryOptions, VoiceTwilioRedirectHandoffAdapterOptions, VoiceWebhookHandoffAdapterOptions } from './handoff';
|
|
46
|
+
export type { VoiceHandoffHealthDelivery, VoiceHandoffHealthEvent, VoiceHandoffHealthHTMLHandlerOptions, VoiceHandoffHealthRoutesOptions, VoiceHandoffHealthStatus, VoiceHandoffHealthSummary, VoiceHandoffHealthSummaryOptions } from './handoffHealth';
|
|
31
47
|
export type { StoredVoiceCallReviewArtifact, VoiceCallReviewArtifact, VoiceCallReviewConfig, VoiceCallReviewPostCallSummary, VoiceCallReviewRecorder, VoiceCallReviewRecorderOptions, VoiceCallReviewStore, VoiceCallReviewSummary, VoiceCallReviewTimelineEvent } from './testing/review';
|
|
32
48
|
export type { VoiceFileRuntimeStorage, VoiceFileStoreOptions } from './fileStore';
|
|
33
49
|
export type { StoredVoiceTraceEvent, VoiceTraceEvaluation, VoiceTraceEvaluationOptions, VoiceTraceEvent, VoiceTraceEventFilter, VoiceTraceEventStore, VoiceTraceEventType, VoiceTraceIssue, VoiceTraceIssueSeverity, VoiceTraceHTTPSinkOptions, VoiceTracePruneFilter, VoiceTracePruneOptions, VoiceTracePruneResult, VoiceTraceRedactionConfig, VoiceTraceRedactionOptions, VoiceTraceRedactionReplacement, VoiceResolvedTraceRedactionOptions, VoiceTraceSink, VoiceTraceSinkDeliveryQueueStatus, VoiceTraceSinkDeliveryRecord, VoiceTraceSinkDeliveryResult, VoiceTraceSinkDeliveryStatus, VoiceTraceSinkDeliveryStore, VoiceTraceSinkFanoutResult, VoiceTraceSinkStoreOptions, VoiceTraceSummary } from './trace';
|
|
34
50
|
export type { VoicePostgresClient, VoicePostgresRuntimeStorage, VoicePostgresStoreOptions } from './postgresStore';
|
|
35
|
-
export type { VoiceOpsTaskLease, VoiceOpsTaskWorker, VoiceOpsTaskWorkerOptions, VoiceIdempotencyStore, VoiceIntegrationEventQueueSummary, VoiceIntegrationSinkWorkerLoop, VoiceIntegrationSinkWorkerLoopOptions, VoiceIntegrationSinkWorkerOptions, VoiceIntegrationSinkWorkerResult, VoiceRedisIdempotencyClient, VoiceRedisIdempotencyStoreOptions, VoiceRedisTaskLeaseClient, VoiceRedisTaskLeaseCoordinator, VoiceRedisTaskLeaseCoordinatorOptions, VoiceTraceSinkDeliveryQueueSummary, VoiceTraceSinkDeliveryWorkerLoop, VoiceTraceSinkDeliveryWorkerLoopOptions, VoiceTraceSinkDeliveryWorkerOptions, VoiceTraceSinkDeliveryWorkerResult, VoiceOpsTaskClaimFilters, VoiceWebhookDeliveryWorkerLoop, VoiceWebhookDeliveryWorkerLoopOptions, VoiceWebhookDeliveryWorkerOptions, VoiceWebhookDeliveryWorkerResult, VoiceOpsTaskProcessorWorkerLoop, VoiceOpsTaskProcessorWorkerLoopOptions, VoiceOpsTaskProcessorWorkerOptions, VoiceOpsTaskProcessorWorkerResult, VoiceOpsTaskQueueSummary } from './queue';
|
|
51
|
+
export type { VoiceOpsTaskLease, VoiceOpsTaskWorker, VoiceOpsTaskWorkerOptions, VoiceHandoffDeliveryQueueSummary, VoiceHandoffDeliveryWorkerLoop, VoiceHandoffDeliveryWorkerLoopOptions, VoiceHandoffDeliveryWorkerOptions, VoiceHandoffDeliveryWorkerResult, VoiceIdempotencyStore, VoiceIntegrationEventQueueSummary, VoiceIntegrationSinkWorkerLoop, VoiceIntegrationSinkWorkerLoopOptions, VoiceIntegrationSinkWorkerOptions, VoiceIntegrationSinkWorkerResult, VoiceRedisIdempotencyClient, VoiceRedisIdempotencyStoreOptions, VoiceRedisTaskLeaseClient, VoiceRedisTaskLeaseCoordinator, VoiceRedisTaskLeaseCoordinatorOptions, VoiceTraceSinkDeliveryQueueSummary, VoiceTraceSinkDeliveryWorkerLoop, VoiceTraceSinkDeliveryWorkerLoopOptions, VoiceTraceSinkDeliveryWorkerOptions, VoiceTraceSinkDeliveryWorkerResult, VoiceOpsTaskClaimFilters, VoiceWebhookDeliveryWorkerLoop, VoiceWebhookDeliveryWorkerLoopOptions, VoiceWebhookDeliveryWorkerOptions, VoiceWebhookDeliveryWorkerResult, VoiceOpsTaskProcessorWorkerLoop, VoiceOpsTaskProcessorWorkerLoopOptions, VoiceOpsTaskProcessorWorkerOptions, VoiceOpsTaskProcessorWorkerResult, VoiceOpsTaskQueueSummary } from './queue';
|
|
36
52
|
export type { VoiceS3ReviewStoreClient, VoiceS3ReviewStoreFile, VoiceS3ReviewStoreOptions } from './s3Store';
|
|
37
53
|
export type { VoiceSQLiteRuntimeStorage, VoiceSQLiteStoreOptions } from './sqliteStore';
|
|
38
54
|
export type { StoredVoiceIntegrationEvent, StoredVoiceExternalObjectMap, StoredVoiceOpsTask, VoiceExternalObjectMap, VoiceExternalObjectMapStore, VoiceOpsTaskAgeBucket, VoiceOpsTaskAnalyticsOptions, VoiceOpsTaskAnalyticsSummary, VoiceOpsTaskAssignmentRule, VoiceOpsTaskAssignmentRuleCondition, VoiceOpsTaskAssignmentRules, VoiceOpsTaskAssigneeAnalytics, VoiceOpsDispositionTaskPolicies, VoiceOpsSLABreachPolicy, VoiceIntegrationDeliveryStatus, VoiceIntegrationEvent, VoiceIntegrationEventStore, VoiceIntegrationSinkDelivery, VoiceIntegrationEventType, VoiceIntegrationWebhookConfig, VoiceOpsTask, VoiceOpsTaskHistoryEntry, VoiceOpsTaskKind, VoiceOpsTaskPolicy, VoiceOpsTaskPriority, VoiceOpsTaskStatus, VoiceOpsTaskStore, VoiceOpsTaskSummary, VoiceOpsTaskWorkerAnalytics } from './ops';
|