@absolutejs/voice 0.0.22-beta.456 → 0.0.22-beta.457
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 +79 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +81 -0
- package/dist/proofTrends.d.ts +35 -0
- package/dist/react/index.js +79 -0
- package/dist/vue/index.js +79 -0
- package/package.json +1 -1
package/dist/client/index.js
CHANGED
|
@@ -6857,6 +6857,85 @@ var buildVoiceRealCallEvidenceRuntimeReadinessCheck = (report, options = {}) =>
|
|
|
6857
6857
|
value: `${String(report.summary.storedEvidence)} evidence / ${String(report.summary.sessions)} sessions / ${String(report.summary.profiles)} profiles`
|
|
6858
6858
|
};
|
|
6859
6859
|
};
|
|
6860
|
+
var readVoiceRealCallEvidenceRuntimeWorkerNow = (options) => (options.now ?? (() => new Date))().toISOString();
|
|
6861
|
+
var readVoiceRealCallEvidenceRuntimeWorkerError = (error) => error instanceof Error ? error.message : String(error);
|
|
6862
|
+
var createVoiceRealCallEvidenceRuntimeWorker = (options) => {
|
|
6863
|
+
let collectCount = 0;
|
|
6864
|
+
let error;
|
|
6865
|
+
let lastCollectedAt;
|
|
6866
|
+
let lastReport;
|
|
6867
|
+
let lastTickAt;
|
|
6868
|
+
let status = "idle";
|
|
6869
|
+
const collect = async () => {
|
|
6870
|
+
lastTickAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
6871
|
+
try {
|
|
6872
|
+
const report = await options.runtime.collect(options.collectOptions);
|
|
6873
|
+
collectCount += 1;
|
|
6874
|
+
error = undefined;
|
|
6875
|
+
lastCollectedAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
6876
|
+
lastReport = report;
|
|
6877
|
+
status = report.status;
|
|
6878
|
+
await options.onCollect?.(report);
|
|
6879
|
+
return report;
|
|
6880
|
+
} catch (caught) {
|
|
6881
|
+
error = readVoiceRealCallEvidenceRuntimeWorkerError(caught);
|
|
6882
|
+
status = "fail";
|
|
6883
|
+
await options.onError?.(caught);
|
|
6884
|
+
throw caught;
|
|
6885
|
+
}
|
|
6886
|
+
};
|
|
6887
|
+
return {
|
|
6888
|
+
collect,
|
|
6889
|
+
health: () => ({
|
|
6890
|
+
collectCount,
|
|
6891
|
+
error,
|
|
6892
|
+
isRunning: false,
|
|
6893
|
+
lastCollectedAt,
|
|
6894
|
+
lastReport,
|
|
6895
|
+
lastTickAt,
|
|
6896
|
+
source: "real-call-evidence-runtime-worker",
|
|
6897
|
+
status
|
|
6898
|
+
})
|
|
6899
|
+
};
|
|
6900
|
+
};
|
|
6901
|
+
var createVoiceRealCallEvidenceRuntimeWorkerLoop = (options) => {
|
|
6902
|
+
const worker = createVoiceRealCallEvidenceRuntimeWorker(options);
|
|
6903
|
+
const pollIntervalMs = Math.max(1, options.pollIntervalMs ?? 30000);
|
|
6904
|
+
let timer;
|
|
6905
|
+
let lastStartedAt;
|
|
6906
|
+
let lastStoppedAt;
|
|
6907
|
+
const isRunning = () => timer !== undefined;
|
|
6908
|
+
const tick = () => worker.collect();
|
|
6909
|
+
return {
|
|
6910
|
+
collect: tick,
|
|
6911
|
+
health: () => ({
|
|
6912
|
+
...worker.health(),
|
|
6913
|
+
isRunning: isRunning(),
|
|
6914
|
+
lastStartedAt,
|
|
6915
|
+
lastStoppedAt
|
|
6916
|
+
}),
|
|
6917
|
+
isRunning,
|
|
6918
|
+
start: () => {
|
|
6919
|
+
if (timer) {
|
|
6920
|
+
return;
|
|
6921
|
+
}
|
|
6922
|
+
lastStartedAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
6923
|
+
timer = setInterval(() => {
|
|
6924
|
+
tick().catch((error) => {
|
|
6925
|
+
options.onError?.(error);
|
|
6926
|
+
});
|
|
6927
|
+
}, pollIntervalMs);
|
|
6928
|
+
},
|
|
6929
|
+
stop: () => {
|
|
6930
|
+
if (timer) {
|
|
6931
|
+
clearInterval(timer);
|
|
6932
|
+
timer = undefined;
|
|
6933
|
+
}
|
|
6934
|
+
lastStoppedAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
6935
|
+
},
|
|
6936
|
+
tick
|
|
6937
|
+
};
|
|
6938
|
+
};
|
|
6860
6939
|
var realCallProfileTraceSignalTypes = new Set([
|
|
6861
6940
|
"client.barge_in",
|
|
6862
6941
|
"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, 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, 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, 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, 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
|
@@ -17047,6 +17047,85 @@ var buildVoiceRealCallEvidenceRuntimeReadinessCheck = (report, options = {}) =>
|
|
|
17047
17047
|
value: `${String(report.summary.storedEvidence)} evidence / ${String(report.summary.sessions)} sessions / ${String(report.summary.profiles)} profiles`
|
|
17048
17048
|
};
|
|
17049
17049
|
};
|
|
17050
|
+
var readVoiceRealCallEvidenceRuntimeWorkerNow = (options) => (options.now ?? (() => new Date))().toISOString();
|
|
17051
|
+
var readVoiceRealCallEvidenceRuntimeWorkerError = (error) => error instanceof Error ? error.message : String(error);
|
|
17052
|
+
var createVoiceRealCallEvidenceRuntimeWorker = (options) => {
|
|
17053
|
+
let collectCount = 0;
|
|
17054
|
+
let error;
|
|
17055
|
+
let lastCollectedAt;
|
|
17056
|
+
let lastReport;
|
|
17057
|
+
let lastTickAt;
|
|
17058
|
+
let status = "idle";
|
|
17059
|
+
const collect = async () => {
|
|
17060
|
+
lastTickAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
17061
|
+
try {
|
|
17062
|
+
const report = await options.runtime.collect(options.collectOptions);
|
|
17063
|
+
collectCount += 1;
|
|
17064
|
+
error = undefined;
|
|
17065
|
+
lastCollectedAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
17066
|
+
lastReport = report;
|
|
17067
|
+
status = report.status;
|
|
17068
|
+
await options.onCollect?.(report);
|
|
17069
|
+
return report;
|
|
17070
|
+
} catch (caught) {
|
|
17071
|
+
error = readVoiceRealCallEvidenceRuntimeWorkerError(caught);
|
|
17072
|
+
status = "fail";
|
|
17073
|
+
await options.onError?.(caught);
|
|
17074
|
+
throw caught;
|
|
17075
|
+
}
|
|
17076
|
+
};
|
|
17077
|
+
return {
|
|
17078
|
+
collect,
|
|
17079
|
+
health: () => ({
|
|
17080
|
+
collectCount,
|
|
17081
|
+
error,
|
|
17082
|
+
isRunning: false,
|
|
17083
|
+
lastCollectedAt,
|
|
17084
|
+
lastReport,
|
|
17085
|
+
lastTickAt,
|
|
17086
|
+
source: "real-call-evidence-runtime-worker",
|
|
17087
|
+
status
|
|
17088
|
+
})
|
|
17089
|
+
};
|
|
17090
|
+
};
|
|
17091
|
+
var createVoiceRealCallEvidenceRuntimeWorkerLoop = (options) => {
|
|
17092
|
+
const worker = createVoiceRealCallEvidenceRuntimeWorker(options);
|
|
17093
|
+
const pollIntervalMs = Math.max(1, options.pollIntervalMs ?? 30000);
|
|
17094
|
+
let timer;
|
|
17095
|
+
let lastStartedAt;
|
|
17096
|
+
let lastStoppedAt;
|
|
17097
|
+
const isRunning = () => timer !== undefined;
|
|
17098
|
+
const tick = () => worker.collect();
|
|
17099
|
+
return {
|
|
17100
|
+
collect: tick,
|
|
17101
|
+
health: () => ({
|
|
17102
|
+
...worker.health(),
|
|
17103
|
+
isRunning: isRunning(),
|
|
17104
|
+
lastStartedAt,
|
|
17105
|
+
lastStoppedAt
|
|
17106
|
+
}),
|
|
17107
|
+
isRunning,
|
|
17108
|
+
start: () => {
|
|
17109
|
+
if (timer) {
|
|
17110
|
+
return;
|
|
17111
|
+
}
|
|
17112
|
+
lastStartedAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
17113
|
+
timer = setInterval(() => {
|
|
17114
|
+
tick().catch((error) => {
|
|
17115
|
+
options.onError?.(error);
|
|
17116
|
+
});
|
|
17117
|
+
}, pollIntervalMs);
|
|
17118
|
+
},
|
|
17119
|
+
stop: () => {
|
|
17120
|
+
if (timer) {
|
|
17121
|
+
clearInterval(timer);
|
|
17122
|
+
timer = undefined;
|
|
17123
|
+
}
|
|
17124
|
+
lastStoppedAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
17125
|
+
},
|
|
17126
|
+
tick
|
|
17127
|
+
};
|
|
17128
|
+
};
|
|
17050
17129
|
var realCallProfileTraceSignalTypes = new Set([
|
|
17051
17130
|
"client.barge_in",
|
|
17052
17131
|
"client.browser_media",
|
|
@@ -42842,6 +42921,8 @@ export {
|
|
|
42842
42921
|
createVoiceRealCallProfileTraceCollector,
|
|
42843
42922
|
createVoiceRealCallProfileRecoveryActionRoutes,
|
|
42844
42923
|
createVoiceRealCallProfileHistoryRoutes,
|
|
42924
|
+
createVoiceRealCallEvidenceRuntimeWorkerLoop,
|
|
42925
|
+
createVoiceRealCallEvidenceRuntimeWorker,
|
|
42845
42926
|
createVoiceRealCallEvidenceRuntimeRoutes,
|
|
42846
42927
|
createVoiceRealCallEvidenceRuntime,
|
|
42847
42928
|
createVoiceReadinessProfile,
|
package/dist/proofTrends.d.ts
CHANGED
|
@@ -280,6 +280,39 @@ export type VoiceRealCallEvidenceRuntime = {
|
|
|
280
280
|
collect: (options?: VoiceRealCallEvidenceRuntimeCollectOptions) => Promise<VoiceRealCallEvidenceRuntimeReport>;
|
|
281
281
|
listEvidence: (options?: VoiceRealCallProfileEvidenceListOptions) => Promise<VoiceRealCallProfileEvidenceRecord[]>;
|
|
282
282
|
};
|
|
283
|
+
export type VoiceRealCallEvidenceRuntimeWorkerStatus = "idle" | "running" | VoiceProofTrendStatus;
|
|
284
|
+
export type VoiceRealCallEvidenceRuntimeWorkerHealthReport = {
|
|
285
|
+
collectCount: number;
|
|
286
|
+
error?: string;
|
|
287
|
+
isRunning: boolean;
|
|
288
|
+
lastCollectedAt?: string;
|
|
289
|
+
lastReport?: VoiceRealCallEvidenceRuntimeReport;
|
|
290
|
+
lastStartedAt?: string;
|
|
291
|
+
lastStoppedAt?: string;
|
|
292
|
+
lastTickAt?: string;
|
|
293
|
+
source: string;
|
|
294
|
+
status: VoiceRealCallEvidenceRuntimeWorkerStatus;
|
|
295
|
+
};
|
|
296
|
+
export type VoiceRealCallEvidenceRuntimeWorkerOptions = {
|
|
297
|
+
collectOptions?: VoiceRealCallEvidenceRuntimeCollectOptions;
|
|
298
|
+
now?: () => Date;
|
|
299
|
+
onCollect?: (report: VoiceRealCallEvidenceRuntimeReport) => void | Promise<void>;
|
|
300
|
+
onError?: (error: unknown) => void | Promise<void>;
|
|
301
|
+
runtime: VoiceRealCallEvidenceRuntime;
|
|
302
|
+
};
|
|
303
|
+
export type VoiceRealCallEvidenceRuntimeWorker = {
|
|
304
|
+
collect: () => Promise<VoiceRealCallEvidenceRuntimeReport>;
|
|
305
|
+
health: () => VoiceRealCallEvidenceRuntimeWorkerHealthReport;
|
|
306
|
+
};
|
|
307
|
+
export type VoiceRealCallEvidenceRuntimeWorkerLoopOptions = VoiceRealCallEvidenceRuntimeWorkerOptions & {
|
|
308
|
+
pollIntervalMs?: number;
|
|
309
|
+
};
|
|
310
|
+
export type VoiceRealCallEvidenceRuntimeWorkerLoop = VoiceRealCallEvidenceRuntimeWorker & {
|
|
311
|
+
isRunning: () => boolean;
|
|
312
|
+
start: () => void;
|
|
313
|
+
stop: () => void;
|
|
314
|
+
tick: () => Promise<VoiceRealCallEvidenceRuntimeReport>;
|
|
315
|
+
};
|
|
283
316
|
export type VoiceRealCallEvidenceRuntimeRoutesOptions = VoiceRealCallEvidenceRuntimeOptions & {
|
|
284
317
|
collectPath?: false | string;
|
|
285
318
|
headers?: HeadersInit;
|
|
@@ -722,6 +755,8 @@ export declare const loadVoiceRealCallProfileEvidenceFromStore: (options: VoiceR
|
|
|
722
755
|
}) => Promise<VoiceRealCallProfileEvidenceRecord[]>;
|
|
723
756
|
export declare const createVoiceRealCallEvidenceRuntime: (options: VoiceRealCallEvidenceRuntimeOptions) => VoiceRealCallEvidenceRuntime;
|
|
724
757
|
export declare const buildVoiceRealCallEvidenceRuntimeReadinessCheck: (report: VoiceRealCallEvidenceRuntimeReport, options?: VoiceRealCallEvidenceRuntimeReadinessCheckOptions) => VoiceProductionReadinessCheck;
|
|
758
|
+
export declare const createVoiceRealCallEvidenceRuntimeWorker: (options: VoiceRealCallEvidenceRuntimeWorkerOptions) => VoiceRealCallEvidenceRuntimeWorker;
|
|
759
|
+
export declare const createVoiceRealCallEvidenceRuntimeWorkerLoop: (options: VoiceRealCallEvidenceRuntimeWorkerLoopOptions) => VoiceRealCallEvidenceRuntimeWorkerLoop;
|
|
725
760
|
export declare const createVoiceRealCallProfileTraceCollector: <TEvent extends StoredVoiceTraceEvent = StoredVoiceTraceEvent>(options: VoiceRealCallProfileTraceCollectorOptions<TEvent>) => VoiceRealCallProfileTraceCollector<TEvent>;
|
|
726
761
|
export declare const buildVoiceProofTrendProfileSummaries: (input: VoiceProofTrendReport | readonly VoiceProofTrendReport[], options?: VoiceProofTrendProfileSummaryOptions) => VoiceProofTrendProfileSummary[];
|
|
727
762
|
export declare const buildVoiceProofTrendReportFromRealCallProfiles: (options: VoiceProofTrendRealCallProfileReportOptions) => VoiceProofTrendReport;
|
package/dist/react/index.js
CHANGED
|
@@ -3952,6 +3952,85 @@ var buildVoiceRealCallEvidenceRuntimeReadinessCheck = (report, options = {}) =>
|
|
|
3952
3952
|
value: `${String(report.summary.storedEvidence)} evidence / ${String(report.summary.sessions)} sessions / ${String(report.summary.profiles)} profiles`
|
|
3953
3953
|
};
|
|
3954
3954
|
};
|
|
3955
|
+
var readVoiceRealCallEvidenceRuntimeWorkerNow = (options) => (options.now ?? (() => new Date))().toISOString();
|
|
3956
|
+
var readVoiceRealCallEvidenceRuntimeWorkerError = (error) => error instanceof Error ? error.message : String(error);
|
|
3957
|
+
var createVoiceRealCallEvidenceRuntimeWorker = (options) => {
|
|
3958
|
+
let collectCount = 0;
|
|
3959
|
+
let error;
|
|
3960
|
+
let lastCollectedAt;
|
|
3961
|
+
let lastReport;
|
|
3962
|
+
let lastTickAt;
|
|
3963
|
+
let status = "idle";
|
|
3964
|
+
const collect = async () => {
|
|
3965
|
+
lastTickAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
3966
|
+
try {
|
|
3967
|
+
const report = await options.runtime.collect(options.collectOptions);
|
|
3968
|
+
collectCount += 1;
|
|
3969
|
+
error = undefined;
|
|
3970
|
+
lastCollectedAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
3971
|
+
lastReport = report;
|
|
3972
|
+
status = report.status;
|
|
3973
|
+
await options.onCollect?.(report);
|
|
3974
|
+
return report;
|
|
3975
|
+
} catch (caught) {
|
|
3976
|
+
error = readVoiceRealCallEvidenceRuntimeWorkerError(caught);
|
|
3977
|
+
status = "fail";
|
|
3978
|
+
await options.onError?.(caught);
|
|
3979
|
+
throw caught;
|
|
3980
|
+
}
|
|
3981
|
+
};
|
|
3982
|
+
return {
|
|
3983
|
+
collect,
|
|
3984
|
+
health: () => ({
|
|
3985
|
+
collectCount,
|
|
3986
|
+
error,
|
|
3987
|
+
isRunning: false,
|
|
3988
|
+
lastCollectedAt,
|
|
3989
|
+
lastReport,
|
|
3990
|
+
lastTickAt,
|
|
3991
|
+
source: "real-call-evidence-runtime-worker",
|
|
3992
|
+
status
|
|
3993
|
+
})
|
|
3994
|
+
};
|
|
3995
|
+
};
|
|
3996
|
+
var createVoiceRealCallEvidenceRuntimeWorkerLoop = (options) => {
|
|
3997
|
+
const worker = createVoiceRealCallEvidenceRuntimeWorker(options);
|
|
3998
|
+
const pollIntervalMs = Math.max(1, options.pollIntervalMs ?? 30000);
|
|
3999
|
+
let timer;
|
|
4000
|
+
let lastStartedAt;
|
|
4001
|
+
let lastStoppedAt;
|
|
4002
|
+
const isRunning = () => timer !== undefined;
|
|
4003
|
+
const tick = () => worker.collect();
|
|
4004
|
+
return {
|
|
4005
|
+
collect: tick,
|
|
4006
|
+
health: () => ({
|
|
4007
|
+
...worker.health(),
|
|
4008
|
+
isRunning: isRunning(),
|
|
4009
|
+
lastStartedAt,
|
|
4010
|
+
lastStoppedAt
|
|
4011
|
+
}),
|
|
4012
|
+
isRunning,
|
|
4013
|
+
start: () => {
|
|
4014
|
+
if (timer) {
|
|
4015
|
+
return;
|
|
4016
|
+
}
|
|
4017
|
+
lastStartedAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
4018
|
+
timer = setInterval(() => {
|
|
4019
|
+
tick().catch((error) => {
|
|
4020
|
+
options.onError?.(error);
|
|
4021
|
+
});
|
|
4022
|
+
}, pollIntervalMs);
|
|
4023
|
+
},
|
|
4024
|
+
stop: () => {
|
|
4025
|
+
if (timer) {
|
|
4026
|
+
clearInterval(timer);
|
|
4027
|
+
timer = undefined;
|
|
4028
|
+
}
|
|
4029
|
+
lastStoppedAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
4030
|
+
},
|
|
4031
|
+
tick
|
|
4032
|
+
};
|
|
4033
|
+
};
|
|
3955
4034
|
var realCallProfileTraceSignalTypes = new Set([
|
|
3956
4035
|
"client.barge_in",
|
|
3957
4036
|
"client.browser_media",
|
package/dist/vue/index.js
CHANGED
|
@@ -3873,6 +3873,85 @@ var buildVoiceRealCallEvidenceRuntimeReadinessCheck = (report, options = {}) =>
|
|
|
3873
3873
|
value: `${String(report.summary.storedEvidence)} evidence / ${String(report.summary.sessions)} sessions / ${String(report.summary.profiles)} profiles`
|
|
3874
3874
|
};
|
|
3875
3875
|
};
|
|
3876
|
+
var readVoiceRealCallEvidenceRuntimeWorkerNow = (options) => (options.now ?? (() => new Date))().toISOString();
|
|
3877
|
+
var readVoiceRealCallEvidenceRuntimeWorkerError = (error) => error instanceof Error ? error.message : String(error);
|
|
3878
|
+
var createVoiceRealCallEvidenceRuntimeWorker = (options) => {
|
|
3879
|
+
let collectCount = 0;
|
|
3880
|
+
let error;
|
|
3881
|
+
let lastCollectedAt;
|
|
3882
|
+
let lastReport;
|
|
3883
|
+
let lastTickAt;
|
|
3884
|
+
let status = "idle";
|
|
3885
|
+
const collect = async () => {
|
|
3886
|
+
lastTickAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
3887
|
+
try {
|
|
3888
|
+
const report = await options.runtime.collect(options.collectOptions);
|
|
3889
|
+
collectCount += 1;
|
|
3890
|
+
error = undefined;
|
|
3891
|
+
lastCollectedAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
3892
|
+
lastReport = report;
|
|
3893
|
+
status = report.status;
|
|
3894
|
+
await options.onCollect?.(report);
|
|
3895
|
+
return report;
|
|
3896
|
+
} catch (caught) {
|
|
3897
|
+
error = readVoiceRealCallEvidenceRuntimeWorkerError(caught);
|
|
3898
|
+
status = "fail";
|
|
3899
|
+
await options.onError?.(caught);
|
|
3900
|
+
throw caught;
|
|
3901
|
+
}
|
|
3902
|
+
};
|
|
3903
|
+
return {
|
|
3904
|
+
collect,
|
|
3905
|
+
health: () => ({
|
|
3906
|
+
collectCount,
|
|
3907
|
+
error,
|
|
3908
|
+
isRunning: false,
|
|
3909
|
+
lastCollectedAt,
|
|
3910
|
+
lastReport,
|
|
3911
|
+
lastTickAt,
|
|
3912
|
+
source: "real-call-evidence-runtime-worker",
|
|
3913
|
+
status
|
|
3914
|
+
})
|
|
3915
|
+
};
|
|
3916
|
+
};
|
|
3917
|
+
var createVoiceRealCallEvidenceRuntimeWorkerLoop = (options) => {
|
|
3918
|
+
const worker = createVoiceRealCallEvidenceRuntimeWorker(options);
|
|
3919
|
+
const pollIntervalMs = Math.max(1, options.pollIntervalMs ?? 30000);
|
|
3920
|
+
let timer;
|
|
3921
|
+
let lastStartedAt;
|
|
3922
|
+
let lastStoppedAt;
|
|
3923
|
+
const isRunning = () => timer !== undefined;
|
|
3924
|
+
const tick = () => worker.collect();
|
|
3925
|
+
return {
|
|
3926
|
+
collect: tick,
|
|
3927
|
+
health: () => ({
|
|
3928
|
+
...worker.health(),
|
|
3929
|
+
isRunning: isRunning(),
|
|
3930
|
+
lastStartedAt,
|
|
3931
|
+
lastStoppedAt
|
|
3932
|
+
}),
|
|
3933
|
+
isRunning,
|
|
3934
|
+
start: () => {
|
|
3935
|
+
if (timer) {
|
|
3936
|
+
return;
|
|
3937
|
+
}
|
|
3938
|
+
lastStartedAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
3939
|
+
timer = setInterval(() => {
|
|
3940
|
+
tick().catch((error) => {
|
|
3941
|
+
options.onError?.(error);
|
|
3942
|
+
});
|
|
3943
|
+
}, pollIntervalMs);
|
|
3944
|
+
},
|
|
3945
|
+
stop: () => {
|
|
3946
|
+
if (timer) {
|
|
3947
|
+
clearInterval(timer);
|
|
3948
|
+
timer = undefined;
|
|
3949
|
+
}
|
|
3950
|
+
lastStoppedAt = readVoiceRealCallEvidenceRuntimeWorkerNow(options);
|
|
3951
|
+
},
|
|
3952
|
+
tick
|
|
3953
|
+
};
|
|
3954
|
+
};
|
|
3876
3955
|
var realCallProfileTraceSignalTypes = new Set([
|
|
3877
3956
|
"client.barge_in",
|
|
3878
3957
|
"client.browser_media",
|