@absolutejs/voice 0.0.22-beta.290 → 0.0.22-beta.291
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 +303 -181
- package/dist/angular/voice-readiness-failures.service.d.ts +13 -0
- package/dist/client/index.d.ts +4 -0
- package/dist/client/index.js +367 -183
- package/dist/client/readinessFailures.d.ts +19 -0
- package/dist/client/readinessFailuresWidget.d.ts +42 -0
- package/dist/index.d.ts +1 -1
- package/dist/react/VoiceReadinessFailures.d.ts +6 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +635 -345
- package/dist/react/useVoiceReadinessFailures.d.ts +8 -0
- package/dist/svelte/createVoiceReadinessFailures.d.ts +7 -0
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +86 -0
- package/dist/vue/VoiceReadinessFailures.d.ts +21 -0
- package/dist/vue/index.d.ts +2 -0
- package/dist/vue/index.js +540 -262
- package/dist/vue/useVoiceReadinessFailures.d.ts +755 -0
- package/package.json +1 -1
package/dist/vue/index.js
CHANGED
|
@@ -1869,8 +1869,284 @@ var VoiceProofTrends = defineComponent5({
|
|
|
1869
1869
|
};
|
|
1870
1870
|
}
|
|
1871
1871
|
});
|
|
1872
|
+
// src/vue/VoiceReadinessFailures.ts
|
|
1873
|
+
import { defineComponent as defineComponent6, h as h6 } from "vue";
|
|
1874
|
+
|
|
1875
|
+
// src/client/readinessFailures.ts
|
|
1876
|
+
var fetchVoiceReadinessFailures = async (path = "/api/production-readiness", options = {}) => {
|
|
1877
|
+
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
1878
|
+
const response = await fetchImpl(path);
|
|
1879
|
+
if (!response.ok) {
|
|
1880
|
+
throw new Error(`Voice readiness failed: HTTP ${response.status}`);
|
|
1881
|
+
}
|
|
1882
|
+
return await response.json();
|
|
1883
|
+
};
|
|
1884
|
+
var createVoiceReadinessFailuresStore = (path = "/api/production-readiness", options = {}) => {
|
|
1885
|
+
const listeners = new Set;
|
|
1886
|
+
let closed = false;
|
|
1887
|
+
let timer;
|
|
1888
|
+
let snapshot = {
|
|
1889
|
+
error: null,
|
|
1890
|
+
isLoading: false
|
|
1891
|
+
};
|
|
1892
|
+
const emit = () => {
|
|
1893
|
+
for (const listener of listeners) {
|
|
1894
|
+
listener();
|
|
1895
|
+
}
|
|
1896
|
+
};
|
|
1897
|
+
const refresh = async () => {
|
|
1898
|
+
if (closed) {
|
|
1899
|
+
return snapshot.report;
|
|
1900
|
+
}
|
|
1901
|
+
snapshot = { ...snapshot, error: null, isLoading: true };
|
|
1902
|
+
emit();
|
|
1903
|
+
try {
|
|
1904
|
+
const report = await fetchVoiceReadinessFailures(path, options);
|
|
1905
|
+
snapshot = {
|
|
1906
|
+
error: null,
|
|
1907
|
+
isLoading: false,
|
|
1908
|
+
report,
|
|
1909
|
+
updatedAt: Date.now()
|
|
1910
|
+
};
|
|
1911
|
+
emit();
|
|
1912
|
+
return report;
|
|
1913
|
+
} catch (error) {
|
|
1914
|
+
snapshot = {
|
|
1915
|
+
...snapshot,
|
|
1916
|
+
error: error instanceof Error ? error.message : String(error),
|
|
1917
|
+
isLoading: false
|
|
1918
|
+
};
|
|
1919
|
+
emit();
|
|
1920
|
+
throw error;
|
|
1921
|
+
}
|
|
1922
|
+
};
|
|
1923
|
+
const close = () => {
|
|
1924
|
+
closed = true;
|
|
1925
|
+
if (timer) {
|
|
1926
|
+
clearInterval(timer);
|
|
1927
|
+
timer = undefined;
|
|
1928
|
+
}
|
|
1929
|
+
listeners.clear();
|
|
1930
|
+
};
|
|
1931
|
+
if (typeof window !== "undefined" && options.intervalMs && options.intervalMs > 0) {
|
|
1932
|
+
timer = setInterval(() => {
|
|
1933
|
+
refresh().catch(() => {});
|
|
1934
|
+
}, options.intervalMs);
|
|
1935
|
+
}
|
|
1936
|
+
return {
|
|
1937
|
+
close,
|
|
1938
|
+
getServerSnapshot: () => snapshot,
|
|
1939
|
+
getSnapshot: () => snapshot,
|
|
1940
|
+
refresh,
|
|
1941
|
+
subscribe: (listener) => {
|
|
1942
|
+
listeners.add(listener);
|
|
1943
|
+
return () => {
|
|
1944
|
+
listeners.delete(listener);
|
|
1945
|
+
};
|
|
1946
|
+
}
|
|
1947
|
+
};
|
|
1948
|
+
};
|
|
1949
|
+
|
|
1950
|
+
// src/client/readinessFailuresWidget.ts
|
|
1951
|
+
var DEFAULT_TITLE6 = "Readiness Gate Explanations";
|
|
1952
|
+
var DEFAULT_DESCRIPTION6 = "Structured reasons for calibrated production-readiness warnings and failures.";
|
|
1953
|
+
var DEFAULT_LINKS3 = [
|
|
1954
|
+
{ href: "/production-readiness", label: "Readiness page" },
|
|
1955
|
+
{ href: "/voice/slo-readiness-thresholds", label: "Gate thresholds" }
|
|
1956
|
+
];
|
|
1957
|
+
var escapeHtml6 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
1958
|
+
var formatExplanationValue = (value, unit) => {
|
|
1959
|
+
if (value === undefined || value === null) {
|
|
1960
|
+
return "n/a";
|
|
1961
|
+
}
|
|
1962
|
+
const suffix = unit && unit !== "status" ? ` ${unit}` : "";
|
|
1963
|
+
return `${String(value)}${suffix}`;
|
|
1964
|
+
};
|
|
1965
|
+
var toFailureView = (check) => {
|
|
1966
|
+
const explanation = check.gateExplanation;
|
|
1967
|
+
if (!explanation || check.status === "pass") {
|
|
1968
|
+
return;
|
|
1969
|
+
}
|
|
1970
|
+
return {
|
|
1971
|
+
evidenceHref: explanation.evidenceHref ?? check.href,
|
|
1972
|
+
label: check.label,
|
|
1973
|
+
observed: formatExplanationValue(explanation.observed, explanation.unit),
|
|
1974
|
+
remediation: explanation.remediation,
|
|
1975
|
+
sourceHref: explanation.sourceHref,
|
|
1976
|
+
status: check.status,
|
|
1977
|
+
threshold: formatExplanationValue(explanation.threshold, explanation.unit),
|
|
1978
|
+
thresholdLabel: explanation.thresholdLabel ?? "Readiness threshold"
|
|
1979
|
+
};
|
|
1980
|
+
};
|
|
1981
|
+
var createVoiceReadinessFailuresViewModel = (snapshot, options = {}) => {
|
|
1982
|
+
const failures = snapshot.report?.checks.map(toFailureView).filter((value) => !!value) ?? [];
|
|
1983
|
+
const hasOpenIssues = failures.length > 0;
|
|
1984
|
+
return {
|
|
1985
|
+
description: options.description ?? DEFAULT_DESCRIPTION6,
|
|
1986
|
+
error: snapshot.error,
|
|
1987
|
+
failures,
|
|
1988
|
+
isLoading: snapshot.isLoading,
|
|
1989
|
+
label: snapshot.error ? "Unavailable" : snapshot.report ? hasOpenIssues ? `${failures.length} calibrated gate issue(s)` : "No calibrated gate issues" : snapshot.isLoading ? "Checking" : "No readiness report",
|
|
1990
|
+
links: options.links ?? DEFAULT_LINKS3,
|
|
1991
|
+
status: snapshot.error ? "error" : snapshot.report ? hasOpenIssues ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
1992
|
+
title: options.title ?? DEFAULT_TITLE6,
|
|
1993
|
+
updatedAt: snapshot.updatedAt
|
|
1994
|
+
};
|
|
1995
|
+
};
|
|
1996
|
+
var renderVoiceReadinessFailuresHTML = (snapshot, options = {}) => {
|
|
1997
|
+
const model = createVoiceReadinessFailuresViewModel(snapshot, options);
|
|
1998
|
+
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--${escapeHtml6(failure.status)}">
|
|
1999
|
+
<span>${escapeHtml6(failure.status.toUpperCase())}</span>
|
|
2000
|
+
<strong>${escapeHtml6(failure.label)}</strong>
|
|
2001
|
+
<p>Observed ${escapeHtml6(failure.observed)} against ${escapeHtml6(failure.thresholdLabel)} ${escapeHtml6(failure.threshold)}.</p>
|
|
2002
|
+
<p>${escapeHtml6(failure.remediation)}</p>
|
|
2003
|
+
<p class="absolute-voice-readiness-failures__links">${failure.evidenceHref ? `<a href="${escapeHtml6(failure.evidenceHref)}">Evidence</a>` : ""}${failure.sourceHref ? `<a href="${escapeHtml6(failure.sourceHref)}">Threshold source</a>` : ""}</p>
|
|
2004
|
+
</article>`).join("")}</div>` : `<p class="absolute-voice-readiness-failures__empty">${model.error ? escapeHtml6(model.error) : "No calibrated readiness gate explanations are open."}</p>`;
|
|
2005
|
+
const links = model.links.length ? `<p class="absolute-voice-readiness-failures__links">${model.links.map((link) => `<a href="${escapeHtml6(link.href)}">${escapeHtml6(link.label)}</a>`).join("")}</p>` : "";
|
|
2006
|
+
return `<section class="absolute-voice-readiness-failures absolute-voice-readiness-failures--${escapeHtml6(model.status)}">
|
|
2007
|
+
<header class="absolute-voice-readiness-failures__header">
|
|
2008
|
+
<span class="absolute-voice-readiness-failures__eyebrow">${escapeHtml6(model.title)}</span>
|
|
2009
|
+
<strong class="absolute-voice-readiness-failures__label">${escapeHtml6(model.label)}</strong>
|
|
2010
|
+
</header>
|
|
2011
|
+
<p class="absolute-voice-readiness-failures__description">${escapeHtml6(model.description)}</p>
|
|
2012
|
+
${failures}
|
|
2013
|
+
${links}
|
|
2014
|
+
${model.error ? `<p class="absolute-voice-readiness-failures__error">${escapeHtml6(model.error)}</p>` : ""}
|
|
2015
|
+
</section>`;
|
|
2016
|
+
};
|
|
2017
|
+
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}`;
|
|
2018
|
+
var mountVoiceReadinessFailures = (element, path = "/api/production-readiness", options = {}) => {
|
|
2019
|
+
const store = createVoiceReadinessFailuresStore(path, options);
|
|
2020
|
+
const render = () => {
|
|
2021
|
+
element.innerHTML = renderVoiceReadinessFailuresHTML(store.getSnapshot(), options);
|
|
2022
|
+
};
|
|
2023
|
+
const unsubscribe = store.subscribe(render);
|
|
2024
|
+
render();
|
|
2025
|
+
store.refresh().catch(() => {});
|
|
2026
|
+
return {
|
|
2027
|
+
close: () => {
|
|
2028
|
+
unsubscribe();
|
|
2029
|
+
store.close();
|
|
2030
|
+
},
|
|
2031
|
+
refresh: store.refresh
|
|
2032
|
+
};
|
|
2033
|
+
};
|
|
2034
|
+
var defineVoiceReadinessFailuresElement = (tagName = "absolute-voice-readiness-failures") => {
|
|
2035
|
+
if (typeof window === "undefined" || typeof customElements === "undefined" || customElements.get(tagName)) {
|
|
2036
|
+
return;
|
|
2037
|
+
}
|
|
2038
|
+
customElements.define(tagName, class AbsoluteVoiceReadinessFailuresElement extends HTMLElement {
|
|
2039
|
+
mounted;
|
|
2040
|
+
connectedCallback() {
|
|
2041
|
+
this.mounted = mountVoiceReadinessFailures(this, this.getAttribute("path") ?? "/api/production-readiness", {
|
|
2042
|
+
description: this.getAttribute("description") ?? undefined,
|
|
2043
|
+
intervalMs: Number(this.getAttribute("interval-ms") ?? 0) || undefined,
|
|
2044
|
+
title: this.getAttribute("title") ?? undefined
|
|
2045
|
+
});
|
|
2046
|
+
}
|
|
2047
|
+
disconnectedCallback() {
|
|
2048
|
+
this.mounted?.close();
|
|
2049
|
+
this.mounted = undefined;
|
|
2050
|
+
}
|
|
2051
|
+
});
|
|
2052
|
+
};
|
|
2053
|
+
|
|
2054
|
+
// src/vue/useVoiceReadinessFailures.ts
|
|
2055
|
+
import { onBeforeUnmount, readonly, ref as ref6 } from "vue";
|
|
2056
|
+
var useVoiceReadinessFailures = (path = "/api/production-readiness", options = {}) => {
|
|
2057
|
+
const store = createVoiceReadinessFailuresStore(path, options);
|
|
2058
|
+
const error = ref6(null);
|
|
2059
|
+
const isLoading = ref6(false);
|
|
2060
|
+
const report = ref6(undefined);
|
|
2061
|
+
const updatedAt = ref6(undefined);
|
|
2062
|
+
const sync = () => {
|
|
2063
|
+
const snapshot = store.getSnapshot();
|
|
2064
|
+
error.value = snapshot.error;
|
|
2065
|
+
isLoading.value = snapshot.isLoading;
|
|
2066
|
+
report.value = snapshot.report;
|
|
2067
|
+
updatedAt.value = snapshot.updatedAt;
|
|
2068
|
+
};
|
|
2069
|
+
const unsubscribe = store.subscribe(sync);
|
|
2070
|
+
sync();
|
|
2071
|
+
if (typeof window !== "undefined") {
|
|
2072
|
+
store.refresh().catch(() => {});
|
|
2073
|
+
}
|
|
2074
|
+
onBeforeUnmount(() => {
|
|
2075
|
+
unsubscribe();
|
|
2076
|
+
store.close();
|
|
2077
|
+
});
|
|
2078
|
+
return {
|
|
2079
|
+
error: readonly(error),
|
|
2080
|
+
isLoading: readonly(isLoading),
|
|
2081
|
+
refresh: store.refresh,
|
|
2082
|
+
report: readonly(report),
|
|
2083
|
+
updatedAt: readonly(updatedAt)
|
|
2084
|
+
};
|
|
2085
|
+
};
|
|
2086
|
+
|
|
2087
|
+
// src/vue/VoiceReadinessFailures.ts
|
|
2088
|
+
var VoiceReadinessFailures = defineComponent6({
|
|
2089
|
+
name: "VoiceReadinessFailures",
|
|
2090
|
+
props: {
|
|
2091
|
+
description: String,
|
|
2092
|
+
intervalMs: Number,
|
|
2093
|
+
path: {
|
|
2094
|
+
default: "/api/production-readiness",
|
|
2095
|
+
type: String
|
|
2096
|
+
},
|
|
2097
|
+
title: String
|
|
2098
|
+
},
|
|
2099
|
+
setup(props) {
|
|
2100
|
+
const state = useVoiceReadinessFailures(props.path, {
|
|
2101
|
+
description: props.description,
|
|
2102
|
+
intervalMs: props.intervalMs,
|
|
2103
|
+
title: props.title
|
|
2104
|
+
});
|
|
2105
|
+
return () => {
|
|
2106
|
+
const model = createVoiceReadinessFailuresViewModel({
|
|
2107
|
+
error: state.error.value,
|
|
2108
|
+
isLoading: state.isLoading.value,
|
|
2109
|
+
report: state.report.value,
|
|
2110
|
+
updatedAt: state.updatedAt.value
|
|
2111
|
+
}, {
|
|
2112
|
+
description: props.description,
|
|
2113
|
+
intervalMs: props.intervalMs,
|
|
2114
|
+
title: props.title
|
|
2115
|
+
});
|
|
2116
|
+
return h6("section", {
|
|
2117
|
+
class: [
|
|
2118
|
+
"absolute-voice-readiness-failures",
|
|
2119
|
+
`absolute-voice-readiness-failures--${model.status}`
|
|
2120
|
+
]
|
|
2121
|
+
}, [
|
|
2122
|
+
h6("header", { class: "absolute-voice-readiness-failures__header" }, [
|
|
2123
|
+
h6("span", { class: "absolute-voice-readiness-failures__eyebrow" }, model.title),
|
|
2124
|
+
h6("strong", { class: "absolute-voice-readiness-failures__label" }, model.label)
|
|
2125
|
+
]),
|
|
2126
|
+
h6("p", { class: "absolute-voice-readiness-failures__description" }, model.description),
|
|
2127
|
+
model.failures.length ? h6("div", { class: "absolute-voice-readiness-failures__items" }, model.failures.map((failure) => h6("article", {
|
|
2128
|
+
class: [
|
|
2129
|
+
"absolute-voice-readiness-failures__item",
|
|
2130
|
+
`absolute-voice-readiness-failures__item--${failure.status}`
|
|
2131
|
+
],
|
|
2132
|
+
key: failure.label
|
|
2133
|
+
}, [
|
|
2134
|
+
h6("span", failure.status.toUpperCase()),
|
|
2135
|
+
h6("strong", failure.label),
|
|
2136
|
+
h6("p", `Observed ${failure.observed} against ${failure.thresholdLabel} ${failure.threshold}.`),
|
|
2137
|
+
h6("p", failure.remediation),
|
|
2138
|
+
h6("p", { class: "absolute-voice-readiness-failures__links" }, [
|
|
2139
|
+
failure.evidenceHref ? h6("a", { href: failure.evidenceHref }, "Evidence") : null,
|
|
2140
|
+
failure.sourceHref ? h6("a", { href: failure.sourceHref }, "Threshold source") : null
|
|
2141
|
+
])
|
|
2142
|
+
]))) : h6("p", { class: "absolute-voice-readiness-failures__empty" }, model.error ?? "No calibrated readiness gate explanations are open."),
|
|
2143
|
+
model.links.length ? h6("p", { class: "absolute-voice-readiness-failures__links" }, model.links.map((link) => h6("a", { href: link.href, key: link.href }, link.label))) : null
|
|
2144
|
+
]);
|
|
2145
|
+
};
|
|
2146
|
+
}
|
|
2147
|
+
});
|
|
1872
2148
|
// src/vue/VoiceProviderSimulationControls.ts
|
|
1873
|
-
import { computed, defineComponent as
|
|
2149
|
+
import { computed, defineComponent as defineComponent7, h as h7 } from "vue";
|
|
1874
2150
|
|
|
1875
2151
|
// src/client/providerSimulationControls.ts
|
|
1876
2152
|
var postSimulation = async (pathPrefix, mode, provider, fetchImpl) => {
|
|
@@ -1952,7 +2228,7 @@ var createVoiceProviderSimulationControlsStore = (options) => {
|
|
|
1952
2228
|
};
|
|
1953
2229
|
|
|
1954
2230
|
// src/client/providerSimulationControlsWidget.ts
|
|
1955
|
-
var
|
|
2231
|
+
var escapeHtml7 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
1956
2232
|
var formatKind = (kind) => (kind ?? "stt").toUpperCase();
|
|
1957
2233
|
var createVoiceProviderSimulationControlsViewModel = (snapshot, options) => {
|
|
1958
2234
|
const configuredProviders = options.providers.filter((provider) => provider.configured !== false);
|
|
@@ -1972,18 +2248,18 @@ var createVoiceProviderSimulationControlsViewModel = (snapshot, options) => {
|
|
|
1972
2248
|
};
|
|
1973
2249
|
var renderVoiceProviderSimulationControlsHTML = (snapshot, options) => {
|
|
1974
2250
|
const model = createVoiceProviderSimulationControlsViewModel(snapshot, options);
|
|
1975
|
-
const failureButtons = model.failureProviders.map((provider) => `<button type="button" data-voice-provider-fail="${
|
|
1976
|
-
const recoveryButtons = model.providers.map((provider) => `<button type="button" data-voice-provider-recover="${
|
|
2251
|
+
const failureButtons = model.failureProviders.map((provider) => `<button type="button" data-voice-provider-fail="${escapeHtml7(provider.provider)}"${!model.canSimulateFailure || snapshot.isRunning ? " disabled" : ""}>Simulate ${escapeHtml7(provider.provider)} ${escapeHtml7(formatKind(options.kind))} failure</button>`).join("");
|
|
2252
|
+
const recoveryButtons = model.providers.map((provider) => `<button type="button" data-voice-provider-recover="${escapeHtml7(provider.provider)}"${snapshot.isRunning ? " disabled" : ""}>Mark ${escapeHtml7(provider.provider)} recovered</button>`).join("");
|
|
1977
2253
|
return `<section class="absolute-voice-provider-simulation absolute-voice-provider-simulation--${snapshot.error ? "error" : snapshot.isRunning ? "running" : "ready"}">
|
|
1978
2254
|
<header class="absolute-voice-provider-simulation__header">
|
|
1979
|
-
<span class="absolute-voice-provider-simulation__eyebrow">${
|
|
1980
|
-
<strong class="absolute-voice-provider-simulation__label">${
|
|
2255
|
+
<span class="absolute-voice-provider-simulation__eyebrow">${escapeHtml7(model.title)}</span>
|
|
2256
|
+
<strong class="absolute-voice-provider-simulation__label">${escapeHtml7(model.label)}</strong>
|
|
1981
2257
|
</header>
|
|
1982
|
-
<p class="absolute-voice-provider-simulation__description">${
|
|
1983
|
-
${model.canSimulateFailure ? "" : `<p class="absolute-voice-provider-simulation__empty">${
|
|
2258
|
+
<p class="absolute-voice-provider-simulation__description">${escapeHtml7(model.description)}</p>
|
|
2259
|
+
${model.canSimulateFailure ? "" : `<p class="absolute-voice-provider-simulation__empty">${escapeHtml7(options.fallbackRequiredMessage ?? "Configure fallback providers before simulating failure.")}</p>`}
|
|
1984
2260
|
<div class="absolute-voice-provider-simulation__actions">${failureButtons}${recoveryButtons}</div>
|
|
1985
|
-
${snapshot.error ? `<p class="absolute-voice-provider-simulation__error">${
|
|
1986
|
-
${model.resultText ? `<pre class="absolute-voice-provider-simulation__result">${
|
|
2261
|
+
${snapshot.error ? `<p class="absolute-voice-provider-simulation__error">${escapeHtml7(snapshot.error)}</p>` : ""}
|
|
2262
|
+
${model.resultText ? `<pre class="absolute-voice-provider-simulation__result">${escapeHtml7(model.resultText)}</pre>` : ""}
|
|
1987
2263
|
</section>`;
|
|
1988
2264
|
};
|
|
1989
2265
|
var bindVoiceProviderSimulationControls = (element, store) => {
|
|
@@ -2049,15 +2325,15 @@ var defineVoiceProviderSimulationControlsElement = (tagName = "absolute-voice-pr
|
|
|
2049
2325
|
};
|
|
2050
2326
|
|
|
2051
2327
|
// src/vue/useVoiceProviderSimulationControls.ts
|
|
2052
|
-
import { onUnmounted as onUnmounted6, ref as
|
|
2328
|
+
import { onUnmounted as onUnmounted6, ref as ref7 } from "vue";
|
|
2053
2329
|
function useVoiceProviderSimulationControls(options) {
|
|
2054
2330
|
const store = createVoiceProviderSimulationControlsStore(options);
|
|
2055
|
-
const error =
|
|
2056
|
-
const isRunning =
|
|
2057
|
-
const lastResult =
|
|
2058
|
-
const mode =
|
|
2059
|
-
const provider =
|
|
2060
|
-
const updatedAt =
|
|
2331
|
+
const error = ref7(null);
|
|
2332
|
+
const isRunning = ref7(false);
|
|
2333
|
+
const lastResult = ref7(null);
|
|
2334
|
+
const mode = ref7(null);
|
|
2335
|
+
const provider = ref7(null);
|
|
2336
|
+
const updatedAt = ref7(undefined);
|
|
2061
2337
|
const sync = () => {
|
|
2062
2338
|
const snapshot = store.getSnapshot();
|
|
2063
2339
|
error.value = snapshot.error;
|
|
@@ -2085,7 +2361,7 @@ function useVoiceProviderSimulationControls(options) {
|
|
|
2085
2361
|
}
|
|
2086
2362
|
|
|
2087
2363
|
// src/vue/VoiceProviderSimulationControls.ts
|
|
2088
|
-
var VoiceProviderSimulationControls =
|
|
2364
|
+
var VoiceProviderSimulationControls = defineComponent7({
|
|
2089
2365
|
name: "VoiceProviderSimulationControls",
|
|
2090
2366
|
props: {
|
|
2091
2367
|
class: { default: "", type: String },
|
|
@@ -2127,40 +2403,40 @@ var VoiceProviderSimulationControls = defineComponent6({
|
|
|
2127
2403
|
const run = (provider, mode) => {
|
|
2128
2404
|
controls.run(provider, mode).catch(() => {});
|
|
2129
2405
|
};
|
|
2130
|
-
return () =>
|
|
2406
|
+
return () => h7("section", {
|
|
2131
2407
|
class: [
|
|
2132
2408
|
"absolute-voice-provider-simulation",
|
|
2133
2409
|
`absolute-voice-provider-simulation--${controls.error.value ? "error" : controls.isRunning.value ? "running" : "ready"}`,
|
|
2134
2410
|
props.class
|
|
2135
2411
|
]
|
|
2136
2412
|
}, [
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2413
|
+
h7("header", { class: "absolute-voice-provider-simulation__header" }, [
|
|
2414
|
+
h7("span", { class: "absolute-voice-provider-simulation__eyebrow" }, model.value.title),
|
|
2415
|
+
h7("strong", { class: "absolute-voice-provider-simulation__label" }, model.value.label)
|
|
2140
2416
|
]),
|
|
2141
|
-
|
|
2142
|
-
model.value.canSimulateFailure ? null :
|
|
2143
|
-
|
|
2144
|
-
...model.value.failureProviders.map((provider) =>
|
|
2417
|
+
h7("p", { class: "absolute-voice-provider-simulation__description" }, model.value.description),
|
|
2418
|
+
model.value.canSimulateFailure ? null : h7("p", { class: "absolute-voice-provider-simulation__empty" }, props.fallbackRequiredMessage ?? "Configure fallback providers before simulating failure."),
|
|
2419
|
+
h7("div", { class: "absolute-voice-provider-simulation__actions" }, [
|
|
2420
|
+
...model.value.failureProviders.map((provider) => h7("button", {
|
|
2145
2421
|
disabled: !model.value.canSimulateFailure || controls.isRunning.value,
|
|
2146
2422
|
key: `fail-${provider.provider}`,
|
|
2147
2423
|
onClick: () => run(provider.provider, "failure"),
|
|
2148
2424
|
type: "button"
|
|
2149
2425
|
}, `Simulate ${provider.provider} ${props.kind.toUpperCase()} failure`)),
|
|
2150
|
-
...model.value.providers.map((provider) =>
|
|
2426
|
+
...model.value.providers.map((provider) => h7("button", {
|
|
2151
2427
|
disabled: controls.isRunning.value,
|
|
2152
2428
|
key: `recover-${provider.provider}`,
|
|
2153
2429
|
onClick: () => run(provider.provider, "recovery"),
|
|
2154
2430
|
type: "button"
|
|
2155
2431
|
}, `Mark ${provider.provider} recovered`))
|
|
2156
2432
|
]),
|
|
2157
|
-
controls.error.value ?
|
|
2158
|
-
model.value.resultText ?
|
|
2433
|
+
controls.error.value ? h7("p", { class: "absolute-voice-provider-simulation__error" }, controls.error.value) : null,
|
|
2434
|
+
model.value.resultText ? h7("pre", { class: "absolute-voice-provider-simulation__result" }, model.value.resultText) : null
|
|
2159
2435
|
]);
|
|
2160
2436
|
}
|
|
2161
2437
|
});
|
|
2162
2438
|
// src/vue/VoiceProviderCapabilities.ts
|
|
2163
|
-
import { computed as computed2, defineComponent as
|
|
2439
|
+
import { computed as computed2, defineComponent as defineComponent8, h as h8 } from "vue";
|
|
2164
2440
|
|
|
2165
2441
|
// src/client/providerCapabilities.ts
|
|
2166
2442
|
var fetchVoiceProviderCapabilities = async (path = "/api/provider-capabilities", options = {}) => {
|
|
@@ -2242,9 +2518,9 @@ var createVoiceProviderCapabilitiesStore = (path = "/api/provider-capabilities",
|
|
|
2242
2518
|
};
|
|
2243
2519
|
|
|
2244
2520
|
// src/client/providerCapabilitiesWidget.ts
|
|
2245
|
-
var
|
|
2246
|
-
var
|
|
2247
|
-
var
|
|
2521
|
+
var DEFAULT_TITLE7 = "Provider Capabilities";
|
|
2522
|
+
var DEFAULT_DESCRIPTION7 = "Configured, selected, and healthy voice providers for this deployment.";
|
|
2523
|
+
var escapeHtml8 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
2248
2524
|
var formatProvider = (provider) => provider.split(/[-_\s]+/).filter(Boolean).map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ") || provider;
|
|
2249
2525
|
var formatKind2 = (kind) => kind.toUpperCase();
|
|
2250
2526
|
var formatStatus2 = (status) => status.split("-").map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ");
|
|
@@ -2288,36 +2564,36 @@ var createVoiceProviderCapabilitiesViewModel = (snapshot, options = {}) => {
|
|
|
2288
2564
|
const selectedCount = snapshot.report?.selected ?? capabilities.filter((capability) => capability.selected).length;
|
|
2289
2565
|
return {
|
|
2290
2566
|
capabilities,
|
|
2291
|
-
description: options.description ??
|
|
2567
|
+
description: options.description ?? DEFAULT_DESCRIPTION7,
|
|
2292
2568
|
error: snapshot.error,
|
|
2293
2569
|
isLoading: snapshot.isLoading,
|
|
2294
2570
|
label: snapshot.error ? "Unavailable" : capabilities.length ? warningCount > 0 ? `${warningCount} needs attention` : `${selectedCount} selected` : snapshot.isLoading ? "Checking" : "No capabilities",
|
|
2295
2571
|
status: snapshot.error ? "error" : capabilities.length ? warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
2296
|
-
title: options.title ??
|
|
2572
|
+
title: options.title ?? DEFAULT_TITLE7,
|
|
2297
2573
|
updatedAt: snapshot.updatedAt
|
|
2298
2574
|
};
|
|
2299
2575
|
};
|
|
2300
2576
|
var renderVoiceProviderCapabilitiesHTML = (snapshot, options = {}) => {
|
|
2301
2577
|
const model = createVoiceProviderCapabilitiesViewModel(snapshot, options);
|
|
2302
|
-
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--${
|
|
2578
|
+
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--${escapeHtml8(capability.status)}">
|
|
2303
2579
|
<header>
|
|
2304
|
-
<strong>${
|
|
2305
|
-
<span>${
|
|
2580
|
+
<strong>${escapeHtml8(capability.label)}</strong>
|
|
2581
|
+
<span>${escapeHtml8(formatStatus2(capability.status))}</span>
|
|
2306
2582
|
</header>
|
|
2307
|
-
<p>${
|
|
2583
|
+
<p>${escapeHtml8(capability.detail)}</p>
|
|
2308
2584
|
<dl>${capability.rows.map((row) => `<div>
|
|
2309
|
-
<dt>${
|
|
2310
|
-
<dd>${
|
|
2585
|
+
<dt>${escapeHtml8(row.label)}</dt>
|
|
2586
|
+
<dd>${escapeHtml8(row.value)}</dd>
|
|
2311
2587
|
</div>`).join("")}</dl>
|
|
2312
2588
|
</article>`).join("")}</div>` : '<p class="absolute-voice-provider-capabilities__empty">Configure provider capabilities to see deployment coverage.</p>';
|
|
2313
|
-
return `<section class="absolute-voice-provider-capabilities absolute-voice-provider-capabilities--${
|
|
2589
|
+
return `<section class="absolute-voice-provider-capabilities absolute-voice-provider-capabilities--${escapeHtml8(model.status)}">
|
|
2314
2590
|
<header class="absolute-voice-provider-capabilities__header">
|
|
2315
|
-
<span class="absolute-voice-provider-capabilities__eyebrow">${
|
|
2316
|
-
<strong class="absolute-voice-provider-capabilities__label">${
|
|
2591
|
+
<span class="absolute-voice-provider-capabilities__eyebrow">${escapeHtml8(model.title)}</span>
|
|
2592
|
+
<strong class="absolute-voice-provider-capabilities__label">${escapeHtml8(model.label)}</strong>
|
|
2317
2593
|
</header>
|
|
2318
|
-
<p class="absolute-voice-provider-capabilities__description">${
|
|
2594
|
+
<p class="absolute-voice-provider-capabilities__description">${escapeHtml8(model.description)}</p>
|
|
2319
2595
|
${capabilities}
|
|
2320
|
-
${model.error ? `<p class="absolute-voice-provider-capabilities__error">${
|
|
2596
|
+
${model.error ? `<p class="absolute-voice-provider-capabilities__error">${escapeHtml8(model.error)}</p>` : ""}
|
|
2321
2597
|
</section>`;
|
|
2322
2598
|
};
|
|
2323
2599
|
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}`;
|
|
@@ -2390,7 +2666,7 @@ function useVoiceProviderCapabilities(path = "/api/provider-capabilities", optio
|
|
|
2390
2666
|
}
|
|
2391
2667
|
|
|
2392
2668
|
// src/vue/VoiceProviderCapabilities.ts
|
|
2393
|
-
var VoiceProviderCapabilities =
|
|
2669
|
+
var VoiceProviderCapabilities = defineComponent8({
|
|
2394
2670
|
name: "VoiceProviderCapabilities",
|
|
2395
2671
|
props: {
|
|
2396
2672
|
class: {
|
|
@@ -2427,41 +2703,41 @@ var VoiceProviderCapabilities = defineComponent7({
|
|
|
2427
2703
|
report: capabilities.report.value,
|
|
2428
2704
|
updatedAt: capabilities.updatedAt.value
|
|
2429
2705
|
}, options));
|
|
2430
|
-
return () =>
|
|
2706
|
+
return () => h8("section", {
|
|
2431
2707
|
class: [
|
|
2432
2708
|
"absolute-voice-provider-capabilities",
|
|
2433
2709
|
`absolute-voice-provider-capabilities--${model.value.status}`,
|
|
2434
2710
|
props.class
|
|
2435
2711
|
]
|
|
2436
2712
|
}, [
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2713
|
+
h8("header", { class: "absolute-voice-provider-capabilities__header" }, [
|
|
2714
|
+
h8("span", { class: "absolute-voice-provider-capabilities__eyebrow" }, model.value.title),
|
|
2715
|
+
h8("strong", { class: "absolute-voice-provider-capabilities__label" }, model.value.label)
|
|
2440
2716
|
]),
|
|
2441
|
-
|
|
2442
|
-
model.value.capabilities.length ?
|
|
2717
|
+
h8("p", { class: "absolute-voice-provider-capabilities__description" }, model.value.description),
|
|
2718
|
+
model.value.capabilities.length ? h8("div", { class: "absolute-voice-provider-capabilities__providers" }, model.value.capabilities.map((capability) => h8("article", {
|
|
2443
2719
|
class: [
|
|
2444
2720
|
"absolute-voice-provider-capabilities__provider",
|
|
2445
2721
|
`absolute-voice-provider-capabilities__provider--${capability.status}`
|
|
2446
2722
|
],
|
|
2447
2723
|
key: `${capability.kind}:${capability.provider}`
|
|
2448
2724
|
}, [
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2725
|
+
h8("header", [
|
|
2726
|
+
h8("strong", capability.label),
|
|
2727
|
+
h8("span", capability.status)
|
|
2452
2728
|
]),
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2729
|
+
h8("p", capability.detail),
|
|
2730
|
+
h8("dl", capability.rows.map((row) => h8("div", { key: row.label }, [
|
|
2731
|
+
h8("dt", row.label),
|
|
2732
|
+
h8("dd", row.value)
|
|
2457
2733
|
])))
|
|
2458
|
-
]))) :
|
|
2459
|
-
model.value.error ?
|
|
2734
|
+
]))) : h8("p", { class: "absolute-voice-provider-capabilities__empty" }, "Configure provider capabilities to see deployment coverage."),
|
|
2735
|
+
model.value.error ? h8("p", { class: "absolute-voice-provider-capabilities__error" }, model.value.error) : null
|
|
2460
2736
|
]);
|
|
2461
2737
|
}
|
|
2462
2738
|
});
|
|
2463
2739
|
// src/vue/VoiceProviderContracts.ts
|
|
2464
|
-
import { defineComponent as
|
|
2740
|
+
import { defineComponent as defineComponent9, h as h9 } from "vue";
|
|
2465
2741
|
|
|
2466
2742
|
// src/vue/useVoiceProviderContracts.ts
|
|
2467
2743
|
import { onUnmounted as onUnmounted8, shallowRef as shallowRef7 } from "vue";
|
|
@@ -2572,9 +2848,9 @@ function useVoiceProviderContracts(path = "/api/provider-contracts", options = {
|
|
|
2572
2848
|
}
|
|
2573
2849
|
|
|
2574
2850
|
// src/client/providerContractsWidget.ts
|
|
2575
|
-
var
|
|
2576
|
-
var
|
|
2577
|
-
var
|
|
2851
|
+
var DEFAULT_TITLE8 = "Provider Contracts";
|
|
2852
|
+
var DEFAULT_DESCRIPTION8 = "Production contract coverage for provider env, latency, fallback, streaming, and capabilities.";
|
|
2853
|
+
var escapeHtml9 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
2578
2854
|
var formatProvider2 = (provider) => provider.split(/[-_\s]+/).filter(Boolean).map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ") || provider;
|
|
2579
2855
|
var formatStatus3 = (status) => status.split("-").map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ");
|
|
2580
2856
|
var contractDetail = (row) => {
|
|
@@ -2606,38 +2882,38 @@ var createVoiceProviderContractsViewModel = (snapshot, options = {}) => {
|
|
|
2606
2882
|
}));
|
|
2607
2883
|
const warningCount = snapshot.report ? snapshot.report.failed + snapshot.report.warned : rows.filter((row) => row.status !== "pass").length;
|
|
2608
2884
|
return {
|
|
2609
|
-
description: options.description ??
|
|
2885
|
+
description: options.description ?? DEFAULT_DESCRIPTION8,
|
|
2610
2886
|
error: snapshot.error,
|
|
2611
2887
|
isLoading: snapshot.isLoading,
|
|
2612
2888
|
label: snapshot.error ? "Unavailable" : rows.length ? warningCount > 0 ? `${warningCount} needs attention` : `${rows.length} passing` : snapshot.isLoading ? "Checking" : "No contracts",
|
|
2613
2889
|
rows,
|
|
2614
2890
|
status: snapshot.error ? "error" : rows.length ? warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
2615
|
-
title: options.title ??
|
|
2891
|
+
title: options.title ?? DEFAULT_TITLE8,
|
|
2616
2892
|
updatedAt: snapshot.updatedAt
|
|
2617
2893
|
};
|
|
2618
2894
|
};
|
|
2619
2895
|
var renderVoiceProviderContractsHTML = (snapshot, options = {}) => {
|
|
2620
2896
|
const model = createVoiceProviderContractsViewModel(snapshot, options);
|
|
2621
|
-
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--${
|
|
2897
|
+
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--${escapeHtml9(row.status)}">
|
|
2622
2898
|
<header>
|
|
2623
|
-
<strong>${
|
|
2624
|
-
<span>${
|
|
2899
|
+
<strong>${escapeHtml9(row.label)}</strong>
|
|
2900
|
+
<span>${escapeHtml9(formatStatus3(row.status))}</span>
|
|
2625
2901
|
</header>
|
|
2626
|
-
<p>${
|
|
2627
|
-
${row.remediations.length ? `<ul class="absolute-voice-provider-contracts__remediations">${row.remediations.map((remediation) => `<li>${remediation.href ? `<a href="${
|
|
2902
|
+
<p>${escapeHtml9(row.detail)}</p>
|
|
2903
|
+
${row.remediations.length ? `<ul class="absolute-voice-provider-contracts__remediations">${row.remediations.map((remediation) => `<li>${remediation.href ? `<a href="${escapeHtml9(remediation.href)}">${escapeHtml9(remediation.label)}</a>` : `<strong>${escapeHtml9(remediation.label)}</strong>`}<span>${escapeHtml9(remediation.detail)}</span></li>`).join("")}</ul>` : ""}
|
|
2628
2904
|
<dl>${row.rows.map((item) => `<div>
|
|
2629
|
-
<dt>${
|
|
2630
|
-
<dd>${
|
|
2905
|
+
<dt>${escapeHtml9(item.label)}</dt>
|
|
2906
|
+
<dd>${escapeHtml9(item.value)}</dd>
|
|
2631
2907
|
</div>`).join("")}</dl>
|
|
2632
2908
|
</article>`).join("")}</div>` : '<p class="absolute-voice-provider-contracts__empty">Configure provider contracts to see production coverage.</p>';
|
|
2633
|
-
return `<section class="absolute-voice-provider-contracts absolute-voice-provider-contracts--${
|
|
2909
|
+
return `<section class="absolute-voice-provider-contracts absolute-voice-provider-contracts--${escapeHtml9(model.status)}">
|
|
2634
2910
|
<header class="absolute-voice-provider-contracts__header">
|
|
2635
|
-
<span class="absolute-voice-provider-contracts__eyebrow">${
|
|
2636
|
-
<strong class="absolute-voice-provider-contracts__label">${
|
|
2911
|
+
<span class="absolute-voice-provider-contracts__eyebrow">${escapeHtml9(model.title)}</span>
|
|
2912
|
+
<strong class="absolute-voice-provider-contracts__label">${escapeHtml9(model.label)}</strong>
|
|
2637
2913
|
</header>
|
|
2638
|
-
<p class="absolute-voice-provider-contracts__description">${
|
|
2914
|
+
<p class="absolute-voice-provider-contracts__description">${escapeHtml9(model.description)}</p>
|
|
2639
2915
|
${rows}
|
|
2640
|
-
${model.error ? `<p class="absolute-voice-provider-contracts__error">${
|
|
2916
|
+
${model.error ? `<p class="absolute-voice-provider-contracts__error">${escapeHtml9(model.error)}</p>` : ""}
|
|
2641
2917
|
</section>`;
|
|
2642
2918
|
};
|
|
2643
2919
|
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}`;
|
|
@@ -2679,7 +2955,7 @@ var defineVoiceProviderContractsElement = (tagName = "absolute-voice-provider-co
|
|
|
2679
2955
|
};
|
|
2680
2956
|
|
|
2681
2957
|
// src/vue/VoiceProviderContracts.ts
|
|
2682
|
-
var VoiceProviderContracts =
|
|
2958
|
+
var VoiceProviderContracts = defineComponent9({
|
|
2683
2959
|
name: "VoiceProviderContracts",
|
|
2684
2960
|
props: {
|
|
2685
2961
|
description: String,
|
|
@@ -2707,49 +2983,49 @@ var VoiceProviderContracts = defineComponent8({
|
|
|
2707
2983
|
intervalMs: props.intervalMs,
|
|
2708
2984
|
title: props.title
|
|
2709
2985
|
});
|
|
2710
|
-
return
|
|
2986
|
+
return h9("section", {
|
|
2711
2987
|
class: [
|
|
2712
2988
|
"absolute-voice-provider-contracts",
|
|
2713
2989
|
`absolute-voice-provider-contracts--${model.status}`
|
|
2714
2990
|
]
|
|
2715
2991
|
}, [
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2992
|
+
h9("header", { class: "absolute-voice-provider-contracts__header" }, [
|
|
2993
|
+
h9("span", { class: "absolute-voice-provider-contracts__eyebrow" }, model.title),
|
|
2994
|
+
h9("strong", { class: "absolute-voice-provider-contracts__label" }, model.label)
|
|
2719
2995
|
]),
|
|
2720
|
-
|
|
2721
|
-
model.rows.length ?
|
|
2996
|
+
h9("p", { class: "absolute-voice-provider-contracts__description" }, model.description),
|
|
2997
|
+
model.rows.length ? h9("div", { class: "absolute-voice-provider-contracts__rows" }, model.rows.map((row) => h9("article", {
|
|
2722
2998
|
class: [
|
|
2723
2999
|
"absolute-voice-provider-contracts__row",
|
|
2724
3000
|
`absolute-voice-provider-contracts__row--${row.status}`
|
|
2725
3001
|
],
|
|
2726
3002
|
key: `${row.kind}:${row.provider}`
|
|
2727
3003
|
}, [
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
3004
|
+
h9("header", [
|
|
3005
|
+
h9("strong", row.label),
|
|
3006
|
+
h9("span", row.status)
|
|
2731
3007
|
]),
|
|
2732
|
-
|
|
2733
|
-
row.remediations.length ?
|
|
3008
|
+
h9("p", row.detail),
|
|
3009
|
+
row.remediations.length ? h9("ul", {
|
|
2734
3010
|
class: "absolute-voice-provider-contracts__remediations"
|
|
2735
|
-
}, row.remediations.map((remediation) =>
|
|
3011
|
+
}, row.remediations.map((remediation) => h9("li", {
|
|
2736
3012
|
key: `${row.kind}:${row.provider}:${remediation.label}`
|
|
2737
3013
|
}, [
|
|
2738
|
-
remediation.href ?
|
|
2739
|
-
|
|
3014
|
+
remediation.href ? h9("a", { href: remediation.href }, remediation.label) : h9("strong", remediation.label),
|
|
3015
|
+
h9("span", remediation.detail)
|
|
2740
3016
|
]))) : null,
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
3017
|
+
h9("dl", row.rows.map((item) => h9("div", { key: item.label }, [
|
|
3018
|
+
h9("dt", item.label),
|
|
3019
|
+
h9("dd", item.value)
|
|
2744
3020
|
])))
|
|
2745
|
-
]))) :
|
|
2746
|
-
model.error ?
|
|
3021
|
+
]))) : h9("p", { class: "absolute-voice-provider-contracts__empty" }, "Configure provider contracts to see production coverage."),
|
|
3022
|
+
model.error ? h9("p", { class: "absolute-voice-provider-contracts__error" }, model.error) : null
|
|
2747
3023
|
]);
|
|
2748
3024
|
};
|
|
2749
3025
|
}
|
|
2750
3026
|
});
|
|
2751
3027
|
// src/vue/VoiceProviderStatus.ts
|
|
2752
|
-
import { computed as computed3, defineComponent as
|
|
3028
|
+
import { computed as computed3, defineComponent as defineComponent10, h as h10 } from "vue";
|
|
2753
3029
|
|
|
2754
3030
|
// src/client/providerStatus.ts
|
|
2755
3031
|
var fetchVoiceProviderStatus = async (path = "/api/provider-status", options = {}) => {
|
|
@@ -2832,9 +3108,9 @@ var createVoiceProviderStatusStore = (path = "/api/provider-status", options = {
|
|
|
2832
3108
|
};
|
|
2833
3109
|
|
|
2834
3110
|
// src/client/providerStatusWidget.ts
|
|
2835
|
-
var
|
|
2836
|
-
var
|
|
2837
|
-
var
|
|
3111
|
+
var DEFAULT_TITLE9 = "Voice Providers";
|
|
3112
|
+
var DEFAULT_DESCRIPTION9 = "Live provider health, fallback counts, latency, and suppression state from your self-hosted trace store.";
|
|
3113
|
+
var escapeHtml10 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
2838
3114
|
var formatProvider3 = (provider) => provider.split(/[-_\s]+/).filter(Boolean).map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ") || provider;
|
|
2839
3115
|
var formatStatus4 = (status) => status.split("-").map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ");
|
|
2840
3116
|
var formatLatency = (value) => typeof value === "number" ? `${value}ms` : "No samples";
|
|
@@ -2878,37 +3154,37 @@ var createVoiceProviderStatusViewModel = (snapshot, options = {}) => {
|
|
|
2878
3154
|
const warningCount = providers.filter((provider) => isWarningStatus2(provider.status)).length;
|
|
2879
3155
|
const healthyCount = providers.filter((provider) => provider.status === "healthy").length;
|
|
2880
3156
|
return {
|
|
2881
|
-
description: options.description ??
|
|
3157
|
+
description: options.description ?? DEFAULT_DESCRIPTION9,
|
|
2882
3158
|
error: snapshot.error,
|
|
2883
3159
|
isLoading: snapshot.isLoading,
|
|
2884
3160
|
label: snapshot.error ? "Unavailable" : providers.length ? warningCount > 0 ? `${warningCount} needs attention` : `${healthyCount} healthy` : snapshot.isLoading ? "Checking" : "No provider traffic",
|
|
2885
3161
|
providers,
|
|
2886
3162
|
status: snapshot.error ? "error" : providers.length ? warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
2887
|
-
title: options.title ??
|
|
3163
|
+
title: options.title ?? DEFAULT_TITLE9,
|
|
2888
3164
|
updatedAt: snapshot.updatedAt
|
|
2889
3165
|
};
|
|
2890
3166
|
};
|
|
2891
3167
|
var renderVoiceProviderStatusHTML = (snapshot, options = {}) => {
|
|
2892
3168
|
const model = createVoiceProviderStatusViewModel(snapshot, options);
|
|
2893
|
-
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--${
|
|
3169
|
+
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--${escapeHtml10(provider.status)}">
|
|
2894
3170
|
<header>
|
|
2895
|
-
<strong>${
|
|
2896
|
-
<span>${
|
|
3171
|
+
<strong>${escapeHtml10(provider.label)}</strong>
|
|
3172
|
+
<span>${escapeHtml10(formatStatus4(provider.status))}</span>
|
|
2897
3173
|
</header>
|
|
2898
|
-
<p>${
|
|
3174
|
+
<p>${escapeHtml10(provider.detail)}</p>
|
|
2899
3175
|
<dl>${provider.rows.map((row) => `<div>
|
|
2900
|
-
<dt>${
|
|
2901
|
-
<dd>${
|
|
3176
|
+
<dt>${escapeHtml10(row.label)}</dt>
|
|
3177
|
+
<dd>${escapeHtml10(row.value)}</dd>
|
|
2902
3178
|
</div>`).join("")}</dl>
|
|
2903
3179
|
</article>`).join("")}</div>` : '<p class="absolute-voice-provider-status__empty">Run voice traffic to see provider health.</p>';
|
|
2904
|
-
return `<section class="absolute-voice-provider-status absolute-voice-provider-status--${
|
|
3180
|
+
return `<section class="absolute-voice-provider-status absolute-voice-provider-status--${escapeHtml10(model.status)}">
|
|
2905
3181
|
<header class="absolute-voice-provider-status__header">
|
|
2906
|
-
<span class="absolute-voice-provider-status__eyebrow">${
|
|
2907
|
-
<strong class="absolute-voice-provider-status__label">${
|
|
3182
|
+
<span class="absolute-voice-provider-status__eyebrow">${escapeHtml10(model.title)}</span>
|
|
3183
|
+
<strong class="absolute-voice-provider-status__label">${escapeHtml10(model.label)}</strong>
|
|
2908
3184
|
</header>
|
|
2909
|
-
<p class="absolute-voice-provider-status__description">${
|
|
3185
|
+
<p class="absolute-voice-provider-status__description">${escapeHtml10(model.description)}</p>
|
|
2910
3186
|
${providers}
|
|
2911
|
-
${model.error ? `<p class="absolute-voice-provider-status__error">${
|
|
3187
|
+
${model.error ? `<p class="absolute-voice-provider-status__error">${escapeHtml10(model.error)}</p>` : ""}
|
|
2912
3188
|
</section>`;
|
|
2913
3189
|
};
|
|
2914
3190
|
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}`;
|
|
@@ -2950,13 +3226,13 @@ var defineVoiceProviderStatusElement = (tagName = "absolute-voice-provider-statu
|
|
|
2950
3226
|
};
|
|
2951
3227
|
|
|
2952
3228
|
// src/vue/useVoiceProviderStatus.ts
|
|
2953
|
-
import { onUnmounted as onUnmounted9, ref as
|
|
3229
|
+
import { onUnmounted as onUnmounted9, ref as ref8, shallowRef as shallowRef8 } from "vue";
|
|
2954
3230
|
function useVoiceProviderStatus(path = "/api/provider-status", options = {}) {
|
|
2955
3231
|
const store = createVoiceProviderStatusStore(path, options);
|
|
2956
|
-
const error =
|
|
2957
|
-
const isLoading =
|
|
3232
|
+
const error = ref8(null);
|
|
3233
|
+
const isLoading = ref8(false);
|
|
2958
3234
|
const providers = shallowRef8([]);
|
|
2959
|
-
const updatedAt =
|
|
3235
|
+
const updatedAt = ref8(undefined);
|
|
2960
3236
|
const sync = () => {
|
|
2961
3237
|
const snapshot = store.getSnapshot();
|
|
2962
3238
|
error.value = snapshot.error;
|
|
@@ -2981,7 +3257,7 @@ function useVoiceProviderStatus(path = "/api/provider-status", options = {}) {
|
|
|
2981
3257
|
}
|
|
2982
3258
|
|
|
2983
3259
|
// src/vue/VoiceProviderStatus.ts
|
|
2984
|
-
var VoiceProviderStatus =
|
|
3260
|
+
var VoiceProviderStatus = defineComponent10({
|
|
2985
3261
|
name: "VoiceProviderStatus",
|
|
2986
3262
|
props: {
|
|
2987
3263
|
class: {
|
|
@@ -3018,41 +3294,41 @@ var VoiceProviderStatus = defineComponent9({
|
|
|
3018
3294
|
providers: status.providers.value,
|
|
3019
3295
|
updatedAt: status.updatedAt.value
|
|
3020
3296
|
}, options));
|
|
3021
|
-
return () =>
|
|
3297
|
+
return () => h10("section", {
|
|
3022
3298
|
class: [
|
|
3023
3299
|
"absolute-voice-provider-status",
|
|
3024
3300
|
`absolute-voice-provider-status--${model.value.status}`,
|
|
3025
3301
|
props.class
|
|
3026
3302
|
]
|
|
3027
3303
|
}, [
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3304
|
+
h10("header", { class: "absolute-voice-provider-status__header" }, [
|
|
3305
|
+
h10("span", { class: "absolute-voice-provider-status__eyebrow" }, model.value.title),
|
|
3306
|
+
h10("strong", { class: "absolute-voice-provider-status__label" }, model.value.label)
|
|
3031
3307
|
]),
|
|
3032
|
-
|
|
3033
|
-
model.value.providers.length ?
|
|
3308
|
+
h10("p", { class: "absolute-voice-provider-status__description" }, model.value.description),
|
|
3309
|
+
model.value.providers.length ? h10("div", { class: "absolute-voice-provider-status__providers" }, model.value.providers.map((provider) => h10("article", {
|
|
3034
3310
|
class: [
|
|
3035
3311
|
"absolute-voice-provider-status__provider",
|
|
3036
3312
|
`absolute-voice-provider-status__provider--${provider.status}`
|
|
3037
3313
|
],
|
|
3038
3314
|
key: provider.provider
|
|
3039
3315
|
}, [
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3316
|
+
h10("header", [
|
|
3317
|
+
h10("strong", provider.label),
|
|
3318
|
+
h10("span", provider.status)
|
|
3043
3319
|
]),
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3320
|
+
h10("p", provider.detail),
|
|
3321
|
+
h10("dl", provider.rows.map((row) => h10("div", { key: row.label }, [
|
|
3322
|
+
h10("dt", row.label),
|
|
3323
|
+
h10("dd", row.value)
|
|
3048
3324
|
])))
|
|
3049
|
-
]))) :
|
|
3050
|
-
model.value.error ?
|
|
3325
|
+
]))) : h10("p", { class: "absolute-voice-provider-status__empty" }, "Run voice traffic to see provider health."),
|
|
3326
|
+
model.value.error ? h10("p", { class: "absolute-voice-provider-status__error" }, model.value.error) : null
|
|
3051
3327
|
]);
|
|
3052
3328
|
}
|
|
3053
3329
|
});
|
|
3054
3330
|
// src/vue/VoiceRoutingStatus.ts
|
|
3055
|
-
import { computed as computed4, defineComponent as
|
|
3331
|
+
import { computed as computed4, defineComponent as defineComponent11, h as h11 } from "vue";
|
|
3056
3332
|
|
|
3057
3333
|
// src/client/routingStatus.ts
|
|
3058
3334
|
var fetchVoiceRoutingStatus = async (path = "/api/routing/latest", options = {}) => {
|
|
@@ -3135,9 +3411,9 @@ var createVoiceRoutingStatusStore = (path = "/api/routing/latest", options = {})
|
|
|
3135
3411
|
};
|
|
3136
3412
|
|
|
3137
3413
|
// src/client/routingStatusWidget.ts
|
|
3138
|
-
var
|
|
3139
|
-
var
|
|
3140
|
-
var
|
|
3414
|
+
var DEFAULT_TITLE10 = "Voice Routing";
|
|
3415
|
+
var DEFAULT_DESCRIPTION10 = "Latest provider routing decision from the self-hosted trace store.";
|
|
3416
|
+
var escapeHtml11 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
3141
3417
|
var formatValue = (value, fallback = "None") => typeof value === "string" && value.trim() ? value : typeof value === "number" && Number.isFinite(value) ? String(value) : fallback;
|
|
3142
3418
|
var createVoiceRoutingStatusViewModel = (snapshot, options = {}) => {
|
|
3143
3419
|
const decision = snapshot.decision;
|
|
@@ -3161,30 +3437,30 @@ var createVoiceRoutingStatusViewModel = (snapshot, options = {}) => {
|
|
|
3161
3437
|
] : [];
|
|
3162
3438
|
return {
|
|
3163
3439
|
decision,
|
|
3164
|
-
description: options.description ??
|
|
3440
|
+
description: options.description ?? DEFAULT_DESCRIPTION10,
|
|
3165
3441
|
error: snapshot.error,
|
|
3166
3442
|
isLoading: snapshot.isLoading,
|
|
3167
3443
|
label: snapshot.error ? "Unavailable" : decision ? `${formatValue(decision.kind).toUpperCase()} ${formatValue(decision.status, "unknown")}` : snapshot.isLoading ? "Checking" : "No routing yet",
|
|
3168
3444
|
rows,
|
|
3169
3445
|
status: snapshot.error ? "error" : decision ? "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
3170
|
-
title: options.title ??
|
|
3446
|
+
title: options.title ?? DEFAULT_TITLE10,
|
|
3171
3447
|
updatedAt: snapshot.updatedAt
|
|
3172
3448
|
};
|
|
3173
3449
|
};
|
|
3174
3450
|
var renderVoiceRoutingStatusHTML = (snapshot, options = {}) => {
|
|
3175
3451
|
const model = createVoiceRoutingStatusViewModel(snapshot, options);
|
|
3176
3452
|
const rows = model.rows.length ? `<div class="absolute-voice-routing-status__grid">${model.rows.map((row) => `<div>
|
|
3177
|
-
<span>${
|
|
3178
|
-
<strong>${
|
|
3453
|
+
<span>${escapeHtml11(row.label)}</span>
|
|
3454
|
+
<strong>${escapeHtml11(row.value)}</strong>
|
|
3179
3455
|
</div>`).join("")}</div>` : '<p class="absolute-voice-routing-status__empty">Start a voice session to see the selected provider.</p>';
|
|
3180
|
-
return `<section class="absolute-voice-routing-status absolute-voice-routing-status--${
|
|
3456
|
+
return `<section class="absolute-voice-routing-status absolute-voice-routing-status--${escapeHtml11(model.status)}">
|
|
3181
3457
|
<header class="absolute-voice-routing-status__header">
|
|
3182
|
-
<span class="absolute-voice-routing-status__eyebrow">${
|
|
3183
|
-
<strong class="absolute-voice-routing-status__label">${
|
|
3458
|
+
<span class="absolute-voice-routing-status__eyebrow">${escapeHtml11(model.title)}</span>
|
|
3459
|
+
<strong class="absolute-voice-routing-status__label">${escapeHtml11(model.label)}</strong>
|
|
3184
3460
|
</header>
|
|
3185
|
-
<p class="absolute-voice-routing-status__description">${
|
|
3461
|
+
<p class="absolute-voice-routing-status__description">${escapeHtml11(model.description)}</p>
|
|
3186
3462
|
${rows}
|
|
3187
|
-
${model.error ? `<p class="absolute-voice-routing-status__error">${
|
|
3463
|
+
${model.error ? `<p class="absolute-voice-routing-status__error">${escapeHtml11(model.error)}</p>` : ""}
|
|
3188
3464
|
</section>`;
|
|
3189
3465
|
};
|
|
3190
3466
|
var getVoiceRoutingStatusCSS = () => `.absolute-voice-routing-status{border:1px solid #d8d2c4;border-radius:20px;background:#fffaf0;color:#16130d;padding:18px;box-shadow:0 18px 40px rgba(47,37,18,.12);font-family:inherit}.absolute-voice-routing-status--error{border-color:#f2a7a7;background:#fff5f3}.absolute-voice-routing-status__header{align-items:start;display:flex;gap:12px;justify-content:space-between}.absolute-voice-routing-status__eyebrow{color:#73664f;font-size:12px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.absolute-voice-routing-status__label{font-size:24px;line-height:1}.absolute-voice-routing-status__description{color:#514733;margin:12px 0 0}.absolute-voice-routing-status__grid{display:grid;gap:8px;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:14px}.absolute-voice-routing-status__grid div{background:#fff;border:1px solid #eee4d2;border-radius:14px;padding:10px 12px}.absolute-voice-routing-status__grid span{color:#655944;display:block;font-size:12px;margin-bottom:4px}.absolute-voice-routing-status__grid strong{overflow-wrap:anywhere}.absolute-voice-routing-status__empty{color:#655944;margin:14px 0 0}.absolute-voice-routing-status__error{color:#9f1239;font-weight:700}`;
|
|
@@ -3226,13 +3502,13 @@ var defineVoiceRoutingStatusElement = (tagName = "absolute-voice-routing-status"
|
|
|
3226
3502
|
};
|
|
3227
3503
|
|
|
3228
3504
|
// src/vue/useVoiceRoutingStatus.ts
|
|
3229
|
-
import { onUnmounted as onUnmounted10, ref as
|
|
3505
|
+
import { onUnmounted as onUnmounted10, ref as ref9, shallowRef as shallowRef9 } from "vue";
|
|
3230
3506
|
function useVoiceRoutingStatus(path = "/api/routing/latest", options = {}) {
|
|
3231
3507
|
const store = createVoiceRoutingStatusStore(path, options);
|
|
3232
3508
|
const decision = shallowRef9(null);
|
|
3233
|
-
const error =
|
|
3234
|
-
const isLoading =
|
|
3235
|
-
const updatedAt =
|
|
3509
|
+
const error = ref9(null);
|
|
3510
|
+
const isLoading = ref9(false);
|
|
3511
|
+
const updatedAt = ref9(undefined);
|
|
3236
3512
|
const sync = () => {
|
|
3237
3513
|
const snapshot = store.getSnapshot();
|
|
3238
3514
|
decision.value = snapshot.decision;
|
|
@@ -3257,7 +3533,7 @@ function useVoiceRoutingStatus(path = "/api/routing/latest", options = {}) {
|
|
|
3257
3533
|
}
|
|
3258
3534
|
|
|
3259
3535
|
// src/vue/VoiceRoutingStatus.ts
|
|
3260
|
-
var VoiceRoutingStatus =
|
|
3536
|
+
var VoiceRoutingStatus = defineComponent11({
|
|
3261
3537
|
name: "VoiceRoutingStatus",
|
|
3262
3538
|
props: {
|
|
3263
3539
|
class: {
|
|
@@ -3294,28 +3570,28 @@ var VoiceRoutingStatus = defineComponent10({
|
|
|
3294
3570
|
isLoading: status.isLoading.value,
|
|
3295
3571
|
updatedAt: status.updatedAt.value
|
|
3296
3572
|
}, options));
|
|
3297
|
-
return () =>
|
|
3573
|
+
return () => h11("section", {
|
|
3298
3574
|
class: [
|
|
3299
3575
|
"absolute-voice-routing-status",
|
|
3300
3576
|
`absolute-voice-routing-status--${model.value.status}`,
|
|
3301
3577
|
props.class
|
|
3302
3578
|
]
|
|
3303
3579
|
}, [
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3580
|
+
h11("header", { class: "absolute-voice-routing-status__header" }, [
|
|
3581
|
+
h11("span", { class: "absolute-voice-routing-status__eyebrow" }, model.value.title),
|
|
3582
|
+
h11("strong", { class: "absolute-voice-routing-status__label" }, model.value.label)
|
|
3307
3583
|
]),
|
|
3308
|
-
|
|
3309
|
-
model.value.rows.length ?
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
]))) :
|
|
3313
|
-
model.value.error ?
|
|
3584
|
+
h11("p", { class: "absolute-voice-routing-status__description" }, model.value.description),
|
|
3585
|
+
model.value.rows.length ? h11("div", { class: "absolute-voice-routing-status__grid" }, model.value.rows.map((row) => h11("div", { key: row.label }, [
|
|
3586
|
+
h11("span", row.label),
|
|
3587
|
+
h11("strong", row.value)
|
|
3588
|
+
]))) : h11("p", { class: "absolute-voice-routing-status__empty" }, "Start a voice session to see the selected provider."),
|
|
3589
|
+
model.value.error ? h11("p", { class: "absolute-voice-routing-status__error" }, model.value.error) : null
|
|
3314
3590
|
]);
|
|
3315
3591
|
}
|
|
3316
3592
|
});
|
|
3317
3593
|
// src/vue/useVoiceAgentSquadStatus.ts
|
|
3318
|
-
import { onUnmounted as onUnmounted11, ref as
|
|
3594
|
+
import { onUnmounted as onUnmounted11, ref as ref10, shallowRef as shallowRef10 } from "vue";
|
|
3319
3595
|
|
|
3320
3596
|
// src/client/traceTimeline.ts
|
|
3321
3597
|
var fetchVoiceTraceTimeline = async (path = "/api/voice-traces", options = {}) => {
|
|
@@ -3475,10 +3751,10 @@ var createVoiceAgentSquadStatusStore = (path = "/api/voice-traces", options = {}
|
|
|
3475
3751
|
function useVoiceAgentSquadStatus(path = "/api/voice-traces", options = {}) {
|
|
3476
3752
|
const store = createVoiceAgentSquadStatusStore(path, options);
|
|
3477
3753
|
const current = shallowRef10(undefined);
|
|
3478
|
-
const error =
|
|
3479
|
-
const isLoading =
|
|
3754
|
+
const error = ref10(null);
|
|
3755
|
+
const isLoading = ref10(false);
|
|
3480
3756
|
const report = shallowRef10(undefined);
|
|
3481
|
-
const updatedAt =
|
|
3757
|
+
const updatedAt = ref10(undefined);
|
|
3482
3758
|
const sync = () => {
|
|
3483
3759
|
const snapshot = store.getSnapshot();
|
|
3484
3760
|
current.value = snapshot.report.current;
|
|
@@ -3506,7 +3782,7 @@ function useVoiceAgentSquadStatus(path = "/api/voice-traces", options = {}) {
|
|
|
3506
3782
|
};
|
|
3507
3783
|
}
|
|
3508
3784
|
// src/vue/VoiceTurnLatency.ts
|
|
3509
|
-
import { computed as computed5, defineComponent as
|
|
3785
|
+
import { computed as computed5, defineComponent as defineComponent12, h as h12 } from "vue";
|
|
3510
3786
|
|
|
3511
3787
|
// src/client/turnLatency.ts
|
|
3512
3788
|
var fetchVoiceTurnLatency = async (path = "/api/turn-latency", options = {}) => {
|
|
@@ -3612,10 +3888,10 @@ var createVoiceTurnLatencyStore = (path = "/api/turn-latency", options = {}) =>
|
|
|
3612
3888
|
};
|
|
3613
3889
|
|
|
3614
3890
|
// src/client/turnLatencyWidget.ts
|
|
3615
|
-
var
|
|
3616
|
-
var
|
|
3891
|
+
var DEFAULT_TITLE11 = "Turn Latency";
|
|
3892
|
+
var DEFAULT_DESCRIPTION11 = "Per-turn timing from first transcript to commit and assistant response start.";
|
|
3617
3893
|
var DEFAULT_PROOF_LABEL = "Run latency proof";
|
|
3618
|
-
var
|
|
3894
|
+
var escapeHtml12 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
3619
3895
|
var formatMs2 = (value) => typeof value === "number" ? `${Math.round(value)}ms` : "n/a";
|
|
3620
3896
|
var createVoiceTurnLatencyViewModel = (snapshot, options = {}) => {
|
|
3621
3897
|
const turns = (snapshot.report?.turns ?? []).map((turn) => ({
|
|
@@ -3629,39 +3905,39 @@ var createVoiceTurnLatencyViewModel = (snapshot, options = {}) => {
|
|
|
3629
3905
|
const warningCount = snapshot.report?.warnings ?? turns.filter((turn) => turn.status === "warn").length;
|
|
3630
3906
|
const failedCount = snapshot.report?.failed ?? turns.filter((turn) => turn.status === "fail").length;
|
|
3631
3907
|
return {
|
|
3632
|
-
description: options.description ??
|
|
3908
|
+
description: options.description ?? DEFAULT_DESCRIPTION11,
|
|
3633
3909
|
error: snapshot.error,
|
|
3634
3910
|
isLoading: snapshot.isLoading,
|
|
3635
3911
|
label: snapshot.error ? "Unavailable" : turns.length ? failedCount > 0 ? `${failedCount} slow` : warningCount > 0 ? `${warningCount} warnings` : `avg ${formatMs2(snapshot.report?.averageTotalMs)}` : snapshot.isLoading ? "Checking" : "No turns",
|
|
3636
3912
|
proofLabel: options.proofPath ? options.proofLabel ?? DEFAULT_PROOF_LABEL : undefined,
|
|
3637
3913
|
showProofAction: Boolean(options.proofPath),
|
|
3638
3914
|
status: snapshot.error ? "error" : turns.length ? failedCount > 0 || warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
3639
|
-
title: options.title ??
|
|
3915
|
+
title: options.title ?? DEFAULT_TITLE11,
|
|
3640
3916
|
turns,
|
|
3641
3917
|
updatedAt: snapshot.updatedAt
|
|
3642
3918
|
};
|
|
3643
3919
|
};
|
|
3644
3920
|
var renderVoiceTurnLatencyHTML = (snapshot, options = {}) => {
|
|
3645
3921
|
const model = createVoiceTurnLatencyViewModel(snapshot, options);
|
|
3646
|
-
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--${
|
|
3922
|
+
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--${escapeHtml12(turn.status)}">
|
|
3647
3923
|
<header>
|
|
3648
|
-
<strong>${
|
|
3649
|
-
<span>${
|
|
3924
|
+
<strong>${escapeHtml12(turn.label)}</strong>
|
|
3925
|
+
<span>${escapeHtml12(turn.status)}</span>
|
|
3650
3926
|
</header>
|
|
3651
3927
|
<dl>${turn.rows.map((row) => `<div>
|
|
3652
|
-
<dt>${
|
|
3653
|
-
<dd>${
|
|
3928
|
+
<dt>${escapeHtml12(row.label)}</dt>
|
|
3929
|
+
<dd>${escapeHtml12(row.value)}</dd>
|
|
3654
3930
|
</div>`).join("")}</dl>
|
|
3655
3931
|
</article>`).join("")}</div>` : '<p class="absolute-voice-turn-latency__empty">Complete a voice turn to see latency diagnostics.</p>';
|
|
3656
|
-
return `<section class="absolute-voice-turn-latency absolute-voice-turn-latency--${
|
|
3932
|
+
return `<section class="absolute-voice-turn-latency absolute-voice-turn-latency--${escapeHtml12(model.status)}">
|
|
3657
3933
|
<header class="absolute-voice-turn-latency__header">
|
|
3658
|
-
<span class="absolute-voice-turn-latency__eyebrow">${
|
|
3659
|
-
<strong class="absolute-voice-turn-latency__label">${
|
|
3934
|
+
<span class="absolute-voice-turn-latency__eyebrow">${escapeHtml12(model.title)}</span>
|
|
3935
|
+
<strong class="absolute-voice-turn-latency__label">${escapeHtml12(model.label)}</strong>
|
|
3660
3936
|
</header>
|
|
3661
|
-
<p class="absolute-voice-turn-latency__description">${
|
|
3662
|
-
${model.showProofAction ? `<button class="absolute-voice-turn-latency__proof" data-absolute-voice-turn-latency-proof type="button">${
|
|
3937
|
+
<p class="absolute-voice-turn-latency__description">${escapeHtml12(model.description)}</p>
|
|
3938
|
+
${model.showProofAction ? `<button class="absolute-voice-turn-latency__proof" data-absolute-voice-turn-latency-proof type="button">${escapeHtml12(model.proofLabel ?? DEFAULT_PROOF_LABEL)}</button>` : ""}
|
|
3663
3939
|
${turns}
|
|
3664
|
-
${model.error ? `<p class="absolute-voice-turn-latency__error">${
|
|
3940
|
+
${model.error ? `<p class="absolute-voice-turn-latency__error">${escapeHtml12(model.error)}</p>` : ""}
|
|
3665
3941
|
</section>`;
|
|
3666
3942
|
};
|
|
3667
3943
|
var mountVoiceTurnLatency = (element, path = "/api/turn-latency", options = {}) => {
|
|
@@ -3744,7 +4020,7 @@ function useVoiceTurnLatency(path = "/api/turn-latency", options = {}) {
|
|
|
3744
4020
|
}
|
|
3745
4021
|
|
|
3746
4022
|
// src/vue/VoiceTurnLatency.ts
|
|
3747
|
-
var VoiceTurnLatency =
|
|
4023
|
+
var VoiceTurnLatency = defineComponent12({
|
|
3748
4024
|
name: "VoiceTurnLatency",
|
|
3749
4025
|
props: {
|
|
3750
4026
|
class: { default: "", type: String },
|
|
@@ -3770,47 +4046,47 @@ var VoiceTurnLatency = defineComponent11({
|
|
|
3770
4046
|
report: latency.report.value,
|
|
3771
4047
|
updatedAt: latency.updatedAt.value
|
|
3772
4048
|
}, options));
|
|
3773
|
-
return () =>
|
|
4049
|
+
return () => h12("section", {
|
|
3774
4050
|
class: [
|
|
3775
4051
|
"absolute-voice-turn-latency",
|
|
3776
4052
|
`absolute-voice-turn-latency--${model.value.status}`,
|
|
3777
4053
|
props.class
|
|
3778
4054
|
]
|
|
3779
4055
|
}, [
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
4056
|
+
h12("header", { class: "absolute-voice-turn-latency__header" }, [
|
|
4057
|
+
h12("span", { class: "absolute-voice-turn-latency__eyebrow" }, model.value.title),
|
|
4058
|
+
h12("strong", { class: "absolute-voice-turn-latency__label" }, model.value.label)
|
|
3783
4059
|
]),
|
|
3784
|
-
|
|
3785
|
-
model.value.showProofAction ?
|
|
4060
|
+
h12("p", { class: "absolute-voice-turn-latency__description" }, model.value.description),
|
|
4061
|
+
model.value.showProofAction ? h12("button", {
|
|
3786
4062
|
class: "absolute-voice-turn-latency__proof",
|
|
3787
4063
|
onClick: () => {
|
|
3788
4064
|
latency.runProof().catch(() => {});
|
|
3789
4065
|
},
|
|
3790
4066
|
type: "button"
|
|
3791
4067
|
}, model.value.proofLabel) : null,
|
|
3792
|
-
model.value.turns.length ?
|
|
4068
|
+
model.value.turns.length ? h12("div", { class: "absolute-voice-turn-latency__turns" }, model.value.turns.map((turn) => h12("article", {
|
|
3793
4069
|
class: [
|
|
3794
4070
|
"absolute-voice-turn-latency__turn",
|
|
3795
4071
|
`absolute-voice-turn-latency__turn--${turn.status}`
|
|
3796
4072
|
],
|
|
3797
4073
|
key: `${turn.sessionId}:${turn.turnId}`
|
|
3798
4074
|
}, [
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
4075
|
+
h12("header", [
|
|
4076
|
+
h12("strong", turn.label),
|
|
4077
|
+
h12("span", turn.status)
|
|
3802
4078
|
]),
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
4079
|
+
h12("dl", turn.rows.map((row) => h12("div", { key: row.label }, [
|
|
4080
|
+
h12("dt", row.label),
|
|
4081
|
+
h12("dd", row.value)
|
|
3806
4082
|
])))
|
|
3807
|
-
]))) :
|
|
3808
|
-
model.value.error ?
|
|
4083
|
+
]))) : h12("p", { class: "absolute-voice-turn-latency__empty" }, "Complete a voice turn to see latency diagnostics."),
|
|
4084
|
+
model.value.error ? h12("p", { class: "absolute-voice-turn-latency__error" }, model.value.error) : null
|
|
3809
4085
|
]);
|
|
3810
4086
|
}
|
|
3811
4087
|
});
|
|
3812
4088
|
// src/vue/VoiceTurnQuality.ts
|
|
3813
|
-
import { computed as computed6, defineComponent as
|
|
4089
|
+
import { computed as computed6, defineComponent as defineComponent13, h as h13 } from "vue";
|
|
3814
4090
|
|
|
3815
4091
|
// src/client/turnQuality.ts
|
|
3816
4092
|
var fetchVoiceTurnQuality = async (path = "/api/turn-quality", options = {}) => {
|
|
@@ -3892,9 +4168,9 @@ var createVoiceTurnQualityStore = (path = "/api/turn-quality", options = {}) =>
|
|
|
3892
4168
|
};
|
|
3893
4169
|
|
|
3894
4170
|
// src/client/turnQualityWidget.ts
|
|
3895
|
-
var
|
|
3896
|
-
var
|
|
3897
|
-
var
|
|
4171
|
+
var DEFAULT_TITLE12 = "Turn Quality";
|
|
4172
|
+
var DEFAULT_DESCRIPTION12 = "Per-turn STT confidence, fallback selection, corrections, and transcript coverage.";
|
|
4173
|
+
var escapeHtml13 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
3898
4174
|
var formatConfidence = (value) => typeof value === "number" ? `${Math.round(value * 100)}%` : "n/a";
|
|
3899
4175
|
var formatMaybe = (value) => value === undefined || value === "" ? "n/a" : String(value);
|
|
3900
4176
|
var getTurnDetail = (turn) => {
|
|
@@ -3932,37 +4208,37 @@ var createVoiceTurnQualityViewModel = (snapshot, options = {}) => {
|
|
|
3932
4208
|
const warningCount = snapshot.report?.warnings ?? turns.filter((turn) => turn.status === "warn").length;
|
|
3933
4209
|
const failedCount = snapshot.report?.failed ?? turns.filter((turn) => turn.status === "fail").length;
|
|
3934
4210
|
return {
|
|
3935
|
-
description: options.description ??
|
|
4211
|
+
description: options.description ?? DEFAULT_DESCRIPTION12,
|
|
3936
4212
|
error: snapshot.error,
|
|
3937
4213
|
isLoading: snapshot.isLoading,
|
|
3938
4214
|
label: snapshot.error ? "Unavailable" : turns.length ? failedCount > 0 ? `${failedCount} failed` : warningCount > 0 ? `${warningCount} warnings` : `${turns.length} healthy` : snapshot.isLoading ? "Checking" : "No turns",
|
|
3939
4215
|
status: snapshot.error ? "error" : turns.length ? failedCount > 0 || warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
3940
|
-
title: options.title ??
|
|
4216
|
+
title: options.title ?? DEFAULT_TITLE12,
|
|
3941
4217
|
turns,
|
|
3942
4218
|
updatedAt: snapshot.updatedAt
|
|
3943
4219
|
};
|
|
3944
4220
|
};
|
|
3945
4221
|
var renderVoiceTurnQualityHTML = (snapshot, options = {}) => {
|
|
3946
4222
|
const model = createVoiceTurnQualityViewModel(snapshot, options);
|
|
3947
|
-
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--${
|
|
4223
|
+
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--${escapeHtml13(turn.status)}">
|
|
3948
4224
|
<header>
|
|
3949
|
-
<strong>${
|
|
3950
|
-
<span>${
|
|
4225
|
+
<strong>${escapeHtml13(turn.label)}</strong>
|
|
4226
|
+
<span>${escapeHtml13(turn.status)}</span>
|
|
3951
4227
|
</header>
|
|
3952
|
-
<p>${
|
|
4228
|
+
<p>${escapeHtml13(turn.detail)}</p>
|
|
3953
4229
|
<dl>${turn.rows.map((row) => `<div>
|
|
3954
|
-
<dt>${
|
|
3955
|
-
<dd>${
|
|
4230
|
+
<dt>${escapeHtml13(row.label)}</dt>
|
|
4231
|
+
<dd>${escapeHtml13(row.value)}</dd>
|
|
3956
4232
|
</div>`).join("")}</dl>
|
|
3957
4233
|
</article>`).join("")}</div>` : '<p class="absolute-voice-turn-quality__empty">Complete a voice turn to see STT quality diagnostics.</p>';
|
|
3958
|
-
return `<section class="absolute-voice-turn-quality absolute-voice-turn-quality--${
|
|
4234
|
+
return `<section class="absolute-voice-turn-quality absolute-voice-turn-quality--${escapeHtml13(model.status)}">
|
|
3959
4235
|
<header class="absolute-voice-turn-quality__header">
|
|
3960
|
-
<span class="absolute-voice-turn-quality__eyebrow">${
|
|
3961
|
-
<strong class="absolute-voice-turn-quality__label">${
|
|
4236
|
+
<span class="absolute-voice-turn-quality__eyebrow">${escapeHtml13(model.title)}</span>
|
|
4237
|
+
<strong class="absolute-voice-turn-quality__label">${escapeHtml13(model.label)}</strong>
|
|
3962
4238
|
</header>
|
|
3963
|
-
<p class="absolute-voice-turn-quality__description">${
|
|
4239
|
+
<p class="absolute-voice-turn-quality__description">${escapeHtml13(model.description)}</p>
|
|
3964
4240
|
${turns}
|
|
3965
|
-
${model.error ? `<p class="absolute-voice-turn-quality__error">${
|
|
4241
|
+
${model.error ? `<p class="absolute-voice-turn-quality__error">${escapeHtml13(model.error)}</p>` : ""}
|
|
3966
4242
|
</section>`;
|
|
3967
4243
|
};
|
|
3968
4244
|
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}`;
|
|
@@ -4029,7 +4305,7 @@ function useVoiceTurnQuality(path = "/api/turn-quality", options = {}) {
|
|
|
4029
4305
|
}
|
|
4030
4306
|
|
|
4031
4307
|
// src/vue/VoiceTurnQuality.ts
|
|
4032
|
-
var VoiceTurnQuality =
|
|
4308
|
+
var VoiceTurnQuality = defineComponent13({
|
|
4033
4309
|
name: "VoiceTurnQuality",
|
|
4034
4310
|
props: {
|
|
4035
4311
|
class: { default: "", type: String },
|
|
@@ -4051,41 +4327,41 @@ var VoiceTurnQuality = defineComponent12({
|
|
|
4051
4327
|
report: quality.report.value,
|
|
4052
4328
|
updatedAt: quality.updatedAt.value
|
|
4053
4329
|
}, options));
|
|
4054
|
-
return () =>
|
|
4330
|
+
return () => h13("section", {
|
|
4055
4331
|
class: [
|
|
4056
4332
|
"absolute-voice-turn-quality",
|
|
4057
4333
|
`absolute-voice-turn-quality--${model.value.status}`,
|
|
4058
4334
|
props.class
|
|
4059
4335
|
]
|
|
4060
4336
|
}, [
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4337
|
+
h13("header", { class: "absolute-voice-turn-quality__header" }, [
|
|
4338
|
+
h13("span", { class: "absolute-voice-turn-quality__eyebrow" }, model.value.title),
|
|
4339
|
+
h13("strong", { class: "absolute-voice-turn-quality__label" }, model.value.label)
|
|
4064
4340
|
]),
|
|
4065
|
-
|
|
4066
|
-
model.value.turns.length ?
|
|
4341
|
+
h13("p", { class: "absolute-voice-turn-quality__description" }, model.value.description),
|
|
4342
|
+
model.value.turns.length ? h13("div", { class: "absolute-voice-turn-quality__turns" }, model.value.turns.map((turn) => h13("article", {
|
|
4067
4343
|
class: [
|
|
4068
4344
|
"absolute-voice-turn-quality__turn",
|
|
4069
4345
|
`absolute-voice-turn-quality__turn--${turn.status}`
|
|
4070
4346
|
],
|
|
4071
4347
|
key: `${turn.sessionId}:${turn.turnId}`
|
|
4072
4348
|
}, [
|
|
4073
|
-
|
|
4074
|
-
|
|
4075
|
-
|
|
4349
|
+
h13("header", [
|
|
4350
|
+
h13("strong", turn.label),
|
|
4351
|
+
h13("span", turn.status)
|
|
4076
4352
|
]),
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4353
|
+
h13("p", turn.detail),
|
|
4354
|
+
h13("dl", turn.rows.map((row) => h13("div", { key: row.label }, [
|
|
4355
|
+
h13("dt", row.label),
|
|
4356
|
+
h13("dd", row.value)
|
|
4081
4357
|
])))
|
|
4082
|
-
]))) :
|
|
4083
|
-
model.value.error ?
|
|
4358
|
+
]))) : h13("p", { class: "absolute-voice-turn-quality__empty" }, "Complete a voice turn to see STT quality diagnostics."),
|
|
4359
|
+
model.value.error ? h13("p", { class: "absolute-voice-turn-quality__error" }, model.value.error) : null
|
|
4084
4360
|
]);
|
|
4085
4361
|
}
|
|
4086
4362
|
});
|
|
4087
4363
|
// src/vue/useVoiceLiveOps.ts
|
|
4088
|
-
import { onUnmounted as onUnmounted14, ref as
|
|
4364
|
+
import { onUnmounted as onUnmounted14, ref as ref11, shallowRef as shallowRef13 } from "vue";
|
|
4089
4365
|
|
|
4090
4366
|
// src/client/liveOps.ts
|
|
4091
4367
|
var postVoiceLiveOpsAction = async (input, options = {}) => {
|
|
@@ -4176,11 +4452,11 @@ var createVoiceLiveOpsStore = (options = {}) => {
|
|
|
4176
4452
|
// src/vue/useVoiceLiveOps.ts
|
|
4177
4453
|
function useVoiceLiveOps(options = {}) {
|
|
4178
4454
|
const store = createVoiceLiveOpsStore(options);
|
|
4179
|
-
const error =
|
|
4180
|
-
const isRunning =
|
|
4455
|
+
const error = ref11(null);
|
|
4456
|
+
const isRunning = ref11(false);
|
|
4181
4457
|
const lastResult = shallowRef13(undefined);
|
|
4182
|
-
const runningAction =
|
|
4183
|
-
const updatedAt =
|
|
4458
|
+
const runningAction = ref11(undefined);
|
|
4459
|
+
const updatedAt = ref11(undefined);
|
|
4184
4460
|
const sync = () => {
|
|
4185
4461
|
const snapshot = store.getSnapshot();
|
|
4186
4462
|
error.value = snapshot.error;
|
|
@@ -4361,7 +4637,7 @@ function useVoiceCampaignDialerProof(path = "/api/voice/campaigns/dialer-proof",
|
|
|
4361
4637
|
};
|
|
4362
4638
|
}
|
|
4363
4639
|
// src/vue/useVoiceStream.ts
|
|
4364
|
-
import { onUnmounted as onUnmounted16, ref as
|
|
4640
|
+
import { onUnmounted as onUnmounted16, ref as ref12, shallowRef as shallowRef15 } from "vue";
|
|
4365
4641
|
|
|
4366
4642
|
// src/client/actions.ts
|
|
4367
4643
|
var normalizeErrorMessage = (value) => {
|
|
@@ -5009,12 +5285,12 @@ function useVoiceStream(path, options = {}) {
|
|
|
5009
5285
|
const assistantAudio = shallowRef15([]);
|
|
5010
5286
|
const assistantTexts = shallowRef15([]);
|
|
5011
5287
|
const call = shallowRef15(null);
|
|
5012
|
-
const error =
|
|
5013
|
-
const isConnected =
|
|
5014
|
-
const partial =
|
|
5288
|
+
const error = ref12(null);
|
|
5289
|
+
const isConnected = ref12(false);
|
|
5290
|
+
const partial = ref12("");
|
|
5015
5291
|
const reconnect = shallowRef15(stream.reconnect);
|
|
5016
|
-
const sessionId =
|
|
5017
|
-
const status =
|
|
5292
|
+
const sessionId = ref12(stream.sessionId);
|
|
5293
|
+
const status = ref12(stream.status);
|
|
5018
5294
|
const turns = shallowRef15([]);
|
|
5019
5295
|
const sync = () => {
|
|
5020
5296
|
assistantAudio.value = [...stream.assistantAudio];
|
|
@@ -5053,7 +5329,7 @@ function useVoiceStream(path, options = {}) {
|
|
|
5053
5329
|
};
|
|
5054
5330
|
}
|
|
5055
5331
|
// src/vue/useVoiceController.ts
|
|
5056
|
-
import { onUnmounted as onUnmounted17, ref as
|
|
5332
|
+
import { onUnmounted as onUnmounted17, ref as ref13, shallowRef as shallowRef16 } from "vue";
|
|
5057
5333
|
|
|
5058
5334
|
// src/client/htmx.ts
|
|
5059
5335
|
var DEFAULT_EVENT_NAME = "voice-refresh";
|
|
@@ -5701,14 +5977,14 @@ function useVoiceController(path, options = {}) {
|
|
|
5701
5977
|
const controller = createVoiceController(path, options);
|
|
5702
5978
|
const assistantAudio = shallowRef16([]);
|
|
5703
5979
|
const assistantTexts = shallowRef16([]);
|
|
5704
|
-
const error =
|
|
5705
|
-
const isConnected =
|
|
5706
|
-
const isRecording =
|
|
5707
|
-
const partial =
|
|
5980
|
+
const error = ref13(null);
|
|
5981
|
+
const isConnected = ref13(false);
|
|
5982
|
+
const isRecording = ref13(false);
|
|
5983
|
+
const partial = ref13("");
|
|
5708
5984
|
const reconnect = shallowRef16(controller.reconnect);
|
|
5709
|
-
const recordingError =
|
|
5710
|
-
const sessionId =
|
|
5711
|
-
const status =
|
|
5985
|
+
const recordingError = ref13(null);
|
|
5986
|
+
const sessionId = ref13(controller.sessionId);
|
|
5987
|
+
const status = ref13(controller.status);
|
|
5712
5988
|
const turns = shallowRef16([]);
|
|
5713
5989
|
const sync = () => {
|
|
5714
5990
|
assistantAudio.value = [...controller.assistantAudio];
|
|
@@ -5752,13 +6028,13 @@ function useVoiceController(path, options = {}) {
|
|
|
5752
6028
|
};
|
|
5753
6029
|
}
|
|
5754
6030
|
// src/vue/useVoiceTraceTimeline.ts
|
|
5755
|
-
import { onUnmounted as onUnmounted18, ref as
|
|
6031
|
+
import { onUnmounted as onUnmounted18, ref as ref14, shallowRef as shallowRef17 } from "vue";
|
|
5756
6032
|
function useVoiceTraceTimeline(path = "/api/voice-traces", options = {}) {
|
|
5757
6033
|
const store = createVoiceTraceTimelineStore(path, options);
|
|
5758
|
-
const error =
|
|
5759
|
-
const isLoading =
|
|
6034
|
+
const error = ref14(null);
|
|
6035
|
+
const isLoading = ref14(false);
|
|
5760
6036
|
const report = shallowRef17(null);
|
|
5761
|
-
const updatedAt =
|
|
6037
|
+
const updatedAt = ref14(undefined);
|
|
5762
6038
|
const sync = () => {
|
|
5763
6039
|
const snapshot = store.getSnapshot();
|
|
5764
6040
|
error.value = snapshot.error;
|
|
@@ -5782,7 +6058,7 @@ function useVoiceTraceTimeline(path = "/api/voice-traces", options = {}) {
|
|
|
5782
6058
|
};
|
|
5783
6059
|
}
|
|
5784
6060
|
// src/vue/useVoiceWorkflowStatus.ts
|
|
5785
|
-
import { onUnmounted as onUnmounted19, ref as
|
|
6061
|
+
import { onUnmounted as onUnmounted19, ref as ref15, shallowRef as shallowRef18 } from "vue";
|
|
5786
6062
|
|
|
5787
6063
|
// src/client/workflowStatus.ts
|
|
5788
6064
|
var fetchVoiceWorkflowStatus = async (path = "/evals/scenarios/json", options = {}) => {
|
|
@@ -5866,10 +6142,10 @@ var createVoiceWorkflowStatusStore = (path = "/evals/scenarios/json", options =
|
|
|
5866
6142
|
// src/vue/useVoiceWorkflowStatus.ts
|
|
5867
6143
|
function useVoiceWorkflowStatus(path = "/evals/scenarios/json", options = {}) {
|
|
5868
6144
|
const store = createVoiceWorkflowStatusStore(path, options);
|
|
5869
|
-
const error =
|
|
5870
|
-
const isLoading =
|
|
6145
|
+
const error = ref15(null);
|
|
6146
|
+
const isLoading = ref15(false);
|
|
5871
6147
|
const report = shallowRef18(undefined);
|
|
5872
|
-
const updatedAt =
|
|
6148
|
+
const updatedAt = ref15(undefined);
|
|
5873
6149
|
const sync = () => {
|
|
5874
6150
|
const snapshot = store.getSnapshot();
|
|
5875
6151
|
error.value = snapshot.error;
|
|
@@ -5901,6 +6177,7 @@ export {
|
|
|
5901
6177
|
useVoiceTraceTimeline,
|
|
5902
6178
|
useVoiceStream,
|
|
5903
6179
|
useVoiceRoutingStatus,
|
|
6180
|
+
useVoiceReadinessFailures,
|
|
5904
6181
|
useVoiceProviderStatus,
|
|
5905
6182
|
useVoiceProviderSimulationControls,
|
|
5906
6183
|
useVoiceProviderContracts,
|
|
@@ -5917,6 +6194,7 @@ export {
|
|
|
5917
6194
|
VoiceTurnQuality,
|
|
5918
6195
|
VoiceTurnLatency,
|
|
5919
6196
|
VoiceRoutingStatus,
|
|
6197
|
+
VoiceReadinessFailures,
|
|
5920
6198
|
VoiceProviderStatus,
|
|
5921
6199
|
VoiceProviderSimulationControls,
|
|
5922
6200
|
VoiceProviderContracts,
|