@absolutejs/voice 0.0.22-beta.457 → 0.0.22-beta.458
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/client/index.js +82 -6
- package/dist/index.d.ts +2 -2
- package/dist/index.js +83 -6
- package/dist/proofTrends.d.ts +12 -0
- package/dist/react/index.js +82 -6
- package/dist/vue/index.js +82 -6
- package/package.json +1 -1
package/dist/client/index.js
CHANGED
|
@@ -6908,12 +6908,17 @@ var createVoiceRealCallEvidenceRuntimeWorkerLoop = (options) => {
|
|
|
6908
6908
|
const tick = () => worker.collect();
|
|
6909
6909
|
return {
|
|
6910
6910
|
collect: tick,
|
|
6911
|
-
health: () =>
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6911
|
+
health: () => {
|
|
6912
|
+
const health = worker.health();
|
|
6913
|
+
const running = isRunning();
|
|
6914
|
+
return {
|
|
6915
|
+
...health,
|
|
6916
|
+
isRunning: running,
|
|
6917
|
+
lastStartedAt,
|
|
6918
|
+
lastStoppedAt,
|
|
6919
|
+
status: running && health.status === "idle" ? "running" : health.status
|
|
6920
|
+
};
|
|
6921
|
+
},
|
|
6917
6922
|
isRunning,
|
|
6918
6923
|
start: () => {
|
|
6919
6924
|
if (timer) {
|
|
@@ -6936,6 +6941,77 @@ var createVoiceRealCallEvidenceRuntimeWorkerLoop = (options) => {
|
|
|
6936
6941
|
tick
|
|
6937
6942
|
};
|
|
6938
6943
|
};
|
|
6944
|
+
var buildVoiceRealCallEvidenceRuntimeWorkerReadinessCheck = (health, options = {}) => {
|
|
6945
|
+
const requireRunning = options.requireRunning ?? true;
|
|
6946
|
+
const issues = [];
|
|
6947
|
+
const warnings = [];
|
|
6948
|
+
const now = options.now ?? (() => new Date);
|
|
6949
|
+
const sourceHref = options.sourceHref ?? "/api/voice/real-call-evidence-runtime/worker";
|
|
6950
|
+
const href = options.href ?? "/voice/real-call-evidence-runtime";
|
|
6951
|
+
if (health.error) {
|
|
6952
|
+
issues.push(`Real-call evidence auto-collector error: ${health.error}.`);
|
|
6953
|
+
}
|
|
6954
|
+
if (health.status === "fail") {
|
|
6955
|
+
issues.push("Real-call evidence auto-collector is failing.");
|
|
6956
|
+
}
|
|
6957
|
+
if (requireRunning && !health.isRunning) {
|
|
6958
|
+
const message = "Real-call evidence auto-collector is not running; evidence is only collected manually.";
|
|
6959
|
+
if (options.failOnNotRunning) {
|
|
6960
|
+
issues.push(message);
|
|
6961
|
+
} else {
|
|
6962
|
+
warnings.push(message);
|
|
6963
|
+
}
|
|
6964
|
+
}
|
|
6965
|
+
if (health.collectCount === 0) {
|
|
6966
|
+
warnings.push("Real-call evidence auto-collector has not collected yet.");
|
|
6967
|
+
}
|
|
6968
|
+
if (options.maxLastCollectedAgeMs && health.lastCollectedAt) {
|
|
6969
|
+
const ageMs = now().getTime() - new Date(health.lastCollectedAt).getTime();
|
|
6970
|
+
if (Number.isFinite(ageMs) && ageMs > options.maxLastCollectedAgeMs) {
|
|
6971
|
+
const message = `Last real-call evidence auto-collection is ${String(ageMs)}ms old.`;
|
|
6972
|
+
if (options.failOnStale) {
|
|
6973
|
+
issues.push(message);
|
|
6974
|
+
} else {
|
|
6975
|
+
warnings.push(message);
|
|
6976
|
+
}
|
|
6977
|
+
}
|
|
6978
|
+
}
|
|
6979
|
+
const status = issues.length > 0 ? "fail" : warnings.length > 0 ? "warn" : "pass";
|
|
6980
|
+
return {
|
|
6981
|
+
actions: [
|
|
6982
|
+
{
|
|
6983
|
+
description: "Run one collection cycle immediately and update worker health.",
|
|
6984
|
+
href: options.collectHref ?? "/api/voice/real-call-evidence-runtime/collect",
|
|
6985
|
+
label: "Collect real-call evidence",
|
|
6986
|
+
method: "POST"
|
|
6987
|
+
},
|
|
6988
|
+
{
|
|
6989
|
+
description: "Open rolling real-call evidence and inspect worker health.",
|
|
6990
|
+
href,
|
|
6991
|
+
label: "Open real-call evidence runtime"
|
|
6992
|
+
}
|
|
6993
|
+
],
|
|
6994
|
+
detail: status === "pass" ? `Auto-collector is running with ${String(health.collectCount)} collection(s).` : [...issues, ...warnings].join(" "),
|
|
6995
|
+
gateExplanation: {
|
|
6996
|
+
evidenceHref: sourceHref,
|
|
6997
|
+
observed: health.isRunning ? "running" : "manual",
|
|
6998
|
+
remediation: "Enable the real-call evidence worker loop in production, keep it healthy, and run real traffic so rolling evidence stays fresh.",
|
|
6999
|
+
sourceHref: href,
|
|
7000
|
+
threshold: requireRunning ? "running" : "available",
|
|
7001
|
+
thresholdLabel: "Real-call evidence collection mode",
|
|
7002
|
+
unit: "status"
|
|
7003
|
+
},
|
|
7004
|
+
href,
|
|
7005
|
+
label: options.label ?? "Real-call evidence auto-collector",
|
|
7006
|
+
proofSource: {
|
|
7007
|
+
href: sourceHref,
|
|
7008
|
+
source: health.source,
|
|
7009
|
+
sourceLabel: "Real-call evidence worker health"
|
|
7010
|
+
},
|
|
7011
|
+
status,
|
|
7012
|
+
value: `${health.isRunning ? "running" : "manual"} / ${String(health.collectCount)} collections / ${health.status}`
|
|
7013
|
+
};
|
|
7014
|
+
};
|
|
6939
7015
|
var realCallProfileTraceSignalTypes = new Set([
|
|
6940
7016
|
"client.barge_in",
|
|
6941
7017
|
"client.browser_media",
|
package/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export { assertVoicePlatformCoverage, buildVoicePlatformCoverageSummary, createV
|
|
|
31
31
|
export { assertVoiceCompetitiveCoverage, buildVoiceCompetitiveCoverageReport, createVoiceCompetitiveCoverageRoutes, evaluateVoiceCompetitiveCoverage, renderVoiceCompetitiveCoverageHTML, renderVoiceCompetitiveCoverageMarkdown, } from "./competitiveCoverage";
|
|
32
32
|
export type { VoiceCompetitiveCoverageAssertionInput, VoiceCompetitiveCoverageAssertionReport, VoiceCompetitiveCoverageIssue, VoiceCompetitiveCoverageLevel, VoiceCompetitiveCoverageReport, VoiceCompetitiveCoverageReportInput, VoiceCompetitiveCoverageRoutesOptions, VoiceCompetitiveCoverageStatus, VoiceCompetitiveCoverageSummary, VoiceCompetitiveDepthLevel, VoiceCompetitiveEvidence, VoiceCompetitiveSurface, } from "./competitiveCoverage";
|
|
33
33
|
export type { VoicePlatformCoverageAssertionInput, VoicePlatformCoverageAssertionReport, VoicePlatformCoverageEvidence, VoicePlatformCoverageRoutesOptions, VoicePlatformCoverageStatus, VoicePlatformCoverageSummary, VoicePlatformCoverageSummaryInput, VoicePlatformCoverageSurface, } from "./platformCoverage";
|
|
34
|
-
export { assertVoiceProofTrendEvidence, appendVoiceRealCallProfileRecoveryEvidence, buildEmptyVoiceProofTrendReport, buildVoiceProofTrendProfileSummaries, buildVoiceProofTrendRecommendationReport, buildVoiceProofTrendReportFromRealCallProfiles, buildVoiceProofTrendReport, buildVoiceRealCallProfileEvidenceFromTraceEvents, buildVoiceRealCallProfileEvidenceFromReconnectProofReports, buildVoiceRealCallProfileDefaults, buildVoiceRealCallProfileHistoryReport, buildVoiceRealCallProfileHistoryReportFromStore, buildVoiceRealCallEvidenceRuntimeReadinessCheck, buildVoiceRealCallProfileReadinessCheck, buildVoiceRealCallProfileRecoveryJobHistoryCheck, buildVoiceRealCallProfileRecoveryActions, buildVoiceReconnectProfileEvidenceSummary, createVoiceRealCallEvidenceRuntime, createVoiceRealCallEvidenceRuntimeWorker, createVoiceRealCallEvidenceRuntimeWorkerLoop, createVoiceRealCallEvidenceRuntimeRoutes, createVoiceInMemoryRealCallProfileRecoveryJobStore, createVoiceRealCallProfileTraceCollector, createVoiceSQLiteRealCallProfileEvidenceStore, createVoiceSQLiteRealCallProfileRecoveryJobStore, createVoiceProofTrendRecommendationRoutes, createVoiceProofTrendRoutes, createVoiceRealCallProfileHistoryRoutes, createVoiceRealCallProfileRecoveryActionRoutes, DEFAULT_VOICE_PROOF_TREND_PROFILE_DEFINITIONS, DEFAULT_VOICE_PROOF_TRENDS_MAX_AGE_MS, evaluateVoiceProofTrendEvidence, formatVoiceProofTrendAge, loadVoiceRealCallProfileEvidenceFromStore, loadVoiceRealCallProfileEvidenceFromTraceStore, normalizeVoiceProofTrendReport, readVoiceProofTrendReportFile, renderVoiceProofTrendRecommendationHTML, renderVoiceProofTrendRecommendationMarkdown, renderVoiceRealCallEvidenceRuntimeHTML, renderVoiceRealCallEvidenceRuntimeMarkdown, renderVoiceRealCallProfileHistoryHTML, renderVoiceRealCallProfileHistoryMarkdown, runVoiceRealCallProfileRecoveryLoop, resolveVoiceRealCallProfileProviderRoute, } from "./proofTrends";
|
|
34
|
+
export { assertVoiceProofTrendEvidence, appendVoiceRealCallProfileRecoveryEvidence, buildEmptyVoiceProofTrendReport, buildVoiceProofTrendProfileSummaries, buildVoiceProofTrendRecommendationReport, buildVoiceProofTrendReportFromRealCallProfiles, buildVoiceProofTrendReport, buildVoiceRealCallProfileEvidenceFromTraceEvents, buildVoiceRealCallProfileEvidenceFromReconnectProofReports, buildVoiceRealCallProfileDefaults, buildVoiceRealCallProfileHistoryReport, buildVoiceRealCallProfileHistoryReportFromStore, buildVoiceRealCallEvidenceRuntimeReadinessCheck, buildVoiceRealCallEvidenceRuntimeWorkerReadinessCheck, buildVoiceRealCallProfileReadinessCheck, buildVoiceRealCallProfileRecoveryJobHistoryCheck, buildVoiceRealCallProfileRecoveryActions, buildVoiceReconnectProfileEvidenceSummary, createVoiceRealCallEvidenceRuntime, createVoiceRealCallEvidenceRuntimeWorker, createVoiceRealCallEvidenceRuntimeWorkerLoop, createVoiceRealCallEvidenceRuntimeRoutes, createVoiceInMemoryRealCallProfileRecoveryJobStore, createVoiceRealCallProfileTraceCollector, createVoiceSQLiteRealCallProfileEvidenceStore, createVoiceSQLiteRealCallProfileRecoveryJobStore, createVoiceProofTrendRecommendationRoutes, createVoiceProofTrendRoutes, createVoiceRealCallProfileHistoryRoutes, createVoiceRealCallProfileRecoveryActionRoutes, DEFAULT_VOICE_PROOF_TREND_PROFILE_DEFINITIONS, DEFAULT_VOICE_PROOF_TRENDS_MAX_AGE_MS, evaluateVoiceProofTrendEvidence, formatVoiceProofTrendAge, loadVoiceRealCallProfileEvidenceFromStore, loadVoiceRealCallProfileEvidenceFromTraceStore, normalizeVoiceProofTrendReport, readVoiceProofTrendReportFile, renderVoiceProofTrendRecommendationHTML, renderVoiceProofTrendRecommendationMarkdown, renderVoiceRealCallEvidenceRuntimeHTML, renderVoiceRealCallEvidenceRuntimeMarkdown, renderVoiceRealCallProfileHistoryHTML, renderVoiceRealCallProfileHistoryMarkdown, runVoiceRealCallProfileRecoveryLoop, resolveVoiceRealCallProfileProviderRoute, } from "./proofTrends";
|
|
35
35
|
export { createVoiceEvidenceAssertion, createVoiceProofAssertion, summarizeVoiceProofAssertions, } from "./proofAssertions";
|
|
36
36
|
export { buildVoiceSessionSnapshot, buildVoiceSessionSnapshotStatus, createVoiceSessionSnapshotRoutes, parseVoiceSessionSnapshot, } from "./sessionSnapshot";
|
|
37
37
|
export { buildVoiceCallDebuggerReport, createVoiceCallDebuggerRoutes, renderVoiceCallDebuggerHTML, resolveLatestVoiceCallDebuggerSessionId, } from "./callDebugger";
|
|
@@ -46,7 +46,7 @@ export { buildVoiceProviderDecisionTraceReport, createVoiceProviderDecisionTrace
|
|
|
46
46
|
export type { VoiceProviderDecisionStatus, VoiceProviderDecisionSurfaceReport, VoiceProviderDecisionTrace, VoiceProviderDecisionTraceInput, VoiceProviderDecisionTraceIssue, VoiceProviderDecisionTraceReport, VoiceProviderDecisionTraceReportOptions, VoiceProviderDecisionTraceRoutesOptions, } from "./providerDecisionTraces";
|
|
47
47
|
export { appendVoiceIOProviderRouterTraceEvent, appendVoiceProviderRouterTraceEvent, buildVoiceIOProviderRouterTraceEvent, buildVoiceProviderRouterTraceEvent, } from "./providerRouterTraces";
|
|
48
48
|
export type { VoiceIOProviderRouterTraceAppendOptions, VoiceIOProviderRouterTraceEventOptions, VoiceProviderRouterTraceAppendOptions, VoiceProviderRouterTraceEventOptions, } from "./providerRouterTraces";
|
|
49
|
-
export type { VoiceProofTrendAssertionInput, VoiceProofTrendAssertionReport, VoiceProofTrendCycle, VoiceProofTrendProfileDefinition, VoiceProofTrendProfileRecommendation, VoiceProofTrendProfileSummaryOptions, VoiceProofTrendProfileSummary, VoiceProofTrendProviderRecommendation, VoiceProofTrendProviderSummary, VoiceProofTrendReconnectSummary, VoiceProofTrendRecommendation, VoiceProofTrendRecommendationOptions, VoiceProofTrendRecommendationReport, VoiceProofTrendRecommendationRoutesOptions, VoiceProofTrendRecommendationStatus, VoiceProofTrendRecommendationSurface, VoiceProofTrendRealCallProfileEvidence, VoiceProofTrendRealCallProfileReportOptions, VoiceProofTrendReport, VoiceProofTrendReportInput, VoiceProofTrendRoutesOptions, VoiceProofTrendRuntimeChannelSummary, VoiceProofTrendStatus, VoiceProofTrendSummary, VoiceRealCallProfileDefault, VoiceRealCallProfileDefaultsOptions, VoiceRealCallProfileDefaultsReport, VoiceRealCallProfileEvidenceCreateInput, VoiceRealCallProfileEvidenceListOptions, VoiceRealCallProfileEvidenceRecord, VoiceRealCallProfileEvidenceStore, VoiceRealCallProfileHistoryOptions, VoiceRealCallProfileHistoryReport, VoiceRealCallProfileHistoryRoutesOptions, VoiceRealCallProfileProviderRouteOptions, VoiceRealCallProfileReadinessCheckOptions, VoiceRealCallProfileRecoveryActionOptions, VoiceRealCallProfileRecoveryAction, VoiceRealCallProfileRecoveryActionHandler, VoiceRealCallProfileRecoveryActionHandlerInput, VoiceRealCallProfileRecoveryActionId, VoiceRealCallProfileRecoveryJobHistoryCheckOptions, VoiceRealCallProfileRecoveryActionResult, VoiceRealCallProfileRecoveryActionRoutesOptions, VoiceRealCallProfileRecoveryJob, VoiceRealCallProfileRecoveryJobCreateInput, VoiceRealCallProfileRecoveryJobListOptions, VoiceRealCallProfileRecoveryJobStatus, VoiceRealCallProfileRecoveryJobStore, VoiceRealCallProfileRecoveryJobUpdate, VoiceRealCallProfileRecoveryLoopAction, VoiceRealCallProfileRecoveryLoopJob, VoiceRealCallProfileRecoveryLoopJobResult, VoiceRealCallProfileRecoveryLoopOptions, VoiceRealCallProfileRecoveryLoopReport, VoiceRealCallProfileRecoveryLoopStartFailure, VoiceRealCallProfileRecoveryEvidenceOptions, VoiceRealCallProfileRecoveryEvidenceProvider, VoiceRealCallProfileRecoveryEvidenceProviderRole, VoiceRealCallProfileRecoveryEvidenceResult, VoiceSQLiteRealCallProfileRecoveryJobStoreOptions, VoiceRealCallProfileTraceCollector, VoiceRealCallProfileTraceCollectorEvidenceOptions, VoiceRealCallProfileTraceCollectorOptions, VoiceRealCallProfileTraceEvidenceOptions, VoiceRealCallProfileTraceStoreEvidenceOptions, VoiceReconnectRealCallProfileEvidenceOptions, VoiceReconnectProfileEvidenceSummary, VoiceReconnectProfileEvidenceSummaryStatus, VoiceRealCallEvidenceRuntime, VoiceRealCallEvidenceRuntimeCollectOptions, VoiceRealCallEvidenceRuntimeOptions, VoiceRealCallEvidenceRuntimeReadinessCheckOptions, VoiceRealCallEvidenceRuntimeReport, VoiceRealCallEvidenceRuntimeRoutesOptions, VoiceRealCallEvidenceRuntimeSourceOptions, VoiceRealCallEvidenceRuntimeWorker, VoiceRealCallEvidenceRuntimeWorkerHealthReport, VoiceRealCallEvidenceRuntimeWorkerLoop, VoiceRealCallEvidenceRuntimeWorkerLoopOptions, VoiceRealCallEvidenceRuntimeWorkerOptions, VoiceRealCallEvidenceRuntimeWorkerStatus, VoiceSQLiteRealCallProfileEvidenceStoreOptions, } from "./proofTrends";
|
|
49
|
+
export type { VoiceProofTrendAssertionInput, VoiceProofTrendAssertionReport, VoiceProofTrendCycle, VoiceProofTrendProfileDefinition, VoiceProofTrendProfileRecommendation, VoiceProofTrendProfileSummaryOptions, VoiceProofTrendProfileSummary, VoiceProofTrendProviderRecommendation, VoiceProofTrendProviderSummary, VoiceProofTrendReconnectSummary, VoiceProofTrendRecommendation, VoiceProofTrendRecommendationOptions, VoiceProofTrendRecommendationReport, VoiceProofTrendRecommendationRoutesOptions, VoiceProofTrendRecommendationStatus, VoiceProofTrendRecommendationSurface, VoiceProofTrendRealCallProfileEvidence, VoiceProofTrendRealCallProfileReportOptions, VoiceProofTrendReport, VoiceProofTrendReportInput, VoiceProofTrendRoutesOptions, VoiceProofTrendRuntimeChannelSummary, VoiceProofTrendStatus, VoiceProofTrendSummary, VoiceRealCallProfileDefault, VoiceRealCallProfileDefaultsOptions, VoiceRealCallProfileDefaultsReport, VoiceRealCallProfileEvidenceCreateInput, VoiceRealCallProfileEvidenceListOptions, VoiceRealCallProfileEvidenceRecord, VoiceRealCallProfileEvidenceStore, VoiceRealCallProfileHistoryOptions, VoiceRealCallProfileHistoryReport, VoiceRealCallProfileHistoryRoutesOptions, VoiceRealCallProfileProviderRouteOptions, VoiceRealCallProfileReadinessCheckOptions, VoiceRealCallProfileRecoveryActionOptions, VoiceRealCallProfileRecoveryAction, VoiceRealCallProfileRecoveryActionHandler, VoiceRealCallProfileRecoveryActionHandlerInput, VoiceRealCallProfileRecoveryActionId, VoiceRealCallProfileRecoveryJobHistoryCheckOptions, VoiceRealCallProfileRecoveryActionResult, VoiceRealCallProfileRecoveryActionRoutesOptions, VoiceRealCallProfileRecoveryJob, VoiceRealCallProfileRecoveryJobCreateInput, VoiceRealCallProfileRecoveryJobListOptions, VoiceRealCallProfileRecoveryJobStatus, VoiceRealCallProfileRecoveryJobStore, VoiceRealCallProfileRecoveryJobUpdate, VoiceRealCallProfileRecoveryLoopAction, VoiceRealCallProfileRecoveryLoopJob, VoiceRealCallProfileRecoveryLoopJobResult, VoiceRealCallProfileRecoveryLoopOptions, VoiceRealCallProfileRecoveryLoopReport, VoiceRealCallProfileRecoveryLoopStartFailure, VoiceRealCallProfileRecoveryEvidenceOptions, VoiceRealCallProfileRecoveryEvidenceProvider, VoiceRealCallProfileRecoveryEvidenceProviderRole, VoiceRealCallProfileRecoveryEvidenceResult, VoiceSQLiteRealCallProfileRecoveryJobStoreOptions, VoiceRealCallProfileTraceCollector, VoiceRealCallProfileTraceCollectorEvidenceOptions, VoiceRealCallProfileTraceCollectorOptions, VoiceRealCallProfileTraceEvidenceOptions, VoiceRealCallProfileTraceStoreEvidenceOptions, VoiceReconnectRealCallProfileEvidenceOptions, VoiceReconnectProfileEvidenceSummary, VoiceReconnectProfileEvidenceSummaryStatus, VoiceRealCallEvidenceRuntime, VoiceRealCallEvidenceRuntimeCollectOptions, VoiceRealCallEvidenceRuntimeOptions, VoiceRealCallEvidenceRuntimeReadinessCheckOptions, VoiceRealCallEvidenceRuntimeReport, VoiceRealCallEvidenceRuntimeRoutesOptions, VoiceRealCallEvidenceRuntimeSourceOptions, VoiceRealCallEvidenceRuntimeWorker, VoiceRealCallEvidenceRuntimeWorkerHealthReport, VoiceRealCallEvidenceRuntimeWorkerLoop, VoiceRealCallEvidenceRuntimeWorkerLoopOptions, VoiceRealCallEvidenceRuntimeWorkerOptions, VoiceRealCallEvidenceRuntimeWorkerReadinessCheckOptions, VoiceRealCallEvidenceRuntimeWorkerStatus, VoiceSQLiteRealCallProfileEvidenceStoreOptions, } from "./proofTrends";
|
|
50
50
|
export { assertVoiceSloCalibration, buildVoiceSloCalibrationReport, buildVoiceSloReadinessThresholdReport, createVoiceSloReadinessThresholdOptions, createVoiceSloReadinessThresholdRoutes, createVoiceSloThresholdProfile, createVoiceSloCalibrationRoutes, renderVoiceSloCalibrationMarkdown, renderVoiceSloReadinessThresholdHTML, renderVoiceSloReadinessThresholdMarkdown, } from "./sloCalibration";
|
|
51
51
|
export type { VoiceSloCalibrationMetricKey, VoiceSloCalibrationOptions, VoiceSloCalibrationReport, VoiceSloCalibrationRoutesOptions, VoiceSloCalibrationSample, VoiceSloCalibrationStatus, VoiceSloCalibrationThreshold, VoiceSloCalibrationThresholds, VoiceSloReadinessThresholdReport, VoiceSloReadinessThresholdReportOptions, VoiceSloReadinessThresholdOptions, VoiceSloReadinessThresholdRoutesOptions, VoiceSloThresholdProfile, } from "./sloCalibration";
|
|
52
52
|
export { assertVoiceLiveOpsControlEvidence, assertVoiceLiveOpsEvidence, buildVoiceLiveOpsControlState, createVoiceLiveOpsController, createVoiceLiveOpsRoutes, createVoiceMemoryLiveOpsControlStore, evaluateVoiceLiveOpsControlEvidence, evaluateVoiceLiveOpsEvidence, getVoiceLiveOpsControlStatus, VOICE_LIVE_OPS_ACTIONS, } from "./liveOps";
|
package/dist/index.js
CHANGED
|
@@ -17098,12 +17098,17 @@ var createVoiceRealCallEvidenceRuntimeWorkerLoop = (options) => {
|
|
|
17098
17098
|
const tick = () => worker.collect();
|
|
17099
17099
|
return {
|
|
17100
17100
|
collect: tick,
|
|
17101
|
-
health: () =>
|
|
17102
|
-
|
|
17103
|
-
|
|
17104
|
-
|
|
17105
|
-
|
|
17106
|
-
|
|
17101
|
+
health: () => {
|
|
17102
|
+
const health = worker.health();
|
|
17103
|
+
const running = isRunning();
|
|
17104
|
+
return {
|
|
17105
|
+
...health,
|
|
17106
|
+
isRunning: running,
|
|
17107
|
+
lastStartedAt,
|
|
17108
|
+
lastStoppedAt,
|
|
17109
|
+
status: running && health.status === "idle" ? "running" : health.status
|
|
17110
|
+
};
|
|
17111
|
+
},
|
|
17107
17112
|
isRunning,
|
|
17108
17113
|
start: () => {
|
|
17109
17114
|
if (timer) {
|
|
@@ -17126,6 +17131,77 @@ var createVoiceRealCallEvidenceRuntimeWorkerLoop = (options) => {
|
|
|
17126
17131
|
tick
|
|
17127
17132
|
};
|
|
17128
17133
|
};
|
|
17134
|
+
var buildVoiceRealCallEvidenceRuntimeWorkerReadinessCheck = (health, options = {}) => {
|
|
17135
|
+
const requireRunning = options.requireRunning ?? true;
|
|
17136
|
+
const issues = [];
|
|
17137
|
+
const warnings = [];
|
|
17138
|
+
const now = options.now ?? (() => new Date);
|
|
17139
|
+
const sourceHref = options.sourceHref ?? "/api/voice/real-call-evidence-runtime/worker";
|
|
17140
|
+
const href = options.href ?? "/voice/real-call-evidence-runtime";
|
|
17141
|
+
if (health.error) {
|
|
17142
|
+
issues.push(`Real-call evidence auto-collector error: ${health.error}.`);
|
|
17143
|
+
}
|
|
17144
|
+
if (health.status === "fail") {
|
|
17145
|
+
issues.push("Real-call evidence auto-collector is failing.");
|
|
17146
|
+
}
|
|
17147
|
+
if (requireRunning && !health.isRunning) {
|
|
17148
|
+
const message = "Real-call evidence auto-collector is not running; evidence is only collected manually.";
|
|
17149
|
+
if (options.failOnNotRunning) {
|
|
17150
|
+
issues.push(message);
|
|
17151
|
+
} else {
|
|
17152
|
+
warnings.push(message);
|
|
17153
|
+
}
|
|
17154
|
+
}
|
|
17155
|
+
if (health.collectCount === 0) {
|
|
17156
|
+
warnings.push("Real-call evidence auto-collector has not collected yet.");
|
|
17157
|
+
}
|
|
17158
|
+
if (options.maxLastCollectedAgeMs && health.lastCollectedAt) {
|
|
17159
|
+
const ageMs = now().getTime() - new Date(health.lastCollectedAt).getTime();
|
|
17160
|
+
if (Number.isFinite(ageMs) && ageMs > options.maxLastCollectedAgeMs) {
|
|
17161
|
+
const message = `Last real-call evidence auto-collection is ${String(ageMs)}ms old.`;
|
|
17162
|
+
if (options.failOnStale) {
|
|
17163
|
+
issues.push(message);
|
|
17164
|
+
} else {
|
|
17165
|
+
warnings.push(message);
|
|
17166
|
+
}
|
|
17167
|
+
}
|
|
17168
|
+
}
|
|
17169
|
+
const status = issues.length > 0 ? "fail" : warnings.length > 0 ? "warn" : "pass";
|
|
17170
|
+
return {
|
|
17171
|
+
actions: [
|
|
17172
|
+
{
|
|
17173
|
+
description: "Run one collection cycle immediately and update worker health.",
|
|
17174
|
+
href: options.collectHref ?? "/api/voice/real-call-evidence-runtime/collect",
|
|
17175
|
+
label: "Collect real-call evidence",
|
|
17176
|
+
method: "POST"
|
|
17177
|
+
},
|
|
17178
|
+
{
|
|
17179
|
+
description: "Open rolling real-call evidence and inspect worker health.",
|
|
17180
|
+
href,
|
|
17181
|
+
label: "Open real-call evidence runtime"
|
|
17182
|
+
}
|
|
17183
|
+
],
|
|
17184
|
+
detail: status === "pass" ? `Auto-collector is running with ${String(health.collectCount)} collection(s).` : [...issues, ...warnings].join(" "),
|
|
17185
|
+
gateExplanation: {
|
|
17186
|
+
evidenceHref: sourceHref,
|
|
17187
|
+
observed: health.isRunning ? "running" : "manual",
|
|
17188
|
+
remediation: "Enable the real-call evidence worker loop in production, keep it healthy, and run real traffic so rolling evidence stays fresh.",
|
|
17189
|
+
sourceHref: href,
|
|
17190
|
+
threshold: requireRunning ? "running" : "available",
|
|
17191
|
+
thresholdLabel: "Real-call evidence collection mode",
|
|
17192
|
+
unit: "status"
|
|
17193
|
+
},
|
|
17194
|
+
href,
|
|
17195
|
+
label: options.label ?? "Real-call evidence auto-collector",
|
|
17196
|
+
proofSource: {
|
|
17197
|
+
href: sourceHref,
|
|
17198
|
+
source: health.source,
|
|
17199
|
+
sourceLabel: "Real-call evidence worker health"
|
|
17200
|
+
},
|
|
17201
|
+
status,
|
|
17202
|
+
value: `${health.isRunning ? "running" : "manual"} / ${String(health.collectCount)} collections / ${health.status}`
|
|
17203
|
+
};
|
|
17204
|
+
};
|
|
17129
17205
|
var realCallProfileTraceSignalTypes = new Set([
|
|
17130
17206
|
"client.barge_in",
|
|
17131
17207
|
"client.browser_media",
|
|
@@ -43169,6 +43245,7 @@ export {
|
|
|
43169
43245
|
buildVoiceRealCallProfileEvidenceFromTraceEvents,
|
|
43170
43246
|
buildVoiceRealCallProfileEvidenceFromReconnectProofReports,
|
|
43171
43247
|
buildVoiceRealCallProfileDefaults,
|
|
43248
|
+
buildVoiceRealCallEvidenceRuntimeWorkerReadinessCheck,
|
|
43172
43249
|
buildVoiceRealCallEvidenceRuntimeReadinessCheck,
|
|
43173
43250
|
buildVoiceReadinessRecoveryActions,
|
|
43174
43251
|
buildVoiceProviderSloReport,
|
package/dist/proofTrends.d.ts
CHANGED
|
@@ -333,6 +333,17 @@ export type VoiceRealCallEvidenceRuntimeReadinessCheckOptions = {
|
|
|
333
333
|
minStoredEvidence?: number;
|
|
334
334
|
sourceHref?: string;
|
|
335
335
|
};
|
|
336
|
+
export type VoiceRealCallEvidenceRuntimeWorkerReadinessCheckOptions = {
|
|
337
|
+
collectHref?: string;
|
|
338
|
+
failOnNotRunning?: boolean;
|
|
339
|
+
failOnStale?: boolean;
|
|
340
|
+
href?: string;
|
|
341
|
+
label?: string;
|
|
342
|
+
maxLastCollectedAgeMs?: number;
|
|
343
|
+
now?: () => Date;
|
|
344
|
+
requireRunning?: boolean;
|
|
345
|
+
sourceHref?: string;
|
|
346
|
+
};
|
|
336
347
|
export type VoiceProofTrendRealCallProfileReportOptions = VoiceProofTrendProfileSummaryOptions & {
|
|
337
348
|
baseUrl?: string;
|
|
338
349
|
evidence: readonly VoiceProofTrendRealCallProfileEvidence[];
|
|
@@ -757,6 +768,7 @@ export declare const createVoiceRealCallEvidenceRuntime: (options: VoiceRealCall
|
|
|
757
768
|
export declare const buildVoiceRealCallEvidenceRuntimeReadinessCheck: (report: VoiceRealCallEvidenceRuntimeReport, options?: VoiceRealCallEvidenceRuntimeReadinessCheckOptions) => VoiceProductionReadinessCheck;
|
|
758
769
|
export declare const createVoiceRealCallEvidenceRuntimeWorker: (options: VoiceRealCallEvidenceRuntimeWorkerOptions) => VoiceRealCallEvidenceRuntimeWorker;
|
|
759
770
|
export declare const createVoiceRealCallEvidenceRuntimeWorkerLoop: (options: VoiceRealCallEvidenceRuntimeWorkerLoopOptions) => VoiceRealCallEvidenceRuntimeWorkerLoop;
|
|
771
|
+
export declare const buildVoiceRealCallEvidenceRuntimeWorkerReadinessCheck: (health: VoiceRealCallEvidenceRuntimeWorkerHealthReport, options?: VoiceRealCallEvidenceRuntimeWorkerReadinessCheckOptions) => VoiceProductionReadinessCheck;
|
|
760
772
|
export declare const createVoiceRealCallProfileTraceCollector: <TEvent extends StoredVoiceTraceEvent = StoredVoiceTraceEvent>(options: VoiceRealCallProfileTraceCollectorOptions<TEvent>) => VoiceRealCallProfileTraceCollector<TEvent>;
|
|
761
773
|
export declare const buildVoiceProofTrendProfileSummaries: (input: VoiceProofTrendReport | readonly VoiceProofTrendReport[], options?: VoiceProofTrendProfileSummaryOptions) => VoiceProofTrendProfileSummary[];
|
|
762
774
|
export declare const buildVoiceProofTrendReportFromRealCallProfiles: (options: VoiceProofTrendRealCallProfileReportOptions) => VoiceProofTrendReport;
|
package/dist/react/index.js
CHANGED
|
@@ -4003,12 +4003,17 @@ var createVoiceRealCallEvidenceRuntimeWorkerLoop = (options) => {
|
|
|
4003
4003
|
const tick = () => worker.collect();
|
|
4004
4004
|
return {
|
|
4005
4005
|
collect: tick,
|
|
4006
|
-
health: () =>
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4006
|
+
health: () => {
|
|
4007
|
+
const health = worker.health();
|
|
4008
|
+
const running = isRunning();
|
|
4009
|
+
return {
|
|
4010
|
+
...health,
|
|
4011
|
+
isRunning: running,
|
|
4012
|
+
lastStartedAt,
|
|
4013
|
+
lastStoppedAt,
|
|
4014
|
+
status: running && health.status === "idle" ? "running" : health.status
|
|
4015
|
+
};
|
|
4016
|
+
},
|
|
4012
4017
|
isRunning,
|
|
4013
4018
|
start: () => {
|
|
4014
4019
|
if (timer) {
|
|
@@ -4031,6 +4036,77 @@ var createVoiceRealCallEvidenceRuntimeWorkerLoop = (options) => {
|
|
|
4031
4036
|
tick
|
|
4032
4037
|
};
|
|
4033
4038
|
};
|
|
4039
|
+
var buildVoiceRealCallEvidenceRuntimeWorkerReadinessCheck = (health, options = {}) => {
|
|
4040
|
+
const requireRunning = options.requireRunning ?? true;
|
|
4041
|
+
const issues = [];
|
|
4042
|
+
const warnings = [];
|
|
4043
|
+
const now = options.now ?? (() => new Date);
|
|
4044
|
+
const sourceHref = options.sourceHref ?? "/api/voice/real-call-evidence-runtime/worker";
|
|
4045
|
+
const href = options.href ?? "/voice/real-call-evidence-runtime";
|
|
4046
|
+
if (health.error) {
|
|
4047
|
+
issues.push(`Real-call evidence auto-collector error: ${health.error}.`);
|
|
4048
|
+
}
|
|
4049
|
+
if (health.status === "fail") {
|
|
4050
|
+
issues.push("Real-call evidence auto-collector is failing.");
|
|
4051
|
+
}
|
|
4052
|
+
if (requireRunning && !health.isRunning) {
|
|
4053
|
+
const message = "Real-call evidence auto-collector is not running; evidence is only collected manually.";
|
|
4054
|
+
if (options.failOnNotRunning) {
|
|
4055
|
+
issues.push(message);
|
|
4056
|
+
} else {
|
|
4057
|
+
warnings.push(message);
|
|
4058
|
+
}
|
|
4059
|
+
}
|
|
4060
|
+
if (health.collectCount === 0) {
|
|
4061
|
+
warnings.push("Real-call evidence auto-collector has not collected yet.");
|
|
4062
|
+
}
|
|
4063
|
+
if (options.maxLastCollectedAgeMs && health.lastCollectedAt) {
|
|
4064
|
+
const ageMs = now().getTime() - new Date(health.lastCollectedAt).getTime();
|
|
4065
|
+
if (Number.isFinite(ageMs) && ageMs > options.maxLastCollectedAgeMs) {
|
|
4066
|
+
const message = `Last real-call evidence auto-collection is ${String(ageMs)}ms old.`;
|
|
4067
|
+
if (options.failOnStale) {
|
|
4068
|
+
issues.push(message);
|
|
4069
|
+
} else {
|
|
4070
|
+
warnings.push(message);
|
|
4071
|
+
}
|
|
4072
|
+
}
|
|
4073
|
+
}
|
|
4074
|
+
const status = issues.length > 0 ? "fail" : warnings.length > 0 ? "warn" : "pass";
|
|
4075
|
+
return {
|
|
4076
|
+
actions: [
|
|
4077
|
+
{
|
|
4078
|
+
description: "Run one collection cycle immediately and update worker health.",
|
|
4079
|
+
href: options.collectHref ?? "/api/voice/real-call-evidence-runtime/collect",
|
|
4080
|
+
label: "Collect real-call evidence",
|
|
4081
|
+
method: "POST"
|
|
4082
|
+
},
|
|
4083
|
+
{
|
|
4084
|
+
description: "Open rolling real-call evidence and inspect worker health.",
|
|
4085
|
+
href,
|
|
4086
|
+
label: "Open real-call evidence runtime"
|
|
4087
|
+
}
|
|
4088
|
+
],
|
|
4089
|
+
detail: status === "pass" ? `Auto-collector is running with ${String(health.collectCount)} collection(s).` : [...issues, ...warnings].join(" "),
|
|
4090
|
+
gateExplanation: {
|
|
4091
|
+
evidenceHref: sourceHref,
|
|
4092
|
+
observed: health.isRunning ? "running" : "manual",
|
|
4093
|
+
remediation: "Enable the real-call evidence worker loop in production, keep it healthy, and run real traffic so rolling evidence stays fresh.",
|
|
4094
|
+
sourceHref: href,
|
|
4095
|
+
threshold: requireRunning ? "running" : "available",
|
|
4096
|
+
thresholdLabel: "Real-call evidence collection mode",
|
|
4097
|
+
unit: "status"
|
|
4098
|
+
},
|
|
4099
|
+
href,
|
|
4100
|
+
label: options.label ?? "Real-call evidence auto-collector",
|
|
4101
|
+
proofSource: {
|
|
4102
|
+
href: sourceHref,
|
|
4103
|
+
source: health.source,
|
|
4104
|
+
sourceLabel: "Real-call evidence worker health"
|
|
4105
|
+
},
|
|
4106
|
+
status,
|
|
4107
|
+
value: `${health.isRunning ? "running" : "manual"} / ${String(health.collectCount)} collections / ${health.status}`
|
|
4108
|
+
};
|
|
4109
|
+
};
|
|
4034
4110
|
var realCallProfileTraceSignalTypes = new Set([
|
|
4035
4111
|
"client.barge_in",
|
|
4036
4112
|
"client.browser_media",
|
package/dist/vue/index.js
CHANGED
|
@@ -3924,12 +3924,17 @@ var createVoiceRealCallEvidenceRuntimeWorkerLoop = (options) => {
|
|
|
3924
3924
|
const tick = () => worker.collect();
|
|
3925
3925
|
return {
|
|
3926
3926
|
collect: tick,
|
|
3927
|
-
health: () =>
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3927
|
+
health: () => {
|
|
3928
|
+
const health = worker.health();
|
|
3929
|
+
const running = isRunning();
|
|
3930
|
+
return {
|
|
3931
|
+
...health,
|
|
3932
|
+
isRunning: running,
|
|
3933
|
+
lastStartedAt,
|
|
3934
|
+
lastStoppedAt,
|
|
3935
|
+
status: running && health.status === "idle" ? "running" : health.status
|
|
3936
|
+
};
|
|
3937
|
+
},
|
|
3933
3938
|
isRunning,
|
|
3934
3939
|
start: () => {
|
|
3935
3940
|
if (timer) {
|
|
@@ -3952,6 +3957,77 @@ var createVoiceRealCallEvidenceRuntimeWorkerLoop = (options) => {
|
|
|
3952
3957
|
tick
|
|
3953
3958
|
};
|
|
3954
3959
|
};
|
|
3960
|
+
var buildVoiceRealCallEvidenceRuntimeWorkerReadinessCheck = (health, options = {}) => {
|
|
3961
|
+
const requireRunning = options.requireRunning ?? true;
|
|
3962
|
+
const issues = [];
|
|
3963
|
+
const warnings = [];
|
|
3964
|
+
const now = options.now ?? (() => new Date);
|
|
3965
|
+
const sourceHref = options.sourceHref ?? "/api/voice/real-call-evidence-runtime/worker";
|
|
3966
|
+
const href = options.href ?? "/voice/real-call-evidence-runtime";
|
|
3967
|
+
if (health.error) {
|
|
3968
|
+
issues.push(`Real-call evidence auto-collector error: ${health.error}.`);
|
|
3969
|
+
}
|
|
3970
|
+
if (health.status === "fail") {
|
|
3971
|
+
issues.push("Real-call evidence auto-collector is failing.");
|
|
3972
|
+
}
|
|
3973
|
+
if (requireRunning && !health.isRunning) {
|
|
3974
|
+
const message = "Real-call evidence auto-collector is not running; evidence is only collected manually.";
|
|
3975
|
+
if (options.failOnNotRunning) {
|
|
3976
|
+
issues.push(message);
|
|
3977
|
+
} else {
|
|
3978
|
+
warnings.push(message);
|
|
3979
|
+
}
|
|
3980
|
+
}
|
|
3981
|
+
if (health.collectCount === 0) {
|
|
3982
|
+
warnings.push("Real-call evidence auto-collector has not collected yet.");
|
|
3983
|
+
}
|
|
3984
|
+
if (options.maxLastCollectedAgeMs && health.lastCollectedAt) {
|
|
3985
|
+
const ageMs = now().getTime() - new Date(health.lastCollectedAt).getTime();
|
|
3986
|
+
if (Number.isFinite(ageMs) && ageMs > options.maxLastCollectedAgeMs) {
|
|
3987
|
+
const message = `Last real-call evidence auto-collection is ${String(ageMs)}ms old.`;
|
|
3988
|
+
if (options.failOnStale) {
|
|
3989
|
+
issues.push(message);
|
|
3990
|
+
} else {
|
|
3991
|
+
warnings.push(message);
|
|
3992
|
+
}
|
|
3993
|
+
}
|
|
3994
|
+
}
|
|
3995
|
+
const status = issues.length > 0 ? "fail" : warnings.length > 0 ? "warn" : "pass";
|
|
3996
|
+
return {
|
|
3997
|
+
actions: [
|
|
3998
|
+
{
|
|
3999
|
+
description: "Run one collection cycle immediately and update worker health.",
|
|
4000
|
+
href: options.collectHref ?? "/api/voice/real-call-evidence-runtime/collect",
|
|
4001
|
+
label: "Collect real-call evidence",
|
|
4002
|
+
method: "POST"
|
|
4003
|
+
},
|
|
4004
|
+
{
|
|
4005
|
+
description: "Open rolling real-call evidence and inspect worker health.",
|
|
4006
|
+
href,
|
|
4007
|
+
label: "Open real-call evidence runtime"
|
|
4008
|
+
}
|
|
4009
|
+
],
|
|
4010
|
+
detail: status === "pass" ? `Auto-collector is running with ${String(health.collectCount)} collection(s).` : [...issues, ...warnings].join(" "),
|
|
4011
|
+
gateExplanation: {
|
|
4012
|
+
evidenceHref: sourceHref,
|
|
4013
|
+
observed: health.isRunning ? "running" : "manual",
|
|
4014
|
+
remediation: "Enable the real-call evidence worker loop in production, keep it healthy, and run real traffic so rolling evidence stays fresh.",
|
|
4015
|
+
sourceHref: href,
|
|
4016
|
+
threshold: requireRunning ? "running" : "available",
|
|
4017
|
+
thresholdLabel: "Real-call evidence collection mode",
|
|
4018
|
+
unit: "status"
|
|
4019
|
+
},
|
|
4020
|
+
href,
|
|
4021
|
+
label: options.label ?? "Real-call evidence auto-collector",
|
|
4022
|
+
proofSource: {
|
|
4023
|
+
href: sourceHref,
|
|
4024
|
+
source: health.source,
|
|
4025
|
+
sourceLabel: "Real-call evidence worker health"
|
|
4026
|
+
},
|
|
4027
|
+
status,
|
|
4028
|
+
value: `${health.isRunning ? "running" : "manual"} / ${String(health.collectCount)} collections / ${health.status}`
|
|
4029
|
+
};
|
|
4030
|
+
};
|
|
3955
4031
|
var realCallProfileTraceSignalTypes = new Set([
|
|
3956
4032
|
"client.barge_in",
|
|
3957
4033
|
"client.browser_media",
|