@absolutejs/voice 0.0.22-beta.290 → 0.0.22-beta.292

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.
@@ -2218,6 +2218,80 @@ var createVoiceProofTrendsStore = (path = "/api/voice/proof-trends", options = {
2218
2218
  }
2219
2219
  };
2220
2220
  };
2221
+ // src/client/readinessFailures.ts
2222
+ var fetchVoiceReadinessFailures = async (path = "/api/production-readiness", options = {}) => {
2223
+ const fetchImpl = options.fetch ?? globalThis.fetch;
2224
+ const response = await fetchImpl(path);
2225
+ if (!response.ok) {
2226
+ throw new Error(`Voice readiness failed: HTTP ${response.status}`);
2227
+ }
2228
+ return await response.json();
2229
+ };
2230
+ var createVoiceReadinessFailuresStore = (path = "/api/production-readiness", options = {}) => {
2231
+ const listeners = new Set;
2232
+ let closed = false;
2233
+ let timer;
2234
+ let snapshot = {
2235
+ error: null,
2236
+ isLoading: false
2237
+ };
2238
+ const emit = () => {
2239
+ for (const listener of listeners) {
2240
+ listener();
2241
+ }
2242
+ };
2243
+ const refresh = async () => {
2244
+ if (closed) {
2245
+ return snapshot.report;
2246
+ }
2247
+ snapshot = { ...snapshot, error: null, isLoading: true };
2248
+ emit();
2249
+ try {
2250
+ const report = await fetchVoiceReadinessFailures(path, options);
2251
+ snapshot = {
2252
+ error: null,
2253
+ isLoading: false,
2254
+ report,
2255
+ updatedAt: Date.now()
2256
+ };
2257
+ emit();
2258
+ return report;
2259
+ } catch (error) {
2260
+ snapshot = {
2261
+ ...snapshot,
2262
+ error: error instanceof Error ? error.message : String(error),
2263
+ isLoading: false
2264
+ };
2265
+ emit();
2266
+ throw error;
2267
+ }
2268
+ };
2269
+ const close = () => {
2270
+ closed = true;
2271
+ if (timer) {
2272
+ clearInterval(timer);
2273
+ timer = undefined;
2274
+ }
2275
+ listeners.clear();
2276
+ };
2277
+ if (typeof window !== "undefined" && options.intervalMs && options.intervalMs > 0) {
2278
+ timer = setInterval(() => {
2279
+ refresh().catch(() => {});
2280
+ }, options.intervalMs);
2281
+ }
2282
+ return {
2283
+ close,
2284
+ getServerSnapshot: () => snapshot,
2285
+ getSnapshot: () => snapshot,
2286
+ refresh,
2287
+ subscribe: (listener) => {
2288
+ listeners.add(listener);
2289
+ return () => {
2290
+ listeners.delete(listener);
2291
+ };
2292
+ }
2293
+ };
2294
+ };
2221
2295
  // src/client/opsActionCenter.ts
2222
2296
  var recordVoiceOpsActionResult = async (result, options = {}) => {
2223
2297
  if (options.auditPath === false) {
@@ -3221,10 +3295,113 @@ var defineVoiceProofTrendsElement = (tagName = "absolute-voice-proof-trends") =>
3221
3295
  }
3222
3296
  });
3223
3297
  };
3224
- // src/client/opsActionCenterWidget.ts
3225
- var DEFAULT_TITLE4 = "Voice Ops Action Center";
3226
- var DEFAULT_DESCRIPTION4 = "Run production voice proofs and operator actions from one primitive panel.";
3298
+ // src/client/readinessFailuresWidget.ts
3299
+ var DEFAULT_TITLE4 = "Readiness Gate Explanations";
3300
+ var DEFAULT_DESCRIPTION4 = "Structured reasons for calibrated production-readiness warnings and failures.";
3301
+ var DEFAULT_LINKS3 = [
3302
+ { href: "/production-readiness", label: "Readiness page" },
3303
+ { href: "/voice/slo-readiness-thresholds", label: "Gate thresholds" }
3304
+ ];
3227
3305
  var escapeHtml4 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
3306
+ var formatExplanationValue = (value, unit) => {
3307
+ if (value === undefined || value === null) {
3308
+ return "n/a";
3309
+ }
3310
+ const suffix = unit && unit !== "status" ? ` ${unit}` : "";
3311
+ return `${String(value)}${suffix}`;
3312
+ };
3313
+ var toFailureView = (check) => {
3314
+ const explanation = check.gateExplanation;
3315
+ if (!explanation || check.status === "pass") {
3316
+ return;
3317
+ }
3318
+ return {
3319
+ evidenceHref: explanation.evidenceHref ?? check.href,
3320
+ label: check.label,
3321
+ observed: formatExplanationValue(explanation.observed, explanation.unit),
3322
+ remediation: explanation.remediation,
3323
+ sourceHref: explanation.sourceHref,
3324
+ status: check.status,
3325
+ threshold: formatExplanationValue(explanation.threshold, explanation.unit),
3326
+ thresholdLabel: explanation.thresholdLabel ?? "Readiness threshold"
3327
+ };
3328
+ };
3329
+ var createVoiceReadinessFailuresViewModel = (snapshot, options = {}) => {
3330
+ const failures = snapshot.report?.checks.map(toFailureView).filter((value) => !!value) ?? [];
3331
+ const hasOpenIssues = failures.length > 0;
3332
+ return {
3333
+ description: options.description ?? DEFAULT_DESCRIPTION4,
3334
+ error: snapshot.error,
3335
+ failures,
3336
+ isLoading: snapshot.isLoading,
3337
+ label: snapshot.error ? "Unavailable" : snapshot.report ? hasOpenIssues ? `${failures.length} calibrated gate issue(s)` : "No calibrated gate issues" : snapshot.isLoading ? "Checking" : "No readiness report",
3338
+ links: options.links ?? DEFAULT_LINKS3,
3339
+ status: snapshot.error ? "error" : snapshot.report ? hasOpenIssues ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
3340
+ title: options.title ?? DEFAULT_TITLE4,
3341
+ updatedAt: snapshot.updatedAt
3342
+ };
3343
+ };
3344
+ var renderVoiceReadinessFailuresHTML = (snapshot, options = {}) => {
3345
+ const model = createVoiceReadinessFailuresViewModel(snapshot, options);
3346
+ const failures = model.failures.length ? `<div class="absolute-voice-readiness-failures__items">${model.failures.map((failure) => `<article class="absolute-voice-readiness-failures__item absolute-voice-readiness-failures__item--${escapeHtml4(failure.status)}">
3347
+ <span>${escapeHtml4(failure.status.toUpperCase())}</span>
3348
+ <strong>${escapeHtml4(failure.label)}</strong>
3349
+ <p>Observed ${escapeHtml4(failure.observed)} against ${escapeHtml4(failure.thresholdLabel)} ${escapeHtml4(failure.threshold)}.</p>
3350
+ <p>${escapeHtml4(failure.remediation)}</p>
3351
+ <p class="absolute-voice-readiness-failures__links">${failure.evidenceHref ? `<a href="${escapeHtml4(failure.evidenceHref)}">Evidence</a>` : ""}${failure.sourceHref ? `<a href="${escapeHtml4(failure.sourceHref)}">Threshold source</a>` : ""}</p>
3352
+ </article>`).join("")}</div>` : `<p class="absolute-voice-readiness-failures__empty">${model.error ? escapeHtml4(model.error) : "No calibrated readiness gate explanations are open."}</p>`;
3353
+ const links = model.links.length ? `<p class="absolute-voice-readiness-failures__links">${model.links.map((link) => `<a href="${escapeHtml4(link.href)}">${escapeHtml4(link.label)}</a>`).join("")}</p>` : "";
3354
+ return `<section class="absolute-voice-readiness-failures absolute-voice-readiness-failures--${escapeHtml4(model.status)}">
3355
+ <header class="absolute-voice-readiness-failures__header">
3356
+ <span class="absolute-voice-readiness-failures__eyebrow">${escapeHtml4(model.title)}</span>
3357
+ <strong class="absolute-voice-readiness-failures__label">${escapeHtml4(model.label)}</strong>
3358
+ </header>
3359
+ <p class="absolute-voice-readiness-failures__description">${escapeHtml4(model.description)}</p>
3360
+ ${failures}
3361
+ ${links}
3362
+ ${model.error ? `<p class="absolute-voice-readiness-failures__error">${escapeHtml4(model.error)}</p>` : ""}
3363
+ </section>`;
3364
+ };
3365
+ var getVoiceReadinessFailuresCSS = () => `.absolute-voice-readiness-failures{border:1px solid #fed7aa;border-radius:20px;background:#fff7ed;color:#1c1917;padding:18px;box-shadow:0 18px 40px rgba(234,88,12,.12);font-family:inherit}.absolute-voice-readiness-failures--ready{border-color:#86efac;background:#f0fdf4}.absolute-voice-readiness-failures--error{border-color:#fda4af;background:#fff1f2}.absolute-voice-readiness-failures__header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-readiness-failures__eyebrow{color:#9a3412;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-readiness-failures__label{font-size:24px;line-height:1}.absolute-voice-readiness-failures__description,.absolute-voice-readiness-failures__empty{color:#57534e}.absolute-voice-readiness-failures__items{display:grid;gap:10px;margin-top:14px}.absolute-voice-readiness-failures__item{background:white;border:1px solid #fed7aa;border-radius:16px;padding:12px}.absolute-voice-readiness-failures__item--fail{border-color:#fb7185}.absolute-voice-readiness-failures__item span{color:#9a3412;display:block;font-size:12px;font-weight:900;text-transform:uppercase}.absolute-voice-readiness-failures__item strong{display:block;font-size:18px;margin-top:4px}.absolute-voice-readiness-failures__item p{margin:.45rem 0 0}.absolute-voice-readiness-failures__links{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 0}.absolute-voice-readiness-failures__links a{border:1px solid #fdba74;border-radius:999px;color:#9a3412;font-weight:800;padding:6px 10px;text-decoration:none}.absolute-voice-readiness-failures__error{color:#9f1239;font-weight:700}`;
3366
+ var mountVoiceReadinessFailures = (element, path = "/api/production-readiness", options = {}) => {
3367
+ const store = createVoiceReadinessFailuresStore(path, options);
3368
+ const render = () => {
3369
+ element.innerHTML = renderVoiceReadinessFailuresHTML(store.getSnapshot(), options);
3370
+ };
3371
+ const unsubscribe = store.subscribe(render);
3372
+ render();
3373
+ store.refresh().catch(() => {});
3374
+ return {
3375
+ close: () => {
3376
+ unsubscribe();
3377
+ store.close();
3378
+ },
3379
+ refresh: store.refresh
3380
+ };
3381
+ };
3382
+ var defineVoiceReadinessFailuresElement = (tagName = "absolute-voice-readiness-failures") => {
3383
+ if (typeof window === "undefined" || typeof customElements === "undefined" || customElements.get(tagName)) {
3384
+ return;
3385
+ }
3386
+ customElements.define(tagName, class AbsoluteVoiceReadinessFailuresElement extends HTMLElement {
3387
+ mounted;
3388
+ connectedCallback() {
3389
+ this.mounted = mountVoiceReadinessFailures(this, this.getAttribute("path") ?? "/api/production-readiness", {
3390
+ description: this.getAttribute("description") ?? undefined,
3391
+ intervalMs: Number(this.getAttribute("interval-ms") ?? 0) || undefined,
3392
+ title: this.getAttribute("title") ?? undefined
3393
+ });
3394
+ }
3395
+ disconnectedCallback() {
3396
+ this.mounted?.close();
3397
+ this.mounted = undefined;
3398
+ }
3399
+ });
3400
+ };
3401
+ // src/client/opsActionCenterWidget.ts
3402
+ var DEFAULT_TITLE5 = "Voice Ops Action Center";
3403
+ var DEFAULT_DESCRIPTION5 = "Run production voice proofs and operator actions from one primitive panel.";
3404
+ var escapeHtml5 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
3228
3405
  var createVoiceOpsActionCenterViewModel = (snapshot, options = {}) => {
3229
3406
  const status = snapshot.error ? "error" : snapshot.isRunning ? "running" : snapshot.lastResult ? "completed" : "ready";
3230
3407
  return {
@@ -3235,29 +3412,29 @@ var createVoiceOpsActionCenterViewModel = (snapshot, options = {}) => {
3235
3412
  isRunning: snapshot.runningActionId === action.id,
3236
3413
  label: action.label
3237
3414
  })),
