@absolutejs/voice 0.0.22-beta.404 → 0.0.22-beta.406
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/README.md +118 -0
- package/dist/angular/index.d.ts +1 -0
- package/dist/angular/index.js +333 -214
- package/dist/angular/voice-call-debugger.service.d.ts +12 -0
- package/dist/react/VoiceCallDebuggerLaunch.d.ts +6 -0
- package/dist/react/index.d.ts +2 -0
- package/dist/react/index.js +739 -483
- package/dist/react/useVoiceCallDebugger.d.ts +8 -0
- package/dist/svelte/createVoiceCallDebugger.d.ts +12 -0
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +338 -152
- package/dist/vue/VoiceCallDebuggerLaunch.d.ts +68 -0
- package/dist/vue/index.d.ts +2 -0
- package/dist/vue/index.js +628 -364
- package/dist/vue/useVoiceCallDebugger.d.ts +10 -0
- package/package.json +1 -1
package/dist/vue/index.js
CHANGED
|
@@ -5565,8 +5565,270 @@ var VoiceProofTrends = defineComponent5({
|
|
|
5565
5565
|
};
|
|
5566
5566
|
}
|
|
5567
5567
|
});
|
|
5568
|
+
// src/vue/VoiceCallDebuggerLaunch.ts
|
|
5569
|
+
import { computed as computed2, defineComponent as defineComponent6, h as h6 } from "vue";
|
|
5570
|
+
|
|
5571
|
+
// src/client/callDebugger.ts
|
|
5572
|
+
var fetchVoiceCallDebugger = async (path, options = {}) => {
|
|
5573
|
+
const fetchImpl = options.fetch ?? globalThis.fetch;
|
|
5574
|
+
const response = await fetchImpl(path);
|
|
5575
|
+
if (!response.ok) {
|
|
5576
|
+
throw new Error(`Voice call debugger failed: HTTP ${response.status}`);
|
|
5577
|
+
}
|
|
5578
|
+
return await response.json();
|
|
5579
|
+
};
|
|
5580
|
+
var createVoiceCallDebuggerStore = (path, options = {}) => {
|
|
5581
|
+
const listeners = new Set;
|
|
5582
|
+
let closed = false;
|
|
5583
|
+
let timer;
|
|
5584
|
+
let snapshot = {
|
|
5585
|
+
error: null,
|
|
5586
|
+
isLoading: false
|
|
5587
|
+
};
|
|
5588
|
+
const emit = () => {
|
|
5589
|
+
for (const listener of listeners) {
|
|
5590
|
+
listener();
|
|
5591
|
+
}
|
|
5592
|
+
};
|
|
5593
|
+
const refresh = async () => {
|
|
5594
|
+
if (closed) {
|
|
5595
|
+
return snapshot.report;
|
|
5596
|
+
}
|
|
5597
|
+
snapshot = { ...snapshot, error: null, isLoading: true };
|
|
5598
|
+
emit();
|
|
5599
|
+
try {
|
|
5600
|
+
const report = await fetchVoiceCallDebugger(path, options);
|
|
5601
|
+
snapshot = {
|
|
5602
|
+
error: null,
|
|
5603
|
+
isLoading: false,
|
|
5604
|
+
report,
|
|
5605
|
+
updatedAt: Date.now()
|
|
5606
|
+
};
|
|
5607
|
+
emit();
|
|
5608
|
+
return report;
|
|
5609
|
+
} catch (error) {
|
|
5610
|
+
snapshot = {
|
|
5611
|
+
...snapshot,
|
|
5612
|
+
error: error instanceof Error ? error.message : String(error),
|
|
5613
|
+
isLoading: false
|
|
5614
|
+
};
|
|
5615
|
+
emit();
|
|
5616
|
+
throw error;
|
|
5617
|
+
}
|
|
5618
|
+
};
|
|
5619
|
+
const close = () => {
|
|
5620
|
+
closed = true;
|
|
5621
|
+
if (timer) {
|
|
5622
|
+
clearInterval(timer);
|
|
5623
|
+
timer = undefined;
|
|
5624
|
+
}
|
|
5625
|
+
listeners.clear();
|
|
5626
|
+
};
|
|
5627
|
+
if (options.intervalMs && options.intervalMs > 0) {
|
|
5628
|
+
timer = setInterval(() => {
|
|
5629
|
+
refresh().catch(() => {});
|
|
5630
|
+
}, options.intervalMs);
|
|
5631
|
+
}
|
|
5632
|
+
return {
|
|
5633
|
+
close,
|
|
5634
|
+
getServerSnapshot: () => snapshot,
|
|
5635
|
+
getSnapshot: () => snapshot,
|
|
5636
|
+
refresh,
|
|
5637
|
+
subscribe: (listener) => {
|
|
5638
|
+
listeners.add(listener);
|
|
5639
|
+
return () => {
|
|
5640
|
+
listeners.delete(listener);
|
|
5641
|
+
};
|
|
5642
|
+
}
|
|
5643
|
+
};
|
|
5644
|
+
};
|
|
5645
|
+
|
|
5646
|
+
// src/client/callDebuggerWidget.ts
|
|
5647
|
+
var DEFAULT_TITLE6 = "Call Debugger";
|
|
5648
|
+
var DEFAULT_DESCRIPTION6 = "Open the latest call artifact with snapshot, operations record, failure replay, provider path, transcript, and incident markdown.";
|
|
5649
|
+
var DEFAULT_LINK_LABEL = "Open debugger";
|
|
5650
|
+
var escapeHtml11 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
5651
|
+
var defaultHref = (path, report) => {
|
|
5652
|
+
if (path.startsWith("/api/voice-call-debugger/")) {
|
|
5653
|
+
return path.replace("/api/voice-call-debugger/", "/voice-call-debugger/");
|
|
5654
|
+
}
|
|
5655
|
+
return report ? `/voice-call-debugger/${encodeURIComponent(report.sessionId)}` : path;
|
|
5656
|
+
};
|
|
5657
|
+
var resolveHref = (path, state, options) => {
|
|
5658
|
+
if (typeof options.href === "function") {
|
|
5659
|
+
return options.href({ report: state.report });
|
|
5660
|
+
}
|
|
5661
|
+
return options.href ?? defaultHref(path, state.report);
|
|
5662
|
+
};
|
|
5663
|
+
var createVoiceCallDebuggerLaunchViewModel = (path, state, options = {}) => {
|
|
5664
|
+
const report = state.report;
|
|
5665
|
+
const href = resolveHref(path, state, options);
|
|
5666
|
+
return {
|
|
5667
|
+
description: options.description ?? DEFAULT_DESCRIPTION6,
|
|
5668
|
+
error: state.error,
|
|
5669
|
+
href,
|
|
5670
|
+
isLoading: state.isLoading,
|
|
5671
|
+
label: state.error ? "Unavailable" : report ? `${report.status} \xB7 ${report.sessionId}` : state.isLoading ? "Loading" : "No call loaded",
|
|
5672
|
+
rows: report ? [
|
|
5673
|
+
{ label: "Events", value: String(report.operationsRecord.summary.eventCount) },
|
|
5674
|
+
{ label: "Turns", value: String(report.operationsRecord.summary.turnCount) },
|
|
5675
|
+
{ label: "Errors", value: String(report.operationsRecord.summary.errorCount) },
|
|
5676
|
+
{
|
|
5677
|
+
label: "Provider recovery",
|
|
5678
|
+
value: report.operationsRecord.providerDecisionSummary.recoveryStatus
|
|
5679
|
+
},
|
|
5680
|
+
{
|
|
5681
|
+
label: "Fallbacks",
|
|
5682
|
+
value: String(report.operationsRecord.providerDecisionSummary.fallbacks)
|
|
5683
|
+
},
|
|
5684
|
+
{ label: "Snapshot", value: report.snapshot.status }
|
|
5685
|
+
] : [],
|
|
5686
|
+
status: state.error ? "error" : report ? report.status === "healthy" ? "ready" : "warning" : state.isLoading ? "loading" : "empty",
|
|
5687
|
+
title: options.title ?? DEFAULT_TITLE6,
|
|
5688
|
+
updatedAt: state.updatedAt
|
|
5689
|
+
};
|
|
5690
|
+
};
|
|
5691
|
+
var renderVoiceCallDebuggerLaunchHTML = (path, state, options = {}) => {
|
|
5692
|
+
const model = createVoiceCallDebuggerLaunchViewModel(path, state, options);
|
|
5693
|
+
const rows = model.rows.length ? `<dl>${model.rows.map((row) => `<div>
|
|
5694
|
+
<dt>${escapeHtml11(row.label)}</dt>
|
|
5695
|
+
<dd>${escapeHtml11(row.value)}</dd>
|
|
5696
|
+
</div>`).join("")}</dl>` : '<p class="absolute-voice-call-debugger-launch__empty">Load a call debugger report to see the latest support artifact.</p>';
|
|
5697
|
+
return `<section class="absolute-voice-call-debugger-launch absolute-voice-call-debugger-launch--${escapeHtml11(model.status)}">
|
|
5698
|
+
<header class="absolute-voice-call-debugger-launch__header">
|
|
5699
|
+
<span class="absolute-voice-call-debugger-launch__eyebrow">${escapeHtml11(model.title)}</span>
|
|
5700
|
+
<strong class="absolute-voice-call-debugger-launch__label">${escapeHtml11(model.label)}</strong>
|
|
5701
|
+
</header>
|
|
5702
|
+
<p class="absolute-voice-call-debugger-launch__description">${escapeHtml11(model.description)}</p>
|
|
5703
|
+
<a class="absolute-voice-call-debugger-launch__link" href="${escapeHtml11(model.href)}">${escapeHtml11(options.linkLabel ?? DEFAULT_LINK_LABEL)}</a>
|
|
5704
|
+
${rows}
|
|
5705
|
+
${model.error ? `<p class="absolute-voice-call-debugger-launch__error">${escapeHtml11(model.error)}</p>` : ""}
|
|
5706
|
+
</section>`;
|
|
5707
|
+
};
|
|
5708
|
+
var mountVoiceCallDebuggerLaunch = (element, path, options = {}) => {
|
|
5709
|
+
const store = createVoiceCallDebuggerStore(path, options);
|
|
5710
|
+
const render = () => {
|
|
5711
|
+
element.innerHTML = renderVoiceCallDebuggerLaunchHTML(path, store.getSnapshot(), options);
|
|
5712
|
+
};
|
|
5713
|
+
const unsubscribe = store.subscribe(render);
|
|
5714
|
+
render();
|
|
5715
|
+
store.refresh().catch(() => {});
|
|
5716
|
+
return {
|
|
5717
|
+
close: () => {
|
|
5718
|
+
unsubscribe();
|
|
5719
|
+
store.close();
|
|
5720
|
+
},
|
|
5721
|
+
refresh: store.refresh
|
|
5722
|
+
};
|
|
5723
|
+
};
|
|
5724
|
+
var defineVoiceCallDebuggerLaunchElement = (tagName = "absolute-voice-call-debugger-launch") => {
|
|
5725
|
+
if (typeof window === "undefined" || typeof customElements === "undefined" || customElements.get(tagName)) {
|
|
5726
|
+
return;
|
|
5727
|
+
}
|
|
5728
|
+
customElements.define(tagName, class AbsoluteVoiceCallDebuggerLaunchElement extends HTMLElement {
|
|
5729
|
+
mounted;
|
|
5730
|
+
connectedCallback() {
|
|
5731
|
+
const intervalMs = Number(this.getAttribute("interval-ms") ?? 0);
|
|
5732
|
+
this.mounted = mountVoiceCallDebuggerLaunch(this, this.getAttribute("path") ?? "/api/voice-call-debugger/latest", {
|
|
5733
|
+
description: this.getAttribute("description") ?? undefined,
|
|
5734
|
+
href: this.getAttribute("href") ?? undefined,
|
|
5735
|
+
intervalMs: Number.isFinite(intervalMs) ? intervalMs : 0,
|
|
5736
|
+
linkLabel: this.getAttribute("link-label") ?? undefined,
|
|
5737
|
+
title: this.getAttribute("title") ?? undefined
|
|
5738
|
+
});
|
|
5739
|
+
}
|
|
5740
|
+
disconnectedCallback() {
|
|
5741
|
+
this.mounted?.close();
|
|
5742
|
+
this.mounted = undefined;
|
|
5743
|
+
}
|
|
5744
|
+
});
|
|
5745
|
+
};
|
|
5746
|
+
|
|
5747
|
+
// src/vue/useVoiceCallDebugger.ts
|
|
5748
|
+
import { computed, onUnmounted as onUnmounted6, shallowRef as shallowRef6 } from "vue";
|
|
5749
|
+
function useVoiceCallDebugger(path, options = {}) {
|
|
5750
|
+
const store = createVoiceCallDebuggerStore(path, options);
|
|
5751
|
+
const error = shallowRef6(null);
|
|
5752
|
+
const isLoading = shallowRef6(false);
|
|
5753
|
+
const report = shallowRef6();
|
|
5754
|
+
const updatedAt = shallowRef6();
|
|
5755
|
+
const sync = () => {
|
|
5756
|
+
const state = store.getSnapshot();
|
|
5757
|
+
error.value = state.error;
|
|
5758
|
+
isLoading.value = state.isLoading;
|
|
5759
|
+
report.value = state.report;
|
|
5760
|
+
updatedAt.value = state.updatedAt;
|
|
5761
|
+
};
|
|
5762
|
+
const unsubscribe = store.subscribe(sync);
|
|
5763
|
+
sync();
|
|
5764
|
+
store.refresh().catch(() => {});
|
|
5765
|
+
onUnmounted6(() => {
|
|
5766
|
+
unsubscribe();
|
|
5767
|
+
store.close();
|
|
5768
|
+
});
|
|
5769
|
+
return {
|
|
5770
|
+
close: store.close,
|
|
5771
|
+
error: computed(() => error.value),
|
|
5772
|
+
isLoading: computed(() => isLoading.value),
|
|
5773
|
+
refresh: store.refresh,
|
|
5774
|
+
report: computed(() => report.value),
|
|
5775
|
+
updatedAt: computed(() => updatedAt.value)
|
|
5776
|
+
};
|
|
5777
|
+
}
|
|
5778
|
+
|
|
5779
|
+
// src/vue/VoiceCallDebuggerLaunch.ts
|
|
5780
|
+
var VoiceCallDebuggerLaunch = defineComponent6({
|
|
5781
|
+
name: "VoiceCallDebuggerLaunch",
|
|
5782
|
+
props: {
|
|
5783
|
+
class: { default: "", type: String },
|
|
5784
|
+
description: { default: undefined, type: String },
|
|
5785
|
+
href: { default: undefined, type: String },
|
|
5786
|
+
intervalMs: { default: 0, type: Number },
|
|
5787
|
+
linkLabel: { default: undefined, type: String },
|
|
5788
|
+
path: { required: true, type: String },
|
|
5789
|
+
title: { default: undefined, type: String }
|
|
5790
|
+
},
|
|
5791
|
+
setup(props) {
|
|
5792
|
+
const options = {
|
|
5793
|
+
description: props.description,
|
|
5794
|
+
href: props.href,
|
|
5795
|
+
intervalMs: props.intervalMs,
|
|
5796
|
+
linkLabel: props.linkLabel,
|
|
5797
|
+
title: props.title
|
|
5798
|
+
};
|
|
5799
|
+
const state = useVoiceCallDebugger(props.path, options);
|
|
5800
|
+
const model = computed2(() => createVoiceCallDebuggerLaunchViewModel(props.path, {
|
|
5801
|
+
error: state.error.value,
|
|
5802
|
+
isLoading: state.isLoading.value,
|
|
5803
|
+
report: state.report.value,
|
|
5804
|
+
updatedAt: state.updatedAt.value
|
|
5805
|
+
}, options));
|
|
5806
|
+
return () => h6("section", {
|
|
5807
|
+
class: [
|
|
5808
|
+
"absolute-voice-call-debugger-launch",
|
|
5809
|
+
`absolute-voice-call-debugger-launch--${model.value.status}`,
|
|
5810
|
+
props.class
|
|
5811
|
+
]
|
|
5812
|
+
}, [
|
|
5813
|
+
h6("header", { class: "absolute-voice-call-debugger-launch__header" }, [
|
|
5814
|
+
h6("span", { class: "absolute-voice-call-debugger-launch__eyebrow" }, model.value.title),
|
|
5815
|
+
h6("strong", { class: "absolute-voice-call-debugger-launch__label" }, model.value.label)
|
|
5816
|
+
]),
|
|
5817
|
+
h6("p", { class: "absolute-voice-call-debugger-launch__description" }, model.value.description),
|
|
5818
|
+
h6("a", {
|
|
5819
|
+
class: "absolute-voice-call-debugger-launch__link",
|
|
5820
|
+
href: model.value.href
|
|
5821
|
+
}, props.linkLabel ?? "Open debugger"),
|
|
5822
|
+
model.value.rows.length ? h6("dl", model.value.rows.map((row) => h6("div", { key: row.label }, [
|
|
5823
|
+
h6("dt", row.label),
|
|
5824
|
+
h6("dd", row.value)
|
|
5825
|
+
]))) : h6("p", { class: "absolute-voice-call-debugger-launch__empty" }, "Load a call debugger report to see the latest support artifact."),
|
|
5826
|
+
model.value.error ? h6("p", { class: "absolute-voice-call-debugger-launch__error" }, model.value.error) : null
|
|
5827
|
+
]);
|
|
5828
|
+
}
|
|
5829
|
+
});
|
|
5568
5830
|
// src/vue/VoiceSessionSnapshot.ts
|
|
5569
|
-
import { computed, defineComponent as
|
|
5831
|
+
import { computed as computed3, defineComponent as defineComponent7, h as h7 } from "vue";
|
|
5570
5832
|
|
|
5571
5833
|
// src/client/sessionSnapshot.ts
|
|
5572
5834
|
var withTurnId = (path, turnId) => {
|
|
@@ -5662,10 +5924,10 @@ var createVoiceSessionSnapshotStore = (path, options = {}) => {
|
|
|
5662
5924
|
};
|
|
5663
5925
|
|
|
5664
5926
|
// src/client/sessionSnapshotWidget.ts
|
|
5665
|
-
var
|
|
5666
|
-
var
|
|
5927
|
+
var DEFAULT_TITLE7 = "Session Snapshot";
|
|
5928
|
+
var DEFAULT_DESCRIPTION7 = "Portable call artifact with media graph, provider routing, proof, quality, and telephony evidence.";
|
|
5667
5929
|
var DEFAULT_DOWNLOAD_LABEL = "Download snapshot";
|
|
5668
|
-
var
|
|
5930
|
+
var escapeHtml12 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
5669
5931
|
var formatStatus2 = (status) => status ?? "n/a";
|
|
5670
5932
|
var createVoiceSessionSnapshotViewModel = (state, options = {}) => {
|
|
5671
5933
|
const snapshot = state.snapshot;
|
|
@@ -5681,7 +5943,7 @@ var createVoiceSessionSnapshotViewModel = (state, options = {}) => {
|
|
|
5681
5943
|
label: artifact.label,
|
|
5682
5944
|
status: formatStatus2(artifact.status)
|
|
5683
5945
|
})) ?? [],
|
|
5684
|
-
description: options.description ??
|
|
5946
|
+
description: options.description ?? DEFAULT_DESCRIPTION7,
|
|
5685
5947
|
error: state.error,
|
|
5686
5948
|
isLoading: state.isLoading,
|
|
5687
5949
|
label: state.error ? "Unavailable" : snapshot ? `${snapshot.status} \xB7 ${snapshot.sessionId}` : state.isLoading ? "Loading" : "No snapshot",
|
|
@@ -5705,30 +5967,30 @@ var createVoiceSessionSnapshotViewModel = (state, options = {}) => {
|
|
|
5705
5967
|
] : [],
|
|
5706
5968
|
showDownload: snapshot !== undefined,
|
|
5707
5969
|
status: state.error ? "error" : snapshot ? snapshot.status === "pass" ? "ready" : "warning" : state.isLoading ? "loading" : "empty",
|
|
5708
|
-
title: options.title ??
|
|
5970
|
+
title: options.title ?? DEFAULT_TITLE7,
|
|
5709
5971
|
updatedAt: state.updatedAt
|
|
5710
5972
|
};
|
|
5711
5973
|
};
|
|
5712
5974
|
var renderVoiceSessionSnapshotHTML = (state, options = {}) => {
|
|
5713
5975
|
const model = createVoiceSessionSnapshotViewModel(state, options);
|
|
5714
5976
|
const rows = model.rows.length ? `<dl>${model.rows.map((row) => `<div>
|
|
5715
|
-
<dt>${
|
|
5716
|
-
<dd>${
|
|
5977
|
+
<dt>${escapeHtml12(row.label)}</dt>
|
|
5978
|
+
<dd>${escapeHtml12(row.value)}</dd>
|
|
5717
5979
|
</div>`).join("")}</dl>` : '<p class="absolute-voice-session-snapshot__empty">Load a session snapshot to see support diagnostics.</p>';
|
|
5718
5980
|
const artifacts = model.artifacts.length ? `<div class="absolute-voice-session-snapshot__artifacts">${model.artifacts.map((artifact) => {
|
|
5719
|
-
const body = `<strong>${
|
|
5720
|
-
return artifact.href ? `<a href="${
|
|
5981
|
+
const body = `<strong>${escapeHtml12(artifact.label)}</strong><span>${escapeHtml12(artifact.status)}</span>`;
|
|
5982
|
+
return artifact.href ? `<a href="${escapeHtml12(artifact.href)}">${body}</a>` : `<div>${body}</div>`;
|
|
5721
5983
|
}).join("")}</div>` : "";
|
|
5722
|
-
return `<section class="absolute-voice-session-snapshot absolute-voice-session-snapshot--${
|
|
5984
|
+
return `<section class="absolute-voice-session-snapshot absolute-voice-session-snapshot--${escapeHtml12(model.status)}">
|
|
5723
5985
|
<header class="absolute-voice-session-snapshot__header">
|
|
5724
|
-
<span class="absolute-voice-session-snapshot__eyebrow">${
|
|
5725
|
-
<strong class="absolute-voice-session-snapshot__label">${
|
|
5986
|
+
<span class="absolute-voice-session-snapshot__eyebrow">${escapeHtml12(model.title)}</span>
|
|
5987
|
+
<strong class="absolute-voice-session-snapshot__label">${escapeHtml12(model.label)}</strong>
|
|
5726
5988
|
</header>
|
|
5727
|
-
<p class="absolute-voice-session-snapshot__description">${
|
|
5728
|
-
${model.showDownload ? `<button class="absolute-voice-session-snapshot__download" data-absolute-voice-session-snapshot-download type="button">${
|
|
5989
|
+
<p class="absolute-voice-session-snapshot__description">${escapeHtml12(model.description)}</p>
|
|
5990
|
+
${model.showDownload ? `<button class="absolute-voice-session-snapshot__download" data-absolute-voice-session-snapshot-download type="button">${escapeHtml12(options.downloadLabel ?? DEFAULT_DOWNLOAD_LABEL)}</button>` : ""}
|
|
5729
5991
|
${rows}
|
|
5730
5992
|
${artifacts}
|
|
5731
|
-
${model.error ? `<p class="absolute-voice-session-snapshot__error">${
|
|
5993
|
+
${model.error ? `<p class="absolute-voice-session-snapshot__error">${escapeHtml12(model.error)}</p>` : ""}
|
|
5732
5994
|
</section>`;
|
|
5733
5995
|
};
|
|
5734
5996
|
var downloadBlob = (blob, filename) => {
|
|
@@ -5792,13 +6054,13 @@ var defineVoiceSessionSnapshotElement = (tagName = "absolute-voice-session-snaps
|
|
|
5792
6054
|
};
|
|
5793
6055
|
|
|
5794
6056
|
// src/vue/useVoiceSessionSnapshot.ts
|
|
5795
|
-
import { onUnmounted as
|
|
6057
|
+
import { onUnmounted as onUnmounted7, shallowRef as shallowRef7 } from "vue";
|
|
5796
6058
|
function useVoiceSessionSnapshot(path, options = {}) {
|
|
5797
6059
|
const store = createVoiceSessionSnapshotStore(path, options);
|
|
5798
|
-
const error =
|
|
5799
|
-
const isLoading =
|
|
5800
|
-
const snapshot =
|
|
5801
|
-
const updatedAt =
|
|
6060
|
+
const error = shallowRef7(null);
|
|
6061
|
+
const isLoading = shallowRef7(false);
|
|
6062
|
+
const snapshot = shallowRef7();
|
|
6063
|
+
const updatedAt = shallowRef7(undefined);
|
|
5802
6064
|
const sync = () => {
|
|
5803
6065
|
const state = store.getSnapshot();
|
|
5804
6066
|
error.value = state.error;
|
|
@@ -5809,7 +6071,7 @@ function useVoiceSessionSnapshot(path, options = {}) {
|
|
|
5809
6071
|
const unsubscribe = store.subscribe(sync);
|
|
5810
6072
|
sync();
|
|
5811
6073
|
store.refresh().catch(() => {});
|
|
5812
|
-
|
|
6074
|
+
onUnmounted7(() => {
|
|
5813
6075
|
unsubscribe();
|
|
5814
6076
|
store.close();
|
|
5815
6077
|
});
|
|
@@ -5824,7 +6086,7 @@ function useVoiceSessionSnapshot(path, options = {}) {
|
|
|
5824
6086
|
}
|
|
5825
6087
|
|
|
5826
6088
|
// src/vue/VoiceSessionSnapshot.ts
|
|
5827
|
-
var VoiceSessionSnapshot =
|
|
6089
|
+
var VoiceSessionSnapshot = defineComponent7({
|
|
5828
6090
|
name: "VoiceSessionSnapshot",
|
|
5829
6091
|
props: {
|
|
5830
6092
|
class: { default: "", type: String },
|
|
@@ -5844,39 +6106,39 @@ var VoiceSessionSnapshot = defineComponent6({
|
|
|
5844
6106
|
turnId: props.turnId
|
|
5845
6107
|
};
|
|
5846
6108
|
const state = useVoiceSessionSnapshot(props.path, options);
|
|
5847
|
-
const model =
|
|
6109
|
+
const model = computed3(() => createVoiceSessionSnapshotViewModel({
|
|
5848
6110
|
error: state.error.value,
|
|
5849
6111
|
isLoading: state.isLoading.value,
|
|
5850
6112
|
snapshot: state.snapshot.value,
|
|
5851
6113
|
updatedAt: state.updatedAt.value
|
|
5852
6114
|
}, options));
|
|
5853
|
-
return () =>
|
|
6115
|
+
return () => h7("section", {
|
|
5854
6116
|
class: [
|
|
5855
6117
|
"absolute-voice-session-snapshot",
|
|
5856
6118
|
`absolute-voice-session-snapshot--${model.value.status}`,
|
|
5857
6119
|
props.class
|
|
5858
6120
|
]
|
|
5859
6121
|
}, [
|
|
5860
|
-
|
|
5861
|
-
|
|
5862
|
-
|
|
6122
|
+
h7("header", { class: "absolute-voice-session-snapshot__header" }, [
|
|
6123
|
+
h7("span", { class: "absolute-voice-session-snapshot__eyebrow" }, model.value.title),
|
|
6124
|
+
h7("strong", { class: "absolute-voice-session-snapshot__label" }, model.value.label)
|
|
5863
6125
|
]),
|
|
5864
|
-
|
|
5865
|
-
model.value.showDownload ?
|
|
6126
|
+
h7("p", { class: "absolute-voice-session-snapshot__description" }, model.value.description),
|
|
6127
|
+
model.value.showDownload ? h7("button", {
|
|
5866
6128
|
class: "absolute-voice-session-snapshot__download",
|
|
5867
6129
|
onClick: () => state.download(),
|
|
5868
6130
|
type: "button"
|
|
5869
6131
|
}, props.downloadLabel ?? "Download snapshot") : null,
|
|
5870
|
-
model.value.rows.length ?
|
|
5871
|
-
|
|
5872
|
-
|
|
5873
|
-
]))) :
|
|
5874
|
-
model.value.error ?
|
|
6132
|
+
model.value.rows.length ? h7("dl", model.value.rows.map((row) => h7("div", { key: row.label }, [
|
|
6133
|
+
h7("dt", row.label),
|
|
6134
|
+
h7("dd", row.value)
|
|
6135
|
+
]))) : h7("p", { class: "absolute-voice-session-snapshot__empty" }, "Load a session snapshot to see support diagnostics."),
|
|
6136
|
+
model.value.error ? h7("p", { class: "absolute-voice-session-snapshot__error" }, model.value.error) : null
|
|
5875
6137
|
]);
|
|
5876
6138
|
}
|
|
5877
6139
|
});
|
|
5878
6140
|
// src/vue/VoiceReadinessFailures.ts
|
|
5879
|
-
import { defineComponent as
|
|
6141
|
+
import { defineComponent as defineComponent8, h as h8 } from "vue";
|
|
5880
6142
|
|
|
5881
6143
|
// src/client/readinessFailures.ts
|
|
5882
6144
|
var fetchVoiceReadinessFailures = async (path = "/api/production-readiness", options = {}) => {
|
|
@@ -5954,13 +6216,13 @@ var createVoiceReadinessFailuresStore = (path = "/api/production-readiness", opt
|
|
|
5954
6216
|
};
|
|
5955
6217
|
|
|
5956
6218
|
// src/client/readinessFailuresWidget.ts
|
|
5957
|
-
var
|
|
5958
|
-
var
|
|
6219
|
+
var DEFAULT_TITLE8 = "Readiness Gate Explanations";
|
|
6220
|
+
var DEFAULT_DESCRIPTION8 = "Structured reasons for calibrated production-readiness warnings and failures.";
|
|
5959
6221
|
var DEFAULT_LINKS3 = [
|
|
5960
6222
|
{ href: "/production-readiness", label: "Readiness page" },
|
|
5961
6223
|
{ href: "/voice/slo-readiness-thresholds", label: "Gate thresholds" }
|
|
5962
6224
|
];
|
|
5963
|
-
var
|
|
6225
|
+
var escapeHtml13 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
5964
6226
|
var formatExplanationValue = (value, unit) => {
|
|
5965
6227
|
if (value === undefined || value === null) {
|
|
5966
6228
|
return "n/a";
|
|
@@ -5988,36 +6250,36 @@ var createVoiceReadinessFailuresViewModel = (snapshot, options = {}) => {
|
|
|
5988
6250
|
const failures = snapshot.report?.checks.map(toFailureView).filter((value) => !!value) ?? [];
|
|
5989
6251
|
const hasOpenIssues = failures.length > 0;
|
|
5990
6252
|
return {
|
|
5991
|
-
description: options.description ??
|
|
6253
|
+
description: options.description ?? DEFAULT_DESCRIPTION8,
|
|
5992
6254
|
error: snapshot.error,
|
|
5993
6255
|
failures,
|
|
5994
6256
|
isLoading: snapshot.isLoading,
|
|
5995
6257
|
label: snapshot.error ? "Unavailable" : snapshot.report ? hasOpenIssues ? `${failures.length} calibrated gate issue(s)` : "No calibrated gate issues" : snapshot.isLoading ? "Checking" : "No readiness report",
|
|
5996
6258
|
links: options.links ?? DEFAULT_LINKS3,
|
|
5997
6259
|
status: snapshot.error ? "error" : snapshot.report ? hasOpenIssues ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
5998
|
-
title: options.title ??
|
|
6260
|
+
title: options.title ?? DEFAULT_TITLE8,
|
|
5999
6261
|
updatedAt: snapshot.updatedAt
|
|
6000
6262
|
};
|
|
6001
6263
|
};
|
|
6002
6264
|
var renderVoiceReadinessFailuresHTML = (snapshot, options = {}) => {
|
|
6003
6265
|
const model = createVoiceReadinessFailuresViewModel(snapshot, options);
|
|
6004
|
-
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--${
|
|
6005
|
-
<span>${
|
|
6006
|
-
<strong>${
|
|
6007
|
-
<p>Observed ${
|
|
6008
|
-
<p>${
|
|
6009
|
-
<p class="absolute-voice-readiness-failures__links">${failure.evidenceHref ? `<a href="${
|
|
6010
|
-
</article>`).join("")}</div>` : `<p class="absolute-voice-readiness-failures__empty">${model.error ?
|
|
6011
|
-
const links = model.links.length ? `<p class="absolute-voice-readiness-failures__links">${model.links.map((link) => `<a href="${
|
|
6012
|
-
return `<section class="absolute-voice-readiness-failures absolute-voice-readiness-failures--${
|
|
6266
|
+
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--${escapeHtml13(failure.status)}">
|
|
6267
|
+
<span>${escapeHtml13(failure.status.toUpperCase())}</span>
|
|
6268
|
+
<strong>${escapeHtml13(failure.label)}</strong>
|
|
6269
|
+
<p>Observed ${escapeHtml13(failure.observed)} against ${escapeHtml13(failure.thresholdLabel)} ${escapeHtml13(failure.threshold)}.</p>
|
|
6270
|
+
<p>${escapeHtml13(failure.remediation)}</p>
|
|
6271
|
+
<p class="absolute-voice-readiness-failures__links">${failure.evidenceHref ? `<a href="${escapeHtml13(failure.evidenceHref)}">Evidence</a>` : ""}${failure.sourceHref ? `<a href="${escapeHtml13(failure.sourceHref)}">Threshold source</a>` : ""}</p>
|
|
6272
|
+
</article>`).join("")}</div>` : `<p class="absolute-voice-readiness-failures__empty">${model.error ? escapeHtml13(model.error) : "No calibrated readiness gate explanations are open."}</p>`;
|
|
6273
|
+
const links = model.links.length ? `<p class="absolute-voice-readiness-failures__links">${model.links.map((link) => `<a href="${escapeHtml13(link.href)}">${escapeHtml13(link.label)}</a>`).join("")}</p>` : "";
|
|
6274
|
+
return `<section class="absolute-voice-readiness-failures absolute-voice-readiness-failures--${escapeHtml13(model.status)}">
|
|
6013
6275
|
<header class="absolute-voice-readiness-failures__header">
|
|
6014
|
-
<span class="absolute-voice-readiness-failures__eyebrow">${
|
|
6015
|
-
<strong class="absolute-voice-readiness-failures__label">${
|
|
6276
|
+
<span class="absolute-voice-readiness-failures__eyebrow">${escapeHtml13(model.title)}</span>
|
|
6277
|
+
<strong class="absolute-voice-readiness-failures__label">${escapeHtml13(model.label)}</strong>
|
|
6016
6278
|
</header>
|
|
6017
|
-
<p class="absolute-voice-readiness-failures__description">${
|
|
6279
|
+
<p class="absolute-voice-readiness-failures__description">${escapeHtml13(model.description)}</p>
|
|
6018
6280
|
${failures}
|
|
6019
6281
|
${links}
|
|
6020
|
-
${model.error ? `<p class="absolute-voice-readiness-failures__error">${
|
|
6282
|
+
${model.error ? `<p class="absolute-voice-readiness-failures__error">${escapeHtml13(model.error)}</p>` : ""}
|
|
6021
6283
|
</section>`;
|
|
6022
6284
|
};
|
|
6023
6285
|
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}`;
|
|
@@ -6091,7 +6353,7 @@ var useVoiceReadinessFailures = (path = "/api/production-readiness", options = {
|
|
|
6091
6353
|
};
|
|
6092
6354
|
|
|
6093
6355
|
// src/vue/VoiceReadinessFailures.ts
|
|
6094
|
-
var VoiceReadinessFailures =
|
|
6356
|
+
var VoiceReadinessFailures = defineComponent8({
|
|
6095
6357
|
name: "VoiceReadinessFailures",
|
|
6096
6358
|
props: {
|
|
6097
6359
|
description: String,
|
|
@@ -6119,40 +6381,40 @@ var VoiceReadinessFailures = defineComponent7({
|
|
|
6119
6381
|
intervalMs: props.intervalMs,
|
|
6120
6382
|
title: props.title
|
|
6121
6383
|
});
|
|
6122
|
-
return
|
|
6384
|
+
return h8("section", {
|
|
6123
6385
|
class: [
|
|
6124
6386
|
"absolute-voice-readiness-failures",
|
|
6125
6387
|
`absolute-voice-readiness-failures--${model.status}`
|
|
6126
6388
|
]
|
|
6127
6389
|
}, [
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6390
|
+
h8("header", { class: "absolute-voice-readiness-failures__header" }, [
|
|
6391
|
+
h8("span", { class: "absolute-voice-readiness-failures__eyebrow" }, model.title),
|
|
6392
|
+
h8("strong", { class: "absolute-voice-readiness-failures__label" }, model.label)
|
|
6131
6393
|
]),
|
|
6132
|
-
|
|
6133
|
-
model.failures.length ?
|
|
6394
|
+
h8("p", { class: "absolute-voice-readiness-failures__description" }, model.description),
|
|
6395
|
+
model.failures.length ? h8("div", { class: "absolute-voice-readiness-failures__items" }, model.failures.map((failure) => h8("article", {
|
|
6134
6396
|
class: [
|
|
6135
6397
|
"absolute-voice-readiness-failures__item",
|
|
6136
6398
|
`absolute-voice-readiness-failures__item--${failure.status}`
|
|
6137
6399
|
],
|
|
6138
6400
|
key: failure.label
|
|
6139
6401
|
}, [
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
failure.evidenceHref ?
|
|
6146
|
-
failure.sourceHref ?
|
|
6402
|
+
h8("span", failure.status.toUpperCase()),
|
|
6403
|
+
h8("strong", failure.label),
|
|
6404
|
+
h8("p", `Observed ${failure.observed} against ${failure.thresholdLabel} ${failure.threshold}.`),
|
|
6405
|
+
h8("p", failure.remediation),
|
|
6406
|
+
h8("p", { class: "absolute-voice-readiness-failures__links" }, [
|
|
6407
|
+
failure.evidenceHref ? h8("a", { href: failure.evidenceHref }, "Evidence") : null,
|
|
6408
|
+
failure.sourceHref ? h8("a", { href: failure.sourceHref }, "Threshold source") : null
|
|
6147
6409
|
])
|
|
6148
|
-
]))) :
|
|
6149
|
-
model.links.length ?
|
|
6410
|
+
]))) : h8("p", { class: "absolute-voice-readiness-failures__empty" }, model.error ?? "No calibrated readiness gate explanations are open."),
|
|
6411
|
+
model.links.length ? h8("p", { class: "absolute-voice-readiness-failures__links" }, model.links.map((link) => h8("a", { href: link.href, key: link.href }, link.label))) : null
|
|
6150
6412
|
]);
|
|
6151
6413
|
};
|
|
6152
6414
|
}
|
|
6153
6415
|
});
|
|
6154
6416
|
// src/vue/VoiceProviderSimulationControls.ts
|
|
6155
|
-
import { computed as
|
|
6417
|
+
import { computed as computed4, defineComponent as defineComponent9, h as h9 } from "vue";
|
|
6156
6418
|
|
|
6157
6419
|
// src/client/providerSimulationControls.ts
|
|
6158
6420
|
var postSimulation = async (pathPrefix, mode, provider, fetchImpl) => {
|
|
@@ -6234,7 +6496,7 @@ var createVoiceProviderSimulationControlsStore = (options) => {
|
|
|
6234
6496
|
};
|
|
6235
6497
|
|
|
6236
6498
|
// src/client/providerSimulationControlsWidget.ts
|
|
6237
|
-
var
|
|
6499
|
+
var escapeHtml14 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
6238
6500
|
var formatKind = (kind) => (kind ?? "stt").toUpperCase();
|
|
6239
6501
|
var createVoiceProviderSimulationControlsViewModel = (snapshot, options) => {
|
|
6240
6502
|
const configuredProviders = options.providers.filter((provider) => provider.configured !== false);
|
|
@@ -6254,18 +6516,18 @@ var createVoiceProviderSimulationControlsViewModel = (snapshot, options) => {
|
|
|
6254
6516
|
};
|
|
6255
6517
|
var renderVoiceProviderSimulationControlsHTML = (snapshot, options) => {
|
|
6256
6518
|
const model = createVoiceProviderSimulationControlsViewModel(snapshot, options);
|
|
6257
|
-
const failureButtons = model.failureProviders.map((provider) => `<button type="button" data-voice-provider-fail="${
|
|
6258
|
-
const recoveryButtons = model.providers.map((provider) => `<button type="button" data-voice-provider-recover="${
|
|
6519
|
+
const failureButtons = model.failureProviders.map((provider) => `<button type="button" data-voice-provider-fail="${escapeHtml14(provider.provider)}"${!model.canSimulateFailure || snapshot.isRunning ? " disabled" : ""}>Simulate ${escapeHtml14(provider.provider)} ${escapeHtml14(formatKind(options.kind))} failure</button>`).join("");
|
|
6520
|
+
const recoveryButtons = model.providers.map((provider) => `<button type="button" data-voice-provider-recover="${escapeHtml14(provider.provider)}"${snapshot.isRunning ? " disabled" : ""}>Mark ${escapeHtml14(provider.provider)} recovered</button>`).join("");
|
|
6259
6521
|
return `<section class="absolute-voice-provider-simulation absolute-voice-provider-simulation--${snapshot.error ? "error" : snapshot.isRunning ? "running" : "ready"}">
|
|
6260
6522
|
<header class="absolute-voice-provider-simulation__header">
|
|
6261
|
-
<span class="absolute-voice-provider-simulation__eyebrow">${
|
|
6262
|
-
<strong class="absolute-voice-provider-simulation__label">${
|
|
6523
|
+
<span class="absolute-voice-provider-simulation__eyebrow">${escapeHtml14(model.title)}</span>
|
|
6524
|
+
<strong class="absolute-voice-provider-simulation__label">${escapeHtml14(model.label)}</strong>
|
|
6263
6525
|
</header>
|
|
6264
|
-
<p class="absolute-voice-provider-simulation__description">${
|
|
6265
|
-
${model.canSimulateFailure ? "" : `<p class="absolute-voice-provider-simulation__empty">${
|
|
6526
|
+
<p class="absolute-voice-provider-simulation__description">${escapeHtml14(model.description)}</p>
|
|
6527
|
+
${model.canSimulateFailure ? "" : `<p class="absolute-voice-provider-simulation__empty">${escapeHtml14(options.fallbackRequiredMessage ?? "Configure fallback providers before simulating failure.")}</p>`}
|
|
6266
6528
|
<div class="absolute-voice-provider-simulation__actions">${failureButtons}${recoveryButtons}</div>
|
|
6267
|
-
${snapshot.error ? `<p class="absolute-voice-provider-simulation__error">${
|
|
6268
|
-
${model.resultText ? `<pre class="absolute-voice-provider-simulation__result">${
|
|
6529
|
+
${snapshot.error ? `<p class="absolute-voice-provider-simulation__error">${escapeHtml14(snapshot.error)}</p>` : ""}
|
|
6530
|
+
${model.resultText ? `<pre class="absolute-voice-provider-simulation__result">${escapeHtml14(model.resultText)}</pre>` : ""}
|
|
6269
6531
|
</section>`;
|
|
6270
6532
|
};
|
|
6271
6533
|
var bindVoiceProviderSimulationControls = (element, store) => {
|
|
@@ -6331,7 +6593,7 @@ var defineVoiceProviderSimulationControlsElement = (tagName = "absolute-voice-pr
|
|
|
6331
6593
|
};
|
|
6332
6594
|
|
|
6333
6595
|
// src/vue/useVoiceProviderSimulationControls.ts
|
|
6334
|
-
import { onUnmounted as
|
|
6596
|
+
import { onUnmounted as onUnmounted8, ref as ref7 } from "vue";
|
|
6335
6597
|
function useVoiceProviderSimulationControls(options) {
|
|
6336
6598
|
const store = createVoiceProviderSimulationControlsStore(options);
|
|
6337
6599
|
const error = ref7(null);
|
|
@@ -6351,7 +6613,7 @@ function useVoiceProviderSimulationControls(options) {
|
|
|
6351
6613
|
};
|
|
6352
6614
|
const unsubscribe = store.subscribe(sync);
|
|
6353
6615
|
sync();
|
|
6354
|
-
|
|
6616
|
+
onUnmounted8(() => {
|
|
6355
6617
|
unsubscribe();
|
|
6356
6618
|
store.close();
|
|
6357
6619
|
});
|
|
@@ -6367,7 +6629,7 @@ function useVoiceProviderSimulationControls(options) {
|
|
|
6367
6629
|
}
|
|
6368
6630
|
|
|
6369
6631
|
// src/vue/VoiceProviderSimulationControls.ts
|
|
6370
|
-
var VoiceProviderSimulationControls =
|
|
6632
|
+
var VoiceProviderSimulationControls = defineComponent9({
|
|
6371
6633
|
name: "VoiceProviderSimulationControls",
|
|
6372
6634
|
props: {
|
|
6373
6635
|
class: { default: "", type: String },
|
|
@@ -6398,7 +6660,7 @@ var VoiceProviderSimulationControls = defineComponent8({
|
|
|
6398
6660
|
title: props.title
|
|
6399
6661
|
};
|
|
6400
6662
|
const controls = useVoiceProviderSimulationControls(options);
|
|
6401
|
-
const model =
|
|
6663
|
+
const model = computed4(() => createVoiceProviderSimulationControlsViewModel({
|
|
6402
6664
|
error: controls.error.value,
|
|
6403
6665
|
isRunning: controls.isRunning.value,
|
|
6404
6666
|
lastResult: controls.lastResult.value,
|
|
@@ -6409,40 +6671,40 @@ var VoiceProviderSimulationControls = defineComponent8({
|
|
|
6409
6671
|
const run = (provider, mode) => {
|
|
6410
6672
|
controls.run(provider, mode).catch(() => {});
|
|
6411
6673
|
};
|
|
6412
|
-
return () =>
|
|
6674
|
+
return () => h9("section", {
|
|
6413
6675
|
class: [
|
|
6414
6676
|
"absolute-voice-provider-simulation",
|
|
6415
6677
|
`absolute-voice-provider-simulation--${controls.error.value ? "error" : controls.isRunning.value ? "running" : "ready"}`,
|
|
6416
6678
|
props.class
|
|
6417
6679
|
]
|
|
6418
6680
|
}, [
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6681
|
+
h9("header", { class: "absolute-voice-provider-simulation__header" }, [
|
|
6682
|
+
h9("span", { class: "absolute-voice-provider-simulation__eyebrow" }, model.value.title),
|
|
6683
|
+
h9("strong", { class: "absolute-voice-provider-simulation__label" }, model.value.label)
|
|
6422
6684
|
]),
|
|
6423
|
-
|
|
6424
|
-
model.value.canSimulateFailure ? null :
|
|
6425
|
-
|
|
6426
|
-
...model.value.failureProviders.map((provider) =>
|
|
6685
|
+
h9("p", { class: "absolute-voice-provider-simulation__description" }, model.value.description),
|
|
6686
|
+
model.value.canSimulateFailure ? null : h9("p", { class: "absolute-voice-provider-simulation__empty" }, props.fallbackRequiredMessage ?? "Configure fallback providers before simulating failure."),
|
|
6687
|
+
h9("div", { class: "absolute-voice-provider-simulation__actions" }, [
|
|
6688
|
+
...model.value.failureProviders.map((provider) => h9("button", {
|
|
6427
6689
|
disabled: !model.value.canSimulateFailure || controls.isRunning.value,
|
|
6428
6690
|
key: `fail-${provider.provider}`,
|
|
6429
6691
|
onClick: () => run(provider.provider, "failure"),
|
|
6430
6692
|
type: "button"
|
|
6431
6693
|
}, `Simulate ${provider.provider} ${props.kind.toUpperCase()} failure`)),
|
|
6432
|
-
...model.value.providers.map((provider) =>
|
|
6694
|
+
...model.value.providers.map((provider) => h9("button", {
|
|
6433
6695
|
disabled: controls.isRunning.value,
|
|
6434
6696
|
key: `recover-${provider.provider}`,
|
|
6435
6697
|
onClick: () => run(provider.provider, "recovery"),
|
|
6436
6698
|
type: "button"
|
|
6437
6699
|
}, `Mark ${provider.provider} recovered`))
|
|
6438
6700
|
]),
|
|
6439
|
-
controls.error.value ?
|
|
6440
|
-
model.value.resultText ?
|
|
6701
|
+
controls.error.value ? h9("p", { class: "absolute-voice-provider-simulation__error" }, controls.error.value) : null,
|
|
6702
|
+
model.value.resultText ? h9("pre", { class: "absolute-voice-provider-simulation__result" }, model.value.resultText) : null
|
|
6441
6703
|
]);
|
|
6442
6704
|
}
|
|
6443
6705
|
});
|
|
6444
6706
|
// src/vue/VoiceProviderCapabilities.ts
|
|
6445
|
-
import { computed as
|
|
6707
|
+
import { computed as computed5, defineComponent as defineComponent10, h as h10 } from "vue";
|
|
6446
6708
|
|
|
6447
6709
|
// src/client/providerCapabilities.ts
|
|
6448
6710
|
var fetchVoiceProviderCapabilities = async (path = "/api/provider-capabilities", options = {}) => {
|
|
@@ -6524,9 +6786,9 @@ var createVoiceProviderCapabilitiesStore = (path = "/api/provider-capabilities",
|
|
|
6524
6786
|
};
|
|
6525
6787
|
|
|
6526
6788
|
// src/client/providerCapabilitiesWidget.ts
|
|
6527
|
-
var
|
|
6528
|
-
var
|
|
6529
|
-
var
|
|
6789
|
+
var DEFAULT_TITLE9 = "Provider Capabilities";
|
|
6790
|
+
var DEFAULT_DESCRIPTION9 = "Configured, selected, and healthy voice providers for this deployment.";
|
|
6791
|
+
var escapeHtml15 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
6530
6792
|
var formatProvider = (provider) => provider.split(/[-_\s]+/).filter(Boolean).map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ") || provider;
|
|
6531
6793
|
var formatKind2 = (kind) => kind.toUpperCase();
|
|
6532
6794
|
var formatStatus3 = (status) => status.split("-").map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ");
|
|
@@ -6570,36 +6832,36 @@ var createVoiceProviderCapabilitiesViewModel = (snapshot, options = {}) => {
|
|
|
6570
6832
|
const selectedCount = snapshot.report?.selected ?? capabilities.filter((capability) => capability.selected).length;
|
|
6571
6833
|
return {
|
|
6572
6834
|
capabilities,
|
|
6573
|
-
description: options.description ??
|
|
6835
|
+
description: options.description ?? DEFAULT_DESCRIPTION9,
|
|
6574
6836
|
error: snapshot.error,
|
|
6575
6837
|
isLoading: snapshot.isLoading,
|
|
6576
6838
|
label: snapshot.error ? "Unavailable" : capabilities.length ? warningCount > 0 ? `${warningCount} needs attention` : `${selectedCount} selected` : snapshot.isLoading ? "Checking" : "No capabilities",
|
|
6577
6839
|
status: snapshot.error ? "error" : capabilities.length ? warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
6578
|
-
title: options.title ??
|
|
6840
|
+
title: options.title ?? DEFAULT_TITLE9,
|
|
6579
6841
|
updatedAt: snapshot.updatedAt
|
|
6580
6842
|
};
|
|
6581
6843
|
};
|
|
6582
6844
|
var renderVoiceProviderCapabilitiesHTML = (snapshot, options = {}) => {
|
|
6583
6845
|
const model = createVoiceProviderCapabilitiesViewModel(snapshot, options);
|
|
6584
|
-
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--${
|
|
6846
|
+
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--${escapeHtml15(capability.status)}">
|
|
6585
6847
|
<header>
|
|
6586
|
-
<strong>${
|
|
6587
|
-
<span>${
|
|
6848
|
+
<strong>${escapeHtml15(capability.label)}</strong>
|
|
6849
|
+
<span>${escapeHtml15(formatStatus3(capability.status))}</span>
|
|
6588
6850
|
</header>
|
|
6589
|
-
<p>${
|
|
6851
|
+
<p>${escapeHtml15(capability.detail)}</p>
|
|
6590
6852
|
<dl>${capability.rows.map((row) => `<div>
|
|
6591
|
-
<dt>${
|
|
6592
|
-
<dd>${
|
|
6853
|
+
<dt>${escapeHtml15(row.label)}</dt>
|
|
6854
|
+
<dd>${escapeHtml15(row.value)}</dd>
|
|
6593
6855
|
</div>`).join("")}</dl>
|
|
6594
6856
|
</article>`).join("")}</div>` : '<p class="absolute-voice-provider-capabilities__empty">Configure provider capabilities to see deployment coverage.</p>';
|
|
6595
|
-
return `<section class="absolute-voice-provider-capabilities absolute-voice-provider-capabilities--${
|
|
6857
|
+
return `<section class="absolute-voice-provider-capabilities absolute-voice-provider-capabilities--${escapeHtml15(model.status)}">
|
|
6596
6858
|
<header class="absolute-voice-provider-capabilities__header">
|
|
6597
|
-
<span class="absolute-voice-provider-capabilities__eyebrow">${
|
|
6598
|
-
<strong class="absolute-voice-provider-capabilities__label">${
|
|
6859
|
+
<span class="absolute-voice-provider-capabilities__eyebrow">${escapeHtml15(model.title)}</span>
|
|
6860
|
+
<strong class="absolute-voice-provider-capabilities__label">${escapeHtml15(model.label)}</strong>
|
|
6599
6861
|
</header>
|
|
6600
|
-
<p class="absolute-voice-provider-capabilities__description">${
|
|
6862
|
+
<p class="absolute-voice-provider-capabilities__description">${escapeHtml15(model.description)}</p>
|
|
6601
6863
|
${capabilities}
|
|
6602
|
-
${model.error ? `<p class="absolute-voice-provider-capabilities__error">${
|
|
6864
|
+
${model.error ? `<p class="absolute-voice-provider-capabilities__error">${escapeHtml15(model.error)}</p>` : ""}
|
|
6603
6865
|
</section>`;
|
|
6604
6866
|
};
|
|
6605
6867
|
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}`;
|
|
@@ -6641,13 +6903,13 @@ var defineVoiceProviderCapabilitiesElement = (tagName = "absolute-voice-provider
|
|
|
6641
6903
|
};
|
|
6642
6904
|
|
|
6643
6905
|
// src/vue/useVoiceProviderCapabilities.ts
|
|
6644
|
-
import { onUnmounted as
|
|
6906
|
+
import { onUnmounted as onUnmounted9, shallowRef as shallowRef8 } from "vue";
|
|
6645
6907
|
function useVoiceProviderCapabilities(path = "/api/provider-capabilities", options = {}) {
|
|
6646
6908
|
const store = createVoiceProviderCapabilitiesStore(path, options);
|
|
6647
|
-
const error =
|
|
6648
|
-
const isLoading =
|
|
6649
|
-
const report =
|
|
6650
|
-
const updatedAt =
|
|
6909
|
+
const error = shallowRef8(null);
|
|
6910
|
+
const isLoading = shallowRef8(false);
|
|
6911
|
+
const report = shallowRef8();
|
|
6912
|
+
const updatedAt = shallowRef8(undefined);
|
|
6651
6913
|
const sync = () => {
|
|
6652
6914
|
const snapshot = store.getSnapshot();
|
|
6653
6915
|
error.value = snapshot.error;
|
|
@@ -6658,7 +6920,7 @@ function useVoiceProviderCapabilities(path = "/api/provider-capabilities", optio
|
|
|
6658
6920
|
const unsubscribe = store.subscribe(sync);
|
|
6659
6921
|
sync();
|
|
6660
6922
|
store.refresh().catch(() => {});
|
|
6661
|
-
|
|
6923
|
+
onUnmounted9(() => {
|
|
6662
6924
|
unsubscribe();
|
|
6663
6925
|
store.close();
|
|
6664
6926
|
});
|
|
@@ -6672,7 +6934,7 @@ function useVoiceProviderCapabilities(path = "/api/provider-capabilities", optio
|
|
|
6672
6934
|
}
|
|
6673
6935
|
|
|
6674
6936
|
// src/vue/VoiceProviderCapabilities.ts
|
|
6675
|
-
var VoiceProviderCapabilities =
|
|
6937
|
+
var VoiceProviderCapabilities = defineComponent10({
|
|
6676
6938
|
name: "VoiceProviderCapabilities",
|
|
6677
6939
|
props: {
|
|
6678
6940
|
class: {
|
|
@@ -6703,50 +6965,50 @@ var VoiceProviderCapabilities = defineComponent9({
|
|
|
6703
6965
|
title: props.title
|
|
6704
6966
|
};
|
|
6705
6967
|
const capabilities = useVoiceProviderCapabilities(props.path, options);
|
|
6706
|
-
const model =
|
|
6968
|
+
const model = computed5(() => createVoiceProviderCapabilitiesViewModel({
|
|
6707
6969
|
error: capabilities.error.value,
|
|
6708
6970
|
isLoading: capabilities.isLoading.value,
|
|
6709
6971
|
report: capabilities.report.value,
|
|
6710
6972
|
updatedAt: capabilities.updatedAt.value
|
|
6711
6973
|
}, options));
|
|
6712
|
-
return () =>
|
|
6974
|
+
return () => h10("section", {
|
|
6713
6975
|
class: [
|
|
6714
6976
|
"absolute-voice-provider-capabilities",
|
|
6715
6977
|
`absolute-voice-provider-capabilities--${model.value.status}`,
|
|
6716
6978
|
props.class
|
|
6717
6979
|
]
|
|
6718
6980
|
}, [
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6981
|
+
h10("header", { class: "absolute-voice-provider-capabilities__header" }, [
|
|
6982
|
+
h10("span", { class: "absolute-voice-provider-capabilities__eyebrow" }, model.value.title),
|
|
6983
|
+
h10("strong", { class: "absolute-voice-provider-capabilities__label" }, model.value.label)
|
|
6722
6984
|
]),
|
|
6723
|
-
|
|
6724
|
-
model.value.capabilities.length ?
|
|
6985
|
+
h10("p", { class: "absolute-voice-provider-capabilities__description" }, model.value.description),
|
|
6986
|
+
model.value.capabilities.length ? h10("div", { class: "absolute-voice-provider-capabilities__providers" }, model.value.capabilities.map((capability) => h10("article", {
|
|
6725
6987
|
class: [
|
|
6726
6988
|
"absolute-voice-provider-capabilities__provider",
|
|
6727
6989
|
`absolute-voice-provider-capabilities__provider--${capability.status}`
|
|
6728
6990
|
],
|
|
6729
6991
|
key: `${capability.kind}:${capability.provider}`
|
|
6730
6992
|
}, [
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6993
|
+
h10("header", [
|
|
6994
|
+
h10("strong", capability.label),
|
|
6995
|
+
h10("span", capability.status)
|
|
6734
6996
|
]),
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
|
|
6997
|
+
h10("p", capability.detail),
|
|
6998
|
+
h10("dl", capability.rows.map((row) => h10("div", { key: row.label }, [
|
|
6999
|
+
h10("dt", row.label),
|
|
7000
|
+
h10("dd", row.value)
|
|
6739
7001
|
])))
|
|
6740
|
-
]))) :
|
|
6741
|
-
model.value.error ?
|
|
7002
|
+
]))) : h10("p", { class: "absolute-voice-provider-capabilities__empty" }, "Configure provider capabilities to see deployment coverage."),
|
|
7003
|
+
model.value.error ? h10("p", { class: "absolute-voice-provider-capabilities__error" }, model.value.error) : null
|
|
6742
7004
|
]);
|
|
6743
7005
|
}
|
|
6744
7006
|
});
|
|
6745
7007
|
// src/vue/VoiceProviderContracts.ts
|
|
6746
|
-
import { defineComponent as
|
|
7008
|
+
import { defineComponent as defineComponent11, h as h11 } from "vue";
|
|
6747
7009
|
|
|
6748
7010
|
// src/vue/useVoiceProviderContracts.ts
|
|
6749
|
-
import { onUnmounted as
|
|
7011
|
+
import { onUnmounted as onUnmounted10, shallowRef as shallowRef9 } from "vue";
|
|
6750
7012
|
|
|
6751
7013
|
// src/client/providerContracts.ts
|
|
6752
7014
|
var fetchVoiceProviderContracts = async (path = "/api/provider-contracts", options = {}) => {
|
|
@@ -6826,10 +7088,10 @@ var createVoiceProviderContractsStore = (path = "/api/provider-contracts", optio
|
|
|
6826
7088
|
// src/vue/useVoiceProviderContracts.ts
|
|
6827
7089
|
function useVoiceProviderContracts(path = "/api/provider-contracts", options = {}) {
|
|
6828
7090
|
const store = createVoiceProviderContractsStore(path, options);
|
|
6829
|
-
const error =
|
|
6830
|
-
const isLoading =
|
|
6831
|
-
const report =
|
|
6832
|
-
const updatedAt =
|
|
7091
|
+
const error = shallowRef9(null);
|
|
7092
|
+
const isLoading = shallowRef9(false);
|
|
7093
|
+
const report = shallowRef9();
|
|
7094
|
+
const updatedAt = shallowRef9(undefined);
|
|
6833
7095
|
const sync = () => {
|
|
6834
7096
|
const snapshot = store.getSnapshot();
|
|
6835
7097
|
error.value = snapshot.error;
|
|
@@ -6840,7 +7102,7 @@ function useVoiceProviderContracts(path = "/api/provider-contracts", options = {
|
|
|
6840
7102
|
const unsubscribe = store.subscribe(sync);
|
|
6841
7103
|
sync();
|
|
6842
7104
|
store.refresh().catch(() => {});
|
|
6843
|
-
|
|
7105
|
+
onUnmounted10(() => {
|
|
6844
7106
|
unsubscribe();
|
|
6845
7107
|
store.close();
|
|
6846
7108
|
});
|
|
@@ -6854,9 +7116,9 @@ function useVoiceProviderContracts(path = "/api/provider-contracts", options = {
|
|
|
6854
7116
|
}
|
|
6855
7117
|
|
|
6856
7118
|
// src/client/providerContractsWidget.ts
|
|
6857
|
-
var
|
|
6858
|
-
var
|
|
6859
|
-
var
|
|
7119
|
+
var DEFAULT_TITLE10 = "Provider Contracts";
|
|
7120
|
+
var DEFAULT_DESCRIPTION10 = "Production contract coverage for provider env, latency, fallback, streaming, and capabilities.";
|
|
7121
|
+
var escapeHtml16 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
6860
7122
|
var formatProvider2 = (provider) => provider.split(/[-_\s]+/).filter(Boolean).map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ") || provider;
|
|
6861
7123
|
var formatStatus4 = (status) => status.split("-").map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ");
|
|
6862
7124
|
var contractDetail = (row) => {
|
|
@@ -6888,38 +7150,38 @@ var createVoiceProviderContractsViewModel = (snapshot, options = {}) => {
|
|
|
6888
7150
|
}));
|
|
6889
7151
|
const warningCount = snapshot.report ? snapshot.report.failed + snapshot.report.warned : rows.filter((row) => row.status !== "pass").length;
|
|
6890
7152
|
return {
|
|
6891
|
-
description: options.description ??
|
|
7153
|
+
description: options.description ?? DEFAULT_DESCRIPTION10,
|
|
6892
7154
|
error: snapshot.error,
|
|
6893
7155
|
isLoading: snapshot.isLoading,
|
|
6894
7156
|
label: snapshot.error ? "Unavailable" : rows.length ? warningCount > 0 ? `${warningCount} needs attention` : `${rows.length} passing` : snapshot.isLoading ? "Checking" : "No contracts",
|
|
6895
7157
|
rows,
|
|
6896
7158
|
status: snapshot.error ? "error" : rows.length ? warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
6897
|
-
title: options.title ??
|
|
7159
|
+
title: options.title ?? DEFAULT_TITLE10,
|
|
6898
7160
|
updatedAt: snapshot.updatedAt
|
|
6899
7161
|
};
|
|
6900
7162
|
};
|
|
6901
7163
|
var renderVoiceProviderContractsHTML = (snapshot, options = {}) => {
|
|
6902
7164
|
const model = createVoiceProviderContractsViewModel(snapshot, options);
|
|
6903
|
-
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--${
|
|
7165
|
+
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--${escapeHtml16(row.status)}">
|
|
6904
7166
|
<header>
|
|
6905
|
-
<strong>${
|
|
6906
|
-
<span>${
|
|
7167
|
+
<strong>${escapeHtml16(row.label)}</strong>
|
|
7168
|
+
<span>${escapeHtml16(formatStatus4(row.status))}</span>
|
|
6907
7169
|
</header>
|
|
6908
|
-
<p>${
|
|
6909
|
-
${row.remediations.length ? `<ul class="absolute-voice-provider-contracts__remediations">${row.remediations.map((remediation) => `<li>${remediation.href ? `<a href="${
|
|
7170
|
+
<p>${escapeHtml16(row.detail)}</p>
|
|
7171
|
+
${row.remediations.length ? `<ul class="absolute-voice-provider-contracts__remediations">${row.remediations.map((remediation) => `<li>${remediation.href ? `<a href="${escapeHtml16(remediation.href)}">${escapeHtml16(remediation.label)}</a>` : `<strong>${escapeHtml16(remediation.label)}</strong>`}<span>${escapeHtml16(remediation.detail)}</span></li>`).join("")}</ul>` : ""}
|
|
6910
7172
|
<dl>${row.rows.map((item) => `<div>
|
|
6911
|
-
<dt>${
|
|
6912
|
-
<dd>${
|
|
7173
|
+
<dt>${escapeHtml16(item.label)}</dt>
|
|
7174
|
+
<dd>${escapeHtml16(item.value)}</dd>
|
|
6913
7175
|
</div>`).join("")}</dl>
|
|
6914
7176
|
</article>`).join("")}</div>` : '<p class="absolute-voice-provider-contracts__empty">Configure provider contracts to see production coverage.</p>';
|
|
6915
|
-
return `<section class="absolute-voice-provider-contracts absolute-voice-provider-contracts--${
|
|
7177
|
+
return `<section class="absolute-voice-provider-contracts absolute-voice-provider-contracts--${escapeHtml16(model.status)}">
|
|
6916
7178
|
<header class="absolute-voice-provider-contracts__header">
|
|
6917
|
-
<span class="absolute-voice-provider-contracts__eyebrow">${
|
|
6918
|
-
<strong class="absolute-voice-provider-contracts__label">${
|
|
7179
|
+
<span class="absolute-voice-provider-contracts__eyebrow">${escapeHtml16(model.title)}</span>
|
|
7180
|
+
<strong class="absolute-voice-provider-contracts__label">${escapeHtml16(model.label)}</strong>
|
|
6919
7181
|
</header>
|
|
6920
|
-
<p class="absolute-voice-provider-contracts__description">${
|
|
7182
|
+
<p class="absolute-voice-provider-contracts__description">${escapeHtml16(model.description)}</p>
|
|
6921
7183
|
${rows}
|
|
6922
|
-
${model.error ? `<p class="absolute-voice-provider-contracts__error">${
|
|
7184
|
+
${model.error ? `<p class="absolute-voice-provider-contracts__error">${escapeHtml16(model.error)}</p>` : ""}
|
|
6923
7185
|
</section>`;
|
|
6924
7186
|
};
|
|
6925
7187
|
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}`;
|
|
@@ -6961,7 +7223,7 @@ var defineVoiceProviderContractsElement = (tagName = "absolute-voice-provider-co
|
|
|
6961
7223
|
};
|
|
6962
7224
|
|
|
6963
7225
|
// src/vue/VoiceProviderContracts.ts
|
|
6964
|
-
var VoiceProviderContracts =
|
|
7226
|
+
var VoiceProviderContracts = defineComponent11({
|
|
6965
7227
|
name: "VoiceProviderContracts",
|
|
6966
7228
|
props: {
|
|
6967
7229
|
description: String,
|
|
@@ -6989,49 +7251,49 @@ var VoiceProviderContracts = defineComponent10({
|
|
|
6989
7251
|
intervalMs: props.intervalMs,
|
|
6990
7252
|
title: props.title
|
|
6991
7253
|
});
|
|
6992
|
-
return
|
|
7254
|
+
return h11("section", {
|
|
6993
7255
|
class: [
|
|
6994
7256
|
"absolute-voice-provider-contracts",
|
|
6995
7257
|
`absolute-voice-provider-contracts--${model.status}`
|
|
6996
7258
|
]
|
|
6997
7259
|
}, [
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7260
|
+
h11("header", { class: "absolute-voice-provider-contracts__header" }, [
|
|
7261
|
+
h11("span", { class: "absolute-voice-provider-contracts__eyebrow" }, model.title),
|
|
7262
|
+
h11("strong", { class: "absolute-voice-provider-contracts__label" }, model.label)
|
|
7001
7263
|
]),
|
|
7002
|
-
|
|
7003
|
-
model.rows.length ?
|
|
7264
|
+
h11("p", { class: "absolute-voice-provider-contracts__description" }, model.description),
|
|
7265
|
+
model.rows.length ? h11("div", { class: "absolute-voice-provider-contracts__rows" }, model.rows.map((row) => h11("article", {
|
|
7004
7266
|
class: [
|
|
7005
7267
|
"absolute-voice-provider-contracts__row",
|
|
7006
7268
|
`absolute-voice-provider-contracts__row--${row.status}`
|
|
7007
7269
|
],
|
|
7008
7270
|
key: `${row.kind}:${row.provider}`
|
|
7009
7271
|
}, [
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7272
|
+
h11("header", [
|
|
7273
|
+
h11("strong", row.label),
|
|
7274
|
+
h11("span", row.status)
|
|
7013
7275
|
]),
|
|
7014
|
-
|
|
7015
|
-
row.remediations.length ?
|
|
7276
|
+
h11("p", row.detail),
|
|
7277
|
+
row.remediations.length ? h11("ul", {
|
|
7016
7278
|
class: "absolute-voice-provider-contracts__remediations"
|
|
7017
|
-
}, row.remediations.map((remediation) =>
|
|
7279
|
+
}, row.remediations.map((remediation) => h11("li", {
|
|
7018
7280
|
key: `${row.kind}:${row.provider}:${remediation.label}`
|
|
7019
7281
|
}, [
|
|
7020
|
-
remediation.href ?
|
|
7021
|
-
|
|
7282
|
+
remediation.href ? h11("a", { href: remediation.href }, remediation.label) : h11("strong", remediation.label),
|
|
7283
|
+
h11("span", remediation.detail)
|
|
7022
7284
|
]))) : null,
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7285
|
+
h11("dl", row.rows.map((item) => h11("div", { key: item.label }, [
|
|
7286
|
+
h11("dt", item.label),
|
|
7287
|
+
h11("dd", item.value)
|
|
7026
7288
|
])))
|
|
7027
|
-
]))) :
|
|
7028
|
-
model.error ?
|
|
7289
|
+
]))) : h11("p", { class: "absolute-voice-provider-contracts__empty" }, "Configure provider contracts to see production coverage."),
|
|
7290
|
+
model.error ? h11("p", { class: "absolute-voice-provider-contracts__error" }, model.error) : null
|
|
7029
7291
|
]);
|
|
7030
7292
|
};
|
|
7031
7293
|
}
|
|
7032
7294
|
});
|
|
7033
7295
|
// src/vue/VoiceProviderStatus.ts
|
|
7034
|
-
import { computed as
|
|
7296
|
+
import { computed as computed6, defineComponent as defineComponent12, h as h12 } from "vue";
|
|
7035
7297
|
|
|
7036
7298
|
// src/client/providerStatus.ts
|
|
7037
7299
|
var fetchVoiceProviderStatus = async (path = "/api/provider-status", options = {}) => {
|
|
@@ -7114,9 +7376,9 @@ var createVoiceProviderStatusStore = (path = "/api/provider-status", options = {
|
|
|
7114
7376
|
};
|
|
7115
7377
|
|
|
7116
7378
|
// src/client/providerStatusWidget.ts
|
|
7117
|
-
var
|
|
7118
|
-
var
|
|
7119
|
-
var
|
|
7379
|
+
var DEFAULT_TITLE11 = "Voice Providers";
|
|
7380
|
+
var DEFAULT_DESCRIPTION11 = "Live provider health, fallback counts, latency, and suppression state from your self-hosted trace store.";
|
|
7381
|
+
var escapeHtml17 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
7120
7382
|
var formatProvider3 = (provider) => provider.split(/[-_\s]+/).filter(Boolean).map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ") || provider;
|
|
7121
7383
|
var formatStatus5 = (status) => status.split("-").map((part) => `${part[0]?.toUpperCase() ?? ""}${part.slice(1)}`).join(" ");
|
|
7122
7384
|
var formatLatency = (value) => typeof value === "number" ? `${value}ms` : "No samples";
|
|
@@ -7160,37 +7422,37 @@ var createVoiceProviderStatusViewModel = (snapshot, options = {}) => {
|
|
|
7160
7422
|
const warningCount = providers.filter((provider) => isWarningStatus2(provider.status)).length;
|
|
7161
7423
|
const healthyCount = providers.filter((provider) => provider.status === "healthy").length;
|
|
7162
7424
|
return {
|
|
7163
|
-
description: options.description ??
|
|
7425
|
+
description: options.description ?? DEFAULT_DESCRIPTION11,
|
|
7164
7426
|
error: snapshot.error,
|
|
7165
7427
|
isLoading: snapshot.isLoading,
|
|
7166
7428
|
label: snapshot.error ? "Unavailable" : providers.length ? warningCount > 0 ? `${warningCount} needs attention` : `${healthyCount} healthy` : snapshot.isLoading ? "Checking" : "No provider traffic",
|
|
7167
7429
|
providers,
|
|
7168
7430
|
status: snapshot.error ? "error" : providers.length ? warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
7169
|
-
title: options.title ??
|
|
7431
|
+
title: options.title ?? DEFAULT_TITLE11,
|
|
7170
7432
|
updatedAt: snapshot.updatedAt
|
|
7171
7433
|
};
|
|
7172
7434
|
};
|
|
7173
7435
|
var renderVoiceProviderStatusHTML = (snapshot, options = {}) => {
|
|
7174
7436
|
const model = createVoiceProviderStatusViewModel(snapshot, options);
|
|
7175
|
-
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--${
|
|
7437
|
+
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--${escapeHtml17(provider.status)}">
|
|
7176
7438
|
<header>
|
|
7177
|
-
<strong>${
|
|
7178
|
-
<span>${
|
|
7439
|
+
<strong>${escapeHtml17(provider.label)}</strong>
|
|
7440
|
+
<span>${escapeHtml17(formatStatus5(provider.status))}</span>
|
|
7179
7441
|
</header>
|
|
7180
|
-
<p>${
|
|
7442
|
+
<p>${escapeHtml17(provider.detail)}</p>
|
|
7181
7443
|
<dl>${provider.rows.map((row) => `<div>
|
|
7182
|
-
<dt>${
|
|
7183
|
-
<dd>${
|
|
7444
|
+
<dt>${escapeHtml17(row.label)}</dt>
|
|
7445
|
+
<dd>${escapeHtml17(row.value)}</dd>
|
|
7184
7446
|
</div>`).join("")}</dl>
|
|
7185
7447
|
</article>`).join("")}</div>` : '<p class="absolute-voice-provider-status__empty">Run voice traffic to see provider health.</p>';
|
|
7186
|
-
return `<section class="absolute-voice-provider-status absolute-voice-provider-status--${
|
|
7448
|
+
return `<section class="absolute-voice-provider-status absolute-voice-provider-status--${escapeHtml17(model.status)}">
|
|
7187
7449
|
<header class="absolute-voice-provider-status__header">
|
|
7188
|
-
<span class="absolute-voice-provider-status__eyebrow">${
|
|
7189
|
-
<strong class="absolute-voice-provider-status__label">${
|
|
7450
|
+
<span class="absolute-voice-provider-status__eyebrow">${escapeHtml17(model.title)}</span>
|
|
7451
|
+
<strong class="absolute-voice-provider-status__label">${escapeHtml17(model.label)}</strong>
|
|
7190
7452
|
</header>
|
|
7191
|
-
<p class="absolute-voice-provider-status__description">${
|
|
7453
|
+
<p class="absolute-voice-provider-status__description">${escapeHtml17(model.description)}</p>
|
|
7192
7454
|
${providers}
|
|
7193
|
-
${model.error ? `<p class="absolute-voice-provider-status__error">${
|
|
7455
|
+
${model.error ? `<p class="absolute-voice-provider-status__error">${escapeHtml17(model.error)}</p>` : ""}
|
|
7194
7456
|
</section>`;
|
|
7195
7457
|
};
|
|
7196
7458
|
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}`;
|
|
@@ -7232,12 +7494,12 @@ var defineVoiceProviderStatusElement = (tagName = "absolute-voice-provider-statu
|
|
|
7232
7494
|
};
|
|
7233
7495
|
|
|
7234
7496
|
// src/vue/useVoiceProviderStatus.ts
|
|
7235
|
-
import { onUnmounted as
|
|
7497
|
+
import { onUnmounted as onUnmounted11, ref as ref8, shallowRef as shallowRef10 } from "vue";
|
|
7236
7498
|
function useVoiceProviderStatus(path = "/api/provider-status", options = {}) {
|
|
7237
7499
|
const store = createVoiceProviderStatusStore(path, options);
|
|
7238
7500
|
const error = ref8(null);
|
|
7239
7501
|
const isLoading = ref8(false);
|
|
7240
|
-
const providers =
|
|
7502
|
+
const providers = shallowRef10([]);
|
|
7241
7503
|
const updatedAt = ref8(undefined);
|
|
7242
7504
|
const sync = () => {
|
|
7243
7505
|
const snapshot = store.getSnapshot();
|
|
@@ -7249,7 +7511,7 @@ function useVoiceProviderStatus(path = "/api/provider-status", options = {}) {
|
|
|
7249
7511
|
const unsubscribe = store.subscribe(sync);
|
|
7250
7512
|
sync();
|
|
7251
7513
|
store.refresh().catch(() => {});
|
|
7252
|
-
|
|
7514
|
+
onUnmounted11(() => {
|
|
7253
7515
|
unsubscribe();
|
|
7254
7516
|
store.close();
|
|
7255
7517
|
});
|
|
@@ -7263,7 +7525,7 @@ function useVoiceProviderStatus(path = "/api/provider-status", options = {}) {
|
|
|
7263
7525
|
}
|
|
7264
7526
|
|
|
7265
7527
|
// src/vue/VoiceProviderStatus.ts
|
|
7266
|
-
var VoiceProviderStatus =
|
|
7528
|
+
var VoiceProviderStatus = defineComponent12({
|
|
7267
7529
|
name: "VoiceProviderStatus",
|
|
7268
7530
|
props: {
|
|
7269
7531
|
class: {
|
|
@@ -7294,47 +7556,47 @@ var VoiceProviderStatus = defineComponent11({
|
|
|
7294
7556
|
title: props.title
|
|
7295
7557
|
};
|
|
7296
7558
|
const status = useVoiceProviderStatus(props.path, options);
|
|
7297
|
-
const model =
|
|
7559
|
+
const model = computed6(() => createVoiceProviderStatusViewModel({
|
|
7298
7560
|
error: status.error.value,
|
|
7299
7561
|
isLoading: status.isLoading.value,
|
|
7300
7562
|
providers: status.providers.value,
|
|
7301
7563
|
updatedAt: status.updatedAt.value
|
|
7302
7564
|
}, options));
|
|
7303
|
-
return () =>
|
|
7565
|
+
return () => h12("section", {
|
|
7304
7566
|
class: [
|
|
7305
7567
|
"absolute-voice-provider-status",
|
|
7306
7568
|
`absolute-voice-provider-status--${model.value.status}`,
|
|
7307
7569
|
props.class
|
|
7308
7570
|
]
|
|
7309
7571
|
}, [
|
|
7310
|
-
|
|
7311
|
-
|
|
7312
|
-
|
|
7572
|
+
h12("header", { class: "absolute-voice-provider-status__header" }, [
|
|
7573
|
+
h12("span", { class: "absolute-voice-provider-status__eyebrow" }, model.value.title),
|
|
7574
|
+
h12("strong", { class: "absolute-voice-provider-status__label" }, model.value.label)
|
|
7313
7575
|
]),
|
|
7314
|
-
|
|
7315
|
-
model.value.providers.length ?
|
|
7576
|
+
h12("p", { class: "absolute-voice-provider-status__description" }, model.value.description),
|
|
7577
|
+
model.value.providers.length ? h12("div", { class: "absolute-voice-provider-status__providers" }, model.value.providers.map((provider) => h12("article", {
|
|
7316
7578
|
class: [
|
|
7317
7579
|
"absolute-voice-provider-status__provider",
|
|
7318
7580
|
`absolute-voice-provider-status__provider--${provider.status}`
|
|
7319
7581
|
],
|
|
7320
7582
|
key: provider.provider
|
|
7321
7583
|
}, [
|
|
7322
|
-
|
|
7323
|
-
|
|
7324
|
-
|
|
7584
|
+
h12("header", [
|
|
7585
|
+
h12("strong", provider.label),
|
|
7586
|
+
h12("span", provider.status)
|
|
7325
7587
|
]),
|
|
7326
|
-
|
|
7327
|
-
|
|
7328
|
-
|
|
7329
|
-
|
|
7588
|
+
h12("p", provider.detail),
|
|
7589
|
+
h12("dl", provider.rows.map((row) => h12("div", { key: row.label }, [
|
|
7590
|
+
h12("dt", row.label),
|
|
7591
|
+
h12("dd", row.value)
|
|
7330
7592
|
])))
|
|
7331
|
-
]))) :
|
|
7332
|
-
model.value.error ?
|
|
7593
|
+
]))) : h12("p", { class: "absolute-voice-provider-status__empty" }, "Run voice traffic to see provider health."),
|
|
7594
|
+
model.value.error ? h12("p", { class: "absolute-voice-provider-status__error" }, model.value.error) : null
|
|
7333
7595
|
]);
|
|
7334
7596
|
}
|
|
7335
7597
|
});
|
|
7336
7598
|
// src/vue/VoiceRoutingStatus.ts
|
|
7337
|
-
import { computed as
|
|
7599
|
+
import { computed as computed7, defineComponent as defineComponent13, h as h13 } from "vue";
|
|
7338
7600
|
|
|
7339
7601
|
// src/client/routingStatus.ts
|
|
7340
7602
|
var fetchVoiceRoutingStatus = async (path = "/api/routing/latest", options = {}) => {
|
|
@@ -7417,9 +7679,9 @@ var createVoiceRoutingStatusStore = (path = "/api/routing/latest", options = {})
|
|
|
7417
7679
|
};
|
|
7418
7680
|
|
|
7419
7681
|
// src/client/routingStatusWidget.ts
|
|
7420
|
-
var
|
|
7421
|
-
var
|
|
7422
|
-
var
|
|
7682
|
+
var DEFAULT_TITLE12 = "Voice Routing";
|
|
7683
|
+
var DEFAULT_DESCRIPTION12 = "Latest provider routing decision from the self-hosted trace store.";
|
|
7684
|
+
var escapeHtml18 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
7423
7685
|
var formatValue = (value, fallback = "None") => typeof value === "string" && value.trim() ? value : typeof value === "number" && Number.isFinite(value) ? String(value) : fallback;
|
|
7424
7686
|
var formatProviderRoutes = (routes) => routes && typeof routes === "object" ? Object.entries(routes).map(([role, provider]) => `${role}: ${formatValue(provider)}`).join(", ") || "None" : "None";
|
|
7425
7687
|
var getProviderRoute = (routes, role) => routes && typeof routes === "object" ? formatValue(routes[role], "Not configured") : "Not configured";
|
|
@@ -7488,35 +7750,35 @@ var createVoiceRoutingStatusViewModel = (snapshot, options = {}) => {
|
|
|
7488
7750
|
return {
|
|
7489
7751
|
activeStack,
|
|
7490
7752
|
decision,
|
|
7491
|
-
description: options.description ??
|
|
7753
|
+
description: options.description ?? DEFAULT_DESCRIPTION12,
|
|
7492
7754
|
error: snapshot.error,
|
|
7493
7755
|
isLoading: snapshot.isLoading,
|
|
7494
7756
|
label: snapshot.error ? "Unavailable" : decision ? `${formatValue(decision.kind).toUpperCase()} ${formatValue(decision.status, "unknown")}` : snapshot.isLoading ? "Checking" : "No routing yet",
|
|
7495
7757
|
rows,
|
|
7496
7758
|
status: snapshot.error ? "error" : decision ? "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
7497
|
-
title: options.title ??
|
|
7759
|
+
title: options.title ?? DEFAULT_TITLE12,
|
|
7498
7760
|
updatedAt: snapshot.updatedAt
|
|
7499
7761
|
};
|
|
7500
7762
|
};
|
|
7501
7763
|
var renderVoiceRoutingStatusHTML = (snapshot, options = {}) => {
|
|
7502
7764
|
const model = createVoiceRoutingStatusViewModel(snapshot, options);
|
|
7503
7765
|
const activeStack = model.activeStack.length ? `<div class="absolute-voice-routing-status__stack" aria-label="Active voice stack">${model.activeStack.map((item) => `<div>
|
|
7504
|
-
<span>${
|
|
7505
|
-
<strong>${
|
|
7766
|
+
<span>${escapeHtml18(item.label)}</span>
|
|
7767
|
+
<strong>${escapeHtml18(item.value)}</strong>
|
|
7506
7768
|
</div>`).join("")}</div>` : "";
|
|
7507
7769
|
const rows = model.rows.length ? `<div class="absolute-voice-routing-status__grid">${model.rows.map((row) => `<div>
|
|
7508
|
-
<span>${
|
|
7509
|
-
<strong>${
|
|
7770
|
+
<span>${escapeHtml18(row.label)}</span>
|
|
7771
|
+
<strong>${escapeHtml18(row.value)}</strong>
|
|
7510
7772
|
</div>`).join("")}</div>` : '<p class="absolute-voice-routing-status__empty">Start a voice session to see the selected provider.</p>';
|
|
7511
|
-
return `<section class="absolute-voice-routing-status absolute-voice-routing-status--${
|
|
7773
|
+
return `<section class="absolute-voice-routing-status absolute-voice-routing-status--${escapeHtml18(model.status)}">
|
|
7512
7774
|
<header class="absolute-voice-routing-status__header">
|
|
7513
|
-
<span class="absolute-voice-routing-status__eyebrow">${
|
|
7514
|
-
<strong class="absolute-voice-routing-status__label">${
|
|
7775
|
+
<span class="absolute-voice-routing-status__eyebrow">${escapeHtml18(model.title)}</span>
|
|
7776
|
+
<strong class="absolute-voice-routing-status__label">${escapeHtml18(model.label)}</strong>
|
|
7515
7777
|
</header>
|
|
7516
|
-
<p class="absolute-voice-routing-status__description">${
|
|
7778
|
+
<p class="absolute-voice-routing-status__description">${escapeHtml18(model.description)}</p>
|
|
7517
7779
|
${activeStack}
|
|
7518
7780
|
${rows}
|
|
7519
|
-
${model.error ? `<p class="absolute-voice-routing-status__error">${
|
|
7781
|
+
${model.error ? `<p class="absolute-voice-routing-status__error">${escapeHtml18(model.error)}</p>` : ""}
|
|
7520
7782
|
</section>`;
|
|
7521
7783
|
};
|
|
7522
7784
|
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}}`;
|
|
@@ -7558,10 +7820,10 @@ var defineVoiceRoutingStatusElement = (tagName = "absolute-voice-routing-status"
|
|
|
7558
7820
|
};
|
|
7559
7821
|
|
|
7560
7822
|
// src/vue/useVoiceRoutingStatus.ts
|
|
7561
|
-
import { onUnmounted as
|
|
7823
|
+
import { onUnmounted as onUnmounted12, ref as ref9, shallowRef as shallowRef11 } from "vue";
|
|
7562
7824
|
function useVoiceRoutingStatus(path = "/api/routing/latest", options = {}) {
|
|
7563
7825
|
const store = createVoiceRoutingStatusStore(path, options);
|
|
7564
|
-
const decision =
|
|
7826
|
+
const decision = shallowRef11(null);
|
|
7565
7827
|
const error = ref9(null);
|
|
7566
7828
|
const isLoading = ref9(false);
|
|
7567
7829
|
const updatedAt = ref9(undefined);
|
|
@@ -7575,7 +7837,7 @@ function useVoiceRoutingStatus(path = "/api/routing/latest", options = {}) {
|
|
|
7575
7837
|
const unsubscribe = store.subscribe(sync);
|
|
7576
7838
|
sync();
|
|
7577
7839
|
store.refresh().catch(() => {});
|
|
7578
|
-
|
|
7840
|
+
onUnmounted12(() => {
|
|
7579
7841
|
unsubscribe();
|
|
7580
7842
|
store.close();
|
|
7581
7843
|
});
|
|
@@ -7589,7 +7851,7 @@ function useVoiceRoutingStatus(path = "/api/routing/latest", options = {}) {
|
|
|
7589
7851
|
}
|
|
7590
7852
|
|
|
7591
7853
|
// src/vue/VoiceRoutingStatus.ts
|
|
7592
|
-
var VoiceRoutingStatus =
|
|
7854
|
+
var VoiceRoutingStatus = defineComponent13({
|
|
7593
7855
|
name: "VoiceRoutingStatus",
|
|
7594
7856
|
props: {
|
|
7595
7857
|
class: {
|
|
@@ -7620,34 +7882,34 @@ var VoiceRoutingStatus = defineComponent12({
|
|
|
7620
7882
|
title: props.title
|
|
7621
7883
|
};
|
|
7622
7884
|
const status = useVoiceRoutingStatus(props.path, options);
|
|
7623
|
-
const model =
|
|
7885
|
+
const model = computed7(() => createVoiceRoutingStatusViewModel({
|
|
7624
7886
|
decision: status.decision.value,
|
|
7625
7887
|
error: status.error.value,
|
|
7626
7888
|
isLoading: status.isLoading.value,
|
|
7627
7889
|
updatedAt: status.updatedAt.value
|
|
7628
7890
|
}, options));
|
|
7629
|
-
return () =>
|
|
7891
|
+
return () => h13("section", {
|
|
7630
7892
|
class: [
|
|
7631
7893
|
"absolute-voice-routing-status",
|
|
7632
7894
|
`absolute-voice-routing-status--${model.value.status}`,
|
|
7633
7895
|
props.class
|
|
7634
7896
|
]
|
|
7635
7897
|
}, [
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7898
|
+
h13("header", { class: "absolute-voice-routing-status__header" }, [
|
|
7899
|
+
h13("span", { class: "absolute-voice-routing-status__eyebrow" }, model.value.title),
|
|
7900
|
+
h13("strong", { class: "absolute-voice-routing-status__label" }, model.value.label)
|
|
7639
7901
|
]),
|
|
7640
|
-
|
|
7641
|
-
model.value.rows.length ?
|
|
7642
|
-
|
|
7643
|
-
|
|
7644
|
-
]))) :
|
|
7645
|
-
model.value.error ?
|
|
7902
|
+
h13("p", { class: "absolute-voice-routing-status__description" }, model.value.description),
|
|
7903
|
+
model.value.rows.length ? h13("div", { class: "absolute-voice-routing-status__grid" }, model.value.rows.map((row) => h13("div", { key: row.label }, [
|
|
7904
|
+
h13("span", row.label),
|
|
7905
|
+
h13("strong", row.value)
|
|
7906
|
+
]))) : h13("p", { class: "absolute-voice-routing-status__empty" }, "Start a voice session to see the selected provider."),
|
|
7907
|
+
model.value.error ? h13("p", { class: "absolute-voice-routing-status__error" }, model.value.error) : null
|
|
7646
7908
|
]);
|
|
7647
7909
|
}
|
|
7648
7910
|
});
|
|
7649
7911
|
// src/vue/useVoiceAgentSquadStatus.ts
|
|
7650
|
-
import { onUnmounted as
|
|
7912
|
+
import { onUnmounted as onUnmounted13, ref as ref10, shallowRef as shallowRef12 } from "vue";
|
|
7651
7913
|
|
|
7652
7914
|
// src/client/traceTimeline.ts
|
|
7653
7915
|
var fetchVoiceTraceTimeline = async (path = "/api/voice-traces", options = {}) => {
|
|
@@ -7806,10 +8068,10 @@ var createVoiceAgentSquadStatusStore = (path = "/api/voice-traces", options = {}
|
|
|
7806
8068
|
// src/vue/useVoiceAgentSquadStatus.ts
|
|
7807
8069
|
function useVoiceAgentSquadStatus(path = "/api/voice-traces", options = {}) {
|
|
7808
8070
|
const store = createVoiceAgentSquadStatusStore(path, options);
|
|
7809
|
-
const current =
|
|
8071
|
+
const current = shallowRef12(undefined);
|
|
7810
8072
|
const error = ref10(null);
|
|
7811
8073
|
const isLoading = ref10(false);
|
|
7812
|
-
const report =
|
|
8074
|
+
const report = shallowRef12(undefined);
|
|
7813
8075
|
const updatedAt = ref10(undefined);
|
|
7814
8076
|
const sync = () => {
|
|
7815
8077
|
const snapshot = store.getSnapshot();
|
|
@@ -7824,7 +8086,7 @@ function useVoiceAgentSquadStatus(path = "/api/voice-traces", options = {}) {
|
|
|
7824
8086
|
if (typeof window !== "undefined") {
|
|
7825
8087
|
store.refresh().catch(() => {});
|
|
7826
8088
|
}
|
|
7827
|
-
|
|
8089
|
+
onUnmounted13(() => {
|
|
7828
8090
|
unsubscribe();
|
|
7829
8091
|
store.close();
|
|
7830
8092
|
});
|
|
@@ -7838,7 +8100,7 @@ function useVoiceAgentSquadStatus(path = "/api/voice-traces", options = {}) {
|
|
|
7838
8100
|
};
|
|
7839
8101
|
}
|
|
7840
8102
|
// src/vue/VoiceTurnLatency.ts
|
|
7841
|
-
import { computed as
|
|
8103
|
+
import { computed as computed8, defineComponent as defineComponent14, h as h14 } from "vue";
|
|
7842
8104
|
|
|
7843
8105
|
// src/client/turnLatency.ts
|
|
7844
8106
|
var fetchVoiceTurnLatency = async (path = "/api/turn-latency", options = {}) => {
|
|
@@ -7944,10 +8206,10 @@ var createVoiceTurnLatencyStore = (path = "/api/turn-latency", options = {}) =>
|
|
|
7944
8206
|
};
|
|
7945
8207
|
|
|
7946
8208
|
// src/client/turnLatencyWidget.ts
|
|
7947
|
-
var
|
|
7948
|
-
var
|
|
8209
|
+
var DEFAULT_TITLE13 = "Turn Latency";
|
|
8210
|
+
var DEFAULT_DESCRIPTION13 = "Per-turn timing from first transcript to commit and assistant response start.";
|
|
7949
8211
|
var DEFAULT_PROOF_LABEL = "Run latency proof";
|
|
7950
|
-
var
|
|
8212
|
+
var escapeHtml19 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
7951
8213
|
var formatMs2 = (value) => typeof value === "number" ? `${Math.round(value)}ms` : "n/a";
|
|
7952
8214
|
var createVoiceTurnLatencyViewModel = (snapshot, options = {}) => {
|
|
7953
8215
|
const turns = (snapshot.report?.turns ?? []).map((turn) => ({
|
|
@@ -7961,39 +8223,39 @@ var createVoiceTurnLatencyViewModel = (snapshot, options = {}) => {
|
|
|
7961
8223
|
const warningCount = snapshot.report?.warnings ?? turns.filter((turn) => turn.status === "warn").length;
|
|
7962
8224
|
const failedCount = snapshot.report?.failed ?? turns.filter((turn) => turn.status === "fail").length;
|
|
7963
8225
|
return {
|
|
7964
|
-
description: options.description ??
|
|
8226
|
+
description: options.description ?? DEFAULT_DESCRIPTION13,
|
|
7965
8227
|
error: snapshot.error,
|
|
7966
8228
|
isLoading: snapshot.isLoading,
|
|
7967
8229
|
label: snapshot.error ? "Unavailable" : turns.length ? failedCount > 0 ? `${failedCount} slow` : warningCount > 0 ? `${warningCount} warnings` : `avg ${formatMs2(snapshot.report?.averageTotalMs)}` : snapshot.isLoading ? "Checking" : "No turns",
|
|
7968
8230
|
proofLabel: options.proofPath ? options.proofLabel ?? DEFAULT_PROOF_LABEL : undefined,
|
|
7969
8231
|
showProofAction: Boolean(options.proofPath),
|
|
7970
8232
|
status: snapshot.error ? "error" : turns.length ? failedCount > 0 || warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
7971
|
-
title: options.title ??
|
|
8233
|
+
title: options.title ?? DEFAULT_TITLE13,
|
|
7972
8234
|
turns,
|
|
7973
8235
|
updatedAt: snapshot.updatedAt
|
|
7974
8236
|
};
|
|
7975
8237
|
};
|
|
7976
8238
|
var renderVoiceTurnLatencyHTML = (snapshot, options = {}) => {
|
|
7977
8239
|
const model = createVoiceTurnLatencyViewModel(snapshot, options);
|
|
7978
|
-
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--${
|
|
8240
|
+
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--${escapeHtml19(turn.status)}">
|
|
7979
8241
|
<header>
|
|
7980
|
-
<strong>${
|
|
7981
|
-
<span>${
|
|
8242
|
+
<strong>${escapeHtml19(turn.label)}</strong>
|
|
8243
|
+
<span>${escapeHtml19(turn.status)}</span>
|
|
7982
8244
|
</header>
|
|
7983
8245
|
<dl>${turn.rows.map((row) => `<div>
|
|
7984
|
-
<dt>${
|
|
7985
|
-
<dd>${
|
|
8246
|
+
<dt>${escapeHtml19(row.label)}</dt>
|
|
8247
|
+
<dd>${escapeHtml19(row.value)}</dd>
|
|
7986
8248
|
</div>`).join("")}</dl>
|
|
7987
8249
|
</article>`).join("")}</div>` : '<p class="absolute-voice-turn-latency__empty">Complete a voice turn to see latency diagnostics.</p>';
|
|
7988
|
-
return `<section class="absolute-voice-turn-latency absolute-voice-turn-latency--${
|
|
8250
|
+
return `<section class="absolute-voice-turn-latency absolute-voice-turn-latency--${escapeHtml19(model.status)}">
|
|
7989
8251
|
<header class="absolute-voice-turn-latency__header">
|
|
7990
|
-
<span class="absolute-voice-turn-latency__eyebrow">${
|
|
7991
|
-
<strong class="absolute-voice-turn-latency__label">${
|
|
8252
|
+
<span class="absolute-voice-turn-latency__eyebrow">${escapeHtml19(model.title)}</span>
|
|
8253
|
+
<strong class="absolute-voice-turn-latency__label">${escapeHtml19(model.label)}</strong>
|
|
7992
8254
|
</header>
|
|
7993
|
-
<p class="absolute-voice-turn-latency__description">${
|
|
7994
|
-
${model.showProofAction ? `<button class="absolute-voice-turn-latency__proof" data-absolute-voice-turn-latency-proof type="button">${
|
|
8255
|
+
<p class="absolute-voice-turn-latency__description">${escapeHtml19(model.description)}</p>
|
|
8256
|
+
${model.showProofAction ? `<button class="absolute-voice-turn-latency__proof" data-absolute-voice-turn-latency-proof type="button">${escapeHtml19(model.proofLabel ?? DEFAULT_PROOF_LABEL)}</button>` : ""}
|
|
7995
8257
|
${turns}
|
|
7996
|
-
${model.error ? `<p class="absolute-voice-turn-latency__error">${
|
|
8258
|
+
${model.error ? `<p class="absolute-voice-turn-latency__error">${escapeHtml19(model.error)}</p>` : ""}
|
|
7997
8259
|
</section>`;
|
|
7998
8260
|
};
|
|
7999
8261
|
var mountVoiceTurnLatency = (element, path = "/api/turn-latency", options = {}) => {
|
|
@@ -8044,13 +8306,13 @@ var defineVoiceTurnLatencyElement = (tagName = "absolute-voice-turn-latency") =>
|
|
|
8044
8306
|
};
|
|
8045
8307
|
|
|
8046
8308
|
// src/vue/useVoiceTurnLatency.ts
|
|
8047
|
-
import { onUnmounted as
|
|
8309
|
+
import { onUnmounted as onUnmounted14, shallowRef as shallowRef13 } from "vue";
|
|
8048
8310
|
function useVoiceTurnLatency(path = "/api/turn-latency", options = {}) {
|
|
8049
8311
|
const store = createVoiceTurnLatencyStore(path, options);
|
|
8050
|
-
const error =
|
|
8051
|
-
const isLoading =
|
|
8052
|
-
const report =
|
|
8053
|
-
const updatedAt =
|
|
8312
|
+
const error = shallowRef13(null);
|
|
8313
|
+
const isLoading = shallowRef13(false);
|
|
8314
|
+
const report = shallowRef13();
|
|
8315
|
+
const updatedAt = shallowRef13(undefined);
|
|
8054
8316
|
const sync = () => {
|
|
8055
8317
|
const snapshot = store.getSnapshot();
|
|
8056
8318
|
error.value = snapshot.error;
|
|
@@ -8061,7 +8323,7 @@ function useVoiceTurnLatency(path = "/api/turn-latency", options = {}) {
|
|
|
8061
8323
|
const unsubscribe = store.subscribe(sync);
|
|
8062
8324
|
sync();
|
|
8063
8325
|
store.refresh().catch(() => {});
|
|
8064
|
-
|
|
8326
|
+
onUnmounted14(() => {
|
|
8065
8327
|
unsubscribe();
|
|
8066
8328
|
store.close();
|
|
8067
8329
|
});
|
|
@@ -8076,7 +8338,7 @@ function useVoiceTurnLatency(path = "/api/turn-latency", options = {}) {
|
|
|
8076
8338
|
}
|
|
8077
8339
|
|
|
8078
8340
|
// src/vue/VoiceTurnLatency.ts
|
|
8079
|
-
var VoiceTurnLatency =
|
|
8341
|
+
var VoiceTurnLatency = defineComponent14({
|
|
8080
8342
|
name: "VoiceTurnLatency",
|
|
8081
8343
|
props: {
|
|
8082
8344
|
class: { default: "", type: String },
|
|
@@ -8096,53 +8358,53 @@ var VoiceTurnLatency = defineComponent13({
|
|
|
8096
8358
|
title: props.title
|
|
8097
8359
|
};
|
|
8098
8360
|
const latency = useVoiceTurnLatency(props.path, options);
|
|
8099
|
-
const model =
|
|
8361
|
+
const model = computed8(() => createVoiceTurnLatencyViewModel({
|
|
8100
8362
|
error: latency.error.value,
|
|
8101
8363
|
isLoading: latency.isLoading.value,
|
|
8102
8364
|
report: latency.report.value,
|
|
8103
8365
|
updatedAt: latency.updatedAt.value
|
|
8104
8366
|
}, options));
|
|
8105
|
-
return () =>
|
|
8367
|
+
return () => h14("section", {
|
|
8106
8368
|
class: [
|
|
8107
8369
|
"absolute-voice-turn-latency",
|
|
8108
8370
|
`absolute-voice-turn-latency--${model.value.status}`,
|
|
8109
8371
|
props.class
|
|
8110
8372
|
]
|
|
8111
8373
|
}, [
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8374
|
+
h14("header", { class: "absolute-voice-turn-latency__header" }, [
|
|
8375
|
+
h14("span", { class: "absolute-voice-turn-latency__eyebrow" }, model.value.title),
|
|
8376
|
+
h14("strong", { class: "absolute-voice-turn-latency__label" }, model.value.label)
|
|
8115
8377
|
]),
|
|
8116
|
-
|
|
8117
|
-
model.value.showProofAction ?
|
|
8378
|
+
h14("p", { class: "absolute-voice-turn-latency__description" }, model.value.description),
|
|
8379
|
+
model.value.showProofAction ? h14("button", {
|
|
8118
8380
|
class: "absolute-voice-turn-latency__proof",
|
|
8119
8381
|
onClick: () => {
|
|
8120
8382
|
latency.runProof().catch(() => {});
|
|
8121
8383
|
},
|
|
8122
8384
|
type: "button"
|
|
8123
8385
|
}, model.value.proofLabel) : null,
|
|
8124
|
-
model.value.turns.length ?
|
|
8386
|
+
model.value.turns.length ? h14("div", { class: "absolute-voice-turn-latency__turns" }, model.value.turns.map((turn) => h14("article", {
|
|
8125
8387
|
class: [
|
|
8126
8388
|
"absolute-voice-turn-latency__turn",
|
|
8127
8389
|
`absolute-voice-turn-latency__turn--${turn.status}`
|
|
8128
8390
|
],
|
|
8129
8391
|
key: `${turn.sessionId}:${turn.turnId}`
|
|
8130
8392
|
}, [
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8393
|
+
h14("header", [
|
|
8394
|
+
h14("strong", turn.label),
|
|
8395
|
+
h14("span", turn.status)
|
|
8134
8396
|
]),
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8397
|
+
h14("dl", turn.rows.map((row) => h14("div", { key: row.label }, [
|
|
8398
|
+
h14("dt", row.label),
|
|
8399
|
+
h14("dd", row.value)
|
|
8138
8400
|
])))
|
|
8139
|
-
]))) :
|
|
8140
|
-
model.value.error ?
|
|
8401
|
+
]))) : h14("p", { class: "absolute-voice-turn-latency__empty" }, "Complete a voice turn to see latency diagnostics."),
|
|
8402
|
+
model.value.error ? h14("p", { class: "absolute-voice-turn-latency__error" }, model.value.error) : null
|
|
8141
8403
|
]);
|
|
8142
8404
|
}
|
|
8143
8405
|
});
|
|
8144
8406
|
// src/vue/VoiceTurnQuality.ts
|
|
8145
|
-
import { computed as
|
|
8407
|
+
import { computed as computed9, defineComponent as defineComponent15, h as h15 } from "vue";
|
|
8146
8408
|
|
|
8147
8409
|
// src/client/turnQuality.ts
|
|
8148
8410
|
var fetchVoiceTurnQuality = async (path = "/api/turn-quality", options = {}) => {
|
|
@@ -8224,9 +8486,9 @@ var createVoiceTurnQualityStore = (path = "/api/turn-quality", options = {}) =>
|
|
|
8224
8486
|
};
|
|
8225
8487
|
|
|
8226
8488
|
// src/client/turnQualityWidget.ts
|
|
8227
|
-
var
|
|
8228
|
-
var
|
|
8229
|
-
var
|
|
8489
|
+
var DEFAULT_TITLE14 = "Turn Quality";
|
|
8490
|
+
var DEFAULT_DESCRIPTION14 = "Per-turn STT confidence, fallback selection, corrections, and transcript coverage.";
|
|
8491
|
+
var escapeHtml20 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
8230
8492
|
var formatConfidence = (value) => typeof value === "number" ? `${Math.round(value * 100)}%` : "n/a";
|
|
8231
8493
|
var formatMaybe = (value) => value === undefined || value === "" ? "n/a" : String(value);
|
|
8232
8494
|
var getTurnDetail = (turn) => {
|
|
@@ -8264,37 +8526,37 @@ var createVoiceTurnQualityViewModel = (snapshot, options = {}) => {
|
|
|
8264
8526
|
const warningCount = snapshot.report?.warnings ?? turns.filter((turn) => turn.status === "warn").length;
|
|
8265
8527
|
const failedCount = snapshot.report?.failed ?? turns.filter((turn) => turn.status === "fail").length;
|
|
8266
8528
|
return {
|
|
8267
|
-
description: options.description ??
|
|
8529
|
+
description: options.description ?? DEFAULT_DESCRIPTION14,
|
|
8268
8530
|
error: snapshot.error,
|
|
8269
8531
|
isLoading: snapshot.isLoading,
|
|
8270
8532
|
label: snapshot.error ? "Unavailable" : turns.length ? failedCount > 0 ? `${failedCount} failed` : warningCount > 0 ? `${warningCount} warnings` : `${turns.length} healthy` : snapshot.isLoading ? "Checking" : "No turns",
|
|
8271
8533
|
status: snapshot.error ? "error" : turns.length ? failedCount > 0 || warningCount > 0 ? "warning" : "ready" : snapshot.isLoading ? "loading" : "empty",
|
|
8272
|
-
title: options.title ??
|
|
8534
|
+
title: options.title ?? DEFAULT_TITLE14,
|
|
8273
8535
|
turns,
|
|
8274
8536
|
updatedAt: snapshot.updatedAt
|
|
8275
8537
|
};
|
|
8276
8538
|
};
|
|
8277
8539
|
var renderVoiceTurnQualityHTML = (snapshot, options = {}) => {
|
|
8278
8540
|
const model = createVoiceTurnQualityViewModel(snapshot, options);
|
|
8279
|
-
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--${
|
|
8541
|
+
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--${escapeHtml20(turn.status)}">
|
|
8280
8542
|
<header>
|
|
8281
|
-
<strong>${
|
|
8282
|
-
<span>${
|
|
8543
|
+
<strong>${escapeHtml20(turn.label)}</strong>
|
|
8544
|
+
<span>${escapeHtml20(turn.status)}</span>
|
|
8283
8545
|
</header>
|
|
8284
|
-
<p>${
|
|
8546
|
+
<p>${escapeHtml20(turn.detail)}</p>
|
|
8285
8547
|
<dl>${turn.rows.map((row) => `<div>
|
|
8286
|
-
<dt>${
|
|
8287
|
-
<dd>${
|
|
8548
|
+
<dt>${escapeHtml20(row.label)}</dt>
|
|
8549
|
+
<dd>${escapeHtml20(row.value)}</dd>
|
|
8288
8550
|
</div>`).join("")}</dl>
|
|
8289
8551
|
</article>`).join("")}</div>` : '<p class="absolute-voice-turn-quality__empty">Complete a voice turn to see STT quality diagnostics.</p>';
|
|
8290
|
-
return `<section class="absolute-voice-turn-quality absolute-voice-turn-quality--${
|
|
8552
|
+
return `<section class="absolute-voice-turn-quality absolute-voice-turn-quality--${escapeHtml20(model.status)}">
|
|
8291
8553
|
<header class="absolute-voice-turn-quality__header">
|
|
8292
|
-
<span class="absolute-voice-turn-quality__eyebrow">${
|
|
8293
|
-
<strong class="absolute-voice-turn-quality__label">${
|
|
8554
|
+
<span class="absolute-voice-turn-quality__eyebrow">${escapeHtml20(model.title)}</span>
|
|
8555
|
+
<strong class="absolute-voice-turn-quality__label">${escapeHtml20(model.label)}</strong>
|
|
8294
8556
|
</header>
|
|
8295
|
-
<p class="absolute-voice-turn-quality__description">${
|
|
8557
|
+
<p class="absolute-voice-turn-quality__description">${escapeHtml20(model.description)}</p>
|
|
8296
8558
|
${turns}
|
|
8297
|
-
${model.error ? `<p class="absolute-voice-turn-quality__error">${
|
|
8559
|
+
${model.error ? `<p class="absolute-voice-turn-quality__error">${escapeHtml20(model.error)}</p>` : ""}
|
|
8298
8560
|
</section>`;
|
|
8299
8561
|
};
|
|
8300
8562
|
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}`;
|
|
@@ -8336,13 +8598,13 @@ var defineVoiceTurnQualityElement = (tagName = "absolute-voice-turn-quality") =>
|
|
|
8336
8598
|
};
|
|
8337
8599
|
|
|
8338
8600
|
// src/vue/useVoiceTurnQuality.ts
|
|
8339
|
-
import { onUnmounted as
|
|
8601
|
+
import { onUnmounted as onUnmounted15, shallowRef as shallowRef14 } from "vue";
|
|
8340
8602
|
function useVoiceTurnQuality(path = "/api/turn-quality", options = {}) {
|
|
8341
8603
|
const store = createVoiceTurnQualityStore(path, options);
|
|
8342
|
-
const error =
|
|
8343
|
-
const isLoading =
|
|
8344
|
-
const report =
|
|
8345
|
-
const updatedAt =
|
|
8604
|
+
const error = shallowRef14(null);
|
|
8605
|
+
const isLoading = shallowRef14(false);
|
|
8606
|
+
const report = shallowRef14();
|
|
8607
|
+
const updatedAt = shallowRef14(undefined);
|
|
8346
8608
|
const sync = () => {
|
|
8347
8609
|
const snapshot = store.getSnapshot();
|
|
8348
8610
|
error.value = snapshot.error;
|
|
@@ -8353,7 +8615,7 @@ function useVoiceTurnQuality(path = "/api/turn-quality", options = {}) {
|
|
|
8353
8615
|
const unsubscribe = store.subscribe(sync);
|
|
8354
8616
|
sync();
|
|
8355
8617
|
store.refresh().catch(() => {});
|
|
8356
|
-
|
|
8618
|
+
onUnmounted15(() => {
|
|
8357
8619
|
unsubscribe();
|
|
8358
8620
|
store.close();
|
|
8359
8621
|
});
|
|
@@ -8361,7 +8623,7 @@ function useVoiceTurnQuality(path = "/api/turn-quality", options = {}) {
|
|
|
8361
8623
|
}
|
|
8362
8624
|
|
|
8363
8625
|
// src/vue/VoiceTurnQuality.ts
|
|
8364
|
-
var VoiceTurnQuality =
|
|
8626
|
+
var VoiceTurnQuality = defineComponent15({
|
|
8365
8627
|
name: "VoiceTurnQuality",
|
|
8366
8628
|
props: {
|
|
8367
8629
|
class: { default: "", type: String },
|
|
@@ -8377,47 +8639,47 @@ var VoiceTurnQuality = defineComponent14({
|
|
|
8377
8639
|
title: props.title
|
|
8378
8640
|
};
|
|
8379
8641
|
const quality = useVoiceTurnQuality(props.path, options);
|
|
8380
|
-
const model =
|
|
8642
|
+
const model = computed9(() => createVoiceTurnQualityViewModel({
|
|
8381
8643
|
error: quality.error.value,
|
|
8382
8644
|
isLoading: quality.isLoading.value,
|
|
8383
8645
|
report: quality.report.value,
|
|
8384
8646
|
updatedAt: quality.updatedAt.value
|
|
8385
8647
|
}, options));
|
|
8386
|
-
return () =>
|
|
8648
|
+
return () => h15("section", {
|
|
8387
8649
|
class: [
|
|
8388
8650
|
"absolute-voice-turn-quality",
|
|
8389
8651
|
`absolute-voice-turn-quality--${model.value.status}`,
|
|
8390
8652
|
props.class
|
|
8391
8653
|
]
|
|
8392
8654
|
}, [
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8655
|
+
h15("header", { class: "absolute-voice-turn-quality__header" }, [
|
|
8656
|
+
h15("span", { class: "absolute-voice-turn-quality__eyebrow" }, model.value.title),
|
|
8657
|
+
h15("strong", { class: "absolute-voice-turn-quality__label" }, model.value.label)
|
|
8396
8658
|
]),
|
|
8397
|
-
|
|
8398
|
-
model.value.turns.length ?
|
|
8659
|
+
h15("p", { class: "absolute-voice-turn-quality__description" }, model.value.description),
|
|
8660
|
+
model.value.turns.length ? h15("div", { class: "absolute-voice-turn-quality__turns" }, model.value.turns.map((turn) => h15("article", {
|
|
8399
8661
|
class: [
|
|
8400
8662
|
"absolute-voice-turn-quality__turn",
|
|
8401
8663
|
`absolute-voice-turn-quality__turn--${turn.status}`
|
|
8402
8664
|
],
|
|
8403
8665
|
key: `${turn.sessionId}:${turn.turnId}`
|
|
8404
8666
|
}, [
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8667
|
+
h15("header", [
|
|
8668
|
+
h15("strong", turn.label),
|
|
8669
|
+
h15("span", turn.status)
|
|
8408
8670
|
]),
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8671
|
+
h15("p", turn.detail),
|
|
8672
|
+
h15("dl", turn.rows.map((row) => h15("div", { key: row.label }, [
|
|
8673
|
+
h15("dt", row.label),
|
|
8674
|
+
h15("dd", row.value)
|
|
8413
8675
|
])))
|
|
8414
|
-
]))) :
|
|
8415
|
-
model.value.error ?
|
|
8676
|
+
]))) : h15("p", { class: "absolute-voice-turn-quality__empty" }, "Complete a voice turn to see STT quality diagnostics."),
|
|
8677
|
+
model.value.error ? h15("p", { class: "absolute-voice-turn-quality__error" }, model.value.error) : null
|
|
8416
8678
|
]);
|
|
8417
8679
|
}
|
|
8418
8680
|
});
|
|
8419
8681
|
// src/vue/useVoiceProfileComparison.ts
|
|
8420
|
-
import { onUnmounted as
|
|
8682
|
+
import { onUnmounted as onUnmounted16, ref as ref11, shallowRef as shallowRef15 } from "vue";
|
|
8421
8683
|
|
|
8422
8684
|
// src/client/profileComparison.ts
|
|
8423
8685
|
var fetchVoiceProfileComparison = async (path = "/api/voice/real-call-profile-history", options = {}) => {
|
|
@@ -8499,7 +8761,7 @@ function useVoiceProfileComparison(path = "/api/voice/real-call-profile-history"
|
|
|
8499
8761
|
const store = createVoiceProfileComparisonStore(path, options);
|
|
8500
8762
|
const error = ref11(null);
|
|
8501
8763
|
const isLoading = ref11(false);
|
|
8502
|
-
const report =
|
|
8764
|
+
const report = shallowRef15(undefined);
|
|
8503
8765
|
const updatedAt = ref11(undefined);
|
|
8504
8766
|
const sync = () => {
|
|
8505
8767
|
const snapshot = store.getSnapshot();
|
|
@@ -8513,7 +8775,7 @@ function useVoiceProfileComparison(path = "/api/voice/real-call-profile-history"
|
|
|
8513
8775
|
if (typeof window !== "undefined") {
|
|
8514
8776
|
store.refresh().catch(() => {});
|
|
8515
8777
|
}
|
|
8516
|
-
|
|
8778
|
+
onUnmounted16(() => {
|
|
8517
8779
|
unsubscribe();
|
|
8518
8780
|
store.close();
|
|
8519
8781
|
});
|
|
@@ -8526,7 +8788,7 @@ function useVoiceProfileComparison(path = "/api/voice/real-call-profile-history"
|
|
|
8526
8788
|
};
|
|
8527
8789
|
}
|
|
8528
8790
|
// src/vue/useVoiceLiveOps.ts
|
|
8529
|
-
import { onUnmounted as
|
|
8791
|
+
import { onUnmounted as onUnmounted17, ref as ref12, shallowRef as shallowRef16 } from "vue";
|
|
8530
8792
|
|
|
8531
8793
|
// src/client/liveOps.ts
|
|
8532
8794
|
var postVoiceLiveOpsAction = async (input, options = {}) => {
|
|
@@ -8619,7 +8881,7 @@ function useVoiceLiveOps(options = {}) {
|
|
|
8619
8881
|
const store = createVoiceLiveOpsStore(options);
|
|
8620
8882
|
const error = ref12(null);
|
|
8621
8883
|
const isRunning = ref12(false);
|
|
8622
|
-
const lastResult =
|
|
8884
|
+
const lastResult = shallowRef16(undefined);
|
|
8623
8885
|
const runningAction = ref12(undefined);
|
|
8624
8886
|
const updatedAt = ref12(undefined);
|
|
8625
8887
|
const sync = () => {
|
|
@@ -8632,7 +8894,7 @@ function useVoiceLiveOps(options = {}) {
|
|
|
8632
8894
|
};
|
|
8633
8895
|
const unsubscribe = store.subscribe(sync);
|
|
8634
8896
|
sync();
|
|
8635
|
-
|
|
8897
|
+
onUnmounted17(() => {
|
|
8636
8898
|
unsubscribe();
|
|
8637
8899
|
store.close();
|
|
8638
8900
|
});
|
|
@@ -8646,7 +8908,7 @@ function useVoiceLiveOps(options = {}) {
|
|
|
8646
8908
|
};
|
|
8647
8909
|
}
|
|
8648
8910
|
// src/vue/useVoiceCampaignDialerProof.ts
|
|
8649
|
-
import { onUnmounted as
|
|
8911
|
+
import { onUnmounted as onUnmounted18, shallowRef as shallowRef17 } from "vue";
|
|
8650
8912
|
|
|
8651
8913
|
// src/client/campaignDialerProof.ts
|
|
8652
8914
|
var fetchVoiceCampaignDialerProofStatus = async (path = "/api/voice/campaigns/dialer-proof", options = {}) => {
|
|
@@ -8769,11 +9031,11 @@ var createVoiceCampaignDialerProofStore = (path = "/api/voice/campaigns/dialer-p
|
|
|
8769
9031
|
// src/vue/useVoiceCampaignDialerProof.ts
|
|
8770
9032
|
function useVoiceCampaignDialerProof(path = "/api/voice/campaigns/dialer-proof", options = {}) {
|
|
8771
9033
|
const store = createVoiceCampaignDialerProofStore(path, options);
|
|
8772
|
-
const error =
|
|
8773
|
-
const isLoading =
|
|
8774
|
-
const report =
|
|
8775
|
-
const status =
|
|
8776
|
-
const updatedAt =
|
|
9034
|
+
const error = shallowRef17(null);
|
|
9035
|
+
const isLoading = shallowRef17(false);
|
|
9036
|
+
const report = shallowRef17();
|
|
9037
|
+
const status = shallowRef17();
|
|
9038
|
+
const updatedAt = shallowRef17(undefined);
|
|
8777
9039
|
const sync = () => {
|
|
8778
9040
|
const snapshot = store.getSnapshot();
|
|
8779
9041
|
error.value = snapshot.error;
|
|
@@ -8787,7 +9049,7 @@ function useVoiceCampaignDialerProof(path = "/api/voice/campaigns/dialer-proof",
|
|
|
8787
9049
|
if (typeof window !== "undefined") {
|
|
8788
9050
|
store.refresh().catch(() => {});
|
|
8789
9051
|
}
|
|
8790
|
-
|
|
9052
|
+
onUnmounted18(() => {
|
|
8791
9053
|
unsubscribe();
|
|
8792
9054
|
store.close();
|
|
8793
9055
|
});
|
|
@@ -8802,7 +9064,7 @@ function useVoiceCampaignDialerProof(path = "/api/voice/campaigns/dialer-proof",
|
|
|
8802
9064
|
};
|
|
8803
9065
|
}
|
|
8804
9066
|
// src/vue/useVoiceStream.ts
|
|
8805
|
-
import { onUnmounted as
|
|
9067
|
+
import { onUnmounted as onUnmounted19, ref as ref13, shallowRef as shallowRef18 } from "vue";
|
|
8806
9068
|
|
|
8807
9069
|
// src/client/actions.ts
|
|
8808
9070
|
var normalizeErrorMessage = (value) => {
|
|
@@ -10197,17 +10459,17 @@ var createVoiceStream = (path, options = {}) => {
|
|
|
10197
10459
|
// src/vue/useVoiceStream.ts
|
|
10198
10460
|
function useVoiceStream(path, options = {}) {
|
|
10199
10461
|
const stream = createVoiceStream(path, options);
|
|
10200
|
-
const assistantAudio =
|
|
10201
|
-
const assistantTexts =
|
|
10202
|
-
const call =
|
|
10462
|
+
const assistantAudio = shallowRef18([]);
|
|
10463
|
+
const assistantTexts = shallowRef18([]);
|
|
10464
|
+
const call = shallowRef18(null);
|
|
10203
10465
|
const error = ref13(null);
|
|
10204
10466
|
const isConnected = ref13(false);
|
|
10205
10467
|
const partial = ref13("");
|
|
10206
|
-
const reconnect =
|
|
10468
|
+
const reconnect = shallowRef18(stream.reconnect);
|
|
10207
10469
|
const sessionId = ref13(stream.sessionId);
|
|
10208
|
-
const sessionMetadata =
|
|
10470
|
+
const sessionMetadata = shallowRef18(stream.sessionMetadata);
|
|
10209
10471
|
const status = ref13(stream.status);
|
|
10210
|
-
const turns =
|
|
10472
|
+
const turns = shallowRef18([]);
|
|
10211
10473
|
const sync = () => {
|
|
10212
10474
|
assistantAudio.value = [...stream.assistantAudio];
|
|
10213
10475
|
assistantTexts.value = [...stream.assistantTexts];
|
|
@@ -10227,7 +10489,7 @@ function useVoiceStream(path, options = {}) {
|
|
|
10227
10489
|
unsubscribe();
|
|
10228
10490
|
stream.close();
|
|
10229
10491
|
};
|
|
10230
|
-
|
|
10492
|
+
onUnmounted19(destroy);
|
|
10231
10493
|
return {
|
|
10232
10494
|
assistantAudio,
|
|
10233
10495
|
assistantTexts,
|
|
@@ -10247,7 +10509,7 @@ function useVoiceStream(path, options = {}) {
|
|
|
10247
10509
|
};
|
|
10248
10510
|
}
|
|
10249
10511
|
// src/vue/useVoiceController.ts
|
|
10250
|
-
import { onUnmounted as
|
|
10512
|
+
import { onUnmounted as onUnmounted20, ref as ref14, shallowRef as shallowRef19 } from "vue";
|
|
10251
10513
|
|
|
10252
10514
|
// src/client/htmx.ts
|
|
10253
10515
|
var DEFAULT_EVENT_NAME = "voice-refresh";
|
|
@@ -10898,17 +11160,17 @@ var createVoiceController = (path, options = {}) => {
|
|
|
10898
11160
|
// src/vue/useVoiceController.ts
|
|
10899
11161
|
function useVoiceController(path, options = {}) {
|
|
10900
11162
|
const controller = createVoiceController(path, options);
|
|
10901
|
-
const assistantAudio =
|
|
10902
|
-
const assistantTexts =
|
|
11163
|
+
const assistantAudio = shallowRef19([]);
|
|
11164
|
+
const assistantTexts = shallowRef19([]);
|
|
10903
11165
|
const error = ref14(null);
|
|
10904
11166
|
const isConnected = ref14(false);
|
|
10905
11167
|
const isRecording = ref14(false);
|
|
10906
11168
|
const partial = ref14("");
|
|
10907
|
-
const reconnect =
|
|
11169
|
+
const reconnect = shallowRef19(controller.reconnect);
|
|
10908
11170
|
const recordingError = ref14(null);
|
|
10909
11171
|
const sessionId = ref14(controller.sessionId);
|
|
10910
11172
|
const status = ref14(controller.status);
|
|
10911
|
-
const turns =
|
|
11173
|
+
const turns = shallowRef19([]);
|
|
10912
11174
|
const sync = () => {
|
|
10913
11175
|
assistantAudio.value = [...controller.assistantAudio];
|
|
10914
11176
|
assistantTexts.value = [...controller.assistantTexts];
|
|
@@ -10928,7 +11190,7 @@ function useVoiceController(path, options = {}) {
|
|
|
10928
11190
|
unsubscribe();
|
|
10929
11191
|
controller.close();
|
|
10930
11192
|
};
|
|
10931
|
-
|
|
11193
|
+
onUnmounted20(destroy);
|
|
10932
11194
|
return {
|
|
10933
11195
|
assistantAudio,
|
|
10934
11196
|
assistantTexts,
|
|
@@ -10951,12 +11213,12 @@ function useVoiceController(path, options = {}) {
|
|
|
10951
11213
|
};
|
|
10952
11214
|
}
|
|
10953
11215
|
// src/vue/useVoiceTraceTimeline.ts
|
|
10954
|
-
import { onUnmounted as
|
|
11216
|
+
import { onUnmounted as onUnmounted21, ref as ref15, shallowRef as shallowRef20 } from "vue";
|
|
10955
11217
|
function useVoiceTraceTimeline(path = "/api/voice-traces", options = {}) {
|
|
10956
11218
|
const store = createVoiceTraceTimelineStore(path, options);
|
|
10957
11219
|
const error = ref15(null);
|
|
10958
11220
|
const isLoading = ref15(false);
|
|
10959
|
-
const report =
|
|
11221
|
+
const report = shallowRef20(null);
|
|
10960
11222
|
const updatedAt = ref15(undefined);
|
|
10961
11223
|
const sync = () => {
|
|
10962
11224
|
const snapshot = store.getSnapshot();
|
|
@@ -10968,7 +11230,7 @@ function useVoiceTraceTimeline(path = "/api/voice-traces", options = {}) {
|
|
|
10968
11230
|
const unsubscribe = store.subscribe(sync);
|
|
10969
11231
|
sync();
|
|
10970
11232
|
store.refresh().catch(() => {});
|
|
10971
|
-
|
|
11233
|
+
onUnmounted21(() => {
|
|
10972
11234
|
unsubscribe();
|
|
10973
11235
|
store.close();
|
|
10974
11236
|
});
|
|
@@ -10981,7 +11243,7 @@ function useVoiceTraceTimeline(path = "/api/voice-traces", options = {}) {
|
|
|
10981
11243
|
};
|
|
10982
11244
|
}
|
|
10983
11245
|
// src/vue/useVoiceWorkflowStatus.ts
|
|
10984
|
-
import { onUnmounted as
|
|
11246
|
+
import { onUnmounted as onUnmounted22, ref as ref16, shallowRef as shallowRef21 } from "vue";
|
|
10985
11247
|
|
|
10986
11248
|
// src/client/workflowStatus.ts
|
|
10987
11249
|
var fetchVoiceWorkflowStatus = async (path = "/evals/scenarios/json", options = {}) => {
|
|
@@ -11067,7 +11329,7 @@ function useVoiceWorkflowStatus(path = "/evals/scenarios/json", options = {}) {
|
|
|
11067
11329
|
const store = createVoiceWorkflowStatusStore(path, options);
|
|
11068
11330
|
const error = ref16(null);
|
|
11069
11331
|
const isLoading = ref16(false);
|
|
11070
|
-
const report =
|
|
11332
|
+
const report = shallowRef21(undefined);
|
|
11071
11333
|
const updatedAt = ref16(undefined);
|
|
11072
11334
|
const sync = () => {
|
|
11073
11335
|
const snapshot = store.getSnapshot();
|
|
@@ -11081,7 +11343,7 @@ function useVoiceWorkflowStatus(path = "/evals/scenarios/json", options = {}) {
|
|
|
11081
11343
|
if (typeof window !== "undefined") {
|
|
11082
11344
|
store.refresh().catch(() => {});
|
|
11083
11345
|
}
|
|
11084
|
-
|
|
11346
|
+
onUnmounted22(() => {
|
|
11085
11347
|
unsubscribe();
|
|
11086
11348
|
store.close();
|
|
11087
11349
|
});
|
|
@@ -11115,6 +11377,7 @@ export {
|
|
|
11115
11377
|
useVoiceDeliveryRuntime,
|
|
11116
11378
|
useVoiceController,
|
|
11117
11379
|
useVoiceCampaignDialerProof,
|
|
11380
|
+
useVoiceCallDebugger,
|
|
11118
11381
|
useVoiceAgentSquadStatus,
|
|
11119
11382
|
VoiceTurnQuality,
|
|
11120
11383
|
VoiceTurnLatency,
|
|
@@ -11129,5 +11392,6 @@ export {
|
|
|
11129
11392
|
VoicePlatformCoverage,
|
|
11130
11393
|
VoiceOpsStatus,
|
|
11131
11394
|
VoiceOpsActionCenter,
|
|
11132
|
-
VoiceDeliveryRuntime
|
|
11395
|
+
VoiceDeliveryRuntime,
|
|
11396
|
+
VoiceCallDebuggerLaunch
|
|
11133
11397
|
};
|