peerbench 0.0.7 → 0.0.9

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.
Files changed (93) hide show
  1. package/dist/aggregators/abstract.d.ts +10 -0
  2. package/dist/aggregators/index.d.ts +2 -67
  3. package/dist/aggregators/llm/avg.d.ts +26 -0
  4. package/dist/benchmarks/examples/echo-basic/index.d.ts +4 -0
  5. package/dist/benchmarks/examples/echo-basic/runner.d.ts +273 -0
  6. package/dist/benchmarks/examples/echo-basic/schema-sets/echo.v1.d.ts +241 -0
  7. package/dist/benchmarks/examples/echo-basic/storages/json.d.ts +14 -0
  8. package/dist/benchmarks/examples/echo-basic/storages/text.d.ts +24 -0
  9. package/dist/benchmarks/examples/exact-match-scorer/index.d.ts +4 -0
  10. package/dist/benchmarks/examples/exact-match-scorer/runner.d.ts +428 -0
  11. package/dist/benchmarks/examples/exact-match-scorer/schema-sets/exact-match.v1.d.ts +287 -0
  12. package/dist/benchmarks/examples/exact-match-scorer/scorer.d.ts +30 -0
  13. package/dist/benchmarks/examples/exact-match-scorer/storages/json.d.ts +8 -0
  14. package/dist/benchmarks/examples/text-transform/index.d.ts +4 -0
  15. package/dist/benchmarks/examples/text-transform/runner.d.ts +524 -0
  16. package/dist/benchmarks/examples/text-transform/schema-sets/echo.v1.d.ts +211 -0
  17. package/dist/benchmarks/examples/text-transform/schema-sets/namespace.d.ts +1 -0
  18. package/dist/benchmarks/examples/text-transform/schema-sets/reverse.v1.d.ts +216 -0
  19. package/dist/benchmarks/examples/text-transform/storages/json.d.ts +9 -0
  20. package/dist/benchmarks/index.d.ts +1 -1667
  21. package/dist/benchmarks/index.js +14 -14
  22. package/dist/benchmarks/peerbench/index.d.ts +5 -0
  23. package/dist/benchmarks/peerbench/runner.d.ts +754 -0
  24. package/dist/benchmarks/peerbench/schema-sets/mcq.v1.d.ts +261 -0
  25. package/dist/benchmarks/peerbench/schema-sets/multi-turn.v1.d.ts +351 -0
  26. package/dist/benchmarks/peerbench/schema-sets/qa.v1.d.ts +256 -0
  27. package/dist/benchmarks/peerbench/storages/json.d.ts +10 -0
  28. package/dist/{chunk-ZXTQJFGL.js → chunk-Q6GSOHOP.js} +4 -4
  29. package/dist/{chunk-JFLUJLGT.js → chunk-WBCMV445.js} +22 -2
  30. package/dist/chunk-WBCMV445.js.map +1 -0
  31. package/dist/constants.d.ts +4 -0
  32. package/dist/errors/index.d.ts +2 -0
  33. package/dist/errors/peerbench.d.ts +6 -0
  34. package/dist/errors/polyfill.d.ts +1 -0
  35. package/dist/examples/basic.d.ts +1 -0
  36. package/dist/helpers/define-runner.d.ts +45 -0
  37. package/dist/helpers/index.d.ts +1 -0
  38. package/dist/index.d.ts +6 -101
  39. package/dist/index.js +3 -3
  40. package/dist/providers/abstract/llm.d.ts +20 -0
  41. package/dist/{provider-DnEBdl1n.d.ts → providers/abstract/provider.d.ts} +2 -4
  42. package/dist/providers/example/echo.d.ts +12 -0
  43. package/dist/providers/example/restapi.d.ts +37 -0
  44. package/dist/providers/index.d.ts +5 -96
  45. package/dist/providers/mastra.d.ts +40 -0
  46. package/dist/providers/openai.d.ts +29 -0
  47. package/dist/providers/openrouter.d.ts +27 -0
  48. package/dist/schemas/extensions/index.d.ts +18 -22
  49. package/dist/schemas/extensions/response/llm.d.ts +14 -0
  50. package/dist/schemas/extensions/score/llm-as-a-judge-scorer.d.ts +15 -0
  51. package/dist/schemas/id.d.ts +2 -0
  52. package/dist/schemas/index.d.ts +4 -200
  53. package/dist/schemas/llm/index.d.ts +2 -116
  54. package/dist/schemas/llm/index.js +2 -2
  55. package/dist/schemas/llm/simple-system-prompt.d.ts +51 -0
  56. package/dist/schemas/llm/system-prompt.d.ts +59 -0
  57. package/dist/schemas/response.d.ts +63 -0
  58. package/dist/schemas/schema-definer.d.ts +47 -0
  59. package/dist/schemas/score.d.ts +73 -0
  60. package/dist/schemas/test-case.d.ts +57 -0
  61. package/dist/{abstract-BdgLjkNC.d.ts → scorers/abstract.d.ts} +2 -4
  62. package/dist/scorers/index.d.ts +4 -68
  63. package/dist/scorers/llm-judge.d.ts +55 -0
  64. package/dist/scorers/mcq.d.ts +19 -0
  65. package/dist/scorers/mcq.test.d.ts +1 -0
  66. package/dist/scorers/regex.d.ts +58 -0
  67. package/dist/scorers/regex.test.d.ts +1 -0
  68. package/dist/storages/abstract.d.ts +7 -0
  69. package/dist/storages/examples/http.d.ts +1 -0
  70. package/dist/storages/examples/sqlite.d.ts +1 -0
  71. package/dist/storages/file.d.ts +43 -0
  72. package/dist/storages/http.d.ts +22 -0
  73. package/dist/storages/index.d.ts +5 -69
  74. package/dist/storages/index.js +1 -1
  75. package/dist/storages/json-file.d.ts +21 -0
  76. package/dist/storages/sqlite.d.ts +41 -0
  77. package/dist/types/index.d.ts +17 -0
  78. package/dist/types/runner.d.ts +18 -0
  79. package/dist/utilities.d.ts +9 -0
  80. package/dist/utils/id-generator.d.ts +2 -0
  81. package/dist/utils/index.d.ts +5 -0
  82. package/dist/utils/json.d.ts +17 -0
  83. package/dist/utils/llm.d.ts +7 -0
  84. package/dist/{rate-limiter-CSmVIRsM.d.ts → utils/rate-limiter.d.ts} +3 -5
  85. package/dist/utils/sleep.d.ts +1 -0
  86. package/dist/utils/string.d.ts +8 -0
  87. package/package.json +3 -3
  88. package/dist/chunk-JFLUJLGT.js.map +0 -1
  89. package/dist/index-Cn20kPrz.d.ts +0 -27
  90. package/dist/json-file-Bgv9TLcX.d.ts +0 -74
  91. package/dist/llm-8ecJmwKJ.d.ts +0 -23
  92. package/dist/llm-judge-BuF80-5-.d.ts +0 -75
  93. /package/dist/{chunk-ZXTQJFGL.js.map → chunk-Q6GSOHOP.js.map} +0 -0