3238
- description: options.description ?? DEFAULT_DESCRIPTION4,
3415
+ description: options.description ?? DEFAULT_DESCRIPTION5,
3239
3416
  error: snapshot.error,
3240
3417
  isRunning: snapshot.isRunning,
3241
3418
  label: status === "error" ? "Needs attention" : status === "running" ? "Running" : status === "completed" ? "Action completed" : "Ready",
3242
3419
  lastResultLabel: snapshot.lastResult ? `${snapshot.lastResult.actionId} returned HTTP ${snapshot.lastResult.status}` : "No action has run yet.",
3243
3420
  status,
3244
- title: options.title ?? DEFAULT_TITLE4
3421
+ title: options.title ?? DEFAULT_TITLE5
3245
3422
  };
3246
3423
  };
3247
3424
  var renderVoiceOpsActionCenterHTML = (snapshot, options = {}) => {
3248
3425
  const model = createVoiceOpsActionCenterViewModel(snapshot, options);
3249
- const actions = model.actions.map((action) => `<button type="button" data-absolute-voice-ops-action="${escapeHtml4(action.id)}"${action.disabled ? " disabled" : ""}>
3250
- ${escapeHtml4(action.isRunning ? "Working..." : action.label)}
3426
+ const actions = model.actions.map((action) => `<button type="button" data-absolute-voice-ops-action="${escapeHtml5(action.id)}"${action.disabled ? " disabled" : ""}>
3427
+ ${escapeHtml5(action.isRunning ? "Working..." : action.label)}
3251
3428
  </button>`).join("");
3252
- return `<section class="absolute-voice-ops-action-center absolute-voice-ops-action-center--${escapeHtml4(model.status)}">
3429
+ return `<section class="absolute-voice-ops-action-center absolute-voice-ops-action-center--${escapeHtml5(model.status)}">
3253
3430
  <header class="absolute-voice-ops-action-center__header">
3254
- <span class="absolute-voice-ops-action-center__eyebrow">${escapeHtml4(model.title)}</span>
3255
- <strong class="absolute-voice-ops-action-center__label">${escapeHtml4(model.label)}</strong>
3431
+ <span class="absolute-voice-ops-action-center__eyebrow">${escapeHtml5(model.title)}</span>
3432
+ <strong class="absolute-voice-ops-action-center__label">${escapeHtml5(model.label)}</strong>
3256
3433
  </header>
3257
- <p class="absolute-voice-ops-action-center__description">${escapeHtml4(model.description)}</p>
3434
+ <p class="absolute-voice-ops-action-center__description">${escapeHtml5(model.description)}</p>
3258
3435
  <div class="absolute-voice-ops-action-center__actions">${actions}</div>
3259
- <p class="absolute-voice-ops-action-center__result">${escapeHtml4(model.lastResultLabel)}</p>
3260
- ${model.error ? `<p class="absolute-voice-ops-action-center__error">${escapeHtml4(model.error)}</p>` : ""}
3436
+ <p class="absolute-voice-ops-action-center__result">${escapeHtml5(model.lastResultLabel)}</p>
3437
+ ${model.error ? `<p class="absolute-voice-ops-action-center__error">${escapeHtml5(model.error)}</p>` : ""}
3261
3438
  </section>`;
3262
3439
  };
3263
3440
  var getVoiceOpsActionCenterCSS = () => `.absolute-voice-ops-action-center{border:1px solid #d5cbb8;border-radius:20px;background:#fffaf1;color:#17130b;padding:18px;box-shadow:0 18px 40px rgba(58,42,16,.12);font-family:inherit}.absolute-voice-ops-action-center--error{border-color:#f2a7a7;background:#fff5f3}.absolute-voice-ops-action-center__header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-ops-action-center__eyebrow{color:#725d37;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-ops-action-center__label{font-size:28px;line-height:1}.absolute-voice-ops-action-center__description,.absolute-voice-ops-action-center__result{color:#5b4b2f;margin:12px 0 0}.absolute-voice-ops-action-center__actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.absolute-voice-ops-action-center__actions button{background:#7c4a03;border:0;border-radius:999px;color:#fff8e8;cursor:pointer;font:inherit;font-weight:800;padding:8px 12px}.absolute-voice-ops-action-center__actions button:disabled{cursor:not-allowed;opacity:.5}.absolute-voice-ops-action-center__error{color:#9f1239;font-weight:700}`;
@@ -3858,7 +4035,7 @@ var exportVoiceTrace = async (input) => {
3858
4035
  };
3859
4036
  };
3860
4037
  var toNumber = (value) => typeof value === "number" && Number.isFinite(value) ? value : 0;
