@absolutejs/voice 0.0.22-beta.177 → 0.0.22-beta.178
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 +34 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13740,7 +13740,40 @@ var renderAction = (action) => {
|
|
|
13740
13740
|
};
|
|
13741
13741
|
var renderVoiceSimulationSuiteHTML = (report, options = {}) => {
|
|
13742
13742
|
const title = options.title ?? "Voice Simulation Suite";
|
|
13743
|
-
|
|
13743
|
+
const snippet = escapeHtml22(`app.use(
|
|
13744
|
+
createVoiceSimulationSuiteRoutes({
|
|
13745
|
+
htmlPath: '/voice/simulations',
|
|
13746
|
+
path: '/api/voice/simulations',
|
|
13747
|
+
store: traceStore,
|
|
13748
|
+
scenarios: workflowScenarios,
|
|
13749
|
+
fixtureStore,
|
|
13750
|
+
tools: toolContracts,
|
|
13751
|
+
outcomes: {
|
|
13752
|
+
contracts: outcomeContracts,
|
|
13753
|
+
sessions: loadCompletedSessions
|
|
13754
|
+
},
|
|
13755
|
+
actionLinks: {
|
|
13756
|
+
scenarios: '/evals/scenarios',
|
|
13757
|
+
fixtures: '/evals/fixtures',
|
|
13758
|
+
tools: '/tool-contracts',
|
|
13759
|
+
outcomes: '/reviews'
|
|
13760
|
+
}
|
|
13761
|
+
})
|
|
13762
|
+
);
|
|
13763
|
+
|
|
13764
|
+
app.use(
|
|
13765
|
+
createVoiceProductionReadinessRoutes({
|
|
13766
|
+
proofSources: {
|
|
13767
|
+
simulations: {
|
|
13768
|
+
href: '/voice/simulations',
|
|
13769
|
+
source: 'simulation-suite',
|
|
13770
|
+
sourceLabel: 'Pre-production simulation suite'
|
|
13771
|
+
}
|
|
13772
|
+
},
|
|
13773
|
+
store: traceStore
|
|
13774
|
+
})
|
|
13775
|
+
);`);
|
|
13776
|
+
return `<!doctype html><html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>${escapeHtml22(title)}</title><style>body{background:#10151c;color:#f8f3e7;font-family:ui-sans-serif,system-ui,sans-serif;margin:0}main{margin:auto;max-width:1080px;padding:32px}.hero,.primitive{background:linear-gradient(135deg,rgba(34,197,94,.18),rgba(59,130,246,.12));border:1px solid #283544;border-radius:28px;margin-bottom:18px;padding:28px}.primitive{background:#151d27;border-color:#355078}.eyebrow{color:#93c5fd;font-weight:900;letter-spacing:.12em;text-transform:uppercase}h1{font-size:clamp(2.4rem,6vw,5rem);line-height:.9;margin:.2rem 0 1rem}.badge{border:1px solid #3f3f46;border-radius:999px;display:inline-flex;padding:8px 12px}.pass{color:#86efac}.fail{color:#fca5a5}.grid,.actions{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));margin:18px 0}.grid article,.action{background:#151d27;border:1px solid #283544;border-radius:18px;color:inherit;padding:16px;text-decoration:none}.grid span,.action span{color:#aab5c0}.grid strong{display:block;font-size:2rem;margin:.25rem 0;text-transform:uppercase}.action strong{display:block;color:#f8f3e7;margin-bottom:.35rem}.action p,.primitive p{color:#d8dee6;line-height:1.55;margin:.3rem 0 .6rem}pre{background:#151d27;border:1px solid #283544;border-radius:18px;overflow:auto;padding:16px}.primitive pre{background:#0b1118;color:#dbeafe}.primitive code{color:#bfdbfe}</style></head><body><main><section class="hero"><p class="eyebrow">Pre-production proof</p><h1>${escapeHtml22(title)}</h1><p>One report for session quality, scenario evals, fixture simulations, tool contracts, and outcome contracts.</p><p class="badge ${escapeHtml22(report.status)}">Status: ${escapeHtml22(report.status)}</p><section class="grid">${renderSection("Sessions", report.summary.sessions)}${renderSection("Scenarios", report.summary.scenarios)}${renderSection("Fixtures", report.summary.fixtures)}${renderSection("Tools", report.summary.tools)}${renderSection("Outcomes", report.summary.outcomes)}</section></section><section class="primitive"><p class="eyebrow">Copy into your app</p><h2><code>createVoiceSimulationSuiteRoutes(...)</code> builds this pre-production proof surface</h2><p>Run session quality checks, scenario evals, fixture-backed simulations, tool contracts, and outcome contracts from one route group before live traffic sees a regression.</p><pre><code>${snippet}</code></pre></section><h2>Actions</h2><section class="actions">${report.actions.length > 0 ? report.actions.map(renderAction).join("") : '<article class="action"><strong>No action required</strong><p>All enabled simulation sections are passing.</p></article>'}</section><pre>${escapeHtml22(JSON.stringify({ summary: report.summary, actions: report.actions }, null, 2))}</pre></main></body></html>`;
|
|
13744
13777
|
};
|
|
13745
13778
|
var createVoiceSimulationSuiteRoutes = (options) => {
|
|
13746
13779
|
const path = options.path ?? "/api/voice/simulations";
|