@absolutejs/voice 0.0.22-beta.213 → 0.0.22-beta.215
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 +64 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +432 -84
- package/dist/productionReadiness.d.ts +12 -0
- package/dist/providerSlo.d.ts +110 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,6 +55,33 @@ These are the primitive-first paths a Vapi-style buyer usually needs. Each path
|
|
|
55
55
|
| Evals and simulation | fixtures, eval routes, simulation suite, workflow/tool/outcome contracts, baselines | Prove flows before live traffic | Opaque hosted test runner |
|
|
56
56
|
| Data and compliance controls | file/SQLite/Postgres/S3 storage paths, redaction, retention, audit exports, guarded deletion | Show customer-owned storage and export proof | Legal certification or compliance attestation |
|
|
57
57
|
|
|
58
|
+
## Proof Pack
|
|
59
|
+
|
|
60
|
+
Use this checklist when a buyer asks, "How do I know this replaces a hosted voice dashboard?" Each artifact is a route, report, contract, or export the app owns. The point is not screenshots; the point is reproducible proof that can live in CI, an internal admin page, or a customer-facing demo.
|
|
61
|
+
|
|
62
|
+
| Buyer question | Proof artifact | What it proves |
|
|
63
|
+
| --- | --- | --- |
|
|
64
|
+
| Can I launch a browser voice agent quickly? | `/voice`, framework mic/transcript UI, `/traces`, `/production-readiness` | Browser voice route, live transcript, trace persistence, readiness gate |
|
|
65
|
+
| Can I run phone agents without hosted orchestration? | `/voice/phone/setup`, `/voice/phone/smoke-contract`, carrier matrix JSON | Carrier setup instructions, webhook/stream URLs, smoke proof, lifecycle traces |
|
|
66
|
+
| Can I debug a bad call like a hosted call log? | `/voice-operations/:sessionId`, `/voice-operations/:sessionId/incident.md` | Transcript, trace timeline, provider decisions, tools, handoffs, reviews, tasks, audit, deliveries |
|
|
67
|
+
| Can I test before production traffic? | `/voice/simulations`, tool contracts, outcome contracts, workflow contracts | Scenario/eval proof, tool idempotency/retry proof, business outcome proof |
|
|
68
|
+
| Can I prove provider fallback and latency? | provider contract matrix, provider status UI, `/turn-latency`, `/live-latency` | Provider choice, fallback behavior, server turn timing, browser p50/p95 timing |
|
|
69
|
+
| Can operators intervene safely? | live-ops routes, action center, ops action audit routes, operations record | Pause/resume/takeover, injected instructions, operator action audit trail |
|
|
70
|
+
| Can I run outbound campaigns? | `/voice/campaigns`, `/voice/campaigns/observability`, `/api/voice/campaigns/readiness-proof` | Recipient import evidence, consent/dedupe checks, scheduling policy, worker-safe attempts |
|
|
71
|
+
| Can I handle post-call workflow? | reviews, tasks, integration events, outcome contracts, operations record | Summary/review artifacts, task creation, webhook/sink delivery, matched session proof |
|
|
72
|
+
| Can I keep data in my infrastructure? | `/data-control`, `/data-control/audit.md`, retention dry-run/apply routes | Customer-owned storage, redaction, audit export, guarded deletion, zero-retention planning |
|
|
73
|
+
| Can I prove release readiness? | `/production-readiness`, `/ops-recovery`, delivery runtime, readiness profiles | Deploy gates for session health, audits, delivery queues, provider/campaign/phone proof |
|
|
74
|
+
|
|
75
|
+
For a demo, the fastest convincing path is:
|
|
76
|
+
|
|
77
|
+
1. Start a browser or phone session.
|
|
78
|
+
2. Open `/voice-operations/:sessionId` for the session.
|
|
79
|
+
3. Open `/production-readiness` and follow any linked proof surface.
|
|
80
|
+
4. Open `/voice/simulations` or the relevant tool/outcome contract route.
|
|
81
|
+
5. Open `/data-control` to show where retention, redaction, and audit export live.
|
|
82
|
+
|
|
83
|
+
If those five surfaces are green and linked, the buyer can see the core difference from Vapi-style hosted orchestration: the operational proof lives inside the app, not in a vendor dashboard.
|
|
84
|
+
|
|
58
85
|
## Use-Case Recipe: Support Triage
|
|
59
86
|
|
|
60
87
|
Use this path when you want a Vapi-style support assistant that can answer web or phone calls, look up customer context, route billing issues to a specialist, create follow-up work, and leave one debuggable call record. It is a recipe over primitives, not a support app kit.
|
|
@@ -3594,6 +3621,43 @@ if (!report.pass) {
|
|
|
3594
3621
|
|
|
3595
3622
|
Pass provider routing contract reports into production readiness through `providerRoutingContracts`. Readiness fails when a fallback contract fails, so model-routing regressions become deploy blockers instead of dashboard-only surprises.
|
|
3596
3623
|
|
|
3624
|
+
Use `createVoiceProviderSloRoutes(...)` when provider speed needs to be release evidence instead of a dashboard claim. The report reads the same provider routing trace events and checks LLM, STT, and TTS latency, p95 latency, timeout rate, fallback rate, and unresolved provider error rate.
|
|
3625
|
+
|
|
3626
|
+
```ts
|
|
3627
|
+
import {
|
|
3628
|
+
createVoiceProviderSloRoutes,
|
|
3629
|
+
createVoiceProductionReadinessRoutes
|
|
3630
|
+
} from '@absolutejs/voice';
|
|
3631
|
+
|
|
3632
|
+
const providerSlo = {
|
|
3633
|
+
requiredKinds: ['llm', 'stt', 'tts'],
|
|
3634
|
+
thresholds: {
|
|
3635
|
+
llm: { maxAverageElapsedMs: 2500, maxP95ElapsedMs: 4500 },
|
|
3636
|
+
stt: { maxAverageElapsedMs: 800, maxP95ElapsedMs: 1500 },
|
|
3637
|
+
tts: { maxAverageElapsedMs: 1200, maxP95ElapsedMs: 2200 }
|
|
3638
|
+
}
|
|
3639
|
+
} as const;
|
|
3640
|
+
|
|
3641
|
+
app
|
|
3642
|
+
.use(
|
|
3643
|
+
createVoiceProviderSloRoutes({
|
|
3644
|
+
store: runtime.traces,
|
|
3645
|
+
...providerSlo
|
|
3646
|
+
})
|
|
3647
|
+
)
|
|
3648
|
+
.use(
|
|
3649
|
+
createVoiceProductionReadinessRoutes({
|
|
3650
|
+
store: runtime.traces,
|
|
3651
|
+
providerSlo,
|
|
3652
|
+
links: {
|
|
3653
|
+
providerSlo: '/voice/provider-slos'
|
|
3654
|
+
}
|
|
3655
|
+
})
|
|
3656
|
+
);
|
|
3657
|
+
```
|
|
3658
|
+
|
|
3659
|
+
The provider SLO routes expose JSON at `/api/voice/provider-slos`, HTML at `/voice/provider-slos`, and Markdown at `/voice/provider-slos.md`. Readiness adds a `Provider SLO gates` check when `providerSlo` is configured; failing latency, timeout, fallback, or unresolved-error budgets close the deploy gate.
|
|
3660
|
+
|
|
3597
3661
|
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.
|
|
3598
3662
|
|
|
3599
3663
|
```ts
|
package/dist/index.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export { createOpenAIVoiceTTS } from './openaiTTS';
|
|
|
46
46
|
export { createVoiceProviderHealthHTMLHandler, createVoiceProviderHealthJSONHandler, createVoiceProviderHealthRoutes, renderVoiceProviderHealthHTML, summarizeVoiceProviderHealth } from './providerHealth';
|
|
47
47
|
export { createVoiceProviderCapabilityHTMLHandler, createVoiceProviderCapabilityJSONHandler, createVoiceProviderCapabilityRoutes, renderVoiceProviderCapabilityHTML, summarizeVoiceProviderCapabilities } from './providerCapabilities';
|
|
48
48
|
export { assertVoiceProviderRoutingContract, runVoiceProviderRoutingContract } from './providerRoutingContract';
|
|
49
|
+
export { buildVoiceProviderSloReport, createVoiceProviderSloRoutes, renderVoiceProviderSloHTML, renderVoiceProviderSloMarkdown } from './providerSlo';
|
|
49
50
|
export { createVoicePhoneAgentProductionSmokeHTMLHandler, createVoicePhoneAgentProductionSmokeJSONHandler, createVoicePhoneAgentProductionSmokeRoutes, renderVoicePhoneAgentProductionSmokeHTML, runVoicePhoneAgentProductionSmokeContract } from './phoneAgentProductionSmoke';
|
|
50
51
|
export { buildVoiceProductionReadinessGate, buildVoiceProductionReadinessReport, createVoiceProductionReadinessRoutes, renderVoiceProductionReadinessHTML, summarizeVoiceProductionReadinessGate } from './productionReadiness';
|
|
51
52
|
export { createVoiceReadinessProfile, recommendVoiceReadinessProfile } from './readinessProfiles';
|
|
@@ -101,6 +102,7 @@ export type { OpenAIRealtimeAdapterOptions, OpenAIRealtimeModel, OpenAIRealtimeN
|
|
|
101
102
|
export type { VoiceProviderHealthStatus, VoiceProviderHealthSummary, VoiceProviderHealthSummaryOptions } from './providerHealth';
|
|
102
103
|
export type { VoiceProviderCapabilityDefinition, VoiceProviderCapabilityHandlerOptions, VoiceProviderCapabilityHTMLHandlerOptions, VoiceProviderCapabilityKind, VoiceProviderCapabilityOptions, VoiceProviderCapabilityReport, VoiceProviderCapabilityRoutesOptions, VoiceProviderCapabilitySummary } from './providerCapabilities';
|
|
103
104
|
export type { VoiceProviderRoutingContractDefinition, VoiceProviderRoutingContractIssue, VoiceProviderRoutingContractReport, VoiceProviderRoutingContractRunOptions, VoiceProviderRoutingExpectation, VoiceProviderRoutingStatus } from './providerRoutingContract';
|
|
105
|
+
export type { VoiceProviderSloIssue, VoiceProviderSloKindReport, VoiceProviderSloMetric, VoiceProviderSloReport, VoiceProviderSloReportOptions, VoiceProviderSloRoutesOptions, VoiceProviderSloSessionReport, VoiceProviderSloStatus, VoiceProviderSloThresholdConfig, VoiceProviderSloThresholds } from './providerSlo';
|
|
104
106
|
export type { VoiceTurnLatencyHTMLHandlerOptions, VoiceTurnLatencyItem, VoiceTurnLatencyOptions, VoiceTurnLatencyReport, VoiceTurnLatencyRoutesOptions, VoiceTurnLatencyStage, VoiceTurnLatencyStatus } from './turnLatency';
|
|
105
107
|
export type { VoiceLiveLatencyOptions, VoiceLiveLatencyReport, VoiceLiveLatencyRoutesOptions, VoiceLiveLatencySample, VoiceLiveLatencyStatus } from './liveLatency';
|
|
106
108
|
export type { VoiceLatencySLOBudget, VoiceLatencySLOGateError, VoiceLatencySLOGateOptions, VoiceLatencySLOGateReport, VoiceLatencySLOMeasurement, VoiceLatencySLOStage, VoiceLatencySLOStageSummary, VoiceLatencySLOStatus } from './latencySlo';
|