@absolutejs/voice 0.0.22-beta.390 → 0.0.22-beta.392
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -0
- package/dist/index.js +35 -0
- package/dist/providerRouterTraces.d.ts +35 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export { applyVoiceProfileSwitchGuard, buildVoiceProfileSwitchReadinessReport, b
|
|
|
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 { appendVoiceIOProviderRouterTraceEvent, appendVoiceProviderRouterTraceEvent, buildVoiceIOProviderRouterTraceEvent, buildVoiceProviderRouterTraceEvent } from './providerRouterTraces';
|
|
39
|
+
export type { VoiceIOProviderRouterTraceAppendOptions, VoiceIOProviderRouterTraceEventOptions, VoiceProviderRouterTraceAppendOptions, VoiceProviderRouterTraceEventOptions } from './providerRouterTraces';
|
|
38
40
|
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, VoiceRealCallProfileRecoveryLoopAction, VoiceRealCallProfileRecoveryLoopJob, VoiceRealCallProfileRecoveryLoopJobResult, VoiceRealCallProfileRecoveryLoopOptions, VoiceRealCallProfileRecoveryLoopReport, VoiceRealCallProfileRecoveryLoopStartFailure, VoiceRealCallProfileRecoveryEvidenceOptions, VoiceRealCallProfileRecoveryEvidenceProvider, VoiceRealCallProfileRecoveryEvidenceProviderRole, VoiceRealCallProfileRecoveryEvidenceResult, VoiceSQLiteRealCallProfileRecoveryJobStoreOptions, VoiceRealCallProfileTraceCollector, VoiceRealCallProfileTraceCollectorEvidenceOptions, VoiceRealCallProfileTraceCollectorOptions, VoiceRealCallProfileTraceEvidenceOptions, VoiceRealCallProfileTraceStoreEvidenceOptions } from './proofTrends';
|
|
39
41
|
export { assertVoiceSloCalibration, buildVoiceSloCalibrationReport, buildVoiceSloReadinessThresholdReport, createVoiceSloReadinessThresholdOptions, createVoiceSloReadinessThresholdRoutes, createVoiceSloThresholdProfile, createVoiceSloCalibrationRoutes, renderVoiceSloCalibrationMarkdown, renderVoiceSloReadinessThresholdHTML, renderVoiceSloReadinessThresholdMarkdown } from './sloCalibration';
|
|
40
42
|
export type { VoiceSloCalibrationMetricKey, VoiceSloCalibrationOptions, VoiceSloCalibrationReport, VoiceSloCalibrationRoutesOptions, VoiceSloCalibrationSample, VoiceSloCalibrationStatus, VoiceSloCalibrationThreshold, VoiceSloCalibrationThresholds, VoiceSloReadinessThresholdReport, VoiceSloReadinessThresholdReportOptions, VoiceSloReadinessThresholdOptions, VoiceSloReadinessThresholdRoutesOptions, VoiceSloThresholdProfile } from './sloCalibration';
|
package/dist/index.js
CHANGED
|
@@ -18304,6 +18304,37 @@ var formatVoiceProofTrendAge = (ageMs) => {
|
|
|
18304
18304
|
const days = Math.floor(hours / 24);
|
|
18305
18305
|
return `${days}d ${hours % 24}h`;
|
|
18306
18306
|
};
|
|
18307
|
+
// src/providerRouterTraces.ts
|
|
18308
|
+
var buildVoiceProviderRouterTraceEvent = (options) => ({
|
|
18309
|
+
at: options.at ?? options.event.at,
|
|
18310
|
+
id: options.id ?? `${options.sessionId}:${options.turnId ?? "session"}:${options.event.provider}:${options.event.status}:${String(options.at ?? options.event.at)}`,
|
|
18311
|
+
metadata: options.metadata,
|
|
18312
|
+
payload: {
|
|
18313
|
+
...options.event,
|
|
18314
|
+
...options.payload ?? {},
|
|
18315
|
+
providerStatus: options.event.status
|
|
18316
|
+
},
|
|
18317
|
+
scenarioId: options.scenarioId,
|
|
18318
|
+
sessionId: options.sessionId,
|
|
18319
|
+
turnId: options.turnId,
|
|
18320
|
+
type: options.type ?? "session.error"
|
|
18321
|
+
});
|
|
18322
|
+
var appendVoiceProviderRouterTraceEvent = async (options) => options.store.append(buildVoiceProviderRouterTraceEvent(options));
|
|
18323
|
+
var buildVoiceIOProviderRouterTraceEvent = (options) => ({
|
|
18324
|
+
at: options.at ?? options.event.at,
|
|
18325
|
+
id: options.id ?? `${options.sessionId}:${options.event.kind}:${options.event.operation}:${options.event.provider}:${options.event.status}:${String(options.at ?? options.event.at)}`,
|
|
18326
|
+
metadata: options.metadata,
|
|
18327
|
+
payload: {
|
|
18328
|
+
...options.event,
|
|
18329
|
+
...options.payload ?? {},
|
|
18330
|
+
providerStatus: options.event.status
|
|
18331
|
+
},
|
|
18332
|
+
scenarioId: options.scenarioId,
|
|
18333
|
+
sessionId: options.sessionId,
|
|
18334
|
+
turnId: options.turnId,
|
|
18335
|
+
type: options.type ?? "session.error"
|
|
18336
|
+
});
|
|
18337
|
+
var appendVoiceIOProviderRouterTraceEvent = async (options) => options.store.append(buildVoiceIOProviderRouterTraceEvent(options));
|
|
18307
18338
|
// src/sloCalibration.ts
|
|
18308
18339
|
import { Elysia as Elysia25 } from "elysia";
|
|
18309
18340
|
var DEFAULT_HEADROOM_MULTIPLIER = 1.5;
|
|
@@ -39800,6 +39831,7 @@ export {
|
|
|
39800
39831
|
buildVoiceRealCallProfileDefaults,
|
|
39801
39832
|
buildVoiceReadinessRecoveryActions,
|
|
39802
39833
|
buildVoiceProviderSloReport,
|
|
39834
|
+
buildVoiceProviderRouterTraceEvent,
|
|
39803
39835
|
buildVoiceProviderOrchestrationReport,
|
|
39804
39836
|
buildVoiceProviderDecisionTraceReport,
|
|
39805
39837
|
buildVoiceProviderContractMatrix,
|
|
@@ -39829,6 +39861,7 @@ export {
|
|
|
39829
39861
|
buildVoiceLiveOpsControlState,
|
|
39830
39862
|
buildVoiceLatencySLOGate,
|
|
39831
39863
|
buildVoiceIncidentBundle,
|
|
39864
|
+
buildVoiceIOProviderRouterTraceEvent,
|
|
39832
39865
|
buildVoiceGuardrailReport,
|
|
39833
39866
|
buildVoiceFailureReplay,
|
|
39834
39867
|
buildVoiceDiagnosticsMarkdown,
|
|
@@ -39890,6 +39923,8 @@ export {
|
|
|
39890
39923
|
applyRiskTieredPhraseHintCorrections,
|
|
39891
39924
|
applyPhraseHintCorrections,
|
|
39892
39925
|
appendVoiceRealCallProfileRecoveryEvidence,
|
|
39926
|
+
appendVoiceProviderRouterTraceEvent,
|
|
39927
|
+
appendVoiceIOProviderRouterTraceEvent,
|
|
39893
39928
|
acknowledgeVoiceMonitorIssue,
|
|
39894
39929
|
VOICE_LIVE_OPS_ACTIONS,
|
|
39895
39930
|
TURN_PROFILE_DEFAULTS,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { VoiceProviderRouterEvent } from './modelAdapters';
|
|
2
|
+
import type { VoiceIOProviderRouterEvent } from './providerAdapters';
|
|
3
|
+
import type { StoredVoiceTraceEvent, VoiceTraceEvent, VoiceTraceEventStore } from './trace';
|
|
4
|
+
export type VoiceProviderRouterTraceEventOptions<TProvider extends string = string> = {
|
|
5
|
+
at?: number;
|
|
6
|
+
event: VoiceProviderRouterEvent<TProvider>;
|
|
7
|
+
id?: string;
|
|
8
|
+
metadata?: Record<string, unknown>;
|
|
9
|
+
payload?: Record<string, unknown>;
|
|
10
|
+
scenarioId?: string;
|
|
11
|
+
sessionId: string;
|
|
12
|
+
turnId?: string;
|
|
13
|
+
type?: VoiceTraceEvent['type'];
|
|
14
|
+
};
|
|
15
|
+
export type VoiceIOProviderRouterTraceEventOptions<TProvider extends string = string> = {
|
|
16
|
+
at?: number;
|
|
17
|
+
event: VoiceIOProviderRouterEvent<TProvider>;
|
|
18
|
+
id?: string;
|
|
19
|
+
metadata?: Record<string, unknown>;
|
|
20
|
+
payload?: Record<string, unknown>;
|
|
21
|
+
scenarioId?: string;
|
|
22
|
+
sessionId: string;
|
|
23
|
+
turnId?: string;
|
|
24
|
+
type?: VoiceTraceEvent['type'];
|
|
25
|
+
};
|
|
26
|
+
export type VoiceProviderRouterTraceAppendOptions<TEvent extends StoredVoiceTraceEvent = StoredVoiceTraceEvent, TProvider extends string = string> = VoiceProviderRouterTraceEventOptions<TProvider> & {
|
|
27
|
+
store: Pick<VoiceTraceEventStore<TEvent>, 'append'>;
|
|
28
|
+
};
|
|
29
|
+
export type VoiceIOProviderRouterTraceAppendOptions<TEvent extends StoredVoiceTraceEvent = StoredVoiceTraceEvent, TProvider extends string = string> = VoiceIOProviderRouterTraceEventOptions<TProvider> & {
|
|
30
|
+
store: Pick<VoiceTraceEventStore<TEvent>, 'append'>;
|
|
31
|
+
};
|
|
32
|
+
export declare const buildVoiceProviderRouterTraceEvent: <TProvider extends string = string>(options: VoiceProviderRouterTraceEventOptions<TProvider>) => StoredVoiceTraceEvent;
|
|
33
|
+
export declare const appendVoiceProviderRouterTraceEvent: <TEvent extends StoredVoiceTraceEvent = StoredVoiceTraceEvent, TProvider extends string = string>(options: VoiceProviderRouterTraceAppendOptions<TEvent, TProvider>) => Promise<TEvent>;
|
|
34
|
+
export declare const buildVoiceIOProviderRouterTraceEvent: <TProvider extends string = string>(options: VoiceIOProviderRouterTraceEventOptions<TProvider>) => StoredVoiceTraceEvent;
|
|
35
|
+
export declare const appendVoiceIOProviderRouterTraceEvent: <TEvent extends StoredVoiceTraceEvent = StoredVoiceTraceEvent, TProvider extends string = string>(options: VoiceIOProviderRouterTraceAppendOptions<TEvent, TProvider>) => Promise<TEvent>;
|