@@ -0,0 +1,261 @@
1
+ import { z } from "zod";
2
+ export declare const MCQKind: "llm/mcq";
3
+ export declare const MCQTestCaseSchemaV1: z.ZodObject<Omit<{
4
+ id: z.ZodString;
5
+ namespace: z.ZodString;
6
+ schemaVersion: z.ZodNumber;
7
+ kind: z.ZodString;
8
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9
+ }, "kind" | "namespace" | "schemaVersion"> & {
10
+ question: z.ZodString;
11
+ options: z.ZodRecord<z.ZodString, z.ZodString>;
12
+ correctAnswerKeys: z.ZodArray<z.ZodString>;
13
+ } & {
14
+ namespace: z.ZodLiteral<"peerbench.ai">;
15
+ kind: z.ZodLiteral<"llm/mcq.tc">;
16
+ schemaVersion: z.ZodLiteral<1>;
17
+ }, z.core.$strip> & {
18
+ new: (input: Omit<{
19
+ id: string;
20
+ question: string;
21
+ options: Record<string, string>;
22
+ correctAnswerKeys: string[];
23
+ namespace: "peerbench.ai";
24
+ kind: "llm/mcq.tc";
25
+ schemaVersion: 1;
26
+ metadata?: Record<string, unknown> | undefined;
27
+ }, "kind" | "namespace" | "schemaVersion">) => {
28
+ id: string;
29
+ question: string;
30
+ options: Record<string, string>;
31
+ correctAnswerKeys: string[];
32
+ namespace: "peerbench.ai";
33
+ kind: "llm/mcq.tc";
34
+ schemaVersion: 1;
35
+ metadata?: Record<string, unknown> | undefined;
36
+ };
37
+ newWithId(input: Omit<{
38
+ id: string;
39
+ question: string;
40
+ options: Record<string, string>;
41
+ correctAnswerKeys: string[];
42
+ namespace: "peerbench.ai";
43
+ kind: "llm/mcq.tc";
44
+ schemaVersion: 1;
45
+ metadata?: Record<string, unknown> | undefined;
46
+ }, "kind" | "id" | "namespace" | "schemaVersion">, generator: import("../../../index.js").IdGenerator): Promise<{
47
+ id: string;
48
+ question: string;
49
+ options: Record<string, string>;
50
+ correctAnswerKeys: string[];
51
+ namespace: "peerbench.ai";
52
+ kind: "llm/mcq.tc";
53
+ schemaVersion: 1;
54
+ metadata?: Record<string, unknown> | undefined;
55
+ }>;
56
+ };
57
+ export type MCQTestCaseV1 = z.infer<typeof MCQTestCaseSchemaV1>;
58
+ export declare const MCQResponseSchemaV1: z.ZodObject<Omit<{
59
+ id: z.ZodString;
60
+ namespace: z.ZodString;
61
+ schemaVersion: z.ZodNumber;
62
+ kind: z.ZodString;
63
+ startedAt: z.ZodNumber;
64
+ completedAt: z.ZodNumber;
65
+ testCaseId: z.ZodString;
66
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
67
+ }, "kind" | "namespace" | "schemaVersion"> & {
68
+ data: z.ZodString;
69
+ modelSlug: z.ZodString;
70
+ provider: z.ZodString;
71
+ systemPromptId: z.ZodOptional<z.ZodString>;
72
+ inputTokensUsed: z.ZodOptional<z.ZodNumber>;
73
+ outputTokensUsed: z.ZodOptional<z.ZodNumber>;
74
+ inputCost: z.ZodOptional<z.ZodString>;
75
+ outputCost: z.ZodOptional<z.ZodString>;
76
+ } & {
77
+ namespace: z.ZodLiteral<"peerbench.ai">;
78
+ kind: z.ZodLiteral<"llm/mcq.rs">;
79
+ schemaVersion: z.ZodLiteral<1>;
80
+ }, z.core.$strip> & {
81
+ new: (input: Omit<{
82
+ startedAt: number;
83
+ completedAt: number;
84
+ id: string;
85
+ testCaseId: string;
86
+ data: string;
87
+ modelSlug: string;
88
+ provider: string;
89
+ namespace: "peerbench.ai";
90
+ kind: "llm/mcq.rs";
91
+ schemaVersion: 1;
92
+ metadata?: Record<string, unknown> | undefined;
93
+ systemPromptId?: string | undefined;
94
+ inputTokensUsed?: number | undefined;
95
+ outputTokensUsed?: number | undefined;
96
+ inputCost?: string | undefined;
97
+ outputCost?: string | undefined;
98
+ }, "kind" | "namespace" | "schemaVersion">) => {
99
+ startedAt: number;
100
+ completedAt: number;
101
+ id: string;
102
+ testCaseId: string;
103
+ data: string;
104
+ modelSlug: string;
105
+ provider: string;
106
+ namespace: "peerbench.ai";
107
+ kind: "llm/mcq.rs";
108
+ schemaVersion: 1;
109
+ metadata?: Record<string, unknown> | undefined;
110
+ systemPromptId?: string | undefined;
111
+ inputTokensUsed?: number | undefined;
112
+ outputTokensUsed?: number | undefined;
113
+ inputCost?: string | undefined;
114
+ outputCost?: string | undefined;
115
+ };
116
+ newWithId(input: Omit<{
117
+ startedAt: number;
118
+ completedAt: number;
119
+ id: string;
120
+ testCaseId: string;
121
+ data: string;
122
+ modelSlug: string;
123
+ provider: string;
124
+ namespace: "peerbench.ai";
125
+ kind: "llm/mcq.rs";
126
+ schemaVersion: 1;
127
+ metadata?: Record<string, unknown> | undefined;
128
+ systemPromptId?: string | undefined;
129
+ inputTokensUsed?: number | undefined;
130
+ outputTokensUsed?: number | undefined;
131
+ inputCost?: string | undefined;
132
+ outputCost?: string | undefined;
133
+ }, "kind" | "id" | "namespace" | "schemaVersion">, generator: import("../../../index.js").IdGenerator): Promise<{
134
+ startedAt: number;
135
+ completedAt: number;
136
+ id: string;
137
+ testCaseId: string;
138
+ data: string;
139
+ modelSlug: string;
140
+ provider: string;
141
+ namespace: "peerbench.ai";
142
+ kind: "llm/mcq.rs";
143
+ schemaVersion: 1;
144
+ metadata?: Record<string, unknown> | undefined;
145
+ systemPromptId?: string | undefined;
146
+ inputTokensUsed?: number | undefined;
147
+ outputTokensUsed?: number | undefined;
148
+ inputCost?: string | undefined;
149
+ outputCost?: string | undefined;
150
+ }>;
151
+ };
152
+ export type MCQResponseV1 = z.infer<typeof MCQResponseSchemaV1>;
153
+ export declare const MCQScoreSchemaV1: z.ZodObject<Omit<{
154
+ id: z.ZodString;
155
+ namespace: z.ZodString;
156
+ kind: z.ZodString;
157
+ schemaVersion: z.ZodNumber;
158
+ value: z.ZodNumber;
159
+ responseId: z.ZodString;
160
+ explanation: z.ZodOptional<z.ZodString>;
161
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
162
+ scoringMethod: z.ZodEnum<{
163
+ readonly ai: "ai";
164
+ readonly human: "human";
165
+ readonly algo: "algo";
166
+ }>;
167
+ }, "kind" | "namespace" | "schemaVersion"> & {
168
+ extractedAnswers: z.ZodArray<z.ZodString>;
169
+ scorerAISystemPrompt: z.ZodOptional<z.ZodString>;
170
+ scorerAISystemPromptId: z.ZodOptional<z.ZodString>;
171
+ scorerAIProvider: z.ZodOptional<z.ZodString>;
172
+ scorerAIModelSlug: z.ZodOptional<z.ZodString>;
173
+ scorerAIInputTokensUsed: z.ZodOptional<z.ZodNumber>;
174
+ scorerAIOutputTokensUsed: z.ZodOptional<z.ZodNumber>;
175
+ scorerAIInputCost: z.ZodOptional<z.ZodString>;
176
+ scorerAIOutputCost: z.ZodOptional<z.ZodString>;
177
+ } & {
178
+ namespace: z.ZodLiteral<"peerbench.ai">;
179
+ kind: z.ZodLiteral<"llm/mcq.sc">;
180
+ schemaVersion: z.ZodLiteral<1>;
181
+ }, z.core.$strip> & {
182
+ new: (input: Omit<{
183
+ id: string;
184
+ value: number;
185
+ responseId: string;
186
+ scoringMethod: "ai" | "human" | "algo";
187
+ extractedAnswers: string[];
188
+ namespace: "peerbench.ai";
189
+ kind: "llm/mcq.sc";
190
+ schemaVersion: 1;
191
+ metadata?: Record<string, unknown> | undefined;
192
+ explanation?: string | undefined;
193
+ scorerAISystemPrompt?: string | undefined;
194
+ scorerAISystemPromptId?: string | undefined;
195
+ scorerAIProvider?: string | undefined;
196
+ scorerAIModelSlug?: string | undefined;
197
+ scorerAIInputTokensUsed?: number | undefined;
198
+ scorerAIOutputTokensUsed?: number | undefined;
199
+ scorerAIInputCost?: string | undefined;
200
+ scorerAIOutputCost?: string | undefined;
201
+ }, "kind" | "namespace" | "schemaVersion">) => {
202
+ id: string;
203
+ value: number;
204
+ responseId: string;
205
+ scoringMethod: "ai" | "human" | "algo";
206
+ extractedAnswers: string[];
207
+ namespace: "peerbench.ai";
208
+ kind: "llm/mcq.sc";
209
+ schemaVersion: 1;
210
+ metadata?: Record<string, unknown> | undefined;
211
+ explanation?: string | undefined;
212
+ scorerAISystemPrompt?: string | undefined;
213
+ scorerAISystemPromptId?: string | undefined;
214
+ scorerAIProvider?: string | undefined;
215
+ scorerAIModelSlug?: string | undefined;
216
+ scorerAIInputTokensUsed?: number | undefined;
217
+ scorerAIOutputTokensUsed?: number | undefined;
218
+ scorerAIInputCost?: string | undefined;
219
+ scorerAIOutputCost?: string | undefined;
220
+ };
221
+ newWithId(input: Omit<{
222
+ id: string;
223
+ value: number;
224
+ responseId: string;
225
+ scoringMethod: "ai" | "human" | "algo";
226
+ extractedAnswers: string[];
227
+ namespace: "peerbench.ai";
228
+ kind: "llm/mcq.sc";
229
+ schemaVersion: 1;
230
+ metadata?: Record<string, unknown> | undefined;
231
+ explanation?: string | undefined;
232
+ scorerAISystemPrompt?: string | undefined;
233
+ scorerAISystemPromptId?: string | undefined;
234
+ scorerAIProvider?: string | undefined;
235
+ scorerAIModelSlug?: string | undefined;
236
+ scorerAIInputTokensUsed?: number | undefined;
237
+ scorerAIOutputTokensUsed?: number | undefined;
238
+ scorerAIInputCost?: string | undefined;
239
+ scorerAIOutputCost?: string | undefined;
240
+ }, "kind" | "id" | "namespace" | "schemaVersion">, generator: import("../../../index.js").IdGenerator): Promise<{
241
+ id: string;
242
+ value: number;
243
+ responseId: string;
244
+ scoringMethod: "ai" | "human" | "algo";
245
+ extractedAnswers: string[];
246
+ namespace: "peerbench.ai";
247
+ kind: "llm/mcq.sc";
248
+ schemaVersion: 1;
249
+ metadata?: Record<string, unknown> | undefined;
250
+ explanation?: string | undefined;
251
+ scorerAISystemPrompt?: string | undefined;
252
+ scorerAISystemPromptId?: string | undefined;
253
+ scorerAIProvider?: string | undefined;
254
+ scorerAIModelSlug?: string | undefined;
255
+ scorerAIInputTokensUsed?: number | undefined;
256
+ scorerAIOutputTokensUsed?: number | undefined;
257
+ scorerAIInputCost?: string | undefined;
258
+ scorerAIOutputCost?: string | undefined;
259
+ }>;
260
+ };
261
+ export type MCQScoreV1 = z.infer<typeof MCQScoreSchemaV1>;
@@ -0,0 +1,351 @@
1
+ import { z } from "zod";
2
+ export declare const MultiTurnKind: "llm/multi-turn";
3
+ export declare const MultiTurnTestCaseSchemaV1: z.ZodObject<Omit<{
4
+ id: z.ZodString;
5
+ namespace: z.ZodString;
6
+ schemaVersion: z.ZodNumber;
7
+ kind: z.ZodString;
8
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
9
+ }, "kind" | "namespace" | "schemaVersion"> & {
10
+ messages: z.ZodArray<z.ZodObject<{
11
+ role: z.ZodString;
12
+ content: z.ZodString;
13
+ goodAnswers: z.ZodOptional<z.ZodArray<z.ZodString>>;
14
+ badAnswers: z.ZodOptional<z.ZodArray<z.ZodString>>;
15
+ }, z.core.$strip>>;
16
+ maxTurns: z.ZodOptional<z.ZodNumber>;
17
+ expectedOutcome: z.ZodOptional<z.ZodString>;
18
+ } & {
19
+ namespace: z.ZodLiteral<"peerbench.ai">;
20
+ kind: z.ZodLiteral<"llm/multi-turn.tc">;
21
+ schemaVersion: z.ZodLiteral<1>;
22
+ }, z.core.$strip> & {
23
+ new: (input: Omit<{
24
+ id: string;
25
+ messages: {
26
+ role: string;
27
+ content: string;
28
+ goodAnswers?: string[] | undefined;
29
+ badAnswers?: string[] | undefined;
30
+ }[];
31
+ namespace: "peerbench.ai";
32
+ kind: "llm/multi-turn.tc";
33
+ schemaVersion: 1;
34
+ metadata?: Record<string, unknown> | undefined;
35
+ maxTurns?: number | undefined;
36
+ expectedOutcome?: string | undefined;
37
+ }, "kind" | "namespace" | "schemaVersion">) => {
38
+ id: string;
39
+ messages: {
40
+ role: string;
41
+ content: string;
42
+ goodAnswers?: string[] | undefined;
43
+ badAnswers?: string[] | undefined;
44
+ }[];
45
+ namespace: "peerbench.ai";
46
+ kind: "llm/multi-turn.tc";
47
+ schemaVersion: 1;
48
+ metadata?: Record<string, unknown> | undefined;
49
+ maxTurns?: number | undefined;
50
+ expectedOutcome?: string | undefined;
51
+ };
52
+ newWithId(input: Omit<{
53
+ id: string;
54
+ messages: {
55
+ role: string;
56
+ content: string;
57
+ goodAnswers?: string[] | undefined;
58
+ badAnswers?: string[] | undefined;
59
+ }[];
60
+ namespace: "peerbench.ai";
61
+ kind: "llm/multi-turn.tc";
62
+ schemaVersion: 1;
63
+ metadata?: Record<string, unknown> | undefined;
64
+ maxTurns?: number | undefined;
65
+ expectedOutcome?: string | undefined;
66
+ }, "kind" | "id" | "namespace" | "schemaVersion">, generator: import("../../../index.js").IdGenerator): Promise<{
67
+ id: string;
68
+ messages: {
69
+ role: string;
70
+ content: string;
71
+ goodAnswers?: string[] | undefined;
72
+ badAnswers?: string[] | undefined;
73
+ }[];
74
+ namespace: "peerbench.ai";
75
+ kind: "llm/multi-turn.tc";
76
+ schemaVersion: 1;
77
+ metadata?: Record<string, unknown> | undefined;
78
+ maxTurns?: number | undefined;
79
+ expectedOutcome?: string | undefined;
80
+ }>;
81
+ };
82
+ export type MultiTurnTestCaseV1 = z.infer<typeof MultiTurnTestCaseSchemaV1>;
83
+ export declare const MultiTurnResponseSchemaV1: z.ZodObject<Omit<{
84
+ id: z.ZodString;
85
+ namespace: z.ZodString;
86
+ schemaVersion: z.ZodNumber;
87
+ kind: z.ZodString;
88
+ startedAt: z.ZodNumber;
89
+ completedAt: z.ZodNumber;
90
+ testCaseId: z.ZodString;
91
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
92
+ }, "kind" | "namespace" | "schemaVersion"> & {
93
+ replies: z.ZodArray<z.ZodObject<{
94
+ messageIndex: z.ZodNumber;
95
+ startedAt: z.ZodNumber;
96
+ completedAt: z.ZodNumber;
97
+ data: z.ZodString;
98
+ inputTokensUsed: z.ZodOptional<z.ZodNumber>;
99
+ outputTokensUsed: z.ZodOptional<z.ZodNumber>;
100
+ inputCost: z.ZodOptional<z.ZodString>;
101
+ outputCost: z.ZodOptional<z.ZodString>;
102
+ }, z.core.$strip>>;
103
+ data: z.ZodString;
104
+ modelSlug: z.ZodString;
105
+ provider: z.ZodString;
106
+ systemPromptId: z.ZodOptional<z.ZodString>;
107
+ inputTokensUsed: z.ZodOptional<z.ZodNumber>;
108
+ outputTokensUsed: z.ZodOptional<z.ZodNumber>;
109
+ inputCost: z.ZodOptional<z.ZodString>;
110
+ outputCost: z.ZodOptional<z.ZodString>;
111
+ } & {
112
+ namespace: z.ZodLiteral<"peerbench.ai">;
113
+ kind: z.ZodLiteral<"llm/multi-turn.rs">;
114
+ schemaVersion: z.ZodLiteral<1>;
115
+ }, z.core.$strip> & {
116
+ new: (input: Omit<{
117
+ startedAt: number;
118
+ completedAt: number;
119
+ id: string;
120
+ testCaseId: string;
121
+ replies: {
122
+ messageIndex: number;
123
+ startedAt: number;
124
+ completedAt: number;
125
+ data: string;
126
+ inputTokensUsed?: number | undefined;
127
+ outputTokensUsed?: number | undefined;
128
+ inputCost?: string | undefined;
129
+ outputCost?: string | undefined;
130
+ }[];
131
+ data: string;
132
+ modelSlug: string;
133
+ provider: string;
134
+ namespace: "peerbench.ai";
135
+ kind: "llm/multi-turn.rs";
136
+ schemaVersion: 1;
137
+ metadata?: Record<string, unknown> | undefined;
138
+ systemPromptId?: string | undefined;
139
+ inputTokensUsed?: number | undefined;
140
+ outputTokensUsed?: number | undefined;
141
+ inputCost?: string | undefined;
142
+ outputCost?: string | undefined;
143
+ }, "kind" | "namespace" | "schemaVersion">) => {
144
+ startedAt: number;
145
+ completedAt: number;
146
+ id: string;
147
+ testCaseId: string;
148
+ replies: {
149
+ messageIndex: number;
150
+ startedAt: number;
151
+ completedAt: number;
152
+ data: string;
153
+ inputTokensUsed?: number | undefined;
154
+ outputTokensUsed?: number | undefined;
155
+ inputCost?: string | undefined;
156
+ outputCost?: string | undefined;
157
+ }[];
158
+ data: string;
159
+ modelSlug: string;
160
+ provider: string;
161
+ namespace: "peerbench.ai";
162
+ kind: "llm/multi-turn.rs";
163
+ schemaVersion: 1;
164
+ metadata?: Record<string, unknown> | undefined;
165
+ systemPromptId?: string | undefined;
166
+ inputTokensUsed?: number | undefined;
167
+ outputTokensUsed?: number | undefined;
168
+ inputCost?: string | undefined;
169
+ outputCost?: string | undefined;
170
+ };
171
+ newWithId(input: Omit<{
172
+ startedAt: number;
173
+ completedAt: number;
174
+ id: string;
175
+ testCaseId: string;
176
+ replies: {
177
+ messageIndex: number;
178
+ startedAt: number;
179
+ completedAt: number;
180
+ data: string;
181
+ inputTokensUsed?: number | undefined;
182
+ outputTokensUsed?: number | undefined;
183
+ inputCost?: string | undefined;
184
+ outputCost?: string | undefined;
185
+ }[];
186
+ data: string;
187
+ modelSlug: string;
188
+ provider: string;
189
+ namespace: "peerbench.ai";
190
+ kind: "llm/multi-turn.rs";
191
+ schemaVersion: 1;
192
+ metadata?: Record<string, unknown> | undefined;
193
+ systemPromptId?: string | undefined;
194
+ inputTokensUsed?: number | undefined;
195
+ outputTokensUsed?: number | undefined;
196
+ inputCost?: string | undefined;
197
+ outputCost?: string | undefined;
198
+ }, "kind" | "id" | "namespace" | "schemaVersion">, generator: import("../../../index.js").IdGenerator): Promise<{
199
+ startedAt: number;
200
+ completedAt: number;
201
+ id: string;
202
+ testCaseId: string;
203
+ replies: {
204
+ messageIndex: number;
205
+ startedAt: number;
206
+ completedAt: number;
207
+ data: string;
208
+ inputTokensUsed?: number | undefined;
209
+ outputTokensUsed?: number | undefined;
210
+ inputCost?: string | undefined;
211
+ outputCost?: string | undefined;
212
+ }[];
213
+ data: string;
214
+ modelSlug: string;
215
+ provider: string;
216
+ namespace: "peerbench.ai";
217
+ kind: "llm/multi-turn.rs";
218
+ schemaVersion: 1;
219
+ metadata?: Record<string, unknown> | undefined;
220
+ systemPromptId?: string | undefined;
221
+ inputTokensUsed?: number | undefined;
222
+ outputTokensUsed?: number | undefined;
223
+ inputCost?: string | undefined;
224
+ outputCost?: string | undefined;
225
+ }>;
226
+ };
227
+ export type MultiTurnResponseV1 = z.infer<typeof MultiTurnResponseSchemaV1>;
228
+ export declare const MultiTurnScoreSchemaV1: z.ZodObject<Omit<{
229
+ id: z.ZodString;
230
+ namespace: z.ZodString;
231
+ kind: z.ZodString;
232
+ schemaVersion: z.ZodNumber;
233
+ value: z.ZodNumber;
234
+ responseId: z.ZodString;
235
+ explanation: z.ZodOptional<z.ZodString>;
236
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
237
+ scoringMethod: z.ZodEnum<{
238
+ readonly ai: "ai";
239
+ readonly human: "human";
240
+ readonly algo: "algo";
241
+ }>;
242
+ }, "kind" | "namespace" | "schemaVersion"> & {
243
+ individualScores: z.ZodArray<z.ZodObject<{
244
+ replyIndex: z.ZodNumber;
245
+ value: z.ZodNumber;
246
+ }, z.core.$strip>>;
247
+ scorerAISystemPrompt: z.ZodOptional<z.ZodString>;
248
+ scorerAISystemPromptId: z.ZodOptional<z.ZodString>;
249
+ scorerAIProvider: z.ZodOptional<z.ZodString>;
250
+ scorerAIModelSlug: z.ZodOptional<z.ZodString>;
251
+ scorerAIInputTokensUsed: z.ZodOptional<z.ZodNumber>;
252
+ scorerAIOutputTokensUsed: z.ZodOptional<z.ZodNumber>;
253
+ scorerAIInputCost: z.ZodOptional<z.ZodString>;
254
+ scorerAIOutputCost: z.ZodOptional<z.ZodString>;
255
+ } & {
256
+ namespace: z.ZodLiteral<"peerbench.ai">;
257
+ kind: z.ZodLiteral<"llm/multi-turn.sc">;
258
+ schemaVersion: z.ZodLiteral<1>;
259
+ }, z.core.$strip> & {
260
+ new: (input: Omit<{
261
+ id: string;
262
+ value: number;
263
+ responseId: string;
264
+ scoringMethod: "ai" | "human" | "algo";
265
+ individualScores: {
266
+ replyIndex: number;
267
+ value: number;
268
+ }[];
269
+ namespace: "peerbench.ai";
270
+ kind: "llm/multi-turn.sc";
271
+ schemaVersion: 1;
272
+ metadata?: Record<string, unknown> | undefined;
273
+ explanation?: string | undefined;
274
+ scorerAISystemPrompt?: string | undefined;
275
+ scorerAISystemPromptId?: string | undefined;
276
+ scorerAIProvider?: string | undefined;
277
+ scorerAIModelSlug?: string | undefined;
278
+ scorerAIInputTokensUsed?: number | undefined;
279
+ scorerAIOutputTokensUsed?: number | undefined;
280
+ scorerAIInputCost?: string | undefined;
281
+ scorerAIOutputCost?: string | undefined;
282
+ }, "kind" | "namespace" | "schemaVersion">) => {
283
+ id: string;
284
+ value: number;
285
+ responseId: string;
286
+ scoringMethod: "ai" | "human" | "algo";
287
+ individualScores: {
288
+ replyIndex: number;
289
+ value: number;
290
+ }[];
291
+ namespace: "peerbench.ai";
292
+ kind: "llm/multi-turn.sc";
293
+ schemaVersion: 1;
294
+ metadata?: Record<string, unknown> | undefined;
295
+ explanation?: string | undefined;
296
+ scorerAISystemPrompt?: string | undefined;
297
+ scorerAISystemPromptId?: string | undefined;
298
+ scorerAIProvider?: string | undefined;
299
+ scorerAIModelSlug?: string | undefined;
300
+ scorerAIInputTokensUsed?: number | undefined;
301
+ scorerAIOutputTokensUsed?: number | undefined;
302
+ scorerAIInputCost?: string | undefined;
303
+ scorerAIOutputCost?: string | undefined;
304
+ };
305
+ newWithId(input: Omit<{
306
+ id: string;
307
+ value: number;
308
+ responseId: string;
309
+ scoringMethod: "ai" | "human" | "algo";
310
+ individualScores: {
311
+ replyIndex: number;
312
+ value: number;
313
+ }[];
314
+ namespace: "peerbench.ai";
315
+ kind: "llm/multi-turn.sc";
316
+ schemaVersion: 1;
317
+ metadata?: Record<string, unknown> | undefined;
318
+ explanation?: string | undefined;
319
+ scorerAISystemPrompt?: string | undefined;
320
+ scorerAISystemPromptId?: string | undefined;
321
+ scorerAIProvider?: string | undefined;
322
+ scorerAIModelSlug?: string | undefined;
323
+ scorerAIInputTokensUsed?: number | undefined;
324
+ scorerAIOutputTokensUsed?: number | undefined;
325
+ scorerAIInputCost?: string | undefined;
326
+ scorerAIOutputCost?: string | undefined;
327
+ }, "kind" | "id" | "namespace" | "schemaVersion">, generator: import("../../../index.js").IdGenerator): Promise<{
328
+ id: string;
329
+ value: number;
330
+ responseId: string;
331
+ scoringMethod: "ai" | "human" | "algo";
332
+ individualScores: {
333
+ replyIndex: number;
334
+ value: number;
335
+ }[];
336
+ namespace: "peerbench.ai";
337
+ kind: "llm/multi-turn.sc";
338
+ schemaVersion: 1;
339
+ metadata?: Record<string, unknown> | undefined;
340
+ explanation?: string | undefined;
341
+ scorerAISystemPrompt?: string | undefined;
342
+ scorerAISystemPromptId?: string | undefined;
343
+ scorerAIProvider?: string | undefined;
344
+ scorerAIModelSlug?: string | undefined;
345
+ scorerAIInputTokensUsed?: number | undefined;
346
+ scorerAIOutputTokensUsed?: number | undefined;
347
+ scorerAIInputCost?: string | undefined;
348
+ scorerAIOutputCost?: string | undefined;
349
+ }>;
350
+ };
351
+ export type MultiTurnScoreV1 = z.infer<typeof MultiTurnScoreSchemaV1>;