@absolutejs/voice 0.0.22-beta.384 → 0.0.22-beta.386
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 +4340 -3122
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2730 -2503
- package/dist/proofTrends.d.ts +79 -2
- package/dist/react/index.js +2147 -172
- package/dist/vue/index.js +2096 -121
- package/package.json +1 -1
package/dist/proofTrends.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Elysia } from 'elysia';
|
|
2
2
|
import type { Database } from 'bun:sqlite';
|
|
3
|
-
import
|
|
4
|
-
import type {
|
|
3
|
+
import { type VoiceProviderDecisionStatus } from './providerDecisionTraces';
|
|
4
|
+
import type { VoiceProductionReadinessAction, VoiceProductionReadinessCheck, VoiceReadinessRecoveryAction } from './productionReadiness';
|
|
5
|
+
import { StoredVoiceTraceEvent, VoiceTraceEventStore } from './trace';
|
|
5
6
|
export type VoiceProofTrendStatus = 'empty' | 'fail' | 'pass' | 'stale';
|
|
6
7
|
export type VoiceProofTrendSummary = {
|
|
7
8
|
cycles?: number;
|
|
@@ -469,6 +470,80 @@ export type VoiceRealCallProfileRecoveryActionRoutesOptions = VoiceRealCallProfi
|
|
|
469
470
|
handlers?: Partial<Record<VoiceRealCallProfileRecoveryActionId, VoiceRealCallProfileRecoveryActionHandler>>;
|
|
470
471
|
jobStore?: VoiceRealCallProfileRecoveryJobStore;
|
|
471
472
|
};
|
|
473
|
+
export type VoiceRealCallProfileRecoveryLoopAction = Partial<VoiceReadinessRecoveryAction> & Partial<VoiceRealCallProfileRecoveryAction> & {
|
|
474
|
+
href?: string;
|
|
475
|
+
method?: string;
|
|
476
|
+
};
|
|
477
|
+
export type VoiceRealCallProfileRecoveryLoopJob = Partial<VoiceRealCallProfileRecoveryJob> & {
|
|
478
|
+
error?: string;
|
|
479
|
+
id?: string;
|
|
480
|
+
status?: string;
|
|
481
|
+
};
|
|
482
|
+
export type VoiceRealCallProfileRecoveryLoopJobResult = {
|
|
483
|
+
action: string;
|
|
484
|
+
jobId?: string;
|
|
485
|
+
result: VoiceRealCallProfileRecoveryLoopJob;
|
|
486
|
+
};
|
|
487
|
+
export type VoiceRealCallProfileRecoveryLoopStartFailure = {
|
|
488
|
+
action: string;
|
|
489
|
+
error: string;
|
|
490
|
+
};
|
|
491
|
+
export type VoiceRealCallProfileRecoveryLoopReport = {
|
|
492
|
+
actionCount: number;
|
|
493
|
+
actions: VoiceRealCallProfileRecoveryLoopAction[];
|
|
494
|
+
jobs: VoiceRealCallProfileRecoveryLoopJobResult[];
|
|
495
|
+
ok: boolean;
|
|
496
|
+
realCallProfileGate: VoiceProductionReadinessCheck | null;
|
|
497
|
+
startFailures: VoiceRealCallProfileRecoveryLoopStartFailure[];
|
|
498
|
+
};
|
|
499
|
+
export type VoiceRealCallProfileRecoveryLoopOptions = {
|
|
500
|
+
actionFilter?: (action: VoiceRealCallProfileRecoveryLoopAction) => boolean;
|
|
501
|
+
baseUrl: string;
|
|
502
|
+
fetch?: typeof fetch;
|
|
503
|
+
jobHref?: string | ((jobId: string) => string);
|
|
504
|
+
jobPollMs?: number;
|
|
505
|
+
jobTimeoutMs?: number;
|
|
506
|
+
logger?: Pick<Console, 'log'>;
|
|
507
|
+
readinessCheckLabel?: string;
|
|
508
|
+
readinessHref?: string;
|
|
509
|
+
recoveryActionsHref?: string;
|
|
510
|
+
refreshHref?: false | string;
|
|
511
|
+
requestTimeoutMs?: number;
|
|
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
|
+
};
|
|
472
547
|
export declare const DEFAULT_VOICE_PROOF_TRENDS_MAX_AGE_MS: number;
|
|
473
548
|
export declare const DEFAULT_VOICE_PROOF_TREND_PROFILE_DEFINITIONS: ({
|
|
474
549
|
description: string;
|
|
@@ -503,6 +578,8 @@ export declare const createVoiceRealCallProfileTraceCollector: <TEvent extends S
|
|
|
503
578
|
export declare const buildVoiceProofTrendProfileSummaries: (input: VoiceProofTrendReport | readonly VoiceProofTrendReport[], options?: VoiceProofTrendProfileSummaryOptions) => VoiceProofTrendProfileSummary[];
|
|
504
579
|
export declare const buildVoiceProofTrendReportFromRealCallProfiles: (options: VoiceProofTrendRealCallProfileReportOptions) => VoiceProofTrendReport;
|
|
505
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>>;
|
|
582
|
+
export declare const runVoiceRealCallProfileRecoveryLoop: (options: VoiceRealCallProfileRecoveryLoopOptions) => Promise<VoiceRealCallProfileRecoveryLoopReport>;
|
|
506
583
|
export declare const buildVoiceRealCallProfileRecoveryActions: (report: VoiceRealCallProfileHistoryReport, options?: VoiceRealCallProfileRecoveryActionOptions) => VoiceRealCallProfileRecoveryAction[];
|
|
507
584
|
export declare const createVoiceInMemoryRealCallProfileRecoveryJobStore: (options?: {
|
|
508
585
|
idPrefix?: string;
|