@absolutejs/voice 0.0.22-beta.160 → 0.0.22-beta.161
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 +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +175 -28
- package/dist/productionReadiness.d.ts +14 -0
- package/dist/readinessProfiles.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -228,6 +228,7 @@ app.use(
|
|
|
228
228
|
createVoiceProductionReadinessRoutes({
|
|
229
229
|
...createVoiceReadinessProfile('meeting-recorder', {
|
|
230
230
|
bargeInReports: async () => [await buildBargeInReport()],
|
|
231
|
+
explain: true,
|
|
231
232
|
providerRoutingContracts: async () => [await runProviderRoutingContract()],
|
|
232
233
|
reconnectContracts: async () => [await runReconnectContract()]
|
|
233
234
|
}),
|
|
@@ -251,6 +252,7 @@ app.use(
|
|
|
251
252
|
auditDeliveries: runtime.auditDeliveries,
|
|
252
253
|
carriers: loadCarrierMatrixInputs,
|
|
253
254
|
deliveryRuntime,
|
|
255
|
+
explain: true,
|
|
254
256
|
phoneAgentSmokes: async () => [await runPhoneSmoke()],
|
|
255
257
|
providerRoutingContracts: async () => [await runProviderRoutingContract()],
|
|
256
258
|
traceDeliveries: runtime.traceDeliveries
|
|
@@ -281,6 +283,8 @@ app.use(
|
|
|
281
283
|
|
|
282
284
|
The profile helper intentionally does not mount routes, create storage, start workers, or prescribe a deploy workflow. It only returns readiness options so teams can standardize defaults while keeping control over proof sources and route mounting.
|
|
283
285
|
|
|
286
|
+
Pass `explain: true` when the readiness JSON and HTML should describe the selected profile, its purpose, and which expected proof surfaces are configured or still missing. This is useful for customer demos and internal release reviews where the readiness URL needs to explain what it certifies without sending people to docs.
|
|
287
|
+
|
|
284
288
|
## Delivery Runtime Presets
|
|
285
289
|
|
|
286
290
|
Use `createVoiceDeliveryRuntimePresetConfig(...)` when you want one primitive to create paired audit and trace delivery workers for the same target. The preset returns a normal `VoiceDeliveryRuntimeConfig`, so you can still inspect or override worker options before passing it to `createVoiceDeliveryRuntime(...)`.
|
package/dist/index.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ export type { VoicePhoneAgentCarrier, VoicePhoneAgentCarrierSummary, VoicePhoneA
|
|
|
103
103
|
export type { VoicePhoneAgentProductionSmokeIssue, VoicePhoneAgentProductionSmokeHandlerOptions, VoicePhoneAgentProductionSmokeHTMLHandlerOptions, VoicePhoneAgentProductionSmokeOptions, VoicePhoneAgentProductionSmokeReport, VoicePhoneAgentProductionSmokeRoutesOptions, VoicePhoneAgentProductionSmokeRequirement } from './phoneAgentProductionSmoke';
|
|
104
104
|
export type { VoiceOpsConsoleLink, VoiceOpsConsoleReport, VoiceOpsConsoleRoutesOptions } from './opsConsoleRoutes';
|
|
105
105
|
export type { VoiceOpsStatus, VoiceOpsStatusLink, VoiceOpsStatusOptions, VoiceOpsStatusReport, VoiceOpsStatusRoutesOptions } from './opsStatus';
|
|
106
|
-
export type { VoiceProductionReadinessAction, VoiceProductionReadinessAuditOptions, VoiceProductionReadinessAuditRequirement, VoiceProductionReadinessAuditSummary, VoiceProductionReadinessCheck, VoiceProductionReadinessGateIssue, VoiceProductionReadinessGateOptions, VoiceProductionReadinessGateReport, VoiceProductionReadinessOpsActionHistoryOptions, VoiceProductionReadinessOpsActionHistorySummary, VoiceProductionReadinessProofSource, VoiceProductionReadinessReport, VoiceProductionReadinessRoutesOptions, VoiceProductionReadinessTraceDeliverySummary, VoiceProductionReadinessAuditDeliveryOptions, VoiceProductionReadinessAuditDeliverySummary, VoiceProductionReadinessTraceDeliveryOptions, VoiceProductionReadinessStatus } from './productionReadiness';
|
|
106
|
+
export type { VoiceProductionReadinessAction, VoiceProductionReadinessAuditOptions, VoiceProductionReadinessAuditRequirement, VoiceProductionReadinessAuditSummary, VoiceProductionReadinessCheck, VoiceProductionReadinessGateIssue, VoiceProductionReadinessGateOptions, VoiceProductionReadinessGateReport, VoiceProductionReadinessOpsActionHistoryOptions, VoiceProductionReadinessOpsActionHistorySummary, VoiceProductionReadinessProfileExplanation, VoiceProductionReadinessProfileSurface, VoiceProductionReadinessProofSource, VoiceProductionReadinessReport, VoiceProductionReadinessRoutesOptions, VoiceProductionReadinessTraceDeliverySummary, VoiceProductionReadinessAuditDeliveryOptions, VoiceProductionReadinessAuditDeliverySummary, VoiceProductionReadinessTraceDeliveryOptions, VoiceProductionReadinessStatus } from './productionReadiness';
|
|
107
107
|
export type { VoiceReadinessProfileName, VoiceReadinessProfileOptions, VoiceReadinessProfileRoutesOptions } from './readinessProfiles';
|
|
108
108
|
export type { VoiceQualityLink, VoiceQualityMetric, VoiceQualityReport, VoiceQualityRoutesOptions, VoiceQualityStatus, VoiceQualityThresholds } from './qualityRoutes';
|
|
109
109
|
export type { VoiceResilienceIOSimulator, VoiceResilienceLink, VoiceResiliencePageData, VoiceResilienceRoutesOptions, VoiceResilienceSimulationProvider, VoiceRoutingKindSummary, VoiceRoutingDecisionSummary, VoiceRoutingDecisionSummaryOptions, VoiceRoutingEvent, VoiceRoutingEventKind, VoiceRoutingSessionSummary, VoiceRoutingSessionSummaryOptions } from './resilienceRoutes';
|
package/dist/index.js
CHANGED
|
@@ -20847,6 +20847,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
|
|
|
20847
20847
|
traceDeliveries: "/traces/deliveries",
|
|
20848
20848
|
...options.links
|
|
20849
20849
|
},
|
|
20850
|
+
profile: options.profile || undefined,
|
|
20850
20851
|
proofSources,
|
|
20851
20852
|
status: rollupStatus2(checks),
|
|
20852
20853
|
summary: {
|
|
@@ -20888,6 +20889,7 @@ var buildVoiceProductionReadinessReport = async (options, input = {}) => {
|
|
|
20888
20889
|
var buildVoiceProductionReadinessGate = async (options, input = {}) => summarizeVoiceProductionReadinessGate(await buildVoiceProductionReadinessReport(options, input), options.gate || undefined);
|
|
20889
20890
|
var renderVoiceProductionReadinessHTML = (report, options = {}) => {
|
|
20890
20891
|
const title = options.title ?? "AbsoluteJS Voice Production Readiness";
|
|
20892
|
+
const profile = report.profile ? `<section class="profile"><p class="eyebrow">Readiness profile</p><h2>${escapeHtml35(report.profile.name)}</h2><p>${escapeHtml35(report.profile.description)}</p><p>${escapeHtml35(report.profile.purpose)}</p><div class="profile-surfaces">${report.profile.surfaces.map((surface) => `<article class="${surface.configured ? "pass" : "warn"}"><span>${surface.configured ? "CONFIGURED" : "EXPECTED"}</span><strong>${surface.href ? `<a href="${escapeHtml35(surface.href)}">${escapeHtml35(surface.label)}</a>` : escapeHtml35(surface.label)}</strong></article>`).join("")}</div></section>` : "";
|
|
20891
20893
|
const checks = report.checks.map((check, index) => {
|
|
20892
20894
|
const actions = (check.actions ?? []).map((action) => action.method === "POST" ? `<button type="button" data-readiness-action="${index}" data-action-url="${escapeHtml35(action.href)}">${escapeHtml35(action.label)}</button>` : `<a href="${escapeHtml35(action.href)}">${escapeHtml35(action.label)}</a>`).join("");
|
|
20893
20895
|
return `<article class="check ${escapeHtml35(check.status)}">
|
|
@@ -20902,7 +20904,7 @@ var renderVoiceProductionReadinessHTML = (report, options = {}) => {
|
|
|
20902
20904
|
${check.href ? `<a href="${escapeHtml35(check.href)}">Open surface</a>` : ""}
|
|
20903
20905
|
</article>`;
|
|
20904
20906
|
}).join("");
|
|
20905
|
-
return `<!doctype html><html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>${escapeHtml35(title)}</title><style>body{background:#0c0f14;color:#f6f2e8;font-family:ui-sans-serif,system-ui,sans-serif;margin:0}main{margin:auto;max-width:1060px;padding:32px}.hero{background:linear-gradient(135deg,rgba(20,184,166,.18),rgba(245,158,11,.12));border:1px solid #26313d;border-radius:28px;margin-bottom:18px;padding:28px}.eyebrow{color:#fbbf24;font-weight:900;letter-spacing:.12em;text-transform:uppercase}h1{font-size:clamp(2.4rem,6vw,5rem);line-height:.9;margin:.2rem 0 1rem}.status{display:inline-flex;border:1px solid #3f3f46;border-radius:999px;padding:8px 12px}.status.pass,.check.pass{border-color:rgba(34,197,94,.55)}.status.warn,.check.warn{border-color:rgba(245,158,11,.65)}.status.fail,.check.fail{border-color:rgba(239,68,68,.75)}.checks{display:grid;gap:14px}.check{align-items:center;background:#141922;border:1px solid #26313d;border-radius:22px;display:grid;gap:16px;grid-template-columns:1fr auto auto;padding:18px}.check span{color:#a8b0b8;font-size:.78rem;font-weight:900;letter-spacing:.08em}.check h2{margin:.2rem 0}.check p{color:#b9c0c8;margin:.2rem 0 0}.check .proof-source{color:#f9d77e;font-weight:800}.check strong{font-size:1.5rem}.actions{display:flex;flex-wrap:wrap;gap:10px}.check a,a{color:#fbbf24}button{background:#fbbf24;border:0;border-radius:999px;color:#111827;cursor:pointer;font-weight:800;padding:9px 12px}button:disabled{cursor:wait;opacity:.65}@media(max-width:760px){main{padding:20px}.check{grid-template-columns:1fr}}</style></head><body><main><section class="hero"><p class="eyebrow">Self-hosted readiness</p><h1>${escapeHtml35(title)}</h1><p>One deployable pass/fail report for quality gates, provider failover, session health, handoffs, routing evidence, and optional carrier readiness.</p><p class="status ${escapeHtml35(report.status)}">Overall: ${escapeHtml35(report.status.toUpperCase())}</p><p>Checked ${escapeHtml35(new Date(report.checkedAt).toLocaleString())}</p></section
|
|
20907
|
+
return `<!doctype html><html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>${escapeHtml35(title)}</title><style>body{background:#0c0f14;color:#f6f2e8;font-family:ui-sans-serif,system-ui,sans-serif;margin:0}main{margin:auto;max-width:1060px;padding:32px}.hero,.profile{background:linear-gradient(135deg,rgba(20,184,166,.18),rgba(245,158,11,.12));border:1px solid #26313d;border-radius:28px;margin-bottom:18px;padding:28px}.profile{background:#111722}.eyebrow{color:#fbbf24;font-weight:900;letter-spacing:.12em;text-transform:uppercase}h1{font-size:clamp(2.4rem,6vw,5rem);line-height:.9;margin:.2rem 0 1rem}.status{display:inline-flex;border:1px solid #3f3f46;border-radius:999px;padding:8px 12px}.status.pass,.check.pass,.profile-surfaces .pass{border-color:rgba(34,197,94,.55)}.status.warn,.check.warn,.profile-surfaces .warn{border-color:rgba(245,158,11,.65)}.status.fail,.check.fail{border-color:rgba(239,68,68,.75)}.checks{display:grid;gap:14px}.check{align-items:center;background:#141922;border:1px solid #26313d;border-radius:22px;display:grid;gap:16px;grid-template-columns:1fr auto auto;padding:18px}.check span,.profile-surfaces span{color:#a8b0b8;font-size:.78rem;font-weight:900;letter-spacing:.08em}.check h2{margin:.2rem 0}.check p,.profile p{color:#b9c0c8;margin:.2rem 0 0}.check .proof-source{color:#f9d77e;font-weight:800}.check strong{font-size:1.5rem}.profile-surfaces{display:grid;gap:10px;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));margin-top:16px}.profile-surfaces article{background:#141922;border:1px solid #26313d;border-radius:16px;padding:14px}.profile-surfaces strong{display:block;margin-top:6px}.actions{display:flex;flex-wrap:wrap;gap:10px}.check a,a{color:#fbbf24}button{background:#fbbf24;border:0;border-radius:999px;color:#111827;cursor:pointer;font-weight:800;padding:9px 12px}button:disabled{cursor:wait;opacity:.65}@media(max-width:760px){main{padding:20px}.check{grid-template-columns:1fr}}</style></head><body><main><section class="hero"><p class="eyebrow">Self-hosted readiness</p><h1>${escapeHtml35(title)}</h1><p>One deployable pass/fail report for quality gates, provider failover, session health, handoffs, routing evidence, and optional carrier readiness.</p><p class="status ${escapeHtml35(report.status)}">Overall: ${escapeHtml35(report.status.toUpperCase())}</p><p>Checked ${escapeHtml35(new Date(report.checkedAt).toLocaleString())}</p></section>${profile}<section class="checks">${checks}</section></main><script>document.querySelectorAll("[data-readiness-action]").forEach((button)=>{button.addEventListener("click",async()=>{const url=button.getAttribute("data-action-url");if(!url)return;button.disabled=true;const original=button.textContent;button.textContent="Running...";try{const response=await fetch(url,{method:"POST"});button.textContent=response.ok?"Done. Reloading...":"Failed";if(response.ok)setTimeout(()=>location.reload(),500)}catch{button.textContent="Failed"}finally{setTimeout(()=>{button.disabled=false;button.textContent=original},1500)}})});</script></body></html>`;
|
|
20906
20908
|
};
|
|
20907
20909
|
var createVoiceProductionReadinessRoutes = (options) => {
|
|
20908
20910
|
const path = options.path ?? "/api/production-readiness";
|
|
@@ -20956,62 +20958,207 @@ var mergeLinks = (defaults, links) => ({
|
|
|
20956
20958
|
...defaults,
|
|
20957
20959
|
...links
|
|
20958
20960
|
});
|
|
20961
|
+
var isConfigured = (value) => value !== undefined && value !== false;
|
|
20962
|
+
var profileExplanation = (profile, options, links) => {
|
|
20963
|
+
if (!options.explain) {
|
|
20964
|
+
return;
|
|
20965
|
+
}
|
|
20966
|
+
if (profile === "meeting-recorder") {
|
|
20967
|
+
return {
|
|
20968
|
+
description: "Browser and meeting-recorder readiness for transcript capture, reconnects, barge-in, provider fallback, and live latency proof.",
|
|
20969
|
+
name: "meeting-recorder",
|
|
20970
|
+
purpose: "Certifies the browser voice surfaces a meeting recorder or browser assistant needs before users rely on captured transcripts and summaries.",
|
|
20971
|
+
surfaces: [
|
|
20972
|
+
{
|
|
20973
|
+
configured: true,
|
|
20974
|
+
href: links.liveLatency,
|
|
20975
|
+
key: "liveLatency",
|
|
20976
|
+
label: "Live latency"
|
|
20977
|
+
},
|
|
20978
|
+
{
|
|
20979
|
+
configured: true,
|
|
20980
|
+
href: links.sessions,
|
|
20981
|
+
key: "sessions",
|
|
20982
|
+
label: "Session health"
|
|
20983
|
+
},
|
|
20984
|
+
{
|
|
20985
|
+
configured: true,
|
|
20986
|
+
href: links.resilience,
|
|
20987
|
+
key: "providerFallback",
|
|
20988
|
+
label: "Provider fallback"
|
|
20989
|
+
},
|
|
20990
|
+
{
|
|
20991
|
+
configured: isConfigured(options.providerRoutingContracts),
|
|
20992
|
+
href: links.providerRoutingContracts,
|
|
20993
|
+
key: "providerRoutingContracts",
|
|
20994
|
+
label: "Provider routing contracts"
|
|
20995
|
+
},
|
|
20996
|
+
{
|
|
20997
|
+
configured: isConfigured(options.reconnectContracts),
|
|
20998
|
+
href: links.reconnectContracts,
|
|
20999
|
+
key: "reconnectContracts",
|
|
21000
|
+
label: "Reconnect contracts"
|
|
21001
|
+
},
|
|
21002
|
+
{
|
|
21003
|
+
configured: isConfigured(options.bargeInReports),
|
|
21004
|
+
href: links.bargeIn,
|
|
21005
|
+
key: "bargeInReports",
|
|
21006
|
+
label: "Barge-in proof"
|
|
21007
|
+
}
|
|
21008
|
+
]
|
|
21009
|
+
};
|
|
21010
|
+
}
|
|
21011
|
+
if (profile === "phone-agent") {
|
|
21012
|
+
return {
|
|
21013
|
+
description: "Carrier-backed phone-agent readiness for setup parity, phone smoke proof, handoffs, routing contracts, and delivery queues.",
|
|
21014
|
+
name: "phone-agent",
|
|
21015
|
+
purpose: "Certifies the proof surfaces a self-hosted phone agent needs before routing real carrier calls through the app.",
|
|
21016
|
+
surfaces: [
|
|
21017
|
+
{
|
|
21018
|
+
configured: isConfigured(options.carriers),
|
|
21019
|
+
href: links.carriers,
|
|
21020
|
+
key: "carriers",
|
|
21021
|
+
label: "Carrier readiness"
|
|
21022
|
+
},
|
|
21023
|
+
{
|
|
21024
|
+
configured: isConfigured(options.phoneAgentSmokes),
|
|
21025
|
+
href: links.phoneAgentSmoke,
|
|
21026
|
+
key: "phoneAgentSmokes",
|
|
21027
|
+
label: "Phone agent smoke"
|
|
21028
|
+
},
|
|
21029
|
+
{
|
|
21030
|
+
configured: true,
|
|
21031
|
+
href: links.handoffs,
|
|
21032
|
+
key: "handoffs",
|
|
21033
|
+
label: "Handoff delivery"
|
|
21034
|
+
},
|
|
21035
|
+
{
|
|
21036
|
+
configured: isConfigured(options.providerRoutingContracts),
|
|
21037
|
+
href: links.providerRoutingContracts,
|
|
21038
|
+
key: "providerRoutingContracts",
|
|
21039
|
+
label: "Provider routing contracts"
|
|
21040
|
+
},
|
|
21041
|
+
{
|
|
21042
|
+
configured: isConfigured(options.deliveryRuntime),
|
|
21043
|
+
href: links.deliveryRuntime,
|
|
21044
|
+
key: "deliveryRuntime",
|
|
21045
|
+
label: "Delivery runtime"
|
|
21046
|
+
},
|
|
21047
|
+
{
|
|
21048
|
+
configured: isConfigured(options.auditDeliveries),
|
|
21049
|
+
href: links.auditDeliveries,
|
|
21050
|
+
key: "auditDeliveries",
|
|
21051
|
+
label: "Audit deliveries"
|
|
21052
|
+
},
|
|
21053
|
+
{
|
|
21054
|
+
configured: isConfigured(options.traceDeliveries),
|
|
21055
|
+
href: links.traceDeliveries,
|
|
21056
|
+
key: "traceDeliveries",
|
|
21057
|
+
label: "Trace deliveries"
|
|
21058
|
+
}
|
|
21059
|
+
]
|
|
21060
|
+
};
|
|
21061
|
+
}
|
|
21062
|
+
return {
|
|
21063
|
+
description: "Operations-heavy readiness for audit evidence, operator action history, delivery health, runtime queues, and deploy gate status.",
|
|
21064
|
+
name: "ops-heavy",
|
|
21065
|
+
purpose: "Certifies the operational control-plane proof surfaces that should block releases when evidence, queues, or operator actions are unhealthy.",
|
|
21066
|
+
surfaces: [
|
|
21067
|
+
{
|
|
21068
|
+
configured: isConfigured(options.audit),
|
|
21069
|
+
href: links.audit,
|
|
21070
|
+
key: "audit",
|
|
21071
|
+
label: "Audit evidence"
|
|
21072
|
+
},
|
|
21073
|
+
{
|
|
21074
|
+
configured: isConfigured(options.opsActionHistory ?? options.audit),
|
|
21075
|
+
href: links.opsActions,
|
|
21076
|
+
key: "opsActionHistory",
|
|
21077
|
+
label: "Operator action history"
|
|
21078
|
+
},
|
|
21079
|
+
{
|
|
21080
|
+
configured: isConfigured(options.deliveryRuntime),
|
|
21081
|
+
href: links.deliveryRuntime,
|
|
21082
|
+
key: "deliveryRuntime",
|
|
21083
|
+
label: "Delivery runtime"
|
|
21084
|
+
},
|
|
21085
|
+
{
|
|
21086
|
+
configured: isConfigured(options.auditDeliveries),
|
|
21087
|
+
href: links.auditDeliveries,
|
|
21088
|
+
key: "auditDeliveries",
|
|
21089
|
+
label: "Audit deliveries"
|
|
21090
|
+
},
|
|
21091
|
+
{
|
|
21092
|
+
configured: isConfigured(options.traceDeliveries),
|
|
21093
|
+
href: links.traceDeliveries,
|
|
21094
|
+
key: "traceDeliveries",
|
|
21095
|
+
label: "Trace deliveries"
|
|
21096
|
+
}
|
|
21097
|
+
]
|
|
21098
|
+
};
|
|
21099
|
+
};
|
|
20959
21100
|
var createVoiceReadinessProfile = (profile, options = {}) => {
|
|
20960
21101
|
if (profile === "meeting-recorder") {
|
|
21102
|
+
const links2 = mergeLinks({
|
|
21103
|
+
bargeIn: "/barge-in",
|
|
21104
|
+
liveLatency: "/live-latency",
|
|
21105
|
+
providerRoutingContracts: "/resilience",
|
|
21106
|
+
quality: "/quality",
|
|
21107
|
+
reconnectContracts: "/voice/reconnect-contract",
|
|
21108
|
+
resilience: "/resilience",
|
|
21109
|
+
sessions: "/sessions"
|
|
21110
|
+
}, options.links);
|
|
20961
21111
|
return withDefined({
|
|
20962
21112
|
bargeInReports: options.bargeInReports,
|
|
20963
21113
|
gate: options.gate,
|
|
20964
|
-
links:
|
|
20965
|
-
|
|
20966
|
-
liveLatency: "/live-latency",
|
|
20967
|
-
providerRoutingContracts: "/resilience",
|
|
20968
|
-
quality: "/quality",
|
|
20969
|
-
reconnectContracts: "/voice/reconnect-contract",
|
|
20970
|
-
resilience: "/resilience",
|
|
20971
|
-
sessions: "/sessions"
|
|
20972
|
-
}, options.links),
|
|
21114
|
+
links: links2,
|
|
21115
|
+
profile: profileExplanation(profile, options, links2),
|
|
20973
21116
|
proofSources: options.proofSources,
|
|
20974
21117
|
providerRoutingContracts: options.providerRoutingContracts,
|
|
20975
21118
|
reconnectContracts: options.reconnectContracts
|
|
20976
21119
|
});
|
|
20977
21120
|
}
|
|
20978
21121
|
if (profile === "phone-agent") {
|
|
21122
|
+
const links2 = mergeLinks({
|
|
21123
|
+
auditDeliveries: "/audit/deliveries",
|
|
21124
|
+
carriers: "/carriers",
|
|
21125
|
+
deliveryRuntime: "/delivery-runtime",
|
|
21126
|
+
handoffs: "/handoffs",
|
|
21127
|
+
phoneAgentSmoke: "/sessions",
|
|
21128
|
+
providerRoutingContracts: "/resilience",
|
|
21129
|
+
resilience: "/resilience",
|
|
21130
|
+
sessions: "/sessions",
|
|
21131
|
+
traceDeliveries: "/traces/deliveries"
|
|
21132
|
+
}, options.links);
|
|
20979
21133
|
return withDefined({
|
|
20980
21134
|
auditDeliveries: options.auditDeliveries,
|
|
20981
21135
|
carriers: options.carriers,
|
|
20982
21136
|
deliveryRuntime: options.deliveryRuntime,
|
|
20983
21137
|
gate: options.gate,
|
|
20984
|
-
links:
|
|
20985
|
-
auditDeliveries: "/audit/deliveries",
|
|
20986
|
-
carriers: "/carriers",
|
|
20987
|
-
deliveryRuntime: "/delivery-runtime",
|
|
20988
|
-
handoffs: "/handoffs",
|
|
20989
|
-
phoneAgentSmoke: "/sessions",
|
|
20990
|
-
providerRoutingContracts: "/resilience",
|
|
20991
|
-
resilience: "/resilience",
|
|
20992
|
-
sessions: "/sessions",
|
|
20993
|
-
traceDeliveries: "/traces/deliveries"
|
|
20994
|
-
}, options.links),
|
|
21138
|
+
links: links2,
|
|
20995
21139
|
phoneAgentSmokes: options.phoneAgentSmokes,
|
|
21140
|
+
profile: profileExplanation(profile, options, links2),
|
|
20996
21141
|
proofSources: options.proofSources,
|
|
20997
21142
|
providerRoutingContracts: options.providerRoutingContracts,
|
|
20998
21143
|
traceDeliveries: options.traceDeliveries
|
|
20999
21144
|
});
|
|
21000
21145
|
}
|
|
21001
21146
|
const opsActionHistory = options.opsActionHistory ?? auditStoreFromOptions(options.audit);
|
|
21147
|
+
const links = mergeLinks({
|
|
21148
|
+
audit: "/audit",
|
|
21149
|
+
auditDeliveries: "/audit/deliveries",
|
|
21150
|
+
deliveryRuntime: "/delivery-runtime",
|
|
21151
|
+
opsActions: "/voice/ops-actions",
|
|
21152
|
+
traceDeliveries: "/traces/deliveries"
|
|
21153
|
+
}, options.links);
|
|
21002
21154
|
return withDefined({
|
|
21003
21155
|
audit: options.audit,
|
|
21004
21156
|
auditDeliveries: options.auditDeliveries,
|
|
21005
21157
|
deliveryRuntime: options.deliveryRuntime,
|
|
21006
21158
|
gate: options.gate,
|
|
21007
|
-
links
|
|
21008
|
-
audit: "/audit",
|
|
21009
|
-
auditDeliveries: "/audit/deliveries",
|
|
21010
|
-
deliveryRuntime: "/delivery-runtime",
|
|
21011
|
-
opsActions: "/voice/ops-actions",
|
|
21012
|
-
traceDeliveries: "/traces/deliveries"
|
|
21013
|
-
}, options.links),
|
|
21159
|
+
links,
|
|
21014
21160
|
opsActionHistory,
|
|
21161
|
+
profile: profileExplanation(profile, options, links),
|
|
21015
21162
|
proofSources: options.proofSources,
|
|
21016
21163
|
traceDeliveries: options.traceDeliveries
|
|
21017
21164
|
});
|
|
@@ -52,6 +52,18 @@ export type VoiceProductionReadinessProofSource = {
|
|
|
52
52
|
source: string;
|
|
53
53
|
sourceLabel: string;
|
|
54
54
|
};
|
|
55
|
+
export type VoiceProductionReadinessProfileSurface = {
|
|
56
|
+
configured: boolean;
|
|
57
|
+
href?: string;
|
|
58
|
+
key: string;
|
|
59
|
+
label: string;
|
|
60
|
+
};
|
|
61
|
+
export type VoiceProductionReadinessProfileExplanation = {
|
|
62
|
+
description: string;
|
|
63
|
+
name: string;
|
|
64
|
+
purpose: string;
|
|
65
|
+
surfaces: VoiceProductionReadinessProfileSurface[];
|
|
66
|
+
};
|
|
55
67
|
export type VoiceProductionReadinessReport = {
|
|
56
68
|
checkedAt: number;
|
|
57
69
|
checks: VoiceProductionReadinessCheck[];
|
|
@@ -74,6 +86,7 @@ export type VoiceProductionReadinessReport = {
|
|
|
74
86
|
sessions?: string;
|
|
75
87
|
traceDeliveries?: string;
|
|
76
88
|
};
|
|
89
|
+
profile?: VoiceProductionReadinessProfileExplanation;
|
|
77
90
|
proofSources?: Record<string, VoiceProductionReadinessProofSource>;
|
|
78
91
|
status: VoiceProductionReadinessStatus;
|
|
79
92
|
summary: {
|
|
@@ -284,6 +297,7 @@ export type VoiceProductionReadinessRoutesOptions = {
|
|
|
284
297
|
query: Record<string, unknown>;
|
|
285
298
|
request: Request;
|
|
286
299
|
}) => Promise<Record<string, VoiceProductionReadinessProofSource>> | Record<string, VoiceProductionReadinessProofSource>);
|
|
300
|
+
profile?: false | VoiceProductionReadinessProfileExplanation;
|
|
287
301
|
render?: (report: VoiceProductionReadinessReport) => string | Promise<string>;
|
|
288
302
|
store: VoiceTraceEventStore;
|
|
289
303
|
sttProviders?: readonly string[];
|
|
@@ -6,6 +6,7 @@ export type VoiceReadinessProfileOptions = {
|
|
|
6
6
|
bargeInReports?: VoiceProductionReadinessRoutesOptions['bargeInReports'];
|
|
7
7
|
carriers?: VoiceProductionReadinessRoutesOptions['carriers'];
|
|
8
8
|
deliveryRuntime?: VoiceProductionReadinessRoutesOptions['deliveryRuntime'];
|
|
9
|
+
explain?: boolean;
|
|
9
10
|
gate?: VoiceProductionReadinessRoutesOptions['gate'];
|
|
10
11
|
links?: VoiceProductionReadinessRoutesOptions['links'];
|
|
11
12
|
opsActionHistory?: VoiceProductionReadinessOpsActionHistoryOptions;
|