@absolutejs/voice 0.0.22-beta.163 → 0.0.22-beta.164
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.d.ts +2 -0
- package/dist/index.js +67 -0
- package/dist/providerStackRecommendations.d.ts +18 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export { assertVoiceProviderRoutingContract, runVoiceProviderRoutingContract } f
|
|
|
46
46
|
export { createVoicePhoneAgentProductionSmokeHTMLHandler, createVoicePhoneAgentProductionSmokeJSONHandler, createVoicePhoneAgentProductionSmokeRoutes, renderVoicePhoneAgentProductionSmokeHTML, runVoicePhoneAgentProductionSmokeContract } from './phoneAgentProductionSmoke';
|
|
47
47
|
export { buildVoiceProductionReadinessGate, buildVoiceProductionReadinessReport, createVoiceProductionReadinessRoutes, renderVoiceProductionReadinessHTML, summarizeVoiceProductionReadinessGate } from './productionReadiness';
|
|
48
48
|
export { createVoiceReadinessProfile, recommendVoiceReadinessProfile } from './readinessProfiles';
|
|
49
|
+
export { recommendVoiceProviderStack } from './providerStackRecommendations';
|
|
49
50
|
export { buildVoiceOpsConsoleReport, createVoiceOpsConsoleRoutes, renderVoiceOpsConsoleHTML } from './opsConsoleRoutes';
|
|
50
51
|
export { summarizeVoiceOpsStatus } from './opsStatus';
|
|
51
52
|
export { createVoiceOpsStatusRoutes, renderVoiceOpsStatusHTML } from './opsStatusRoutes';
|
|
@@ -105,6 +106,7 @@ export type { VoiceOpsConsoleLink, VoiceOpsConsoleReport, VoiceOpsConsoleRoutesO
|
|
|
105
106
|
export type { VoiceOpsStatus, VoiceOpsStatusLink, VoiceOpsStatusOptions, VoiceOpsStatusReport, VoiceOpsStatusRoutesOptions } from './opsStatus';
|
|
106
107
|
export type { VoiceProductionReadinessAction, VoiceProductionReadinessAuditOptions, VoiceProductionReadinessAuditRequirement, VoiceProductionReadinessAuditSummary, VoiceProductionReadinessCheck, VoiceProductionReadinessGateIssue, VoiceProductionReadinessGateOptions, VoiceProductionReadinessGateProfile, VoiceProductionReadinessGateProfileSurface, VoiceProductionReadinessGateReport, VoiceProductionReadinessOpsActionHistoryOptions, VoiceProductionReadinessOpsActionHistorySummary, VoiceProductionReadinessProfileExplanation, VoiceProductionReadinessProfileSurface, VoiceProductionReadinessProofSource, VoiceProductionReadinessReport, VoiceProductionReadinessRoutesOptions, VoiceProductionReadinessTraceDeliverySummary, VoiceProductionReadinessAuditDeliveryOptions, VoiceProductionReadinessAuditDeliverySummary, VoiceProductionReadinessTraceDeliveryOptions, VoiceProductionReadinessStatus } from './productionReadiness';
|
|
107
108
|
export type { VoiceReadinessProfileName, VoiceReadinessProfileOptions, VoiceReadinessProfileRecommendation, VoiceReadinessProfileRecommendationScore, VoiceReadinessProfileRoutesOptions } from './readinessProfiles';
|
|
109
|
+
export type { VoiceProviderStackChoice, VoiceProviderStackInput, VoiceProviderStackKind, VoiceProviderStackRecommendation } from './providerStackRecommendations';
|
|
108
110
|
export type { VoiceQualityLink, VoiceQualityMetric, VoiceQualityReport, VoiceQualityRoutesOptions, VoiceQualityStatus, VoiceQualityThresholds } from './qualityRoutes';
|
|
109
111
|
export type { VoiceResilienceIOSimulator, VoiceResilienceLink, VoiceResiliencePageData, VoiceResilienceRoutesOptions, VoiceResilienceSimulationProvider, VoiceRoutingKindSummary, VoiceRoutingDecisionSummary, VoiceRoutingDecisionSummaryOptions, VoiceRoutingEvent, VoiceRoutingEventKind, VoiceRoutingSessionSummary, VoiceRoutingSessionSummaryOptions } from './resilienceRoutes';
|
|
110
112
|
export type { VoiceIOProviderRouterEvent, VoiceIOProviderRouterOptions, VoiceIOProviderRouterPolicy, VoiceIOProviderRouterPolicyConfig, VoiceSTTProviderRouterOptions, VoiceTTSProviderRouterOptions } from './providerAdapters';
|
package/dist/index.js
CHANGED
|
@@ -21284,6 +21284,72 @@ var recommendVoiceReadinessProfile = (options) => {
|
|
|
21284
21284
|
scores
|
|
21285
21285
|
};
|
|
21286
21286
|
};
|
|
21287
|
+
// src/providerStackRecommendations.ts
|
|
21288
|
+
var profileProviderPriorities = {
|
|
21289
|
+
"meeting-recorder": {
|
|
21290
|
+
llm: ["openai", "anthropic", "gemini"],
|
|
21291
|
+
stt: ["deepgram", "assemblyai", "openai"],
|
|
21292
|
+
tts: ["openai", "elevenlabs"]
|
|
21293
|
+
},
|
|
21294
|
+
"ops-heavy": {
|
|
21295
|
+
llm: ["anthropic", "openai", "gemini"],
|
|
21296
|
+
stt: ["deepgram", "assemblyai", "openai"],
|
|
21297
|
+
tts: ["openai", "elevenlabs"]
|
|
21298
|
+
},
|
|
21299
|
+
"phone-agent": {
|
|
21300
|
+
llm: ["openai", "anthropic", "gemini"],
|
|
21301
|
+
stt: ["deepgram", "assemblyai", "openai"],
|
|
21302
|
+
tts: ["openai", "elevenlabs"]
|
|
21303
|
+
}
|
|
21304
|
+
};
|
|
21305
|
+
var profileProviderReasons = {
|
|
21306
|
+
"meeting-recorder": {
|
|
21307
|
+
llm: "meeting-recorder favors strong summarization and extraction quality",
|
|
21308
|
+
stt: "meeting-recorder favors accurate long-form transcription",
|
|
21309
|
+
tts: "meeting-recorder usually needs optional, low-friction spoken playback"
|
|
21310
|
+
},
|
|
21311
|
+
"ops-heavy": {
|
|
21312
|
+
llm: "ops-heavy deployments favor dependable reasoning for review and escalation flows",
|
|
21313
|
+
stt: "ops-heavy deployments keep STT recommendation available for live proof surfaces",
|
|
21314
|
+
tts: "ops-heavy deployments keep TTS recommendation available for operator demos"
|
|
21315
|
+
},
|
|
21316
|
+
"phone-agent": {
|
|
21317
|
+
llm: "phone-agent favors low-latency turn handling and tool orchestration",
|
|
21318
|
+
stt: "phone-agent favors low-latency realtime transcription",
|
|
21319
|
+
tts: "phone-agent favors low-latency spoken response"
|
|
21320
|
+
}
|
|
21321
|
+
};
|
|
21322
|
+
var chooseProvider = (available, priorities) => priorities.find((provider) => available.includes(provider)) ?? available[0];
|
|
21323
|
+
var recommendVoiceProviderStack = (input) => {
|
|
21324
|
+
const priorities = profileProviderPriorities[input.profile];
|
|
21325
|
+
const stacks = {};
|
|
21326
|
+
const recommended = {};
|
|
21327
|
+
const reasons = [];
|
|
21328
|
+
for (const kind of ["llm", "stt", "tts"]) {
|
|
21329
|
+
const available = input.providers[kind] ?? [];
|
|
21330
|
+
const provider = chooseProvider(available, priorities[kind]);
|
|
21331
|
+
const alternatives = provider ? available.filter((candidate) => candidate !== provider) : [...available];
|
|
21332
|
+
const kindReasons = [
|
|
21333
|
+
profileProviderReasons[input.profile][kind],
|
|
21334
|
+
provider ? `${provider} is the recommended ${kind.toUpperCase()} provider from the configured set` : `no ${kind.toUpperCase()} providers are configured`
|
|
21335
|
+
];
|
|
21336
|
+
if (provider) {
|
|
21337
|
+
recommended[kind] = provider;
|
|
21338
|
+
}
|
|
21339
|
+
stacks[kind] = {
|
|
21340
|
+
alternatives,
|
|
21341
|
+
provider,
|
|
21342
|
+
reasons: kindReasons
|
|
21343
|
+
};
|
|
21344
|
+
reasons.push(...kindReasons);
|
|
21345
|
+
}
|
|
21346
|
+
return {
|
|
21347
|
+
profile: input.profile,
|
|
21348
|
+
reasons,
|
|
21349
|
+
recommended,
|
|
21350
|
+
stacks
|
|
21351
|
+
};
|
|
21352
|
+
};
|
|
21287
21353
|
// src/opsConsoleRoutes.ts
|
|
21288
21354
|
import { Elysia as Elysia34 } from "elysia";
|
|
21289
21355
|
var DEFAULT_LINKS = [
|
|
@@ -24100,6 +24166,7 @@ export {
|
|
|
24100
24166
|
recordVoiceHandoffAuditEvent,
|
|
24101
24167
|
recordVoiceAuditEvent,
|
|
24102
24168
|
recommendVoiceReadinessProfile,
|
|
24169
|
+
recommendVoiceProviderStack,
|
|
24103
24170
|
pruneVoiceTraceEvents,
|
|
24104
24171
|
parseVoiceTelephonyWebhookEvent,
|
|
24105
24172
|
matchesVoiceOpsTaskAssignmentRule,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { VoiceReadinessProfileName } from './readinessProfiles';
|
|
2
|
+
export type VoiceProviderStackKind = 'llm' | 'stt' | 'tts';
|
|
3
|
+
export type VoiceProviderStackInput<TProvider extends string = string> = {
|
|
4
|
+
profile: VoiceReadinessProfileName;
|
|
5
|
+
providers: Partial<Record<VoiceProviderStackKind, readonly TProvider[]>>;
|
|
6
|
+
};
|
|
7
|
+
export type VoiceProviderStackChoice<TProvider extends string = string> = {
|
|
8
|
+
alternatives: TProvider[];
|
|
9
|
+
provider?: TProvider;
|
|
10
|
+
reasons: string[];
|
|
11
|
+
};
|
|
12
|
+
export type VoiceProviderStackRecommendation<TProvider extends string = string> = {
|
|
13
|
+
profile: VoiceReadinessProfileName;
|
|
14
|
+
reasons: string[];
|
|
15
|
+
recommended: Partial<Record<VoiceProviderStackKind, TProvider>>;
|
|
16
|
+
stacks: Partial<Record<VoiceProviderStackKind, VoiceProviderStackChoice<TProvider>>>;
|
|
17
|
+
};
|
|
18
|
+
export declare const recommendVoiceProviderStack: <TProvider extends string = string>(input: VoiceProviderStackInput<TProvider>) => VoiceProviderStackRecommendation<TProvider>;
|