@absolutejs/voice 0.0.22-beta.206 → 0.0.22-beta.208

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.
Files changed (2) hide show
  1. package/README.md +113 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -27,6 +27,34 @@ Pick the path that matches what you are building:
27
27
  - Provider routing and fallback: use LLM/STT/TTS provider routers, provider health, provider simulation controls, and cost/latency-aware routing policies.
28
28
  - Evals and simulation: mount `createVoiceSimulationSuiteRoutes(...)` to run scenario fixtures, workflow contracts, tool contracts, outcome contracts, baseline comparisons, and saved benchmark artifacts before live traffic.
29
29
 
30
+ ## Buyer Paths
31
+
32
+ These are the primitive-first paths a Vapi-style buyer usually needs. Each path stays inside your AbsoluteJS app; the package gives you route handlers, stores, reports, hooks, composables, services, widgets, and contracts instead of a hosted dashboard.
33
+
34
+ | If you need | Start with | Add proof with | UI entrypoints |
35
+ | --- | --- | --- | --- |
36
+ | Web voice assistant | `voice(...)` or `createVoiceAssistant(...)` | trace timeline, turn quality, live latency, reconnect contract, operations record | React/Vue/Svelte/Angular voice stream helpers, HTML/HTMX/client helpers |
37
+ | Phone voice assistant | `createVoicePhoneAgent(...)` | carrier matrix, setup instructions, phone smoke contract, production readiness, operations record | phone setup HTML/JSON, smoke HTML/JSON, framework status UI |
38
+ | Multi-specialist support flow | `createVoiceAgentSquad(...)` | squad contract, handoff traces, context traces, operations record | Agent Squad status hooks/composables/services/widgets |
39
+ | Business actions and tools | `createVoiceAgentTool(...)` plus agent tool runtime | tool contracts, audit events, integration events, outcome contracts | operations record, action center, contract routes |
40
+ | Provider routing and fallback | provider routers, health checks, simulation controls | provider contract matrix, provider-stage traces, latency SLO reports | provider contract hooks/composables/services/widgets |
41
+ | Production operations | ops status, ops recovery, production readiness, delivery runtime | readiness gates, recovery report, incident Markdown, delivery queues | ops action center, delivery runtime UI, operations record |
42
+ | Outbound campaigns | `createVoiceCampaignRoutes(...)` | recipient validation, consent/dedupe, carrier dry-run, campaign readiness | campaign routes and operations-record-linked attempt proof |
43
+ | Simulation before launch | `createVoiceSimulationSuiteRoutes(...)` | scenarios, evals, tool contracts, outcome contracts, baselines | simulation-suite HTML/JSON and linked operations records |
44
+ | Compliance controls | runtime storage, audit logger, data-control routes | retention dry-run, redacted audit export, zero-retention policy, deploy gate | data-control HTML/JSON and audit/export routes |
45
+
46
+ ## Capability Matrix
47
+
48
+ | Surface | Core package | Example/demo role | Not our lane |
49
+ | --- | --- | --- | --- |
50
+ | Browser voice | WebSocket voice route, client stream/controller/store primitives, reconnect, barge-in, latency, framework helpers | Prove the same mic/transcript/status workflow across React, Vue, Svelte, Angular, HTML, and HTMX | Hosted iframe widget that owns app UX |
51
+ | Telephony | Twilio, Telnyx, Plivo route bridges, phone-agent wrapper, setup instructions, smoke contracts, carrier outcomes | Show setup/smoke/proof surfaces and call lifecycle debugging | Buying/provisioning phone numbers for the user |
52
+ | Agents and tools | assistant, agent, tools, squads, handoff/context policies, contracts, audit hooks | Demonstrate realistic support/sales/workflow flows | Dashboard-only visual bot builder |
53
+ | Provider layer | OpenAI/Anthropic/Gemini model paths, STT/TTS adapter seams, routing, fallback, health, simulation | Show provider switching and health in UI | Reselling provider minutes or hiding provider accounts |
54
+ | Observability | traces, timelines, replay, operations records, incident Markdown, ops recovery, readiness | Make every failing proof link to a call/session record | Vendor dashboard as source of truth |
55
+ | Evals and simulation | fixtures, eval routes, simulation suite, workflow/tool/outcome contracts, baselines | Prove flows before live traffic | Opaque hosted test runner |
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
+
30
58
  ## How This Differs From Hosted Voice Platforms
31
59
 
32
60
  Hosted voice-agent platforms are strongest when you want a managed dashboard, phone-number provisioning, hosted orchestration, and campaign tooling out of the box.
@@ -1744,6 +1772,91 @@ Mounted routes:
1744
1772
 
1745
1773
  `createVoiceZeroRetentionPolicy(...)` intentionally defaults to `dryRun: true`; callers must explicitly apply the generated policy after reviewing the deletion proof. This gives compliance-sensitive deployments a concrete zero-retention recipe without making accidental deletion easy.
