@absolutejs/voice 0.0.22-beta.281 → 0.0.22-beta.282
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/index.d.ts +2 -2
- package/dist/index.js +26 -0
- package/dist/sloCalibration.d.ts +20 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -18,8 +18,8 @@ export { assertVoicePlatformCoverage, buildVoicePlatformCoverageSummary, createV
|
|
|
18
18
|
export type { VoicePlatformCoverageAssertionInput, VoicePlatformCoverageAssertionReport, VoicePlatformCoverageEvidence, VoicePlatformCoverageRoutesOptions, VoicePlatformCoverageStatus, VoicePlatformCoverageSummary, VoicePlatformCoverageSummaryInput, VoicePlatformCoverageSurface } from './platformCoverage';
|
|
19
19
|
export { assertVoiceProofTrendEvidence, buildEmptyVoiceProofTrendReport, buildVoiceProofTrendReport, createVoiceProofTrendRoutes, DEFAULT_VOICE_PROOF_TRENDS_MAX_AGE_MS, evaluateVoiceProofTrendEvidence, formatVoiceProofTrendAge, normalizeVoiceProofTrendReport, readVoiceProofTrendReportFile } from './proofTrends';
|
|
20
20
|
export type { VoiceProofTrendAssertionInput, VoiceProofTrendAssertionReport, VoiceProofTrendCycle, VoiceProofTrendReport, VoiceProofTrendReportInput, VoiceProofTrendRoutesOptions, VoiceProofTrendStatus, VoiceProofTrendSummary } from './proofTrends';
|
|
21
|
-
export { assertVoiceSloCalibration, buildVoiceSloCalibrationReport, createVoiceSloCalibrationRoutes, renderVoiceSloCalibrationMarkdown } from './sloCalibration';
|
|
22
|
-
export type { VoiceSloCalibrationMetricKey, VoiceSloCalibrationOptions, VoiceSloCalibrationReport, VoiceSloCalibrationRoutesOptions, VoiceSloCalibrationSample, VoiceSloCalibrationStatus, VoiceSloCalibrationThreshold, VoiceSloCalibrationThresholds } from './sloCalibration';
|
|
21
|
+
export { assertVoiceSloCalibration, buildVoiceSloCalibrationReport, createVoiceSloThresholdProfile, createVoiceSloCalibrationRoutes, renderVoiceSloCalibrationMarkdown } from './sloCalibration';
|
|
22
|
+
export type { VoiceSloCalibrationMetricKey, VoiceSloCalibrationOptions, VoiceSloCalibrationReport, VoiceSloCalibrationRoutesOptions, VoiceSloCalibrationSample, VoiceSloCalibrationStatus, VoiceSloCalibrationThreshold, VoiceSloCalibrationThresholds, VoiceSloThresholdProfile } from './sloCalibration';
|
|
23
23
|
export { assertVoiceLiveOpsControlEvidence, assertVoiceLiveOpsEvidence, buildVoiceLiveOpsControlState, createVoiceLiveOpsController, createVoiceLiveOpsRoutes, createVoiceMemoryLiveOpsControlStore, evaluateVoiceLiveOpsControlEvidence, evaluateVoiceLiveOpsEvidence, getVoiceLiveOpsControlStatus, VOICE_LIVE_OPS_ACTIONS } from './liveOps';
|
|
24
24
|
export type { VoiceLiveOpsAction, VoiceLiveOpsActionInput, VoiceLiveOpsActionResult, VoiceLiveOpsControllerOptions, VoiceLiveOpsControlState, VoiceLiveOpsControlStatus, VoiceLiveOpsControlStore, VoiceLiveOpsControlEvidenceInput, VoiceLiveOpsControlEvidenceReport, VoiceLiveOpsEvidenceInput, VoiceLiveOpsEvidenceReport, VoiceLiveOpsRoutesOptions } from './liveOps';
|
|
25
25
|
export { buildVoiceDeliveryRuntimeReport, createVoiceDeliveryRuntime, createVoiceDeliveryRuntimePresetConfig, createVoiceDeliveryRuntimeRoutes, renderVoiceDeliveryRuntimeHTML } from './deliveryRuntime';
|
package/dist/index.js
CHANGED
|
@@ -12751,6 +12751,31 @@ var assertVoiceSloCalibration = (input, options = {}) => {
|
|
|
12751
12751
|
}
|
|
12752
12752
|
return report;
|
|
12753
12753
|
};
|
|
12754
|
+
var thresholdValue = (threshold) => threshold.recommendedMs ?? threshold.failAfterMs;
|
|
12755
|
+
var createVoiceSloThresholdProfile = (input, options = {}) => {
|
|
12756
|
+
const report = Array.isArray(input) ? buildVoiceSloCalibrationReport(input, options) : input;
|
|
12757
|
+
const liveLatencyFailAfterMs = thresholdValue(report.thresholds.liveLatency);
|
|
12758
|
+
const interruptionFailAfterMs = thresholdValue(report.thresholds.interruption);
|
|
12759
|
+
return {
|
|
12760
|
+
bargeIn: {
|
|
12761
|
+
thresholdMs: interruptionFailAfterMs
|
|
12762
|
+
},
|
|
12763
|
+
issues: report.issues,
|
|
12764
|
+
liveLatency: {
|
|
12765
|
+
failAfterMs: liveLatencyFailAfterMs,
|
|
12766
|
+
warnAfterMs: report.thresholds.liveLatency.warnAfterMs
|
|
12767
|
+
},
|
|
12768
|
+
monitoring: {
|
|
12769
|
+
monitorRunFailAfterMs: thresholdValue(report.thresholds.monitorRun),
|
|
12770
|
+
notifierDeliveryFailAfterMs: thresholdValue(report.thresholds.notifierDelivery)
|
|
12771
|
+
},
|
|
12772
|
+
providerSlo: report.recommendedProviderSloThresholds,
|
|
12773
|
+
reconnect: {
|
|
12774
|
+
failAfterMs: thresholdValue(report.thresholds.reconnect)
|
|
12775
|
+
},
|
|
12776
|
+
status: report.status
|
|
12777
|
+
};
|
|
12778
|
+
};
|
|
12754
12779
|
var escapeMarkdown = (value) => value.replaceAll("|", "\\|");
|
|
12755
12780
|
var renderVoiceSloCalibrationMarkdown = (report, options = {}) => {
|
|
12756
12781
|
const rows = Object.values(report.thresholds).map((threshold) => `| ${escapeMarkdown(threshold.metric)} | ${threshold.status} | ${threshold.samples} | ${threshold.baselineP95Ms ?? "n/a"} | ${threshold.warnAfterMs ?? "n/a"} | ${threshold.failAfterMs ?? "n/a"} |`).join(`
|
|
@@ -32905,6 +32930,7 @@ export {
|
|
|
32905
32930
|
createVoiceTaskSLABreachedEvent,
|
|
32906
32931
|
createVoiceTaskCreatedEvent,
|
|
32907
32932
|
createVoiceTTSProviderRouter,
|
|
32933
|
+
createVoiceSloThresholdProfile,
|
|
32908
32934
|
createVoiceSloCalibrationRoutes,
|
|
32909
32935
|
createVoiceSimulationSuiteRoutes,
|
|
32910
32936
|
createVoiceSessionsJSONHandler,
|
package/dist/sloCalibration.d.ts
CHANGED
|
@@ -49,6 +49,25 @@ export type VoiceSloCalibrationReport = {
|
|
|
49
49
|
status: VoiceSloCalibrationStatus;
|
|
50
50
|
thresholds: VoiceSloCalibrationThresholds;
|
|
51
51
|
};
|
|
52
|
+
export type VoiceSloThresholdProfile = {
|
|
53
|
+
bargeIn: {
|
|
54
|
+
thresholdMs?: number;
|
|
55
|
+
};
|
|
56
|
+
issues: string[];
|
|
57
|
+
liveLatency: {
|
|
58
|
+
failAfterMs?: number;
|
|
59
|
+
warnAfterMs?: number;
|
|
60
|
+
};
|
|
61
|
+
monitoring: {
|
|
62
|
+
monitorRunFailAfterMs?: number;
|
|
63
|
+
notifierDeliveryFailAfterMs?: number;
|
|
64
|
+
};
|
|
65
|
+
providerSlo: VoiceProviderSloThresholdConfig;
|
|
66
|
+
reconnect: {
|
|
67
|
+
failAfterMs?: number;
|
|
68
|
+
};
|
|
69
|
+
status: VoiceSloCalibrationStatus;
|
|
70
|
+
};
|
|
52
71
|
export type VoiceSloCalibrationOptions = {
|
|
53
72
|
headroomMultiplier?: number;
|
|
54
73
|
liveLatencyMinimumMs?: number;
|
|
@@ -71,6 +90,7 @@ export type VoiceSloCalibrationRoutesOptions = VoiceSloCalibrationOptions & {
|
|
|
71
90
|
};
|
|
72
91
|
export declare const buildVoiceSloCalibrationReport: (input: Array<VoiceProofTrendReport | VoiceSloCalibrationSample>, options?: VoiceSloCalibrationOptions) => VoiceSloCalibrationReport;
|
|
73
92
|
export declare const assertVoiceSloCalibration: (input: Array<VoiceProofTrendReport | VoiceSloCalibrationSample>, options?: VoiceSloCalibrationOptions) => VoiceSloCalibrationReport;
|
|
93
|
+
export declare const createVoiceSloThresholdProfile: (input: VoiceSloCalibrationReport | Array<VoiceProofTrendReport | VoiceSloCalibrationSample>, options?: VoiceSloCalibrationOptions) => VoiceSloThresholdProfile;
|
|
74
94
|
export declare const renderVoiceSloCalibrationMarkdown: (report: VoiceSloCalibrationReport, options?: {
|
|
75
95
|
title?: string;
|
|
76
96
|
}) => string;
|