@absolutejs/voice 0.0.22-beta.290 → 0.0.22-beta.292
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/README.md +53 -0
- package/dist/angular/index.d.ts +1 -0
- package/dist/angular/index.js +303 -181
- package/dist/angular/voice-readiness-failures.service.d.ts +13 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.js +367 -183
- package/dist/client/readinessFailures.d.ts +19 -0
- package/dist/client/readinessFailuresWidget.d.ts +42 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +90 -14
- package/dist/modelAdapters.d.ts +37 -0
- package/dist/react/VoiceReadinessFailures.d.ts +6 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +635 -345
- package/dist/react/useVoiceReadinessFailures.d.ts +8 -0
- package/dist/svelte/createVoiceReadinessFailures.d.ts +7 -0
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +86 -0
- package/dist/testing/index.js +87 -12
- package/dist/vue/VoiceReadinessFailures.d.ts +21 -0
- package/dist/vue/index.d.ts +2 -0
- package/dist/vue/index.js +540 -262
- package/dist/vue/useVoiceReadinessFailures.d.ts +755 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3888,6 +3888,59 @@ Built-in policy presets:
|
|
|
3888
3888
|
- `cost-cap`: rank by cost and reject providers above `maxCost`.
|
|
3889
3889
|
- `balanced`: weighted score using cost, latency, quality, and priority.
|
|
3890
3890
|
|
|
3891
|
+
Use `createVoiceProviderOrchestrationProfile(...)` when one app has multiple provider surfaces with different tradeoffs. This is the Vapi-style "choose providers without glue" layer, but still code-owned: a live call can prefer low latency with a circuit breaker, while a background summary can prefer lower cost and stricter budget caps.
|
|
3892
|
+
|
|
3893
|
+
```ts
|
|
3894
|
+
import {
|
|
3895
|
+
createVoiceProviderOrchestrationProfile,
|
|
3896
|
+
createVoiceProviderRouter
|
|
3897
|
+
} from '@absolutejs/voice';
|
|
3898
|
+
|
|
3899
|
+
const providerProfile = createVoiceProviderOrchestrationProfile({
|
|
3900
|
+
id: 'support-agent-providers',
|
|
3901
|
+
defaultSurface: 'live-call',
|
|
3902
|
+
surfaces: {
|
|
3903
|
+
'live-call': {
|
|
3904
|
+
policy: 'latency-first',
|
|
3905
|
+
fallback: ['openai', 'anthropic', 'gemini'],
|
|
3906
|
+
maxLatencyMs: 900,
|
|
3907
|
+
providerHealth: {
|
|
3908
|
+
failureThreshold: 1,
|
|
3909
|
+
cooldownMs: 30_000,
|
|
3910
|
+
rateLimitCooldownMs: 120_000
|
|
3911
|
+
},
|
|
3912
|
+
providerProfiles: {
|
|
3913
|
+
openai: { cost: 6, latencyMs: 650, quality: 0.92, timeoutMs: 3500 },
|
|
3914
|
+
anthropic: { cost: 7, latencyMs: 850, quality: 0.95, timeoutMs: 4500 },
|
|
3915
|
+
gemini: { cost: 2, latencyMs: 700, quality: 0.86, timeoutMs: 3500 }
|
|
3916
|
+
}
|
|
3917
|
+
},
|
|
3918
|
+
'background-summary': {
|
|
3919
|
+
policy: 'cost-cap',
|
|
3920
|
+
fallback: ['gemini', 'openai'],
|
|
3921
|
+
maxCost: 3,
|
|
3922
|
+
minQuality: 0.82,
|
|
3923
|
+
providerProfiles: {
|
|
3924
|
+
openai: { cost: 6, latencyMs: 650, quality: 0.92 },
|
|
3925
|
+
gemini: { cost: 2, latencyMs: 700, quality: 0.86 }
|
|
3926
|
+
}
|
|
3927
|
+
}
|
|
3928
|
+
}
|
|
3929
|
+
});
|
|
3930
|
+
|
|
3931
|
+
const liveModel = createVoiceProviderRouter({
|
|
3932
|
+
providers,
|
|
3933
|
+
orchestrationProfile: providerProfile,
|
|
3934
|
+
orchestrationSurface: 'live-call'
|
|
3935
|
+
});
|
|
3936
|
+
|
|
3937
|
+
const summaryModel = createVoiceProviderRouter({
|
|
3938
|
+
providers,
|
|
3939
|
+
orchestrationProfile: providerProfile,
|
|
3940
|
+
orchestrationSurface: 'background-summary'
|
|
3941
|
+
});
|
|
3942
|
+
```
|
|
3943
|
+
|
|
3891
3944
|
Budget filters are strict. If you pass `maxCost`, `maxLatencyMs`, or `minQuality`, providers outside those limits are removed before ranking, even if they were selected by the request.
|
|
3892
3945
|
|
|
3893
3946
|
```ts
|
package/dist/angular/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { VoiceOpsStatusService } from './voice-ops-status.service';
|
|
2
2
|
export { VoicePlatformCoverageService } from './voice-platform-coverage.service';
|
|
3
3
|
export { VoiceProofTrendsService } from './voice-proof-trends.service';
|
|
4
|
+
export { VoiceReadinessFailuresService } from './voice-readiness-failures.service';
|
|
4
5
|
export { VoiceOpsActionCenterService } from './voice-ops-action-center.service';
|
|
5
6
|
export { VoiceLiveOpsService } from './voice-live-ops.service';
|
|
6
7
|
export { VoiceDeliveryRuntimeService } from './voice-delivery-runtime.service';
|