1746
1774
 
1775
+ ### Compliance Recipes
1776
+
1777
+ These are recipes, not compliance certifications. AbsoluteJS Voice gives you the self-hosted controls and proof surfaces; your legal/security team still owns the actual HIPAA, SOC 2, GDPR, or customer-contract process.
1778
+
1779
+ Zero-retention sensitive call:
1780
+
1781
+ ```ts
1782
+ const policy = createVoiceZeroRetentionPolicy({
1783
+ ...runtimeStorage,
1784
+ audit: runtimeStorage.audit,
1785
+ auditDeliveries: runtimeStorage.auditDeliveries,
1786
+ traceDeliveries: runtimeStorage.traceDeliveries
1787
+ });
1788
+
1789
+ const dryRun = await buildVoiceDataRetentionPlan(policy);
1790
+ if (dryRun.deletedCount > 0) {
1791
+ await applyVoiceDataRetentionPolicy({
1792
+ ...policy,
1793
+ dryRun: false
1794
+ });
1795
+ }
1796
+ ```
1797
+
1798
+ This removes sessions, traces, reviews, tasks, integration events, campaigns, incident bundles, and delivery queues that match the policy selectors. The generated policy starts as a dry run so a zero-retention mode cannot accidentally wipe data without explicit application.
1799
+
1800
+ Redacted support export:
1801
+
1802
+ ```ts
1803
+ const auditExport = await exportVoiceAuditTrail({
1804
+ redact: voiceComplianceRedactionDefaults,
1805
+ store: runtimeStorage.audit
1806
+ });
1807
+ const auditMarkdown = renderVoiceAuditMarkdown(auditExport.events);
1808
+
1809
+ const traceMarkdown = renderVoiceTraceMarkdown(events, {
1810
+ redact: voiceComplianceRedactionDefaults
1811
+ });
1812
+ ```
1813
+
1814
+ Use this for support tickets, customer escalations, incident reviews, or vendor handoffs where transcripts, tool payloads, provider metadata, or audit events may contain personal data.
1815
+
1816
+ Customer-owned storage:
1817
+
1818
+ ```ts
1819
+ const runtimeStorage = createVoicePostgresRuntimeStorage({
1820
+ connectionString: process.env.DATABASE_URL!,
1821
+ schemaName: 'voice_ops',
1822
+ tablePrefix: 'support'
1823
+ });
1824
+
1825
+ app.use(
1826
+ createVoiceDataControlRoutes({
1827
+ ...runtimeStorage,
1828
+ audit: runtimeStorage.audit,
1829
+ auditDeliveries: runtimeStorage.auditDeliveries,
1830
+ redact: voiceComplianceRedactionDefaults,
1831
+ traceDeliveries: runtimeStorage.traceDeliveries
1832
+ })
1833
+ );
1834
+ ```
1835
+
1836
+ Use file storage for local demos, SQLite for small self-hosted installs, Postgres for production app-owned records, and S3 delivery for exported audit/trace evidence. The important point is that sessions, traces, reviews, tasks, campaigns, audit, and delivery queues remain in infrastructure the app owner controls.
1837
+
1838
+ Deploy gate for compliance evidence:
1839
+
1840
+ ```ts
1841
+ app.use(
1842
+ createVoiceProductionReadinessRoutes({
1843
+ audit: {
1844
+ require: [
1845
+ { type: 'provider.call' },
1846
+ { type: 'operator.action' },
1847
+ { type: 'retention.policy', maxAgeMs: 7 * 24 * 60 * 60 * 1000 }
1848
+ ],
1849
+ store: runtimeStorage.audit
1850
+ },
1851
+ auditDeliveries: runtimeStorage.auditDeliveries,
1852
+ traceDeliveries: runtimeStorage.traceDeliveries,
1853
+ store: runtimeStorage.traces
1854
+ })
1855
+ );
1856
+ ```
1857
+
1858
+ This makes provider-call audit evidence, operator interventions, recent retention-policy proof, and export-queue health part of release readiness instead of a manual dashboard check.
1859
+
1747
1860
  Use `createVoiceAuditLogger(...)` when you need append-only compliance evidence outside call traces. The logger records provider calls, tool calls, handoffs, retention runs, and operator actions into `runtimeStorage.audit`, so self-hosted teams can prove who changed what, which provider ran, which tool fired, and what data-control policy deleted.
1748
1861
 
1749
1862
  Pass `audit` directly to `createVoiceAgent(...)` to record model calls as provider-call audit events and tool executions as tool-call audit events. Pass it to `createVoiceAgentSquad(...)` to record squad handoffs automatically. Use `auditProvider` and `auditModel` on agents when you want readiness and compliance reports to show the actual model provider instead of the agent id.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.206",
3
+ "version": "0.0.22-beta.208",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",