@absolutejs/voice 0.0.22-beta.438 → 0.0.22-beta.439
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/incidentTimeline.d.ts +49 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +143 -2
- package/package.json +1 -1
|
@@ -60,6 +60,44 @@ export type VoiceIncidentRecoveryOutcomeReport = {
|
|
|
60
60
|
total: number;
|
|
61
61
|
unchanged: number;
|
|
62
62
|
};
|
|
63
|
+
export type VoiceIncidentRecoveryTrendStatus = 'empty' | 'fail' | 'pass' | 'warn';
|
|
64
|
+
export type VoiceIncidentRecoveryTrendCycle = {
|
|
65
|
+
checkedAt: number;
|
|
66
|
+
failed: number;
|
|
67
|
+
failureRate: number;
|
|
68
|
+
improved: number;
|
|
69
|
+
improvementRate: number;
|
|
70
|
+
regressed: number;
|
|
71
|
+
regressionRate: number;
|
|
72
|
+
total: number;
|
|
73
|
+
unchanged: number;
|
|
74
|
+
unchangedRate: number;
|
|
75
|
+
};
|
|
76
|
+
export type VoiceIncidentRecoveryTrendReport = {
|
|
77
|
+
checkedAt: number;
|
|
78
|
+
cycles: VoiceIncidentRecoveryTrendCycle[];
|
|
79
|
+
latest?: VoiceIncidentRecoveryTrendCycle;
|
|
80
|
+
previous?: VoiceIncidentRecoveryTrendCycle;
|
|
81
|
+
status: VoiceIncidentRecoveryTrendStatus;
|
|
82
|
+
summary: {
|
|
83
|
+
cycles: number;
|
|
84
|
+
failed: number;
|
|
85
|
+
failureRate: number;
|
|
86
|
+
improved: number;
|
|
87
|
+
improvementRate: number;
|
|
88
|
+
regressed: number;
|
|
89
|
+
regressionRate: number;
|
|
90
|
+
total: number;
|
|
91
|
+
unchanged: number;
|
|
92
|
+
unchangedRate: number;
|
|
93
|
+
};
|
|
94
|
+
trend: {
|
|
95
|
+
failureRateDelta?: number;
|
|
96
|
+
improvementRateDelta?: number;
|
|
97
|
+
regressionRateDelta?: number;
|
|
98
|
+
unchangedRateDelta?: number;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
63
101
|
export type VoiceIncidentRecoveryOutcomeOptions = {
|
|
64
102
|
audit?: VoiceAuditEventStore;
|
|
65
103
|
limit?: number;
|
|
@@ -138,6 +176,10 @@ export type VoiceIncidentTimelineRoutesOptions = VoiceIncidentTimelineOptions &
|
|
|
138
176
|
render?: (report: VoiceIncidentTimelineReport) => string | Promise<string>;
|
|
139
177
|
recoveryOutcomeHtmlPath?: false | string;
|
|
140
178
|
recoveryOutcomePath?: false | string;
|
|
179
|
+
recoveryTrendHtmlPath?: false | string;
|
|
180
|
+
recoveryTrendMarkdownPath?: false | string;
|
|
181
|
+
recoveryTrendPath?: false | string;
|
|
182
|
+
recoveryTrendReports?: VoiceIncidentRecoveryOutcomeReport[] | (() => VoiceIncidentRecoveryOutcomeReport[] | Promise<VoiceIncidentRecoveryOutcomeReport[]>);
|
|
141
183
|
title?: string;
|
|
142
184
|
trace?: VoiceTraceEventStore;
|
|
143
185
|
};
|
|
@@ -146,6 +188,13 @@ export declare const renderVoiceIncidentRecoveryOutcomeHTML: (report: VoiceIncid
|
|
|
146
188
|
title?: string;
|
|
147
189
|
}) => string;
|
|
148
190
|
export declare const buildVoiceIncidentRecoveryOutcomeReadinessCheck: (report: VoiceIncidentRecoveryOutcomeReport, options?: VoiceIncidentRecoveryOutcomeReadinessOptions) => VoiceProductionReadinessCheck;
|
|
191
|
+
export declare const buildVoiceIncidentRecoveryTrendReport: (reports?: readonly VoiceIncidentRecoveryOutcomeReport[]) => VoiceIncidentRecoveryTrendReport;
|
|
192
|
+
export declare const renderVoiceIncidentRecoveryTrendMarkdown: (report: VoiceIncidentRecoveryTrendReport, options?: {
|
|
193
|
+
title?: string;
|
|
194
|
+
}) => string;
|
|
195
|
+
export declare const renderVoiceIncidentRecoveryTrendHTML: (report: VoiceIncidentRecoveryTrendReport, options?: {
|
|
196
|
+
title?: string;
|
|
197
|
+
}) => string;
|
|
149
198
|
export declare const buildVoiceIncidentTimelineReport: (options: VoiceIncidentTimelineOptions) => Promise<VoiceIncidentTimelineReport>;
|
|
150
199
|
export declare const renderVoiceIncidentTimelineMarkdown: (report: VoiceIncidentTimelineReport, options?: {
|
|
151
200
|
title?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export { assertVoiceLiveOpsControlEvidence, assertVoiceLiveOpsEvidence, buildVoi
|
|
|
52
52
|
export type { VoiceLiveOpsAction, VoiceLiveOpsActionInput, VoiceLiveOpsActionResult, VoiceLiveOpsControllerOptions, VoiceLiveOpsControlState, VoiceLiveOpsControlStatus, VoiceLiveOpsControlStore, VoiceLiveOpsControlEvidenceInput, VoiceLiveOpsControlEvidenceReport, VoiceLiveOpsEvidenceInput, VoiceLiveOpsEvidenceReport, VoiceLiveOpsRoutesOptions } from './liveOps';
|
|
53
53
|
export { buildVoiceDeliveryRuntimeReport, createVoiceDeliveryRuntime, createVoiceDeliveryRuntimePresetConfig, createVoiceDeliveryRuntimeRoutes, renderVoiceDeliveryRuntimeHTML } from './deliveryRuntime';
|
|
54
54
|
export { buildVoiceOperationalStatusReport, createVoiceOperationalStatusRoutes, renderVoiceOperationalStatusHTML } from './operationalStatus';
|
|
55
|
-
export { buildVoiceIncidentRecoveryOutcomeReport, buildVoiceIncidentRecoveryOutcomeReadinessCheck, buildVoiceIncidentTimelineReport, createVoiceIncidentTimelineRoutes, renderVoiceIncidentRecoveryOutcomeHTML, renderVoiceIncidentTimelineHTML, renderVoiceIncidentTimelineMarkdown } from './incidentTimeline';
|
|
55
|
+
export { buildVoiceIncidentRecoveryOutcomeReport, buildVoiceIncidentRecoveryOutcomeReadinessCheck, buildVoiceIncidentRecoveryTrendReport, buildVoiceIncidentTimelineReport, createVoiceIncidentTimelineRoutes, renderVoiceIncidentRecoveryOutcomeHTML, renderVoiceIncidentRecoveryTrendHTML, renderVoiceIncidentRecoveryTrendMarkdown, renderVoiceIncidentTimelineHTML, renderVoiceIncidentTimelineMarkdown } from './incidentTimeline';
|
|
56
56
|
export { applyVoiceDataRetentionPolicy, assertVoiceDataControlEvidence, buildVoiceDataControlReport, buildVoiceDataRetentionPlan, createVoiceDataControlRoutes, createVoiceZeroRetentionPolicy, evaluateVoiceDataControlEvidence, renderVoiceDataControlHTML, renderVoiceDataControlMarkdown, voiceComplianceRedactionDefaults } from './dataControl';
|
|
57
57
|
export type { VoiceDataControlAssertionInput, VoiceDataControlAssertionReport, VoiceDataControlProviderKeySurface, VoiceDataControlReport, VoiceDataControlRoutesOptions, VoiceDataControlStorageSurface, VoiceDataRetentionPolicy, VoiceDataRetentionReport, VoiceDataRetentionScope, VoiceDataRetentionScopeReport, VoiceDataRetentionStores } from './dataControl';
|
|
58
58
|
export type { VoiceDemoReadyReport, VoiceDemoReadyRoutesOptions, VoiceDemoReadySection, VoiceDemoReadyStatus } from './demoReadyRoutes';
|
|
@@ -60,7 +60,7 @@ export type { VoiceDeliverySinkDescriptor, VoiceDeliverySinkDescriptorInput, Voi
|
|
|
60
60
|
export type { VoiceOpsActionAuditRecord, VoiceOpsActionAuditRoutesOptions, VoiceOpsActionHistoryEntry, VoiceOpsActionHistoryReport } from './opsActionAuditRoutes';
|
|
61
61
|
export type { VoiceDeliveryRuntime, VoiceDeliveryRuntimeAuditConfig, VoiceDeliveryRuntimeConfig, VoiceDeliveryRuntimeFilePresetOptions, VoiceDeliveryRuntimePresetLeaseConfig, VoiceDeliveryRuntimePresetMode, VoiceDeliveryRuntimePresetOptions, VoiceDeliveryRuntimeReport, VoiceDeliveryRuntimeRoutesOptions, VoiceDeliveryRuntimeS3PresetOptions, VoiceDeliveryRuntimeSummary, VoiceDeliveryRuntimeTickResult, VoiceDeliveryRuntimeTraceConfig, VoiceDeliveryRuntimeWebhookPresetOptions } from './deliveryRuntime';
|
|
62
62
|
export type { VoiceOperationalStatus, VoiceOperationalStatusCheck, VoiceOperationalStatusOptions, VoiceOperationalStatusReport, VoiceOperationalStatusRoutesOptions, VoiceOperationalStatusValue } from './operationalStatus';
|
|
63
|
-
export type { VoiceIncidentRecoveryAction, VoiceIncidentRecoveryActionHandler, VoiceIncidentRecoveryActionHandlerInput, VoiceIncidentRecoveryActionResult, VoiceIncidentRecoveryOutcome, VoiceIncidentRecoveryOutcomeEntry, VoiceIncidentRecoveryOutcomeOptions, VoiceIncidentRecoveryOutcomeReadinessOptions, VoiceIncidentRecoveryOutcomeReport, VoiceIncidentTimelineAction, VoiceIncidentTimelineEvent, VoiceIncidentTimelineLinks, VoiceIncidentTimelineOptions, VoiceIncidentTimelineReport, VoiceIncidentTimelineRoutesOptions, VoiceIncidentTimelineSeverity, VoiceIncidentTimelineStatus, VoiceIncidentTimelineValue } from './incidentTimeline';
|
|
63
|
+
export type { VoiceIncidentRecoveryAction, VoiceIncidentRecoveryActionHandler, VoiceIncidentRecoveryActionHandlerInput, VoiceIncidentRecoveryActionResult, VoiceIncidentRecoveryOutcome, VoiceIncidentRecoveryOutcomeEntry, VoiceIncidentRecoveryOutcomeOptions, VoiceIncidentRecoveryOutcomeReadinessOptions, VoiceIncidentRecoveryOutcomeReport, VoiceIncidentRecoveryTrendCycle, VoiceIncidentRecoveryTrendReport, VoiceIncidentRecoveryTrendStatus, VoiceIncidentTimelineAction, VoiceIncidentTimelineEvent, VoiceIncidentTimelineLinks, VoiceIncidentTimelineOptions, VoiceIncidentTimelineReport, VoiceIncidentTimelineRoutesOptions, VoiceIncidentTimelineSeverity, VoiceIncidentTimelineStatus, VoiceIncidentTimelineValue } from './incidentTimeline';
|
|
64
64
|
export { compareVoiceEvalBaseline, createVoiceFileEvalBaselineStore, createVoiceFileScenarioFixtureStore, createVoiceEvalRoutes, renderVoiceEvalBaselineHTML, renderVoiceEvalHTML, renderVoiceScenarioEvalHTML, renderVoiceScenarioFixtureEvalHTML, runVoiceScenarioEvals, runVoiceScenarioFixtureEvals, runVoiceSessionEvals } from './evalRoutes';
|
|
65
65
|
export { assertVoiceSimulationSuiteEvidence, createVoiceSimulationSuiteRoutes, evaluateVoiceSimulationSuiteEvidence, renderVoiceSimulationSuiteHTML, runVoiceSimulationSuite } from './simulationSuite';
|
|
66
66
|
export { createVoiceWorkflowContract, createVoiceWorkflowContractHandler, createVoiceWorkflowContractPreset, createVoiceWorkflowScenario, recordVoiceWorkflowContractTrace, validateVoiceWorkflowRouteResult } from './workflowContract';
|
package/dist/index.js
CHANGED
|
@@ -26590,6 +26590,96 @@ var buildVoiceIncidentRecoveryOutcomeReadinessCheck = (report, options = {}) =>
|
|
|
26590
26590
|
value: `${report.improved}/${report.total} improved`
|
|
26591
26591
|
};
|
|
26592
26592
|
};
|
|
26593
|
+
var rate3 = (count, total) => total > 0 ? count / total : 0;
|
|
26594
|
+
var toIncidentRecoveryTrendCycle = (report) => ({
|
|
26595
|
+
checkedAt: report.checkedAt,
|
|
26596
|
+
failed: report.failed,
|
|
26597
|
+
failureRate: rate3(report.failed, report.total),
|
|
26598
|
+
improved: report.improved,
|
|
26599
|
+
improvementRate: rate3(report.improved, report.total),
|
|
26600
|
+
regressed: report.regressed,
|
|
26601
|
+
regressionRate: rate3(report.regressed, report.total),
|
|
26602
|
+
total: report.total,
|
|
26603
|
+
unchanged: report.unchanged,
|
|
26604
|
+
unchangedRate: rate3(report.unchanged, report.total)
|
|
26605
|
+
});
|
|
26606
|
+
var buildVoiceIncidentRecoveryTrendReport = (reports = []) => {
|
|
26607
|
+
const cycles = reports.map(toIncidentRecoveryTrendCycle).sort((left, right) => left.checkedAt - right.checkedAt);
|
|
26608
|
+
const totals = cycles.reduce((summary, cycle) => ({
|
|
26609
|
+
failed: summary.failed + cycle.failed,
|
|
26610
|
+
improved: summary.improved + cycle.improved,
|
|
26611
|
+
regressed: summary.regressed + cycle.regressed,
|
|
26612
|
+
total: summary.total + cycle.total,
|
|
26613
|
+
unchanged: summary.unchanged + cycle.unchanged
|
|
26614
|
+
}), { failed: 0, improved: 0, regressed: 0, total: 0, unchanged: 0 });
|
|
26615
|
+
const latest = cycles.at(-1);
|
|
26616
|
+
const previous = cycles.at(-2);
|
|
26617
|
+
const status = cycles.length === 0 ? "empty" : latest && (latest.failed > 0 || latest.regressed > 0) ? "fail" : latest && previous && (latest.improvementRate < previous.improvementRate || latest.unchangedRate > previous.unchangedRate) ? "warn" : "pass";
|
|
26618
|
+
return {
|
|
26619
|
+
checkedAt: Date.now(),
|
|
26620
|
+
cycles,
|
|
26621
|
+
latest,
|
|
26622
|
+
previous,
|
|
26623
|
+
status,
|
|
26624
|
+
summary: {
|
|
26625
|
+
cycles: cycles.length,
|
|
26626
|
+
failed: totals.failed,
|
|
26627
|
+
failureRate: rate3(totals.failed, totals.total),
|
|
26628
|
+
improved: totals.improved,
|
|
26629
|
+
improvementRate: rate3(totals.improved, totals.total),
|
|
26630
|
+
regressed: totals.regressed,
|
|
26631
|
+
regressionRate: rate3(totals.regressed, totals.total),
|
|
26632
|
+
total: totals.total,
|
|
26633
|
+
unchanged: totals.unchanged,
|
|
26634
|
+
unchangedRate: rate3(totals.unchanged, totals.total)
|
|
26635
|
+
},
|
|
26636
|
+
trend: {
|
|
26637
|
+
failureRateDelta: latest && previous ? latest.failureRate - previous.failureRate : undefined,
|
|
26638
|
+
improvementRateDelta: latest && previous ? latest.improvementRate - previous.improvementRate : undefined,
|
|
26639
|
+
regressionRateDelta: latest && previous ? latest.regressionRate - previous.regressionRate : undefined,
|
|
26640
|
+
unchangedRateDelta: latest && previous ? latest.unchangedRate - previous.unchangedRate : undefined
|
|
26641
|
+
}
|
|
26642
|
+
};
|
|
26643
|
+
};
|
|
26644
|
+
var percent = (value) => value === undefined ? "n/a" : `${Math.round(value * 100)}%`;
|
|
26645
|
+
var renderVoiceIncidentRecoveryTrendMarkdown = (report, options = {}) => {
|
|
26646
|
+
const title = options.title ?? "Voice Incident Recovery Trend";
|
|
26647
|
+
const rows = report.cycles.map((cycle) => `| ${new Date(cycle.checkedAt).toISOString()} | ${cycle.total} | ${cycle.improved} | ${cycle.unchanged} | ${cycle.regressed} | ${cycle.failed} | ${percent(cycle.improvementRate)} | ${percent(cycle.regressionRate)} |`).join(`
|
|
26648
|
+
`);
|
|
26649
|
+
return `# ${title}
|
|
26650
|
+
|
|
26651
|
+
Generated: ${new Date(report.checkedAt).toISOString()}
|
|
26652
|
+
|
|
26653
|
+
Status: **${report.status}**
|
|
26654
|
+
|
|
26655
|
+
Cycles: ${report.summary.cycles}
|
|
26656
|
+
|
|
26657
|
+
Total actions: ${report.summary.total}
|
|
26658
|
+
|
|
26659
|
+
Improvement rate: ${percent(report.summary.improvementRate)}
|
|
26660
|
+
|
|
26661
|
+
Regression rate: ${percent(report.summary.regressionRate)}
|
|
26662
|
+
|
|
26663
|
+
Failure rate: ${percent(report.summary.failureRate)}
|
|
26664
|
+
|
|
26665
|
+
Unchanged rate: ${percent(report.summary.unchangedRate)}
|
|
26666
|
+
|
|
26667
|
+
Improvement delta: ${percent(report.trend.improvementRateDelta)}
|
|
26668
|
+
|
|
26669
|
+
Regression delta: ${percent(report.trend.regressionRateDelta)}
|
|
26670
|
+
|
|
26671
|
+
## Cycles
|
|
26672
|
+
|
|
26673
|
+
| Checked at | Total | Improved | Unchanged | Regressed | Failed | Improve % | Regress % |
|
|
26674
|
+
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
|
26675
|
+
${rows || "| n/a | 0 | 0 | 0 | 0 | 0 | n/a | n/a |"}
|
|
26676
|
+
`;
|
|
26677
|
+
};
|
|
26678
|
+
var renderVoiceIncidentRecoveryTrendHTML = (report, options = {}) => {
|
|
26679
|
+
const title = options.title ?? "AbsoluteJS Voice Incident Recovery Trend";
|
|
26680
|
+
const rows = report.cycles.map((cycle) => `<tr><td>${escapeHtml41(new Date(cycle.checkedAt).toLocaleString())}</td><td>${String(cycle.total)}</td><td>${String(cycle.improved)}</td><td>${String(cycle.unchanged)}</td><td>${String(cycle.regressed)}</td><td>${String(cycle.failed)}</td><td>${escapeHtml41(percent(cycle.improvementRate))}</td><td>${escapeHtml41(percent(cycle.regressionRate))}</td></tr>`).join("");
|
|
26681
|
+
return `<!doctype html><html lang="en"><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" /><title>${escapeHtml41(title)}</title><style>body{background:#10120d;color:#fbf4df;font-family:ui-sans-serif,system-ui,sans-serif;margin:0}main{margin:auto;max-width:1080px;padding:32px}.hero,table{background:#181711;border:1px solid #39301d;border-radius:24px}.hero{margin-bottom:16px;padding:24px}h1{font-size:clamp(2rem,6vw,4.5rem);line-height:.95}.summary{display:flex;flex-wrap:wrap;gap:10px}.summary span{border:1px solid #4a3f23;border-radius:999px;padding:8px 12px}table{border-collapse:collapse;overflow:hidden;width:100%}td,th{border-bottom:1px solid #39301d;padding:12px;text-align:left}.pass{color:#86efac}.warn,.empty{color:#fcd34d}.fail{color:#fca5a5}p{color:#cfc5a8}</style></head><body><main><section class="hero"><span>Recovery trend</span><h1>${escapeHtml41(title)}</h1><p class="${escapeHtml41(report.status)}">Status: ${escapeHtml41(report.status)}</p><div class="summary"><span>${String(report.summary.cycles)} cycles</span><span>${String(report.summary.total)} actions</span><span>${escapeHtml41(percent(report.summary.improvementRate))} improved</span><span>${escapeHtml41(percent(report.summary.regressionRate))} regressed</span><span>${escapeHtml41(percent(report.trend.improvementRateDelta))} improvement delta</span></div></section><table><thead><tr><th>Checked at</th><th>Total</th><th>Improved</th><th>Unchanged</th><th>Regressed</th><th>Failed</th><th>Improve %</th><th>Regress %</th></tr></thead><tbody>${rows || '<tr><td colspan="8">No recovery outcome history has been recorded.</td></tr>'}</tbody></table></main></body></html>`;
|
|
26682
|
+
};
|
|
26593
26683
|
var pushOperationalStatusEvents = (events, report, links) => {
|
|
26594
26684
|
if (!report) {
|
|
26595
26685
|
return;
|
|
@@ -26838,6 +26928,17 @@ var createVoiceIncidentTimelineRoutes = (options) => {
|
|
|
26838
26928
|
const actionPath = options.actionPath === undefined ? "/api/voice/incident-timeline/actions" : options.actionPath;
|
|
26839
26929
|
const recoveryOutcomePath = options.recoveryOutcomePath === undefined ? "/api/voice/incident-timeline/recovery-outcomes" : options.recoveryOutcomePath;
|
|
26840
26930
|
const recoveryOutcomeHtmlPath = options.recoveryOutcomeHtmlPath === undefined ? "/voice/incident-recovery-outcomes" : options.recoveryOutcomeHtmlPath;
|
|
26931
|
+
const recoveryTrendPath = options.recoveryTrendPath === undefined ? "/api/voice/incident-timeline/recovery-trends" : options.recoveryTrendPath;
|
|
26932
|
+
const recoveryTrendHtmlPath = options.recoveryTrendHtmlPath === undefined ? "/voice/incident-recovery-trends" : options.recoveryTrendHtmlPath;
|
|
26933
|
+
const recoveryTrendMarkdownPath = options.recoveryTrendMarkdownPath === undefined ? "/voice/incident-recovery-trends.md" : options.recoveryTrendMarkdownPath;
|
|
26934
|
+
const buildRecoveryTrendReport = async () => {
|
|
26935
|
+
const reports = typeof options.recoveryTrendReports === "function" ? await options.recoveryTrendReports() : options.recoveryTrendReports;
|
|
26936
|
+
return buildVoiceIncidentRecoveryTrendReport(reports ?? [
|
|
26937
|
+
await buildVoiceIncidentRecoveryOutcomeReport({
|
|
26938
|
+
audit: options.audit
|
|
26939
|
+
})
|
|
26940
|
+
]);
|
|
26941
|
+
};
|
|
26841
26942
|
const routes = new Elysia43({
|
|
26842
26943
|
name: options.name ?? "absolutejs-voice-incident-timeline"
|
|
26843
26944
|
}).get(path, async () => {
|
|
@@ -26989,6 +27090,43 @@ var createVoiceIncidentTimelineRoutes = (options) => {
|
|
|
26989
27090
|
});
|
|
26990
27091
|
});
|
|
26991
27092
|
}
|
|
27093
|
+
if (recoveryTrendPath !== false) {
|
|
27094
|
+
routes.get(recoveryTrendPath, async () => {
|
|
27095
|
+
const report = await buildRecoveryTrendReport();
|
|
27096
|
+
return new Response(JSON.stringify(report), {
|
|
27097
|
+
headers: {
|
|
27098
|
+
"Content-Type": "application/json; charset=utf-8",
|
|
27099
|
+
...options.headers
|
|
27100
|
+
}
|
|
27101
|
+
});
|
|
27102
|
+
});
|
|
27103
|
+
}
|
|
27104
|
+
if (recoveryTrendHtmlPath !== false) {
|
|
27105
|
+
routes.get(recoveryTrendHtmlPath, async () => {
|
|
27106
|
+
const report = await buildRecoveryTrendReport();
|
|
27107
|
+
return new Response(renderVoiceIncidentRecoveryTrendHTML(report, {
|
|
27108
|
+
title: `${options.title ?? "AbsoluteJS Voice Incident Timeline"} Recovery Trend`
|
|
27109
|
+
}), {
|
|
27110
|
+
headers: {
|
|
27111
|
+
"Content-Type": "text/html; charset=utf-8",
|
|
27112
|
+
...options.headers
|
|
27113
|
+
}
|
|
27114
|
+
});
|
|
27115
|
+
});
|
|
27116
|
+
}
|
|
27117
|
+
if (recoveryTrendMarkdownPath !== false) {
|
|
27118
|
+
routes.get(recoveryTrendMarkdownPath, async () => {
|
|
27119
|
+
const report = await buildRecoveryTrendReport();
|
|
27120
|
+
return new Response(renderVoiceIncidentRecoveryTrendMarkdown(report, {
|
|
27121
|
+
title: `${options.title ?? "AbsoluteJS Voice Incident Timeline"} Recovery Trend`
|
|
27122
|
+
}), {
|
|
27123
|
+
headers: {
|
|
27124
|
+
"Content-Type": "text/markdown; charset=utf-8",
|
|
27125
|
+
...options.headers
|
|
27126
|
+
}
|
|
27127
|
+
});
|
|
27128
|
+
});
|
|
27129
|
+
}
|
|
26992
27130
|
return routes;
|
|
26993
27131
|
};
|
|
26994
27132
|
|
|
@@ -31373,7 +31511,7 @@ import { Elysia as Elysia48 } from "elysia";
|
|
|
31373
31511
|
import { mkdir as mkdir3 } from "fs/promises";
|
|
31374
31512
|
import { dirname as dirname2 } from "path";
|
|
31375
31513
|
var escapeHtml45 = (value) => value.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
31376
|
-
var
|
|
31514
|
+
var rate4 = (count, total) => count / Math.max(1, total);
|
|
31377
31515
|
var normalizeSearchText = (value) => value.trim().toLowerCase();
|
|
31378
31516
|
var getString18 = (value) => typeof value === "string" ? value : undefined;
|
|
31379
31517
|
var resolveSessionHref3 = (value, sessionId) => {
|
|
@@ -31621,7 +31759,7 @@ var summarizeEvalBaseline = (report) => {
|
|
|
31621
31759
|
return {
|
|
31622
31760
|
failed: report.failed,
|
|
31623
31761
|
failedSessionIds,
|
|
31624
|
-
passRate:
|
|
31762
|
+
passRate: rate4(report.passed, report.total),
|
|
31625
31763
|
passed: report.passed,
|
|
31626
31764
|
total: report.total
|
|
31627
31765
|
};
|
|
@@ -41617,6 +41755,8 @@ export {
|
|
|
41617
41755
|
renderVoiceLatencySLOMarkdown,
|
|
41618
41756
|
renderVoiceIncidentTimelineMarkdown,
|
|
41619
41757
|
renderVoiceIncidentTimelineHTML,
|
|
41758
|
+
renderVoiceIncidentRecoveryTrendMarkdown,
|
|
41759
|
+
renderVoiceIncidentRecoveryTrendHTML,
|
|
41620
41760
|
renderVoiceIncidentRecoveryOutcomeHTML,
|
|
41621
41761
|
renderVoiceHandoffHealthHTML,
|
|
41622
41762
|
renderVoiceGuardrailMarkdown,
|
|
@@ -42119,6 +42259,7 @@ export {
|
|
|
42119
42259
|
buildVoiceLiveOpsControlState,
|
|
42120
42260
|
buildVoiceLatencySLOGate,
|
|
42121
42261
|
buildVoiceIncidentTimelineReport,
|
|
42262
|
+
buildVoiceIncidentRecoveryTrendReport,
|
|
42122
42263
|
buildVoiceIncidentRecoveryOutcomeReport,
|
|
42123
42264
|
buildVoiceIncidentRecoveryOutcomeReadinessCheck,
|
|
42124
42265
|
buildVoiceIncidentBundle,
|