@absolutejs/voice 0.0.22-beta.293 → 0.0.22-beta.294
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 +29 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1989 -1729
- package/dist/providerDecisionTraces.d.ts +122 -0
- package/dist/trace.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4089,6 +4089,35 @@ assertVoiceProviderSloEvidence(providerReport, {
|
|
|
4089
4089
|
});
|
|
4090
4090
|
```
|
|
4091
4091
|
|
|
4092
|
+
Use `createVoiceProviderDecisionTraceEvent(...)` and `createVoiceProviderDecisionTraceRoutes(...)` when you need runtime proof for why a provider won, failed, was skipped, or recovered by fallback. This is the per-call decision trail behind provider orchestration: it can read explicit `provider.decision` trace events or normalize existing provider routing events.
|
|
4093
|
+
|
|
4094
|
+
```ts
|
|
4095
|
+
import {
|
|
4096
|
+
createVoiceProviderDecisionTraceEvent,
|
|
4097
|
+
createVoiceProviderDecisionTraceRoutes
|
|
4098
|
+
} from '@absolutejs/voice';
|
|
4099
|
+
|
|
4100
|
+
await traces.append(
|
|
4101
|
+
createVoiceProviderDecisionTraceEvent({
|
|
4102
|
+
provider: 'deepgram',
|
|
4103
|
+
selectedProvider: 'assemblyai',
|
|
4104
|
+
fallbackProvider: 'assemblyai',
|
|
4105
|
+
status: 'fallback',
|
|
4106
|
+
surface: 'live-stt',
|
|
4107
|
+
reason: 'Deepgram timed out, AssemblyAI recovered the live STT turn.'
|
|
4108
|
+
})
|
|
4109
|
+
);
|
|
4110
|
+
|
|
4111
|
+
app.use(
|
|
4112
|
+
createVoiceProviderDecisionTraceRoutes({
|
|
4113
|
+
store: traces,
|
|
4114
|
+
requiredSurfaces: ['live-call', 'live-stt', 'telephony-tts']
|
|
4115
|
+
})
|
|
4116
|
+
);
|
|
4117
|
+
```
|
|
4118
|
+
|
|
4119
|
+
The routes expose JSON at `/api/voice/provider-decisions`, HTML at `/voice/provider-decisions`, and Markdown at `/voice/provider-decisions.md`. Use this next to provider SLOs when a customer asks not just "is fallback working?" but "why did the system choose this provider for this call?".
|
|
4120
|
+
|
|
4092
4121
|
Use `createVoiceProviderContractMatrixPreset(...)` when you want readiness proof for the whole provider stack without hand-writing every LLM, STT, and TTS contract row. The preset stays primitive: you still own provider lists, selected providers, latency budgets, env, capabilities, and route mounting.
|
|
4093
4122
|
|
|
4094
4123
|
```ts
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export { buildVoiceOpsActionHistoryReport, createVoiceOpsActionAuditRoutes, reco
|
|
|
17
17
|
export { assertVoicePlatformCoverage, buildVoicePlatformCoverageSummary, createVoicePlatformCoverageRoutes, evaluateVoicePlatformCoverage } from './platformCoverage';
|
|
18
18
|
export type { VoicePlatformCoverageAssertionInput, VoicePlatformCoverageAssertionReport, VoicePlatformCoverageEvidence, VoicePlatformCoverageRoutesOptions, VoicePlatformCoverageStatus, VoicePlatformCoverageSummary, VoicePlatformCoverageSummaryInput, VoicePlatformCoverageSurface } from './platformCoverage';
|
|
19
19
|
export { assertVoiceProofTrendEvidence, buildEmptyVoiceProofTrendReport, buildVoiceProofTrendReport, createVoiceProofTrendRoutes, DEFAULT_VOICE_PROOF_TRENDS_MAX_AGE_MS, evaluateVoiceProofTrendEvidence, formatVoiceProofTrendAge, normalizeVoiceProofTrendReport, readVoiceProofTrendReportFile } from './proofTrends';
|
|
20
|
+
export { buildVoiceProviderDecisionTraceReport, createVoiceProviderDecisionTraceEvent, createVoiceProviderDecisionTraceRoutes, listVoiceProviderDecisionTraces, renderVoiceProviderDecisionTraceHTML, renderVoiceProviderDecisionTraceMarkdown } from './providerDecisionTraces';
|
|
21
|
+
export type { VoiceProviderDecisionStatus, VoiceProviderDecisionSurfaceReport, VoiceProviderDecisionTrace, VoiceProviderDecisionTraceInput, VoiceProviderDecisionTraceIssue, VoiceProviderDecisionTraceReport, VoiceProviderDecisionTraceReportOptions, VoiceProviderDecisionTraceRoutesOptions } from './providerDecisionTraces';
|
|
20
22
|
export type { VoiceProofTrendAssertionInput, VoiceProofTrendAssertionReport, VoiceProofTrendCycle, VoiceProofTrendReport, VoiceProofTrendReportInput, VoiceProofTrendRoutesOptions, VoiceProofTrendStatus, VoiceProofTrendSummary } from './proofTrends';
|
|
21
23
|
export { assertVoiceSloCalibration, buildVoiceSloCalibrationReport, buildVoiceSloReadinessThresholdReport, createVoiceSloReadinessThresholdOptions, createVoiceSloReadinessThresholdRoutes, createVoiceSloThresholdProfile, createVoiceSloCalibrationRoutes, renderVoiceSloCalibrationMarkdown, renderVoiceSloReadinessThresholdHTML, renderVoiceSloReadinessThresholdMarkdown } from './sloCalibration';
|
|
22
24
|
export type { VoiceSloCalibrationMetricKey, VoiceSloCalibrationOptions, VoiceSloCalibrationReport, VoiceSloCalibrationRoutesOptions, VoiceSloCalibrationSample, VoiceSloCalibrationStatus, VoiceSloCalibrationThreshold, VoiceSloCalibrationThresholds, VoiceSloReadinessThresholdReport, VoiceSloReadinessThresholdReportOptions, VoiceSloReadinessThresholdOptions, VoiceSloReadinessThresholdRoutesOptions, VoiceSloThresholdProfile } from './sloCalibration';
|