@absolutejs/voice 0.0.22-beta.385 → 0.0.22-beta.387

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.
@@ -1,7 +1,8 @@
1
1
  import { Elysia } from 'elysia';
2
2
  import type { Database } from 'bun:sqlite';
3
+ import { type VoiceProviderDecisionStatus } from './providerDecisionTraces';
3
4
  import type { VoiceProductionReadinessAction, VoiceProductionReadinessCheck, VoiceReadinessRecoveryAction } from './productionReadiness';
4
- import type { StoredVoiceTraceEvent, VoiceTraceEventStore } from './trace';
5
+ import { StoredVoiceTraceEvent, VoiceTraceEventStore } from './trace';
5
6
  export type VoiceProofTrendStatus = 'empty' | 'fail' | 'pass' | 'stale';
6
7
  export type VoiceProofTrendSummary = {
7
8
  cycles?: number;
@@ -509,6 +510,40 @@ export type VoiceRealCallProfileRecoveryLoopOptions = {
509
510
  refreshHref?: false | string;
510
511
  requestTimeoutMs?: number;
511
512
  };
513
+ export type VoiceRealCallProfileRecoveryEvidenceProviderRole = 'llm' | 'stt' | 'tts';
514
+ export type VoiceRealCallProfileRecoveryEvidenceProvider = string | {
515
+ elapsedMs?: number;
516
+ provider: string;
517
+ reason?: string;
518
+ selectedProvider?: string;
519
+ status?: VoiceProviderDecisionStatus;
520
+ surface?: string;
521
+ };
522
+ export type VoiceRealCallProfileRecoveryEvidenceOptions<TEvent extends StoredVoiceTraceEvent = StoredVoiceTraceEvent> = {
523
+ at?: number;
524
+ browser?: false | {
525
+ firstAudioLatencyMs?: number;
526
+ messageCount?: number;
527
+ openSockets?: number;
528
+ receivedBytes?: number;
529
+ sentBytes?: number;
530
+ status?: string;
531
+ };
532
+ live?: false | {
533
+ latencyMs?: number;
534
+ status?: string;
535
+ };
536
+ metadata?: Record<string, unknown>;
537
+ profileId: string;
538
+ providers?: Partial<Record<VoiceRealCallProfileRecoveryEvidenceProviderRole, VoiceRealCallProfileRecoveryEvidenceProvider>>;
539
+ scenarioId?: string;
540
+ sessionId?: string;
541
+ store: Pick<VoiceTraceEventStore<TEvent>, 'append'>;
542
+ };
543
+ export type VoiceRealCallProfileRecoveryEvidenceResult<TEvent extends StoredVoiceTraceEvent = StoredVoiceTraceEvent> = {
544
+ events: TEvent[];
545
+ sessionId: string;
546
+ };
512
547
  export declare const DEFAULT_VOICE_PROOF_TRENDS_MAX_AGE_MS: number;
513
548
  export declare const DEFAULT_VOICE_PROOF_TREND_PROFILE_DEFINITIONS: ({
514
549
  description: string;
@@ -543,6 +578,7 @@ export declare const createVoiceRealCallProfileTraceCollector: <TEvent extends S
543
578
  export declare const buildVoiceProofTrendProfileSummaries: (input: VoiceProofTrendReport | readonly VoiceProofTrendReport[], options?: VoiceProofTrendProfileSummaryOptions) => VoiceProofTrendProfileSummary[];
544
579
  export declare const buildVoiceProofTrendReportFromRealCallProfiles: (options: VoiceProofTrendRealCallProfileReportOptions) => VoiceProofTrendReport;
545
580
  export declare const buildVoiceRealCallProfileDefaults: (input: VoiceRealCallProfileHistoryReport | VoiceProofTrendReport, options?: VoiceRealCallProfileDefaultsOptions) => VoiceRealCallProfileDefaultsReport;
581
+ export declare const appendVoiceRealCallProfileRecoveryEvidence: <TEvent extends StoredVoiceTraceEvent = StoredVoiceTraceEvent>(options: VoiceRealCallProfileRecoveryEvidenceOptions<TEvent>) => Promise<VoiceRealCallProfileRecoveryEvidenceResult<TEvent>>;
546
582
  export declare const runVoiceRealCallProfileRecoveryLoop: (options: VoiceRealCallProfileRecoveryLoopOptions) => Promise<VoiceRealCallProfileRecoveryLoopReport>;
547
583
  export declare const buildVoiceRealCallProfileRecoveryActions: (report: VoiceRealCallProfileHistoryReport, options?: VoiceRealCallProfileRecoveryActionOptions) => VoiceRealCallProfileRecoveryAction[];
548
584
  export declare const createVoiceInMemoryRealCallProfileRecoveryJobStore: (options?: {