@leostera/evalkit 0.5.0 → 0.6.1
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/CHANGELOG.md +70 -6
- package/README.md +10 -8
- package/dist/cli.mjs +1227 -258
- package/dist/dashboard/assets/index-CTJpd8q8.js +34 -0
- package/dist/dashboard/assets/index-YAabTN3X.css +2 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/files-C-U0-PWW.mjs +0 -2
- package/dist/index-db-vbqEGFaU.mjs +0 -2
- package/dist/index.d.mts +1346 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -4
- package/dist/runner.d.mts +809 -11
- package/dist/runner.d.mts.map +1 -1
- package/dist/runner.mjs +2 -2
- package/dist/share-worker.d.mts +76 -1
- package/dist/share-worker.d.mts.map +1 -1
- package/dist/share-worker.mjs +0 -2
- package/dist/share.d.mts +149 -6
- package/dist/share.d.mts.map +1 -1
- package/dist/share.mjs +1 -1
- package/dist/skills/evalkit/SKILL.md +32 -0
- package/dist/skills/evalkit-agents/SKILL.md +16 -0
- package/dist/skills/evalkit-datasets/SKILL.md +17 -0
- package/dist/skills/evalkit-evals/SKILL.md +19 -0
- package/dist/skills/evalkit-judges/SKILL.md +17 -0
- package/dist/skills/evalkit-matrices/SKILL.md +14 -0
- package/dist/skills/evalkit-results/SKILL.md +14 -0
- package/dist/{src-DoPs9Yug.mjs → src-CKqOzeBi.mjs} +448 -116
- package/dist/{src-ButXPY8P.mjs → src-CZPufWN_.mjs} +419 -94
- package/dist/{src-DzZueFn3.mjs → src-CZnDXP1K.mjs} +46 -10
- package/package.json +3 -2
- package/dist/cli.mjs.map +0 -1
- package/dist/dashboard/assets/index-D9NtA46z.css +0 -2
- package/dist/dashboard/assets/index-DrBwLKJD.js +0 -30
- package/dist/files-C-U0-PWW.mjs.map +0 -1
- package/dist/index-db-HdZXelOS.d.mts +0 -142
- package/dist/index-db-HdZXelOS.d.mts.map +0 -1
- package/dist/index-db-vbqEGFaU.mjs.map +0 -1
- package/dist/index-lOw0fmak.d.mts +0 -1028
- package/dist/index-lOw0fmak.d.mts.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/share-worker.mjs.map +0 -1
- package/dist/src-ButXPY8P.mjs.map +0 -1
- package/dist/src-DoPs9Yug.mjs.map +0 -1
- package/dist/src-DzZueFn3.mjs.map +0 -1
|
@@ -1,1028 +0,0 @@
|
|
|
1
|
-
import * as Schema from "effect/Schema";
|
|
2
|
-
//#region ../core/src/identity.d.ts
|
|
3
|
-
declare const ResourceKindSchema: Schema.Literal<["run", "trial", "artifact"]>;
|
|
4
|
-
type ResourceKind = typeof ResourceKindSchema.Type;
|
|
5
|
-
/** Human-authored project-local identifier; never a generated resource URI. */
|
|
6
|
-
declare function authorId(value: string): string;
|
|
7
|
-
/** RFC 4122 textual UUID. EvalKit accepts v4/v7 and other valid UUID versions. */
|
|
8
|
-
declare const UuidSchema: Schema.filter<typeof Schema.String>;
|
|
9
|
-
type Uuid = typeof UuidSchema.Type;
|
|
10
|
-
type ResourceUri<TKind extends ResourceKind = ResourceKind> = `evalkit:${TKind}:${string}`;
|
|
11
|
-
declare const ResourceUriSchema: Schema.filter<typeof Schema.String>;
|
|
12
|
-
declare function resourceUriSchema<TKind extends ResourceKind>(kind: TKind): Schema.filter<typeof Schema.String>;
|
|
13
|
-
declare function resourceUri<TKind extends ResourceKind>(kind: TKind, uuid: Uuid): ResourceUri<TKind>;
|
|
14
|
-
declare function parseResourceUri<TKind extends ResourceKind>(value: string, expectedKind?: TKind): {
|
|
15
|
-
kind: TKind;
|
|
16
|
-
uuid: Uuid;
|
|
17
|
-
uri: ResourceUri<TKind>;
|
|
18
|
-
};
|
|
19
|
-
declare function resourceUuid(value: string, expectedKind?: ResourceKind): Uuid;
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region ../core/src/canonical-json.d.ts
|
|
22
|
-
/** Canonical JSON: keys sorted recursively, array order preserved. Rejects non-JSON inputs. */
|
|
23
|
-
declare function canonicalParameters(value: JsonValue): string;
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region ../core/src/matrix.d.ts
|
|
26
|
-
type MatrixSelection = {
|
|
27
|
-
/** Base eval IDs. Unknown values fail before dispatch. */
|
|
28
|
-
evals?: readonly string[];
|
|
29
|
-
/** Select existing dimension values, rather than overwriting every cell with the same value. */
|
|
30
|
-
parameters?: Readonly<Record<string, readonly JsonValue[]>>;
|
|
31
|
-
/** Overrides for non-dimension execution settings (e.g. maxTokens). */
|
|
32
|
-
overrides?: JsonObject;
|
|
33
|
-
};
|
|
34
|
-
type EvalMatrixCell = {
|
|
35
|
-
matrixId: string;
|
|
36
|
-
/** Stable canonical key including matrix, base eval and effective parameters. */
|
|
37
|
-
key: string;
|
|
38
|
-
eval: EvalDefinition;
|
|
39
|
-
parameters: JsonObject;
|
|
40
|
-
};
|
|
41
|
-
type EvalMatrixDefinition = {
|
|
42
|
-
id: string;
|
|
43
|
-
name?: string;
|
|
44
|
-
evals: readonly EvalDefinition[];
|
|
45
|
-
parameters: Readonly<Record<string, readonly JsonValue[]>>;
|
|
46
|
-
defaults?: JsonObject;
|
|
47
|
-
/** Complete correlated assignments, crossed with independent parameters. */
|
|
48
|
-
cases?: readonly JsonObject[];
|
|
49
|
-
/** Partial patterns over declared dimensions; matching cells are never run. */
|
|
50
|
-
exclude?: readonly JsonObject[];
|
|
51
|
-
};
|
|
52
|
-
type EvalMatrix = EvalMatrixDefinition & {
|
|
53
|
-
kind: 'matrix';
|
|
54
|
-
count(selection?: MatrixSelection): number;
|
|
55
|
-
cells(selection?: MatrixSelection): IterableIterator<EvalMatrixCell>;
|
|
56
|
-
};
|
|
57
|
-
declare function defineEvalMatrix<const T extends EvalMatrixDefinition>(definition: T): EvalMatrix & T;
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region ../core/src/config.d.ts
|
|
60
|
-
type EvalkitConfig = {
|
|
61
|
-
/** Paths are relative to evalkit.config.js/ts, not the invoking shell directory. */
|
|
62
|
-
testDir?: string;
|
|
63
|
-
include?: readonly string[];
|
|
64
|
-
exclude?: readonly string[];
|
|
65
|
-
/** Explicit definitions are an alternative to discovery (e.g. hosted registries). */
|
|
66
|
-
evals?: readonly EvalDefinition[];
|
|
67
|
-
registry?: EvalRegistry;
|
|
68
|
-
/** Applied to every discovered eval. Values are forwarded, never provider-interpreted. */
|
|
69
|
-
matrix?: Omit<EvalMatrixDefinition, 'evals' | 'id'> & {
|
|
70
|
-
id?: string;
|
|
71
|
-
};
|
|
72
|
-
execution?: {
|
|
73
|
-
concurrency?: number;
|
|
74
|
-
trials?: number;
|
|
75
|
-
maxCells?: number;
|
|
76
|
-
};
|
|
77
|
-
reportDir?: string;
|
|
78
|
-
sandboxDir?: string;
|
|
79
|
-
share?: ShareConfig;
|
|
80
|
-
};
|
|
81
|
-
/** HTTP header names and values. */
|
|
82
|
-
type ShareHeaders = Record<string, string>;
|
|
83
|
-
type ShareConfig = {
|
|
84
|
-
/** Where `evalkit share` uploads results. `EVALKIT_SHARE_URL` overrides it. */
|
|
85
|
-
url: string;
|
|
86
|
-
/**
|
|
87
|
-
* Extra headers for every request to the share server, e.g. credentials for
|
|
88
|
-
* an auth proxy in front of it. A function is called once per `evalkit share`
|
|
89
|
-
* (it may run a command to fetch a token). Values are never printed.
|
|
90
|
-
*/
|
|
91
|
-
headers?: ShareHeaders | (() => ShareHeaders | Promise<ShareHeaders>);
|
|
92
|
-
};
|
|
93
|
-
/** Pure, typed project configuration. Loading/discovery belongs to the CLI. */
|
|
94
|
-
declare function defineConfig<const T extends EvalkitConfig>(configuration: T): T;
|
|
95
|
-
//#endregion
|
|
96
|
-
//#region ../core/src/schema.d.ts
|
|
97
|
-
/** Runtime schemas for serialized EvalKit report and API boundaries. */
|
|
98
|
-
declare const RunStatusSchema: Schema.Literal<["running", "completed", "failed", "cancelled"]>;
|
|
99
|
-
declare const RecordedErrorSchema: Schema.Struct<{
|
|
100
|
-
name: typeof Schema.String;
|
|
101
|
-
message: typeof Schema.String;
|
|
102
|
-
stack: Schema.optional<typeof Schema.String>;
|
|
103
|
-
}>;
|
|
104
|
-
declare const AutIdentitySchema: Schema.Struct<{
|
|
105
|
-
name: Schema.optional<typeof Schema.String>;
|
|
106
|
-
kind: typeof Schema.String;
|
|
107
|
-
id: typeof Schema.String;
|
|
108
|
-
version: Schema.optional<typeof Schema.String>;
|
|
109
|
-
}>;
|
|
110
|
-
declare const JsonValueSchema: Schema.Schema<JsonValue>;
|
|
111
|
-
declare const RunSourceSchema: Schema.Struct<{
|
|
112
|
-
repo: typeof Schema.String;
|
|
113
|
-
project: typeof Schema.String;
|
|
114
|
-
commit: typeof Schema.String;
|
|
115
|
-
ref: Schema.optional<typeof Schema.String>;
|
|
116
|
-
committedAt: Schema.optional<typeof Schema.String>;
|
|
117
|
-
dirty: typeof Schema.Boolean;
|
|
118
|
-
ci: Schema.optional<Schema.Struct<{
|
|
119
|
-
provider: typeof Schema.String;
|
|
120
|
-
pipeline: Schema.optional<typeof Schema.String>;
|
|
121
|
-
job: Schema.optional<typeof Schema.String>;
|
|
122
|
-
url: Schema.optional<typeof Schema.String>;
|
|
123
|
-
}>>;
|
|
124
|
-
}>;
|
|
125
|
-
declare const RunMetadataSchema: Schema.Struct<{
|
|
126
|
-
schemaVersion: Schema.Literal<[2, 3, 4]>;
|
|
127
|
-
runUri: Schema.filter<typeof Schema.String>;
|
|
128
|
-
evalId: typeof Schema.String;
|
|
129
|
-
suiteId: Schema.optional<typeof Schema.String>;
|
|
130
|
-
parameters: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Schema<JsonValue, JsonValue, never>>>;
|
|
131
|
-
matrix: Schema.optional<Schema.Struct<{
|
|
132
|
-
id: typeof Schema.String;
|
|
133
|
-
cellKey: typeof Schema.String;
|
|
134
|
-
}>>;
|
|
135
|
-
aut: Schema.optional<Schema.Struct<{
|
|
136
|
-
name: Schema.optional<typeof Schema.String>;
|
|
137
|
-
kind: typeof Schema.String;
|
|
138
|
-
id: typeof Schema.String;
|
|
139
|
-
version: Schema.optional<typeof Schema.String>;
|
|
140
|
-
}>>;
|
|
141
|
-
startedAt: typeof Schema.String;
|
|
142
|
-
source: Schema.optional<Schema.Struct<{
|
|
143
|
-
repo: typeof Schema.String;
|
|
144
|
-
project: typeof Schema.String;
|
|
145
|
-
commit: typeof Schema.String;
|
|
146
|
-
ref: Schema.optional<typeof Schema.String>;
|
|
147
|
-
committedAt: Schema.optional<typeof Schema.String>;
|
|
148
|
-
dirty: typeof Schema.Boolean;
|
|
149
|
-
ci: Schema.optional<Schema.Struct<{
|
|
150
|
-
provider: typeof Schema.String;
|
|
151
|
-
pipeline: Schema.optional<typeof Schema.String>;
|
|
152
|
-
job: Schema.optional<typeof Schema.String>;
|
|
153
|
-
url: Schema.optional<typeof Schema.String>;
|
|
154
|
-
}>>;
|
|
155
|
-
}>>;
|
|
156
|
-
}>;
|
|
157
|
-
declare const TrialMetadataSchema: Schema.Struct<{
|
|
158
|
-
schemaVersion: Schema.Literal<[2, 3, 4]>;
|
|
159
|
-
runUri: Schema.filter<typeof Schema.String>;
|
|
160
|
-
trialUri: Schema.filter<typeof Schema.String>;
|
|
161
|
-
trialIndex: typeof Schema.Number;
|
|
162
|
-
evalId: typeof Schema.String;
|
|
163
|
-
parameters: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Schema<JsonValue, JsonValue, never>>>;
|
|
164
|
-
matrix: Schema.optional<Schema.Struct<{
|
|
165
|
-
id: typeof Schema.String;
|
|
166
|
-
cellKey: typeof Schema.String;
|
|
167
|
-
}>>;
|
|
168
|
-
aut: Schema.optional<Schema.Struct<{
|
|
169
|
-
name: Schema.optional<typeof Schema.String>;
|
|
170
|
-
kind: typeof Schema.String;
|
|
171
|
-
id: typeof Schema.String;
|
|
172
|
-
version: Schema.optional<typeof Schema.String>;
|
|
173
|
-
}>>;
|
|
174
|
-
startedAt: typeof Schema.String;
|
|
175
|
-
}>;
|
|
176
|
-
/** On-disk manifests include a lifecycle status; older finalized manifests may still say running. */
|
|
177
|
-
declare const RunManifestSchema: Schema.Struct<{
|
|
178
|
-
schemaVersion: Schema.Literal<[2, 3, 4]>;
|
|
179
|
-
runUri: Schema.filter<typeof Schema.String>;
|
|
180
|
-
evalId: typeof Schema.String;
|
|
181
|
-
suiteId: Schema.optional<typeof Schema.String>;
|
|
182
|
-
parameters: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Schema<JsonValue, JsonValue, never>>>;
|
|
183
|
-
matrix: Schema.optional<Schema.Struct<{
|
|
184
|
-
id: typeof Schema.String;
|
|
185
|
-
cellKey: typeof Schema.String;
|
|
186
|
-
}>>;
|
|
187
|
-
aut: Schema.optional<Schema.Struct<{
|
|
188
|
-
name: Schema.optional<typeof Schema.String>;
|
|
189
|
-
kind: typeof Schema.String;
|
|
190
|
-
id: typeof Schema.String;
|
|
191
|
-
version: Schema.optional<typeof Schema.String>;
|
|
192
|
-
}>>;
|
|
193
|
-
startedAt: typeof Schema.String;
|
|
194
|
-
source: Schema.optional<Schema.Struct<{
|
|
195
|
-
repo: typeof Schema.String;
|
|
196
|
-
project: typeof Schema.String;
|
|
197
|
-
commit: typeof Schema.String;
|
|
198
|
-
ref: Schema.optional<typeof Schema.String>;
|
|
199
|
-
committedAt: Schema.optional<typeof Schema.String>;
|
|
200
|
-
dirty: typeof Schema.Boolean;
|
|
201
|
-
ci: Schema.optional<Schema.Struct<{
|
|
202
|
-
provider: typeof Schema.String;
|
|
203
|
-
pipeline: Schema.optional<typeof Schema.String>;
|
|
204
|
-
job: Schema.optional<typeof Schema.String>;
|
|
205
|
-
url: Schema.optional<typeof Schema.String>;
|
|
206
|
-
}>>;
|
|
207
|
-
}>>;
|
|
208
|
-
status: Schema.optional<Schema.Literal<["running", "completed", "failed", "cancelled"]>>;
|
|
209
|
-
}>;
|
|
210
|
-
declare const TrialManifestSchema: Schema.Struct<{
|
|
211
|
-
schemaVersion: Schema.Literal<[2, 3, 4]>;
|
|
212
|
-
runUri: Schema.filter<typeof Schema.String>;
|
|
213
|
-
trialUri: Schema.filter<typeof Schema.String>;
|
|
214
|
-
trialIndex: typeof Schema.Number;
|
|
215
|
-
evalId: typeof Schema.String;
|
|
216
|
-
parameters: Schema.optional<Schema.Record$<typeof Schema.String, Schema.Schema<JsonValue, JsonValue, never>>>;
|
|
217
|
-
matrix: Schema.optional<Schema.Struct<{
|
|
218
|
-
id: typeof Schema.String;
|
|
219
|
-
cellKey: typeof Schema.String;
|
|
220
|
-
}>>;
|
|
221
|
-
aut: Schema.optional<Schema.Struct<{
|
|
222
|
-
name: Schema.optional<typeof Schema.String>;
|
|
223
|
-
kind: typeof Schema.String;
|
|
224
|
-
id: typeof Schema.String;
|
|
225
|
-
version: Schema.optional<typeof Schema.String>;
|
|
226
|
-
}>>;
|
|
227
|
-
startedAt: typeof Schema.String;
|
|
228
|
-
status: Schema.optional<Schema.Literal<["running", "completed", "failed", "cancelled"]>>;
|
|
229
|
-
}>;
|
|
230
|
-
declare const UsageSchema: Schema.Struct<{
|
|
231
|
-
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
232
|
-
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
233
|
-
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
234
|
-
}>;
|
|
235
|
-
declare const JudgeRunInfoSchema: Schema.Struct<{
|
|
236
|
-
agent: Schema.optional<Schema.Struct<{
|
|
237
|
-
id: typeof Schema.String;
|
|
238
|
-
kind: typeof Schema.String;
|
|
239
|
-
name: Schema.optional<typeof Schema.String>;
|
|
240
|
-
version: Schema.optional<typeof Schema.String>;
|
|
241
|
-
}>>;
|
|
242
|
-
usage: Schema.optional<Schema.Struct<{
|
|
243
|
-
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
244
|
-
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
245
|
-
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
246
|
-
}>>;
|
|
247
|
-
events: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
|
|
248
|
-
}>;
|
|
249
|
-
declare const ScoreResultSchema: Schema.Struct<{
|
|
250
|
-
name: typeof Schema.String;
|
|
251
|
-
kind: Schema.Literal<["predicate", "judge"]>;
|
|
252
|
-
value: Schema.optional<typeof Schema.Number>;
|
|
253
|
-
passed: Schema.optional<typeof Schema.Boolean>;
|
|
254
|
-
explanation: Schema.optional<typeof Schema.String>;
|
|
255
|
-
evidence: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
256
|
-
judge: Schema.optional<Schema.Struct<{
|
|
257
|
-
agent: Schema.optional<Schema.Struct<{
|
|
258
|
-
id: typeof Schema.String;
|
|
259
|
-
kind: typeof Schema.String;
|
|
260
|
-
name: Schema.optional<typeof Schema.String>;
|
|
261
|
-
version: Schema.optional<typeof Schema.String>;
|
|
262
|
-
}>>;
|
|
263
|
-
usage: Schema.optional<Schema.Struct<{
|
|
264
|
-
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
265
|
-
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
266
|
-
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
267
|
-
}>>;
|
|
268
|
-
events: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
|
|
269
|
-
}>>;
|
|
270
|
-
durationMs: typeof Schema.Number;
|
|
271
|
-
error: Schema.optional<Schema.Struct<{
|
|
272
|
-
name: typeof Schema.String;
|
|
273
|
-
message: typeof Schema.String;
|
|
274
|
-
stack: Schema.optional<typeof Schema.String>;
|
|
275
|
-
}>>;
|
|
276
|
-
}>;
|
|
277
|
-
declare const CheckpointResultSchema: Schema.Struct<{
|
|
278
|
-
step: typeof Schema.Number;
|
|
279
|
-
kind: Schema.Literal<["predicate", "judge", "expect-tool-call"]>;
|
|
280
|
-
name: typeof Schema.String;
|
|
281
|
-
status: Schema.Literal<["passed", "failed", "error", "skipped"]>;
|
|
282
|
-
value: Schema.optional<typeof Schema.Number>;
|
|
283
|
-
passed: Schema.optional<typeof Schema.Boolean>;
|
|
284
|
-
explanation: Schema.optional<typeof Schema.String>;
|
|
285
|
-
evidence: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
286
|
-
judge: Schema.optional<Schema.Struct<{
|
|
287
|
-
agent: Schema.optional<Schema.Struct<{
|
|
288
|
-
id: typeof Schema.String;
|
|
289
|
-
kind: typeof Schema.String;
|
|
290
|
-
name: Schema.optional<typeof Schema.String>;
|
|
291
|
-
version: Schema.optional<typeof Schema.String>;
|
|
292
|
-
}>>;
|
|
293
|
-
usage: Schema.optional<Schema.Struct<{
|
|
294
|
-
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
295
|
-
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
296
|
-
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
297
|
-
}>>;
|
|
298
|
-
events: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
|
|
299
|
-
}>>;
|
|
300
|
-
durationMs: Schema.optional<typeof Schema.Number>;
|
|
301
|
-
error: Schema.optional<Schema.Struct<{
|
|
302
|
-
name: typeof Schema.String;
|
|
303
|
-
message: typeof Schema.String;
|
|
304
|
-
stack: Schema.optional<typeof Schema.String>;
|
|
305
|
-
}>>;
|
|
306
|
-
matchedToolCall: Schema.optional<Schema.Struct<{
|
|
307
|
-
eventIndex: typeof Schema.Number;
|
|
308
|
-
id: typeof Schema.String;
|
|
309
|
-
}>>;
|
|
310
|
-
}>;
|
|
311
|
-
declare const TrialScoringSchema: Schema.Struct<{
|
|
312
|
-
results: Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
313
|
-
name: typeof Schema.String;
|
|
314
|
-
kind: Schema.Literal<["predicate", "judge"]>;
|
|
315
|
-
value: Schema.optional<typeof Schema.Number>;
|
|
316
|
-
passed: Schema.optional<typeof Schema.Boolean>;
|
|
317
|
-
explanation: Schema.optional<typeof Schema.String>;
|
|
318
|
-
evidence: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
319
|
-
judge: Schema.optional<Schema.Struct<{
|
|
320
|
-
agent: Schema.optional<Schema.Struct<{
|
|
321
|
-
id: typeof Schema.String;
|
|
322
|
-
kind: typeof Schema.String;
|
|
323
|
-
name: Schema.optional<typeof Schema.String>;
|
|
324
|
-
version: Schema.optional<typeof Schema.String>;
|
|
325
|
-
}>>;
|
|
326
|
-
usage: Schema.optional<Schema.Struct<{
|
|
327
|
-
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
328
|
-
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
329
|
-
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
330
|
-
}>>;
|
|
331
|
-
events: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
|
|
332
|
-
}>>;
|
|
333
|
-
durationMs: typeof Schema.Number;
|
|
334
|
-
error: Schema.optional<Schema.Struct<{
|
|
335
|
-
name: typeof Schema.String;
|
|
336
|
-
message: typeof Schema.String;
|
|
337
|
-
stack: Schema.optional<typeof Schema.String>;
|
|
338
|
-
}>>;
|
|
339
|
-
}>>>;
|
|
340
|
-
checkpoints: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
341
|
-
step: typeof Schema.Number;
|
|
342
|
-
kind: Schema.Literal<["predicate", "judge", "expect-tool-call"]>;
|
|
343
|
-
name: typeof Schema.String;
|
|
344
|
-
status: Schema.Literal<["passed", "failed", "error", "skipped"]>;
|
|
345
|
-
value: Schema.optional<typeof Schema.Number>;
|
|
346
|
-
passed: Schema.optional<typeof Schema.Boolean>;
|
|
347
|
-
explanation: Schema.optional<typeof Schema.String>;
|
|
348
|
-
evidence: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
349
|
-
judge: Schema.optional<Schema.Struct<{
|
|
350
|
-
agent: Schema.optional<Schema.Struct<{
|
|
351
|
-
id: typeof Schema.String;
|
|
352
|
-
kind: typeof Schema.String;
|
|
353
|
-
name: Schema.optional<typeof Schema.String>;
|
|
354
|
-
version: Schema.optional<typeof Schema.String>;
|
|
355
|
-
}>>;
|
|
356
|
-
usage: Schema.optional<Schema.Struct<{
|
|
357
|
-
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
358
|
-
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
359
|
-
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
360
|
-
}>>;
|
|
361
|
-
events: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
|
|
362
|
-
}>>;
|
|
363
|
-
durationMs: Schema.optional<typeof Schema.Number>;
|
|
364
|
-
error: Schema.optional<Schema.Struct<{
|
|
365
|
-
name: typeof Schema.String;
|
|
366
|
-
message: typeof Schema.String;
|
|
367
|
-
stack: Schema.optional<typeof Schema.String>;
|
|
368
|
-
}>>;
|
|
369
|
-
matchedToolCall: Schema.optional<Schema.Struct<{
|
|
370
|
-
eventIndex: typeof Schema.Number;
|
|
371
|
-
id: typeof Schema.String;
|
|
372
|
-
}>>;
|
|
373
|
-
}>>>>;
|
|
374
|
-
skippedScorers: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
|
|
375
|
-
overall: Schema.optional<typeof Schema.Number>;
|
|
376
|
-
passed: typeof Schema.Boolean;
|
|
377
|
-
}>;
|
|
378
|
-
declare const ArtifactEntrySchema: Schema.Struct<{
|
|
379
|
-
path: typeof Schema.String;
|
|
380
|
-
kind: Schema.Literal<["file", "directory"]>;
|
|
381
|
-
size: Schema.optional<typeof Schema.Number>;
|
|
382
|
-
}>;
|
|
383
|
-
declare const TrialSummarySchema: Schema.Struct<{
|
|
384
|
-
status: Schema.Literal<["running", "completed", "failed", "cancelled"]>;
|
|
385
|
-
endedAt: typeof Schema.String;
|
|
386
|
-
durationMs: Schema.optional<typeof Schema.Number>;
|
|
387
|
-
scoring: Schema.optional<Schema.Struct<{
|
|
388
|
-
results: Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
389
|
-
name: typeof Schema.String;
|
|
390
|
-
kind: Schema.Literal<["predicate", "judge"]>;
|
|
391
|
-
value: Schema.optional<typeof Schema.Number>;
|
|
392
|
-
passed: Schema.optional<typeof Schema.Boolean>;
|
|
393
|
-
explanation: Schema.optional<typeof Schema.String>;
|
|
394
|
-
evidence: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
395
|
-
judge: Schema.optional<Schema.Struct<{
|
|
396
|
-
agent: Schema.optional<Schema.Struct<{
|
|
397
|
-
id: typeof Schema.String;
|
|
398
|
-
kind: typeof Schema.String;
|
|
399
|
-
name: Schema.optional<typeof Schema.String>;
|
|
400
|
-
version: Schema.optional<typeof Schema.String>;
|
|
401
|
-
}>>;
|
|
402
|
-
usage: Schema.optional<Schema.Struct<{
|
|
403
|
-
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
404
|
-
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
405
|
-
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
406
|
-
}>>;
|
|
407
|
-
events: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
|
|
408
|
-
}>>;
|
|
409
|
-
durationMs: typeof Schema.Number;
|
|
410
|
-
error: Schema.optional<Schema.Struct<{
|
|
411
|
-
name: typeof Schema.String;
|
|
412
|
-
message: typeof Schema.String;
|
|
413
|
-
stack: Schema.optional<typeof Schema.String>;
|
|
414
|
-
}>>;
|
|
415
|
-
}>>>;
|
|
416
|
-
checkpoints: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
417
|
-
step: typeof Schema.Number;
|
|
418
|
-
kind: Schema.Literal<["predicate", "judge", "expect-tool-call"]>;
|
|
419
|
-
name: typeof Schema.String;
|
|
420
|
-
status: Schema.Literal<["passed", "failed", "error", "skipped"]>;
|
|
421
|
-
value: Schema.optional<typeof Schema.Number>;
|
|
422
|
-
passed: Schema.optional<typeof Schema.Boolean>;
|
|
423
|
-
explanation: Schema.optional<typeof Schema.String>;
|
|
424
|
-
evidence: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
425
|
-
judge: Schema.optional<Schema.Struct<{
|
|
426
|
-
agent: Schema.optional<Schema.Struct<{
|
|
427
|
-
id: typeof Schema.String;
|
|
428
|
-
kind: typeof Schema.String;
|
|
429
|
-
name: Schema.optional<typeof Schema.String>;
|
|
430
|
-
version: Schema.optional<typeof Schema.String>;
|
|
431
|
-
}>>;
|
|
432
|
-
usage: Schema.optional<Schema.Struct<{
|
|
433
|
-
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
434
|
-
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
435
|
-
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
436
|
-
}>>;
|
|
437
|
-
events: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
|
|
438
|
-
}>>;
|
|
439
|
-
durationMs: Schema.optional<typeof Schema.Number>;
|
|
440
|
-
error: Schema.optional<Schema.Struct<{
|
|
441
|
-
name: typeof Schema.String;
|
|
442
|
-
message: typeof Schema.String;
|
|
443
|
-
stack: Schema.optional<typeof Schema.String>;
|
|
444
|
-
}>>;
|
|
445
|
-
matchedToolCall: Schema.optional<Schema.Struct<{
|
|
446
|
-
eventIndex: typeof Schema.Number;
|
|
447
|
-
id: typeof Schema.String;
|
|
448
|
-
}>>;
|
|
449
|
-
}>>>>;
|
|
450
|
-
skippedScorers: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
|
|
451
|
-
overall: Schema.optional<typeof Schema.Number>;
|
|
452
|
-
passed: typeof Schema.Boolean;
|
|
453
|
-
}>>;
|
|
454
|
-
artifacts: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
455
|
-
path: typeof Schema.String;
|
|
456
|
-
kind: Schema.Literal<["file", "directory"]>;
|
|
457
|
-
size: Schema.optional<typeof Schema.Number>;
|
|
458
|
-
}>>>>;
|
|
459
|
-
error: Schema.optional<Schema.Struct<{
|
|
460
|
-
name: typeof Schema.String;
|
|
461
|
-
message: typeof Schema.String;
|
|
462
|
-
stack: Schema.optional<typeof Schema.String>;
|
|
463
|
-
}>>;
|
|
464
|
-
}>;
|
|
465
|
-
declare const RunSummarySchema: Schema.Struct<{
|
|
466
|
-
status: Schema.Literal<["running", "completed", "failed", "cancelled"]>;
|
|
467
|
-
endedAt: typeof Schema.String;
|
|
468
|
-
durationMs: Schema.optional<typeof Schema.Number>;
|
|
469
|
-
trialCount: typeof Schema.Number;
|
|
470
|
-
passed: typeof Schema.Number;
|
|
471
|
-
failed: typeof Schema.Number;
|
|
472
|
-
error: Schema.optional<Schema.Struct<{
|
|
473
|
-
name: typeof Schema.String;
|
|
474
|
-
message: typeof Schema.String;
|
|
475
|
-
stack: Schema.optional<typeof Schema.String>;
|
|
476
|
-
}>>;
|
|
477
|
-
}>;
|
|
478
|
-
declare const TrajectoryEventSchema: Schema.Schema<TrajectoryEvent>;
|
|
479
|
-
declare const ApiErrorSchema: Schema.Struct<{
|
|
480
|
-
error: typeof Schema.String;
|
|
481
|
-
message: typeof Schema.String;
|
|
482
|
-
}>;
|
|
483
|
-
//#endregion
|
|
484
|
-
//#region ../core/src/trajectory.d.ts
|
|
485
|
-
/** Decode one private report's JSONL trajectory; reject malformed/non-event lines with their line number. */
|
|
486
|
-
declare function parseTrajectoryJsonl(contents: string): TrajectoryEvent[];
|
|
487
|
-
//#endregion
|
|
488
|
-
//#region ../core/src/index.d.ts
|
|
489
|
-
type JsonPrimitive = boolean | number | string | null;
|
|
490
|
-
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
491
|
-
[key: string]: JsonValue;
|
|
492
|
-
};
|
|
493
|
-
type JsonObject = {
|
|
494
|
-
[key: string]: JsonValue;
|
|
495
|
-
};
|
|
496
|
-
type AutIdentity = {
|
|
497
|
-
/** Human-readable logical agent name shown in catalogs and dashboards. */
|
|
498
|
-
name?: string;
|
|
499
|
-
kind: string;
|
|
500
|
-
id: string;
|
|
501
|
-
version?: string;
|
|
502
|
-
};
|
|
503
|
-
type AgentRuntimeName = 'local' | 'sandbox' | 'remote';
|
|
504
|
-
/**
|
|
505
|
-
* A serializable runtime requirement for an AUT. Concrete runtime packages own
|
|
506
|
-
* the interpretation of `kind` and `configuration`.
|
|
507
|
-
*/
|
|
508
|
-
type AgentRuntime = {
|
|
509
|
-
kind: string;
|
|
510
|
-
configuration?: JsonObject;
|
|
511
|
-
};
|
|
512
|
-
type AgentRuntimes = Partial<Record<AgentRuntimeName, AgentRuntime>>;
|
|
513
|
-
type Usage = {
|
|
514
|
-
inputTokens?: number;
|
|
515
|
-
outputTokens?: number;
|
|
516
|
-
totalTokens?: number;
|
|
517
|
-
};
|
|
518
|
-
type RecordedError = {
|
|
519
|
-
name: string;
|
|
520
|
-
message: string;
|
|
521
|
-
stack?: string;
|
|
522
|
-
};
|
|
523
|
-
type AutEvent = {
|
|
524
|
-
kind: 'started';
|
|
525
|
-
timestamp: string;
|
|
526
|
-
} | {
|
|
527
|
-
kind: 'message';
|
|
528
|
-
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
529
|
-
content: JsonValue;
|
|
530
|
-
timestamp: string;
|
|
531
|
-
} | {
|
|
532
|
-
kind: 'tool-call';
|
|
533
|
-
id: string;
|
|
534
|
-
name: string;
|
|
535
|
-
arguments: JsonValue;
|
|
536
|
-
timestamp: string;
|
|
537
|
-
} | {
|
|
538
|
-
kind: 'tool-result';
|
|
539
|
-
id: string;
|
|
540
|
-
name?: string;
|
|
541
|
-
result: JsonValue;
|
|
542
|
-
timestamp: string;
|
|
543
|
-
} | {
|
|
544
|
-
kind: 'turn-started';
|
|
545
|
-
turn: number;
|
|
546
|
-
timestamp: string;
|
|
547
|
-
} | {
|
|
548
|
-
kind: 'turn-completed';
|
|
549
|
-
turn: number;
|
|
550
|
-
timestamp: string;
|
|
551
|
-
latencyMs?: number;
|
|
552
|
-
usage?: Usage;
|
|
553
|
-
} | {
|
|
554
|
-
kind: 'completed';
|
|
555
|
-
output?: JsonValue;
|
|
556
|
-
timestamp: string;
|
|
557
|
-
} | {
|
|
558
|
-
kind: 'error';
|
|
559
|
-
error: RecordedError;
|
|
560
|
-
timestamp: string;
|
|
561
|
-
};
|
|
562
|
-
type RunnerEvent = {
|
|
563
|
-
kind: 'trial-started';
|
|
564
|
-
timestamp: string;
|
|
565
|
-
} | {
|
|
566
|
-
kind: 'transcript-step-started';
|
|
567
|
-
step: number;
|
|
568
|
-
timestamp: string;
|
|
569
|
-
} | {
|
|
570
|
-
kind: 'transcript-step-completed';
|
|
571
|
-
step: number;
|
|
572
|
-
timestamp: string;
|
|
573
|
-
} | {
|
|
574
|
-
kind: 'transcript-step-skipped';
|
|
575
|
-
step: number;
|
|
576
|
-
timestamp: string;
|
|
577
|
-
} | {
|
|
578
|
-
kind: 'checkpoint-started';
|
|
579
|
-
step: number;
|
|
580
|
-
name: string;
|
|
581
|
-
timestamp: string;
|
|
582
|
-
} | {
|
|
583
|
-
kind: 'checkpoint-completed';
|
|
584
|
-
step: number;
|
|
585
|
-
status: 'passed' | 'failed';
|
|
586
|
-
timestamp: string;
|
|
587
|
-
} | {
|
|
588
|
-
kind: 'checkpoint-error';
|
|
589
|
-
step: number;
|
|
590
|
-
error: RecordedError;
|
|
591
|
-
timestamp: string;
|
|
592
|
-
} | {
|
|
593
|
-
kind: 'scorer-started';
|
|
594
|
-
scorer: string;
|
|
595
|
-
timestamp: string;
|
|
596
|
-
} | {
|
|
597
|
-
kind: 'scorer-completed';
|
|
598
|
-
scorer: string;
|
|
599
|
-
value: number;
|
|
600
|
-
timestamp: string;
|
|
601
|
-
} | {
|
|
602
|
-
kind: 'scorer-failed';
|
|
603
|
-
scorer: string;
|
|
604
|
-
error: RecordedError;
|
|
605
|
-
timestamp: string;
|
|
606
|
-
} | {
|
|
607
|
-
kind: 'trial-completed';
|
|
608
|
-
timestamp: string;
|
|
609
|
-
} | {
|
|
610
|
-
kind: 'error';
|
|
611
|
-
error: RecordedError;
|
|
612
|
-
timestamp: string;
|
|
613
|
-
};
|
|
614
|
-
type TrajectoryEvent = (AutEvent & {
|
|
615
|
-
source: 'aut';
|
|
616
|
-
}) | (RunnerEvent & {
|
|
617
|
-
source: 'runner';
|
|
618
|
-
});
|
|
619
|
-
type WorkspaceView = {
|
|
620
|
-
/** Absolute path to this trial-scoped workspace. Do not persist it in reports. */
|
|
621
|
-
root: string;
|
|
622
|
-
};
|
|
623
|
-
type CandidateWorkspace = WorkspaceView;
|
|
624
|
-
type EvaluatorWorkspace = WorkspaceView;
|
|
625
|
-
type AutContext = {
|
|
626
|
-
runId: string;
|
|
627
|
-
evalId: string;
|
|
628
|
-
trialId: string;
|
|
629
|
-
trialIndex: number;
|
|
630
|
-
metadata: JsonObject;
|
|
631
|
-
/** Run-time parameters supplied by the eval definition or CLI invocation. */
|
|
632
|
-
parameters?: JsonObject;
|
|
633
|
-
runtime?: AgentRuntimeName;
|
|
634
|
-
/** Contains only resources visible to the AUT/model. */
|
|
635
|
-
workspace: CandidateWorkspace;
|
|
636
|
-
/** Private evaluator capability for trusted AUT adapters; never expose this to the model. */
|
|
637
|
-
evaluatorWorkspace: EvaluatorWorkspace;
|
|
638
|
-
};
|
|
639
|
-
type FixtureContext = Omit<AutContext, 'workspace' | 'evaluatorWorkspace'>;
|
|
640
|
-
type AutAdapter<TMessage = string> = {
|
|
641
|
-
readonly identity?: AutIdentity;
|
|
642
|
-
/** Available execution environments for this AUT. */
|
|
643
|
-
readonly runtimes?: AgentRuntimes;
|
|
644
|
-
start(options: {
|
|
645
|
-
context: AutContext;
|
|
646
|
-
runtime?: AgentRuntime;
|
|
647
|
-
onEvent: (event: AutEvent) => void | Promise<void>;
|
|
648
|
-
}): Promise<AutSession<TMessage>>;
|
|
649
|
-
};
|
|
650
|
-
type AutSession<TMessage = string> = {
|
|
651
|
-
/** Resolves once the AUT has completed the turn initiated by this message. */
|
|
652
|
-
send(message: TMessage): Promise<void>;
|
|
653
|
-
close(): Promise<void>;
|
|
654
|
-
};
|
|
655
|
-
/**
|
|
656
|
-
* Defines an Agent Under Test without coupling it to a runtime or transport.
|
|
657
|
-
* It preserves the adapter's concrete type for application-specific helpers.
|
|
658
|
-
*/
|
|
659
|
-
declare function defineAgent<const T extends AutAdapter>(agent: T): T;
|
|
660
|
-
type FixtureVisibility = 'candidate' | 'evaluator';
|
|
661
|
-
type DirectoryFixture = {
|
|
662
|
-
kind: 'directory';
|
|
663
|
-
src: string;
|
|
664
|
-
dst: string;
|
|
665
|
-
visibility: FixtureVisibility;
|
|
666
|
-
};
|
|
667
|
-
type FileFixture = {
|
|
668
|
-
kind: 'file';
|
|
669
|
-
src: string;
|
|
670
|
-
dst: string;
|
|
671
|
-
visibility: FixtureVisibility;
|
|
672
|
-
};
|
|
673
|
-
type InlineFixture = {
|
|
674
|
-
kind: 'inline';
|
|
675
|
-
file: string;
|
|
676
|
-
data: string;
|
|
677
|
-
visibility: FixtureVisibility;
|
|
678
|
-
};
|
|
679
|
-
type DynamicFixture = {
|
|
680
|
-
kind: 'dynamic';
|
|
681
|
-
create(context: FixtureContext): Fixture | Fixture[] | Promise<Fixture | Fixture[]>;
|
|
682
|
-
};
|
|
683
|
-
type Fixture = DirectoryFixture | FileFixture | InlineFixture | DynamicFixture;
|
|
684
|
-
/**
|
|
685
|
-
* Declares a directory relative to the invoking project's working directory.
|
|
686
|
-
* The short form is candidate-visible and copies beneath the source basename.
|
|
687
|
-
*/
|
|
688
|
-
declare function directory(src: string, options?: Partial<Omit<DirectoryFixture, 'kind' | 'src'>>): DirectoryFixture;
|
|
689
|
-
declare function file(src: string, options: Omit<FileFixture, 'kind' | 'src'>): FileFixture;
|
|
690
|
-
declare function inlineFile(file: string, data: string, visibility: FixtureVisibility): InlineFixture;
|
|
691
|
-
declare function dynamic(create: DynamicFixture['create']): DynamicFixture;
|
|
692
|
-
type UserStep = {
|
|
693
|
-
kind: 'user';
|
|
694
|
-
message: string;
|
|
695
|
-
};
|
|
696
|
-
type AgentStep = {
|
|
697
|
-
kind: 'agent';
|
|
698
|
-
expectation: JsonObject;
|
|
699
|
-
};
|
|
700
|
-
type TurnView = {
|
|
701
|
-
userStepIndex: number;
|
|
702
|
-
events: readonly (AutEvent & {
|
|
703
|
-
source: 'aut';
|
|
704
|
-
})[];
|
|
705
|
-
assistantMessages: readonly (Extract<AutEvent, {
|
|
706
|
-
kind: 'message';
|
|
707
|
-
}> & {
|
|
708
|
-
role: 'assistant';
|
|
709
|
-
source: 'aut';
|
|
710
|
-
})[];
|
|
711
|
-
toolCalls: readonly {
|
|
712
|
-
eventIndex: number;
|
|
713
|
-
id: string;
|
|
714
|
-
name: string;
|
|
715
|
-
arguments: JsonValue;
|
|
716
|
-
resultObservation: 'observed' | 'absent' | 'ambiguous';
|
|
717
|
-
result?: JsonValue;
|
|
718
|
-
}[];
|
|
719
|
-
lastAssistantText?: string;
|
|
720
|
-
};
|
|
721
|
-
type ExpectToolCallStep = {
|
|
722
|
-
kind: 'expect-tool-call';
|
|
723
|
-
name: string;
|
|
724
|
-
expected: {
|
|
725
|
-
name: string;
|
|
726
|
-
arguments?: JsonValue;
|
|
727
|
-
};
|
|
728
|
-
};
|
|
729
|
-
type TranscriptStep = UserStep | AgentStep | ScoringRule | ExpectToolCallStep;
|
|
730
|
-
/** Observes a tool call in the preceding turn; never invokes a tool. */
|
|
731
|
-
declare function expectToolCall(expected: ExpectToolCallStep['expected']): ExpectToolCallStep;
|
|
732
|
-
declare function user(message: string): UserStep;
|
|
733
|
-
declare function agent(expectation: JsonObject): AgentStep;
|
|
734
|
-
type JudgeRunInfo = {
|
|
735
|
-
agent?: AutIdentity;
|
|
736
|
-
usage?: Usage;
|
|
737
|
-
/** Judge-agent observations; never attributed to the AUT trajectory. */
|
|
738
|
-
events?: JsonValue[];
|
|
739
|
-
};
|
|
740
|
-
type ScoreValue = number | {
|
|
741
|
-
value: number;
|
|
742
|
-
passed?: boolean;
|
|
743
|
-
explanation?: string;
|
|
744
|
-
evidence?: JsonValue;
|
|
745
|
-
/** Judge-agent evidence, never inferred from AUT usage. */
|
|
746
|
-
judge?: JudgeRunInfo;
|
|
747
|
-
};
|
|
748
|
-
type ScoreResult = {
|
|
749
|
-
name: string;
|
|
750
|
-
kind: 'predicate' | 'judge';
|
|
751
|
-
value?: number;
|
|
752
|
-
passed?: boolean;
|
|
753
|
-
explanation?: string;
|
|
754
|
-
evidence?: JsonValue;
|
|
755
|
-
judge?: JudgeRunInfo;
|
|
756
|
-
durationMs: number;
|
|
757
|
-
error?: RecordedError;
|
|
758
|
-
};
|
|
759
|
-
type ArtifactView = {
|
|
760
|
-
candidate: CandidateWorkspace;
|
|
761
|
-
evaluator: EvaluatorWorkspace;
|
|
762
|
-
};
|
|
763
|
-
type ScoringContext = {
|
|
764
|
-
context: AutContext;
|
|
765
|
-
trajectory: {
|
|
766
|
-
events: readonly TrajectoryEvent[];
|
|
767
|
-
};
|
|
768
|
-
artifacts: ArtifactView;
|
|
769
|
-
/** Most recent completed turn; absent if no user message has been sent. */
|
|
770
|
-
turn?: TurnView;
|
|
771
|
-
};
|
|
772
|
-
type PredicateScorer = {
|
|
773
|
-
kind: 'predicate';
|
|
774
|
-
name: string;
|
|
775
|
-
supportsPartial?: boolean;
|
|
776
|
-
run(context: ScoringContext): boolean | ScoreValue | Promise<boolean | ScoreValue>;
|
|
777
|
-
};
|
|
778
|
-
type JudgeRule = {
|
|
779
|
-
kind: 'judge';
|
|
780
|
-
name: string;
|
|
781
|
-
rubric: string;
|
|
782
|
-
/** Run even when the scenario stopped early or execution failed. */
|
|
783
|
-
supportsPartial?: boolean;
|
|
784
|
-
};
|
|
785
|
-
type ScoringRule = PredicateScorer | JudgeRule;
|
|
786
|
-
declare function predicate(name: string, run: PredicateScorer['run'], options?: Pick<PredicateScorer, 'supportsPartial'>): PredicateScorer;
|
|
787
|
-
declare function judge(name: string, options: Pick<JudgeRule, 'rubric' | 'supportsPartial'>): JudgeRule;
|
|
788
|
-
type EvalPolicy = {
|
|
789
|
-
timeoutMs?: number;
|
|
790
|
-
/** Stop later transcript steps after a failed checkpoint assertion. Default false. */
|
|
791
|
-
failfast?: boolean;
|
|
792
|
-
/** Number of independent trials requested by local and hosted runners. */
|
|
793
|
-
trials?: number;
|
|
794
|
-
};
|
|
795
|
-
type EvalDefinition<TAgent extends AutAdapter = AutAdapter> = {
|
|
796
|
-
id: string;
|
|
797
|
-
name?: string;
|
|
798
|
-
agent: TAgent;
|
|
799
|
-
/** Separate judge agent; its model and tools are never inherited from the AUT. */
|
|
800
|
-
judge?: AutAdapter;
|
|
801
|
-
fixtures?: Fixture[];
|
|
802
|
-
transcript: TranscriptStep[];
|
|
803
|
-
scoring: ScoringRule[];
|
|
804
|
-
policy?: EvalPolicy;
|
|
805
|
-
metadata?: JsonObject;
|
|
806
|
-
};
|
|
807
|
-
declare function defineEval<const T extends EvalDefinition>(definition: T): T;
|
|
808
|
-
type EvalSuite<TEvals extends readonly EvalDefinition[] = readonly EvalDefinition[]> = {
|
|
809
|
-
id: string;
|
|
810
|
-
name?: string;
|
|
811
|
-
evals: TEvals;
|
|
812
|
-
};
|
|
813
|
-
declare function defineSuite<const TSuite extends EvalSuite>(suite: TSuite): TSuite;
|
|
814
|
-
type EvalRegistration = EvalDefinition | EvalSuite | EvalMatrix;
|
|
815
|
-
declare function authoringId(value: {
|
|
816
|
-
id: string;
|
|
817
|
-
}): string;
|
|
818
|
-
type EvalRegistry = {
|
|
819
|
-
/** All registered evals, flattened from standalone entries and suites. */
|
|
820
|
-
evals: readonly EvalDefinition[];
|
|
821
|
-
suites: readonly EvalSuite[];
|
|
822
|
-
matrices: readonly EvalMatrix[];
|
|
823
|
-
get(uri: string): EvalDefinition | undefined;
|
|
824
|
-
getSuite(uri: string): EvalSuite | undefined;
|
|
825
|
-
metadata(): EvalRegistryMetadata[];
|
|
826
|
-
suiteMetadata(): EvalSuiteMetadata[];
|
|
827
|
-
catalog(): EvalCatalogEntry[];
|
|
828
|
-
};
|
|
829
|
-
type EvalRegistryMetadata = {
|
|
830
|
-
id: string;
|
|
831
|
-
name?: string;
|
|
832
|
-
suiteId?: string;
|
|
833
|
-
};
|
|
834
|
-
type EvalSuiteMetadata = {
|
|
835
|
-
id: string;
|
|
836
|
-
name?: string;
|
|
837
|
-
evalIds: string[];
|
|
838
|
-
};
|
|
839
|
-
type EvalCatalogFixture = {
|
|
840
|
-
kind: Fixture['kind'];
|
|
841
|
-
source: string;
|
|
842
|
-
destination?: string;
|
|
843
|
-
visibility?: FixtureVisibility;
|
|
844
|
-
};
|
|
845
|
-
type EvalCatalogEntry = {
|
|
846
|
-
id: string;
|
|
847
|
-
path: string;
|
|
848
|
-
name?: string;
|
|
849
|
-
suiteId?: string;
|
|
850
|
-
agent: {
|
|
851
|
-
name?: string;
|
|
852
|
-
kind: string;
|
|
853
|
-
id?: string;
|
|
854
|
-
version?: string;
|
|
855
|
-
runtimes: Array<{
|
|
856
|
-
name: AgentRuntimeName;
|
|
857
|
-
kind: string;
|
|
858
|
-
}>;
|
|
859
|
-
};
|
|
860
|
-
fixtures: EvalCatalogFixture[];
|
|
861
|
-
trialCount: number;
|
|
862
|
-
scorers: Array<{
|
|
863
|
-
name: string;
|
|
864
|
-
kind: ScoringRule['kind'];
|
|
865
|
-
}>;
|
|
866
|
-
};
|
|
867
|
-
/**
|
|
868
|
-
* Creates an explicit, statically imported eval registry. A suite is a
|
|
869
|
-
* path-like grouping of evals; nesting is presentation derived from its ID.
|
|
870
|
-
*/
|
|
871
|
-
declare function registerEvals<const TRegistrations extends readonly EvalRegistration[]>(registrations: TRegistrations): EvalRegistry;
|
|
872
|
-
type RunStatus = 'running' | 'completed' | 'failed' | 'cancelled';
|
|
873
|
-
/**
|
|
874
|
-
* Where a run's eval code came from: the repository, eval project and commit.
|
|
875
|
-
* Results are tagged with it; they are never stored in the repository itself.
|
|
876
|
-
*/
|
|
877
|
-
type RunSource = {
|
|
878
|
-
/** Normalized repository key, e.g. `gitlab.example.com/group/repo`. */
|
|
879
|
-
repo: string;
|
|
880
|
-
/** Eval project directory relative to the repository root; `""` at the root. */
|
|
881
|
-
project: string;
|
|
882
|
-
/** Full commit SHA. */
|
|
883
|
-
commit: string;
|
|
884
|
-
ref?: string;
|
|
885
|
-
committedAt?: string;
|
|
886
|
-
/** True when the working tree had uncommitted changes at run time. */
|
|
887
|
-
dirty: boolean;
|
|
888
|
-
ci?: {
|
|
889
|
-
provider: string;
|
|
890
|
-
pipeline?: string;
|
|
891
|
-
job?: string;
|
|
892
|
-
url?: string;
|
|
893
|
-
};
|
|
894
|
-
};
|
|
895
|
-
/** The project's evals and suites when a run started; written beside its manifest. */
|
|
896
|
-
type RunCatalog = {
|
|
897
|
-
catalog: EvalCatalogEntry[];
|
|
898
|
-
evals: EvalRegistryMetadata[];
|
|
899
|
-
suites: EvalSuiteMetadata[];
|
|
900
|
-
};
|
|
901
|
-
type RunMetadata = {
|
|
902
|
-
schemaVersion: 2 | 3 | 4;
|
|
903
|
-
runId: string;
|
|
904
|
-
runUri: ResourceUri<'run'>;
|
|
905
|
-
evalId: string;
|
|
906
|
-
suiteId?: string;
|
|
907
|
-
parameters?: JsonObject;
|
|
908
|
-
matrix?: {
|
|
909
|
-
id: string;
|
|
910
|
-
cellKey: string;
|
|
911
|
-
};
|
|
912
|
-
aut?: AutIdentity;
|
|
913
|
-
startedAt: string;
|
|
914
|
-
/** Present from schema version 4 when the run's commit could be determined. */
|
|
915
|
-
source?: RunSource;
|
|
916
|
-
};
|
|
917
|
-
type TrialMetadata = {
|
|
918
|
-
schemaVersion: 2 | 3 | 4;
|
|
919
|
-
runId: string;
|
|
920
|
-
runUri: ResourceUri<'run'>;
|
|
921
|
-
trialId: string;
|
|
922
|
-
trialUri: ResourceUri<'trial'>;
|
|
923
|
-
trialIndex: number;
|
|
924
|
-
evalId: string;
|
|
925
|
-
parameters?: JsonObject;
|
|
926
|
-
matrix?: {
|
|
927
|
-
id: string;
|
|
928
|
-
cellKey: string;
|
|
929
|
-
};
|
|
930
|
-
aut?: AutIdentity;
|
|
931
|
-
startedAt: string;
|
|
932
|
-
};
|
|
933
|
-
type CheckpointResult = {
|
|
934
|
-
step: number;
|
|
935
|
-
kind: 'predicate' | 'judge' | 'expect-tool-call';
|
|
936
|
-
name: string;
|
|
937
|
-
status: 'passed' | 'failed' | 'error' | 'skipped';
|
|
938
|
-
value?: number;
|
|
939
|
-
passed?: boolean;
|
|
940
|
-
explanation?: string;
|
|
941
|
-
evidence?: JsonValue;
|
|
942
|
-
judge?: JudgeRunInfo;
|
|
943
|
-
durationMs?: number;
|
|
944
|
-
error?: RecordedError;
|
|
945
|
-
matchedToolCall?: {
|
|
946
|
-
eventIndex: number;
|
|
947
|
-
id: string;
|
|
948
|
-
};
|
|
949
|
-
};
|
|
950
|
-
type TrialScoring = {
|
|
951
|
-
results: ScoreResult[];
|
|
952
|
-
checkpoints?: CheckpointResult[];
|
|
953
|
-
skippedScorers?: string[];
|
|
954
|
-
overall?: number;
|
|
955
|
-
passed: boolean;
|
|
956
|
-
};
|
|
957
|
-
type ArtifactEntry = {
|
|
958
|
-
/** Path relative to this trial's artifact root. */
|
|
959
|
-
path: string;
|
|
960
|
-
kind: 'file' | 'directory';
|
|
961
|
-
size?: number;
|
|
962
|
-
};
|
|
963
|
-
type TrialSummary = {
|
|
964
|
-
status: RunStatus;
|
|
965
|
-
endedAt: string;
|
|
966
|
-
durationMs?: number;
|
|
967
|
-
scoring?: TrialScoring;
|
|
968
|
-
artifacts?: ArtifactEntry[];
|
|
969
|
-
error?: RecordedError;
|
|
970
|
-
};
|
|
971
|
-
type RunSummary = {
|
|
972
|
-
status: RunStatus;
|
|
973
|
-
endedAt: string;
|
|
974
|
-
durationMs?: number;
|
|
975
|
-
trialCount: number;
|
|
976
|
-
passed: number;
|
|
977
|
-
failed: number;
|
|
978
|
-
error?: RecordedError;
|
|
979
|
-
};
|
|
980
|
-
type TrialWriter = {
|
|
981
|
-
appendEvent(event: TrajectoryEvent): Promise<void>;
|
|
982
|
-
writeScores(scoring: TrialScoring): Promise<void>;
|
|
983
|
-
/** Writes a file below this trial's artifact root. */
|
|
984
|
-
writeArtifact(path: string, data: Uint8Array): Promise<void>;
|
|
985
|
-
finalize(summary: TrialSummary): Promise<void>;
|
|
986
|
-
};
|
|
987
|
-
type RunWriter = {
|
|
988
|
-
readonly location: string;
|
|
989
|
-
startTrial(metadata: TrialMetadata): Promise<TrialWriter>;
|
|
990
|
-
finalize(summary: RunSummary): Promise<void>;
|
|
991
|
-
};
|
|
992
|
-
type ReportStore = {
|
|
993
|
-
startRun(metadata: RunMetadata, context?: {
|
|
994
|
-
catalog?: RunCatalog;
|
|
995
|
-
}): Promise<RunWriter>;
|
|
996
|
-
};
|
|
997
|
-
type TrialResult = {
|
|
998
|
-
runId: string;
|
|
999
|
-
runUri: ResourceUri<'run'>;
|
|
1000
|
-
trialId: string;
|
|
1001
|
-
trialUri: ResourceUri<'trial'>;
|
|
1002
|
-
trialIndex: number;
|
|
1003
|
-
evalId: string;
|
|
1004
|
-
status: RunStatus;
|
|
1005
|
-
reportLocation: string;
|
|
1006
|
-
durationMs?: number;
|
|
1007
|
-
scoring?: TrialScoring;
|
|
1008
|
-
error?: RecordedError;
|
|
1009
|
-
};
|
|
1010
|
-
type AggregateScoring = {
|
|
1011
|
-
passed: number;
|
|
1012
|
-
failed: number;
|
|
1013
|
-
passRate: number;
|
|
1014
|
-
overall?: number;
|
|
1015
|
-
};
|
|
1016
|
-
type RunResult = TrialResult & {
|
|
1017
|
-
runId: string;
|
|
1018
|
-
trialCount?: number;
|
|
1019
|
-
passed?: number;
|
|
1020
|
-
failed?: number;
|
|
1021
|
-
aggregateScoring?: AggregateScoring;
|
|
1022
|
-
/** Present for an aggregate multi-trial run. */
|
|
1023
|
-
trials?: TrialResult[];
|
|
1024
|
-
};
|
|
1025
|
-
declare function recordError(error: unknown): RecordedError;
|
|
1026
|
-
//#endregion
|
|
1027
|
-
export { TrajectoryEvent as $, canonicalParameters as $t, FixtureContext as A, JsonValueSchema as At, ReportStore as B, TrialManifestSchema as Bt, EvalRegistryMetadata as C, registerEvals as Ct, ExpectToolCallStep as D, ArtifactEntrySchema as Dt, EvaluatorWorkspace as E, ApiErrorSchema as Et, JsonValue as F, RunSourceSchema as Ft, RunStatus as G, EvalkitConfig as Gt, RunMetadata as H, TrialScoringSchema as Ht, JudgeRule as I, RunStatusSchema as It, RunnerEvent as J, defineConfig as Jt, RunSummary as K, ShareConfig as Kt, JudgeRunInfo as L, RunSummarySchema as Lt, InlineFixture as M, RecordedErrorSchema as Mt, JsonObject as N, RunManifestSchema as Nt, FileFixture as O, AutIdentitySchema as Ot, JsonPrimitive as P, RunMetadataSchema as Pt, ScoringRule as Q, defineEvalMatrix as Qt, PredicateScorer as R, ScoreResultSchema as Rt, EvalRegistry as S, recordError as St, EvalSuiteMetadata as T, parseTrajectoryJsonl as Tt, RunResult as U, TrialSummarySchema as Ut, RunCatalog as V, TrialMetadataSchema as Vt, RunSource as W, UsageSchema as Wt, ScoreValue as X, EvalMatrixCell as Xt, ScoreResult as Y, EvalMatrix as Yt, ScoringContext as Z, MatrixSelection as Zt, EvalCatalogEntry as _, expectToolCall as _t, AggregateScoring as a, UuidSchema as an, TrialWriter as at, EvalPolicy as b, judge as bt, AutAdapter as c, resourceUri as cn, UserStep as ct, AutIdentity as d, authoringId as dt, ResourceKind as en, TranscriptStep as et, AutSession as f, defineAgent as ft, DynamicFixture as g, dynamic as gt, DirectoryFixture as h, directory as ht, AgentStep as i, Uuid as in, TrialSummary as it, FixtureVisibility as j, JudgeRunInfoSchema as jt, Fixture as k, CheckpointResultSchema as kt, AutContext as l, resourceUriSchema as ln, WorkspaceView as lt, CheckpointResult as m, defineSuite as mt, AgentRuntimeName as n, ResourceUri as nn, TrialResult as nt, ArtifactEntry as o, authorId as on, TurnView as ot, CandidateWorkspace as p, defineEval as pt, RunWriter as q, ShareHeaders as qt, AgentRuntimes as r, ResourceUriSchema as rn, TrialScoring as rt, ArtifactView as s, parseResourceUri as sn, Usage as st, AgentRuntime as t, ResourceKindSchema as tn, TrialMetadata as tt, AutEvent as u, resourceUuid as un, agent as ut, EvalCatalogFixture as v, file as vt, EvalSuite as w, user as wt, EvalRegistration as x, predicate as xt, EvalDefinition as y, inlineFile as yt, RecordedError as z, TrajectoryEventSchema as zt };
|
|
1028
|
-
//# sourceMappingURL=index-lOw0fmak.d.mts.map
|