@absolutejs/voice 0.0.22-beta.172 → 0.0.22-beta.173
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.js +22 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21598,7 +21598,28 @@ var renderVoiceProviderContractMatrixHTML = (report, options = {}) => {
|
|
|
21598
21598
|
<ul>${checks}</ul>
|
|
21599
21599
|
</article>`;
|
|
21600
21600
|
}).join("");
|
|
21601
|
-
|
|
21601
|
+
const snippet = escapeHtml36(`const providerContracts = () =>
|
|
21602
|
+
createVoiceProviderContractMatrixPreset('phone-agent', {
|
|
21603
|
+
env: process.env,
|
|
21604
|
+
providers: {
|
|
21605
|
+
llm: ['openai', 'anthropic', 'gemini'],
|
|
21606
|
+
stt: ['deepgram', 'assemblyai'],
|
|
21607
|
+
tts: ['openai', 'emergency']
|
|
21608
|
+
},
|
|
21609
|
+
selected: {
|
|
21610
|
+
llm: 'openai',
|
|
21611
|
+
stt: 'deepgram',
|
|
21612
|
+
tts: 'openai'
|
|
21613
|
+
},
|
|
21614
|
+
remediationHref: '/provider-contracts'
|
|
21615
|
+
});
|
|
21616
|
+
|
|
21617
|
+
createVoiceProductionReadinessRoutes({
|
|
21618
|
+
links: { providerContracts: '/provider-contracts' },
|
|
21619
|
+
providerContractMatrix: () =>
|
|
21620
|
+
buildVoiceProviderContractMatrix(providerContracts())
|
|
21621
|
+
});`);
|
|
21622
|
+
return `<!doctype html><html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>${escapeHtml36(title)}</title><style>body{background:#0f1412;color:#f7f3e8;font-family:ui-sans-serif,system-ui,sans-serif;margin:0}main{margin:auto;max-width:1180px;padding:32px}.hero,.primitive,.row{background:#17201b;border:1px solid #2d3b32;border-radius:24px;margin-bottom:16px;padding:22px}.hero{background:linear-gradient(135deg,rgba(34,197,94,.16),rgba(125,211,252,.12))}.primitive{background:#111814;border-color:#41604a}.eyebrow{color:#86efac;font-size:.78rem;font-weight:900;letter-spacing:.1em;text-transform:uppercase}h1{font-size:clamp(2.4rem,6vw,5rem);letter-spacing:-.06em;line-height:.9;margin:.2rem 0 1rem}h2{margin:.2rem 0}.summary{display:flex;flex-wrap:wrap;gap:10px}.pill,.status{border:1px solid #3f4f45;border-radius:999px;display:inline-flex;padding:8px 12px}.primitive code{color:#bbf7d0}.primitive p{color:#c8d8ca;line-height:1.55;margin:.45rem 0 0}.primitive pre{background:#08110d;border:1px solid #294132;border-radius:18px;color:#d9f99d;margin:16px 0 0;overflow:auto;padding:16px}.status.pass,.row.pass,.pass{border-color:rgba(34,197,94,.65)}.status.warn,.row.warn,.warn{border-color:rgba(245,158,11,.7)}.status.fail,.row.fail,.fail{border-color:rgba(239,68,68,.75)}.row{display:grid;gap:20px;grid-template-columns:minmax(180px,.45fr) 1fr}.row ul{display:grid;gap:10px;list-style:none;margin:0;padding:0}.row li{background:#111814;border:1px solid #2d3b32;border-radius:16px;display:grid;gap:4px;padding:12px}.row li span{color:#b8c2ba}.row li em{color:#f9d77e;font-style:normal}.row li a{color:#86efac}@media(max-width:760px){main{padding:18px}.row{grid-template-columns:1fr}}</style></head><body><main><section class="hero"><p class="eyebrow">Provider contracts</p><h1>${escapeHtml36(title)}</h1><p>Self-hosted provider proof for configured state, required env, latency budgets, fallback, streaming, and declared capabilities.</p><div class="summary"><span class="pill">${String(report.passed)} passing</span><span class="pill">${String(report.warned)} warning</span><span class="pill">${String(report.failed)} failing</span><span class="pill">${String(report.total)} total</span></div></section><section class="primitive"><p class="eyebrow">Copy into your app</p><h2><code>createVoiceProviderContractMatrixPreset(...)</code> builds this matrix</h2><p>Give AbsoluteJS your configured LLM, STT, and TTS providers once. It turns them into deploy-checkable proof for env, fallback, streaming, latency budgets, selected providers, and profile-required capabilities without a hosted dashboard.</p><pre><code>${snippet}</code></pre></section>${rows || '<article class="row"><p>No provider contracts configured.</p></article>'}</main></body></html>`;
|
|
21602
21623
|
};
|
|
21603
21624
|
var createVoiceProviderContractMatrixJSONHandler = (matrix) => async () => buildVoiceProviderContractMatrix(await resolveProviderContractMatrixInput(matrix));
|
|
21604
21625
|
var createVoiceProviderContractMatrixHTMLHandler = (options) => async () => {
|