@absolutejs/voice 0.0.22-beta.452 → 0.0.22-beta.454
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/angular/index.d.ts +1 -0
- package/dist/angular/index.js +345 -224
- package/dist/angular/voice-reconnect-profile-evidence.service.d.ts +12 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.js +543 -240
- package/dist/client/reconnectProfileEvidence.d.ts +19 -0
- package/dist/client/reconnectProfileEvidenceWidget.d.ts +39 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +107 -0
- package/dist/proofTrends.d.ts +53 -0
- package/dist/react/VoiceReconnectProfileEvidence.d.ts +6 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +919 -526
- package/dist/react/useVoiceReconnectProfileEvidence.d.ts +8 -0
- package/dist/svelte/createVoiceReconnectProfileEvidence.d.ts +7 -0
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +86 -0
- package/dist/vue/VoiceReconnectProfileEvidence.d.ts +21 -0
- package/dist/vue/index.d.ts +2 -0
- package/dist/vue/index.js +825 -438
- package/dist/vue/useVoiceReconnectProfileEvidence.d.ts +9 -0
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -3414,6 +3414,33 @@ var maxNumber = (values) => {
|
|
|
3414
3414
|
const finite = values.filter((value) => typeof value === "number" && Number.isFinite(value));
|
|
3415
3415
|
return finite.length > 0 ? Math.max(...finite) : undefined;
|
|
3416
3416
|
};
|
|
3417
|
+
var buildVoiceReconnectProfileEvidenceSummary = (evidence, options = {}) => {
|
|
3418
|
+
const profileId = options.profileId ?? "reconnect-resume";
|
|
3419
|
+
const filtered = evidence.filter((record) => record.profileId === profileId).sort((left, right) => {
|
|
3420
|
+
const leftAt = Date.parse(left.generatedAt ?? left.createdAt);
|
|
3421
|
+
const rightAt = Date.parse(right.generatedAt ?? right.createdAt);
|
|
3422
|
+
return (Number.isFinite(rightAt) ? rightAt : 0) - (Number.isFinite(leftAt) ? leftAt : 0);
|
|
3423
|
+
});
|
|
3424
|
+
const latest = filtered[0];
|
|
3425
|
+
const sampleCount = filtered.reduce((total, record) => total + (record.reconnect?.samples ?? 1), 0);
|
|
3426
|
+
const snapshotCount = filtered.reduce((total, record) => total + (record.reconnect?.snapshotCount ?? 0), 0);
|
|
3427
|
+
const resumeLatencyP95Ms = maxNumber(filtered.map((record) => record.reconnect?.resumeLatencyP95Ms));
|
|
3428
|
+
const failed = filtered.some((record) => record.ok === false || record.reconnect?.status === "fail");
|
|
3429
|
+
const passed = filtered.some((record) => record.ok === true && record.reconnect?.resumed === true && record.reconnect?.reconnected === true);
|
|
3430
|
+
const status = filtered.length === 0 ? "empty" : failed ? "fail" : passed ? "pass" : "warn";
|
|
3431
|
+
return {
|
|
3432
|
+
evidence: filtered,
|
|
3433
|
+
generatedAt: options.generatedAt ?? new Date().toISOString(),
|
|
3434
|
+
latest,
|
|
3435
|
+
ok: status === "pass",
|
|
3436
|
+
profileId,
|
|
3437
|
+
resumeLatencyP95Ms,
|
|
3438
|
+
sampleCount,
|
|
3439
|
+
snapshotCount,
|
|
3440
|
+
sourceHref: options.sourceHref,
|
|
3441
|
+
status
|
|
3442
|
+
};
|
|
3443
|
+
};
|
|
3417
3444
|
var percentile = (values, rank) => {
|
|
3418
3445
|
const finite = values.filter((value) => Number.isFinite(value)).sort((left, right) => left - right);
|
|
3419
3446
|
if (finite.length === 0) {
|
|
@@ -3733,6 +3760,7 @@ var buildVoiceRealCallProfileEvidenceFromReconnectProofReports = (input, options
|
|
|
3733
3760
|
});
|
|
3734
3761
|
};
|
|
3735
3762
|
var loadVoiceRealCallProfileEvidenceFromTraceStore = async (options) => buildVoiceRealCallProfileEvidenceFromTraceEvents(await options.store.list({ limit: options.limit ?? 5000 }), options);
|
|
3763
|
+
var loadVoiceRealCallProfileEvidenceFromStore = async (options) => options.store.list(options);
|
|
3736
3764
|
var realCallProfileTraceSignalTypes = new Set([
|
|
3737
3765
|
"client.barge_in",
|
|
3738
3766
|
"client.browser_media",
|
|
@@ -4575,6 +4603,74 @@ var createVoiceInMemoryRealCallProfileRecoveryJobStore = (options = {}) => {
|
|
|
4575
4603
|
}
|
|
4576
4604
|
};
|
|
4577
4605
|
};
|
|
4606
|
+
var normalizeRealCallProfileEvidenceTableName = (value) => value.trim().replace(/[^a-zA-Z0-9_]+/g, "_").replace(/^_+|_+$/g, "") || "voice_real_call_profile_evidence";
|
|
4607
|
+
var parseRealCallProfileEvidenceBoundary = (value) => value === undefined ? undefined : value instanceof Date ? value.getTime() : typeof value === "number" ? value : Date.parse(value);
|
|
4608
|
+
var readRealCallProfileEvidenceSortTime = (evidence, fallback) => Date.parse(evidence.generatedAt ?? fallback) || Date.parse(fallback);
|
|
4609
|
+
var createVoiceSQLiteRealCallProfileEvidenceStore = (options = {}) => {
|
|
4610
|
+
const { Database: SQLiteDatabase } = __require("bun:sqlite");
|
|
4611
|
+
const database = options.database ?? new SQLiteDatabase(options.path ?? ":memory:", {
|
|
4612
|
+
create: true
|
|
4613
|
+
});
|
|
4614
|
+
const tableName = normalizeRealCallProfileEvidenceTableName(options.tableName ?? "voice_real_call_profile_evidence");
|
|
4615
|
+
const now = () => (options.now ?? (() => new Date))().toISOString();
|
|
4616
|
+
const createId = () => `${options.idPrefix ?? "voice-profile-evidence"}-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
4617
|
+
database.exec("PRAGMA journal_mode = WAL;");
|
|
4618
|
+
database.exec("PRAGMA synchronous = NORMAL;");
|
|
4619
|
+
database.exec("PRAGMA busy_timeout = 5000;");
|
|
4620
|
+
database.exec(`CREATE TABLE IF NOT EXISTS "${tableName}" (
|
|
4621
|
+
id TEXT PRIMARY KEY,
|
|
4622
|
+
sort_at INTEGER NOT NULL,
|
|
4623
|
+
profile_id TEXT NOT NULL,
|
|
4624
|
+
session_id TEXT NOT NULL,
|
|
4625
|
+
created_at TEXT NOT NULL,
|
|
4626
|
+
payload TEXT NOT NULL
|
|
4627
|
+
)`);
|
|
4628
|
+
const selectStatement = database.query(`SELECT payload FROM "${tableName}" WHERE id = ?1 LIMIT 1`);
|
|
4629
|
+
const listStatement = database.query(`SELECT payload FROM "${tableName}" ORDER BY sort_at DESC, id DESC`);
|
|
4630
|
+
const upsertStatement = database.query(`INSERT INTO "${tableName}" (id, sort_at, profile_id, session_id, created_at, payload)
|
|
4631
|
+
VALUES (?1, ?2, ?3, ?4, ?5, ?6)
|
|
4632
|
+
ON CONFLICT(id) DO UPDATE SET
|
|
4633
|
+
sort_at = excluded.sort_at,
|
|
4634
|
+
profile_id = excluded.profile_id,
|
|
4635
|
+
session_id = excluded.session_id,
|
|
4636
|
+
created_at = excluded.created_at,
|
|
4637
|
+
payload = excluded.payload`);
|
|
4638
|
+
const deleteStatement = database.query(`DELETE FROM "${tableName}" WHERE id = ?1`);
|
|
4639
|
+
const writeEvidence = (record) => {
|
|
4640
|
+
upsertStatement.run(record.id, readRealCallProfileEvidenceSortTime(record, record.createdAt), record.profileId, record.sessionId, record.createdAt, JSON.stringify(record));
|
|
4641
|
+
return record;
|
|
4642
|
+
};
|
|
4643
|
+
const readEvidence = (id) => {
|
|
4644
|
+
const row = selectStatement.get(id);
|
|
4645
|
+
return row ? JSON.parse(row.payload) : undefined;
|
|
4646
|
+
};
|
|
4647
|
+
const matchesListOptions = (record, input) => {
|
|
4648
|
+
const evidenceTime = readRealCallProfileEvidenceSortTime(record, record.createdAt);
|
|
4649
|
+
const since = parseRealCallProfileEvidenceBoundary(input.since);
|
|
4650
|
+
const until = parseRealCallProfileEvidenceBoundary(input.until);
|
|
4651
|
+
return (!input.profileId || record.profileId === input.profileId) && (!input.sessionId || record.sessionId === input.sessionId) && (since === undefined || Number.isNaN(since) || evidenceTime >= since) && (until === undefined || Number.isNaN(until) || evidenceTime <= until);
|
|
4652
|
+
};
|
|
4653
|
+
return {
|
|
4654
|
+
append(input) {
|
|
4655
|
+
const createdAt = input.createdAt ?? now();
|
|
4656
|
+
return writeEvidence({
|
|
4657
|
+
...input,
|
|
4658
|
+
createdAt,
|
|
4659
|
+
id: input.id ?? createId()
|
|
4660
|
+
});
|
|
4661
|
+
},
|
|
4662
|
+
get(id) {
|
|
4663
|
+
return readEvidence(id);
|
|
4664
|
+
},
|
|
4665
|
+
list(input = {}) {
|
|
4666
|
+
const limit = Number.isFinite(input.limit) && input.limit !== undefined && input.limit > 0 ? Math.floor(input.limit) : 500;
|
|
4667
|
+
return listStatement.all().map((row) => JSON.parse(row.payload)).filter((record) => matchesListOptions(record, input)).slice(0, limit);
|
|
4668
|
+
},
|
|
4669
|
+
remove(id) {
|
|
4670
|
+
deleteStatement.run(id);
|
|
4671
|
+
}
|
|
4672
|
+
};
|
|
4673
|
+
};
|
|
4578
4674
|
var normalizeRealCallRecoveryJobTableName = (value) => value.trim().replace(/[^a-zA-Z0-9_]+/g, "_").replace(/^_+|_+$/g, "") || "voice_real_call_profile_recovery_jobs";
|
|
4579
4675
|
var createVoiceSQLiteRealCallProfileRecoveryJobStore = (options = {}) => {
|
|
4580
4676
|
const { Database: SQLiteDatabase } = __require("bun:sqlite");
|
|
@@ -4828,6 +4924,13 @@ var buildVoiceRealCallProfileHistoryReport = (options = {}) => {
|
|
|
4828
4924
|
trend
|
|
4829
4925
|
};
|
|
4830
4926
|
};
|
|
4927
|
+
var buildVoiceRealCallProfileHistoryReportFromStore = async (options) => {
|
|
4928
|
+
const evidence = await options.store.list(options);
|
|
4929
|
+
return buildVoiceRealCallProfileHistoryReport({
|
|
4930
|
+
...options,
|
|
4931
|
+
evidence
|
|
4932
|
+
});
|
|
4933
|
+
};
|
|
4831
4934
|
var normalizeProviderStatus = (status) => status === "pass" ? "pass" : status === "fail" ? "fail" : "warn";
|
|
4832
4935
|
var providerSortScore = (provider) => [
|
|
4833
4936
|
recommendationStatusRank[provider.status],
|
|
@@ -5725,6 +5828,294 @@ var VoiceProofTrends = ({
|
|
|
5725
5828
|
]
|
|
5726
5829
|
}, undefined, true, undefined, this);
|
|
5727
5830
|
};
|
|
5831
|
+
// src/client/reconnectProfileEvidence.ts
|
|
5832
|
+
var fetchVoiceReconnectProfileEvidence = async (path = "/api/voice/reconnect-profile-evidence", options = {}) => {
|
|
5833
|
+
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
5834
|
+
const response = await fetchImpl(path);
|
|
5835
|
+
if (!response.ok) {
|
|
5836
|
+
throw new Error(`Voice reconnect profile evidence failed: HTTP ${response.status}`);
|
|
5837
|
+
}
|
|
5838
|
+
return await response.json();
|
|
5839
|
+
};
|
|
5840
|
+
var createVoiceReconnectProfileEvidenceStore = (path = "/api/voice/reconnect-profile-evidence", options = {}) => {
|
|
5841
|
+
const listeners = new Set;
|
|
5842
|
+
let closed = false;
|
|
5843
|
+
let timer;
|
|
5844
|
+
let snapshot = {
|
|
5845
|
+
error: null,
|
|
5846
|
+
isLoading: false
|
|
5847
|
+
};
|
|
5848
|
+
const emit = () => {
|
|
5849
|
+
for (const listener of listeners) {
|
|
5850
|
+
listener();
|
|
5851
|
+
}
|
|
5852
|
+
};
|
|
5853
|
+
const refresh = async () => {
|
|
5854
|
+
if (closed) {
|
|
5855
|
+
return snapshot.report;
|
|
5856
|
+
}
|
|
5857
|
+
snapshot = { ...snapshot, error: null, isLoading: true };
|
|
5858
|
+
emit();
|
|
5859
|
+
try {
|
|
5860
|
+
const report = await fetchVoiceReconnectProfileEvidence(path, options);
|
|
5861
|
+
snapshot = {
|
|
5862
|
+
error: null,
|
|
5863
|
+
isLoading: false,
|
|
5864
|
+
report,
|
|
5865
|
+
updatedAt: Date.now()
|
|
5866
|
+
};
|
|
5867
|
+
emit();
|
|
5868
|
+
return report;
|
|
5869
|
+
} catch (error) {
|
|
5870
|
+
snapshot = {
|
|
5871
|
+
...snapshot,
|
|
5872
|
+
error: error instanceof Error ? error.message : String(error),
|
|
5873
|
+
isLoading: false
|
|
5874
|
+
};
|
|
5875
|
+
emit();
|
|
5876
|
+
throw error;
|
|
5877
|
+
}
|
|
5878
|
+
};
|
|
5879
|
+
const close = () => {
|
|
5880
|
+
closed = true;
|
|
5881
|
+
if (timer) {
|
|
5882
|
+
clearInterval(timer);
|
|
5883
|
+
timer = undefined;
|
|
5884
|
+
}
|
|
5885
|
+
listeners.clear();
|
|
5886
|
+
};
|
|
5887
|
+
if (typeof window !== "undefined" && options.intervalMs && options.intervalMs > 0) {
|
|
5888
|
+
timer = setInterval(() => {
|
|
5889
|
+
refresh().catch(() => {});
|
|
5890
|
+
}, options.intervalMs);
|
|
5891
|
+
}
|
|
5892
|
+
return {
|
|
5893
|
+
close,
|
|
5894
|
+
getServerSnapshot: () => snapshot,
|
|
5895
|
+
getSnapshot: () => snapshot,
|
|
5896
|
+
refresh,
|
|
5897
|
+
subscribe: (listener) => {
|
|
5898
|
+
listeners.add(listener);
|
|
5899
|
+
return () => {
|
|
5900
|
+
listeners.delete(listener);
|
|
5901
|
+
};
|
|
5902
|
+
}
|
|
5903
|
+
};
|
|
5904
|
+
};
|
|
5905
|
+
|
|
5906
|
+
// src/client/reconnectProfileEvidenceWidget.ts
|
|
5907
|
+
var DEFAULT_TITLE6 = "Persisted Reconnect Evidence";
|
|
5908
|
+
var DEFAULT_DESCRIPTION6 = "Real browser reconnect/resume evidence persisted into profile history so recovery claims are backed by durable traces.";
|
|
5909
|
+
var DEFAULT_LINKS3 = [
|
|
5910
|
+
{ href: "/voice/reconnect-contract", label: "Reconnect contract" },
|
|
5911
|
+
{
|
|
5912
|
+
href: "/api/voice/real-call-profile-history",
|
|
5913
|
+
label: "Profile history JSON"
|
|
5914
|
+
}
|
|
5915
|
+
];
|
|
5916
|
+
var escapeHtml11 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
5917
|
+
var formatMs2 = (value) => typeof value === "number" && Number.isFinite(value) ? `${Math.round(value)}ms` : "n/a";
|
|
5918
|
+
var formatCount = (value) => new Intl.NumberFormat("en-US").format(value);
|
|
5919
|
+
var formatAge = (value) => {
|
|
5920
|
+
if (!value) {
|
|
5921
|
+
return "No evidence";
|
|
5922
|
+
}
|
|
5923
|
+
const elapsedMs = Date.now() - Date.parse(value);
|
|
5924
|
+
if (!Number.isFinite(elapsedMs) || elapsedMs < 0) {
|
|
5925
|
+
return "Just now";
|
|
5926
|
+
}
|
|
5927
|
+
const minutes = Math.floor(elapsedMs / 60000);
|
|
5928
|
+
if (minutes < 1) {
|
|
5929
|
+
return "Just now";
|
|
5930
|
+
}
|
|
5931
|
+
if (minutes < 60) {
|
|
5932
|
+
return `${minutes}m ago`;
|
|
5933
|
+
}
|
|
5934
|
+
const hours = Math.floor(minutes / 60);
|
|
5935
|
+
if (hours < 24) {
|
|
5936
|
+
return `${hours}h ago`;
|
|
5937
|
+
}
|
|
5938
|
+
return `${Math.floor(hours / 24)}d ago`;
|
|
5939
|
+
};
|
|
5940
|
+
var createVoiceReconnectProfileEvidenceViewModel = (snapshot, options = {}) => {
|
|
5941
|
+
const report = snapshot.report;
|
|
5942
|
+
const latest = report?.latest;
|
|
5943
|
+
const latestAt = latest?.generatedAt ?? latest?.createdAt;
|
|
5944
|
+
return {
|
|
5945
|
+
description: options.description ?? latest?.profileDescription ?? DEFAULT_DESCRIPTION6,
|
|
5946
|
+
error: snapshot.error,
|
|
5947
|
+
isLoading: snapshot.isLoading,
|
|
5948
|
+
label: snapshot.error ? "Unavailable" : report ? report.status === "pass" ? "Reconnect evidence passing" : report.status === "warn" ? "Reconnect evidence incomplete" : report.status === "fail" ? "Reconnect evidence failing" : "Waiting for reconnect evidence" : snapshot.isLoading ? "Checking" : "No reconnect evidence",
|
|
5949
|
+
latest: latest ? {
|
|
5950
|
+
profileLabel: latest.profileLabel ?? latest.profileId,
|
|
5951
|
+
sessionId: latest.sessionId,
|
|
5952
|
+
surfaces: (latest.surfaces ?? []).join(", ") || "browser"
|
|
5953
|
+
} : undefined,
|
|
5954
|
+
links: options.links ?? DEFAULT_LINKS3,
|
|
5955
|
+
metrics: [
|
|
5956
|
+
{ label: "Samples", value: formatCount(report?.sampleCount ?? 0) },
|
|
5957
|
+
{ label: "Snapshots", value: formatCount(report?.snapshotCount ?? 0) },
|
|
5958
|
+
{
|
|
5959
|
+
label: "Resume p95",
|
|
5960
|
+
value: formatMs2(report?.resumeLatencyP95Ms ?? latest?.reconnect?.resumeLatencyP95Ms)
|
|
5961
|
+
},
|
|
5962
|
+
{ label: "Last proof", value: formatAge(latestAt) }
|
|
5963
|
+
],
|
|
5964
|
+
status: snapshot.error ? "error" : report ? report.status === "pass" ? "ready" : report.status === "empty" ? "empty" : "warning" : snapshot.isLoading ? "loading" : "empty",
|
|
5965
|
+
title: options.title ?? DEFAULT_TITLE6
|
|
5966
|
+
};
|
|
5967
|
+
};
|
|
5968
|
+
var renderVoiceReconnectProfileEvidenceHTML = (snapshot, options = {}) => {
|
|
5969
|
+
const model = createVoiceReconnectProfileEvidenceViewModel(snapshot, options);
|
|
5970
|
+
const metrics = `<div class="absolute-voice-reconnect-evidence__metrics">${model.metrics.map((metric) => `<article>
|
|
5971
|
+
<span>${escapeHtml11(metric.label)}</span>
|
|
5972
|
+
<strong>${escapeHtml11(metric.value)}</strong>
|
|
5973
|
+
</article>`).join("")}</div>`;
|
|
5974
|
+
const latest = model.latest ? `<p class="absolute-voice-reconnect-evidence__latest">Latest ${escapeHtml11(model.latest.profileLabel)} \xB7 ${escapeHtml11(model.latest.sessionId)} \xB7 ${escapeHtml11(model.latest.surfaces)}</p>` : `<p class="absolute-voice-reconnect-evidence__empty">No persisted reconnect profile evidence yet.</p>`;
|
|
5975
|
+
const links = model.links.length ? `<p class="absolute-voice-reconnect-evidence__links">${model.links.map((link) => `<a href="${escapeHtml11(link.href)}">${escapeHtml11(link.label)}</a>`).join("")}</p>` : "";
|
|
5976
|
+
return `<section class="absolute-voice-reconnect-evidence absolute-voice-reconnect-evidence--${escapeHtml11(model.status)}">
|
|
5977
|
+
<header class="absolute-voice-reconnect-evidence__header">
|
|
5978
|
+
<span class="absolute-voice-reconnect-evidence__eyebrow">${escapeHtml11(model.title)}</span>
|
|
5979
|
+
<strong class="absolute-voice-reconnect-evidence__label">${escapeHtml11(model.label)}</strong>
|
|
5980
|
+
</header>
|
|
5981
|
+
<p class="absolute-voice-reconnect-evidence__description">${escapeHtml11(model.description)}</p>
|
|
5982
|
+
${metrics}
|
|
5983
|
+
${latest}
|
|
5984
|
+
${links}
|
|
5985
|
+
${model.error ? `<p class="absolute-voice-reconnect-evidence__error">${escapeHtml11(model.error)}</p>` : ""}
|
|
5986
|
+
</section>`;
|
|
5987
|
+
};
|
|
5988
|
+
var getVoiceReconnectProfileEvidenceCSS = () => `.absolute-voice-reconnect-evidence{border:1px solid #bae6fd;border-radius:20px;background:#f0f9ff;color:#0f172a;padding:18px;box-shadow:0 18px 40px rgba(14,165,233,.12);font-family:inherit}.absolute-voice-reconnect-evidence--warning,.absolute-voice-reconnect-evidence--error{border-color:#fbbf24;background:#fffbeb}.absolute-voice-reconnect-evidence__header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-reconnect-evidence__eyebrow{color:#0369a1;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-reconnect-evidence__label{font-size:24px;line-height:1}.absolute-voice-reconnect-evidence__description,.absolute-voice-reconnect-evidence__empty,.absolute-voice-reconnect-evidence__latest{color:#475569}.absolute-voice-reconnect-evidence__metrics{display:grid;gap:10px;grid-template-columns:repeat(4,minmax(0,1fr));margin-top:14px}.absolute-voice-reconnect-evidence__metrics article{background:#fff;border:1px solid #bae6fd;border-radius:16px;padding:12px}.absolute-voice-reconnect-evidence__metrics span{color:#64748b;display:block;font-size:11px;font-weight:800;text-transform:uppercase}.absolute-voice-reconnect-evidence__metrics strong{display:block;font-size:20px;margin-top:4px}.absolute-voice-reconnect-evidence__links{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 0}.absolute-voice-reconnect-evidence__links a{border:1px solid #7dd3fc;border-radius:999px;color:#0369a1;font-weight:800;padding:6px 10px;text-decoration:none}.absolute-voice-reconnect-evidence__error{color:#9f1239;font-weight:700}@media (max-width:720px){.absolute-voice-reconnect-evidence__metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}`;
|
|
5989
|
+
var mountVoiceReconnectProfileEvidence = (element, path = "/api/voice/reconnect-profile-evidence", options = {}) => {
|
|
5990
|
+
const store = createVoiceReconnectProfileEvidenceStore(path, options);
|
|
5991
|
+
const render = () => {
|
|
5992
|
+
element.innerHTML = renderVoiceReconnectProfileEvidenceHTML(store.getSnapshot(), options);
|
|
5993
|
+
};
|
|
5994
|
+
const unsubscribe = store.subscribe(render);
|
|
5995
|
+
render();
|
|
5996
|
+
store.refresh().catch(() => {});
|
|
5997
|
+
return {
|
|
5998
|
+
close: () => {
|
|
5999
|
+
unsubscribe();
|
|
6000
|
+
store.close();
|
|
6001
|
+
},
|
|
6002
|
+
refresh: store.refresh
|
|
6003
|
+
};
|
|
6004
|
+
};
|
|
6005
|
+
var defineVoiceReconnectProfileEvidenceElement = (tagName = "absolute-voice-reconnect-profile-evidence") => {
|
|
6006
|
+
if (typeof window === "undefined" || typeof customElements === "undefined" || customElements.get(tagName)) {
|
|
6007
|
+
return;
|
|
6008
|
+
}
|
|
6009
|
+
customElements.define(tagName, class AbsoluteVoiceReconnectProfileEvidenceElement extends HTMLElement {
|
|
6010
|
+
mounted;
|
|
6011
|
+
connectedCallback() {
|
|
6012
|
+
const intervalMs = Number(this.getAttribute("interval-ms") ?? 5000);
|
|
6013
|
+
this.mounted = mountVoiceReconnectProfileEvidence(this, this.getAttribute("path") ?? "/api/voice/reconnect-profile-evidence", {
|
|
6014
|
+
description: this.getAttribute("description") ?? undefined,
|
|
6015
|
+
intervalMs: Number.isFinite(intervalMs) ? intervalMs : 5000,
|
|
6016
|
+
title: this.getAttribute("title") ?? undefined
|
|
6017
|
+
});
|
|
6018
|
+
}
|
|
6019
|
+
disconnectedCallback() {
|
|
6020
|
+
this.mounted?.close();
|
|
6021
|
+
this.mounted = undefined;
|
|
6022
|
+
}
|
|
6023
|
+
});
|
|
6024
|
+
};
|
|
6025
|
+
|
|
6026
|
+
// src/react/useVoiceReconnectProfileEvidence.tsx
|
|
6027
|
+
import { useEffect as useEffect6, useRef as useRef6, useSyncExternalStore as useSyncExternalStore6 } from "react";
|
|
6028
|
+
var useVoiceReconnectProfileEvidence = (path = "/api/voice/reconnect-profile-evidence", options = {}) => {
|
|
6029
|
+
const storeRef = useRef6(null);
|
|
6030
|
+
if (!storeRef.current) {
|
|
6031
|
+
storeRef.current = createVoiceReconnectProfileEvidenceStore(path, options);
|
|
6032
|
+
}
|
|
6033
|
+
const store = storeRef.current;
|
|
6034
|
+
useEffect6(() => {
|
|
6035
|
+
store.refresh().catch(() => {});
|
|
6036
|
+
return () => store.close();
|
|
6037
|
+
}, [store]);
|
|
6038
|
+
return {
|
|
6039
|
+
...useSyncExternalStore6(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
6040
|
+
refresh: store.refresh
|
|
6041
|
+
};
|
|
6042
|
+
};
|
|
6043
|
+
|
|
6044
|
+
// src/react/VoiceReconnectProfileEvidence.tsx
|
|
6045
|
+
import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
|
|
6046
|
+
var VoiceReconnectProfileEvidence = ({
|
|
6047
|
+
className,
|
|
6048
|
+
path = "/api/voice/reconnect-profile-evidence",
|
|
6049
|
+
...options
|
|
6050
|
+
}) => {
|
|
6051
|
+
const snapshot = useVoiceReconnectProfileEvidence(path, options);
|
|
6052
|
+
const model = createVoiceReconnectProfileEvidenceViewModel(snapshot, options);
|
|
6053
|
+
return /* @__PURE__ */ jsxDEV6("section", {
|
|
6054
|
+
className: [
|
|
6055
|
+
"absolute-voice-reconnect-evidence",
|
|
6056
|
+
`absolute-voice-reconnect-evidence--${model.status}`,
|
|
6057
|
+
className
|
|
6058
|
+
].filter(Boolean).join(" "),
|
|
6059
|
+
children: [
|
|
6060
|
+
/* @__PURE__ */ jsxDEV6("header", {
|
|
6061
|
+
className: "absolute-voice-reconnect-evidence__header",
|
|
6062
|
+
children: [
|
|
6063
|
+
/* @__PURE__ */ jsxDEV6("span", {
|
|
6064
|
+
className: "absolute-voice-reconnect-evidence__eyebrow",
|
|
6065
|
+
children: model.title
|
|
6066
|
+
}, undefined, false, undefined, this),
|
|
6067
|
+
/* @__PURE__ */ jsxDEV6("strong", {
|
|
6068
|
+
className: "absolute-voice-reconnect-evidence__label",
|
|
6069
|
+
children: model.label
|
|
6070
|
+
}, undefined, false, undefined, this)
|
|
6071
|
+
]
|
|
6072
|
+
}, undefined, true, undefined, this),
|
|
6073
|
+
/* @__PURE__ */ jsxDEV6("p", {
|
|
6074
|
+
className: "absolute-voice-reconnect-evidence__description",
|
|
6075
|
+
children: model.description
|
|
6076
|
+
}, undefined, false, undefined, this),
|
|
6077
|
+
/* @__PURE__ */ jsxDEV6("div", {
|
|
6078
|
+
className: "absolute-voice-reconnect-evidence__metrics",
|
|
6079
|
+
children: model.metrics.map((metric) => /* @__PURE__ */ jsxDEV6("article", {
|
|
6080
|
+
children: [
|
|
6081
|
+
/* @__PURE__ */ jsxDEV6("span", {
|
|
6082
|
+
children: metric.label
|
|
6083
|
+
}, undefined, false, undefined, this),
|
|
6084
|
+
/* @__PURE__ */ jsxDEV6("strong", {
|
|
6085
|
+
children: metric.value
|
|
6086
|
+
}, undefined, false, undefined, this)
|
|
6087
|
+
]
|
|
6088
|
+
}, metric.label, true, undefined, this))
|
|
6089
|
+
}, undefined, false, undefined, this),
|
|
6090
|
+
model.latest ? /* @__PURE__ */ jsxDEV6("p", {
|
|
6091
|
+
className: "absolute-voice-reconnect-evidence__latest",
|
|
6092
|
+
children: [
|
|
6093
|
+
"Latest ",
|
|
6094
|
+
model.latest.profileLabel,
|
|
6095
|
+
" \xB7 ",
|
|
6096
|
+
model.latest.sessionId,
|
|
6097
|
+
" \xB7",
|
|
6098
|
+
" ",
|
|
6099
|
+
model.latest.surfaces
|
|
6100
|
+
]
|
|
6101
|
+
}, undefined, true, undefined, this) : /* @__PURE__ */ jsxDEV6("p", {
|
|
6102
|
+
className: "absolute-voice-reconnect-evidence__empty",
|
|
6103
|
+
children: "No persisted reconnect profile evidence yet."
|
|
6104
|
+
}, undefined, false, undefined, this),
|
|
6105
|
+
model.links.length ? /* @__PURE__ */ jsxDEV6("p", {
|
|
6106
|
+
className: "absolute-voice-reconnect-evidence__links",
|
|
6107
|
+
children: model.links.map((link) => /* @__PURE__ */ jsxDEV6("a", {
|
|
6108
|
+
href: link.href,
|
|
6109
|
+
children: link.label
|
|
6110
|
+
}, link.href, false, undefined, this))
|
|
6111
|
+
}, undefined, false, undefined, this) : null,
|
|
6112
|
+
model.error ? /* @__PURE__ */ jsxDEV6("p", {
|
|
6113
|
+
className: "absolute-voice-reconnect-evidence__error",
|
|
6114
|
+
children: model.error
|
|
6115
|
+
}, undefined, false, undefined, this) : null
|
|
6116
|
+
]
|
|
6117
|
+
}, undefined, true, undefined, this);
|
|
6118
|
+
};
|
|
5728
6119
|
// src/client/callDebugger.ts
|
|
5729
6120
|
var fetchVoiceCallDebugger = async (path, options = {}) => {
|
|
5730
6121
|
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
@@ -5801,10 +6192,10 @@ var createVoiceCallDebuggerStore = (path, options = {}) => {
|
|
|
5801
6192
|
};
|
|
5802
6193
|
|
|
5803
6194
|
// src/client/callDebuggerWidget.ts
|
|
5804
|
-
var
|
|
5805
|
-
var
|
|
6195
|
+
var DEFAULT_TITLE7 = "Call Debugger";
|
|
6196
|
+
var DEFAULT_DESCRIPTION7 = "Open the latest call artifact with snapshot, operations record, failure replay, provider path, transcript, and incident markdown.";
|
|
5806
6197
|
var DEFAULT_LINK_LABEL = "Open debugger";
|
|
5807
|
-
var
|
|
6198
|
+
var escapeHtml12 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
5808
6199
|
var defaultHref = (path, report) => {
|
|
5809
6200
|
if (path.startsWith("/api/voice-call-debugger/")) {
|
|
5810
6201
|
return path.replace("/api/voice-call-debugger/", "/voice-call-debugger/");
|
|
@@ -5821,7 +6212,7 @@ var createVoiceCallDebuggerLaunchViewModel = (path, state, options = {}) => {
|
|
|
5821
6212
|
const report = state.report;
|
|
5822
6213
|
const href = resolveHref(path, state, options);
|
|
5823
6214
|
return {
|
|
5824
|
-
description: options.description ??
|
|
6215
|
+
description: options.description ?? DEFAULT_DESCRIPTION7,
|
|
5825
6216
|
error: state.error,
|
|
5826
6217
|
href,
|
|
5827
6218
|
isLoading: state.isLoading,
|
|
@@ -5850,25 +6241,25 @@ var createVoiceCallDebuggerLaunchViewModel = (path, state, options = {}) => {
|
|
|
5850
6241
|
{ label: "Snapshot", value: report.snapshot.status }
|
|
5851
6242
|
] : [],
|
|
5852
6243
|
status: state.error ? "error" : report ? report.status === "healthy" ? "ready" : "warning" : state.isLoading ? "loading" : "empty",
|
|
5853
|
-
title: options.title ??
|
|
6244
|
+
title: options.title ?? DEFAULT_TITLE7,
|
|
5854
6245
|
updatedAt: state.updatedAt
|
|
5855
6246
|
};
|
|
5856
6247
|
};
|
|
5857
6248
|
var renderVoiceCallDebuggerLaunchHTML = (path, state, options = {}) => {
|
|
5858
6249
|
const model = createVoiceCallDebuggerLaunchViewModel(path, state, options);
|
|
5859
6250
|
const rows = model.rows.length ? `<dl>${model.rows.map((row) => `<div>
|
|
5860
|
-
<dt>${
|
|
5861
|
-
<dd>${
|
|
6251
|
+
<dt>${escapeHtml12(row.label)}</dt>
|
|
6252
|
+
<dd>${escapeHtml12(row.value)}</dd>
|
|
5862
6253
|
</div>`).join("")}</dl>` : '<p class="absolute-voice-call-debugger-launch__empty">Load a call debugger report to see the latest support artifact.</p>';
|
|
5863
|
-
return `<section class="absolute-voice-call-debugger-launch absolute-voice-call-debugger-launch--${
|
|
6254
|
+
return `<section class="absolute-voice-call-debugger-launch absolute-voice-call-debugger-launch--${escapeHtml12(model.status)}">
|
|
5864
6255
|
<header class="absolute-voice-call-debugger-launch__header">
|
|
5865
|
-
<span class="absolute-voice-call-debugger-launch__eyebrow">${
|
|
5866
|
-
<strong class="absolute-voice-call-debugger-launch__label">${
|
|
6256
|
+
<span class="absolute-voice-call-debugger-launch__eyebrow">${escapeHtml12(model.title)}</span>
|
|
6257
|
+
<strong class="absolute-voice-call-debugger-launch__label">${escapeHtml12(model.label)}</strong>
|
|
5867
6258
|
</header>
|
|
5868
|
-
<p class="absolute-voice-call-debugger-launch__description">${
|
|
5869
|
-
<a class="absolute-voice-call-debugger-launch__link" href="${
|
|
6259
|
+
<p class="absolute-voice-call-debugger-launch__description">${escapeHtml12(model.description)}</p>
|
|
6260
|
+
<a class="absolute-voice-call-debugger-launch__link" href="${escapeHtml12(model.href)}">${escapeHtml12(options.linkLabel ?? DEFAULT_LINK_LABEL)}</a>
|
|
5870
6261
|
${rows}
|
|
5871
|
-
${model.error ? `<p class="absolute-voice-call-debugger-launch__error">${
|
|
6262
|
+
${model.error ? `<p class="absolute-voice-call-debugger-launch__error">${escapeHtml12(model.error)}</p>` : ""}
|
|
5872
6263
|
</section>`;
|
|
5873
6264
|
};
|
|
5874
6265
|
var mountVoiceCallDebuggerLaunch = (element, path, options = {}) => {
|
|
@@ -5911,25 +6302,25 @@ var defineVoiceCallDebuggerLaunchElement = (tagName = "absolute-voice-call-debug
|
|
|
5911
6302
|
};
|
|
5912
6303
|
|
|
5913
6304
|
// src/react/useVoiceCallDebugger.tsx
|
|
5914
|
-
import { useEffect as
|
|
6305
|
+
import { useEffect as useEffect7, useRef as useRef7, useSyncExternalStore as useSyncExternalStore7 } from "react";
|
|
5915
6306
|
var useVoiceCallDebugger = (path, options = {}) => {
|
|
5916
|
-
const storeRef =
|
|
6307
|
+
const storeRef = useRef7(null);
|
|
5917
6308
|
if (!storeRef.current) {
|
|
5918
6309
|
storeRef.current = createVoiceCallDebuggerStore(path, options);
|
|
5919
6310
|
}
|
|
5920
6311
|
const store = storeRef.current;
|
|
5921
|
-
|
|
6312
|
+
useEffect7(() => {
|
|
5922
6313
|
store.refresh().catch(() => {});
|
|
5923
6314
|
return () => store.close();
|
|
5924
6315
|
}, [store]);
|
|
5925
6316
|
return {
|
|
5926
|
-
...
|
|
6317
|
+
...useSyncExternalStore7(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
5927
6318
|
refresh: store.refresh
|
|
5928
6319
|
};
|
|
5929
6320
|
};
|
|
5930
6321
|
|
|
5931
6322
|
// src/react/VoiceCallDebuggerLaunch.tsx
|
|
5932
|
-
import { jsxDEV as
|
|
6323
|
+
import { jsxDEV as jsxDEV7 } from "react/jsx-dev-runtime";
|
|
5933
6324
|
var VoiceCallDebuggerLaunch = ({
|
|
5934
6325
|
className,
|
|
5935
6326
|
path,
|
|
@@ -5937,51 +6328,51 @@ var VoiceCallDebuggerLaunch = ({
|
|
|
5937
6328
|
}) => {
|
|
5938
6329
|
const state = useVoiceCallDebugger(path, options);
|
|
5939
6330
|
const model = createVoiceCallDebuggerLaunchViewModel(path, state, options);
|
|
5940
|
-
return /* @__PURE__ */
|
|
6331
|
+
return /* @__PURE__ */ jsxDEV7("section", {
|
|
5941
6332
|
className: [
|
|
5942
6333
|
"absolute-voice-call-debugger-launch",
|
|
5943
6334
|
`absolute-voice-call-debugger-launch--${model.status}`,
|
|
5944
6335
|
className
|
|
5945
6336
|
].filter(Boolean).join(" "),
|
|
5946
6337
|
children: [
|
|
5947
|
-
/* @__PURE__ */
|
|
6338
|
+
/* @__PURE__ */ jsxDEV7("header", {
|
|
5948
6339
|
className: "absolute-voice-call-debugger-launch__header",
|
|
5949
6340
|
children: [
|
|
5950
|
-
/* @__PURE__ */
|
|
6341
|
+
/* @__PURE__ */ jsxDEV7("span", {
|
|
5951
6342
|
className: "absolute-voice-call-debugger-launch__eyebrow",
|
|
5952
6343
|
children: model.title
|
|
5953
6344
|
}, undefined, false, undefined, this),
|
|
5954
|
-
/* @__PURE__ */
|
|
6345
|
+
/* @__PURE__ */ jsxDEV7("strong", {
|
|
5955
6346
|
className: "absolute-voice-call-debugger-launch__label",
|
|
5956
6347
|
children: model.label
|
|
5957
6348
|
}, undefined, false, undefined, this)
|
|
5958
6349
|
]
|
|
5959
6350
|
}, undefined, true, undefined, this),
|
|
5960
|
-
/* @__PURE__ */
|
|
6351
|
+
/* @__PURE__ */ jsxDEV7("p", {
|
|
5961
6352
|
className: "absolute-voice-call-debugger-launch__description",
|
|
5962
6353
|
children: model.description
|
|
5963
6354
|
}, undefined, false, undefined, this),
|
|
5964
|
-
/* @__PURE__ */
|
|
6355
|
+
/* @__PURE__ */ jsxDEV7("a", {
|
|
5965
6356
|
className: "absolute-voice-call-debugger-launch__link",
|
|
5966
6357
|
href: model.href,
|
|
5967
6358
|
children: options.linkLabel ?? "Open debugger"
|
|
5968
6359
|
}, undefined, false, undefined, this),
|
|
5969
|
-
model.rows.length ? /* @__PURE__ */
|
|
5970
|
-
children: model.rows.map((row) => /* @__PURE__ */
|
|
6360
|
+
model.rows.length ? /* @__PURE__ */ jsxDEV7("dl", {
|
|
6361
|
+
children: model.rows.map((row) => /* @__PURE__ */ jsxDEV7("div", {
|
|
5971
6362
|
children: [
|
|
5972
|
-
/* @__PURE__ */
|
|
6363
|
+
/* @__PURE__ */ jsxDEV7("dt", {
|
|
5973
6364
|
children: row.label
|
|
5974
6365
|
}, undefined, false, undefined, this),
|
|
5975
|
-
/* @__PURE__ */
|
|
6366
|
+
/* @__PURE__ */ jsxDEV7("dd", {
|
|
5976
6367
|
children: row.value
|
|
5977
6368
|
}, undefined, false, undefined, this)
|
|
5978
6369
|
]
|
|
5979
6370
|
}, row.label, true, undefined, this))
|
|
5980
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
6371
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV7("p", {
|
|
5981
6372
|
className: "absolute-voice-call-debugger-launch__empty",
|
|
5982
6373
|
children: "Load a call debugger report to see the latest support artifact."
|
|
5983
6374
|
}, undefined, false, undefined, this),
|
|
5984
|
-
model.error ? /* @__PURE__ */
|
|
6375
|
+
model.error ? /* @__PURE__ */ jsxDEV7("p", {
|
|
5985
6376
|
className: "absolute-voice-call-debugger-launch__error",
|
|
5986
6377
|
children: model.error
|
|
5987
6378
|
}, undefined, false, undefined, this) : null
|
|
@@ -6082,10 +6473,10 @@ var createVoiceSessionSnapshotStore = (path, options = {}) => {
|
|
|
6082
6473
|
};
|
|
6083
6474
|
|
|
6084
6475
|
// src/client/sessionSnapshotWidget.ts
|
|
6085
|
-
var
|
|
6086
|
-
var
|
|
6476
|
+
var DEFAULT_TITLE8 = "Session Snapshot";
|
|
6477
|
+
var DEFAULT_DESCRIPTION8 = "Portable call artifact with media graph, provider routing, proof, quality, and telephony evidence.";
|
|
6087
6478
|
var DEFAULT_DOWNLOAD_LABEL = "Download snapshot";
|
|
6088
|
-
var
|
|
6479
|
+
var escapeHtml13 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
6089
6480
|
var formatStatus2 = (status) => status ?? "n/a";
|
|
6090
6481
|
var createVoiceSessionSnapshotViewModel = (state, options = {}) => {
|
|
6091
6482
|
const snapshot = state.snapshot;
|
|
@@ -6101,7 +6492,7 @@ var createVoiceSessionSnapshotViewModel = (state, options = {}) => {
|
|
|
6101
6492
|
label: artifact.label,
|
|
6102
6493
|
status: formatStatus2(artifact.status)
|
|
6103
6494
|
})) ?? [],
|
|
6104
|
-
description: options.description ??
|
|
6495
|
+
description: options.description ?? DEFAULT_DESCRIPTION8,
|
|
6105
6496
|
error: state.error,
|
|
6106
6497
|
isLoading: state.isLoading,
|
|
6107
6498
|
label: state.error ? "Unavailable" : snapshot ? `${snapshot.status} \xB7 ${snapshot.sessionId}` : state.isLoading ? "Loading" : "No snapshot",
|
|
@@ -6128,30 +6519,30 @@ var createVoiceSessionSnapshotViewModel = (state, options = {}) => {
|
|
|
6128
6519
|
] : [],
|
|
6129
6520
|
showDownload: snapshot !== undefined,
|
|
6130
6521
|
status: state.error ? "error" : snapshot ? snapshot.status === "pass" ? "ready" : "warning" : state.isLoading ? "loading" : "empty",
|
|
6131
|
-
title: options.title ??
|
|
6522
|
+
title: options.title ?? DEFAULT_TITLE8,
|
|
6132
6523
|
updatedAt: state.updatedAt
|
|
6133
6524
|
};
|
|
6134
6525
|
};
|
|
6135
6526
|
var renderVoiceSessionSnapshotHTML = (state, options = {}) => {
|
|
6136
6527
|
const model = createVoiceSessionSnapshotViewModel(state, options);
|
|
6137
6528
|
const rows = model.rows.length ? `<dl>${model.rows.map((row) => `<div>
|
|
6138
|
-
<dt>${
|
|
6139
|
-
<dd>${
|
|
6529
|
+
<dt>${escapeHtml13(row.label)}</dt>
|
|
6530
|
+
<dd>${escapeHtml13(row.value)}</dd>
|
|
6140
6531
|
</div>`).join("")}</dl>` : '<p class="absolute-voice-session-snapshot__empty">Load a session snapshot to see support diagnostics.</p>';
|
|
6141
6532
|
const artifacts = model.artifacts.length ? `<div class="absolute-voice-session-snapshot__artifacts">${model.artifacts.map((artifact) => {
|
|
6142
|
-
const body = `<strong>${
|
|
6143
|
-
return artifact.href ? `<a href="${
|
|
6533
|
+
const body = `<strong>${escapeHtml13(artifact.label)}</strong><span>${escapeHtml13(artifact.status)}</span>`;
|
|
6534
|
+
return artifact.href ? `<a href="${escapeHtml13(artifact.href)}">${body}</a>` : `<div>${body}</div>`;
|
|
6144
6535
|
}).join("")}</div>` : "";
|
|
6145
|
-
return `<section class="absolute-voice-session-snapshot absolute-voice-session-snapshot--${
|
|
6536
|
+
return `<section class="absolute-voice-session-snapshot absolute-voice-session-snapshot--${escapeHtml13(model.status)}">
|
|
6146
6537
|
<header class="absolute-voice-session-snapshot__header">
|
|
6147
|
-
<span class="absolute-voice-session-snapshot__eyebrow">${
|
|
6148
|
-
<strong class="absolute-voice-session-snapshot__label">${
|
|
6538
|
+
<span class="absolute-voice-session-snapshot__eyebrow">${escapeHtml13(model.title)}</span>
|
|
6539
|
+
<strong class="absolute-voice-session-snapshot__label">${escapeHtml13(model.label)}</strong>
|
|
6149
6540
|
</header>
|
|
6150
|
-
<p class="absolute-voice-session-snapshot__description">${
|
|
6151
|
-
${model.showDownload ? `<button class="absolute-voice-session-snapshot__download" data-absolute-voice-session-snapshot-download type="button">${
|
|
6541
|
+
<p class="absolute-voice-session-snapshot__description">${escapeHtml13(model.description)}</p>
|
|
6542
|
+
${model.showDownload ? `<button class="absolute-voice-session-snapshot__download" data-absolute-voice-session-snapshot-download type="button">${escapeHtml13(options.downloadLabel ?? DEFAULT_DOWNLOAD_LABEL)}</button>` : ""}
|
|
6152
6543
|
${rows}
|
|
6153
6544
|
${artifacts}
|
|
6154
|
-
${model.error ? `<p class="absolute-voice-session-snapshot__error">${
|
|
6545
|
+
${model.error ? `<p class="absolute-voice-session-snapshot__error">${escapeHtml13(model.error)}</p>` : ""}
|
|
6155
6546
|
</section>`;
|
|
6156
6547
|
};
|
|
6157
6548
|
var downloadBlob = (blob, filename) => {
|
|
@@ -6215,26 +6606,26 @@ var defineVoiceSessionSnapshotElement = (tagName = "absolute-voice-session-snaps
|
|
|
6215
6606
|
};
|
|
6216
6607
|
|
|
6217
6608
|
// src/react/useVoiceSessionSnapshot.tsx
|
|
6218
|
-
import { useEffect as
|
|
6609
|
+
import { useEffect as useEffect8, useRef as useRef8, useSyncExternalStore as useSyncExternalStore8 } from "react";
|
|
6219
6610
|
var useVoiceSessionSnapshot = (path, options = {}) => {
|
|
6220
|
-
const storeRef =
|
|
6611
|
+
const storeRef = useRef8(null);
|
|
6221
6612
|
if (!storeRef.current) {
|
|
6222
6613
|
storeRef.current = createVoiceSessionSnapshotStore(path, options);
|
|
6223
6614
|
}
|
|
6224
6615
|
const store = storeRef.current;
|
|
6225
|
-
|
|
6616
|
+
useEffect8(() => {
|
|
6226
6617
|
store.refresh().catch(() => {});
|
|
6227
6618
|
return () => store.close();
|
|
6228
6619
|
}, [store]);
|
|
6229
6620
|
return {
|
|
6230
|
-
...
|
|
6621
|
+
...useSyncExternalStore8(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
6231
6622
|
download: store.download,
|
|
6232
6623
|
refresh: store.refresh
|
|
6233
6624
|
};
|
|
6234
6625
|
};
|
|
6235
6626
|
|
|
6236
6627
|
// src/react/VoiceSessionSnapshot.tsx
|
|
6237
|
-
import { jsxDEV as
|
|
6628
|
+
import { jsxDEV as jsxDEV8 } from "react/jsx-dev-runtime";
|
|
6238
6629
|
var VoiceSessionSnapshot = ({
|
|
6239
6630
|
className,
|
|
6240
6631
|
path,
|
|
@@ -6242,52 +6633,52 @@ var VoiceSessionSnapshot = ({
|
|
|
6242
6633
|
}) => {
|
|
6243
6634
|
const state = useVoiceSessionSnapshot(path, options);
|
|
6244
6635
|
const model = createVoiceSessionSnapshotViewModel(state, options);
|
|
6245
|
-
return /* @__PURE__ */
|
|
6636
|
+
return /* @__PURE__ */ jsxDEV8("section", {
|
|
6246
6637
|
className: [
|
|
6247
6638
|
"absolute-voice-session-snapshot",
|
|
6248
6639
|
`absolute-voice-session-snapshot--${model.status}`,
|
|
6249
6640
|
className
|
|
6250
6641
|
].filter(Boolean).join(" "),
|
|
6251
6642
|
children: [
|
|
6252
|
-
/* @__PURE__ */
|
|
6643
|
+
/* @__PURE__ */ jsxDEV8("header", {
|
|
6253
6644
|
className: "absolute-voice-session-snapshot__header",
|
|
6254
6645
|
children: [
|
|
6255
|
-
/* @__PURE__ */
|
|
6646
|
+
/* @__PURE__ */ jsxDEV8("span", {
|
|
6256
6647
|
className: "absolute-voice-session-snapshot__eyebrow",
|
|
6257
6648
|
children: model.title
|
|
6258
6649
|
}, undefined, false, undefined, this),
|
|
6259
|
-
/* @__PURE__ */
|
|
6650
|
+
/* @__PURE__ */ jsxDEV8("strong", {
|
|
6260
6651
|
className: "absolute-voice-session-snapshot__label",
|
|
6261
6652
|
children: model.label
|
|
6262
6653
|
}, undefined, false, undefined, this)
|
|
6263
6654
|
]
|
|
6264
6655
|
}, undefined, true, undefined, this),
|
|
6265
|
-
/* @__PURE__ */
|
|
6656
|
+
/* @__PURE__ */ jsxDEV8("p", {
|
|
6266
6657
|
className: "absolute-voice-session-snapshot__description",
|
|
6267
6658
|
children: model.description
|
|
6268
6659
|
}, undefined, false, undefined, this),
|
|
6269
|
-
model.showDownload ? /* @__PURE__ */
|
|
6660
|
+
model.showDownload ? /* @__PURE__ */ jsxDEV8("button", {
|
|
6270
6661
|
className: "absolute-voice-session-snapshot__download",
|
|
6271
6662
|
onClick: () => state.download(),
|
|
6272
6663
|
type: "button",
|
|
6273
6664
|
children: options.downloadLabel ?? "Download snapshot"
|
|
6274
6665
|
}, undefined, false, undefined, this) : null,
|
|
6275
|
-
model.rows.length ? /* @__PURE__ */
|
|
6276
|
-
children: model.rows.map((row) => /* @__PURE__ */
|
|
6666
|
+
model.rows.length ? /* @__PURE__ */ jsxDEV8("dl", {
|
|
6667
|
+
children: model.rows.map((row) => /* @__PURE__ */ jsxDEV8("div", {
|
|
6277
6668
|
children: [
|
|
6278
|
-
/* @__PURE__ */
|
|
6669
|
+
/* @__PURE__ */ jsxDEV8("dt", {
|
|
6279
6670
|
children: row.label
|
|
6280
6671
|
}, undefined, false, undefined, this),
|
|
6281
|
-
/* @__PURE__ */
|
|
6672
|
+
/* @__PURE__ */ jsxDEV8("dd", {
|
|
6282
6673
|
children: row.value
|
|
6283
6674
|
}, undefined, false, undefined, this)
|
|
6284
6675
|
]
|
|
6285
6676
|
}, row.label, true, undefined, this))
|
|
6286
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
6677
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV8("p", {
|
|
6287
6678
|
className: "absolute-voice-session-snapshot__empty",
|
|
6288
6679
|
children: "Load a session snapshot to see support diagnostics."
|
|
6289
6680
|
}, undefined, false, undefined, this),
|
|
6290
|
-
model.error ? /* @__PURE__ */
|
|
6681
|
+
model.error ? /* @__PURE__ */ jsxDEV8("p", {
|
|
6291
6682
|
className: "absolute-voice-session-snapshot__error",
|
|
6292
6683
|
children: model.error
|
|
6293
6684
|
}, undefined, false, undefined, this) : null
|
|
@@ -6370,20 +6761,20 @@ var createVoiceProfileComparisonStore = (path = "/api/voice/real-call-profile-hi
|
|
|
6370
6761
|
};
|
|
6371
6762
|
|
|
6372
6763
|
// src/client/profileComparisonWidget.ts
|
|
6373
|
-
var
|
|
6374
|
-
var
|
|
6375
|
-
var
|
|
6764
|
+
var DEFAULT_TITLE9 = "Profile Stack Comparison";
|
|
6765
|
+
var DEFAULT_DESCRIPTION9 = "Measured real-call evidence behind each profile default: provider routes, latency, and the next move.";
|
|
6766
|
+
var DEFAULT_LINKS4 = [
|
|
6376
6767
|
{ href: "/voice/real-call-profile-history", label: "Profile history" },
|
|
6377
6768
|
{ href: "/api/voice/real-call-profile-history", label: "JSON" }
|
|
6378
6769
|
];
|
|
6379
|
-
var
|
|
6380
|
-
var
|
|
6770
|
+
var escapeHtml14 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
6771
|
+
var formatMs3 = (value) => typeof value === "number" && Number.isFinite(value) ? `${Math.round(value)}ms` : "n/a";
|
|
6381
6772
|
var formatProviderRoutes = (profile) => Object.entries(profile.providerRoutes).map(([role, provider]) => `${role}: ${provider}`).join(", ") || "No complete route yet";
|
|
6382
6773
|
var createProfileView = (profile) => ({
|
|
6383
6774
|
evidence: [
|
|
6384
|
-
{ label: "Live p95", value:
|
|
6385
|
-
{ label: "Provider p95", value:
|
|
6386
|
-
{ label: "Turn p95", value:
|
|
6775
|
+
{ label: "Live p95", value: formatMs3(profile.evidence.liveP95Ms) },
|
|
6776
|
+
{ label: "Provider p95", value: formatMs3(profile.evidence.providerP95Ms) },
|
|
6777
|
+
{ label: "Turn p95", value: formatMs3(profile.evidence.turnP95Ms) }
|
|
6387
6778
|
],
|
|
6388
6779
|
label: profile.label ?? profile.profileId,
|
|
6389
6780
|
nextMove: profile.nextMove,
|
|
@@ -6395,37 +6786,37 @@ var createVoiceProfileComparisonViewModel = (snapshot, options = {}) => {
|
|
|
6395
6786
|
const report = snapshot.report;
|
|
6396
6787
|
const profiles = report?.defaults.profiles.map(createProfileView) ?? [];
|
|
6397
6788
|
return {
|
|
6398
|
-
description: options.description ??
|
|
6789
|
+
description: options.description ?? DEFAULT_DESCRIPTION9,
|
|
6399
6790
|
error: snapshot.error,
|
|
6400
6791
|
isLoading: snapshot.isLoading,
|
|
6401
6792
|
label: snapshot.error ? "Unavailable" : report ? `${report.defaults.summary.actionableProfiles}/${report.defaults.summary.profileCount} profiles ready` : snapshot.isLoading ? "Checking" : "No profile evidence",
|
|
6402
|
-
links: options.links ??
|
|
6793
|
+
links: options.links ?? DEFAULT_LINKS4,
|
|
6403
6794
|
profiles,
|
|
6404
6795
|
status: snapshot.error ? "error" : report ? report.status === "pass" ? "ready" : "warning" : snapshot.isLoading ? "loading" : "empty",
|
|
6405
|
-
title: options.title ??
|
|
6796
|
+
title: options.title ?? DEFAULT_TITLE9
|
|
6406
6797
|
};
|
|
6407
6798
|
};
|
|
6408
6799
|
var renderVoiceProfileComparisonHTML = (snapshot, options = {}) => {
|
|
6409
6800
|
const model = createVoiceProfileComparisonViewModel(snapshot, options);
|
|
6410
|
-
const profiles = model.profiles.length ? `<div class="absolute-voice-profile-comparison__profiles">${model.profiles.map((profile) => `<article class="absolute-voice-profile-comparison__profile absolute-voice-profile-comparison__profile--${
|
|
6801
|
+
const profiles = model.profiles.length ? `<div class="absolute-voice-profile-comparison__profiles">${model.profiles.map((profile) => `<article class="absolute-voice-profile-comparison__profile absolute-voice-profile-comparison__profile--${escapeHtml14(profile.status)}">
|
|
6411
6802
|
<header>
|
|
6412
|
-
<span>${
|
|
6413
|
-
<strong>${
|
|
6803
|
+
<span>${escapeHtml14(profile.status)}</span>
|
|
6804
|
+
<strong>${escapeHtml14(profile.label)}</strong>
|
|
6414
6805
|
</header>
|
|
6415
|
-
<p>${
|
|
6416
|
-
<div>${profile.evidence.map((metric) => `<span><small>${
|
|
6417
|
-
<em>${
|
|
6418
|
-
</article>`).join("")}</div>` : `<p class="absolute-voice-profile-comparison__empty">${model.error ?
|
|
6419
|
-
const links = model.links.length ? `<p class="absolute-voice-profile-comparison__links">${model.links.map((link) => `<a href="${
|
|
6420
|
-
return `<section class="absolute-voice-profile-comparison absolute-voice-profile-comparison--${
|
|
6806
|
+
<p>${escapeHtml14(profile.providerRoutes)}</p>
|
|
6807
|
+
<div>${profile.evidence.map((metric) => `<span><small>${escapeHtml14(metric.label)}</small><b>${escapeHtml14(metric.value)}</b></span>`).join("")}</div>
|
|
6808
|
+
<em>${escapeHtml14(profile.nextMove)}</em>
|
|
6809
|
+
</article>`).join("")}</div>` : `<p class="absolute-voice-profile-comparison__empty">${model.error ? escapeHtml14(model.error) : "Run real-call profile collection to populate profile comparisons."}</p>`;
|
|
6810
|
+
const links = model.links.length ? `<p class="absolute-voice-profile-comparison__links">${model.links.map((link) => `<a href="${escapeHtml14(link.href)}">${escapeHtml14(link.label)}</a>`).join("")}</p>` : "";
|
|
6811
|
+
return `<section class="absolute-voice-profile-comparison absolute-voice-profile-comparison--${escapeHtml14(model.status)}">
|
|
6421
6812
|
<header class="absolute-voice-profile-comparison__header">
|
|
6422
|
-
<span class="absolute-voice-profile-comparison__eyebrow">${
|
|
6423
|
-
<strong class="absolute-voice-profile-comparison__label">${
|
|
6813
|
+
<span class="absolute-voice-profile-comparison__eyebrow">${escapeHtml14(model.title)}</span>
|
|
6814
|
+
<strong class="absolute-voice-profile-comparison__label">${escapeHtml14(model.label)}</strong>
|
|
6424
6815
|
</header>
|
|
6425
|
-
<p class="absolute-voice-profile-comparison__description">${
|
|
6816
|
+
<p class="absolute-voice-profile-comparison__description">${escapeHtml14(model.description)}</p>
|
|
6426
6817
|
${profiles}
|
|
6427
6818
|
${links}
|
|
6428
|
-
${model.error ? `<p class="absolute-voice-profile-comparison__error">${
|
|
6819
|
+
${model.error ? `<p class="absolute-voice-profile-comparison__error">${escapeHtml14(model.error)}</p>` : ""}
|
|
6429
6820
|
</section>`;
|
|
6430
6821
|
};
|
|
6431
6822
|
var getVoiceProfileComparisonCSS = () => `.absolute-voice-profile-comparison{border:1px solid #c7d2fe;border-radius:20px;background:#eef2ff;color:#111827;padding:18px;box-shadow:0 18px 40px rgba(79,70,229,.12);font-family:inherit}.absolute-voice-profile-comparison--warning,.absolute-voice-profile-comparison--error{border-color:#fbbf24;background:#fffbeb}.absolute-voice-profile-comparison__header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-profile-comparison__eyebrow{color:#4338ca;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-profile-comparison__label{font-size:24px;line-height:1}.absolute-voice-profile-comparison__description,.absolute-voice-profile-comparison__empty{color:#4b5563}.absolute-voice-profile-comparison__profiles{display:grid;gap:12px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));margin-top:14px}.absolute-voice-profile-comparison__profile{background:#fff;border:1px solid #c7d2fe;border-radius:16px;padding:14px}.absolute-voice-profile-comparison__profile--warn{border-color:#fbbf24}.absolute-voice-profile-comparison__profile--fail{border-color:#f87171}.absolute-voice-profile-comparison__profile header{align-items:center;display:flex;gap:8px;justify-content:space-between}.absolute-voice-profile-comparison__profile header span{border:1px solid currentColor;border-radius:999px;color:#4338ca;font-size:11px;font-weight:900;padding:3px 7px;text-transform:uppercase}.absolute-voice-profile-comparison__profile p{color:#1f2937;font-weight:800;overflow-wrap:anywhere}.absolute-voice-profile-comparison__profile div{display:grid;gap:8px;grid-template-columns:repeat(3,minmax(0,1fr))}.absolute-voice-profile-comparison__profile small{color:#6b7280;display:block;font-size:11px}.absolute-voice-profile-comparison__profile b{display:block}.absolute-voice-profile-comparison__profile em{color:#4b5563;display:block;font-size:13px;margin-top:12px}.absolute-voice-profile-comparison__links{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 0}.absolute-voice-profile-comparison__links a{border:1px solid #a5b4fc;border-radius:999px;color:#4338ca;font-weight:800;padding:6px 10px;text-decoration:none}.absolute-voice-profile-comparison__error{color:#9f1239;font-weight:700}`;
|
|
@@ -6467,25 +6858,25 @@ var defineVoiceProfileComparisonElement = (tagName = "absolute-voice-profile-com
|
|
|
6467
6858
|
};
|
|
6468
6859
|
|
|
6469
6860
|
// src/react/useVoiceProfileComparison.tsx
|
|
6470
|
-
import { useEffect as
|
|
6861
|
+
import { useEffect as useEffect9, useRef as useRef9, useSyncExternalStore as useSyncExternalStore9 } from "react";
|
|
6471
6862
|
var useVoiceProfileComparison = (path = "/api/voice/real-call-profile-history", options = {}) => {
|
|
6472
|
-
const storeRef =
|
|
6863
|
+
const storeRef = useRef9(null);
|
|
6473
6864
|
if (!storeRef.current) {
|
|
6474
6865
|
storeRef.current = createVoiceProfileComparisonStore(path, options);
|
|
6475
6866
|
}
|
|
6476
6867
|
const store = storeRef.current;
|
|
6477
|
-
|
|
6868
|
+
useEffect9(() => {
|
|
6478
6869
|
store.refresh().catch(() => {});
|
|
6479
6870
|
return () => store.close();
|
|
6480
6871
|
}, [store]);
|
|
6481
6872
|
return {
|
|
6482
|
-
...
|
|
6873
|
+
...useSyncExternalStore9(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
6483
6874
|
refresh: store.refresh
|
|
6484
6875
|
};
|
|
6485
6876
|
};
|
|
6486
6877
|
|
|
6487
6878
|
// src/react/VoiceProfileComparison.tsx
|
|
6488
|
-
import { jsxDEV as
|
|
6879
|
+
import { jsxDEV as jsxDEV9 } from "react/jsx-dev-runtime";
|
|
6489
6880
|
var VoiceProfileComparison = ({
|
|
6490
6881
|
className,
|
|
6491
6882
|
path = "/api/voice/real-call-profile-history",
|
|
@@ -6493,77 +6884,77 @@ var VoiceProfileComparison = ({
|
|
|
6493
6884
|
}) => {
|
|
6494
6885
|
const snapshot = useVoiceProfileComparison(path, options);
|
|
6495
6886
|
const model = createVoiceProfileComparisonViewModel(snapshot, options);
|
|
6496
|
-
return /* @__PURE__ */
|
|
6887
|
+
return /* @__PURE__ */ jsxDEV9("section", {
|
|
6497
6888
|
className: [
|
|
6498
6889
|
"absolute-voice-profile-comparison",
|
|
6499
6890
|
`absolute-voice-profile-comparison--${model.status}`,
|
|
6500
6891
|
className
|
|
6501
6892
|
].filter(Boolean).join(" "),
|
|
6502
6893
|
children: [
|
|
6503
|
-
/* @__PURE__ */
|
|
6894
|
+
/* @__PURE__ */ jsxDEV9("header", {
|
|
6504
6895
|
className: "absolute-voice-profile-comparison__header",
|
|
6505
6896
|
children: [
|
|
6506
|
-
/* @__PURE__ */
|
|
6897
|
+
/* @__PURE__ */ jsxDEV9("span", {
|
|
6507
6898
|
className: "absolute-voice-profile-comparison__eyebrow",
|
|
6508
6899
|
children: model.title
|
|
6509
6900
|
}, undefined, false, undefined, this),
|
|
6510
|
-
/* @__PURE__ */
|
|
6901
|
+
/* @__PURE__ */ jsxDEV9("strong", {
|
|
6511
6902
|
className: "absolute-voice-profile-comparison__label",
|
|
6512
6903
|
children: model.label
|
|
6513
6904
|
}, undefined, false, undefined, this)
|
|
6514
6905
|
]
|
|
6515
6906
|
}, undefined, true, undefined, this),
|
|
6516
|
-
/* @__PURE__ */
|
|
6907
|
+
/* @__PURE__ */ jsxDEV9("p", {
|
|
6517
6908
|
className: "absolute-voice-profile-comparison__description",
|
|
6518
6909
|
children: model.description
|
|
6519
6910
|
}, undefined, false, undefined, this),
|
|
6520
|
-
model.profiles.length ? /* @__PURE__ */
|
|
6911
|
+
model.profiles.length ? /* @__PURE__ */ jsxDEV9("div", {
|
|
6521
6912
|
className: "absolute-voice-profile-comparison__profiles",
|
|
6522
|
-
children: model.profiles.map((profile) => /* @__PURE__ */
|
|
6913
|
+
children: model.profiles.map((profile) => /* @__PURE__ */ jsxDEV9("article", {
|
|
6523
6914
|
className: `absolute-voice-profile-comparison__profile absolute-voice-profile-comparison__profile--${profile.status}`,
|
|
6524
6915
|
children: [
|
|
6525
|
-
/* @__PURE__ */
|
|
6916
|
+
/* @__PURE__ */ jsxDEV9("header", {
|
|
6526
6917
|
children: [
|
|
6527
|
-
/* @__PURE__ */
|
|
6918
|
+
/* @__PURE__ */ jsxDEV9("span", {
|
|
6528
6919
|
children: profile.status
|
|
6529
6920
|
}, undefined, false, undefined, this),
|
|
6530
|
-
/* @__PURE__ */
|
|
6921
|
+
/* @__PURE__ */ jsxDEV9("strong", {
|
|
6531
6922
|
children: profile.label
|
|
6532
6923
|
}, undefined, false, undefined, this)
|
|
6533
6924
|
]
|
|
6534
6925
|
}, undefined, true, undefined, this),
|
|
6535
|
-
/* @__PURE__ */
|
|
6926
|
+
/* @__PURE__ */ jsxDEV9("p", {
|
|
6536
6927
|
children: profile.providerRoutes
|
|
6537
6928
|
}, undefined, false, undefined, this),
|
|
6538
|
-
/* @__PURE__ */
|
|
6539
|
-
children: profile.evidence.map((metric) => /* @__PURE__ */
|
|
6929
|
+
/* @__PURE__ */ jsxDEV9("div", {
|
|
6930
|
+
children: profile.evidence.map((metric) => /* @__PURE__ */ jsxDEV9("span", {
|
|
6540
6931
|
children: [
|
|
6541
|
-
/* @__PURE__ */
|
|
6932
|
+
/* @__PURE__ */ jsxDEV9("small", {
|
|
6542
6933
|
children: metric.label
|
|
6543
6934
|
}, undefined, false, undefined, this),
|
|
6544
|
-
/* @__PURE__ */
|
|
6935
|
+
/* @__PURE__ */ jsxDEV9("b", {
|
|
6545
6936
|
children: metric.value
|
|
6546
6937
|
}, undefined, false, undefined, this)
|
|
6547
6938
|
]
|
|
6548
6939
|
}, metric.label, true, undefined, this))
|
|
6549
6940
|
}, undefined, false, undefined, this),
|
|
6550
|
-
/* @__PURE__ */
|
|
6941
|
+
/* @__PURE__ */ jsxDEV9("em", {
|
|
6551
6942
|
children: profile.nextMove
|
|
6552
6943
|
}, undefined, false, undefined, this)
|
|
6553
6944
|
]
|
|
6554
6945
|
}, profile.profileId, true, undefined, this))
|
|
6555
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
6946
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV9("p", {
|
|
6556
6947
|
className: "absolute-voice-profile-comparison__empty",
|
|
6557
6948
|
children: model.error ?? "Run real-call profile collection to populate profile comparisons."
|
|
6558
6949
|
}, undefined, false, undefined, this),
|
|
6559
|
-
model.links.length ? /* @__PURE__ */
|
|
6950
|
+
model.links.length ? /* @__PURE__ */ jsxDEV9("p", {
|
|
6560
6951
|
className: "absolute-voice-profile-comparison__links",
|
|
6561
|
-
children: model.links.map((link) => /* @__PURE__ */
|
|
6952
|
+
children: model.links.map((link) => /* @__PURE__ */ jsxDEV9("a", {
|
|
6562
6953
|
href: link.href,
|
|
6563
6954
|
children: link.label
|
|
6564
6955
|
}, link.href, false, undefined, this))
|
|
6565
6956
|
}, undefined, false, undefined, this) : null,
|
|
6566
|
-
model.error ? /* @__PURE__ */
|
|
6957
|
+
model.error ? /* @__PURE__ */ jsxDEV9("p", {
|
|
6567
6958
|
className: "absolute-voice-profile-comparison__error",
|
|
6568
6959
|
children: model.error
|
|
6569
6960
|
}, undefined, false, undefined, this) : null
|
|
@@ -6646,29 +7037,29 @@ var createVoiceProfileSwitchRecommendationStore = (path = "/api/voice/profile-sw
|
|
|
6646
7037
|
};
|
|
6647
7038
|
|
|
6648
7039
|
// src/client/profileSwitchRecommendationWidget.ts
|
|
6649
|
-
var
|
|
6650
|
-
var
|
|
6651
|
-
var
|
|
7040
|
+
var DEFAULT_TITLE10 = "Profile Switch Recommendation";
|
|
7041
|
+
var DEFAULT_DESCRIPTION10 = "Compares the current session against measured profile evidence and recommends whether to switch stacks.";
|
|
7042
|
+
var escapeHtml15 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
6652
7043
|
var formatRoute = (routes) => routes ? Object.entries(routes).map(([role, provider]) => `${role}: ${provider}`).join(", ") : "No route";
|
|
6653
7044
|
var renderVoiceProfileSwitchRecommendationHTML = (snapshot, options = {}) => {
|
|
6654
7045
|
const recommendation = snapshot.recommendation;
|
|
6655
7046
|
const status = snapshot.error ? "error" : recommendation ? recommendation.status : snapshot.isLoading ? "loading" : "empty";
|
|
6656
7047
|
const label = snapshot.error ? "Unavailable" : recommendation ? recommendation.status === "switch" ? `Switch to ${recommendation.recommendedProfile?.label ?? recommendation.recommendedProfile?.profileId ?? "recommended profile"}` : recommendation.status === "stay" ? "Keep current profile" : "Needs evidence" : snapshot.isLoading ? "Checking" : "No recommendation";
|
|
6657
7048
|
const body = recommendation ? `<div class="absolute-voice-profile-switch__body">
|
|
6658
|
-
<p><strong>Current:</strong> ${
|
|
6659
|
-
<p><strong>Recommended:</strong> ${
|
|
6660
|
-
<p><strong>Routes:</strong> ${
|
|
6661
|
-
<ul>${recommendation.reasons.map((reason) => `<li>${
|
|
6662
|
-
<em>${
|
|
6663
|
-
</div>` : `<p class="absolute-voice-profile-switch__empty">${
|
|
6664
|
-
return `<section class="absolute-voice-profile-switch absolute-voice-profile-switch--${
|
|
7049
|
+
<p><strong>Current:</strong> ${escapeHtml15(recommendation.currentProfile?.label ?? recommendation.currentProfile?.profileId ?? "Unknown")}</p>
|
|
7050
|
+
<p><strong>Recommended:</strong> ${escapeHtml15(recommendation.recommendedProfile?.label ?? recommendation.recommendedProfile?.profileId ?? "None")}</p>
|
|
7051
|
+
<p><strong>Routes:</strong> ${escapeHtml15(formatRoute(recommendation.recommendedProfile?.providerRoutes))}</p>
|
|
7052
|
+
<ul>${recommendation.reasons.map((reason) => `<li>${escapeHtml15(reason)}</li>`).join("")}</ul>
|
|
7053
|
+
<em>${escapeHtml15(recommendation.nextMove)}</em>
|
|
7054
|
+
</div>` : `<p class="absolute-voice-profile-switch__empty">${escapeHtml15(snapshot.error ?? "Run session traffic to populate a recommendation.")}</p>`;
|
|
7055
|
+
return `<section class="absolute-voice-profile-switch absolute-voice-profile-switch--${escapeHtml15(status)}">
|
|
6665
7056
|
<header class="absolute-voice-profile-switch__header">
|
|
6666
|
-
<span class="absolute-voice-profile-switch__eyebrow">${
|
|
6667
|
-
<strong class="absolute-voice-profile-switch__label">${
|
|
7057
|
+
<span class="absolute-voice-profile-switch__eyebrow">${escapeHtml15(options.title ?? DEFAULT_TITLE10)}</span>
|
|
7058
|
+
<strong class="absolute-voice-profile-switch__label">${escapeHtml15(label)}</strong>
|
|
6668
7059
|
</header>
|
|
6669
|
-
<p class="absolute-voice-profile-switch__description">${
|
|
7060
|
+
<p class="absolute-voice-profile-switch__description">${escapeHtml15(options.description ?? DEFAULT_DESCRIPTION10)}</p>
|
|
6670
7061
|
${body}
|
|
6671
|
-
${snapshot.error ? `<p class="absolute-voice-profile-switch__error">${
|
|
7062
|
+
${snapshot.error ? `<p class="absolute-voice-profile-switch__error">${escapeHtml15(snapshot.error)}</p>` : ""}
|
|
6672
7063
|
</section>`;
|
|
6673
7064
|
};
|
|
6674
7065
|
var getVoiceProfileSwitchRecommendationCSS = () => `.absolute-voice-profile-switch{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-profile-switch--switch{border-color:#fdba74}.absolute-voice-profile-switch--stay{border-color:#86efac;background:#f0fdf4}.absolute-voice-profile-switch--warn,.absolute-voice-profile-switch--error{border-color:#fca5a5;background:#fff1f2}.absolute-voice-profile-switch__header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-profile-switch__eyebrow{color:#c2410c;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-profile-switch__label{font-size:24px;line-height:1}.absolute-voice-profile-switch__description,.absolute-voice-profile-switch__body em,.absolute-voice-profile-switch__empty{color:#57534e}.absolute-voice-profile-switch__body{background:#fff;border:1px solid #fed7aa;border-radius:16px;margin-top:14px;padding:14px}.absolute-voice-profile-switch__body p{margin:.35rem 0}.absolute-voice-profile-switch__body ul{margin:.75rem 0;padding-left:1.2rem}.absolute-voice-profile-switch__body em{display:block}.absolute-voice-profile-switch__error{color:#9f1239;font-weight:700}`;
|
|
@@ -6710,25 +7101,25 @@ var defineVoiceProfileSwitchRecommendationElement = (tagName = "absolute-voice-p
|
|
|
6710
7101
|
};
|
|
6711
7102
|
|
|
6712
7103
|
// src/react/useVoiceProfileSwitchRecommendation.tsx
|
|
6713
|
-
import { useEffect as
|
|
7104
|
+
import { useEffect as useEffect10, useRef as useRef10, useSyncExternalStore as useSyncExternalStore10 } from "react";
|
|
6714
7105
|
var useVoiceProfileSwitchRecommendation = (path = "/api/voice/profile-switch-recommendation", options = {}) => {
|
|
6715
|
-
const storeRef =
|
|
7106
|
+
const storeRef = useRef10(null);
|
|
6716
7107
|
if (!storeRef.current) {
|
|
6717
7108
|
storeRef.current = createVoiceProfileSwitchRecommendationStore(path, options);
|
|
6718
7109
|
}
|
|
6719
7110
|
const store = storeRef.current;
|
|
6720
|
-
|
|
7111
|
+
useEffect10(() => {
|
|
6721
7112
|
store.refresh().catch(() => {});
|
|
6722
7113
|
return () => store.close();
|
|
6723
7114
|
}, [store]);
|
|
6724
7115
|
return {
|
|
6725
|
-
...
|
|
7116
|
+
...useSyncExternalStore10(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
6726
7117
|
refresh: store.refresh
|
|
6727
7118
|
};
|
|
6728
7119
|
};
|
|
6729
7120
|
|
|
6730
7121
|
// src/react/VoiceProfileSwitchRecommendation.tsx
|
|
6731
|
-
import { jsxDEV as
|
|
7122
|
+
import { jsxDEV as jsxDEV10 } from "react/jsx-dev-runtime";
|
|
6732
7123
|
var VoiceProfileSwitchRecommendation = ({
|
|
6733
7124
|
className,
|
|
6734
7125
|
path = "/api/voice/profile-switch-recommendation",
|
|
@@ -6736,7 +7127,7 @@ var VoiceProfileSwitchRecommendation = ({
|
|
|
6736
7127
|
}) => {
|
|
6737
7128
|
const snapshot = useVoiceProfileSwitchRecommendation(path, options);
|
|
6738
7129
|
const html = renderVoiceProfileSwitchRecommendationHTML(snapshot, options);
|
|
6739
|
-
return /* @__PURE__ */
|
|
7130
|
+
return /* @__PURE__ */ jsxDEV10("div", {
|
|
6740
7131
|
className,
|
|
6741
7132
|
dangerouslySetInnerHTML: { __html: html }
|
|
6742
7133
|
}, undefined, false, undefined, this);
|
|
@@ -6817,13 +7208,13 @@ var createVoiceReadinessFailuresStore = (path = "/api/production-readiness", opt
|
|
|
6817
7208
|
};
|
|
6818
7209
|
|
|
6819
7210
|
// src/client/readinessFailuresWidget.ts
|
|
6820
|
-
var
|
|
6821
|
-
var
|
|
6822
|
-
var
|
|
7211
|
+
var DEFAULT_TITLE11 = "Readiness Gate Explanations";
|
|
7212
|
+
var DEFAULT_DESCRIPTION11 = "Structured reasons for calibrated production-readiness warnings and failures.";
|
|
7213
|
+
var DEFAULT_LINKS5 = [
|
|
6823
7214
|
{ href: "/production-readiness", label: "Readiness page" },
|
|
6824
7215
|
{ href: "/voice/slo-readiness-thresholds", label: "Gate thresholds" }
|
|
6825
7216
|
];
|
|
6826
|
-
var
|
|
7217
|
+
var escapeHtml16 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
6827
7218
|
var formatExplanationValue = (value, unit) => {
|
|
6828
7219
|
if (value === undefined || value === null) {
|
|
6829
7220
|
return "n/a";
|
|
@@ -6851,36 +7242,36 @@ var createVoiceReadinessFailuresViewModel = (snapshot, options = {}) => {
|
|
|
6851
7242
|
const failures = snapshot.report?.checks.map(toFailureView).filter((value) => !!value) ?? [];
|
|
6852
7243
|
const hasOpenIssues = failures.length > 0;
|
|
6853
7244
|
return {
|
|
6854
|
-
description: options.description ??
|
|
7245
|
+
description: options.description ?? DEFAULT_DESCRIPTION11,
|
|
6855
7246
|
error: snapshot.error,
|
|
6856
7247
|
failures,
|
|
6857
7248
|
isLoading: snapshot.isLoading,
|
|
6858
7249
|
label: snapshot.error ? "Unavailable" : snapshot.report ? hasOpenIssues ? `${failures.length} calibrated gate issue(s)` : "No calibrated gate issues" : snapshot.isLoading ? "Checking" : "No readiness report",
|
|
6859
|
-
links: options.links ??
|
|
7250
|
+
links: options.links ?? DEFAULT_LINKS5,
|
|
6860
7251
|
status: snapshot.error ? "error" : snapshot.report ? hasOpenIssues ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
6861
|
-
title: options.title ??
|
|
7252
|
+
title: options.title ?? DEFAULT_TITLE11,
|
|
6862
7253
|
updatedAt: snapshot.updatedAt
|
|
6863
7254
|
};
|
|
6864
7255
|
};
|
|
6865
7256
|
var renderVoiceReadinessFailuresHTML = (snapshot, options = {}) => {
|
|
6866
7257
|
const model = createVoiceReadinessFailuresViewModel(snapshot, options);
|
|
6867
|
-
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--${
|
|
6868
|
-
<span>${
|
|
6869
|
-
<strong>${
|
|
6870
|
-
<p>Observed ${
|
|
6871
|
-
<p>${
|
|
6872
|
-
<p class="absolute-voice-readiness-failures__links">${failure.evidenceHref ? `<a href="${
|
|
6873
|
-
</article>`).join("")}</div>` : `<p class="absolute-voice-readiness-failures__empty">${model.error ?
|
|
6874
|
-
const links = model.links.length ? `<p class="absolute-voice-readiness-failures__links">${model.links.map((link) => `<a href="${
|
|
6875
|
-
return `<section class="absolute-voice-readiness-failures absolute-voice-readiness-failures--${
|
|
7258
|
+
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--${escapeHtml16(failure.status)}">
|
|
7259
|
+
<span>${escapeHtml16(failure.status.toUpperCase())}</span>
|
|
7260
|
+
<strong>${escapeHtml16(failure.label)}</strong>
|
|
7261
|
+
<p>Observed ${escapeHtml16(failure.observed)} against ${escapeHtml16(failure.thresholdLabel)} ${escapeHtml16(failure.threshold)}.</p>
|
|
7262
|
+
<p>${escapeHtml16(failure.remediation)}</p>
|
|
7263
|
+
<p class="absolute-voice-readiness-failures__links">${failure.evidenceHref ? `<a href="${escapeHtml16(failure.evidenceHref)}">Evidence</a>` : ""}${failure.sourceHref ? `<a href="${escapeHtml16(failure.sourceHref)}">Threshold source</a>` : ""}</p>
|
|
7264
|
+
</article>`).join("")}</div>` : `<p class="absolute-voice-readiness-failures__empty">${model.error ? escapeHtml16(model.error) : "No calibrated readiness gate explanations are open."}</p>`;
|
|
7265
|
+
const links = model.links.length ? `<p class="absolute-voice-readiness-failures__links">${model.links.map((link) => `<a href="${escapeHtml16(link.href)}">${escapeHtml16(link.label)}</a>`).join("")}</p>` : "";
|
|
7266
|
+
return `<section class="absolute-voice-readiness-failures absolute-voice-readiness-failures--${escapeHtml16(model.status)}">
|
|
6876
7267
|
<header class="absolute-voice-readiness-failures__header">
|
|
6877
|
-
<span class="absolute-voice-readiness-failures__eyebrow">${
|
|
6878
|
-
<strong class="absolute-voice-readiness-failures__label">${
|
|
7268
|
+
<span class="absolute-voice-readiness-failures__eyebrow">${escapeHtml16(model.title)}</span>
|
|
7269
|
+
<strong class="absolute-voice-readiness-failures__label">${escapeHtml16(model.label)}</strong>
|
|
6879
7270
|
</header>
|
|
6880
|
-
<p class="absolute-voice-readiness-failures__description">${
|
|
7271
|
+
<p class="absolute-voice-readiness-failures__description">${escapeHtml16(model.description)}</p>
|
|
6881
7272
|
${failures}
|
|
6882
7273
|
${links}
|
|
6883
|
-
${model.error ? `<p class="absolute-voice-readiness-failures__error">${
|
|
7274
|
+
${model.error ? `<p class="absolute-voice-readiness-failures__error">${escapeHtml16(model.error)}</p>` : ""}
|
|
6884
7275
|
</section>`;
|
|
6885
7276
|
};
|
|
6886
7277
|
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}`;
|
|
@@ -6921,25 +7312,25 @@ var defineVoiceReadinessFailuresElement = (tagName = "absolute-voice-readiness-f
|
|
|
6921
7312
|
};
|
|
6922
7313
|
|
|
6923
7314
|
// src/react/useVoiceReadinessFailures.tsx
|
|
6924
|
-
import { useEffect as
|
|
7315
|
+
import { useEffect as useEffect11, useRef as useRef11, useSyncExternalStore as useSyncExternalStore11 } from "react";
|
|
6925
7316
|
var useVoiceReadinessFailures = (path = "/api/production-readiness", options = {}) => {
|
|
6926
|
-
const storeRef =
|
|
7317
|
+
const storeRef = useRef11(null);
|
|
6927
7318
|
if (!storeRef.current) {
|
|
6928
7319
|
storeRef.current = createVoiceReadinessFailuresStore(path, options);
|
|
6929
7320
|
}
|
|
6930
7321
|
const store = storeRef.current;
|
|
6931
|
-
|
|
7322
|
+
useEffect11(() => {
|
|
6932
7323
|
store.refresh().catch(() => {});
|
|
6933
7324
|
return () => store.close();
|
|
6934
7325
|
}, [store]);
|
|
6935
7326
|
return {
|
|
6936
|
-
...
|
|
7327
|
+
...useSyncExternalStore11(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
6937
7328
|
refresh: store.refresh
|
|
6938
7329
|
};
|
|
6939
7330
|
};
|
|
6940
7331
|
|
|
6941
7332
|
// src/react/VoiceReadinessFailures.tsx
|
|
6942
|
-
import { jsxDEV as
|
|
7333
|
+
import { jsxDEV as jsxDEV11 } from "react/jsx-dev-runtime";
|
|
6943
7334
|
var VoiceReadinessFailures = ({
|
|
6944
7335
|
className,
|
|
6945
7336
|
path = "/api/production-readiness",
|
|
@@ -6947,42 +7338,42 @@ var VoiceReadinessFailures = ({
|
|
|
6947
7338
|
}) => {
|
|
6948
7339
|
const snapshot = useVoiceReadinessFailures(path, options);
|
|
6949
7340
|
const model = createVoiceReadinessFailuresViewModel(snapshot, options);
|
|
6950
|
-
return /* @__PURE__ */
|
|
7341
|
+
return /* @__PURE__ */ jsxDEV11("section", {
|
|
6951
7342
|
className: [
|
|
6952
7343
|
"absolute-voice-readiness-failures",
|
|
6953
7344
|
`absolute-voice-readiness-failures--${model.status}`,
|
|
6954
7345
|
className
|
|
6955
7346
|
].filter(Boolean).join(" "),
|
|
6956
7347
|
children: [
|
|
6957
|
-
/* @__PURE__ */
|
|
7348
|
+
/* @__PURE__ */ jsxDEV11("header", {
|
|
6958
7349
|
className: "absolute-voice-readiness-failures__header",
|
|
6959
7350
|
children: [
|
|
6960
|
-
/* @__PURE__ */
|
|
7351
|
+
/* @__PURE__ */ jsxDEV11("span", {
|
|
6961
7352
|
className: "absolute-voice-readiness-failures__eyebrow",
|
|
6962
7353
|
children: model.title
|
|
6963
7354
|
}, undefined, false, undefined, this),
|
|
6964
|
-
/* @__PURE__ */
|
|
7355
|
+
/* @__PURE__ */ jsxDEV11("strong", {
|
|
6965
7356
|
className: "absolute-voice-readiness-failures__label",
|
|
6966
7357
|
children: model.label
|
|
6967
7358
|
}, undefined, false, undefined, this)
|
|
6968
7359
|
]
|
|
6969
7360
|
}, undefined, true, undefined, this),
|
|
6970
|
-
/* @__PURE__ */
|
|
7361
|
+
/* @__PURE__ */ jsxDEV11("p", {
|
|
6971
7362
|
className: "absolute-voice-readiness-failures__description",
|
|
6972
7363
|
children: model.description
|
|
6973
7364
|
}, undefined, false, undefined, this),
|
|
6974
|
-
model.failures.length ? /* @__PURE__ */
|
|
7365
|
+
model.failures.length ? /* @__PURE__ */ jsxDEV11("div", {
|
|
6975
7366
|
className: "absolute-voice-readiness-failures__items",
|
|
6976
|
-
children: model.failures.map((failure) => /* @__PURE__ */
|
|
7367
|
+
children: model.failures.map((failure) => /* @__PURE__ */ jsxDEV11("article", {
|
|
6977
7368
|
className: `absolute-voice-readiness-failures__item absolute-voice-readiness-failures__item--${failure.status}`,
|
|
6978
7369
|
children: [
|
|
6979
|
-
/* @__PURE__ */
|
|
7370
|
+
/* @__PURE__ */ jsxDEV11("span", {
|
|
6980
7371
|
children: failure.status.toUpperCase()
|
|
6981
7372
|
}, undefined, false, undefined, this),
|
|
6982
|
-
/* @__PURE__ */
|
|
7373
|
+
/* @__PURE__ */ jsxDEV11("strong", {
|
|
6983
7374
|
children: failure.label
|
|
6984
7375
|
}, undefined, false, undefined, this),
|
|
6985
|
-
/* @__PURE__ */
|
|
7376
|
+
/* @__PURE__ */ jsxDEV11("p", {
|
|
6986
7377
|
children: [
|
|
6987
7378
|
"Observed ",
|
|
6988
7379
|
failure.observed,
|
|
@@ -6993,17 +7384,17 @@ var VoiceReadinessFailures = ({
|
|
|
6993
7384
|
"."
|
|
6994
7385
|
]
|
|
6995
7386
|
}, undefined, true, undefined, this),
|
|
6996
|
-
/* @__PURE__ */
|
|
7387
|
+
/* @__PURE__ */ jsxDEV11("p", {
|
|
6997
7388
|
children: failure.remediation
|
|
6998
7389
|
}, undefined, false, undefined, this),
|
|
6999
|
-
/* @__PURE__ */
|
|
7390
|
+
/* @__PURE__ */ jsxDEV11("p", {
|
|
7000
7391
|
className: "absolute-voice-readiness-failures__links",
|
|
7001
7392
|
children: [
|
|
7002
|
-
failure.evidenceHref ? /* @__PURE__ */
|
|
7393
|
+
failure.evidenceHref ? /* @__PURE__ */ jsxDEV11("a", {
|
|
7003
7394
|
href: failure.evidenceHref,
|
|
7004
7395
|
children: "Evidence"
|
|
7005
7396
|
}, undefined, false, undefined, this) : null,
|
|
7006
|
-
failure.sourceHref ? /* @__PURE__ */
|
|
7397
|
+
failure.sourceHref ? /* @__PURE__ */ jsxDEV11("a", {
|
|
7007
7398
|
href: failure.sourceHref,
|
|
7008
7399
|
children: "Threshold source"
|
|
7009
7400
|
}, undefined, false, undefined, this) : null
|
|
@@ -7011,18 +7402,18 @@ var VoiceReadinessFailures = ({
|
|
|
7011
7402
|
}, undefined, true, undefined, this)
|
|
7012
7403
|
]
|
|
7013
7404
|
}, failure.label, true, undefined, this))
|
|
7014
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
7405
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV11("p", {
|
|
7015
7406
|
className: "absolute-voice-readiness-failures__empty",
|
|
7016
7407
|
children: model.error ?? "No calibrated readiness gate explanations are open."
|
|
7017
7408
|
}, undefined, false, undefined, this),
|
|
7018
|
-
model.links.length ? /* @__PURE__ */
|
|
7409
|
+
model.links.length ? /* @__PURE__ */ jsxDEV11("p", {
|
|
7019
7410
|
className: "absolute-voice-readiness-failures__links",
|
|
7020
|
-
children: model.links.map((link) => /* @__PURE__ */
|
|
7411
|
+
children: model.links.map((link) => /* @__PURE__ */ jsxDEV11("a", {
|
|
7021
7412
|
href: link.href,
|
|
7022
7413
|
children: link.label
|
|
7023
7414
|
}, link.href, false, undefined, this))
|
|
7024
7415
|
}, undefined, false, undefined, this) : null,
|
|
7025
|
-
model.error ? /* @__PURE__ */
|
|
7416
|
+
model.error ? /* @__PURE__ */ jsxDEV11("p", {
|
|
7026
7417
|
className: "absolute-voice-readiness-failures__error",
|
|
7027
7418
|
children: model.error
|
|
7028
7419
|
}, undefined, false, undefined, this) : null
|
|
@@ -7109,7 +7500,7 @@ var createVoiceProviderSimulationControlsStore = (options) => {
|
|
|
7109
7500
|
};
|
|
7110
7501
|
|
|
7111
7502
|
// src/client/providerSimulationControlsWidget.ts
|
|
7112
|
-
var
|
|
7503
|
+
var escapeHtml17 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
7113
7504
|
var formatKind = (kind) => (kind ?? "stt").toUpperCase();
|
|
7114
7505
|
var createVoiceProviderSimulationControlsViewModel = (snapshot, options) => {
|
|
7115
7506
|
const configuredProviders = options.providers.filter((provider) => provider.configured !== false);
|
|
@@ -7129,18 +7520,18 @@ var createVoiceProviderSimulationControlsViewModel = (snapshot, options) => {
|
|
|
7129
7520
|
};
|
|
7130
7521
|
var renderVoiceProviderSimulationControlsHTML = (snapshot, options) => {
|
|
7131
7522
|
const model = createVoiceProviderSimulationControlsViewModel(snapshot, options);
|
|
7132
|
-
const failureButtons = model.failureProviders.map((provider) => `<button type="button" data-voice-provider-fail="${
|
|
7133
|
-
const recoveryButtons = model.providers.map((provider) => `<button type="button" data-voice-provider-recover="${
|
|
7523
|
+
const failureButtons = model.failureProviders.map((provider) => `<button type="button" data-voice-provider-fail="${escapeHtml17(provider.provider)}"${!model.canSimulateFailure || snapshot.isRunning ? " disabled" : ""}>Simulate ${escapeHtml17(provider.provider)} ${escapeHtml17(formatKind(options.kind))} failure</button>`).join("");
|
|
7524
|
+
const recoveryButtons = model.providers.map((provider) => `<button type="button" data-voice-provider-recover="${escapeHtml17(provider.provider)}"${snapshot.isRunning ? " disabled" : ""}>Mark ${escapeHtml17(provider.provider)} recovered</button>`).join("");
|
|
7134
7525
|
return `<section class="absolute-voice-provider-simulation absolute-voice-provider-simulation--${snapshot.error ? "error" : snapshot.isRunning ? "running" : "ready"}">
|
|
7135
7526
|
<header class="absolute-voice-provider-simulation__header">
|
|
7136
|
-
<span class="absolute-voice-provider-simulation__eyebrow">${
|
|
7137
|
-
<strong class="absolute-voice-provider-simulation__label">${
|
|
7527
|
+
<span class="absolute-voice-provider-simulation__eyebrow">${escapeHtml17(model.title)}</span>
|
|
7528
|
+
<strong class="absolute-voice-provider-simulation__label">${escapeHtml17(model.label)}</strong>
|
|
7138
7529
|
</header>
|
|
7139
|
-
<p class="absolute-voice-provider-simulation__description">${
|
|
7140
|
-
${model.canSimulateFailure ? "" : `<p class="absolute-voice-provider-simulation__empty">${
|
|
7530
|
+
<p class="absolute-voice-provider-simulation__description">${escapeHtml17(model.description)}</p>
|
|
7531
|
+
${model.canSimulateFailure ? "" : `<p class="absolute-voice-provider-simulation__empty">${escapeHtml17(options.fallbackRequiredMessage ?? "Configure fallback providers before simulating failure.")}</p>`}
|
|
7141
7532
|
<div class="absolute-voice-provider-simulation__actions">${failureButtons}${recoveryButtons}</div>
|
|
7142
|
-
${snapshot.error ? `<p class="absolute-voice-provider-simulation__error">${
|
|
7143
|
-
${model.resultText ? `<pre class="absolute-voice-provider-simulation__result">${
|
|
7533
|
+
${snapshot.error ? `<p class="absolute-voice-provider-simulation__error">${escapeHtml17(snapshot.error)}</p>` : ""}
|
|
7534
|
+
${model.resultText ? `<pre class="absolute-voice-provider-simulation__result">${escapeHtml17(model.resultText)}</pre>` : ""}
|
|
7144
7535
|
</section>`;
|
|
7145
7536
|
};
|
|
7146
7537
|
var bindVoiceProviderSimulationControls = (element, store) => {
|
|
@@ -7206,22 +7597,22 @@ var defineVoiceProviderSimulationControlsElement = (tagName = "absolute-voice-pr
|
|
|
7206
7597
|
};
|
|
7207
7598
|
|
|
7208
7599
|
// src/react/useVoiceProviderSimulationControls.tsx
|
|
7209
|
-
import { useEffect as
|
|
7600
|
+
import { useEffect as useEffect12, useRef as useRef12, useSyncExternalStore as useSyncExternalStore12 } from "react";
|
|
7210
7601
|
var useVoiceProviderSimulationControls = (options) => {
|
|
7211
|
-
const storeRef =
|
|
7602
|
+
const storeRef = useRef12(null);
|
|
7212
7603
|
if (!storeRef.current) {
|
|
7213
7604
|
storeRef.current = createVoiceProviderSimulationControlsStore(options);
|
|
7214
7605
|
}
|
|
7215
7606
|
const store = storeRef.current;
|
|
7216
|
-
|
|
7607
|
+
useEffect12(() => () => store.close(), [store]);
|
|
7217
7608
|
return {
|
|
7218
|
-
...
|
|
7609
|
+
...useSyncExternalStore12(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
7219
7610
|
run: store.run
|
|
7220
7611
|
};
|
|
7221
7612
|
};
|
|
7222
7613
|
|
|
7223
7614
|
// src/react/VoiceProviderSimulationControls.tsx
|
|
7224
|
-
import { jsxDEV as
|
|
7615
|
+
import { jsxDEV as jsxDEV12 } from "react/jsx-dev-runtime";
|
|
7225
7616
|
var VoiceProviderSimulationControls = ({
|
|
7226
7617
|
className,
|
|
7227
7618
|
...options
|
|
@@ -7231,38 +7622,38 @@ var VoiceProviderSimulationControls = ({
|
|
|
7231
7622
|
const run = (provider, mode) => {
|
|
7232
7623
|
snapshot.run(provider, mode).catch(() => {});
|
|
7233
7624
|
};
|
|
7234
|
-
return /* @__PURE__ */
|
|
7625
|
+
return /* @__PURE__ */ jsxDEV12("section", {
|
|
7235
7626
|
className: [
|
|
7236
7627
|
"absolute-voice-provider-simulation",
|
|
7237
7628
|
`absolute-voice-provider-simulation--${snapshot.error ? "error" : snapshot.isRunning ? "running" : "ready"}`,
|
|
7238
7629
|
className
|
|
7239
7630
|
].filter(Boolean).join(" "),
|
|
7240
7631
|
children: [
|
|
7241
|
-
/* @__PURE__ */
|
|
7632
|
+
/* @__PURE__ */ jsxDEV12("header", {
|
|
7242
7633
|
className: "absolute-voice-provider-simulation__header",
|
|
7243
7634
|
children: [
|
|
7244
|
-
/* @__PURE__ */
|
|
7635
|
+
/* @__PURE__ */ jsxDEV12("span", {
|
|
7245
7636
|
className: "absolute-voice-provider-simulation__eyebrow",
|
|
7246
7637
|
children: model.title
|
|
7247
7638
|
}, undefined, false, undefined, this),
|
|
7248
|
-
/* @__PURE__ */
|
|
7639
|
+
/* @__PURE__ */ jsxDEV12("strong", {
|
|
7249
7640
|
className: "absolute-voice-provider-simulation__label",
|
|
7250
7641
|
children: model.label
|
|
7251
7642
|
}, undefined, false, undefined, this)
|
|
7252
7643
|
]
|
|
7253
7644
|
}, undefined, true, undefined, this),
|
|
7254
|
-
/* @__PURE__ */
|
|
7645
|
+
/* @__PURE__ */ jsxDEV12("p", {
|
|
7255
7646
|
className: "absolute-voice-provider-simulation__description",
|
|
7256
7647
|
children: model.description
|
|
7257
7648
|
}, undefined, false, undefined, this),
|
|
7258
|
-
model.canSimulateFailure ? null : /* @__PURE__ */
|
|
7649
|
+
model.canSimulateFailure ? null : /* @__PURE__ */ jsxDEV12("p", {
|
|
7259
7650
|
className: "absolute-voice-provider-simulation__empty",
|
|
7260
7651
|
children: options.fallbackRequiredMessage ?? "Configure fallback providers before simulating failure."
|
|
7261
7652
|
}, undefined, false, undefined, this),
|
|
7262
|
-
/* @__PURE__ */
|
|
7653
|
+
/* @__PURE__ */ jsxDEV12("div", {
|
|
7263
7654
|
className: "absolute-voice-provider-simulation__actions",
|
|
7264
7655
|
children: [
|
|
7265
|
-
model.failureProviders.map((provider) => /* @__PURE__ */
|
|
7656
|
+
model.failureProviders.map((provider) => /* @__PURE__ */ jsxDEV12("button", {
|
|
7266
7657
|
disabled: !model.canSimulateFailure || snapshot.isRunning,
|
|
7267
7658
|
onClick: () => run(provider.provider, "failure"),
|
|
7268
7659
|
type: "button",
|
|
@@ -7275,7 +7666,7 @@ var VoiceProviderSimulationControls = ({
|
|
|
7275
7666
|
"failure"
|
|
7276
7667
|
]
|
|
7277
7668
|
}, `fail-${provider.provider}`, true, undefined, this)),
|
|
7278
|
-
model.providers.map((provider) => /* @__PURE__ */
|
|
7669
|
+
model.providers.map((provider) => /* @__PURE__ */ jsxDEV12("button", {
|
|
7279
7670
|
disabled: snapshot.isRunning,
|
|
7280
7671
|
onClick: () => run(provider.provider, "recovery"),
|
|
7281
7672
|
type: "button",
|
|
@@ -7287,11 +7678,11 @@ var VoiceProviderSimulationControls = ({
|
|
|
7287
7678
|
}, `recover-${provider.provider}`, true, undefined, this))
|
|
7288
7679
|
]
|
|
7289
7680
|
}, undefined, true, undefined, this),
|
|
7290
|
-
snapshot.error ? /* @__PURE__ */
|
|
7681
|
+
snapshot.error ? /* @__PURE__ */ jsxDEV12("p", {
|
|
7291
7682
|
className: "absolute-voice-provider-simulation__error",
|
|
7292
7683
|
children: snapshot.error
|
|
7293
7684
|
}, undefined, false, undefined, this) : null,
|
|
7294
|
-
model.resultText ? /* @__PURE__ */
|
|
7685
|
+
model.resultText ? /* @__PURE__ */ jsxDEV12("pre", {
|
|
7295
7686
|
className: "absolute-voice-provider-simulation__result",
|
|
7296
7687
|
children: model.resultText
|
|
7297
7688
|
}, undefined, false, undefined, this) : null
|
|
@@ -7299,7 +7690,7 @@ var VoiceProviderSimulationControls = ({
|
|
|
7299
7690
|
}, undefined, true, undefined, this);
|
|
7300
7691
|
};
|
|
7301
7692
|
// src/react/useVoiceProviderCapabilities.tsx
|
|
7302
|
-
import { useEffect as
|
|
7693
|
+
import { useEffect as useEffect13, useRef as useRef13, useSyncExternalStore as useSyncExternalStore13 } from "react";
|
|
7303
7694
|
|
|
7304
7695
|
// src/client/providerCapabilities.ts
|
|
7305
7696
|
var fetchVoiceProviderCapabilities = async (path = "/api/provider-capabilities", options = {}) => {
|
|
@@ -7382,25 +7773,25 @@ var createVoiceProviderCapabilitiesStore = (path = "/api/provider-capabilities",
|
|
|
7382
7773
|
|
|
7383
7774
|
// src/react/useVoiceProviderCapabilities.tsx
|
|
7384
7775
|
var useVoiceProviderCapabilities = (path = "/api/provider-capabilities", options = {}) => {
|
|
7385
|
-
const storeRef =
|
|
7776
|
+
const storeRef = useRef13(null);
|
|
7386
7777
|
if (!storeRef.current) {
|
|
7387
7778
|
storeRef.current = createVoiceProviderCapabilitiesStore(path, options);
|
|
7388
7779
|
}
|
|
7389
7780
|
const store = storeRef.current;
|
|
7390
|
-
|
|
7781
|
+
useEffect13(() => {
|
|
7391
7782
|
store.refresh().catch(() => {});
|
|
7392
7783
|
return () => store.close();
|
|
7393
7784
|
}, [store]);
|
|
7394
7785
|
return {
|
|
7395
|
-
...
|
|
7786
|
+
...useSyncExternalStore13(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
7396
7787
|
refresh: store.refresh
|
|
7397
7788
|
};
|
|
7398
7789
|
};
|
|
7399
7790
|
|
|
7400
7791
|
// src/client/providerCapabilitiesWidget.ts
|
|
7401
|
-
var
|
|
7402
|
-
var
|
|
7403
|
-
var
|
|
7792
|
+
var DEFAULT_TITLE12 = "Provider Capabilities";
|
|
7793
|
+
var DEFAULT_DESCRIPTION12 = "Configured, selected, and healthy voice providers for this deployment.";
|
|
7794
|
+
var escapeHtml18 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
7404
7795
|
var formatProvider = (provider) => provider.split(/[-_\s]+/).filter(Boolean).map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ") || provider;
|
|
7405
7796
|
var formatKind2 = (kind) => kind.toUpperCase();
|
|
7406
7797
|
var formatStatus3 = (status) => status.split("-").map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ");
|
|
@@ -7444,36 +7835,36 @@ var createVoiceProviderCapabilitiesViewModel = (snapshot, options = {}) => {
|
|
|
7444
7835
|
const selectedCount = snapshot.report?.selected ?? capabilities.filter((capability) => capability.selected).length;
|
|
7445
7836
|
return {
|
|
7446
7837
|
capabilities,
|
|
7447
|
-
description: options.description ??
|
|
7838
|
+
description: options.description ?? DEFAULT_DESCRIPTION12,
|
|
7448
7839
|
error: snapshot.error,
|
|
7449
7840
|
isLoading: snapshot.isLoading,
|
|
7450
7841
|
label: snapshot.error ? "Unavailable" : capabilities.length ? warningCount > 0 ? `${warningCount} needs attention` : `${selectedCount} selected` : snapshot.isLoading ? "Checking" : "No capabilities",
|
|
7451
7842
|
status: snapshot.error ? "error" : capabilities.length ? warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
7452
|
-
title: options.title ??
|
|
7843
|
+
title: options.title ?? DEFAULT_TITLE12,
|
|
7453
7844
|
updatedAt: snapshot.updatedAt
|
|
7454
7845
|
};
|
|
7455
7846
|
};
|
|
7456
7847
|
var renderVoiceProviderCapabilitiesHTML = (snapshot, options = {}) => {
|
|
7457
7848
|
const model = createVoiceProviderCapabilitiesViewModel(snapshot, options);
|
|
7458
|
-
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--${
|
|
7849
|
+
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--${escapeHtml18(capability.status)}">
|
|
7459
7850
|
<header>
|
|
7460
|
-
<strong>${
|
|
7461
|
-
<span>${
|
|
7851
|
+
<strong>${escapeHtml18(capability.label)}</strong>
|
|
7852
|
+
<span>${escapeHtml18(formatStatus3(capability.status))}</span>
|
|
7462
7853
|
</header>
|
|
7463
|
-
<p>${
|
|
7854
|
+
<p>${escapeHtml18(capability.detail)}</p>
|
|
7464
7855
|
<dl>${capability.rows.map((row) => `<div>
|
|
7465
|
-
<dt>${
|
|
7466
|
-
<dd>${
|
|
7856
|
+
<dt>${escapeHtml18(row.label)}</dt>
|
|
7857
|
+
<dd>${escapeHtml18(row.value)}</dd>
|
|
7467
7858
|
</div>`).join("")}</dl>
|
|
7468
7859
|
</article>`).join("")}</div>` : '<p class="absolute-voice-provider-capabilities__empty">Configure provider capabilities to see deployment coverage.</p>';
|
|
7469
|
-
return `<section class="absolute-voice-provider-capabilities absolute-voice-provider-capabilities--${
|
|
7860
|
+
return `<section class="absolute-voice-provider-capabilities absolute-voice-provider-capabilities--${escapeHtml18(model.status)}">
|
|
7470
7861
|
<header class="absolute-voice-provider-capabilities__header">
|
|
7471
|
-
<span class="absolute-voice-provider-capabilities__eyebrow">${
|
|
7472
|
-
<strong class="absolute-voice-provider-capabilities__label">${
|
|
7862
|
+
<span class="absolute-voice-provider-capabilities__eyebrow">${escapeHtml18(model.title)}</span>
|
|
7863
|
+
<strong class="absolute-voice-provider-capabilities__label">${escapeHtml18(model.label)}</strong>
|
|
7473
7864
|
</header>
|
|
7474
|
-
<p class="absolute-voice-provider-capabilities__description">${
|
|
7865
|
+
<p class="absolute-voice-provider-capabilities__description">${escapeHtml18(model.description)}</p>
|
|
7475
7866
|
${capabilities}
|
|
7476
|
-
${model.error ? `<p class="absolute-voice-provider-capabilities__error">${
|
|
7867
|
+
${model.error ? `<p class="absolute-voice-provider-capabilities__error">${escapeHtml18(model.error)}</p>` : ""}
|
|
7477
7868
|
</section>`;
|
|
7478
7869
|
};
|
|
7479
7870
|
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}`;
|
|
@@ -7515,7 +7906,7 @@ var defineVoiceProviderCapabilitiesElement = (tagName = "absolute-voice-provider
|
|
|
7515
7906
|
};
|
|
7516
7907
|
|
|
7517
7908
|
// src/react/VoiceProviderCapabilities.tsx
|
|
7518
|
-
import { jsxDEV as
|
|
7909
|
+
import { jsxDEV as jsxDEV13 } from "react/jsx-dev-runtime";
|
|
7519
7910
|
var VoiceProviderCapabilities = ({
|
|
7520
7911
|
className,
|
|
7521
7912
|
path = "/api/provider-capabilities",
|
|
@@ -7523,58 +7914,58 @@ var VoiceProviderCapabilities = ({
|
|
|
7523
7914
|
}) => {
|
|
7524
7915
|
const snapshot = useVoiceProviderCapabilities(path, options);
|
|
7525
7916
|
const model = createVoiceProviderCapabilitiesViewModel(snapshot, options);
|
|
7526
|
-
return /* @__PURE__ */
|
|
7917
|
+
return /* @__PURE__ */ jsxDEV13("section", {
|
|
7527
7918
|
className: [
|
|
7528
7919
|
"absolute-voice-provider-capabilities",
|
|
7529
7920
|
`absolute-voice-provider-capabilities--${model.status}`,
|
|
7530
7921
|
className
|
|
7531
7922
|
].filter(Boolean).join(" "),
|
|
7532
7923
|
children: [
|
|
7533
|
-
/* @__PURE__ */
|
|
7924
|
+
/* @__PURE__ */ jsxDEV13("header", {
|
|
7534
7925
|
className: "absolute-voice-provider-capabilities__header",
|
|
7535
7926
|
children: [
|
|
7536
|
-
/* @__PURE__ */
|
|
7927
|
+
/* @__PURE__ */ jsxDEV13("span", {
|
|
7537
7928
|
className: "absolute-voice-provider-capabilities__eyebrow",
|
|
7538
7929
|
children: model.title
|
|
7539
7930
|
}, undefined, false, undefined, this),
|
|
7540
|
-
/* @__PURE__ */
|
|
7931
|
+
/* @__PURE__ */ jsxDEV13("strong", {
|
|
7541
7932
|
className: "absolute-voice-provider-capabilities__label",
|
|
7542
7933
|
children: model.label
|
|
7543
7934
|
}, undefined, false, undefined, this)
|
|
7544
7935
|
]
|
|
7545
7936
|
}, undefined, true, undefined, this),
|
|
7546
|
-
/* @__PURE__ */
|
|
7937
|
+
/* @__PURE__ */ jsxDEV13("p", {
|
|
7547
7938
|
className: "absolute-voice-provider-capabilities__description",
|
|
7548
7939
|
children: model.description
|
|
7549
7940
|
}, undefined, false, undefined, this),
|
|
7550
|
-
model.capabilities.length ? /* @__PURE__ */
|
|
7941
|
+
model.capabilities.length ? /* @__PURE__ */ jsxDEV13("div", {
|
|
7551
7942
|
className: "absolute-voice-provider-capabilities__providers",
|
|
7552
|
-
children: model.capabilities.map((capability) => /* @__PURE__ */
|
|
7943
|
+
children: model.capabilities.map((capability) => /* @__PURE__ */ jsxDEV13("article", {
|
|
7553
7944
|
className: [
|
|
7554
7945
|
"absolute-voice-provider-capabilities__provider",
|
|
7555
7946
|
`absolute-voice-provider-capabilities__provider--${capability.status}`
|
|
7556
7947
|
].join(" "),
|
|
7557
7948
|
children: [
|
|
7558
|
-
/* @__PURE__ */
|
|
7949
|
+
/* @__PURE__ */ jsxDEV13("header", {
|
|
7559
7950
|
children: [
|
|
7560
|
-
/* @__PURE__ */
|
|
7951
|
+
/* @__PURE__ */ jsxDEV13("strong", {
|
|
7561
7952
|
children: capability.label
|
|
7562
7953
|
}, undefined, false, undefined, this),
|
|
7563
|
-
/* @__PURE__ */
|
|
7954
|
+
/* @__PURE__ */ jsxDEV13("span", {
|
|
7564
7955
|
children: capability.status
|
|
7565
7956
|
}, undefined, false, undefined, this)
|
|
7566
7957
|
]
|
|
7567
7958
|
}, undefined, true, undefined, this),
|
|
7568
|
-
/* @__PURE__ */
|
|
7959
|
+
/* @__PURE__ */ jsxDEV13("p", {
|
|
7569
7960
|
children: capability.detail
|
|
7570
7961
|
}, undefined, false, undefined, this),
|
|
7571
|
-
/* @__PURE__ */
|
|
7572
|
-
children: capability.rows.map((row) => /* @__PURE__ */
|
|
7962
|
+
/* @__PURE__ */ jsxDEV13("dl", {
|
|
7963
|
+
children: capability.rows.map((row) => /* @__PURE__ */ jsxDEV13("div", {
|
|
7573
7964
|
children: [
|
|
7574
|
-
/* @__PURE__ */
|
|
7965
|
+
/* @__PURE__ */ jsxDEV13("dt", {
|
|
7575
7966
|
children: row.label
|
|
7576
7967
|
}, undefined, false, undefined, this),
|
|
7577
|
-
/* @__PURE__ */
|
|
7968
|
+
/* @__PURE__ */ jsxDEV13("dd", {
|
|
7578
7969
|
children: row.value
|
|
7579
7970
|
}, undefined, false, undefined, this)
|
|
7580
7971
|
]
|
|
@@ -7582,11 +7973,11 @@ var VoiceProviderCapabilities = ({
|
|
|
7582
7973
|
}, undefined, false, undefined, this)
|
|
7583
7974
|
]
|
|
7584
7975
|
}, `${capability.kind}:${capability.provider}`, true, undefined, this))
|
|
7585
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
7976
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV13("p", {
|
|
7586
7977
|
className: "absolute-voice-provider-capabilities__empty",
|
|
7587
7978
|
children: "Configure provider capabilities to see deployment coverage."
|
|
7588
7979
|
}, undefined, false, undefined, this),
|
|
7589
|
-
model.error ? /* @__PURE__ */
|
|
7980
|
+
model.error ? /* @__PURE__ */ jsxDEV13("p", {
|
|
7590
7981
|
className: "absolute-voice-provider-capabilities__error",
|
|
7591
7982
|
children: model.error
|
|
7592
7983
|
}, undefined, false, undefined, this) : null
|
|
@@ -7594,7 +7985,7 @@ var VoiceProviderCapabilities = ({
|
|
|
7594
7985
|
}, undefined, true, undefined, this);
|
|
7595
7986
|
};
|
|
7596
7987
|
// src/react/useVoiceProviderContracts.tsx
|
|
7597
|
-
import { useEffect as
|
|
7988
|
+
import { useEffect as useEffect14, useRef as useRef14, useSyncExternalStore as useSyncExternalStore14 } from "react";
|
|
7598
7989
|
|
|
7599
7990
|
// src/client/providerContracts.ts
|
|
7600
7991
|
var fetchVoiceProviderContracts = async (path = "/api/provider-contracts", options = {}) => {
|
|
@@ -7673,25 +8064,25 @@ var createVoiceProviderContractsStore = (path = "/api/provider-contracts", optio
|
|
|
7673
8064
|
|
|
7674
8065
|
// src/react/useVoiceProviderContracts.tsx
|
|
7675
8066
|
var useVoiceProviderContracts = (path = "/api/provider-contracts", options = {}) => {
|
|
7676
|
-
const storeRef =
|
|
8067
|
+
const storeRef = useRef14(null);
|
|
7677
8068
|
if (!storeRef.current) {
|
|
7678
8069
|
storeRef.current = createVoiceProviderContractsStore(path, options);
|
|
7679
8070
|
}
|
|
7680
8071
|
const store = storeRef.current;
|
|
7681
|
-
|
|
8072
|
+
useEffect14(() => {
|
|
7682
8073
|
store.refresh().catch(() => {});
|
|
7683
8074
|
return () => store.close();
|
|
7684
8075
|
}, [store]);
|
|
7685
8076
|
return {
|
|
7686
|
-
...
|
|
8077
|
+
...useSyncExternalStore14(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
7687
8078
|
refresh: store.refresh
|
|
7688
8079
|
};
|
|
7689
8080
|
};
|
|
7690
8081
|
|
|
7691
8082
|
// src/client/providerContractsWidget.ts
|
|
7692
|
-
var
|
|
7693
|
-
var
|
|
7694
|
-
var
|
|
8083
|
+
var DEFAULT_TITLE13 = "Provider Contracts";
|
|
8084
|
+
var DEFAULT_DESCRIPTION13 = "Production contract coverage for provider env, latency, fallback, streaming, and capabilities.";
|
|
8085
|
+
var escapeHtml19 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
7695
8086
|
var formatProvider2 = (provider) => provider.split(/[-_\s]+/).filter(Boolean).map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ") || provider;
|
|
7696
8087
|
var formatStatus4 = (status) => status.split("-").map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ");
|
|
7697
8088
|
var contractDetail = (row) => {
|
|
@@ -7723,38 +8114,38 @@ var createVoiceProviderContractsViewModel = (snapshot, options = {}) => {
|
|
|
7723
8114
|
}));
|
|
7724
8115
|
const warningCount = snapshot.report ? snapshot.report.failed + snapshot.report.warned : rows.filter((row) => row.status !== "pass").length;
|
|
7725
8116
|
return {
|
|
7726
|
-
description: options.description ??
|
|
8117
|
+
description: options.description ?? DEFAULT_DESCRIPTION13,
|
|
7727
8118
|
error: snapshot.error,
|
|
7728
8119
|
isLoading: snapshot.isLoading,
|
|
7729
8120
|
label: snapshot.error ? "Unavailable" : rows.length ? warningCount > 0 ? `${warningCount} needs attention` : `${rows.length} passing` : snapshot.isLoading ? "Checking" : "No contracts",
|
|
7730
8121
|
rows,
|
|
7731
8122
|
status: snapshot.error ? "error" : rows.length ? warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
7732
|
-
title: options.title ??
|
|
8123
|
+
title: options.title ?? DEFAULT_TITLE13,
|
|
7733
8124
|
updatedAt: snapshot.updatedAt
|
|
7734
8125
|
};
|
|
7735
8126
|
};
|
|
7736
8127
|
var renderVoiceProviderContractsHTML = (snapshot, options = {}) => {
|
|
7737
8128
|
const model = createVoiceProviderContractsViewModel(snapshot, options);
|
|
7738
|
-
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--${
|
|
8129
|
+
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--${escapeHtml19(row.status)}">
|
|
7739
8130
|
<header>
|
|
7740
|
-
<strong>${
|
|
7741
|
-
<span>${
|
|
8131
|
+
<strong>${escapeHtml19(row.label)}</strong>
|
|
8132
|
+
<span>${escapeHtml19(formatStatus4(row.status))}</span>
|
|
7742
8133
|
</header>
|
|
7743
|
-
<p>${
|
|
7744
|
-
${row.remediations.length ? `<ul class="absolute-voice-provider-contracts__remediations">${row.remediations.map((remediation) => `<li>${remediation.href ? `<a href="${
|
|
8134
|
+
<p>${escapeHtml19(row.detail)}</p>
|
|
8135
|
+
${row.remediations.length ? `<ul class="absolute-voice-provider-contracts__remediations">${row.remediations.map((remediation) => `<li>${remediation.href ? `<a href="${escapeHtml19(remediation.href)}">${escapeHtml19(remediation.label)}</a>` : `<strong>${escapeHtml19(remediation.label)}</strong>`}<span>${escapeHtml19(remediation.detail)}</span></li>`).join("")}</ul>` : ""}
|
|
7745
8136
|
<dl>${row.rows.map((item) => `<div>
|
|
7746
|
-
<dt>${
|
|
7747
|
-
<dd>${
|
|
8137
|
+
<dt>${escapeHtml19(item.label)}</dt>
|
|
8138
|
+
<dd>${escapeHtml19(item.value)}</dd>
|
|
7748
8139
|
</div>`).join("")}</dl>
|
|
7749
8140
|
</article>`).join("")}</div>` : '<p class="absolute-voice-provider-contracts__empty">Configure provider contracts to see production coverage.</p>';
|
|
7750
|
-
return `<section class="absolute-voice-provider-contracts absolute-voice-provider-contracts--${
|
|
8141
|
+
return `<section class="absolute-voice-provider-contracts absolute-voice-provider-contracts--${escapeHtml19(model.status)}">
|
|
7751
8142
|
<header class="absolute-voice-provider-contracts__header">
|
|
7752
|
-
<span class="absolute-voice-provider-contracts__eyebrow">${
|
|
7753
|
-
<strong class="absolute-voice-provider-contracts__label">${
|
|
8143
|
+
<span class="absolute-voice-provider-contracts__eyebrow">${escapeHtml19(model.title)}</span>
|
|
8144
|
+
<strong class="absolute-voice-provider-contracts__label">${escapeHtml19(model.label)}</strong>
|
|
7754
8145
|
</header>
|
|
7755
|
-
<p class="absolute-voice-provider-contracts__description">${
|
|
8146
|
+
<p class="absolute-voice-provider-contracts__description">${escapeHtml19(model.description)}</p>
|
|
7756
8147
|
${rows}
|
|
7757
|
-
${model.error ? `<p class="absolute-voice-provider-contracts__error">${
|
|
8148
|
+
${model.error ? `<p class="absolute-voice-provider-contracts__error">${escapeHtml19(model.error)}</p>` : ""}
|
|
7758
8149
|
</section>`;
|
|
7759
8150
|
};
|
|
7760
8151
|
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}`;
|
|
@@ -7796,7 +8187,7 @@ var defineVoiceProviderContractsElement = (tagName = "absolute-voice-provider-co
|
|
|
7796
8187
|
};
|
|
7797
8188
|
|
|
7798
8189
|
// src/react/VoiceProviderContracts.tsx
|
|
7799
|
-
import { jsxDEV as
|
|
8190
|
+
import { jsxDEV as jsxDEV14 } from "react/jsx-dev-runtime";
|
|
7800
8191
|
var VoiceProviderContracts = ({
|
|
7801
8192
|
className,
|
|
7802
8193
|
path = "/api/provider-contracts",
|
|
@@ -7804,74 +8195,74 @@ var VoiceProviderContracts = ({
|
|
|
7804
8195
|
}) => {
|
|
7805
8196
|
const snapshot = useVoiceProviderContracts(path, options);
|
|
7806
8197
|
const model = createVoiceProviderContractsViewModel(snapshot, options);
|
|
7807
|
-
return /* @__PURE__ */
|
|
8198
|
+
return /* @__PURE__ */ jsxDEV14("section", {
|
|
7808
8199
|
className: [
|
|
7809
8200
|
"absolute-voice-provider-contracts",
|
|
7810
8201
|
`absolute-voice-provider-contracts--${model.status}`,
|
|
7811
8202
|
className
|
|
7812
8203
|
].filter(Boolean).join(" "),
|
|
7813
8204
|
children: [
|
|
7814
|
-
/* @__PURE__ */
|
|
8205
|
+
/* @__PURE__ */ jsxDEV14("header", {
|
|
7815
8206
|
className: "absolute-voice-provider-contracts__header",
|
|
7816
8207
|
children: [
|
|
7817
|
-
/* @__PURE__ */
|
|
8208
|
+
/* @__PURE__ */ jsxDEV14("span", {
|
|
7818
8209
|
className: "absolute-voice-provider-contracts__eyebrow",
|
|
7819
8210
|
children: model.title
|
|
7820
8211
|
}, undefined, false, undefined, this),
|
|
7821
|
-
/* @__PURE__ */
|
|
8212
|
+
/* @__PURE__ */ jsxDEV14("strong", {
|
|
7822
8213
|
className: "absolute-voice-provider-contracts__label",
|
|
7823
8214
|
children: model.label
|
|
7824
8215
|
}, undefined, false, undefined, this)
|
|
7825
8216
|
]
|
|
7826
8217
|
}, undefined, true, undefined, this),
|
|
7827
|
-
/* @__PURE__ */
|
|
8218
|
+
/* @__PURE__ */ jsxDEV14("p", {
|
|
7828
8219
|
className: "absolute-voice-provider-contracts__description",
|
|
7829
8220
|
children: model.description
|
|
7830
8221
|
}, undefined, false, undefined, this),
|
|
7831
|
-
model.rows.length ? /* @__PURE__ */
|
|
8222
|
+
model.rows.length ? /* @__PURE__ */ jsxDEV14("div", {
|
|
7832
8223
|
className: "absolute-voice-provider-contracts__rows",
|
|
7833
|
-
children: model.rows.map((row) => /* @__PURE__ */
|
|
8224
|
+
children: model.rows.map((row) => /* @__PURE__ */ jsxDEV14("article", {
|
|
7834
8225
|
className: [
|
|
7835
8226
|
"absolute-voice-provider-contracts__row",
|
|
7836
8227
|
`absolute-voice-provider-contracts__row--${row.status}`
|
|
7837
8228
|
].join(" "),
|
|
7838
8229
|
children: [
|
|
7839
|
-
/* @__PURE__ */
|
|
8230
|
+
/* @__PURE__ */ jsxDEV14("header", {
|
|
7840
8231
|
children: [
|
|
7841
|
-
/* @__PURE__ */
|
|
8232
|
+
/* @__PURE__ */ jsxDEV14("strong", {
|
|
7842
8233
|
children: row.label
|
|
7843
8234
|
}, undefined, false, undefined, this),
|
|
7844
|
-
/* @__PURE__ */
|
|
8235
|
+
/* @__PURE__ */ jsxDEV14("span", {
|
|
7845
8236
|
children: row.status
|
|
7846
8237
|
}, undefined, false, undefined, this)
|
|
7847
8238
|
]
|
|
7848
8239
|
}, undefined, true, undefined, this),
|
|
7849
|
-
/* @__PURE__ */
|
|
8240
|
+
/* @__PURE__ */ jsxDEV14("p", {
|
|
7850
8241
|
children: row.detail
|
|
7851
8242
|
}, undefined, false, undefined, this),
|
|
7852
|
-
row.remediations.length ? /* @__PURE__ */
|
|
8243
|
+
row.remediations.length ? /* @__PURE__ */ jsxDEV14("ul", {
|
|
7853
8244
|
className: "absolute-voice-provider-contracts__remediations",
|
|
7854
|
-
children: row.remediations.map((remediation) => /* @__PURE__ */
|
|
8245
|
+
children: row.remediations.map((remediation) => /* @__PURE__ */ jsxDEV14("li", {
|
|
7855
8246
|
children: [
|
|
7856
|
-
remediation.href ? /* @__PURE__ */
|
|
8247
|
+
remediation.href ? /* @__PURE__ */ jsxDEV14("a", {
|
|
7857
8248
|
href: remediation.href,
|
|
7858
8249
|
children: remediation.label
|
|
7859
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
8250
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV14("strong", {
|
|
7860
8251
|
children: remediation.label
|
|
7861
8252
|
}, undefined, false, undefined, this),
|
|
7862
|
-
/* @__PURE__ */
|
|
8253
|
+
/* @__PURE__ */ jsxDEV14("span", {
|
|
7863
8254
|
children: remediation.detail
|
|
7864
8255
|
}, undefined, false, undefined, this)
|
|
7865
8256
|
]
|
|
7866
8257
|
}, `${row.kind}:${row.provider}:${remediation.label}`, true, undefined, this))
|
|
7867
8258
|
}, undefined, false, undefined, this) : null,
|
|
7868
|
-
/* @__PURE__ */
|
|
7869
|
-
children: row.rows.map((item) => /* @__PURE__ */
|
|
8259
|
+
/* @__PURE__ */ jsxDEV14("dl", {
|
|
8260
|
+
children: row.rows.map((item) => /* @__PURE__ */ jsxDEV14("div", {
|
|
7870
8261
|
children: [
|
|
7871
|
-
/* @__PURE__ */
|
|
8262
|
+
/* @__PURE__ */ jsxDEV14("dt", {
|
|
7872
8263
|
children: item.label
|
|
7873
8264
|
}, undefined, false, undefined, this),
|
|
7874
|
-
/* @__PURE__ */
|
|
8265
|
+
/* @__PURE__ */ jsxDEV14("dd", {
|
|
7875
8266
|
children: item.value
|
|
7876
8267
|
}, undefined, false, undefined, this)
|
|
7877
8268
|
]
|
|
@@ -7879,11 +8270,11 @@ var VoiceProviderContracts = ({
|
|
|
7879
8270
|
}, undefined, false, undefined, this)
|
|
7880
8271
|
]
|
|
7881
8272
|
}, `${row.kind}:${row.provider}`, true, undefined, this))
|
|
7882
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
8273
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV14("p", {
|
|
7883
8274
|
className: "absolute-voice-provider-contracts__empty",
|
|
7884
8275
|
children: "Configure provider contracts to see production coverage."
|
|
7885
8276
|
}, undefined, false, undefined, this),
|
|
7886
|
-
model.error ? /* @__PURE__ */
|
|
8277
|
+
model.error ? /* @__PURE__ */ jsxDEV14("p", {
|
|
7887
8278
|
className: "absolute-voice-provider-contracts__error",
|
|
7888
8279
|
children: model.error
|
|
7889
8280
|
}, undefined, false, undefined, this) : null
|
|
@@ -7891,7 +8282,7 @@ var VoiceProviderContracts = ({
|
|
|
7891
8282
|
}, undefined, true, undefined, this);
|
|
7892
8283
|
};
|
|
7893
8284
|
// src/react/useVoiceProviderStatus.tsx
|
|
7894
|
-
import { useEffect as
|
|
8285
|
+
import { useEffect as useEffect15, useRef as useRef15, useSyncExternalStore as useSyncExternalStore15 } from "react";
|
|
7895
8286
|
|
|
7896
8287
|
// src/client/providerStatus.ts
|
|
7897
8288
|
var fetchVoiceProviderStatus = async (path = "/api/provider-status", options = {}) => {
|
|
@@ -7975,25 +8366,25 @@ var createVoiceProviderStatusStore = (path = "/api/provider-status", options = {
|
|
|
7975
8366
|
|
|
7976
8367
|
// src/react/useVoiceProviderStatus.tsx
|
|
7977
8368
|
var useVoiceProviderStatus = (path = "/api/provider-status", options = {}) => {
|
|
7978
|
-
const storeRef =
|
|
8369
|
+
const storeRef = useRef15(null);
|
|
7979
8370
|
if (!storeRef.current) {
|
|
7980
8371
|
storeRef.current = createVoiceProviderStatusStore(path, options);
|
|
7981
8372
|
}
|
|
7982
8373
|
const store = storeRef.current;
|
|
7983
|
-
|
|
8374
|
+
useEffect15(() => {
|
|
7984
8375
|
store.refresh().catch(() => {});
|
|
7985
8376
|
return () => store.close();
|
|
7986
8377
|
}, [store]);
|
|
7987
8378
|
return {
|
|
7988
|
-
...
|
|
8379
|
+
...useSyncExternalStore15(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
7989
8380
|
refresh: store.refresh
|
|
7990
8381
|
};
|
|
7991
8382
|
};
|
|
7992
8383
|
|
|
7993
8384
|
// src/client/providerStatusWidget.ts
|
|
7994
|
-
var
|
|
7995
|
-
var
|
|
7996
|
-
var
|
|
8385
|
+
var DEFAULT_TITLE14 = "Voice Providers";
|
|
8386
|
+
var DEFAULT_DESCRIPTION14 = "Live provider health, fallback counts, latency, and suppression state from your self-hosted trace store.";
|
|
8387
|
+
var escapeHtml20 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
7997
8388
|
var formatProvider3 = (provider) => provider.split(/[-_\s]+/).filter(Boolean).map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ") || provider;
|
|
7998
8389
|
var formatStatus5 = (status) => status.split("-").map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ");
|
|
7999
8390
|
var formatLatency = (value) => typeof value === "number" ? `${value}ms` : "No samples";
|
|
@@ -8037,37 +8428,37 @@ var createVoiceProviderStatusViewModel = (snapshot, options = {}) => {
|
|
|
8037
8428
|
const warningCount = providers.filter((provider) => isWarningStatus2(provider.status)).length;
|
|
8038
8429
|
const healthyCount = providers.filter((provider) => provider.status === "healthy").length;
|
|
8039
8430
|
return {
|
|
8040
|
-
description: options.description ??
|
|
8431
|
+
description: options.description ?? DEFAULT_DESCRIPTION14,
|
|
8041
8432
|
error: snapshot.error,
|
|
8042
8433
|
isLoading: snapshot.isLoading,
|
|
8043
8434
|
label: snapshot.error ? "Unavailable" : providers.length ? warningCount > 0 ? `${warningCount} needs attention` : `${healthyCount} healthy` : snapshot.isLoading ? "Checking" : "No provider traffic",
|
|
8044
8435
|
providers,
|
|
8045
8436
|
status: snapshot.error ? "error" : providers.length ? warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
8046
|
-
title: options.title ??
|
|
8437
|
+
title: options.title ?? DEFAULT_TITLE14,
|
|
8047
8438
|
updatedAt: snapshot.updatedAt
|
|
8048
8439
|
};
|
|
8049
8440
|
};
|
|
8050
8441
|
var renderVoiceProviderStatusHTML = (snapshot, options = {}) => {
|
|
8051
8442
|
const model = createVoiceProviderStatusViewModel(snapshot, options);
|
|
8052
|
-
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--${
|
|
8443
|
+
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--${escapeHtml20(provider.status)}">
|
|
8053
8444
|
<header>
|
|
8054
|
-
<strong>${
|
|
8055
|
-
<span>${
|
|
8445
|
+
<strong>${escapeHtml20(provider.label)}</strong>
|
|
8446
|
+
<span>${escapeHtml20(formatStatus5(provider.status))}</span>
|
|
8056
8447
|
</header>
|
|
8057
|
-
<p>${
|
|
8448
|
+
<p>${escapeHtml20(provider.detail)}</p>
|
|
8058
8449
|
<dl>${provider.rows.map((row) => `<div>
|
|
8059
|
-
<dt>${
|
|
8060
|
-
<dd>${
|
|
8450
|
+
<dt>${escapeHtml20(row.label)}</dt>
|
|
8451
|
+
<dd>${escapeHtml20(row.value)}</dd>
|
|
8061
8452
|
</div>`).join("")}</dl>
|
|
8062
8453
|
</article>`).join("")}</div>` : '<p class="absolute-voice-provider-status__empty">Run voice traffic to see provider health.</p>';
|
|
8063
|
-
return `<section class="absolute-voice-provider-status absolute-voice-provider-status--${
|
|
8454
|
+
return `<section class="absolute-voice-provider-status absolute-voice-provider-status--${escapeHtml20(model.status)}">
|
|
8064
8455
|
<header class="absolute-voice-provider-status__header">
|
|
8065
|
-
<span class="absolute-voice-provider-status__eyebrow">${
|
|
8066
|
-
<strong class="absolute-voice-provider-status__label">${
|
|
8456
|
+
<span class="absolute-voice-provider-status__eyebrow">${escapeHtml20(model.title)}</span>
|
|
8457
|
+
<strong class="absolute-voice-provider-status__label">${escapeHtml20(model.label)}</strong>
|
|
8067
8458
|
</header>
|
|
8068
|
-
<p class="absolute-voice-provider-status__description">${
|
|
8459
|
+
<p class="absolute-voice-provider-status__description">${escapeHtml20(model.description)}</p>
|
|
8069
8460
|
${providers}
|
|
8070
|
-
${model.error ? `<p class="absolute-voice-provider-status__error">${
|
|
8461
|
+
${model.error ? `<p class="absolute-voice-provider-status__error">${escapeHtml20(model.error)}</p>` : ""}
|
|
8071
8462
|
</section>`;
|
|
8072
8463
|
};
|
|
8073
8464
|
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}`;
|
|
@@ -8109,7 +8500,7 @@ var defineVoiceProviderStatusElement = (tagName = "absolute-voice-provider-statu
|
|
|
8109
8500
|
};
|
|
8110
8501
|
|
|
8111
8502
|
// src/react/VoiceProviderStatus.tsx
|
|
8112
|
-
import { jsxDEV as
|
|
8503
|
+
import { jsxDEV as jsxDEV15 } from "react/jsx-dev-runtime";
|
|
8113
8504
|
var VoiceProviderStatus = ({
|
|
8114
8505
|
className,
|
|
8115
8506
|
path = "/api/provider-status",
|
|
@@ -8117,58 +8508,58 @@ var VoiceProviderStatus = ({
|
|
|
8117
8508
|
}) => {
|
|
8118
8509
|
const snapshot = useVoiceProviderStatus(path, options);
|
|
8119
8510
|
const model = createVoiceProviderStatusViewModel(snapshot, options);
|
|
8120
|
-
return /* @__PURE__ */
|
|
8511
|
+
return /* @__PURE__ */ jsxDEV15("section", {
|
|
8121
8512
|
className: [
|
|
8122
8513
|
"absolute-voice-provider-status",
|
|
8123
8514
|
`absolute-voice-provider-status--${model.status}`,
|
|
8124
8515
|
className
|
|
8125
8516
|
].filter(Boolean).join(" "),
|
|
8126
8517
|
children: [
|
|
8127
|
-
/* @__PURE__ */
|
|
8518
|
+
/* @__PURE__ */ jsxDEV15("header", {
|
|
8128
8519
|
className: "absolute-voice-provider-status__header",
|
|
8129
8520
|
children: [
|
|
8130
|
-
/* @__PURE__ */
|
|
8521
|
+
/* @__PURE__ */ jsxDEV15("span", {
|
|
8131
8522
|
className: "absolute-voice-provider-status__eyebrow",
|
|
8132
8523
|
children: model.title
|
|
8133
8524
|
}, undefined, false, undefined, this),
|
|
8134
|
-
/* @__PURE__ */
|
|
8525
|
+
/* @__PURE__ */ jsxDEV15("strong", {
|
|
8135
8526
|
className: "absolute-voice-provider-status__label",
|
|
8136
8527
|
children: model.label
|
|
8137
8528
|
}, undefined, false, undefined, this)
|
|
8138
8529
|
]
|
|
8139
8530
|
}, undefined, true, undefined, this),
|
|
8140
|
-
/* @__PURE__ */
|
|
8531
|
+
/* @__PURE__ */ jsxDEV15("p", {
|
|
8141
8532
|
className: "absolute-voice-provider-status__description",
|
|
8142
8533
|
children: model.description
|
|
8143
8534
|
}, undefined, false, undefined, this),
|
|
8144
|
-
model.providers.length ? /* @__PURE__ */
|
|
8535
|
+
model.providers.length ? /* @__PURE__ */ jsxDEV15("div", {
|
|
8145
8536
|
className: "absolute-voice-provider-status__providers",
|
|
8146
|
-
children: model.providers.map((provider) => /* @__PURE__ */
|
|
8537
|
+
children: model.providers.map((provider) => /* @__PURE__ */ jsxDEV15("article", {
|
|
8147
8538
|
className: [
|
|
8148
8539
|
"absolute-voice-provider-status__provider",
|
|
8149
8540
|
`absolute-voice-provider-status__provider--${provider.status}`
|
|
8150
8541
|
].join(" "),
|
|
8151
8542
|
children: [
|
|
8152
|
-
/* @__PURE__ */
|
|
8543
|
+
/* @__PURE__ */ jsxDEV15("header", {
|
|
8153
8544
|
children: [
|
|
8154
|
-
/* @__PURE__ */
|
|
8545
|
+
/* @__PURE__ */ jsxDEV15("strong", {
|
|
8155
8546
|
children: provider.label
|
|
8156
8547
|
}, undefined, false, undefined, this),
|
|
8157
|
-
/* @__PURE__ */
|
|
8548
|
+
/* @__PURE__ */ jsxDEV15("span", {
|
|
8158
8549
|
children: provider.status
|
|
8159
8550
|
}, undefined, false, undefined, this)
|
|
8160
8551
|
]
|
|
8161
8552
|
}, undefined, true, undefined, this),
|
|
8162
|
-
/* @__PURE__ */
|
|
8553
|
+
/* @__PURE__ */ jsxDEV15("p", {
|
|
8163
8554
|
children: provider.detail
|
|
8164
8555
|
}, undefined, false, undefined, this),
|
|
8165
|
-
/* @__PURE__ */
|
|
8166
|
-
children: provider.rows.map((row) => /* @__PURE__ */
|
|
8556
|
+
/* @__PURE__ */ jsxDEV15("dl", {
|
|
8557
|
+
children: provider.rows.map((row) => /* @__PURE__ */ jsxDEV15("div", {
|
|
8167
8558
|
children: [
|
|
8168
|
-
/* @__PURE__ */
|
|
8559
|
+
/* @__PURE__ */ jsxDEV15("dt", {
|
|
8169
8560
|
children: row.label
|
|
8170
8561
|
}, undefined, false, undefined, this),
|
|
8171
|
-
/* @__PURE__ */
|
|
8562
|
+
/* @__PURE__ */ jsxDEV15("dd", {
|
|
8172
8563
|
children: row.value
|
|
8173
8564
|
}, undefined, false, undefined, this)
|
|
8174
8565
|
]
|
|
@@ -8176,11 +8567,11 @@ var VoiceProviderStatus = ({
|
|
|
8176
8567
|
}, undefined, false, undefined, this)
|
|
8177
8568
|
]
|
|
8178
8569
|
}, provider.provider, true, undefined, this))
|
|
8179
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
8570
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV15("p", {
|
|
8180
8571
|
className: "absolute-voice-provider-status__empty",
|
|
8181
8572
|
children: "Run voice traffic to see provider health."
|
|
8182
8573
|
}, undefined, false, undefined, this),
|
|
8183
|
-
model.error ? /* @__PURE__ */
|
|
8574
|
+
model.error ? /* @__PURE__ */ jsxDEV15("p", {
|
|
8184
8575
|
className: "absolute-voice-provider-status__error",
|
|
8185
8576
|
children: model.error
|
|
8186
8577
|
}, undefined, false, undefined, this) : null
|
|
@@ -8188,7 +8579,7 @@ var VoiceProviderStatus = ({
|
|
|
8188
8579
|
}, undefined, true, undefined, this);
|
|
8189
8580
|
};
|
|
8190
8581
|
// src/react/useVoiceRoutingStatus.tsx
|
|
8191
|
-
import { useEffect as
|
|
8582
|
+
import { useEffect as useEffect16, useRef as useRef16, useSyncExternalStore as useSyncExternalStore16 } from "react";
|
|
8192
8583
|
|
|
8193
8584
|
// src/client/routingStatus.ts
|
|
8194
8585
|
var fetchVoiceRoutingStatus = async (path = "/api/routing/latest", options = {}) => {
|
|
@@ -8272,25 +8663,25 @@ var createVoiceRoutingStatusStore = (path = "/api/routing/latest", options = {})
|
|
|
8272
8663
|
|
|
8273
8664
|
// src/react/useVoiceRoutingStatus.tsx
|
|
8274
8665
|
var useVoiceRoutingStatus = (path = "/api/routing/latest", options = {}) => {
|
|
8275
|
-
const storeRef =
|
|
8666
|
+
const storeRef = useRef16(null);
|
|
8276
8667
|
if (!storeRef.current) {
|
|
8277
8668
|
storeRef.current = createVoiceRoutingStatusStore(path, options);
|
|
8278
8669
|
}
|
|
8279
8670
|
const store = storeRef.current;
|
|
8280
|
-
|
|
8671
|
+
useEffect16(() => {
|
|
8281
8672
|
store.refresh().catch(() => {});
|
|
8282
8673
|
return () => store.close();
|
|
8283
8674
|
}, [store]);
|
|
8284
8675
|
return {
|
|
8285
|
-
...
|
|
8676
|
+
...useSyncExternalStore16(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
8286
8677
|
refresh: store.refresh
|
|
8287
8678
|
};
|
|
8288
8679
|
};
|
|
8289
8680
|
|
|
8290
8681
|
// src/client/routingStatusWidget.ts
|
|
8291
|
-
var
|
|
8292
|
-
var
|
|
8293
|
-
var
|
|
8682
|
+
var DEFAULT_TITLE15 = "Voice Routing";
|
|
8683
|
+
var DEFAULT_DESCRIPTION15 = "Latest provider routing decision from the self-hosted trace store.";
|
|
8684
|
+
var escapeHtml21 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
8294
8685
|
var formatValue = (value, fallback = "None") => typeof value === "string" && value.trim() ? value : typeof value === "number" && Number.isFinite(value) ? String(value) : fallback;
|
|
8295
8686
|
var formatProviderRoutes2 = (routes) => routes && typeof routes === "object" ? Object.entries(routes).map(([role, provider]) => `${role}: ${formatValue(provider)}`).join(", ") || "None" : "None";
|
|
8296
8687
|
var getProviderRoute = (routes, role) => routes && typeof routes === "object" ? formatValue(routes[role], "Not configured") : "Not configured";
|
|
@@ -8359,35 +8750,35 @@ var createVoiceRoutingStatusViewModel = (snapshot, options = {}) => {
|
|
|
8359
8750
|
return {
|
|
8360
8751
|
activeStack,
|
|
8361
8752
|
decision,
|
|
8362
|
-
description: options.description ??
|
|
8753
|
+
description: options.description ?? DEFAULT_DESCRIPTION15,
|
|
8363
8754
|
error: snapshot.error,
|
|
8364
8755
|
isLoading: snapshot.isLoading,
|
|
8365
8756
|
label: snapshot.error ? "Unavailable" : decision ? `${formatValue(decision.kind).toUpperCase()} ${formatValue(decision.status, "unknown")}` : snapshot.isLoading ? "Checking" : "No routing yet",
|
|
8366
8757
|
rows,
|
|
8367
8758
|
status: snapshot.error ? "error" : decision ? "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
8368
|
-
title: options.title ??
|
|
8759
|
+
title: options.title ?? DEFAULT_TITLE15,
|
|
8369
8760
|
updatedAt: snapshot.updatedAt
|
|
8370
8761
|
};
|
|
8371
8762
|
};
|
|
8372
8763
|
var renderVoiceRoutingStatusHTML = (snapshot, options = {}) => {
|
|
8373
8764
|
const model = createVoiceRoutingStatusViewModel(snapshot, options);
|
|
8374
8765
|
const activeStack = model.activeStack.length ? `<div class="absolute-voice-routing-status__stack" aria-label="Active voice stack">${model.activeStack.map((item) => `<div>
|
|
8375
|
-
<span>${
|
|
8376
|
-
<strong>${
|
|
8766
|
+
<span>${escapeHtml21(item.label)}</span>
|
|
8767
|
+
<strong>${escapeHtml21(item.value)}</strong>
|
|
8377
8768
|
</div>`).join("")}</div>` : "";
|
|
8378
8769
|
const rows = model.rows.length ? `<div class="absolute-voice-routing-status__grid">${model.rows.map((row) => `<div>
|
|
8379
|
-
<span>${
|
|
8380
|
-
<strong>${
|
|
8770
|
+
<span>${escapeHtml21(row.label)}</span>
|
|
8771
|
+
<strong>${escapeHtml21(row.value)}</strong>
|
|
8381
8772
|
</div>`).join("")}</div>` : '<p class="absolute-voice-routing-status__empty">Start a voice session to see the selected provider.</p>';
|
|
8382
|
-
return `<section class="absolute-voice-routing-status absolute-voice-routing-status--${
|
|
8773
|
+
return `<section class="absolute-voice-routing-status absolute-voice-routing-status--${escapeHtml21(model.status)}">
|
|
8383
8774
|
<header class="absolute-voice-routing-status__header">
|
|
8384
|
-
<span class="absolute-voice-routing-status__eyebrow">${
|
|
8385
|
-
<strong class="absolute-voice-routing-status__label">${
|
|
8775
|
+
<span class="absolute-voice-routing-status__eyebrow">${escapeHtml21(model.title)}</span>
|
|
8776
|
+
<strong class="absolute-voice-routing-status__label">${escapeHtml21(model.label)}</strong>
|
|
8386
8777
|
</header>
|
|
8387
|
-
<p class="absolute-voice-routing-status__description">${
|
|
8778
|
+
<p class="absolute-voice-routing-status__description">${escapeHtml21(model.description)}</p>
|
|
8388
8779
|
${activeStack}
|
|
8389
8780
|
${rows}
|
|
8390
|
-
${model.error ? `<p class="absolute-voice-routing-status__error">${
|
|
8781
|
+
${model.error ? `<p class="absolute-voice-routing-status__error">${escapeHtml21(model.error)}</p>` : ""}
|
|
8391
8782
|
</section>`;
|
|
8392
8783
|
};
|
|
8393
8784
|
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__stack{background:linear-gradient(135deg,#16130d,#49391f);border-radius:18px;color:#fff;display:grid;gap:8px;grid-template-columns:repeat(5,minmax(0,1fr));margin-top:14px;padding:12px}.absolute-voice-routing-status__stack div{border-left:1px solid rgba(255,255,255,.18);padding-left:10px}.absolute-voice-routing-status__stack div:first-child{border-left:0;padding-left:0}.absolute-voice-routing-status__stack span{color:#e9d9b8;display:block;font-size:11px;font-weight:800;letter-spacing:.08em;margin-bottom:5px;text-transform:uppercase}.absolute-voice-routing-status__stack strong{display:block;font-size:13px;line-height:1.25;overflow-wrap:anywhere}.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}@media (max-width:760px){.absolute-voice-routing-status__stack{grid-template-columns:repeat(2,minmax(0,1fr))}.absolute-voice-routing-status__stack div{border-left:0;border-top:1px solid rgba(255,255,255,.18);padding-left:0;padding-top:8px}.absolute-voice-routing-status__stack div:first-child{border-top:0;padding-top:0}}`;
|
|
@@ -8429,7 +8820,7 @@ var defineVoiceRoutingStatusElement = (tagName = "absolute-voice-routing-status"
|
|
|
8429
8820
|
};
|
|
8430
8821
|
|
|
8431
8822
|
// src/react/VoiceRoutingStatus.tsx
|
|
8432
|
-
import { jsxDEV as
|
|
8823
|
+
import { jsxDEV as jsxDEV16 } from "react/jsx-dev-runtime";
|
|
8433
8824
|
var VoiceRoutingStatus = ({
|
|
8434
8825
|
className,
|
|
8435
8826
|
path = "/api/routing/latest",
|
|
@@ -8437,47 +8828,47 @@ var VoiceRoutingStatus = ({
|
|
|
8437
8828
|
}) => {
|
|
8438
8829
|
const snapshot = useVoiceRoutingStatus(path, options);
|
|
8439
8830
|
const model = createVoiceRoutingStatusViewModel(snapshot, options);
|
|
8440
|
-
return /* @__PURE__ */
|
|
8831
|
+
return /* @__PURE__ */ jsxDEV16("section", {
|
|
8441
8832
|
className: [
|
|
8442
8833
|
"absolute-voice-routing-status",
|
|
8443
8834
|
`absolute-voice-routing-status--${model.status}`,
|
|
8444
8835
|
className
|
|
8445
8836
|
].filter(Boolean).join(" "),
|
|
8446
8837
|
children: [
|
|
8447
|
-
/* @__PURE__ */
|
|
8838
|
+
/* @__PURE__ */ jsxDEV16("header", {
|
|
8448
8839
|
className: "absolute-voice-routing-status__header",
|
|
8449
8840
|
children: [
|
|
8450
|
-
/* @__PURE__ */
|
|
8841
|
+
/* @__PURE__ */ jsxDEV16("span", {
|
|
8451
8842
|
className: "absolute-voice-routing-status__eyebrow",
|
|
8452
8843
|
children: model.title
|
|
8453
8844
|
}, undefined, false, undefined, this),
|
|
8454
|
-
/* @__PURE__ */
|
|
8845
|
+
/* @__PURE__ */ jsxDEV16("strong", {
|
|
8455
8846
|
className: "absolute-voice-routing-status__label",
|
|
8456
8847
|
children: model.label
|
|
8457
8848
|
}, undefined, false, undefined, this)
|
|
8458
8849
|
]
|
|
8459
8850
|
}, undefined, true, undefined, this),
|
|
8460
|
-
/* @__PURE__ */
|
|
8851
|
+
/* @__PURE__ */ jsxDEV16("p", {
|
|
8461
8852
|
className: "absolute-voice-routing-status__description",
|
|
8462
8853
|
children: model.description
|
|
8463
8854
|
}, undefined, false, undefined, this),
|
|
8464
|
-
model.rows.length ? /* @__PURE__ */
|
|
8855
|
+
model.rows.length ? /* @__PURE__ */ jsxDEV16("div", {
|
|
8465
8856
|
className: "absolute-voice-routing-status__grid",
|
|
8466
|
-
children: model.rows.map((row) => /* @__PURE__ */
|
|
8857
|
+
children: model.rows.map((row) => /* @__PURE__ */ jsxDEV16("div", {
|
|
8467
8858
|
children: [
|
|
8468
|
-
/* @__PURE__ */
|
|
8859
|
+
/* @__PURE__ */ jsxDEV16("span", {
|
|
8469
8860
|
children: row.label
|
|
8470
8861
|
}, undefined, false, undefined, this),
|
|
8471
|
-
/* @__PURE__ */
|
|
8862
|
+
/* @__PURE__ */ jsxDEV16("strong", {
|
|
8472
8863
|
children: row.value
|
|
8473
8864
|
}, undefined, false, undefined, this)
|
|
8474
8865
|
]
|
|
8475
8866
|
}, row.label, true, undefined, this))
|
|
8476
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
8867
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV16("p", {
|
|
8477
8868
|
className: "absolute-voice-routing-status__empty",
|
|
8478
8869
|
children: "Start a voice session to see the selected provider."
|
|
8479
8870
|
}, undefined, false, undefined, this),
|
|
8480
|
-
model.error ? /* @__PURE__ */
|
|
8871
|
+
model.error ? /* @__PURE__ */ jsxDEV16("p", {
|
|
8481
8872
|
className: "absolute-voice-routing-status__error",
|
|
8482
8873
|
children: model.error
|
|
8483
8874
|
}, undefined, false, undefined, this) : null
|
|
@@ -8565,16 +8956,16 @@ var createVoiceTraceTimelineStore = (path = "/api/voice-traces", options = {}) =
|
|
|
8565
8956
|
};
|
|
8566
8957
|
|
|
8567
8958
|
// src/client/traceTimelineWidget.ts
|
|
8568
|
-
var
|
|
8569
|
-
var
|
|
8570
|
-
var
|
|
8571
|
-
var
|
|
8959
|
+
var DEFAULT_TITLE16 = "Voice Traces";
|
|
8960
|
+
var DEFAULT_DESCRIPTION16 = "Latest call timelines with provider latency, fallbacks, handoffs, and errors from your self-hosted trace store.";
|
|
8961
|
+
var escapeHtml22 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
8962
|
+
var formatMs4 = (value) => typeof value === "number" ? `${value}ms` : "n/a";
|
|
8572
8963
|
var formatProviders = (session) => session.providers.length ? session.providers.map((provider) => provider.provider).join(", ") : "No providers";
|
|
8573
8964
|
var createVoiceTraceTimelineViewModel = (snapshot, options = {}) => {
|
|
8574
8965
|
const sessions = (snapshot.report?.sessions ?? []).slice(0, options.limit ?? 3).map((session) => ({
|
|
8575
8966
|
...session,
|
|
8576
8967
|
detailHref: `${options.detailBasePath ?? "/traces"}/${encodeURIComponent(session.sessionId)}`,
|
|
8577
|
-
durationLabel:
|
|
8968
|
+
durationLabel: formatMs4(session.summary.callDurationMs),
|
|
8578
8969
|
incidentBundleHref: options.incidentBundleBasePath === false ? undefined : `${options.incidentBundleBasePath ?? "/voice-incidents"}/${encodeURIComponent(session.sessionId)}/markdown`,
|
|
8579
8970
|
label: `${session.summary.eventCount} events / ${session.summary.turnCount} turns`,
|
|
8580
8971
|
operationsRecordHref: options.operationsRecordBasePath === false ? undefined : `${options.operationsRecordBasePath ?? "/voice-operations"}/${encodeURIComponent(session.sessionId)}`,
|
|
@@ -8583,13 +8974,13 @@ var createVoiceTraceTimelineViewModel = (snapshot, options = {}) => {
|
|
|
8583
8974
|
const failed = sessions.filter((session) => session.status === "failed").length;
|
|
8584
8975
|
const warnings = sessions.filter((session) => session.status === "warning").length;
|
|
8585
8976
|
return {
|
|
8586
|
-
description: options.description ??
|
|
8977
|
+
description: options.description ?? DEFAULT_DESCRIPTION16,
|
|
8587
8978
|
error: snapshot.error,
|
|
8588
8979
|
isLoading: snapshot.isLoading,
|
|
8589
8980
|
label: snapshot.error ? "Unavailable" : failed > 0 ? `${failed} failed` : warnings > 0 ? `${warnings} warning` : sessions.length ? `${sessions.length} recent` : snapshot.isLoading ? "Checking" : "No traces yet",
|
|
8590
8981
|
sessions,
|
|
8591
8982
|
status: snapshot.error ? "error" : failed > 0 ? "failed" : warnings > 0 ? "warning" : sessions.length ? "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
8592
|
-
title: options.title ??
|
|
8983
|
+
title: options.title ?? DEFAULT_TITLE16,
|
|
8593
8984
|
updatedAt: snapshot.updatedAt
|
|
8594
8985
|
};
|
|
8595
8986
|
};
|
|
@@ -8597,27 +8988,27 @@ var renderVoiceTraceTimelineWidgetHTML = (snapshot, options = {}) => {
|
|
|
8597
8988
|
const model = createVoiceTraceTimelineViewModel(snapshot, options);
|
|
8598
8989
|
const sessions = model.sessions.length ? `<div class="absolute-voice-trace-timeline__sessions">${model.sessions.map((session) => {
|
|
8599
8990
|
const supportLinks = [
|
|
8600
|
-
`<a href="${
|
|
8601
|
-
session.operationsRecordHref ? `<a href="${
|
|
8602
|
-
session.incidentBundleHref ? `<a href="${
|
|
8991
|
+
`<a href="${escapeHtml22(session.detailHref)}">Open timeline</a>`,
|
|
8992
|
+
session.operationsRecordHref ? `<a href="${escapeHtml22(session.operationsRecordHref)}">Open operations record</a>` : undefined,
|
|
8993
|
+
session.incidentBundleHref ? `<a href="${escapeHtml22(session.incidentBundleHref)}">Export incident bundle</a>` : undefined
|
|
8603
8994
|
].filter(Boolean).join("");
|
|
8604
|
-
return `<article class="absolute-voice-trace-timeline__session absolute-voice-trace-timeline__session--${
|
|
8995
|
+
return `<article class="absolute-voice-trace-timeline__session absolute-voice-trace-timeline__session--${escapeHtml22(session.status)}">
|
|
8605
8996
|
<header>
|
|
8606
|
-
<strong>${
|
|
8607
|
-
<span>${
|
|
8997
|
+
<strong>${escapeHtml22(session.sessionId)}</strong>
|
|
8998
|
+
<span>${escapeHtml22(session.status)}</span>
|
|
8608
8999
|
</header>
|
|
8609
|
-
<p>${
|
|
9000
|
+
<p>${escapeHtml22(session.label)} \xB7 ${escapeHtml22(session.durationLabel)} \xB7 ${escapeHtml22(session.providerLabel)}</p>
|
|
8610
9001
|
<p class="absolute-voice-trace-timeline__actions">${supportLinks}</p>
|
|
8611
9002
|
</article>`;
|
|
8612
9003
|
}).join("")}</div>` : '<p class="absolute-voice-trace-timeline__empty">Run a voice session to see call timelines.</p>';
|
|
8613
|
-
return `<section class="absolute-voice-trace-timeline absolute-voice-trace-timeline--${
|
|
9004
|
+
return `<section class="absolute-voice-trace-timeline absolute-voice-trace-timeline--${escapeHtml22(model.status)}">
|
|
8614
9005
|
<header class="absolute-voice-trace-timeline__header">
|
|
8615
|
-
<span class="absolute-voice-trace-timeline__eyebrow">${
|
|
8616
|
-
<strong class="absolute-voice-trace-timeline__label">${
|
|
9006
|
+
<span class="absolute-voice-trace-timeline__eyebrow">${escapeHtml22(model.title)}</span>
|
|
9007
|
+
<strong class="absolute-voice-trace-timeline__label">${escapeHtml22(model.label)}</strong>
|
|
8617
9008
|
</header>
|
|
8618
|
-
<p class="absolute-voice-trace-timeline__description">${
|
|
9009
|
+
<p class="absolute-voice-trace-timeline__description">${escapeHtml22(model.description)}</p>
|
|
8619
9010
|
${sessions}
|
|
8620
|
-
${model.error ? `<p class="absolute-voice-trace-timeline__error">${
|
|
9011
|
+
${model.error ? `<p class="absolute-voice-trace-timeline__error">${escapeHtml22(model.error)}</p>` : ""}
|
|
8621
9012
|
</section>`;
|
|
8622
9013
|
};
|
|
8623
9014
|
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}`;
|
|
@@ -8664,25 +9055,25 @@ var defineVoiceTraceTimelineElement = (tagName = "absolute-voice-trace-timeline"
|
|
|
8664
9055
|
};
|
|
8665
9056
|
|
|
8666
9057
|
// src/react/useVoiceTraceTimeline.tsx
|
|
8667
|
-
import { useEffect as
|
|
9058
|
+
import { useEffect as useEffect17, useRef as useRef17, useSyncExternalStore as useSyncExternalStore17 } from "react";
|
|
8668
9059
|
var useVoiceTraceTimeline = (path = "/api/voice-traces", options = {}) => {
|
|
8669
|
-
const storeRef =
|
|
9060
|
+
const storeRef = useRef17(null);
|
|
8670
9061
|
if (!storeRef.current) {
|
|
8671
9062
|
storeRef.current = createVoiceTraceTimelineStore(path, options);
|
|
8672
9063
|
}
|
|
8673
9064
|
const store = storeRef.current;
|
|
8674
|
-
|
|
9065
|
+
useEffect17(() => {
|
|
8675
9066
|
store.refresh().catch(() => {});
|
|
8676
9067
|
return () => store.close();
|
|
8677
9068
|
}, [store]);
|
|
8678
9069
|
return {
|
|
8679
|
-
...
|
|
9070
|
+
...useSyncExternalStore17(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
8680
9071
|
refresh: store.refresh
|
|
8681
9072
|
};
|
|
8682
9073
|
};
|
|
8683
9074
|
|
|
8684
9075
|
// src/react/VoiceTraceTimeline.tsx
|
|
8685
|
-
import { jsxDEV as
|
|
9076
|
+
import { jsxDEV as jsxDEV17 } from "react/jsx-dev-runtime";
|
|
8686
9077
|
var VoiceTraceTimeline = ({
|
|
8687
9078
|
className,
|
|
8688
9079
|
path = "/api/voice-traces",
|
|
@@ -8690,49 +9081,49 @@ var VoiceTraceTimeline = ({
|
|
|
8690
9081
|
}) => {
|
|
8691
9082
|
const snapshot = useVoiceTraceTimeline(path, options);
|
|
8692
9083
|
const model = createVoiceTraceTimelineViewModel(snapshot, options);
|
|
8693
|
-
return /* @__PURE__ */
|
|
9084
|
+
return /* @__PURE__ */ jsxDEV17("section", {
|
|
8694
9085
|
className: [
|
|
8695
9086
|
"absolute-voice-trace-timeline",
|
|
8696
9087
|
`absolute-voice-trace-timeline--${model.status}`,
|
|
8697
9088
|
className
|
|
8698
9089
|
].filter(Boolean).join(" "),
|
|
8699
9090
|
children: [
|
|
8700
|
-
/* @__PURE__ */
|
|
9091
|
+
/* @__PURE__ */ jsxDEV17("header", {
|
|
8701
9092
|
className: "absolute-voice-trace-timeline__header",
|
|
8702
9093
|
children: [
|
|
8703
|
-
/* @__PURE__ */
|
|
9094
|
+
/* @__PURE__ */ jsxDEV17("span", {
|
|
8704
9095
|
className: "absolute-voice-trace-timeline__eyebrow",
|
|
8705
9096
|
children: model.title
|
|
8706
9097
|
}, undefined, false, undefined, this),
|
|
8707
|
-
/* @__PURE__ */
|
|
9098
|
+
/* @__PURE__ */ jsxDEV17("strong", {
|
|
8708
9099
|
className: "absolute-voice-trace-timeline__label",
|
|
8709
9100
|
children: model.label
|
|
8710
9101
|
}, undefined, false, undefined, this)
|
|
8711
9102
|
]
|
|
8712
9103
|
}, undefined, true, undefined, this),
|
|
8713
|
-
/* @__PURE__ */
|
|
9104
|
+
/* @__PURE__ */ jsxDEV17("p", {
|
|
8714
9105
|
className: "absolute-voice-trace-timeline__description",
|
|
8715
9106
|
children: model.description
|
|
8716
9107
|
}, undefined, false, undefined, this),
|
|
8717
|
-
model.sessions.length ? /* @__PURE__ */
|
|
9108
|
+
model.sessions.length ? /* @__PURE__ */ jsxDEV17("div", {
|
|
8718
9109
|
className: "absolute-voice-trace-timeline__sessions",
|
|
8719
|
-
children: model.sessions.map((session) => /* @__PURE__ */
|
|
9110
|
+
children: model.sessions.map((session) => /* @__PURE__ */ jsxDEV17("article", {
|
|
8720
9111
|
className: [
|
|
8721
9112
|
"absolute-voice-trace-timeline__session",
|
|
8722
9113
|
`absolute-voice-trace-timeline__session--${session.status}`
|
|
8723
9114
|
].join(" "),
|
|
8724
9115
|
children: [
|
|
8725
|
-
/* @__PURE__ */
|
|
9116
|
+
/* @__PURE__ */ jsxDEV17("header", {
|
|
8726
9117
|
children: [
|
|
8727
|
-
/* @__PURE__ */
|
|
9118
|
+
/* @__PURE__ */ jsxDEV17("strong", {
|
|
8728
9119
|
children: session.sessionId
|
|
8729
9120
|
}, undefined, false, undefined, this),
|
|
8730
|
-
/* @__PURE__ */
|
|
9121
|
+
/* @__PURE__ */ jsxDEV17("span", {
|
|
8731
9122
|
children: session.status
|
|
8732
9123
|
}, undefined, false, undefined, this)
|
|
8733
9124
|
]
|
|
8734
9125
|
}, undefined, true, undefined, this),
|
|
8735
|
-
/* @__PURE__ */
|
|
9126
|
+
/* @__PURE__ */ jsxDEV17("p", {
|
|
8736
9127
|
children: [
|
|
8737
9128
|
session.label,
|
|
8738
9129
|
" \xB7 ",
|
|
@@ -8742,18 +9133,18 @@ var VoiceTraceTimeline = ({
|
|
|
8742
9133
|
session.providerLabel
|
|
8743
9134
|
]
|
|
8744
9135
|
}, undefined, true, undefined, this),
|
|
8745
|
-
/* @__PURE__ */
|
|
9136
|
+
/* @__PURE__ */ jsxDEV17("p", {
|
|
8746
9137
|
className: "absolute-voice-trace-timeline__actions",
|
|
8747
9138
|
children: [
|
|
8748
|
-
/* @__PURE__ */
|
|
9139
|
+
/* @__PURE__ */ jsxDEV17("a", {
|
|
8749
9140
|
href: session.detailHref,
|
|
8750
9141
|
children: "Open timeline"
|
|
8751
9142
|
}, undefined, false, undefined, this),
|
|
8752
|
-
session.operationsRecordHref ? /* @__PURE__ */
|
|
9143
|
+
session.operationsRecordHref ? /* @__PURE__ */ jsxDEV17("a", {
|
|
8753
9144
|
href: session.operationsRecordHref,
|
|
8754
9145
|
children: "Open operations record"
|
|
8755
9146
|
}, undefined, false, undefined, this) : null,
|
|
8756
|
-
session.incidentBundleHref ? /* @__PURE__ */
|
|
9147
|
+
session.incidentBundleHref ? /* @__PURE__ */ jsxDEV17("a", {
|
|
8757
9148
|
href: session.incidentBundleHref,
|
|
8758
9149
|
children: "Export incident bundle"
|
|
8759
9150
|
}, undefined, false, undefined, this) : null
|
|
@@ -8761,11 +9152,11 @@ var VoiceTraceTimeline = ({
|
|
|
8761
9152
|
}, undefined, true, undefined, this)
|
|
8762
9153
|
]
|
|
8763
9154
|
}, session.sessionId, true, undefined, this))
|
|
8764
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
9155
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV17("p", {
|
|
8765
9156
|
className: "absolute-voice-trace-timeline__empty",
|
|
8766
9157
|
children: "Run a voice session to see call timelines."
|
|
8767
9158
|
}, undefined, false, undefined, this),
|
|
8768
|
-
model.error ? /* @__PURE__ */
|
|
9159
|
+
model.error ? /* @__PURE__ */ jsxDEV17("p", {
|
|
8769
9160
|
className: "absolute-voice-trace-timeline__error",
|
|
8770
9161
|
children: model.error
|
|
8771
9162
|
}, undefined, false, undefined, this) : null
|
|
@@ -8773,7 +9164,7 @@ var VoiceTraceTimeline = ({
|
|
|
8773
9164
|
}, undefined, true, undefined, this);
|
|
8774
9165
|
};
|
|
8775
9166
|
// src/react/useVoiceAgentSquadStatus.tsx
|
|
8776
|
-
import { useEffect as
|
|
9167
|
+
import { useEffect as useEffect18, useRef as useRef18, useSyncExternalStore as useSyncExternalStore18 } from "react";
|
|
8777
9168
|
|
|
8778
9169
|
// src/client/agentSquadStatus.ts
|
|
8779
9170
|
var getString4 = (value) => typeof value === "string" && value.trim() ? value.trim() : undefined;
|
|
@@ -8851,25 +9242,25 @@ var createVoiceAgentSquadStatusStore = (path = "/api/voice-traces", options = {}
|
|
|
8851
9242
|
|
|
8852
9243
|
// src/react/useVoiceAgentSquadStatus.tsx
|
|
8853
9244
|
var useVoiceAgentSquadStatus = (path = "/api/voice-traces", options = {}) => {
|
|
8854
|
-
const storeRef =
|
|
9245
|
+
const storeRef = useRef18(null);
|
|
8855
9246
|
if (!storeRef.current) {
|
|
8856
9247
|
storeRef.current = createVoiceAgentSquadStatusStore(path, options);
|
|
8857
9248
|
}
|
|
8858
9249
|
const store = storeRef.current;
|
|
8859
|
-
|
|
9250
|
+
useEffect18(() => {
|
|
8860
9251
|
store.refresh().catch(() => {});
|
|
8861
9252
|
return () => store.close();
|
|
8862
9253
|
}, [store]);
|
|
8863
9254
|
return {
|
|
8864
|
-
...
|
|
9255
|
+
...useSyncExternalStore18(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
8865
9256
|
refresh: store.refresh
|
|
8866
9257
|
};
|
|
8867
9258
|
};
|
|
8868
9259
|
|
|
8869
9260
|
// src/client/agentSquadStatusWidget.ts
|
|
8870
|
-
var
|
|
8871
|
-
var
|
|
8872
|
-
var
|
|
9261
|
+
var DEFAULT_TITLE17 = "Voice Agent Squad";
|
|
9262
|
+
var DEFAULT_DESCRIPTION17 = "Current specialist and recent handoffs from your self-hosted voice traces.";
|
|
9263
|
+
var escapeHtml23 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
8873
9264
|
var labelFor = (current) => {
|
|
8874
9265
|
if (!current)
|
|
8875
9266
|
return "Waiting for specialist activity";
|
|
@@ -8883,37 +9274,37 @@ var labelFor = (current) => {
|
|
|
8883
9274
|
};
|
|
8884
9275
|
var createVoiceAgentSquadStatusViewModel = (snapshot, options = {}) => ({
|
|
8885
9276
|
current: snapshot.report.current,
|
|
8886
|
-
description: options.description ??
|
|
9277
|
+
description: options.description ?? DEFAULT_DESCRIPTION17,
|
|
8887
9278
|
error: snapshot.error,
|
|
8888
9279
|
isLoading: snapshot.isLoading,
|
|
8889
9280
|
label: snapshot.error ? "Unavailable" : labelFor(snapshot.report.current),
|
|
8890
9281
|
sessionCount: snapshot.report.sessionCount,
|
|
8891
9282
|
sessions: snapshot.report.sessions,
|
|
8892
|
-
title: options.title ??
|
|
9283
|
+
title: options.title ?? DEFAULT_TITLE17,
|
|
8893
9284
|
updatedAt: snapshot.updatedAt
|
|
8894
9285
|
});
|
|
8895
9286
|
var renderVoiceAgentSquadStatusHTML = (snapshot, options = {}) => {
|
|
8896
9287
|
const model = createVoiceAgentSquadStatusViewModel(snapshot, options);
|
|
8897
9288
|
const current = model.current;
|
|
8898
9289
|
const rows = model.sessions.length ? model.sessions.slice(0, 5).map((session) => `<li>
|
|
8899
|
-
<span>${
|
|
8900
|
-
<strong>${
|
|
8901
|
-
<em>${
|
|
8902
|
-
${session.summary || session.reason ? `<p>${
|
|
9290
|
+
<span>${escapeHtml23(session.sessionId)}</span>
|
|
9291
|
+
<strong>${escapeHtml23(session.targetAgentId ?? "none")}</strong>
|
|
9292
|
+
<em>${escapeHtml23(session.status)}</em>
|
|
9293
|
+
${session.summary || session.reason ? `<p>${escapeHtml23(session.summary ?? session.reason ?? "")}</p>` : ""}
|
|
8903
9294
|
</li>`).join("") : "<li><span>No squad traces yet.</span><strong>Waiting</strong></li>";
|
|
8904
9295
|
return `<section class="absolute-voice-agent-squad-status">
|
|
8905
9296
|
<header>
|
|
8906
|
-
<span>${
|
|
8907
|
-
<strong>${
|
|
9297
|
+
<span>${escapeHtml23(model.title)}</span>
|
|
9298
|
+
<strong>${escapeHtml23(model.label)}</strong>
|
|
8908
9299
|
</header>
|
|
8909
|
-
<p>${
|
|
9300
|
+
<p>${escapeHtml23(model.description)}</p>
|
|
8910
9301
|
<div>
|
|
8911
|
-
<span>Session</span><strong>${
|
|
8912
|
-
<span>From</span><strong>${
|
|
8913
|
-
<span>Status</span><strong>${
|
|
9302
|
+
<span>Session</span><strong>${escapeHtml23(current?.sessionId ?? "n/a")}</strong>
|
|
9303
|
+
<span>From</span><strong>${escapeHtml23(current?.fromAgentId ?? "n/a")}</strong>
|
|
9304
|
+
<span>Status</span><strong>${escapeHtml23(current?.status ?? "idle")}</strong>
|
|
8914
9305
|
</div>
|
|
8915
9306
|
<ul>${rows}</ul>
|
|
8916
|
-
${model.error ? `<p class="absolute-voice-agent-squad-status__error">${
|
|
9307
|
+
${model.error ? `<p class="absolute-voice-agent-squad-status__error">${escapeHtml23(model.error)}</p>` : ""}
|
|
8917
9308
|
</section>`;
|
|
8918
9309
|
};
|
|
8919
9310
|
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}`;
|
|
@@ -8958,7 +9349,7 @@ var defineVoiceAgentSquadStatusElement = (tagName = "absolute-voice-agent-squad-
|
|
|
8958
9349
|
};
|
|
8959
9350
|
|
|
8960
9351
|
// src/react/VoiceAgentSquadStatus.tsx
|
|
8961
|
-
import { jsxDEV as
|
|
9352
|
+
import { jsxDEV as jsxDEV18 } from "react/jsx-dev-runtime";
|
|
8962
9353
|
function VoiceAgentSquadStatus({
|
|
8963
9354
|
path = "/api/voice-traces",
|
|
8964
9355
|
...options
|
|
@@ -8966,64 +9357,64 @@ function VoiceAgentSquadStatus({
|
|
|
8966
9357
|
const snapshot = useVoiceAgentSquadStatus(path, options);
|
|
8967
9358
|
const model = createVoiceAgentSquadStatusViewModel(snapshot, options);
|
|
8968
9359
|
const current = model.current;
|
|
8969
|
-
return /* @__PURE__ */
|
|
9360
|
+
return /* @__PURE__ */ jsxDEV18("section", {
|
|
8970
9361
|
className: "absolute-voice-agent-squad-status",
|
|
8971
9362
|
children: [
|
|
8972
|
-
/* @__PURE__ */
|
|
9363
|
+
/* @__PURE__ */ jsxDEV18("header", {
|
|
8973
9364
|
children: [
|
|
8974
|
-
/* @__PURE__ */
|
|
9365
|
+
/* @__PURE__ */ jsxDEV18("span", {
|
|
8975
9366
|
children: model.title
|
|
8976
9367
|
}, undefined, false, undefined, this),
|
|
8977
|
-
/* @__PURE__ */
|
|
9368
|
+
/* @__PURE__ */ jsxDEV18("strong", {
|
|
8978
9369
|
children: model.label
|
|
8979
9370
|
}, undefined, false, undefined, this)
|
|
8980
9371
|
]
|
|
8981
9372
|
}, undefined, true, undefined, this),
|
|
8982
|
-
/* @__PURE__ */
|
|
9373
|
+
/* @__PURE__ */ jsxDEV18("p", {
|
|
8983
9374
|
children: model.description
|
|
8984
9375
|
}, undefined, false, undefined, this),
|
|
8985
|
-
/* @__PURE__ */
|
|
9376
|
+
/* @__PURE__ */ jsxDEV18("dl", {
|
|
8986
9377
|
children: [
|
|
8987
|
-
/* @__PURE__ */
|
|
9378
|
+
/* @__PURE__ */ jsxDEV18("div", {
|
|
8988
9379
|
children: [
|
|
8989
|
-
/* @__PURE__ */
|
|
9380
|
+
/* @__PURE__ */ jsxDEV18("dt", {
|
|
8990
9381
|
children: "Session"
|
|
8991
9382
|
}, undefined, false, undefined, this),
|
|
8992
|
-
/* @__PURE__ */
|
|
9383
|
+
/* @__PURE__ */ jsxDEV18("dd", {
|
|
8993
9384
|
children: current?.sessionId ?? "n/a"
|
|
8994
9385
|
}, undefined, false, undefined, this)
|
|
8995
9386
|
]
|
|
8996
9387
|
}, undefined, true, undefined, this),
|
|
8997
|
-
/* @__PURE__ */
|
|
9388
|
+
/* @__PURE__ */ jsxDEV18("div", {
|
|
8998
9389
|
children: [
|
|
8999
|
-
/* @__PURE__ */
|
|
9390
|
+
/* @__PURE__ */ jsxDEV18("dt", {
|
|
9000
9391
|
children: "Current specialist"
|
|
9001
9392
|
}, undefined, false, undefined, this),
|
|
9002
|
-
/* @__PURE__ */
|
|
9393
|
+
/* @__PURE__ */ jsxDEV18("dd", {
|
|
9003
9394
|
children: current?.targetAgentId ?? "none"
|
|
9004
9395
|
}, undefined, false, undefined, this)
|
|
9005
9396
|
]
|
|
9006
9397
|
}, undefined, true, undefined, this),
|
|
9007
|
-
/* @__PURE__ */
|
|
9398
|
+
/* @__PURE__ */ jsxDEV18("div", {
|
|
9008
9399
|
children: [
|
|
9009
|
-
/* @__PURE__ */
|
|
9400
|
+
/* @__PURE__ */ jsxDEV18("dt", {
|
|
9010
9401
|
children: "Status"
|
|
9011
9402
|
}, undefined, false, undefined, this),
|
|
9012
|
-
/* @__PURE__ */
|
|
9403
|
+
/* @__PURE__ */ jsxDEV18("dd", {
|
|
9013
9404
|
children: current?.status ?? "idle"
|
|
9014
9405
|
}, undefined, false, undefined, this)
|
|
9015
9406
|
]
|
|
9016
9407
|
}, undefined, true, undefined, this)
|
|
9017
9408
|
]
|
|
9018
9409
|
}, undefined, true, undefined, this),
|
|
9019
|
-
model.error ? /* @__PURE__ */
|
|
9410
|
+
model.error ? /* @__PURE__ */ jsxDEV18("p", {
|
|
9020
9411
|
children: model.error
|
|
9021
9412
|
}, undefined, false, undefined, this) : null
|
|
9022
9413
|
]
|
|
9023
9414
|
}, undefined, true, undefined, this);
|
|
9024
9415
|
}
|
|
9025
9416
|
// src/react/useVoiceTurnLatency.tsx
|
|
9026
|
-
import { useEffect as
|
|
9417
|
+
import { useEffect as useEffect19, useRef as useRef19, useSyncExternalStore as useSyncExternalStore19 } from "react";
|
|
9027
9418
|
|
|
9028
9419
|
// src/client/turnLatency.ts
|
|
9029
9420
|
var fetchVoiceTurnLatency = async (path = "/api/turn-latency", options = {}) => {
|
|
@@ -9130,73 +9521,73 @@ var createVoiceTurnLatencyStore = (path = "/api/turn-latency", options = {}) =>
|
|
|
9130
9521
|
|
|
9131
9522
|
// src/react/useVoiceTurnLatency.tsx
|
|
9132
9523
|
var useVoiceTurnLatency = (path = "/api/turn-latency", options = {}) => {
|
|
9133
|
-
const storeRef =
|
|
9524
|
+
const storeRef = useRef19(null);
|
|
9134
9525
|
if (!storeRef.current) {
|
|
9135
9526
|
storeRef.current = createVoiceTurnLatencyStore(path, options);
|
|
9136
9527
|
}
|
|
9137
9528
|
const store = storeRef.current;
|
|
9138
|
-
|
|
9529
|
+
useEffect19(() => {
|
|
9139
9530
|
store.refresh().catch(() => {});
|
|
9140
9531
|
return () => store.close();
|
|
9141
9532
|
}, [store]);
|
|
9142
9533
|
return {
|
|
9143
|
-
...
|
|
9534
|
+
...useSyncExternalStore19(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
9144
9535
|
refresh: store.refresh,
|
|
9145
9536
|
runProof: store.runProof
|
|
9146
9537
|
};
|
|
9147
9538
|
};
|
|
9148
9539
|
|
|
9149
9540
|
// src/client/turnLatencyWidget.ts
|
|
9150
|
-
var
|
|
9151
|
-
var
|
|
9541
|
+
var DEFAULT_TITLE18 = "Turn Latency";
|
|
9542
|
+
var DEFAULT_DESCRIPTION18 = "Per-turn timing from first transcript to commit and assistant response start.";
|
|
9152
9543
|
var DEFAULT_PROOF_LABEL = "Run latency proof";
|
|
9153
|
-
var
|
|
9154
|
-
var
|
|
9544
|
+
var escapeHtml24 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
9545
|
+
var formatMs5 = (value) => typeof value === "number" ? `${Math.round(value)}ms` : "n/a";
|
|
9155
9546
|
var createVoiceTurnLatencyViewModel = (snapshot, options = {}) => {
|
|
9156
9547
|
const turns = (snapshot.report?.turns ?? []).map((turn) => ({
|
|
9157
9548
|
...turn,
|
|
9158
9549
|
label: turn.text || "Empty turn",
|
|
9159
9550
|
rows: turn.stages.map((stage) => ({
|
|
9160
9551
|
label: stage.label,
|
|
9161
|
-
value:
|
|
9552
|
+
value: formatMs5(stage.valueMs)
|
|
9162
9553
|
}))
|
|
9163
9554
|
}));
|
|
9164
9555
|
const warningCount = snapshot.report?.warnings ?? turns.filter((turn) => turn.status === "warn").length;
|
|
9165
9556
|
const failedCount = snapshot.report?.failed ?? turns.filter((turn) => turn.status === "fail").length;
|
|
9166
9557
|
return {
|
|
9167
|
-
description: options.description ??
|
|
9558
|
+
description: options.description ?? DEFAULT_DESCRIPTION18,
|
|
9168
9559
|
error: snapshot.error,
|
|
9169
9560
|
isLoading: snapshot.isLoading,
|
|
9170
|
-
label: snapshot.error ? "Unavailable" : turns.length ? failedCount > 0 ? `${failedCount} slow` : warningCount > 0 ? `${warningCount} warnings` : `avg ${
|
|
9561
|
+
label: snapshot.error ? "Unavailable" : turns.length ? failedCount > 0 ? `${failedCount} slow` : warningCount > 0 ? `${warningCount} warnings` : `avg ${formatMs5(snapshot.report?.averageTotalMs)}` : snapshot.isLoading ? "Checking" : "No turns",
|
|
9171
9562
|
proofLabel: options.proofPath ? options.proofLabel ?? DEFAULT_PROOF_LABEL : undefined,
|
|
9172
9563
|
showProofAction: Boolean(options.proofPath),
|
|
9173
9564
|
status: snapshot.error ? "error" : turns.length ? failedCount > 0 || warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
9174
|
-
title: options.title ??
|
|
9565
|
+
title: options.title ?? DEFAULT_TITLE18,
|
|
9175
9566
|
turns,
|
|
9176
9567
|
updatedAt: snapshot.updatedAt
|
|
9177
9568
|
};
|
|
9178
9569
|
};
|
|
9179
9570
|
var renderVoiceTurnLatencyHTML = (snapshot, options = {}) => {
|
|
9180
9571
|
const model = createVoiceTurnLatencyViewModel(snapshot, options);
|
|
9181
|
-
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--${
|
|
9572
|
+
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--${escapeHtml24(turn.status)}">
|
|
9182
9573
|
<header>
|
|
9183
|
-
<strong>${
|
|
9184
|
-
<span>${
|
|
9574
|
+
<strong>${escapeHtml24(turn.label)}</strong>
|
|
9575
|
+
<span>${escapeHtml24(turn.status)}</span>
|
|
9185
9576
|
</header>
|
|
9186
9577
|
<dl>${turn.rows.map((row) => `<div>
|
|
9187
|
-
<dt>${
|
|
9188
|
-
<dd>${
|
|
9578
|
+
<dt>${escapeHtml24(row.label)}</dt>
|
|
9579
|
+
<dd>${escapeHtml24(row.value)}</dd>
|
|
9189
9580
|
</div>`).join("")}</dl>
|
|
9190
9581
|
</article>`).join("")}</div>` : '<p class="absolute-voice-turn-latency__empty">Complete a voice turn to see latency diagnostics.</p>';
|
|
9191
|
-
return `<section class="absolute-voice-turn-latency absolute-voice-turn-latency--${
|
|
9582
|
+
return `<section class="absolute-voice-turn-latency absolute-voice-turn-latency--${escapeHtml24(model.status)}">
|
|
9192
9583
|
<header class="absolute-voice-turn-latency__header">
|
|
9193
|
-
<span class="absolute-voice-turn-latency__eyebrow">${
|
|
9194
|
-
<strong class="absolute-voice-turn-latency__label">${
|
|
9584
|
+
<span class="absolute-voice-turn-latency__eyebrow">${escapeHtml24(model.title)}</span>
|
|
9585
|
+
<strong class="absolute-voice-turn-latency__label">${escapeHtml24(model.label)}</strong>
|
|
9195
9586
|
</header>
|
|
9196
|
-
<p class="absolute-voice-turn-latency__description">${
|
|
9197
|
-
${model.showProofAction ? `<button class="absolute-voice-turn-latency__proof" data-absolute-voice-turn-latency-proof type="button">${
|
|
9587
|
+
<p class="absolute-voice-turn-latency__description">${escapeHtml24(model.description)}</p>
|
|
9588
|
+
${model.showProofAction ? `<button class="absolute-voice-turn-latency__proof" data-absolute-voice-turn-latency-proof type="button">${escapeHtml24(model.proofLabel ?? DEFAULT_PROOF_LABEL)}</button>` : ""}
|
|
9198
9589
|
${turns}
|
|
9199
|
-
${model.error ? `<p class="absolute-voice-turn-latency__error">${
|
|
9590
|
+
${model.error ? `<p class="absolute-voice-turn-latency__error">${escapeHtml24(model.error)}</p>` : ""}
|
|
9200
9591
|
</section>`;
|
|
9201
9592
|
};
|
|
9202
9593
|
var mountVoiceTurnLatency = (element, path = "/api/turn-latency", options = {}) => {
|
|
@@ -9247,7 +9638,7 @@ var defineVoiceTurnLatencyElement = (tagName = "absolute-voice-turn-latency") =>
|
|
|
9247
9638
|
};
|
|
9248
9639
|
|
|
9249
9640
|
// src/react/VoiceTurnLatency.tsx
|
|
9250
|
-
import { jsxDEV as
|
|
9641
|
+
import { jsxDEV as jsxDEV19 } from "react/jsx-dev-runtime";
|
|
9251
9642
|
var VoiceTurnLatency = ({
|
|
9252
9643
|
className,
|
|
9253
9644
|
path = "/api/turn-latency",
|
|
@@ -9255,31 +9646,31 @@ var VoiceTurnLatency = ({
|
|
|
9255
9646
|
}) => {
|
|
9256
9647
|
const latency = useVoiceTurnLatency(path, options);
|
|
9257
9648
|
const model = createVoiceTurnLatencyViewModel(latency, options);
|
|
9258
|
-
return /* @__PURE__ */
|
|
9649
|
+
return /* @__PURE__ */ jsxDEV19("section", {
|
|
9259
9650
|
className: [
|
|
9260
9651
|
"absolute-voice-turn-latency",
|
|
9261
9652
|
`absolute-voice-turn-latency--${model.status}`,
|
|
9262
9653
|
className
|
|
9263
9654
|
].filter(Boolean).join(" "),
|
|
9264
9655
|
children: [
|
|
9265
|
-
/* @__PURE__ */
|
|
9656
|
+
/* @__PURE__ */ jsxDEV19("header", {
|
|
9266
9657
|
className: "absolute-voice-turn-latency__header",
|
|
9267
9658
|
children: [
|
|
9268
|
-
/* @__PURE__ */
|
|
9659
|
+
/* @__PURE__ */ jsxDEV19("span", {
|
|
9269
9660
|
className: "absolute-voice-turn-latency__eyebrow",
|
|
9270
9661
|
children: model.title
|
|
9271
9662
|
}, undefined, false, undefined, this),
|
|
9272
|
-
/* @__PURE__ */
|
|
9663
|
+
/* @__PURE__ */ jsxDEV19("strong", {
|
|
9273
9664
|
className: "absolute-voice-turn-latency__label",
|
|
9274
9665
|
children: model.label
|
|
9275
9666
|
}, undefined, false, undefined, this)
|
|
9276
9667
|
]
|
|
9277
9668
|
}, undefined, true, undefined, this),
|
|
9278
|
-
/* @__PURE__ */
|
|
9669
|
+
/* @__PURE__ */ jsxDEV19("p", {
|
|
9279
9670
|
className: "absolute-voice-turn-latency__description",
|
|
9280
9671
|
children: model.description
|
|
9281
9672
|
}, undefined, false, undefined, this),
|
|
9282
|
-
model.showProofAction ? /* @__PURE__ */
|
|
9673
|
+
model.showProofAction ? /* @__PURE__ */ jsxDEV19("button", {
|
|
9283
9674
|
className: "absolute-voice-turn-latency__proof",
|
|
9284
9675
|
onClick: () => {
|
|
9285
9676
|
latency.runProof().catch(() => {});
|
|
@@ -9287,31 +9678,31 @@ var VoiceTurnLatency = ({
|
|
|
9287
9678
|
type: "button",
|
|
9288
9679
|
children: model.proofLabel
|
|
9289
9680
|
}, undefined, false, undefined, this) : null,
|
|
9290
|
-
model.turns.length ? /* @__PURE__ */
|
|
9681
|
+
model.turns.length ? /* @__PURE__ */ jsxDEV19("div", {
|
|
9291
9682
|
className: "absolute-voice-turn-latency__turns",
|
|
9292
|
-
children: model.turns.map((turn) => /* @__PURE__ */
|
|
9683
|
+
children: model.turns.map((turn) => /* @__PURE__ */ jsxDEV19("article", {
|
|
9293
9684
|
className: [
|
|
9294
9685
|
"absolute-voice-turn-latency__turn",
|
|
9295
9686
|
`absolute-voice-turn-latency__turn--${turn.status}`
|
|
9296
9687
|
].join(" "),
|
|
9297
9688
|
children: [
|
|
9298
|
-
/* @__PURE__ */
|
|
9689
|
+
/* @__PURE__ */ jsxDEV19("header", {
|
|
9299
9690
|
children: [
|
|
9300
|
-
/* @__PURE__ */
|
|
9691
|
+
/* @__PURE__ */ jsxDEV19("strong", {
|
|
9301
9692
|
children: turn.label
|
|
9302
9693
|
}, undefined, false, undefined, this),
|
|
9303
|
-
/* @__PURE__ */
|
|
9694
|
+
/* @__PURE__ */ jsxDEV19("span", {
|
|
9304
9695
|
children: turn.status
|
|
9305
9696
|
}, undefined, false, undefined, this)
|
|
9306
9697
|
]
|
|
9307
9698
|
}, undefined, true, undefined, this),
|
|
9308
|
-
/* @__PURE__ */
|
|
9309
|
-
children: turn.rows.map((row) => /* @__PURE__ */
|
|
9699
|
+
/* @__PURE__ */ jsxDEV19("dl", {
|
|
9700
|
+
children: turn.rows.map((row) => /* @__PURE__ */ jsxDEV19("div", {
|
|
9310
9701
|
children: [
|
|
9311
|
-
/* @__PURE__ */
|
|
9702
|
+
/* @__PURE__ */ jsxDEV19("dt", {
|
|
9312
9703
|
children: row.label
|
|
9313
9704
|
}, undefined, false, undefined, this),
|
|
9314
|
-
/* @__PURE__ */
|
|
9705
|
+
/* @__PURE__ */ jsxDEV19("dd", {
|
|
9315
9706
|
children: row.value
|
|
9316
9707
|
}, undefined, false, undefined, this)
|
|
9317
9708
|
]
|
|
@@ -9319,11 +9710,11 @@ var VoiceTurnLatency = ({
|
|
|
9319
9710
|
}, undefined, false, undefined, this)
|
|
9320
9711
|
]
|
|
9321
9712
|
}, `${turn.sessionId}:${turn.turnId}`, true, undefined, this))
|
|
9322
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
9713
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV19("p", {
|
|
9323
9714
|
className: "absolute-voice-turn-latency__empty",
|
|
9324
9715
|
children: "Complete a voice turn to see latency diagnostics."
|
|
9325
9716
|
}, undefined, false, undefined, this),
|
|
9326
|
-
model.error ? /* @__PURE__ */
|
|
9717
|
+
model.error ? /* @__PURE__ */ jsxDEV19("p", {
|
|
9327
9718
|
className: "absolute-voice-turn-latency__error",
|
|
9328
9719
|
children: model.error
|
|
9329
9720
|
}, undefined, false, undefined, this) : null
|
|
@@ -9331,7 +9722,7 @@ var VoiceTurnLatency = ({
|
|
|
9331
9722
|
}, undefined, true, undefined, this);
|
|
9332
9723
|
};
|
|
9333
9724
|
// src/react/useVoiceTurnQuality.tsx
|
|
9334
|
-
import { useEffect as
|
|
9725
|
+
import { useEffect as useEffect20, useRef as useRef20, useSyncExternalStore as useSyncExternalStore20 } from "react";
|
|
9335
9726
|
|
|
9336
9727
|
// src/client/turnQuality.ts
|
|
9337
9728
|
var fetchVoiceTurnQuality = async (path = "/api/turn-quality", options = {}) => {
|
|
@@ -9414,25 +9805,25 @@ var createVoiceTurnQualityStore = (path = "/api/turn-quality", options = {}) =>
|
|
|
9414
9805
|
|
|
9415
9806
|
// src/react/useVoiceTurnQuality.tsx
|
|
9416
9807
|
var useVoiceTurnQuality = (path = "/api/turn-quality", options = {}) => {
|
|
9417
|
-
const storeRef =
|
|
9808
|
+
const storeRef = useRef20(null);
|
|
9418
9809
|
if (!storeRef.current) {
|
|
9419
9810
|
storeRef.current = createVoiceTurnQualityStore(path, options);
|
|
9420
9811
|
}
|
|
9421
9812
|
const store = storeRef.current;
|
|
9422
|
-
|
|
9813
|
+
useEffect20(() => {
|
|
9423
9814
|
store.refresh().catch(() => {});
|
|
9424
9815
|
return () => store.close();
|
|
9425
9816
|
}, [store]);
|
|
9426
9817
|
return {
|
|
9427
|
-
...
|
|
9818
|
+
...useSyncExternalStore20(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
9428
9819
|
refresh: store.refresh
|
|
9429
9820
|
};
|
|
9430
9821
|
};
|
|
9431
9822
|
|
|
9432
9823
|
// src/client/turnQualityWidget.ts
|
|
9433
|
-
var
|
|
9434
|
-
var
|
|
9435
|
-
var
|
|
9824
|
+
var DEFAULT_TITLE19 = "Turn Quality";
|
|
9825
|
+
var DEFAULT_DESCRIPTION19 = "Per-turn STT confidence, fallback selection, corrections, and transcript coverage.";
|
|
9826
|
+
var escapeHtml25 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
9436
9827
|
var formatConfidence = (value) => typeof value === "number" ? `${Math.round(value * 100)}%` : "n/a";
|
|
9437
9828
|
var formatMaybe = (value) => value === undefined || value === "" ? "n/a" : String(value);
|
|
9438
9829
|
var getTurnDetail = (turn) => {
|
|
@@ -9476,37 +9867,37 @@ var createVoiceTurnQualityViewModel = (snapshot, options = {}) => {
|
|
|
9476
9867
|
const warningCount = snapshot.report?.warnings ?? turns.filter((turn) => turn.status === "warn").length;
|
|
9477
9868
|
const failedCount = snapshot.report?.failed ?? turns.filter((turn) => turn.status === "fail").length;
|
|
9478
9869
|
return {
|
|
9479
|
-
description: options.description ??
|
|
9870
|
+
description: options.description ?? DEFAULT_DESCRIPTION19,
|
|
9480
9871
|
error: snapshot.error,
|
|
9481
9872
|
isLoading: snapshot.isLoading,
|
|
9482
9873
|
label: snapshot.error ? "Unavailable" : turns.length ? failedCount > 0 ? `${failedCount} failed` : warningCount > 0 ? `${warningCount} warnings` : `${turns.length} healthy` : snapshot.isLoading ? "Checking" : "No turns",
|
|
9483
9874
|
status: snapshot.error ? "error" : turns.length ? failedCount > 0 || warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
9484
|
-
title: options.title ??
|
|
9875
|
+
title: options.title ?? DEFAULT_TITLE19,
|
|
9485
9876
|
turns,
|
|
9486
9877
|
updatedAt: snapshot.updatedAt
|
|
9487
9878
|
};
|
|
9488
9879
|
};
|
|
9489
9880
|
var renderVoiceTurnQualityHTML = (snapshot, options = {}) => {
|
|
9490
9881
|
const model = createVoiceTurnQualityViewModel(snapshot, options);
|
|
9491
|
-
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--${
|
|
9882
|
+
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--${escapeHtml25(turn.status)}">
|
|
9492
9883
|
<header>
|
|
9493
|
-
<strong>${
|
|
9494
|
-
<span>${
|
|
9884
|
+
<strong>${escapeHtml25(turn.label)}</strong>
|
|
9885
|
+
<span>${escapeHtml25(turn.status)}</span>
|
|
9495
9886
|
</header>
|
|
9496
|
-
<p>${
|
|
9887
|
+
<p>${escapeHtml25(turn.detail)}</p>
|
|
9497
9888
|
<dl>${turn.rows.map((row) => `<div>
|
|
9498
|
-
<dt>${
|
|
9499
|
-
<dd>${
|
|
9889
|
+
<dt>${escapeHtml25(row.label)}</dt>
|
|
9890
|
+
<dd>${escapeHtml25(row.value)}</dd>
|
|
9500
9891
|
</div>`).join("")}</dl>
|
|
9501
9892
|
</article>`).join("")}</div>` : '<p class="absolute-voice-turn-quality__empty">Complete a voice turn to see STT quality diagnostics.</p>';
|
|
9502
|
-
return `<section class="absolute-voice-turn-quality absolute-voice-turn-quality--${
|
|
9893
|
+
return `<section class="absolute-voice-turn-quality absolute-voice-turn-quality--${escapeHtml25(model.status)}">
|
|
9503
9894
|
<header class="absolute-voice-turn-quality__header">
|
|
9504
|
-
<span class="absolute-voice-turn-quality__eyebrow">${
|
|
9505
|
-
<strong class="absolute-voice-turn-quality__label">${
|
|
9895
|
+
<span class="absolute-voice-turn-quality__eyebrow">${escapeHtml25(model.title)}</span>
|
|
9896
|
+
<strong class="absolute-voice-turn-quality__label">${escapeHtml25(model.label)}</strong>
|
|
9506
9897
|
</header>
|
|
9507
|
-
<p class="absolute-voice-turn-quality__description">${
|
|
9898
|
+
<p class="absolute-voice-turn-quality__description">${escapeHtml25(model.description)}</p>
|
|
9508
9899
|
${turns}
|
|
9509
|
-
${model.error ? `<p class="absolute-voice-turn-quality__error">${
|
|
9900
|
+
${model.error ? `<p class="absolute-voice-turn-quality__error">${escapeHtml25(model.error)}</p>` : ""}
|
|
9510
9901
|
</section>`;
|
|
9511
9902
|
};
|
|
9512
9903
|
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}`;
|
|
@@ -9548,7 +9939,7 @@ var defineVoiceTurnQualityElement = (tagName = "absolute-voice-turn-quality") =>
|
|
|
9548
9939
|
};
|
|
9549
9940
|
|
|
9550
9941
|
// src/react/VoiceTurnQuality.tsx
|
|
9551
|
-
import { jsxDEV as
|
|
9942
|
+
import { jsxDEV as jsxDEV20 } from "react/jsx-dev-runtime";
|
|
9552
9943
|
var VoiceTurnQuality = ({
|
|
9553
9944
|
className,
|
|
9554
9945
|
path = "/api/turn-quality",
|
|
@@ -9556,58 +9947,58 @@ var VoiceTurnQuality = ({
|
|
|
9556
9947
|
}) => {
|
|
9557
9948
|
const snapshot = useVoiceTurnQuality(path, options);
|
|
9558
9949
|
const model = createVoiceTurnQualityViewModel(snapshot, options);
|
|
9559
|
-
return /* @__PURE__ */
|
|
9950
|
+
return /* @__PURE__ */ jsxDEV20("section", {
|
|
9560
9951
|
className: [
|
|
9561
9952
|
"absolute-voice-turn-quality",
|
|
9562
9953
|
`absolute-voice-turn-quality--${model.status}`,
|
|
9563
9954
|
className
|
|
9564
9955
|
].filter(Boolean).join(" "),
|
|
9565
9956
|
children: [
|
|
9566
|
-
/* @__PURE__ */
|
|
9957
|
+
/* @__PURE__ */ jsxDEV20("header", {
|
|
9567
9958
|
className: "absolute-voice-turn-quality__header",
|
|
9568
9959
|
children: [
|
|
9569
|
-
/* @__PURE__ */
|
|
9960
|
+
/* @__PURE__ */ jsxDEV20("span", {
|
|
9570
9961
|
className: "absolute-voice-turn-quality__eyebrow",
|
|
9571
9962
|
children: model.title
|
|
9572
9963
|
}, undefined, false, undefined, this),
|
|
9573
|
-
/* @__PURE__ */
|
|
9964
|
+
/* @__PURE__ */ jsxDEV20("strong", {
|
|
9574
9965
|
className: "absolute-voice-turn-quality__label",
|
|
9575
9966
|
children: model.label
|
|
9576
9967
|
}, undefined, false, undefined, this)
|
|
9577
9968
|
]
|
|
9578
9969
|
}, undefined, true, undefined, this),
|
|
9579
|
-
/* @__PURE__ */
|
|
9970
|
+
/* @__PURE__ */ jsxDEV20("p", {
|
|
9580
9971
|
className: "absolute-voice-turn-quality__description",
|
|
9581
9972
|
children: model.description
|
|
9582
9973
|
}, undefined, false, undefined, this),
|
|
9583
|
-
model.turns.length ? /* @__PURE__ */
|
|
9974
|
+
model.turns.length ? /* @__PURE__ */ jsxDEV20("div", {
|
|
9584
9975
|
className: "absolute-voice-turn-quality__turns",
|
|
9585
|
-
children: model.turns.map((turn) => /* @__PURE__ */
|
|
9976
|
+
children: model.turns.map((turn) => /* @__PURE__ */ jsxDEV20("article", {
|
|
9586
9977
|
className: [
|
|
9587
9978
|
"absolute-voice-turn-quality__turn",
|
|
9588
9979
|
`absolute-voice-turn-quality__turn--${turn.status}`
|
|
9589
9980
|
].join(" "),
|
|
9590
9981
|
children: [
|
|
9591
|
-
/* @__PURE__ */
|
|
9982
|
+
/* @__PURE__ */ jsxDEV20("header", {
|
|
9592
9983
|
children: [
|
|
9593
|
-
/* @__PURE__ */
|
|
9984
|
+
/* @__PURE__ */ jsxDEV20("strong", {
|
|
9594
9985
|
children: turn.label
|
|
9595
9986
|
}, undefined, false, undefined, this),
|
|
9596
|
-
/* @__PURE__ */
|
|
9987
|
+
/* @__PURE__ */ jsxDEV20("span", {
|
|
9597
9988
|
children: turn.status
|
|
9598
9989
|
}, undefined, false, undefined, this)
|
|
9599
9990
|
]
|
|
9600
9991
|
}, undefined, true, undefined, this),
|
|
9601
|
-
/* @__PURE__ */
|
|
9992
|
+
/* @__PURE__ */ jsxDEV20("p", {
|
|
9602
9993
|
children: turn.detail
|
|
9603
9994
|
}, undefined, false, undefined, this),
|
|
9604
|
-
/* @__PURE__ */
|
|
9605
|
-
children: turn.rows.map((row) => /* @__PURE__ */
|
|
9995
|
+
/* @__PURE__ */ jsxDEV20("dl", {
|
|
9996
|
+
children: turn.rows.map((row) => /* @__PURE__ */ jsxDEV20("div", {
|
|
9606
9997
|
children: [
|
|
9607
|
-
/* @__PURE__ */
|
|
9998
|
+
/* @__PURE__ */ jsxDEV20("dt", {
|
|
9608
9999
|
children: row.label
|
|
9609
10000
|
}, undefined, false, undefined, this),
|
|
9610
|
-
/* @__PURE__ */
|
|
10001
|
+
/* @__PURE__ */ jsxDEV20("dd", {
|
|
9611
10002
|
children: row.value
|
|
9612
10003
|
}, undefined, false, undefined, this)
|
|
9613
10004
|
]
|
|
@@ -9615,11 +10006,11 @@ var VoiceTurnQuality = ({
|
|
|
9615
10006
|
}, undefined, false, undefined, this)
|
|
9616
10007
|
]
|
|
9617
10008
|
}, `${turn.sessionId}:${turn.turnId}`, true, undefined, this))
|
|
9618
|
-
}, undefined, false, undefined, this) : /* @__PURE__ */
|
|
10009
|
+
}, undefined, false, undefined, this) : /* @__PURE__ */ jsxDEV20("p", {
|
|
9619
10010
|
className: "absolute-voice-turn-quality__empty",
|
|
9620
10011
|
children: "Complete a voice turn to see STT quality diagnostics."
|
|
9621
10012
|
}, undefined, false, undefined, this),
|
|
9622
|
-
model.error ? /* @__PURE__ */
|
|
10013
|
+
model.error ? /* @__PURE__ */ jsxDEV20("p", {
|
|
9623
10014
|
className: "absolute-voice-turn-quality__error",
|
|
9624
10015
|
children: model.error
|
|
9625
10016
|
}, undefined, false, undefined, this) : null
|
|
@@ -9627,7 +10018,7 @@ var VoiceTurnQuality = ({
|
|
|
9627
10018
|
}, undefined, true, undefined, this);
|
|
9628
10019
|
};
|
|
9629
10020
|
// src/react/useVoiceLiveOps.tsx
|
|
9630
|
-
import { useEffect as
|
|
10021
|
+
import { useEffect as useEffect21, useRef as useRef21, useSyncExternalStore as useSyncExternalStore21 } from "react";
|
|
9631
10022
|
|
|
9632
10023
|
// src/client/liveOps.ts
|
|
9633
10024
|
var postVoiceLiveOpsAction = async (input, options = {}) => {
|
|
@@ -9717,19 +10108,19 @@ var createVoiceLiveOpsStore = (options = {}) => {
|
|
|
9717
10108
|
|
|
9718
10109
|
// src/react/useVoiceLiveOps.tsx
|
|
9719
10110
|
var useVoiceLiveOps = (options = {}) => {
|
|
9720
|
-
const storeRef =
|
|
10111
|
+
const storeRef = useRef21(null);
|
|
9721
10112
|
if (!storeRef.current) {
|
|
9722
10113
|
storeRef.current = createVoiceLiveOpsStore(options);
|
|
9723
10114
|
}
|
|
9724
10115
|
const store = storeRef.current;
|
|
9725
|
-
|
|
10116
|
+
useEffect21(() => () => store.close(), [store]);
|
|
9726
10117
|
return {
|
|
9727
|
-
...
|
|
10118
|
+
...useSyncExternalStore21(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
9728
10119
|
run: store.run
|
|
9729
10120
|
};
|
|
9730
10121
|
};
|
|
9731
10122
|
// src/react/useVoiceCampaignDialerProof.tsx
|
|
9732
|
-
import { useEffect as
|
|
10123
|
+
import { useEffect as useEffect22, useRef as useRef22, useSyncExternalStore as useSyncExternalStore22 } from "react";
|
|
9733
10124
|
|
|
9734
10125
|
// src/client/campaignDialerProof.ts
|
|
9735
10126
|
var fetchVoiceCampaignDialerProofStatus = async (path = "/api/voice/campaigns/dialer-proof", options = {}) => {
|
|
@@ -9851,23 +10242,23 @@ var createVoiceCampaignDialerProofStore = (path = "/api/voice/campaigns/dialer-p
|
|
|
9851
10242
|
|
|
9852
10243
|
// src/react/useVoiceCampaignDialerProof.tsx
|
|
9853
10244
|
var useVoiceCampaignDialerProof = (path = "/api/voice/campaigns/dialer-proof", options = {}) => {
|
|
9854
|
-
const storeRef =
|
|
10245
|
+
const storeRef = useRef22(null);
|
|
9855
10246
|
if (!storeRef.current) {
|
|
9856
10247
|
storeRef.current = createVoiceCampaignDialerProofStore(path, options);
|
|
9857
10248
|
}
|
|
9858
10249
|
const store = storeRef.current;
|
|
9859
|
-
|
|
10250
|
+
useEffect22(() => {
|
|
9860
10251
|
store.refresh().catch(() => {});
|
|
9861
10252
|
return () => store.close();
|
|
9862
10253
|
}, [store]);
|
|
9863
10254
|
return {
|
|
9864
|
-
...
|
|
10255
|
+
...useSyncExternalStore22(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
9865
10256
|
refresh: store.refresh,
|
|
9866
10257
|
runProof: store.runProof
|
|
9867
10258
|
};
|
|
9868
10259
|
};
|
|
9869
10260
|
// src/react/useVoiceStream.tsx
|
|
9870
|
-
import { useEffect as
|
|
10261
|
+
import { useEffect as useEffect23, useRef as useRef23, useSyncExternalStore as useSyncExternalStore23 } from "react";
|
|
9871
10262
|
|
|
9872
10263
|
// src/client/actions.ts
|
|
9873
10264
|
var normalizeErrorMessage = (value) => {
|
|
@@ -11288,13 +11679,13 @@ var EMPTY_SNAPSHOT = {
|
|
|
11288
11679
|
turns: []
|
|
11289
11680
|
};
|
|
11290
11681
|
var useVoiceStream = (path, options = {}) => {
|
|
11291
|
-
const streamRef =
|
|
11682
|
+
const streamRef = useRef23(null);
|
|
11292
11683
|
if (!streamRef.current) {
|
|
11293
11684
|
streamRef.current = createVoiceStream(path, options);
|
|
11294
11685
|
}
|
|
11295
11686
|
const stream = streamRef.current;
|
|
11296
|
-
|
|
11297
|
-
const snapshot =
|
|
11687
|
+
useEffect23(() => () => stream.close(), [stream]);
|
|
11688
|
+
const snapshot = useSyncExternalStore23(stream.subscribe, stream.getSnapshot, stream.getServerSnapshot) ?? EMPTY_SNAPSHOT;
|
|
11298
11689
|
return {
|
|
11299
11690
|
...snapshot,
|
|
11300
11691
|
callControl: (message) => stream.callControl(message),
|
|
@@ -11305,7 +11696,7 @@ var useVoiceStream = (path, options = {}) => {
|
|
|
11305
11696
|
};
|
|
11306
11697
|
};
|
|
11307
11698
|
// src/react/useVoiceController.tsx
|
|
11308
|
-
import { useEffect as
|
|
11699
|
+
import { useEffect as useEffect24, useRef as useRef24, useSyncExternalStore as useSyncExternalStore24 } from "react";
|
|
11309
11700
|
|
|
11310
11701
|
// src/client/htmx.ts
|
|
11311
11702
|
var DEFAULT_EVENT_NAME = "voice-refresh";
|
|
@@ -11974,13 +12365,13 @@ var EMPTY_SNAPSHOT2 = {
|
|
|
11974
12365
|
turns: []
|
|
11975
12366
|
};
|
|
11976
12367
|
var useVoiceController = (path, options = {}) => {
|
|
11977
|
-
const controllerRef =
|
|
12368
|
+
const controllerRef = useRef24(null);
|
|
11978
12369
|
if (!controllerRef.current) {
|
|
11979
12370
|
controllerRef.current = createVoiceController(path, options);
|
|
11980
12371
|
}
|
|
11981
12372
|
const controller = controllerRef.current;
|
|
11982
|
-
|
|
11983
|
-
const snapshot =
|
|
12373
|
+
useEffect24(() => () => controller.close(), [controller]);
|
|
12374
|
+
const snapshot = useSyncExternalStore24(controller.subscribe, controller.getSnapshot, controller.getServerSnapshot) ?? EMPTY_SNAPSHOT2;
|
|
11984
12375
|
return {
|
|
11985
12376
|
...snapshot,
|
|
11986
12377
|
bindHTMX: controller.bindHTMX,
|
|
@@ -11995,7 +12386,7 @@ var useVoiceController = (path, options = {}) => {
|
|
|
11995
12386
|
};
|
|
11996
12387
|
};
|
|
11997
12388
|
// src/react/useVoiceWorkflowStatus.tsx
|
|
11998
|
-
import { useEffect as
|
|
12389
|
+
import { useEffect as useEffect25, useRef as useRef25, useSyncExternalStore as useSyncExternalStore25 } from "react";
|
|
11999
12390
|
|
|
12000
12391
|
// src/client/workflowStatus.ts
|
|
12001
12392
|
var fetchVoiceWorkflowStatus = async (path = "/evals/scenarios/json", options = {}) => {
|
|
@@ -12078,17 +12469,17 @@ var createVoiceWorkflowStatusStore = (path = "/evals/scenarios/json", options =
|
|
|
12078
12469
|
|
|
12079
12470
|
// src/react/useVoiceWorkflowStatus.tsx
|
|
12080
12471
|
var useVoiceWorkflowStatus = (path = "/evals/scenarios/json", options = {}) => {
|
|
12081
|
-
const storeRef =
|
|
12472
|
+
const storeRef = useRef25(null);
|
|
12082
12473
|
if (!storeRef.current) {
|
|
12083
12474
|
storeRef.current = createVoiceWorkflowStatusStore(path, options);
|
|
12084
12475
|
}
|
|
12085
12476
|
const store = storeRef.current;
|
|
12086
|
-
|
|
12477
|
+
useEffect25(() => {
|
|
12087
12478
|
store.refresh().catch(() => {});
|
|
12088
12479
|
return () => store.close();
|
|
12089
12480
|
}, [store]);
|
|
12090
12481
|
return {
|
|
12091
|
-
...
|
|
12482
|
+
...useSyncExternalStore25(store.subscribe, store.getSnapshot, store.getServerSnapshot),
|
|
12092
12483
|
refresh: store.refresh
|
|
12093
12484
|
};
|
|
12094
12485
|
};
|
|
@@ -12100,6 +12491,7 @@ export {
|
|
|
12100
12491
|
useVoiceStream,
|
|
12101
12492
|
useVoiceSessionSnapshot,
|
|
12102
12493
|
useVoiceRoutingStatus,
|
|
12494
|
+
useVoiceReconnectProfileEvidence,
|
|
12103
12495
|
useVoiceReadinessFailures,
|
|
12104
12496
|
useVoiceProviderStatus,
|
|
12105
12497
|
useVoiceProviderSimulationControls,
|
|
@@ -12122,6 +12514,7 @@ export {
|
|
|
12122
12514
|
VoiceTraceTimeline,
|
|
12123
12515
|
VoiceSessionSnapshot,
|
|
12124
12516
|
VoiceRoutingStatus,
|
|
12517
|
+
VoiceReconnectProfileEvidence,
|
|
12125
12518
|
VoiceReadinessFailures,
|
|
12126
12519
|
VoiceProviderStatus,
|
|
12127
12520
|
VoiceProviderSimulationControls,
|