@absolutejs/voice 0.0.22-beta.378 → 0.0.22-beta.379
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 +62 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +63 -0
- package/dist/proofTrends.d.ts +14 -0
- package/dist/react/index.js +62 -0
- package/dist/vue/index.js +62 -0
- package/package.json +1 -1
package/dist/client/index.js
CHANGED
|
@@ -4237,6 +4237,68 @@ var buildVoiceRealCallProfileEvidenceFromTraceEvents = (events, options = {}) =>
|
|
|
4237
4237
|
}).filter((evidence) => evidence !== undefined);
|
|
4238
4238
|
};
|
|
4239
4239
|
var loadVoiceRealCallProfileEvidenceFromTraceStore = async (options) => buildVoiceRealCallProfileEvidenceFromTraceEvents(await options.store.list({ limit: options.limit ?? 5000 }), options);
|
|
4240
|
+
var realCallProfileTraceSignalTypes = new Set([
|
|
4241
|
+
"client.barge_in",
|
|
4242
|
+
"client.browser_media",
|
|
4243
|
+
"client.live_latency",
|
|
4244
|
+
"client.telephony_media",
|
|
4245
|
+
"provider.decision",
|
|
4246
|
+
"session.error",
|
|
4247
|
+
"turn_latency.stage"
|
|
4248
|
+
]);
|
|
4249
|
+
var hasTraceProfileMetadata = (event, options) => Boolean(readTraceProfileId([event], options));
|
|
4250
|
+
var mergeRealCallProfileCollectorOptions = (base, override = {}) => ({
|
|
4251
|
+
defaultProfileId: override.defaultProfileId ?? base.defaultProfileId,
|
|
4252
|
+
defaultProfileLabel: override.defaultProfileLabel ?? base.defaultProfileLabel,
|
|
4253
|
+
limit: override.limit ?? base.limit,
|
|
4254
|
+
maxProviderP95Ms: override.maxProviderP95Ms ?? base.maxProviderP95Ms,
|
|
4255
|
+
profileDescriptions: {
|
|
4256
|
+
...base.profileDescriptions ?? {},
|
|
4257
|
+
...override.profileDescriptions ?? {}
|
|
4258
|
+
},
|
|
4259
|
+
profileLabels: {
|
|
4260
|
+
...base.profileLabels ?? {},
|
|
4261
|
+
...override.profileLabels ?? {}
|
|
4262
|
+
},
|
|
4263
|
+
sessionIds: override.sessionIds ?? base.sessionIds
|
|
4264
|
+
});
|
|
4265
|
+
var createVoiceRealCallProfileTraceCollector = (options) => {
|
|
4266
|
+
const capturedSessionIds = new Set(options.sessionIds ?? []);
|
|
4267
|
+
const capture = (event) => {
|
|
4268
|
+
if (realCallProfileTraceSignalTypes.has(event.type) && hasTraceProfileMetadata(event, options)) {
|
|
4269
|
+
capturedSessionIds.add(event.sessionId);
|
|
4270
|
+
}
|
|
4271
|
+
};
|
|
4272
|
+
return {
|
|
4273
|
+
append: async (event) => {
|
|
4274
|
+
const stored = await options.store.append(event);
|
|
4275
|
+
capture(stored);
|
|
4276
|
+
return stored;
|
|
4277
|
+
},
|
|
4278
|
+
buildHistoryReport: async (historyOptions = {}) => {
|
|
4279
|
+
const evidence = await buildRealCallProfileCollectorEvidence(options, capturedSessionIds, historyOptions.evidenceOptions);
|
|
4280
|
+
return buildVoiceRealCallProfileHistoryReport({
|
|
4281
|
+
...historyOptions,
|
|
4282
|
+
evidence
|
|
4283
|
+
});
|
|
4284
|
+
},
|
|
4285
|
+
get: (id) => options.store.get(id),
|
|
4286
|
+
list: (filter) => options.store.list(filter),
|
|
4287
|
+
listCapturedSessionIds: () => [...capturedSessionIds],
|
|
4288
|
+
listEvidence: (evidenceOptions) => buildRealCallProfileCollectorEvidence(options, capturedSessionIds, evidenceOptions),
|
|
4289
|
+
remove: async (id) => {
|
|
4290
|
+
await options.store.remove(id);
|
|
4291
|
+
}
|
|
4292
|
+
};
|
|
4293
|
+
};
|
|
4294
|
+
var buildRealCallProfileCollectorEvidence = async (baseOptions, capturedSessionIds, evidenceOptions) => {
|
|
4295
|
+
const merged = mergeRealCallProfileCollectorOptions(baseOptions, evidenceOptions);
|
|
4296
|
+
const requestedSessionIds = merged.sessionIds ?? [...capturedSessionIds];
|
|
4297
|
+
return buildVoiceRealCallProfileEvidenceFromTraceEvents(await baseOptions.store.list({ limit: merged.limit ?? 5000 }), {
|
|
4298
|
+
...merged,
|
|
4299
|
+
sessionIds: requestedSessionIds
|
|
4300
|
+
});
|
|
4301
|
+
};
|
|
4240
4302
|
var readProofTrendProviders = (reports) => aggregateProofTrendProviders(reports.flatMap((report) => report.summary.providers && report.summary.providers.length > 0 ? report.summary.providers : report.cycles.flatMap((cycle) => cycle.providers ?? [])));
|
|
4241
4303
|
var exceedsProofTrendBudget = (value, budget) => value !== undefined && (!Number.isFinite(value) || value > budget);
|
|
4242
4304
|
var readProofTrendProfileStatus = (profile, budgets) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -30,12 +30,12 @@ export { assertVoicePlatformCoverage, buildVoicePlatformCoverageSummary, createV
|
|
|
30
30
|
export { assertVoiceCompetitiveCoverage, buildVoiceCompetitiveCoverageReport, createVoiceCompetitiveCoverageRoutes, evaluateVoiceCompetitiveCoverage, renderVoiceCompetitiveCoverageHTML, renderVoiceCompetitiveCoverageMarkdown } from './competitiveCoverage';
|
|
31
31
|
export type { VoiceCompetitiveCoverageAssertionInput, VoiceCompetitiveCoverageAssertionReport, VoiceCompetitiveCoverageIssue, VoiceCompetitiveCoverageLevel, VoiceCompetitiveCoverageReport, VoiceCompetitiveCoverageReportInput, VoiceCompetitiveCoverageRoutesOptions, VoiceCompetitiveCoverageStatus, VoiceCompetitiveCoverageSummary, VoiceCompetitiveDepthLevel, VoiceCompetitiveEvidence, VoiceCompetitiveSurface } from './competitiveCoverage';
|
|
32
32
|
export type { VoicePlatformCoverageAssertionInput, VoicePlatformCoverageAssertionReport, VoicePlatformCoverageEvidence, VoicePlatformCoverageRoutesOptions, VoicePlatformCoverageStatus, VoicePlatformCoverageSummary, VoicePlatformCoverageSummaryInput, VoicePlatformCoverageSurface } from './platformCoverage';
|
|
33
|
-
export { assertVoiceProofTrendEvidence, buildEmptyVoiceProofTrendReport, buildVoiceProofTrendProfileSummaries, buildVoiceProofTrendRecommendationReport, buildVoiceProofTrendReportFromRealCallProfiles, buildVoiceProofTrendReport, buildVoiceRealCallProfileEvidenceFromTraceEvents, buildVoiceRealCallProfileDefaults, buildVoiceRealCallProfileHistoryReport, buildVoiceRealCallProfileReadinessCheck, buildVoiceRealCallProfileRecoveryJobHistoryCheck, buildVoiceRealCallProfileRecoveryActions, createVoiceInMemoryRealCallProfileRecoveryJobStore, createVoiceSQLiteRealCallProfileRecoveryJobStore, createVoiceProofTrendRecommendationRoutes, createVoiceProofTrendRoutes, createVoiceRealCallProfileHistoryRoutes, createVoiceRealCallProfileRecoveryActionRoutes, DEFAULT_VOICE_PROOF_TREND_PROFILE_DEFINITIONS, DEFAULT_VOICE_PROOF_TRENDS_MAX_AGE_MS, evaluateVoiceProofTrendEvidence, formatVoiceProofTrendAge, loadVoiceRealCallProfileEvidenceFromTraceStore, normalizeVoiceProofTrendReport, readVoiceProofTrendReportFile, renderVoiceProofTrendRecommendationHTML, renderVoiceProofTrendRecommendationMarkdown, renderVoiceRealCallProfileHistoryHTML, renderVoiceRealCallProfileHistoryMarkdown, resolveVoiceRealCallProfileProviderRoute } from './proofTrends';
|
|
33
|
+
export { assertVoiceProofTrendEvidence, buildEmptyVoiceProofTrendReport, buildVoiceProofTrendProfileSummaries, buildVoiceProofTrendRecommendationReport, buildVoiceProofTrendReportFromRealCallProfiles, buildVoiceProofTrendReport, buildVoiceRealCallProfileEvidenceFromTraceEvents, buildVoiceRealCallProfileDefaults, buildVoiceRealCallProfileHistoryReport, buildVoiceRealCallProfileReadinessCheck, buildVoiceRealCallProfileRecoveryJobHistoryCheck, buildVoiceRealCallProfileRecoveryActions, createVoiceInMemoryRealCallProfileRecoveryJobStore, createVoiceRealCallProfileTraceCollector, createVoiceSQLiteRealCallProfileRecoveryJobStore, createVoiceProofTrendRecommendationRoutes, createVoiceProofTrendRoutes, createVoiceRealCallProfileHistoryRoutes, createVoiceRealCallProfileRecoveryActionRoutes, DEFAULT_VOICE_PROOF_TREND_PROFILE_DEFINITIONS, DEFAULT_VOICE_PROOF_TRENDS_MAX_AGE_MS, evaluateVoiceProofTrendEvidence, formatVoiceProofTrendAge, loadVoiceRealCallProfileEvidenceFromTraceStore, normalizeVoiceProofTrendReport, readVoiceProofTrendReportFile, renderVoiceProofTrendRecommendationHTML, renderVoiceProofTrendRecommendationMarkdown, renderVoiceRealCallProfileHistoryHTML, renderVoiceRealCallProfileHistoryMarkdown, resolveVoiceRealCallProfileProviderRoute } from './proofTrends';
|
|
34
34
|
export { applyVoiceProfileSwitchGuard, buildVoiceProfileSwitchReadinessReport, buildVoiceProfileSwitchLiveDecisionReport, createVoiceProfileSwitchLiveDecisionRoutes, createVoiceProfileSwitchPolicyProofRoutes, createVoiceProfileSwitchReadinessRoutes, recommendVoiceProfileSwitch, renderVoiceProfileSwitchLiveDecisionHTML, renderVoiceProfileSwitchPolicyProofHTML, renderVoiceProfileSwitchReadinessHTML, runVoiceProfileSwitchPolicyProof } from './profileSwitchRecommendation';
|
|
35
35
|
export type { VoiceProfileSwitchGuardAction, VoiceProfileSwitchGuardDecision, VoiceProfileSwitchGuardMode, VoiceProfileSwitchGuardOptions, VoiceProfileSwitchObservedSignals, VoiceProfileSwitchLiveDecisionEvidence, VoiceProfileSwitchLiveDecisionReport, VoiceProfileSwitchLiveDecisionReportOptions, VoiceProfileSwitchLiveDecisionRoutesOptions, VoiceProfileSwitchLiveDecisionSession, VoiceProfileSwitchPolicyProofCase, VoiceProfileSwitchPolicyProofCaseResult, VoiceProfileSwitchPolicyProofOptions, VoiceProfileSwitchPolicyProofReport, VoiceProfileSwitchPolicyProofRoutesOptions, VoiceProfileSwitchReadinessIssue, VoiceProfileSwitchReadinessOptions, VoiceProfileSwitchReadinessReport, VoiceProfileSwitchReadinessRoutesOptions, VoiceProfileSwitchReadinessStatus, VoiceProfileSwitchRecommendation, VoiceProfileSwitchRecommendationOptions } from './profileSwitchRecommendation';
|
|
36
36
|
export { buildVoiceProviderDecisionTraceReport, createVoiceProviderDecisionTraceEvent, createVoiceProviderDecisionTraceRoutes, listVoiceProviderDecisionTraces, renderVoiceProviderDecisionTraceHTML, renderVoiceProviderDecisionTraceMarkdown } from './providerDecisionTraces';
|
|
37
37
|
export type { VoiceProviderDecisionStatus, VoiceProviderDecisionSurfaceReport, VoiceProviderDecisionTrace, VoiceProviderDecisionTraceInput, VoiceProviderDecisionTraceIssue, VoiceProviderDecisionTraceReport, VoiceProviderDecisionTraceReportOptions, VoiceProviderDecisionTraceRoutesOptions } from './providerDecisionTraces';
|
|
38
|
-
export type { VoiceProofTrendAssertionInput, VoiceProofTrendAssertionReport, VoiceProofTrendCycle, VoiceProofTrendProfileDefinition, VoiceProofTrendProfileRecommendation, VoiceProofTrendProfileSummaryOptions, VoiceProofTrendProfileSummary, VoiceProofTrendProviderRecommendation, VoiceProofTrendProviderSummary, VoiceProofTrendRecommendation, VoiceProofTrendRecommendationOptions, VoiceProofTrendRecommendationReport, VoiceProofTrendRecommendationRoutesOptions, VoiceProofTrendRecommendationStatus, VoiceProofTrendRecommendationSurface, VoiceProofTrendRealCallProfileEvidence, VoiceProofTrendRealCallProfileReportOptions, VoiceProofTrendReport, VoiceProofTrendReportInput, VoiceProofTrendRoutesOptions, VoiceProofTrendRuntimeChannelSummary, VoiceProofTrendStatus, VoiceProofTrendSummary, VoiceRealCallProfileDefault, VoiceRealCallProfileDefaultsOptions, VoiceRealCallProfileDefaultsReport, VoiceRealCallProfileHistoryOptions, VoiceRealCallProfileHistoryReport, VoiceRealCallProfileHistoryRoutesOptions, VoiceRealCallProfileProviderRouteOptions, VoiceRealCallProfileReadinessCheckOptions, VoiceRealCallProfileRecoveryActionOptions, VoiceRealCallProfileRecoveryAction, VoiceRealCallProfileRecoveryActionHandler, VoiceRealCallProfileRecoveryActionHandlerInput, VoiceRealCallProfileRecoveryActionId, VoiceRealCallProfileRecoveryJobHistoryCheckOptions, VoiceRealCallProfileRecoveryActionResult, VoiceRealCallProfileRecoveryActionRoutesOptions, VoiceRealCallProfileRecoveryJob, VoiceRealCallProfileRecoveryJobCreateInput, VoiceRealCallProfileRecoveryJobListOptions, VoiceRealCallProfileRecoveryJobStatus, VoiceRealCallProfileRecoveryJobStore, VoiceRealCallProfileRecoveryJobUpdate, VoiceSQLiteRealCallProfileRecoveryJobStoreOptions, VoiceRealCallProfileTraceEvidenceOptions, VoiceRealCallProfileTraceStoreEvidenceOptions } from './proofTrends';
|
|
38
|
+
export type { VoiceProofTrendAssertionInput, VoiceProofTrendAssertionReport, VoiceProofTrendCycle, VoiceProofTrendProfileDefinition, VoiceProofTrendProfileRecommendation, VoiceProofTrendProfileSummaryOptions, VoiceProofTrendProfileSummary, VoiceProofTrendProviderRecommendation, VoiceProofTrendProviderSummary, VoiceProofTrendRecommendation, VoiceProofTrendRecommendationOptions, VoiceProofTrendRecommendationReport, VoiceProofTrendRecommendationRoutesOptions, VoiceProofTrendRecommendationStatus, VoiceProofTrendRecommendationSurface, VoiceProofTrendRealCallProfileEvidence, VoiceProofTrendRealCallProfileReportOptions, VoiceProofTrendReport, VoiceProofTrendReportInput, VoiceProofTrendRoutesOptions, VoiceProofTrendRuntimeChannelSummary, VoiceProofTrendStatus, VoiceProofTrendSummary, VoiceRealCallProfileDefault, VoiceRealCallProfileDefaultsOptions, VoiceRealCallProfileDefaultsReport, VoiceRealCallProfileHistoryOptions, VoiceRealCallProfileHistoryReport, VoiceRealCallProfileHistoryRoutesOptions, VoiceRealCallProfileProviderRouteOptions, VoiceRealCallProfileReadinessCheckOptions, VoiceRealCallProfileRecoveryActionOptions, VoiceRealCallProfileRecoveryAction, VoiceRealCallProfileRecoveryActionHandler, VoiceRealCallProfileRecoveryActionHandlerInput, VoiceRealCallProfileRecoveryActionId, VoiceRealCallProfileRecoveryJobHistoryCheckOptions, VoiceRealCallProfileRecoveryActionResult, VoiceRealCallProfileRecoveryActionRoutesOptions, VoiceRealCallProfileRecoveryJob, VoiceRealCallProfileRecoveryJobCreateInput, VoiceRealCallProfileRecoveryJobListOptions, VoiceRealCallProfileRecoveryJobStatus, VoiceRealCallProfileRecoveryJobStore, VoiceRealCallProfileRecoveryJobUpdate, VoiceSQLiteRealCallProfileRecoveryJobStoreOptions, VoiceRealCallProfileTraceCollector, VoiceRealCallProfileTraceCollectorEvidenceOptions, VoiceRealCallProfileTraceCollectorOptions, VoiceRealCallProfileTraceEvidenceOptions, VoiceRealCallProfileTraceStoreEvidenceOptions } from './proofTrends';
|
|
39
39
|
export { assertVoiceSloCalibration, buildVoiceSloCalibrationReport, buildVoiceSloReadinessThresholdReport, createVoiceSloReadinessThresholdOptions, createVoiceSloReadinessThresholdRoutes, createVoiceSloThresholdProfile, createVoiceSloCalibrationRoutes, renderVoiceSloCalibrationMarkdown, renderVoiceSloReadinessThresholdHTML, renderVoiceSloReadinessThresholdMarkdown } from './sloCalibration';
|
|
40
40
|
export type { VoiceSloCalibrationMetricKey, VoiceSloCalibrationOptions, VoiceSloCalibrationReport, VoiceSloCalibrationRoutesOptions, VoiceSloCalibrationSample, VoiceSloCalibrationStatus, VoiceSloCalibrationThreshold, VoiceSloCalibrationThresholds, VoiceSloReadinessThresholdReport, VoiceSloReadinessThresholdReportOptions, VoiceSloReadinessThresholdOptions, VoiceSloReadinessThresholdRoutesOptions, VoiceSloThresholdProfile } from './sloCalibration';
|
|
41
41
|
export { assertVoiceLiveOpsControlEvidence, assertVoiceLiveOpsEvidence, buildVoiceLiveOpsControlState, createVoiceLiveOpsController, createVoiceLiveOpsRoutes, createVoiceMemoryLiveOpsControlStore, evaluateVoiceLiveOpsControlEvidence, evaluateVoiceLiveOpsEvidence, getVoiceLiveOpsControlStatus, VOICE_LIVE_OPS_ACTIONS } from './liveOps';
|
package/dist/index.js
CHANGED
|
@@ -15706,6 +15706,68 @@ var buildVoiceRealCallProfileEvidenceFromTraceEvents = (events, options = {}) =>
|
|
|
15706
15706
|
}).filter((evidence) => evidence !== undefined);
|
|
15707
15707
|
};
|
|
15708
15708
|
var loadVoiceRealCallProfileEvidenceFromTraceStore = async (options) => buildVoiceRealCallProfileEvidenceFromTraceEvents(await options.store.list({ limit: options.limit ?? 5000 }), options);
|
|
15709
|
+
var realCallProfileTraceSignalTypes = new Set([
|
|
15710
|
+
"client.barge_in",
|
|
15711
|
+
"client.browser_media",
|
|
15712
|
+
"client.live_latency",
|
|
15713
|
+
"client.telephony_media",
|
|
15714
|
+
"provider.decision",
|
|
15715
|
+
"session.error",
|
|
15716
|
+
"turn_latency.stage"
|
|
15717
|
+
]);
|
|
15718
|
+
var hasTraceProfileMetadata = (event, options) => Boolean(readTraceProfileId([event], options));
|
|
15719
|
+
var mergeRealCallProfileCollectorOptions = (base, override = {}) => ({
|
|
15720
|
+
defaultProfileId: override.defaultProfileId ?? base.defaultProfileId,
|
|
15721
|
+
defaultProfileLabel: override.defaultProfileLabel ?? base.defaultProfileLabel,
|
|
15722
|
+
limit: override.limit ?? base.limit,
|
|
15723
|
+
maxProviderP95Ms: override.maxProviderP95Ms ?? base.maxProviderP95Ms,
|
|
15724
|
+
profileDescriptions: {
|
|
15725
|
+
...base.profileDescriptions ?? {},
|
|
15726
|
+
...override.profileDescriptions ?? {}
|
|
15727
|
+
},
|
|
15728
|
+
profileLabels: {
|
|
15729
|
+
...base.profileLabels ?? {},
|
|
15730
|
+
...override.profileLabels ?? {}
|
|
15731
|
+
},
|
|
15732
|
+
sessionIds: override.sessionIds ?? base.sessionIds
|
|
15733
|
+
});
|
|
15734
|
+
var createVoiceRealCallProfileTraceCollector = (options) => {
|
|
15735
|
+
const capturedSessionIds = new Set(options.sessionIds ?? []);
|
|
15736
|
+
const capture = (event) => {
|
|
15737
|
+
if (realCallProfileTraceSignalTypes.has(event.type) && hasTraceProfileMetadata(event, options)) {
|
|
15738
|
+
capturedSessionIds.add(event.sessionId);
|
|
15739
|
+
}
|
|
15740
|
+
};
|
|
15741
|
+
return {
|
|
15742
|
+
append: async (event) => {
|
|
15743
|
+
const stored = await options.store.append(event);
|
|
15744
|
+
capture(stored);
|
|
15745
|
+
return stored;
|
|
15746
|
+
},
|
|
15747
|
+
buildHistoryReport: async (historyOptions = {}) => {
|
|
15748
|
+
const evidence = await buildRealCallProfileCollectorEvidence(options, capturedSessionIds, historyOptions.evidenceOptions);
|
|
15749
|
+
return buildVoiceRealCallProfileHistoryReport({
|
|
15750
|
+
...historyOptions,
|
|
15751
|
+
evidence
|
|
15752
|
+
});
|
|
15753
|
+
},
|
|
15754
|
+
get: (id) => options.store.get(id),
|
|
15755
|
+
list: (filter) => options.store.list(filter),
|
|
15756
|
+
listCapturedSessionIds: () => [...capturedSessionIds],
|
|
15757
|
+
listEvidence: (evidenceOptions) => buildRealCallProfileCollectorEvidence(options, capturedSessionIds, evidenceOptions),
|
|
15758
|
+
remove: async (id) => {
|
|
15759
|
+
await options.store.remove(id);
|
|
15760
|
+
}
|
|
15761
|
+
};
|
|
15762
|
+
};
|
|
15763
|
+
var buildRealCallProfileCollectorEvidence = async (baseOptions, capturedSessionIds, evidenceOptions) => {
|
|
15764
|
+
const merged = mergeRealCallProfileCollectorOptions(baseOptions, evidenceOptions);
|
|
15765
|
+
const requestedSessionIds = merged.sessionIds ?? [...capturedSessionIds];
|
|
15766
|
+
return buildVoiceRealCallProfileEvidenceFromTraceEvents(await baseOptions.store.list({ limit: merged.limit ?? 5000 }), {
|
|
15767
|
+
...merged,
|
|
15768
|
+
sessionIds: requestedSessionIds
|
|
15769
|
+
});
|
|
15770
|
+
};
|
|
15709
15771
|
var readProofTrendProviders = (reports) => aggregateProofTrendProviders(reports.flatMap((report) => report.summary.providers && report.summary.providers.length > 0 ? report.summary.providers : report.cycles.flatMap((cycle) => cycle.providers ?? [])));
|
|
15710
15772
|
var exceedsProofTrendBudget = (value, budget) => value !== undefined && (!Number.isFinite(value) || value > budget);
|
|
15711
15773
|
var readProofTrendProfileStatus = (profile, budgets) => {
|
|
@@ -39174,6 +39236,7 @@ export {
|
|
|
39174
39236
|
createVoiceRealtimeProviderContractRoutes,
|
|
39175
39237
|
createVoiceRealtimeProviderContractMatrixPreset,
|
|
39176
39238
|
createVoiceRealtimeChannelRoutes,
|
|
39239
|
+
createVoiceRealCallProfileTraceCollector,
|
|
39177
39240
|
createVoiceRealCallProfileRecoveryActionRoutes,
|
|
39178
39241
|
createVoiceRealCallProfileHistoryRoutes,
|
|
39179
39242
|
createVoiceReadinessProfile,
|
package/dist/proofTrends.d.ts
CHANGED
|
@@ -149,6 +149,19 @@ export type VoiceRealCallProfileTraceStoreEvidenceOptions = VoiceRealCallProfile
|
|
|
149
149
|
limit?: number;
|
|
150
150
|
store: VoiceTraceEventStore;
|
|
151
151
|
};
|
|
152
|
+
export type VoiceRealCallProfileTraceCollectorEvidenceOptions = VoiceRealCallProfileTraceEvidenceOptions & {
|
|
153
|
+
limit?: number;
|
|
154
|
+
};
|
|
155
|
+
export type VoiceRealCallProfileTraceCollectorOptions<TEvent extends StoredVoiceTraceEvent = StoredVoiceTraceEvent> = VoiceRealCallProfileTraceCollectorEvidenceOptions & {
|
|
156
|
+
store: VoiceTraceEventStore<TEvent>;
|
|
157
|
+
};
|
|
158
|
+
export type VoiceRealCallProfileTraceCollector<TEvent extends StoredVoiceTraceEvent = StoredVoiceTraceEvent> = VoiceTraceEventStore<TEvent> & {
|
|
159
|
+
buildHistoryReport: (options?: Omit<VoiceRealCallProfileHistoryOptions, 'evidence'> & {
|
|
160
|
+
evidenceOptions?: VoiceRealCallProfileTraceCollectorEvidenceOptions;
|
|
161
|
+
}) => Promise<VoiceRealCallProfileHistoryReport>;
|
|
162
|
+
listCapturedSessionIds: () => string[];
|
|
163
|
+
listEvidence: (options?: VoiceRealCallProfileTraceCollectorEvidenceOptions) => Promise<VoiceProofTrendRealCallProfileEvidence[]>;
|
|
164
|
+
};
|
|
152
165
|
export type VoiceProofTrendRealCallProfileReportOptions = VoiceProofTrendProfileSummaryOptions & {
|
|
153
166
|
baseUrl?: string;
|
|
154
167
|
evidence: readonly VoiceProofTrendRealCallProfileEvidence[];
|
|
@@ -477,6 +490,7 @@ export declare const readVoiceProofTrendReportFile: (path: string, options?: {
|
|
|
477
490
|
}) => Promise<VoiceProofTrendReport>;
|
|
478
491
|
export declare const buildVoiceRealCallProfileEvidenceFromTraceEvents: (events: readonly StoredVoiceTraceEvent[], options?: VoiceRealCallProfileTraceEvidenceOptions) => VoiceProofTrendRealCallProfileEvidence[];
|
|
479
492
|
export declare const loadVoiceRealCallProfileEvidenceFromTraceStore: (options: VoiceRealCallProfileTraceStoreEvidenceOptions) => Promise<VoiceProofTrendRealCallProfileEvidence[]>;
|
|
493
|
+
export declare const createVoiceRealCallProfileTraceCollector: <TEvent extends StoredVoiceTraceEvent = StoredVoiceTraceEvent>(options: VoiceRealCallProfileTraceCollectorOptions<TEvent>) => VoiceRealCallProfileTraceCollector<TEvent>;
|
|
480
494
|
export declare const buildVoiceProofTrendProfileSummaries: (input: VoiceProofTrendReport | readonly VoiceProofTrendReport[], options?: VoiceProofTrendProfileSummaryOptions) => VoiceProofTrendProfileSummary[];
|
|
481
495
|
export declare const buildVoiceProofTrendReportFromRealCallProfiles: (options: VoiceProofTrendRealCallProfileReportOptions) => VoiceProofTrendReport;
|
|
482
496
|
export declare const buildVoiceRealCallProfileDefaults: (input: VoiceRealCallProfileHistoryReport | VoiceProofTrendReport, options?: VoiceRealCallProfileDefaultsOptions) => VoiceRealCallProfileDefaultsReport;
|
package/dist/react/index.js
CHANGED
|
@@ -1824,6 +1824,68 @@ var buildVoiceRealCallProfileEvidenceFromTraceEvents = (events, options = {}) =>
|
|
|
1824
1824
|
}).filter((evidence) => evidence !== undefined);
|
|
1825
1825
|
};
|
|
1826
1826
|
var loadVoiceRealCallProfileEvidenceFromTraceStore = async (options) => buildVoiceRealCallProfileEvidenceFromTraceEvents(await options.store.list({ limit: options.limit ?? 5000 }), options);
|
|
1827
|
+
var realCallProfileTraceSignalTypes = new Set([
|
|
1828
|
+
"client.barge_in",
|
|
1829
|
+
"client.browser_media",
|
|
1830
|
+
"client.live_latency",
|
|
1831
|
+
"client.telephony_media",
|
|
1832
|
+
"provider.decision",
|
|
1833
|
+
"session.error",
|
|
1834
|
+
"turn_latency.stage"
|
|
1835
|
+
]);
|
|
1836
|
+
var hasTraceProfileMetadata = (event, options) => Boolean(readTraceProfileId([event], options));
|
|
1837
|
+
var mergeRealCallProfileCollectorOptions = (base, override = {}) => ({
|
|
1838
|
+
defaultProfileId: override.defaultProfileId ?? base.defaultProfileId,
|
|
1839
|
+
defaultProfileLabel: override.defaultProfileLabel ?? base.defaultProfileLabel,
|
|
1840
|
+
limit: override.limit ?? base.limit,
|
|
1841
|
+
maxProviderP95Ms: override.maxProviderP95Ms ?? base.maxProviderP95Ms,
|
|
1842
|
+
profileDescriptions: {
|
|
1843
|
+
...base.profileDescriptions ?? {},
|
|
1844
|
+
...override.profileDescriptions ?? {}
|
|
1845
|
+
},
|
|
1846
|
+
profileLabels: {
|
|
1847
|
+
...base.profileLabels ?? {},
|
|
1848
|
+
...override.profileLabels ?? {}
|
|
1849
|
+
},
|
|
1850
|
+
sessionIds: override.sessionIds ?? base.sessionIds
|
|
1851
|
+
});
|
|
1852
|
+
var createVoiceRealCallProfileTraceCollector = (options) => {
|
|
1853
|
+
const capturedSessionIds = new Set(options.sessionIds ?? []);
|
|
1854
|
+
const capture = (event) => {
|
|
1855
|
+
if (realCallProfileTraceSignalTypes.has(event.type) && hasTraceProfileMetadata(event, options)) {
|
|
1856
|
+
capturedSessionIds.add(event.sessionId);
|
|
1857
|
+
}
|
|
1858
|
+
};
|
|
1859
|
+
return {
|
|
1860
|
+
append: async (event) => {
|
|
1861
|
+
const stored = await options.store.append(event);
|
|
1862
|
+
capture(stored);
|
|
1863
|
+
return stored;
|
|
1864
|
+
},
|
|
1865
|
+
buildHistoryReport: async (historyOptions = {}) => {
|
|
1866
|
+
const evidence = await buildRealCallProfileCollectorEvidence(options, capturedSessionIds, historyOptions.evidenceOptions);
|
|
1867
|
+
return buildVoiceRealCallProfileHistoryReport({
|
|
1868
|
+
...historyOptions,
|
|
1869
|
+
evidence
|
|
1870
|
+
});
|
|
1871
|
+
},
|
|
1872
|
+
get: (id) => options.store.get(id),
|
|
1873
|
+
list: (filter) => options.store.list(filter),
|
|
1874
|
+
listCapturedSessionIds: () => [...capturedSessionIds],
|
|
1875
|
+
listEvidence: (evidenceOptions) => buildRealCallProfileCollectorEvidence(options, capturedSessionIds, evidenceOptions),
|
|
1876
|
+
remove: async (id) => {
|
|
1877
|
+
await options.store.remove(id);
|
|
1878
|
+
}
|
|
1879
|
+
};
|
|
1880
|
+
};
|
|
1881
|
+
var buildRealCallProfileCollectorEvidence = async (baseOptions, capturedSessionIds, evidenceOptions) => {
|
|
1882
|
+
const merged = mergeRealCallProfileCollectorOptions(baseOptions, evidenceOptions);
|
|
1883
|
+
const requestedSessionIds = merged.sessionIds ?? [...capturedSessionIds];
|
|
1884
|
+
return buildVoiceRealCallProfileEvidenceFromTraceEvents(await baseOptions.store.list({ limit: merged.limit ?? 5000 }), {
|
|
1885
|
+
...merged,
|
|
1886
|
+
sessionIds: requestedSessionIds
|
|
1887
|
+
});
|
|
1888
|
+
};
|
|
1827
1889
|
var readProofTrendProviders = (reports) => aggregateProofTrendProviders(reports.flatMap((report) => report.summary.providers && report.summary.providers.length > 0 ? report.summary.providers : report.cycles.flatMap((cycle) => cycle.providers ?? [])));
|
|
1828
1890
|
var exceedsProofTrendBudget = (value, budget) => value !== undefined && (!Number.isFinite(value) || value > budget);
|
|
1829
1891
|
var readProofTrendProfileStatus = (profile, budgets) => {
|
package/dist/vue/index.js
CHANGED
|
@@ -1745,6 +1745,68 @@ var buildVoiceRealCallProfileEvidenceFromTraceEvents = (events, options = {}) =>
|
|
|
1745
1745
|
}).filter((evidence) => evidence !== undefined);
|
|
1746
1746
|
};
|
|
1747
1747
|
var loadVoiceRealCallProfileEvidenceFromTraceStore = async (options) => buildVoiceRealCallProfileEvidenceFromTraceEvents(await options.store.list({ limit: options.limit ?? 5000 }), options);
|
|
1748
|
+
var realCallProfileTraceSignalTypes = new Set([
|
|
1749
|
+
"client.barge_in",
|
|
1750
|
+
"client.browser_media",
|
|
1751
|
+
"client.live_latency",
|
|
1752
|
+
"client.telephony_media",
|
|
1753
|
+
"provider.decision",
|
|
1754
|
+
"session.error",
|
|
1755
|
+
"turn_latency.stage"
|
|
1756
|
+
]);
|
|
1757
|
+
var hasTraceProfileMetadata = (event, options) => Boolean(readTraceProfileId([event], options));
|
|
1758
|
+
var mergeRealCallProfileCollectorOptions = (base, override = {}) => ({
|
|
1759
|
+
defaultProfileId: override.defaultProfileId ?? base.defaultProfileId,
|
|
1760
|
+
defaultProfileLabel: override.defaultProfileLabel ?? base.defaultProfileLabel,
|
|
1761
|
+
limit: override.limit ?? base.limit,
|
|
1762
|
+
maxProviderP95Ms: override.maxProviderP95Ms ?? base.maxProviderP95Ms,
|
|
1763
|
+
profileDescriptions: {
|
|
1764
|
+
...base.profileDescriptions ?? {},
|
|
1765
|
+
...override.profileDescriptions ?? {}
|
|
1766
|
+
},
|
|
1767
|
+
profileLabels: {
|
|
1768
|
+
...base.profileLabels ?? {},
|
|
1769
|
+
...override.profileLabels ?? {}
|
|
1770
|
+
},
|
|
1771
|
+
sessionIds: override.sessionIds ?? base.sessionIds
|
|
1772
|
+
});
|
|
1773
|
+
var createVoiceRealCallProfileTraceCollector = (options) => {
|
|
1774
|
+
const capturedSessionIds = new Set(options.sessionIds ?? []);
|
|
1775
|
+
const capture = (event) => {
|
|
1776
|
+
if (realCallProfileTraceSignalTypes.has(event.type) && hasTraceProfileMetadata(event, options)) {
|
|
1777
|
+
capturedSessionIds.add(event.sessionId);
|
|
1778
|
+
}
|
|
1779
|
+
};
|
|
1780
|
+
return {
|
|
1781
|
+
append: async (event) => {
|
|
1782
|
+
const stored = await options.store.append(event);
|
|
1783
|
+
capture(stored);
|
|
1784
|
+
return stored;
|
|
1785
|
+
},
|
|
1786
|
+
buildHistoryReport: async (historyOptions = {}) => {
|
|
1787
|
+
const evidence = await buildRealCallProfileCollectorEvidence(options, capturedSessionIds, historyOptions.evidenceOptions);
|
|
1788
|
+
return buildVoiceRealCallProfileHistoryReport({
|
|
1789
|
+
...historyOptions,
|
|
1790
|
+
evidence
|
|
1791
|
+
});
|
|
1792
|
+
},
|
|
1793
|
+
get: (id) => options.store.get(id),
|
|
1794
|
+
list: (filter) => options.store.list(filter),
|
|
1795
|
+
listCapturedSessionIds: () => [...capturedSessionIds],
|
|
1796
|
+
listEvidence: (evidenceOptions) => buildRealCallProfileCollectorEvidence(options, capturedSessionIds, evidenceOptions),
|
|
1797
|
+
remove: async (id) => {
|
|
1798
|
+
await options.store.remove(id);
|
|
1799
|
+
}
|
|
1800
|
+
};
|
|
1801
|
+
};
|
|
1802
|
+
var buildRealCallProfileCollectorEvidence = async (baseOptions, capturedSessionIds, evidenceOptions) => {
|
|
1803
|
+
const merged = mergeRealCallProfileCollectorOptions(baseOptions, evidenceOptions);
|
|
1804
|
+
const requestedSessionIds = merged.sessionIds ?? [...capturedSessionIds];
|
|
1805
|
+
return buildVoiceRealCallProfileEvidenceFromTraceEvents(await baseOptions.store.list({ limit: merged.limit ?? 5000 }), {
|
|
1806
|
+
...merged,
|
|
1807
|
+
sessionIds: requestedSessionIds
|
|
1808
|
+
});
|
|
1809
|
+
};
|
|
1748
1810
|
var readProofTrendProviders = (reports) => aggregateProofTrendProviders(reports.flatMap((report) => report.summary.providers && report.summary.providers.length > 0 ? report.summary.providers : report.cycles.flatMap((cycle) => cycle.providers ?? [])));
|
|
1749
1811
|
var exceedsProofTrendBudget = (value, budget) => value !== undefined && (!Number.isFinite(value) || value > budget);
|
|
1750
1812
|
var readProofTrendProfileStatus = (profile, budgets) => {
|