@absolutejs/voice 0.0.22-beta.105 → 0.0.22-beta.106
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/README.md +36 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +615 -515
- package/dist/simulationSuite.d.ts +105 -0
- package/package.json +1 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { Elysia } from 'elysia';
|
|
2
|
+
import { type VoiceEvalReport, type VoiceEvalRoutesOptions, type VoiceScenarioEvalDefinition, type VoiceScenarioEvalReport, type VoiceScenarioFixture, type VoiceScenarioFixtureEvalReport, type VoiceScenarioFixtureStore } from './evalRoutes';
|
|
3
|
+
import { type VoiceOutcomeContractDefinition, type VoiceOutcomeContractOptions, type VoiceOutcomeContractSuiteReport } from './outcomeContract';
|
|
4
|
+
import { type VoiceToolContractDefinition, type VoiceToolContractSuiteReport } from './toolContract';
|
|
5
|
+
import type { VoiceQualityThresholds } from './qualityRoutes';
|
|
6
|
+
import type { VoiceTraceEventStore } from './trace';
|
|
7
|
+
import type { VoiceSessionRecord } from './types';
|
|
8
|
+
export type VoiceSimulationSuiteStatus = 'pass' | 'fail';
|
|
9
|
+
export type VoiceSimulationSuiteReport = {
|
|
10
|
+
checkedAt: number;
|
|
11
|
+
failed: number;
|
|
12
|
+
fixtures?: VoiceScenarioFixtureEvalReport;
|
|
13
|
+
outcomes?: VoiceOutcomeContractSuiteReport;
|
|
14
|
+
passed: number;
|
|
15
|
+
scenarios?: VoiceScenarioEvalReport;
|
|
16
|
+
sessions?: VoiceEvalReport;
|
|
17
|
+
status: VoiceSimulationSuiteStatus;
|
|
18
|
+
summary: {
|
|
19
|
+
fixtures?: VoiceSimulationSuiteSectionSummary;
|
|
20
|
+
outcomes?: VoiceSimulationSuiteSectionSummary;
|
|
21
|
+
scenarios?: VoiceSimulationSuiteSectionSummary;
|
|
22
|
+
sessions?: VoiceSimulationSuiteSectionSummary;
|
|
23
|
+
tools?: VoiceSimulationSuiteSectionSummary;
|
|
24
|
+
};
|
|
25
|
+
tools?: VoiceToolContractSuiteReport;
|
|
26
|
+
total: number;
|
|
27
|
+
};
|
|
28
|
+
export type VoiceSimulationSuiteSectionSummary = {
|
|
29
|
+
failed: number;
|
|
30
|
+
passed: number;
|
|
31
|
+
status: VoiceSimulationSuiteStatus;
|
|
32
|
+
total: number;
|
|
33
|
+
};
|
|
34
|
+
export type VoiceSimulationSuiteOptions<TSession extends VoiceSessionRecord = VoiceSessionRecord> = {
|
|
35
|
+
fixtures?: VoiceScenarioFixture[];
|
|
36
|
+
fixtureStore?: VoiceScenarioFixtureStore;
|
|
37
|
+
include?: {
|
|
38
|
+
fixtures?: boolean;
|
|
39
|
+
outcomes?: boolean;
|
|
40
|
+
scenarios?: boolean;
|
|
41
|
+
sessions?: boolean;
|
|
42
|
+
tools?: boolean;
|
|
43
|
+
};
|
|
44
|
+
limit?: number;
|
|
45
|
+
outcomes?: Omit<VoiceOutcomeContractOptions<TSession>, 'contracts'> & {
|
|
46
|
+
contracts: VoiceOutcomeContractDefinition[];
|
|
47
|
+
};
|
|
48
|
+
scenarios?: VoiceScenarioEvalDefinition[];
|
|
49
|
+
store?: VoiceTraceEventStore;
|
|
50
|
+
thresholds?: VoiceQualityThresholds;
|
|
51
|
+
tools?: VoiceToolContractDefinition[];
|
|
52
|
+
};
|
|
53
|
+
export type VoiceSimulationSuiteRoutesOptions<TSession extends VoiceSessionRecord = VoiceSessionRecord> = VoiceSimulationSuiteOptions<TSession> & {
|
|
54
|
+
headers?: HeadersInit;
|
|
55
|
+
htmlPath?: false | string;
|
|
56
|
+
name?: string;
|
|
57
|
+
path?: string;
|
|
58
|
+
render?: (report: VoiceSimulationSuiteReport) => string | Promise<string>;
|
|
59
|
+
title?: string;
|
|
60
|
+
};
|
|
61
|
+
export declare const runVoiceSimulationSuite: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(options: VoiceSimulationSuiteOptions<TSession>) => Promise<VoiceSimulationSuiteReport>;
|
|
62
|
+
export declare const renderVoiceSimulationSuiteHTML: (report: VoiceSimulationSuiteReport, options?: {
|
|
63
|
+
title?: string;
|
|
64
|
+
}) => string;
|
|
65
|
+
export declare const createVoiceSimulationSuiteRoutes: <TSession extends VoiceSessionRecord = VoiceSessionRecord>(options: VoiceSimulationSuiteRoutesOptions<TSession>) => Elysia<"", {
|
|
66
|
+
decorator: {};
|
|
67
|
+
store: {};
|
|
68
|
+
derive: {};
|
|
69
|
+
resolve: {};
|
|
70
|
+
}, {
|
|
71
|
+
typebox: {};
|
|
72
|
+
error: {};
|
|
73
|
+
}, {
|
|
74
|
+
schema: {};
|
|
75
|
+
standaloneSchema: {};
|
|
76
|
+
macro: {};
|
|
77
|
+
macroFn: {};
|
|
78
|
+
parser: {};
|
|
79
|
+
response: {};
|
|
80
|
+
}, {
|
|
81
|
+
[x: string]: {
|
|
82
|
+
get: {
|
|
83
|
+
body: unknown;
|
|
84
|
+
params: {};
|
|
85
|
+
query: unknown;
|
|
86
|
+
headers: unknown;
|
|
87
|
+
response: {
|
|
88
|
+
200: VoiceSimulationSuiteReport;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
}, {
|
|
93
|
+
derive: {};
|
|
94
|
+
resolve: {};
|
|
95
|
+
schema: {};
|
|
96
|
+
standaloneSchema: {};
|
|
97
|
+
response: {};
|
|
98
|
+
}, {
|
|
99
|
+
derive: {};
|
|
100
|
+
resolve: {};
|
|
101
|
+
schema: {};
|
|
102
|
+
standaloneSchema: {};
|
|
103
|
+
response: {};
|
|
104
|
+
}>;
|
|
105
|
+
export type VoiceSimulationSuiteEvalRoutesOptions = VoiceEvalRoutesOptions;
|