3861
- var escapeHtml5 = (value) => value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
4038
+ var escapeHtml6 = (value) => value.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
3862
4039
  var formatTraceValue = (value) => {
3863
4040
  if (value === undefined || value === null) {
3864
4041
  return "";
@@ -4138,10 +4315,10 @@ var renderVoiceTraceHTML = (events, options = {}) => {
4138
4315
  const offset = summary.startedAt === undefined ? event.at : Math.max(0, event.at - summary.startedAt);
4139
4316
  return [
4140
4317
  "<tr>",
4141
- `<td>${escapeHtml5(String(offset))}</td>`,
4142
- `<td>${escapeHtml5(event.type)}</td>`,
4143
- `<td>${escapeHtml5(event.turnId ?? "")}</td>`,
4144
- `<td><code>${escapeHtml5(JSON.stringify(event.payload))}</code></td>`,
4318
+ `<td>${escapeHtml6(String(offset))}</td>`,
4319
+ `<td>${escapeHtml6(event.type)}</td>`,
4320
+ `<td>${escapeHtml6(event.turnId ?? "")}</td>`,
4321
+ `<td><code>${escapeHtml6(JSON.stringify(event.payload))}</code></td>`,
4145
4322
  "</tr>"
4146
4323
  ].join("");
4147
4324
  }).join(`
@@ -4152,7 +4329,7 @@ var renderVoiceTraceHTML = (events, options = {}) => {
4152
4329
  "<head>",
4153
4330
  '<meta charset="utf-8" />',
4154
4331
  '<meta name="viewport" content="width=device-width, initial-scale=1" />',
4155
- `<title>${escapeHtml5(options.title ?? "Voice Trace")}</title>`,
4332
+ `<title>${escapeHtml6(options.title ?? "Voice Trace")}</title>`,
4156
4333
  "<style>",
4157
4334
  "body{font-family:ui-sans-serif,system-ui,sans-serif;margin:2rem;line-height:1.45;background:#f8f7f2;color:#181713}",
4158
4335
  "main{max-width:1100px;margin:auto}",
@@ -4166,7 +4343,7 @@ var renderVoiceTraceHTML = (events, options = {}) => {
4166
4343
  "</style>",
4167
4344
  "</head>",
4168
4345
  "<body><main>",
4169
- `<h1>${escapeHtml5(options.title ?? `Voice Trace ${summary.sessionId ?? ""}`.trim())}</h1>`,
4346
+ `<h1>${escapeHtml6(options.title ?? `Voice Trace ${summary.sessionId ?? ""}`.trim())}</h1>`,
4170
4347
  `<p class="${evaluation.pass ? "pass" : "fail"}">QA: ${evaluation.pass ? "pass" : "fail"}</p>`,
4171
4348
  '<section class="summary">',
4172
4349
  `<div class="card"><strong>Events</strong><br>${summary.eventCount}</div>`,
@@ -4180,7 +4357,7 @@ var renderVoiceTraceHTML = (events, options = {}) => {
4180
4357
  eventRows,
4181
4358
  "</tbody></table>",
4182
4359
  "<h2>Markdown Export</h2>",
4183
- `<pre>${escapeHtml5(markdown)}</pre>`,
4360
+ `<pre>${escapeHtml6(markdown)}</pre>`,
4184
4361
  "</main></body></html>"
4185
4362
  ].join(`
4186
4363
  `);
@@ -4536,7 +4713,7 @@ var ACTION_LABELS = {
4536
4713
  "resume-assistant": "Resume assistant",
4537
4714
  tag: "Tag"
4538
4715
  };
4539
- var escapeHtml6 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
4716
+ var escapeHtml7 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
4540
4717
  var createVoiceLiveOpsInput = (action, input) => ({
4541
4718
  action,
4542
4719
  assignee: input.assignee,
@@ -4547,17 +4724,17 @@ var createVoiceLiveOpsInput = (action, input) => ({
4547
4724
  var renderVoiceLiveOpsHTML = (snapshot, options = {}) => {
4548
4725
  const sessionId = options.getSessionId?.() ?? "";
4549
4726
  const disabled = snapshot.isRunning || !sessionId;
4550
- const actions = VOICE_LIVE_OPS_ACTIONS.map((action) => `<button type="button" data-absolute-voice-live-ops-action="${escapeHtml6(action)}"${disabled ? " disabled" : ""}>${escapeHtml6(snapshot.runningAction === action ? "Running..." : ACTION_LABELS[action])}</button>`).join("");
4551
- const result = snapshot.error ? `<p class="absolute-voice-live-ops__error">${escapeHtml6(snapshot.error)}</p>` : snapshot.lastResult ? `<p class="absolute-voice-live-ops__result">Recorded ${escapeHtml6(snapshot.lastResult.action)}. Control: ${escapeHtml6(snapshot.lastResult.control.status)}.</p>` : '<p class="absolute-voice-live-ops__result">No live ops action has run yet.</p>';
4727
+ const actions = VOICE_LIVE_OPS_ACTIONS.map((action) => `<button type="button" data-absolute-voice-live-ops-action="${escapeHtml7(action)}"${disabled ? " disabled" : ""}>${escapeHtml7(snapshot.runningAction === action ? "Running..." : ACTION_LABELS[action])}</button>`).join("");
4728
+ const result = snapshot.error ? `<p class="absolute-voice-live-ops__error">${escapeHtml7(snapshot.error)}</p>` : snapshot.lastResult ? `<p class="absolute-voice-live-ops__result">Recorded ${escapeHtml7(snapshot.lastResult.action)}. Control: ${escapeHtml7(snapshot.lastResult.control.status)}.</p>` : '<p class="absolute-voice-live-ops__result">No live ops action has run yet.</p>';
4552
4729
  return `<section class="absolute-voice-live-ops">
4553
4730
  <header class="absolute-voice-live-ops__header">
4554
- <span>${escapeHtml6(options.title ?? "Live Ops")}</span>
4555
- <strong>${escapeHtml6(sessionId || "No active session")}</strong>
4731
+ <span>${escapeHtml7(options.title ?? "Live Ops")}</span>
4732
+ <strong>${escapeHtml7(sessionId || "No active session")}</strong>
4556
4733
  </header>
4557
- <p class="absolute-voice-live-ops__description">${escapeHtml6(options.description ?? "Pause, resume, take over, force handoff, or inject operator instructions during a live voice session.")}</p>
4558
- <label><span>Operator</span><input data-absolute-voice-live-ops-assignee value="${escapeHtml6(options.defaultAssignee ?? "operator")}" /></label>
4559
- <label><span>Tag / handoff target</span><input data-absolute-voice-live-ops-tag value="${escapeHtml6(options.defaultTag ?? "live-ops")}" /></label>
4560
- <label><span>Detail / instruction</span><input data-absolute-voice-live-ops-detail value="${escapeHtml6(options.defaultDetail ?? "Operator marked this live session.")}" /></label>
4734
+ <p class="absolute-voice-live-ops__description">${escapeHtml7(options.description ?? "Pause, resume, take over, force handoff, or inject operator instructions during a live voice session.")}</p>
4735
+ <label><span>Operator</span><input data-absolute-voice-live-ops-assignee value="${escapeHtml7(options.defaultAssignee ?? "operator")}" /></label>
4736
+ <label><span>Tag / handoff target</span><input data-absolute-voice-live-ops-tag value="${escapeHtml7(options.defaultTag ?? "live-ops")}" /></label>
4737
+ <label><span>Detail / instruction</span><input data-absolute-voice-live-ops-detail value="${escapeHtml7(options.defaultDetail ?? "Operator marked this live session.")}" /></label>
4561
4738
  <div class="absolute-voice-live-ops__actions">${actions}</div>
4562
4739
  ${result}
4563
4740
  </section>`;
@@ -4644,16 +4821,16 @@ var defineVoiceLiveOpsElement = (tagName = "absolute-voice-live-ops", options =
4644
4821
  });
4645
4822
  };
4646
4823
  // src/client/opsActionHistoryWidget.ts
4647
- var escapeHtml7 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
4824
+ var escapeHtml8 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
4648
4825
  var renderVoiceOpsActionHistoryWidgetHTML = (snapshot, options = {}) => {
4649
4826
  const report = snapshot.report;
4650
4827
  const entries = (report?.entries ?? []).slice(0, options.limit ?? 5);
4651
- const rows = entries.map((entry) => `<li class="absolute-voice-ops-action-history__entry absolute-voice-ops-action-history__entry--${entry.ok ? "success" : "error"}"><span>${escapeHtml7(entry.actionId)}</span><strong>${escapeHtml7(entry.ok ? "Success" : "Failed")}</strong><small>${escapeHtml7(new Date(entry.at).toLocaleString())}${entry.status ? ` \xB7 HTTP ${String(entry.status)}` : ""}</small></li>`).join("");
4828
+ const rows = entries.map((entry) => `<li class="absolute-voice-ops-action-history__entry absolute-voice-ops-action-history__entry--${entry.ok ? "success" : "error"}"><span>${escapeHtml8(entry.actionId)}</span><strong>${escapeHtml8(entry.ok ? "Success" : "Failed")}</strong><small>${escapeHtml8(new Date(entry.at).toLocaleString())}${entry.status ? ` \xB7 HTTP ${String(entry.status)}` : ""}</small></li>`).join("");
4652
4829
  return `<section class="absolute-voice-ops-action-history">
4653
- <header><span>Operator proof</span><strong>${escapeHtml7(options.title ?? "Action History")}</strong></header>
4830
+ <header><span>Operator proof</span><strong>${escapeHtml8(options.title ?? "Action History")}</strong></header>
4654
4831
  <p>${String(report?.total ?? 0)} action(s), ${String(report?.failed ?? 0)} failed.</p>
4655
4832
  <ul>${rows || "<li>No operator actions recorded yet.</li>"}</ul>
4656
- ${snapshot.error ? `<p class="absolute-voice-ops-action-history__error">${escapeHtml7(snapshot.error)}</p>` : ""}
4833
+ ${snapshot.error ? `<p class="absolute-voice-ops-action-history__error">${escapeHtml8(snapshot.error)}</p>` : ""}
4657
4834
  </section>`;
4658
4835
  };
4659
4836
  var getVoiceOpsActionHistoryCSS = () => `.absolute-voice-ops-action-history{border:1px solid #d8d2c4;border-radius:20px;background:#fffaf0;color:#16130d;padding:18px;font-family:inherit}.absolute-voice-ops-action-history header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-ops-action-history header span{color:#73664f;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-ops-action-history header strong{font-size:24px}.absolute-voice-ops-action-history p{color:#514733}.absolute-voice-ops-action-history ul{display:grid;gap:8px;list-style:none;margin:12px 0 0;padding:0}.absolute-voice-ops-action-history__entry{background:#fff;border:1px solid #eee4d2;border-radius:14px;display:grid;gap:3px;padding:10px 12px}.absolute-voice-ops-action-history__entry--error{border-color:#f2a7a7}.absolute-voice-ops-action-history__entry span{font-weight:800}.absolute-voice-ops-action-history__entry small{color:#655944}.absolute-voice-ops-action-history__error{color:#9f1239;font-weight:700}`;
@@ -4674,9 +4851,9 @@ var mountVoiceOpsActionHistory = (element, path = "/api/voice/ops-actions/histor
4674
4851
  };
4675
4852
  };
4676
4853
  // src/client/deliveryRuntimeWidget.ts
4677
- var DEFAULT_TITLE5 = "Voice Delivery Runtime";
4678
- var DEFAULT_DESCRIPTION5 = "Audit and trace delivery worker health from your AbsoluteJS voice app.";
4679
- var escapeHtml8 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
4854
+ var DEFAULT_TITLE6 = "Voice Delivery Runtime";
4855
+ var DEFAULT_DESCRIPTION6 = "Audit and trace delivery worker health from your AbsoluteJS voice app.";
4856
+ var escapeHtml9 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
4680
4857
  var createSurface = (id, summary) => {
4681
4858
  if (!summary) {
4682
4859
  return {
@@ -4710,7 +4887,7 @@ var createVoiceDeliveryRuntimeViewModel = (snapshot, options = {}) => {
4710
4887
  ];
4711
4888
  const hasWarnings = surfaces.some((surface) => surface.status === "warn");
4712
4889
  return {
4713
- description: options.description ?? DEFAULT_DESCRIPTION5,
4890
+ description: options.description ?? DEFAULT_DESCRIPTION6,
4714
4891
  error: snapshot.error,
4715
4892
  actionError: snapshot.actionError,
4716
4893
  actionStatus: snapshot.actionStatus,
@@ -4719,32 +4896,32 @@ var createVoiceDeliveryRuntimeViewModel = (snapshot, options = {}) => {
4719
4896
  label: snapshot.error ? "Unavailable" : report ? report.isRunning ? "Running" : "Stopped" : "Checking",
4720
4897
  status: snapshot.error ? "error" : report ? hasWarnings ? "warn" : "pass" : "loading",
4721
4898
  surfaces,
4722
- title: options.title ?? DEFAULT_TITLE5,
4899
+ title: options.title ?? DEFAULT_TITLE6,
4723
4900
  updatedAt: snapshot.updatedAt
4724
4901
  };
4725
4902
  };
4726
4903
  var renderVoiceDeliveryRuntimeHTML = (snapshot, options = {}) => {
4727
4904
  const model = createVoiceDeliveryRuntimeViewModel(snapshot, options);
4728
- const surfaces = model.surfaces.map((surface) => `<li class="absolute-voice-delivery-runtime__surface absolute-voice-delivery-runtime__surface--${escapeHtml8(surface.status)}">
4729
- <span>${escapeHtml8(surface.label)}</span>
4730
- <strong>${escapeHtml8(surface.detail)}</strong>
4905
+ const surfaces = model.surfaces.map((surface) => `<li class="absolute-voice-delivery-runtime__surface absolute-voice-delivery-runtime__surface--${escapeHtml9(surface.status)}">
4906
+ <span>${escapeHtml9(surface.label)}</span>
4907
+ <strong>${escapeHtml9(surface.detail)}</strong>
4731
4908
  <small>${String(surface.failed)} failed &middot; ${String(surface.deadLettered)} dead-lettered</small>
4732
4909
  </li>`).join("");
4733
4910
  const actions = options.includeActions === false ? "" : `<div class="absolute-voice-delivery-runtime__actions">
4734
4911
  <button type="button" data-absolute-voice-delivery-runtime-action="tick">${model.actionStatus === "running" ? "Working..." : "Tick workers"}</button>
4735
4912
  <button type="button" data-absolute-voice-delivery-runtime-action="requeue-dead-letters"${model.surfaces.some((surface) => surface.deadLettered > 0) ? "" : " disabled"}>Requeue dead letters</button>
4736
4913
  </div>`;
4737
- const actionError = model.actionError ? `<p class="absolute-voice-delivery-runtime__error">${escapeHtml8(model.actionError)}</p>` : "";
4738
- return `<section class="absolute-voice-delivery-runtime absolute-voice-delivery-runtime--${escapeHtml8(model.status)}">
4914
+ const actionError = model.actionError ? `<p class="absolute-voice-delivery-runtime__error">${escapeHtml9(model.actionError)}</p>` : "";
4915
+ return `<section class="absolute-voice-delivery-runtime absolute-voice-delivery-runtime--${escapeHtml9(model.status)}">
4739
4916
  <header class="absolute-voice-delivery-runtime__header">
4740
- <span class="absolute-voice-delivery-runtime__eyebrow">${escapeHtml8(model.title)}</span>
4741
- <strong class="absolute-voice-delivery-runtime__label">${escapeHtml8(model.label)}</strong>
4917
+ <span class="absolute-voice-delivery-runtime__eyebrow">${escapeHtml9(model.title)}</span>
4918
+ <strong class="absolute-voice-delivery-runtime__label">${escapeHtml9(model.label)}</strong>
4742
4919
  </header>
4743
- <p class="absolute-voice-delivery-runtime__description">${escapeHtml8(model.description)}</p>
4920
+ <p class="absolute-voice-delivery-runtime__description">${escapeHtml9(model.description)}</p>
4744
4921
  <ul class="absolute-voice-delivery-runtime__surfaces">${surfaces}</ul>
4745
4922
  ${actions}
4746
4923
  ${actionError}
4747
- ${model.error ? `<p class="absolute-voice-delivery-runtime__error">${escapeHtml8(model.error)}</p>` : ""}
4924
+ ${model.error ? `<p class="absolute-voice-delivery-runtime__error">${escapeHtml9(model.error)}</p>` : ""}
4748
4925
  </section>`;
4749
4926
  };
4750
4927
  var getVoiceDeliveryRuntimeCSS = () => `.absolute-voice-delivery-runtime{border:1px solid #c9d8cf;border-radius:20px;background:#f6fff9;color:#0d1b12;padding:18px;box-shadow:0 18px 40px rgba(19,55,35,.12);font-family:inherit}.absolute-voice-delivery-runtime--warn,.absolute-voice-delivery-runtime--error{border-color:#f2b56b;background:#fff9ed}.absolute-voice-delivery-runtime__header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-delivery-runtime__eyebrow{color:#4e6b59;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-delivery-runtime__label{font-size:28px;line-height:1}.absolute-voice-delivery-runtime__description{color:#33483b;margin:12px 0 0}.absolute-voice-delivery-runtime__surfaces{display:grid;gap:8px;list-style:none;margin:16px 0 0;padding:0}.absolute-voice-delivery-runtime__surface{background:#fff;border:1px solid #d9eadf;border-radius:14px;display:grid;gap:4px;padding:10px 12px}.absolute-voice-delivery-runtime__surface--warn{border-color:#f2b56b}.absolute-voice-delivery-runtime__surface--disabled{opacity:.72}.absolute-voice-delivery-runtime__surface span,.absolute-voice-delivery-runtime__surface small{color:#587063}.absolute-voice-delivery-runtime__actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.absolute-voice-delivery-runtime__actions button{background:#134e2d;border:0;border-radius:999px;color:#f6fff9;cursor:pointer;font:inherit;font-weight:800;padding:8px 12px}.absolute-voice-delivery-runtime__actions button:disabled{cursor:not-allowed;opacity:.48}.absolute-voice-delivery-runtime__error{color:#9f1239;font-weight:700}`;
@@ -4880,9 +5057,9 @@ var createVoiceRoutingStatusStore = (path = "/api/routing/latest", options = {})
4880
5057
  };
4881
5058
  };
4882
5059
  // src/client/routingStatusWidget.ts
4883
- var DEFAULT_TITLE6 = "Voice Routing";
4884
- var DEFAULT_DESCRIPTION6 = "Latest provider routing decision from the self-hosted trace store.";
4885
- var escapeHtml9 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
5060
+ var DEFAULT_TITLE7 = "Voice Routing";
5061
+ var DEFAULT_DESCRIPTION7 = "Latest provider routing decision from the self-hosted trace store.";
5062
+ var escapeHtml10 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
4886
5063
  var formatValue = (value, fallback = "None") => typeof value === "string" && value.trim() ? value : typeof value === "number" && Number.isFinite(value) ? String(value) : fallback;
4887
5064
  var createVoiceRoutingStatusViewModel = (snapshot, options = {}) => {
4888
5065
  const decision = snapshot.decision;
@@ -4906,30 +5083,30 @@ var createVoiceRoutingStatusViewModel = (snapshot, options = {}) => {
4906
5083
  ] : [];
4907
5084
  return {
4908
5085
  decision,
4909
- description: options.description ?? DEFAULT_DESCRIPTION6,
5086
+ description: options.description ?? DEFAULT_DESCRIPTION7,
4910
5087
  error: snapshot.error,
4911
5088
  isLoading: snapshot.isLoading,
4912
5089
  label: snapshot.error ? "Unavailable" : decision ? `${formatValue(decision.kind).toUpperCase()} ${formatValue(decision.status, "unknown")}` : snapshot.isLoading ? "Checking" : "No routing yet",
4913
5090
  rows,
4914
5091
  status: snapshot.error ? "error" : decision ? "ready" : snapshot.isLoading ? "loading" : "empty",
4915
- title: options.title ?? DEFAULT_TITLE6,
5092
+ title: options.title ?? DEFAULT_TITLE7,
4916
5093
  updatedAt: snapshot.updatedAt
4917
5094
  };
4918
5095
  };
4919
5096
  var renderVoiceRoutingStatusHTML = (snapshot, options = {}) => {
4920
5097
  const model = createVoiceRoutingStatusViewModel(snapshot, options);
4921
5098
  const rows = model.rows.length ? `<div class="absolute-voice-routing-status__grid">${model.rows.map((row) => `<div>
4922
- <span>${escapeHtml9(row.label)}</span>
4923
- <strong>${escapeHtml9(row.value)}</strong>
5099
+ <span>${escapeHtml10(row.label)}</span>
5100
+ <strong>${escapeHtml10(row.value)}</strong>
4924
5101
  </div>`).join("")}</div>` : '<p class="absolute-voice-routing-status__empty">Start a voice session to see the selected provider.</p>';
4925
- return `<section class="absolute-voice-routing-status absolute-voice-routing-status--${escapeHtml9(model.status)}">
5102
+ return `<section class="absolute-voice-routing-status absolute-voice-routing-status--${escapeHtml10(model.status)}">
4926
5103
  <header class="absolute-voice-routing-status__header">
4927
- <span class="absolute-voice-routing-status__eyebrow">${escapeHtml9(model.title)}</span>
4928
- <strong class="absolute-voice-routing-status__label">${escapeHtml9(model.label)}</strong>
5104
+ <span class="absolute-voice-routing-status__eyebrow">${escapeHtml10(model.title)}</span>
5105
+ <strong class="absolute-voice-routing-status__label">${escapeHtml10(model.label)}</strong>
4929
5106
  </header>
4930
- <p class="absolute-voice-routing-status__description">${escapeHtml9(model.description)}</p>
5107
+ <p class="absolute-voice-routing-status__description">${escapeHtml10(model.description)}</p>
4931
5108
  ${rows}
4932
- ${model.error ? `<p class="absolute-voice-routing-status__error">${escapeHtml9(model.error)}</p>` : ""}
5109
+ ${model.error ? `<p class="absolute-voice-routing-status__error">${escapeHtml10(model.error)}</p>` : ""}
4933
5110
  </section>`;
4934
5111
  };
4935
5112
  var getVoiceRoutingStatusCSS = () => `.absolute-voice-routing-status{border:1px solid #d8d2c4;border-radius:20px;background:#fffaf0;color:#16130d;padding:18px;box-shadow:0 18px 40px rgba(47,37,18,.12);font-family:inherit}.absolute-voice-routing-status--error{border-color:#f2a7a7;background:#fff5f3}.absolute-voice-routing-status__header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-routing-status__eyebrow{color:#73664f;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-routing-status__label{font-size:24px;line-height:1}.absolute-voice-routing-status__description{color:#514733;margin:12px 0 0}.absolute-voice-routing-status__grid{display:grid;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:14px}.absolute-voice-routing-status__grid div{background:#fff;border:1px solid #eee4d2;border-radius:14px;padding:10px 12px}.absolute-voice-routing-status__grid span{color:#655944;display:block;font-size:12px;margin-bottom:4px}.absolute-voice-routing-status__grid strong{overflow-wrap:anywhere}.absolute-voice-routing-status__empty{color:#655944;margin:14px 0 0}.absolute-voice-routing-status__error{color:#9f1239;font-weight:700}`;
@@ -5728,7 +5905,7 @@ var createVoiceProviderSimulationControlsStore = (options) => {
5728
5905
  };
5729
5906
  };
5730
5907
  // src/client/providerSimulationControlsWidget.ts
5731
- var escapeHtml10 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
5908
+ var escapeHtml11 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
5732
5909
  var formatKind = (kind) => (kind ?? "stt").toUpperCase();
5733
5910
  var createVoiceProviderSimulationControlsViewModel = (snapshot, options) => {
5734
5911
  const configuredProviders = options.providers.filter((provider) => provider.configured !== false);
@@ -5748,18 +5925,18 @@ var createVoiceProviderSimulationControlsViewModel = (snapshot, options) => {
5748
5925
  };
5749
5926
  var renderVoiceProviderSimulationControlsHTML = (snapshot, options) => {
5750
5927
  const model = createVoiceProviderSimulationControlsViewModel(snapshot, options);
5751
- const failureButtons = model.failureProviders.map((provider) => `<button type="button" data-voice-provider-fail="${escapeHtml10(provider.provider)}"${!model.canSimulateFailure || snapshot.isRunning ? " disabled" : ""}>Simulate ${escapeHtml10(provider.provider)} ${escapeHtml10(formatKind(options.kind))} failure</button>`).join("");
5752
- const recoveryButtons = model.providers.map((provider) => `<button type="button" data-voice-provider-recover="${escapeHtml10(provider.provider)}"${snapshot.isRunning ? " disabled" : ""}>Mark ${escapeHtml10(provider.provider)} recovered</button>`).join("");
5928
+ const failureButtons = model.failureProviders.map((provider) => `<button type="button" data-voice-provider-fail="${escapeHtml11(provider.provider)}"${!model.canSimulateFailure || snapshot.isRunning ? " disabled" : ""}>Simulate ${escapeHtml11(provider.provider)} ${escapeHtml11(formatKind(options.kind))} failure</button>`).join("");
5929
+ const recoveryButtons = model.providers.map((provider) => `<button type="button" data-voice-provider-recover="${escapeHtml11(provider.provider)}"${snapshot.isRunning ? " disabled" : ""}>Mark ${escapeHtml11(provider.provider)} recovered</button>`).join("");
5753
5930
  return `<section class="absolute-voice-provider-simulation absolute-voice-provider-simulation--${snapshot.error ? "error" : snapshot.isRunning ? "running" : "ready"}">
5754
5931
  <header class="absolute-voice-provider-simulation__header">
5755
- <span class="absolute-voice-provider-simulation__eyebrow">${escapeHtml10(model.title)}</span>
5756
- <strong class="absolute-voice-provider-simulation__label">${escapeHtml10(model.label)}</strong>
5932
+ <span class="absolute-voice-provider-simulation__eyebrow">${escapeHtml11(model.title)}</span>
5933
+ <strong class="absolute-voice-provider-simulation__label">${escapeHtml11(model.label)}</strong>
5757
5934
  </header>
5758
- <p class="absolute-voice-provider-simulation__description">${escapeHtml10(model.description)}</p>
5759
- ${model.canSimulateFailure ? "" : `<p class="absolute-voice-provider-simulation__empty">${escapeHtml10(options.fallbackRequiredMessage ?? "Configure fallback providers before simulating failure.")}</p>`}
5935
+ <p class="absolute-voice-provider-simulation__description">${escapeHtml11(model.description)}</p>
5936
+ ${model.canSimulateFailure ? "" : `<p class="absolute-voice-provider-simulation__empty">${escapeHtml11(options.fallbackRequiredMessage ?? "Configure fallback providers before simulating failure.")}</p>`}
5760
5937
  <div class="absolute-voice-provider-simulation__actions">${failureButtons}${recoveryButtons}</div>
5761
- ${snapshot.error ? `<p class="absolute-voice-provider-simulation__error">${escapeHtml10(snapshot.error)}</p>` : ""}
5762
- ${model.resultText ? `<pre class="absolute-voice-provider-simulation__result">${escapeHtml10(model.resultText)}</pre>` : ""}
5938
+ ${snapshot.error ? `<p class="absolute-voice-provider-simulation__error">${escapeHtml11(snapshot.error)}</p>` : ""}
5939
+ ${model.resultText ? `<pre class="absolute-voice-provider-simulation__result">${escapeHtml11(model.resultText)}</pre>` : ""}
5763
5940
  </section>`;
5764
5941
  };
5765
5942
  var bindVoiceProviderSimulationControls = (element, store) => {
@@ -5824,9 +6001,9 @@ var defineVoiceProviderSimulationControlsElement = (tagName = "absolute-voice-pr
5824
6001
  });
5825
6002
  };
5826
6003
  // src/client/providerStatusWidget.ts
5827
- var DEFAULT_TITLE7 = "Voice Providers";
5828
- var DEFAULT_DESCRIPTION7 = "Live provider health, fallback counts, latency, and suppression state from your self-hosted trace store.";
5829
- var escapeHtml11 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
6004
+ var DEFAULT_TITLE8 = "Voice Providers";
6005
+ var DEFAULT_DESCRIPTION8 = "Live provider health, fallback counts, latency, and suppression state from your self-hosted trace store.";
6006
+ var escapeHtml12 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
5830
6007
  var formatProvider = (provider) => provider.split(/[-_\s]+/).filter(Boolean).map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ") || provider;
5831
6008
  var formatStatus2 = (status) => status.split("-").map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ");
5832
6009
  var formatLatency = (value) => typeof value === "number" ? `${value}ms` : "No samples";
@@ -5870,37 +6047,37 @@ var createVoiceProviderStatusViewModel = (snapshot, options = {}) => {
5870
6047
  const warningCount = providers.filter((provider) => isWarningStatus(provider.status)).length;
5871
6048
  const healthyCount = providers.filter((provider) => provider.status === "healthy").length;
5872
6049
  return {
5873
- description: options.description ?? DEFAULT_DESCRIPTION7,
6050
+ description: options.description ?? DEFAULT_DESCRIPTION8,
5874
6051
  error: snapshot.error,
5875
6052
  isLoading: snapshot.isLoading,
5876
6053
  label: snapshot.error ? "Unavailable" : providers.length ? warningCount > 0 ? `${warningCount} needs attention` : `${healthyCount} healthy` : snapshot.isLoading ? "Checking" : "No provider traffic",
5877
6054
  providers,
5878
6055
  status: snapshot.error ? "error" : providers.length ? warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
5879
- title: options.title ?? DEFAULT_TITLE7,
6056
+ title: options.title ?? DEFAULT_TITLE8,
5880
6057
  updatedAt: snapshot.updatedAt
5881
6058
  };
5882
6059
  };
5883
6060
  var renderVoiceProviderStatusHTML = (snapshot, options = {}) => {
5884
6061
  const model = createVoiceProviderStatusViewModel(snapshot, options);
5885
- const providers = model.providers.length ? `<div class="absolute-voice-provider-status__providers">${model.providers.map((provider) => `<article class="absolute-voice-provider-status__provider absolute-voice-provider-status__provider--${escapeHtml11(provider.status)}">
6062
+ const providers = model.providers.length ? `<div class="absolute-voice-provider-status__providers">${model.providers.map((provider) => `<article class="absolute-voice-provider-status__provider absolute-voice-provider-status__provider--${escapeHtml12(provider.status)}">
5886
6063
  <header>
5887
- <strong>${escapeHtml11(provider.label)}</strong>
5888
- <span>${escapeHtml11(formatStatus2(provider.status))}</span>
6064
+ <strong>${escapeHtml12(provider.label)}</strong>
6065
+ <span>${escapeHtml12(formatStatus2(provider.status))}</span>
5889
6066
  </header>
5890
- <p>${escapeHtml11(provider.detail)}</p>
6067
+ <p>${escapeHtml12(provider.detail)}</p>
5891
6068
  <dl>${provider.rows.map((row) => `<div>
5892
- <dt>${escapeHtml11(row.label)}</dt>
5893
- <dd>${escapeHtml11(row.value)}</dd>
6069
+ <dt>${escapeHtml12(row.label)}</dt>
6070
+ <dd>${escapeHtml12(row.value)}</dd>
5894
6071
  </div>`).join("")}</dl>
5895
6072
  </article>`).join("")}</div>` : '<p class="absolute-voice-provider-status__empty">Run voice traffic to see provider health.</p>';
5896
- return `<section class="absolute-voice-provider-status absolute-voice-provider-status--${escapeHtml11(model.status)}">
6073
+ return `<section class="absolute-voice-provider-status absolute-voice-provider-status--${escapeHtml12(model.status)}">
5897
6074
  <header class="absolute-voice-provider-status__header">
5898
- <span class="absolute-voice-provider-status__eyebrow">${escapeHtml11(model.title)}</span>
5899
- <strong class="absolute-voice-provider-status__label">${escapeHtml11(model.label)}</strong>
6075
+ <span class="absolute-voice-provider-status__eyebrow">${escapeHtml12(model.title)}</span>
6076
+ <strong class="absolute-voice-provider-status__label">${escapeHtml12(model.label)}</strong>
5900
6077
  </header>
5901
- <p class="absolute-voice-provider-status__description">${escapeHtml11(model.description)}</p>
6078
+ <p class="absolute-voice-provider-status__description">${escapeHtml12(model.description)}</p>
5902
6079
  ${providers}
5903
- ${model.error ? `<p class="absolute-voice-provider-status__error">${escapeHtml11(model.error)}</p>` : ""}
6080
+ ${model.error ? `<p class="absolute-voice-provider-status__error">${escapeHtml12(model.error)}</p>` : ""}
5904
6081
  </section>`;
5905
6082
  };
5906
6083
  var getVoiceProviderStatusCSS = () => `.absolute-voice-provider-status{border:1px solid #d8d2c4;border-radius:20px;background:#fffaf0;color:#16130d;padding:18px;box-shadow:0 18px 40px rgba(47,37,18,.12);font-family:inherit}.absolute-voice-provider-status--error,.absolute-voice-provider-status--warning{border-color:#f2a7a7;background:#fff5f3}.absolute-voice-provider-status__header,.absolute-voice-provider-status__provider header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-provider-status__eyebrow{color:#73664f;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-provider-status__label{font-size:24px;line-height:1}.absolute-voice-provider-status__description,.absolute-voice-provider-status__provider p,.absolute-voice-provider-status__provider dt,.absolute-voice-provider-status__empty{color:#514733}.absolute-voice-provider-status__providers{display:grid;gap:12px;margin-top:14px}.absolute-voice-provider-status__provider{background:#fff;border:1px solid #eee4d2;border-radius:16px;padding:14px}.absolute-voice-provider-status__provider--degraded,.absolute-voice-provider-status__provider--rate-limited,.absolute-voice-provider-status__provider--suppressed{border-color:#f2a7a7}.absolute-voice-provider-status__provider--recoverable{border-color:#fbbf24}.absolute-voice-provider-status__provider p{margin:10px 0}.absolute-voice-provider-status__provider dl{display:grid;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr));margin:0}.absolute-voice-provider-status__provider div{background:#fffaf0;border:1px solid #eee4d2;border-radius:12px;padding:8px}.absolute-voice-provider-status__provider dt{font-size:12px}.absolute-voice-provider-status__provider dd{font-weight:800;margin:4px 0 0}.absolute-voice-provider-status__empty{margin:14px 0 0}.absolute-voice-provider-status__error{color:#9f1239;font-weight:700}`;
@@ -5941,9 +6118,9 @@ var defineVoiceProviderStatusElement = (tagName = "absolute-voice-provider-statu
5941
6118
  });
5942
6119
  };
5943
6120
  // src/client/providerCapabilitiesWidget.ts
5944
- var DEFAULT_TITLE8 = "Provider Capabilities";
5945
- var DEFAULT_DESCRIPTION8 = "Configured, selected, and healthy voice providers for this deployment.";
5946
- var escapeHtml12 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
6121
+ var DEFAULT_TITLE9 = "Provider Capabilities";
6122
+ var DEFAULT_DESCRIPTION9 = "Configured, selected, and healthy voice providers for this deployment.";
6123
+ var escapeHtml13 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
5947
6124
  var formatProvider2 = (provider) => provider.split(/[-_\s]+/).filter(Boolean).map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ") || provider;
5948
6125
  var formatKind2 = (kind) => kind.toUpperCase();
5949
6126
  var formatStatus3 = (status) => status.split("-").map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ");
@@ -5987,36 +6164,36 @@ var createVoiceProviderCapabilitiesViewModel = (snapshot, options = {}) => {
5987
6164
  const selectedCount = snapshot.report?.selected ?? capabilities.filter((capability) => capability.selected).length;
5988
6165
  return {
5989
6166
  capabilities,
5990
- description: options.description ?? DEFAULT_DESCRIPTION8,
6167
+ description: options.description ?? DEFAULT_DESCRIPTION9,
5991
6168
  error: snapshot.error,
5992
6169
  isLoading: snapshot.isLoading,
5993
6170
  label: snapshot.error ? "Unavailable" : capabilities.length ? warningCount > 0 ? `${warningCount} needs attention` : `${selectedCount} selected` : snapshot.isLoading ? "Checking" : "No capabilities",
5994
6171
  status: snapshot.error ? "error" : capabilities.length ? warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
5995
- title: options.title ?? DEFAULT_TITLE8,
6172
+ title: options.title ?? DEFAULT_TITLE9,
5996
6173
  updatedAt: snapshot.updatedAt
5997
6174
  };
5998
6175
  };
5999
6176
  var renderVoiceProviderCapabilitiesHTML = (snapshot, options = {}) => {
6000
6177
  const model = createVoiceProviderCapabilitiesViewModel(snapshot, options);
6001
- const capabilities = model.capabilities.length ? `<div class="absolute-voice-provider-capabilities__providers">${model.capabilities.map((capability) => `<article class="absolute-voice-provider-capabilities__provider absolute-voice-provider-capabilities__provider--${escapeHtml12(capability.status)}">
6178
+ const capabilities = model.capabilities.length ? `<div class="absolute-voice-provider-capabilities__providers">${model.capabilities.map((capability) => `<article class="absolute-voice-provider-capabilities__provider absolute-voice-provider-capabilities__provider--${escapeHtml13(capability.status)}">
6002
6179
  <header>
6003
- <strong>${escapeHtml12(capability.label)}</strong>
6004
- <span>${escapeHtml12(formatStatus3(capability.status))}</span>
6180
+ <strong>${escapeHtml13(capability.label)}</strong>
6181
+ <span>${escapeHtml13(formatStatus3(capability.status))}</span>
6005
6182
  </header>
6006
- <p>${escapeHtml12(capability.detail)}</p>
6183
+ <p>${escapeHtml13(capability.detail)}</p>
6007
6184
  <dl>${capability.rows.map((row) => `<div>
6008
- <dt>${escapeHtml12(row.label)}</dt>
6009
- <dd>${escapeHtml12(row.value)}</dd>
6185
+ <dt>${escapeHtml13(row.label)}</dt>
6186
+ <dd>${escapeHtml13(row.value)}</dd>
6010
6187
  </div>`).join("")}</dl>
6011
6188
  </article>`).join("")}</div>` : '<p class="absolute-voice-provider-capabilities__empty">Configure provider capabilities to see deployment coverage.</p>';
6012
- return `<section class="absolute-voice-provider-capabilities absolute-voice-provider-capabilities--${escapeHtml12(model.status)}">
6189
+ return `<section class="absolute-voice-provider-capabilities absolute-voice-provider-capabilities--${escapeHtml13(model.status)}">
6013
6190
  <header class="absolute-voice-provider-capabilities__header">
6014
- <span class="absolute-voice-provider-capabilities__eyebrow">${escapeHtml12(model.title)}</span>
6015
- <strong class="absolute-voice-provider-capabilities__label">${escapeHtml12(model.label)}</strong>
6191
+ <span class="absolute-voice-provider-capabilities__eyebrow">${escapeHtml13(model.title)}</span>
6192
+ <strong class="absolute-voice-provider-capabilities__label">${escapeHtml13(model.label)}</strong>
6016
6193
  </header>
6017
- <p class="absolute-voice-provider-capabilities__description">${escapeHtml12(model.description)}</p>
6194
+ <p class="absolute-voice-provider-capabilities__description">${escapeHtml13(model.description)}</p>
6018
6195
  ${capabilities}
6019
- ${model.error ? `<p class="absolute-voice-provider-capabilities__error">${escapeHtml12(model.error)}</p>` : ""}
6196
+ ${model.error ? `<p class="absolute-voice-provider-capabilities__error">${escapeHtml13(model.error)}</p>` : ""}
6020
6197
  </section>`;
6021
6198
  };
6022
6199
  var getVoiceProviderCapabilitiesCSS = () => `.absolute-voice-provider-capabilities{border:1px solid #bfd7ea;border-radius:20px;background:#f6fbff;color:#08131f;padding:18px;box-shadow:0 18px 40px rgba(14,51,78,.12);font-family:inherit}.absolute-voice-provider-capabilities--error,.absolute-voice-provider-capabilities--warning{border-color:#f2a7a7;background:#fff5f3}.absolute-voice-provider-capabilities__header,.absolute-voice-provider-capabilities__provider header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-provider-capabilities__eyebrow{color:#255f85;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-provider-capabilities__label{font-size:24px;line-height:1}.absolute-voice-provider-capabilities__description,.absolute-voice-provider-capabilities__provider p,.absolute-voice-provider-capabilities__provider dt,.absolute-voice-provider-capabilities__empty{color:#405467}.absolute-voice-provider-capabilities__providers{display:grid;gap:12px;margin-top:14px}.absolute-voice-provider-capabilities__provider{background:#fff;border:1px solid #d7e7f3;border-radius:16px;padding:14px}.absolute-voice-provider-capabilities__provider--selected,.absolute-voice-provider-capabilities__provider--healthy{border-color:#86efac}.absolute-voice-provider-capabilities__provider--degraded,.absolute-voice-provider-capabilities__provider--rate-limited,.absolute-voice-provider-capabilities__provider--suppressed,.absolute-voice-provider-capabilities__provider--unconfigured{border-color:#f2a7a7}.absolute-voice-provider-capabilities__provider p{margin:10px 0}.absolute-voice-provider-capabilities__provider dl{display:grid;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr));margin:0}.absolute-voice-provider-capabilities__provider div{background:#f6fbff;border:1px solid #d7e7f3;border-radius:12px;padding:8px}.absolute-voice-provider-capabilities__provider dt{font-size:12px}.absolute-voice-provider-capabilities__provider dd{font-weight:800;margin:4px 0 0}.absolute-voice-provider-capabilities__empty{margin:14px 0 0}.absolute-voice-provider-capabilities__error{color:#9f1239;font-weight:700}`;
@@ -6057,9 +6234,9 @@ var defineVoiceProviderCapabilitiesElement = (tagName = "absolute-voice-provider
6057
6234
  });
6058
6235
  };
6059
6236
  // src/client/providerContractsWidget.ts
6060
- var DEFAULT_TITLE9 = "Provider Contracts";
6061
- var DEFAULT_DESCRIPTION9 = "Production contract coverage for provider env, latency, fallback, streaming, and capabilities.";
6062
- var escapeHtml13 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
6237
+ var DEFAULT_TITLE10 = "Provider Contracts";
6238
+ var DEFAULT_DESCRIPTION10 = "Production contract coverage for provider env, latency, fallback, streaming, and capabilities.";
6239
+ var escapeHtml14 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
6063
6240
  var formatProvider3 = (provider) => provider.split(/[-_\s]+/).filter(Boolean).map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ") || provider;
6064
6241
  var formatStatus4 = (status) => status.split("-").map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ");
6065
6242
  var contractDetail = (row) => {
@@ -6091,38 +6268,38 @@ var createVoiceProviderContractsViewModel = (snapshot, options = {}) => {
6091
6268
  }));
6092
6269
  const warningCount = snapshot.report ? snapshot.report.failed + snapshot.report.warned : rows.filter((row) => row.status !== "pass").length;
6093
6270
  return {
6094
- description: options.description ?? DEFAULT_DESCRIPTION9,
6271
+ description: options.description ?? DEFAULT_DESCRIPTION10,
6095
6272
  error: snapshot.error,
6096
6273
  isLoading: snapshot.isLoading,
6097
6274
  label: snapshot.error ? "Unavailable" : rows.length ? warningCount > 0 ? `${warningCount} needs attention` : `${rows.length} passing` : snapshot.isLoading ? "Checking" : "No contracts",
6098
6275
  rows,
6099
6276
  status: snapshot.error ? "error" : rows.length ? warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
6100
- title: options.title ?? DEFAULT_TITLE9,
6277
+ title: options.title ?? DEFAULT_TITLE10,
6101
6278
  updatedAt: snapshot.updatedAt
6102
6279
  };
6103
6280
  };
6104
6281
  var renderVoiceProviderContractsHTML = (snapshot, options = {}) => {
6105
6282
  const model = createVoiceProviderContractsViewModel(snapshot, options);
6106
- const rows = model.rows.length ? `<div class="absolute-voice-provider-contracts__rows">${model.rows.map((row) => `<article class="absolute-voice-provider-contracts__row absolute-voice-provider-contracts__row--${escapeHtml13(row.status)}">
6283
+ const rows = model.rows.length ? `<div class="absolute-voice-provider-contracts__rows">${model.rows.map((row) => `<article class="absolute-voice-provider-contracts__row absolute-voice-provider-contracts__row--${escapeHtml14(row.status)}">
6107
6284
  <header>
6108
- <strong>${escapeHtml13(row.label)}</strong>
6109
- <span>${escapeHtml13(formatStatus4(row.status))}</span>
6285
+ <strong>${escapeHtml14(row.label)}</strong>
6286
+ <span>${escapeHtml14(formatStatus4(row.status))}</span>
6110
6287
  </header>
6111
- <p>${escapeHtml13(row.detail)}</p>
6112
- ${row.remediations.length ? `<ul class="absolute-voice-provider-contracts__remediations">${row.remediations.map((remediation) => `<li>${remediation.href ? `<a href="${escapeHtml13(remediation.href)}">${escapeHtml13(remediation.label)}</a>` : `<strong>${escapeHtml13(remediation.label)}</strong>`}<span>${escapeHtml13(remediation.detail)}</span></li>`).join("")}</ul>` : ""}
6288
+ <p>${escapeHtml14(row.detail)}</p>
6289
+ ${row.remediations.length ? `<ul class="absolute-voice-provider-contracts__remediations">${row.remediations.map((remediation) => `<li>${remediation.href ? `<a href="${escapeHtml14(remediation.href)}">${escapeHtml14(remediation.label)}</a>` : `<strong>${escapeHtml14(remediation.label)}</strong>`}<span>${escapeHtml14(remediation.detail)}</span></li>`).join("")}</ul>` : ""}
6113
6290
  <dl>${row.rows.map((item) => `<div>
6114
- <dt>${escapeHtml13(item.label)}</dt>
6115
- <dd>${escapeHtml13(item.value)}</dd>
6291
+ <dt>${escapeHtml14(item.label)}</dt>
6292
+ <dd>${escapeHtml14(item.value)}</dd>
6116
6293
  </div>`).join("")}</dl>
6117
6294
  </article>`).join("")}</div>` : '<p class="absolute-voice-provider-contracts__empty">Configure provider contracts to see production coverage.</p>';
6118
- return `<section class="absolute-voice-provider-contracts absolute-voice-provider-contracts--${escapeHtml13(model.status)}">
6295
+ return `<section class="absolute-voice-provider-contracts absolute-voice-provider-contracts--${escapeHtml14(model.status)}">
6119
6296
  <header class="absolute-voice-provider-contracts__header">
6120
- <span class="absolute-voice-provider-contracts__eyebrow">${escapeHtml13(model.title)}</span>
6121
- <strong class="absolute-voice-provider-contracts__label">${escapeHtml13(model.label)}</strong>
6297
+ <span class="absolute-voice-provider-contracts__eyebrow">${escapeHtml14(model.title)}</span>
6298
+ <strong class="absolute-voice-provider-contracts__label">${escapeHtml14(model.label)}</strong>
6122
6299
  </header>
6123
- <p class="absolute-voice-provider-contracts__description">${escapeHtml13(model.description)}</p>
6300
+ <p class="absolute-voice-provider-contracts__description">${escapeHtml14(model.description)}</p>
6124
6301
  ${rows}
6125
- ${model.error ? `<p class="absolute-voice-provider-contracts__error">${escapeHtml13(model.error)}</p>` : ""}
6302
+ ${model.error ? `<p class="absolute-voice-provider-contracts__error">${escapeHtml14(model.error)}</p>` : ""}
6126
6303
  </section>`;
6127
6304
  };
6128
6305
  var getVoiceProviderContractsCSS = () => `.absolute-voice-provider-contracts{border:1px solid #b8dcc7;border-radius:20px;background:#f7fff9;color:#09140d;padding:18px;box-shadow:0 18px 40px rgba(21,83,45,.12);font-family:inherit}.absolute-voice-provider-contracts--error,.absolute-voice-provider-contracts--warning{border-color:#f2a7a7;background:#fff7f4}.absolute-voice-provider-contracts__header,.absolute-voice-provider-contracts__row header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-provider-contracts__eyebrow{color:#166534;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-provider-contracts__label{font-size:24px;line-height:1}.absolute-voice-provider-contracts__description,.absolute-voice-provider-contracts__row p,.absolute-voice-provider-contracts__row dt,.absolute-voice-provider-contracts__empty{color:#405448}.absolute-voice-provider-contracts__rows{display:grid;gap:12px;margin-top:14px}.absolute-voice-provider-contracts__row{background:#fff;border:1px solid #d6eadb;border-radius:16px;padding:14px}.absolute-voice-provider-contracts__row--pass{border-color:#86efac}.absolute-voice-provider-contracts__row--warn,.absolute-voice-provider-contracts__row--fail{border-color:#f2a7a7}.absolute-voice-provider-contracts__row p{margin:10px 0}.absolute-voice-provider-contracts__remediations{display:grid;gap:8px;list-style:none;margin:0 0 10px;padding:0}.absolute-voice-provider-contracts__remediations li{background:#fff7ed;border:1px solid #fed7aa;border-radius:12px;display:grid;gap:3px;padding:8px}.absolute-voice-provider-contracts__remediations a,.absolute-voice-provider-contracts__remediations strong{color:#9a3412}.absolute-voice-provider-contracts__remediations span{color:#7c2d12}.absolute-voice-provider-contracts__row dl{display:grid;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr));margin:0}.absolute-voice-provider-contracts__row div{background:#f7fff9;border:1px solid #d6eadb;border-radius:12px;padding:8px}.absolute-voice-provider-contracts__row dt{font-size:12px}.absolute-voice-provider-contracts__row dd{font-weight:800;margin:4px 0 0}.absolute-voice-provider-contracts__error{color:#9f1239;font-weight:700}`;
@@ -6163,9 +6340,9 @@ var defineVoiceProviderContractsElement = (tagName = "absolute-voice-provider-co
6163
6340
  });
6164
6341
  };
6165
6342
  // src/client/turnQualityWidget.ts
6166
- var DEFAULT_TITLE10 = "Turn Quality";
6167
- var DEFAULT_DESCRIPTION10 = "Per-turn STT confidence, fallback selection, corrections, and transcript coverage.";
6168
- var escapeHtml14 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
6343
+ var DEFAULT_TITLE11 = "Turn Quality";
6344
+ var DEFAULT_DESCRIPTION11 = "Per-turn STT confidence, fallback selection, corrections, and transcript coverage.";
6345
+ var escapeHtml15 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
6169
6346
  var formatConfidence = (value) => typeof value === "number" ? `${Math.round(value * 100)}%` : "n/a";
6170
6347
  var formatMaybe = (value) => value === undefined || value === "" ? "n/a" : String(value);
6171
6348
  var getTurnDetail = (turn) => {
@@ -6203,37 +6380,37 @@ var createVoiceTurnQualityViewModel = (snapshot, options = {}) => {
6203
6380
  const warningCount = snapshot.report?.warnings ?? turns.filter((turn) => turn.status === "warn").length;
6204
6381
  const failedCount = snapshot.report?.failed ?? turns.filter((turn) => turn.status === "fail").length;
6205
6382
  return {
6206
- description: options.description ?? DEFAULT_DESCRIPTION10,
6383
+ description: options.description ?? DEFAULT_DESCRIPTION11,
6207
6384
  error: snapshot.error,
6208
6385
  isLoading: snapshot.isLoading,
6209
6386
  label: snapshot.error ? "Unavailable" : turns.length ? failedCount > 0 ? `${failedCount} failed` : warningCount > 0 ? `${warningCount} warnings` : `${turns.length} healthy` : snapshot.isLoading ? "Checking" : "No turns",
6210
6387
  status: snapshot.error ? "error" : turns.length ? failedCount > 0 || warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
6211
- title: options.title ?? DEFAULT_TITLE10,
6388
+ title: options.title ?? DEFAULT_TITLE11,
6212
6389
  turns,
6213
6390
  updatedAt: snapshot.updatedAt
6214
6391
  };
6215
6392
  };
6216
6393
  var renderVoiceTurnQualityHTML = (snapshot, options = {}) => {
6217
6394
  const model = createVoiceTurnQualityViewModel(snapshot, options);
6218
- const turns = model.turns.length ? `<div class="absolute-voice-turn-quality__turns">${model.turns.map((turn) => `<article class="absolute-voice-turn-quality__turn absolute-voice-turn-quality__turn--${escapeHtml14(turn.status)}">
6395
+ const turns = model.turns.length ? `<div class="absolute-voice-turn-quality__turns">${model.turns.map((turn) => `<article class="absolute-voice-turn-quality__turn absolute-voice-turn-quality__turn--${escapeHtml15(turn.status)}">
6219
6396
  <header>
6220
- <strong>${escapeHtml14(turn.label)}</strong>
6221
- <span>${escapeHtml14(turn.status)}</span>
6397
+ <strong>${escapeHtml15(turn.label)}</strong>
6398
+ <span>${escapeHtml15(turn.status)}</span>
6222
6399
  </header>
6223
- <p>${escapeHtml14(turn.detail)}</p>
6400
+ <p>${escapeHtml15(turn.detail)}</p>
6224
6401
  <dl>${turn.rows.map((row) => `<div>
6225
- <dt>${escapeHtml14(row.label)}</dt>
6226
- <dd>${escapeHtml14(row.value)}</dd>
6402
+ <dt>${escapeHtml15(row.label)}</dt>
6403
+ <dd>${escapeHtml15(row.value)}</dd>
6227
6404
  </div>`).join("")}</dl>
6228
6405
  </article>`).join("")}</div>` : '<p class="absolute-voice-turn-quality__empty">Complete a voice turn to see STT quality diagnostics.</p>';
6229
- return `<section class="absolute-voice-turn-quality absolute-voice-turn-quality--${escapeHtml14(model.status)}">
6406
+ return `<section class="absolute-voice-turn-quality absolute-voice-turn-quality--${escapeHtml15(model.status)}">
6230
6407
  <header class="absolute-voice-turn-quality__header">
6231
- <span class="absolute-voice-turn-quality__eyebrow">${escapeHtml14(model.title)}</span>
6232
- <strong class="absolute-voice-turn-quality__label">${escapeHtml14(model.label)}</strong>
6408
+ <span class="absolute-voice-turn-quality__eyebrow">${escapeHtml15(model.title)}</span>
6409
+ <strong class="absolute-voice-turn-quality__label">${escapeHtml15(model.label)}</strong>
6233
6410
  </header>
6234
- <p class="absolute-voice-turn-quality__description">${escapeHtml14(model.description)}</p>
6411
+ <p class="absolute-voice-turn-quality__description">${escapeHtml15(model.description)}</p>
6235
6412
  ${turns}
6236
- ${model.error ? `<p class="absolute-voice-turn-quality__error">${escapeHtml14(model.error)}</p>` : ""}
6413
+ ${model.error ? `<p class="absolute-voice-turn-quality__error">${escapeHtml15(model.error)}</p>` : ""}
6237
6414
  </section>`;
6238
6415
  };
6239
6416
  var getVoiceTurnQualityCSS = () => `.absolute-voice-turn-quality{border:1px solid #e4d1a3;border-radius:20px;background:#fff9eb;color:#17120a;padding:18px;box-shadow:0 18px 40px rgba(73,48,14,.12);font-family:inherit}.absolute-voice-turn-quality--error,.absolute-voice-turn-quality--warning{border-color:#f2a7a7;background:#fff5f3}.absolute-voice-turn-quality__header,.absolute-voice-turn-quality__turn header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-turn-quality__eyebrow{color:#8a5a0a;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-turn-quality__label{font-size:24px;line-height:1}.absolute-voice-turn-quality__description,.absolute-voice-turn-quality__turn p,.absolute-voice-turn-quality__turn dt,.absolute-voice-turn-quality__empty{color:#5a4930}.absolute-voice-turn-quality__turns{display:grid;gap:12px;margin-top:14px}.absolute-voice-turn-quality__turn{background:#fff;border:1px solid #f0dfba;border-radius:16px;padding:14px}.absolute-voice-turn-quality__turn--pass{border-color:#86efac}.absolute-voice-turn-quality__turn--warn,.absolute-voice-turn-quality__turn--unknown{border-color:#fbbf24}.absolute-voice-turn-quality__turn--fail{border-color:#f2a7a7}.absolute-voice-turn-quality__turn p{margin:10px 0}.absolute-voice-turn-quality__turn dl{display:grid;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr));margin:0}.absolute-voice-turn-quality__turn div{background:#fff9eb;border:1px solid #f0dfba;border-radius:12px;padding:8px}.absolute-voice-turn-quality__turn dt{font-size:12px}.absolute-voice-turn-quality__turn dd{font-weight:800;margin:4px 0 0}.absolute-voice-turn-quality__empty{margin:14px 0 0}.absolute-voice-turn-quality__error{color:#9f1239;font-weight:700}`;
@@ -6274,10 +6451,10 @@ var defineVoiceTurnQualityElement = (tagName = "absolute-voice-turn-quality") =>
6274
6451
  });
6275
6452
  };
6276
6453
  // src/client/turnLatencyWidget.ts
6277
- var DEFAULT_TITLE11 = "Turn Latency";
6278
- var DEFAULT_DESCRIPTION11 = "Per-turn timing from first transcript to commit and assistant response start.";
6454
+ var DEFAULT_TITLE12 = "Turn Latency";
6455
+ var DEFAULT_DESCRIPTION12 = "Per-turn timing from first transcript to commit and assistant response start.";
6279
6456
  var DEFAULT_PROOF_LABEL = "Run latency proof";
6280
- var escapeHtml15 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
6457
+ var escapeHtml16 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
6281
6458
  var formatMs2 = (value) => typeof value === "number" ? `${Math.round(value)}ms` : "n/a";
6282
6459
  var createVoiceTurnLatencyViewModel = (snapshot, options = {}) => {
6283
6460
  const turns = (snapshot.report?.turns ?? []).map((turn) => ({
@@ -6291,39 +6468,39 @@ var createVoiceTurnLatencyViewModel = (snapshot, options = {}) => {
6291
6468
  const warningCount = snapshot.report?.warnings ?? turns.filter((turn) => turn.status === "warn").length;
6292
6469
  const failedCount = snapshot.report?.failed ?? turns.filter((turn) => turn.status === "fail").length;
6293
6470
  return {
6294
- description: options.description ?? DEFAULT_DESCRIPTION11,
6471
+ description: options.description ?? DEFAULT_DESCRIPTION12,
6295
6472
  error: snapshot.error,
6296
6473
  isLoading: snapshot.isLoading,
6297
6474
  label: snapshot.error ? "Unavailable" : turns.length ? failedCount > 0 ? `${failedCount} slow` : warningCount > 0 ? `${warningCount} warnings` : `avg ${formatMs2(snapshot.report?.averageTotalMs)}` : snapshot.isLoading ? "Checking" : "No turns",
6298
6475
  proofLabel: options.proofPath ? options.proofLabel ?? DEFAULT_PROOF_LABEL : undefined,
6299
6476
  showProofAction: Boolean(options.proofPath),
6300
6477
  status: snapshot.error ? "error" : turns.length ? failedCount > 0 || warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
6301
- title: options.title ?? DEFAULT_TITLE11,
6478
+ title: options.title ?? DEFAULT_TITLE12,
6302
6479
  turns,
6303
6480
  updatedAt: snapshot.updatedAt
6304
6481
  };
6305
6482
  };
6306
6483
  var renderVoiceTurnLatencyHTML = (snapshot, options = {}) => {
6307
6484
  const model = createVoiceTurnLatencyViewModel(snapshot, options);
6308
- const turns = model.turns.length ? `<div class="absolute-voice-turn-latency__turns">${model.turns.map((turn) => `<article class="absolute-voice-turn-latency__turn absolute-voice-turn-latency__turn--${escapeHtml15(turn.status)}">
6485
+ const turns = model.turns.length ? `<div class="absolute-voice-turn-latency__turns">${model.turns.map((turn) => `<article class="absolute-voice-turn-latency__turn absolute-voice-turn-latency__turn--${escapeHtml16(turn.status)}">
6309
6486
  <header>
6310
- <strong>${escapeHtml15(turn.label)}</strong>
6311
- <span>${escapeHtml15(turn.status)}</span>
6487
+ <strong>${escapeHtml16(turn.label)}</strong>
6488
+ <span>${escapeHtml16(turn.status)}</span>
6312
6489
  </header>
6313
6490
  <dl>${turn.rows.map((row) => `<div>
6314
- <dt>${escapeHtml15(row.label)}</dt>
6315
- <dd>${escapeHtml15(row.value)}</dd>
6491
+ <dt>${escapeHtml16(row.label)}</dt>
6492
+ <dd>${escapeHtml16(row.value)}</dd>
6316
6493
  </div>`).join("")}</dl>
6317
6494
  </article>`).join("")}</div>` : '<p class="absolute-voice-turn-latency__empty">Complete a voice turn to see latency diagnostics.</p>';
6318
- return `<section class="absolute-voice-turn-latency absolute-voice-turn-latency--${escapeHtml15(model.status)}">
6495
+ return `<section class="absolute-voice-turn-latency absolute-voice-turn-latency--${escapeHtml16(model.status)}">
6319
6496
  <header class="absolute-voice-turn-latency__header">
6320
- <span class="absolute-voice-turn-latency__eyebrow">${escapeHtml15(model.title)}</span>
6321
- <strong class="absolute-voice-turn-latency__label">${escapeHtml15(model.label)}</strong>
6497
+ <span class="absolute-voice-turn-latency__eyebrow">${escapeHtml16(model.title)}</span>
6498
+ <strong class="absolute-voice-turn-latency__label">${escapeHtml16(model.label)}</strong>
6322
6499
  </header>
6323
- <p class="absolute-voice-turn-latency__description">${escapeHtml15(model.description)}</p>
6324
- ${model.showProofAction ? `<button class="absolute-voice-turn-latency__proof" data-absolute-voice-turn-latency-proof type="button">${escapeHtml15(model.proofLabel ?? DEFAULT_PROOF_LABEL)}</button>` : ""}
6500
+ <p class="absolute-voice-turn-latency__description">${escapeHtml16(model.description)}</p>
6501
+ ${model.showProofAction ? `<button class="absolute-voice-turn-latency__proof" data-absolute-voice-turn-latency-proof type="button">${escapeHtml16(model.proofLabel ?? DEFAULT_PROOF_LABEL)}</button>` : ""}
6325
6502
  ${turns}
6326
- ${model.error ? `<p class="absolute-voice-turn-latency__error">${escapeHtml15(model.error)}</p>` : ""}
6503
+ ${model.error ? `<p class="absolute-voice-turn-latency__error">${escapeHtml16(model.error)}</p>` : ""}
6327
6504
  </section>`;
6328
6505
  };
6329
6506
  var mountVoiceTurnLatency = (element, path = "/api/turn-latency", options = {}) => {
@@ -6373,9 +6550,9 @@ var defineVoiceTurnLatencyElement = (tagName = "absolute-voice-turn-latency") =>
6373
6550
  });
6374
6551
  };
6375
6552
  // src/client/traceTimelineWidget.ts
6376
- var DEFAULT_TITLE12 = "Voice Traces";
6377
- var DEFAULT_DESCRIPTION12 = "Latest call timelines with provider latency, fallbacks, handoffs, and errors from your self-hosted trace store.";
6378
- var escapeHtml16 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
6553
+ var DEFAULT_TITLE13 = "Voice Traces";
6554
+ var DEFAULT_DESCRIPTION13 = "Latest call timelines with provider latency, fallbacks, handoffs, and errors from your self-hosted trace store.";
6555
+ var escapeHtml17 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
6379
6556
  var formatMs3 = (value) => typeof value === "number" ? `${value}ms` : "n/a";
6380
6557
  var formatProviders = (session) => session.providers.length ? session.providers.map((provider) => provider.provider).join(", ") : "No providers";
6381
6558
  var createVoiceTraceTimelineViewModel = (snapshot, options = {}) => {
@@ -6391,13 +6568,13 @@ var createVoiceTraceTimelineViewModel = (snapshot, options = {}) => {
6391
6568
  const failed = sessions.filter((session) => session.status === "failed").length;
6392
6569
  const warnings = sessions.filter((session) => session.status === "warning").length;
6393
6570
  return {
6394
- description: options.description ?? DEFAULT_DESCRIPTION12,
6571
+ description: options.description ?? DEFAULT_DESCRIPTION13,
6395
6572
  error: snapshot.error,
6396
6573
  isLoading: snapshot.isLoading,
6397
6574
  label: snapshot.error ? "Unavailable" : failed > 0 ? `${failed} failed` : warnings > 0 ? `${warnings} warning` : sessions.length ? `${sessions.length} recent` : snapshot.isLoading ? "Checking" : "No traces yet",
6398
6575
  sessions,
6399
6576
  status: snapshot.error ? "error" : failed > 0 ? "failed" : warnings > 0 ? "warning" : sessions.length ? "ready" : snapshot.isLoading ? "loading" : "empty",
6400
- title: options.title ?? DEFAULT_TITLE12,
6577
+ title: options.title ?? DEFAULT_TITLE13,
6401
6578
  updatedAt: snapshot.updatedAt
6402
6579
  };
6403
6580
  };
@@ -6405,27 +6582,27 @@ var renderVoiceTraceTimelineWidgetHTML = (snapshot, options = {}) => {
6405
6582
  const model = createVoiceTraceTimelineViewModel(snapshot, options);
6406
6583
  const sessions = model.sessions.length ? `<div class="absolute-voice-trace-timeline__sessions">${model.sessions.map((session) => {
6407
6584
  const supportLinks = [
6408
- `<a href="${escapeHtml16(session.detailHref)}">Open timeline</a>`,
6409
- session.operationsRecordHref ? `<a href="${escapeHtml16(session.operationsRecordHref)}">Open operations record</a>` : undefined,
6410
- session.incidentBundleHref ? `<a href="${escapeHtml16(session.incidentBundleHref)}">Export incident bundle</a>` : undefined
6585
+ `<a href="${escapeHtml17(session.detailHref)}">Open timeline</a>`,
6586
+ session.operationsRecordHref ? `<a href="${escapeHtml17(session.operationsRecordHref)}">Open operations record</a>` : undefined,
6587
+ session.incidentBundleHref ? `<a href="${escapeHtml17(session.incidentBundleHref)}">Export incident bundle</a>` : undefined
6411
6588
  ].filter(Boolean).join("");
6412
- return `<article class="absolute-voice-trace-timeline__session absolute-voice-trace-timeline__session--${escapeHtml16(session.status)}">
6589
+ return `<article class="absolute-voice-trace-timeline__session absolute-voice-trace-timeline__session--${escapeHtml17(session.status)}">
6413
6590
  <header>
6414
- <strong>${escapeHtml16(session.sessionId)}</strong>
6415
- <span>${escapeHtml16(session.status)}</span>
6591
+ <strong>${escapeHtml17(session.sessionId)}</strong>
6592
+ <span>${escapeHtml17(session.status)}</span>
6416
6593
  </header>
6417
- <p>${escapeHtml16(session.label)} \xB7 ${escapeHtml16(session.durationLabel)} \xB7 ${escapeHtml16(session.providerLabel)}</p>
6594
+ <p>${escapeHtml17(session.label)} \xB7 ${escapeHtml17(session.durationLabel)} \xB7 ${escapeHtml17(session.providerLabel)}</p>
6418
6595
  <p class="absolute-voice-trace-timeline__actions">${supportLinks}</p>
6419
6596
  </article>`;
6420
6597
  }).join("")}</div>` : '<p class="absolute-voice-trace-timeline__empty">Run a voice session to see call timelines.</p>';
6421
- return `<section class="absolute-voice-trace-timeline absolute-voice-trace-timeline--${escapeHtml16(model.status)}">
6598
+ return `<section class="absolute-voice-trace-timeline absolute-voice-trace-timeline--${escapeHtml17(model.status)}">
6422
6599
  <header class="absolute-voice-trace-timeline__header">
6423
- <span class="absolute-voice-trace-timeline__eyebrow">${escapeHtml16(model.title)}</span>
6424
- <strong class="absolute-voice-trace-timeline__label">${escapeHtml16(model.label)}</strong>
6600
+ <span class="absolute-voice-trace-timeline__eyebrow">${escapeHtml17(model.title)}</span>
6601
+ <strong class="absolute-voice-trace-timeline__label">${escapeHtml17(model.label)}</strong>
6425
6602
  </header>
6426
- <p class="absolute-voice-trace-timeline__description">${escapeHtml16(model.description)}</p>
6603
+ <p class="absolute-voice-trace-timeline__description">${escapeHtml17(model.description)}</p>
6427
6604
  ${sessions}
6428
- ${model.error ? `<p class="absolute-voice-trace-timeline__error">${escapeHtml16(model.error)}</p>` : ""}
6605
+ ${model.error ? `<p class="absolute-voice-trace-timeline__error">${escapeHtml17(model.error)}</p>` : ""}
6429
6606
  </section>`;
6430
6607
  };
6431
6608
  var getVoiceTraceTimelineCSS = () => `.absolute-voice-trace-timeline{border:1px solid #bad7d3;border-radius:20px;background:#f3fffb;color:#09201c;padding:18px;box-shadow:0 18px 40px rgba(9,32,28,.12);font-family:inherit}.absolute-voice-trace-timeline--error,.absolute-voice-trace-timeline--failed{border-color:#f2a7a7;background:#fff5f3}.absolute-voice-trace-timeline--warning{border-color:#fbbf24;background:#fffaf0}.absolute-voice-trace-timeline__header,.absolute-voice-trace-timeline__session header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-trace-timeline__eyebrow{color:#17665b;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-trace-timeline__label{font-size:24px;line-height:1}.absolute-voice-trace-timeline__description,.absolute-voice-trace-timeline__session p,.absolute-voice-trace-timeline__empty{color:#35544f}.absolute-voice-trace-timeline__sessions{display:grid;gap:12px;margin-top:14px}.absolute-voice-trace-timeline__session{background:#fff;border:1px solid #cfe7e2;border-radius:16px;padding:14px}.absolute-voice-trace-timeline__session--failed{border-color:#f2a7a7}.absolute-voice-trace-timeline__session--warning{border-color:#fbbf24}.absolute-voice-trace-timeline__session p{margin:10px 0}.absolute-voice-trace-timeline__actions{display:flex;flex-wrap:wrap;gap:10px}.absolute-voice-trace-timeline__session a{color:#0f766e;font-weight:800}.absolute-voice-trace-timeline__empty{margin:14px 0 0}.absolute-voice-trace-timeline__error{color:#9f1239;font-weight:700}`;
@@ -6471,9 +6648,9 @@ var defineVoiceTraceTimelineElement = (tagName = "absolute-voice-trace-timeline"
6471
6648
  });
6472
6649
  };
6473
6650
  // src/client/agentSquadStatusWidget.ts
6474
- var DEFAULT_TITLE13 = "Voice Agent Squad";
6475
- var DEFAULT_DESCRIPTION13 = "Current specialist and recent handoffs from your self-hosted voice traces.";
6476
- var escapeHtml17 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
6651
+ var DEFAULT_TITLE14 = "Voice Agent Squad";
6652
+ var DEFAULT_DESCRIPTION14 = "Current specialist and recent handoffs from your self-hosted voice traces.";
6653
+ var escapeHtml18 = (value) => value.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll('"', "&quot;").replaceAll("'", "&#39;");
6477
6654
  var labelFor = (current) => {
6478
6655
  if (!current)
6479
6656
  return "Waiting for specialist activity";
@@ -6487,37 +6664,37 @@ var labelFor = (current) => {
6487
6664
  };
6488
6665
  var createVoiceAgentSquadStatusViewModel = (snapshot, options = {}) => ({
6489
6666
  current: snapshot.report.current,
6490
- description: options.description ?? DEFAULT_DESCRIPTION13,
6667
+ description: options.description ?? DEFAULT_DESCRIPTION14,
6491
6668
  error: snapshot.error,
6492
6669
  isLoading: snapshot.isLoading,
6493
6670
  label: snapshot.error ? "Unavailable" : labelFor(snapshot.report.current),
6494
6671
  sessionCount: snapshot.report.sessionCount,
6495
6672
  sessions: snapshot.report.sessions,
6496
- title: options.title ?? DEFAULT_TITLE13,
6673
+ title: options.title ?? DEFAULT_TITLE14,
6497
6674
  updatedAt: snapshot.updatedAt
6498
6675
  });
6499
6676
  var renderVoiceAgentSquadStatusHTML = (snapshot, options = {}) => {
6500
6677
  const model = createVoiceAgentSquadStatusViewModel(snapshot, options);
6501
6678
  const current = model.current;
6502
6679
  const rows = model.sessions.length ? model.sessions.slice(0, 5).map((session) => `<li>
6503
- <span>${escapeHtml17(session.sessionId)}</span>
6504
- <strong>${escapeHtml17(session.targetAgentId ?? "none")}</strong>
6505
- <em>${escapeHtml17(session.status)}</em>
6506
- ${session.summary || session.reason ? `<p>${escapeHtml17(session.summary ?? session.reason ?? "")}</p>` : ""}
6680
+ <span>${escapeHtml18(session.sessionId)}</span>
6681
+ <strong>${escapeHtml18(session.targetAgentId ?? "none")}</strong>
6682
+ <em>${escapeHtml18(session.status)}</em>
6683
+ ${session.summary || session.reason ? `<p>${escapeHtml18(session.summary ?? session.reason ?? "")}</p>` : ""}
6507
6684
  </li>`).join("") : "<li><span>No squad traces yet.</span><strong>Waiting</strong></li>";
6508
6685
  return `<section class="absolute-voice-agent-squad-status">
6509
6686
  <header>
6510
- <span>${escapeHtml17(model.title)}</span>
6511
- <strong>${escapeHtml17(model.label)}</strong>
6687
+ <span>${escapeHtml18(model.title)}</span>
6688
+ <strong>${escapeHtml18(model.label)}</strong>
6512
6689
  </header>
6513
- <p>${escapeHtml17(model.description)}</p>
6690
+ <p>${escapeHtml18(model.description)}</p>
6514
6691
  <div>
6515
- <span>Session</span><strong>${escapeHtml17(current?.sessionId ?? "n/a")}</strong>
6516
- <span>From</span><strong>${escapeHtml17(current?.fromAgentId ?? "n/a")}</strong>
6517
- <span>Status</span><strong>${escapeHtml17(current?.status ?? "idle")}</strong>
6692
+ <span>Session</span><strong>${escapeHtml18(current?.sessionId ?? "n/a")}</strong>
6693
+ <span>From</span><strong>${escapeHtml18(current?.fromAgentId ?? "n/a")}</strong>
6694
+ <span>Status</span><strong>${escapeHtml18(current?.status ?? "idle")}</strong>
6518
6695
  </div>
6519
6696
  <ul>${rows}</ul>
6520
- ${model.error ? `<p class="absolute-voice-agent-squad-status__error">${escapeHtml17(model.error)}</p>` : ""}
6697
+ ${model.error ? `<p class="absolute-voice-agent-squad-status__error">${escapeHtml18(model.error)}</p>` : ""}
6521
6698
  </section>`;
6522
6699
  };
6523
6700
  var getVoiceAgentSquadStatusCSS = () => `.absolute-voice-agent-squad-status{border:1px solid #38bdf866;border-radius:20px;background:#0f172a;color:#f8fafc;padding:18px;font-family:inherit}.absolute-voice-agent-squad-status header{display:grid;gap:4px}.absolute-voice-agent-squad-status header span{color:#7dd3fc;font-size:12px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-agent-squad-status header strong{font-size:20px}.absolute-voice-agent-squad-status p{color:#cbd5e1}.absolute-voice-agent-squad-status div{display:grid;gap:6px;grid-template-columns:max-content 1fr;margin:14px 0}.absolute-voice-agent-squad-status div span{color:#94a3b8}.absolute-voice-agent-squad-status ul{display:grid;gap:8px;list-style:none;margin:0;padding:0}.absolute-voice-agent-squad-status li{background:#020617;border:1px solid #1e293b;border-radius:14px;padding:10px}.absolute-voice-agent-squad-status li span{color:#94a3b8;display:block;font-size:12px}.absolute-voice-agent-squad-status li strong{display:block}.absolute-voice-agent-squad-status li em{color:#7dd3fc;font-style:normal}.absolute-voice-agent-squad-status__error{color:#fecaca;font-weight:800}`;
@@ -6647,6 +6824,7 @@ export {
6647
6824
  renderVoiceTurnLatencyHTML,
6648
6825
  renderVoiceTraceTimelineWidgetHTML,
6649
6826
  renderVoiceRoutingStatusHTML,
6827
+ renderVoiceReadinessFailuresHTML,
6650
6828
  renderVoiceProviderStatusHTML,
6651
6829
  renderVoiceProviderSimulationControlsHTML,
6652
6830
  renderVoiceProviderContractsHTML,
@@ -6665,6 +6843,7 @@ export {
6665
6843
  mountVoiceTurnLatency,
6666
6844
  mountVoiceTraceTimeline,
6667
6845
  mountVoiceRoutingStatus,
6846
+ mountVoiceReadinessFailures,
6668
6847
  mountVoiceProviderStatus,
6669
6848
  mountVoiceProviderSimulationControls,
6670
6849
  mountVoiceProviderContracts,
@@ -6680,6 +6859,7 @@ export {
6680
6859
  getVoiceTurnQualityCSS,
6681
6860
  getVoiceTraceTimelineCSS,
6682
6861
  getVoiceRoutingStatusCSS,
6862
+ getVoiceReadinessFailuresCSS,
6683
6863
  getVoiceProviderStatusCSS,
6684
6864
  getVoiceProviderContractsCSS,
6685
6865
  getVoiceProviderCapabilitiesCSS,
@@ -6697,6 +6877,7 @@ export {
6697
6877
  fetchVoiceTurnLatency,
6698
6878
  fetchVoiceTraceTimeline,
6699
6879
  fetchVoiceRoutingStatus,
6880
+ fetchVoiceReadinessFailures,
6700
6881
  fetchVoiceProviderStatus,
6701
6882
  fetchVoiceProviderContracts,
6702
6883
  fetchVoiceProviderCapabilities,
@@ -6710,6 +6891,7 @@ export {
6710
6891
  defineVoiceTurnLatencyElement,
6711
6892
  defineVoiceTraceTimelineElement,
6712
6893
  defineVoiceRoutingStatusElement,
6894
+ defineVoiceReadinessFailuresElement,
6713
6895
  defineVoiceProviderStatusElement,
6714
6896
  defineVoiceProviderSimulationControlsElement,
6715
6897
  defineVoiceProviderContractsElement,
@@ -6732,6 +6914,8 @@ export {
6732
6914
  createVoiceStream,
6733
6915
  createVoiceRoutingStatusViewModel,
6734
6916
  createVoiceRoutingStatusStore,
6917
+ createVoiceReadinessFailuresViewModel,
6918
+ createVoiceReadinessFailuresStore,
6735
6919
  createVoiceProviderStatusViewModel,
6736
6920
  createVoiceProviderStatusStore,
6737
6921
  createVoiceProviderSimulationControlsViewModel,