@leostera/evalkit 0.9.0 → 0.10.0
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 +48 -1
- package/README.md +3 -2
- package/dist/cli.mjs +139 -29
- package/dist/dashboard/assets/{index-By1SJ1on.js → index-DNR4shrM.js} +32 -31
- package/dist/dashboard/assets/index-TPYprg75.css +2 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/{index-db-BbVblaHz.mjs → index-db-B1FeXzmS.mjs} +1 -1
- package/dist/index.d.mts +313 -9
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/runner.d.mts +222 -6
- package/dist/runner.d.mts.map +1 -1
- package/dist/runner.mjs +1 -1
- package/dist/share-worker.mjs +1 -1
- package/dist/share.mjs +2 -2
- package/dist/skills/evalkit/SKILL.md +2 -2
- package/dist/skills/evalkit-evals/SKILL.md +1 -1
- package/dist/skills/evalkit-judges/SKILL.md +3 -3
- package/dist/skills/evalkit-results/SKILL.md +1 -1
- package/dist/{src-BrfIXfO2.mjs → src-B14fXAGp.mjs} +264 -21
- package/dist/{src-Bn6fnZnF.mjs → src-Bccv9igQ.mjs} +1 -1
- package/dist/{src-CcdLZqFk.mjs → src-BfSQKOJP.mjs} +260 -97
- package/dist/{upgrade-60SIRius.mjs → upgrade-G-uFPJKg.mjs} +1 -0
- package/package.json +1 -1
- package/dist/dashboard/assets/index-geXMXCx9.css +0 -2
package/dist/index.d.mts
CHANGED
|
@@ -144,6 +144,8 @@ export type AutEventInput = {
|
|
|
144
144
|
timestamp?: string;
|
|
145
145
|
latencyMs?: number;
|
|
146
146
|
usage?: Usage;
|
|
147
|
+
/** The model that answered this turn, when the agent knows it. */
|
|
148
|
+
model?: string;
|
|
147
149
|
} | {
|
|
148
150
|
kind: 'completed';
|
|
149
151
|
output?: unknown;
|
|
@@ -165,6 +167,8 @@ export type TurnResult = string | {
|
|
|
165
167
|
reply?: unknown;
|
|
166
168
|
toolCalls?: readonly TurnToolCall[];
|
|
167
169
|
usage?: Usage;
|
|
170
|
+
/** The model that answered, recorded with the usage. */
|
|
171
|
+
model?: string;
|
|
168
172
|
};
|
|
169
173
|
/** Converts an adapter event into a recorded `AutEvent`. */
|
|
170
174
|
export declare function normalizeAutEvent(input: AutEventInput, now: () => Date): AutEvent;
|
|
@@ -174,6 +178,89 @@ export declare function normalizeAutEvent(input: AutEventInput, now: () => Date)
|
|
|
174
178
|
*/
|
|
175
179
|
export declare function turnResultEvents(result: TurnResult, turn: number, now: () => Date): AutEvent[];
|
|
176
180
|
//#endregion
|
|
181
|
+
//#region ../core/src/judge.d.ts
|
|
182
|
+
/**
|
|
183
|
+
* How a judge must answer, and how EvalKit turns the answer into a score.
|
|
184
|
+
*
|
|
185
|
+
* - `verdict` (the default): a value from 0 to 1 and a reason, as JSON.
|
|
186
|
+
* - `choices`: one of a fixed set of answers, such as A/B/C, each worth a value.
|
|
187
|
+
* - `criteria`: a value from 0 to 1 per criterion; the score is their weighted mean.
|
|
188
|
+
*/
|
|
189
|
+
type JudgeAnswer = {
|
|
190
|
+
kind: 'verdict';
|
|
191
|
+
} | {
|
|
192
|
+
kind: 'choices';
|
|
193
|
+
choices: JudgeChoice[];
|
|
194
|
+
} | {
|
|
195
|
+
kind: 'criteria';
|
|
196
|
+
criteria: JudgeCriterion[];
|
|
197
|
+
};
|
|
198
|
+
/** One answer a `choices` judge can give. Keys are matched case-insensitively. */
|
|
199
|
+
type JudgeChoice = {
|
|
200
|
+
key: string;
|
|
201
|
+
label: string;
|
|
202
|
+
value: number;
|
|
203
|
+
};
|
|
204
|
+
/** One thing a `criteria` judge scores. */
|
|
205
|
+
type JudgeCriterion = {
|
|
206
|
+
name: string;
|
|
207
|
+
weight: number;
|
|
208
|
+
description?: string;
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* A judge that answers with one of these choices, in this order:
|
|
212
|
+
* `choices({ A: ['Accurate and helpful', 1], B: ['Partly right', 0.5], C: ['Wrong', 0] })`.
|
|
213
|
+
*/
|
|
214
|
+
export declare function choices(options: Record<string, readonly [label: string, value: number]>): JudgeAnswer;
|
|
215
|
+
/**
|
|
216
|
+
* Criteria by name: a number is the weight; `{ weight, description }` also
|
|
217
|
+
* says what the criterion checks. Weights default to 1.
|
|
218
|
+
*/
|
|
219
|
+
type CriteriaOptions = Record<string, number | {
|
|
220
|
+
weight?: number;
|
|
221
|
+
description?: string;
|
|
222
|
+
}>;
|
|
223
|
+
/**
|
|
224
|
+
* A judge that scores each criterion from 0 to 1; the score is the weighted
|
|
225
|
+
* mean. A number is the weight; `{ weight, description }` also says what the
|
|
226
|
+
* criterion means. Weights default to 1.
|
|
227
|
+
*/
|
|
228
|
+
export declare function criteria(options: CriteriaOptions): JudgeAnswer;
|
|
229
|
+
/**
|
|
230
|
+
* One criterion's result, as a scorer returns it and as results record it:
|
|
231
|
+
* a value with what it saw, or `reached: false` when the check never got to
|
|
232
|
+
* run, because something before it failed (say, the app would not start).
|
|
233
|
+
* A criterion not reached counts as 0; the score's `explanation` says why,
|
|
234
|
+
* once, instead of every criterion repeating it.
|
|
235
|
+
*/
|
|
236
|
+
type CriterionResult = ReachedCriterion | UnreachedCriterion;
|
|
237
|
+
type ReachedCriterion = {
|
|
238
|
+
name: string;
|
|
239
|
+
/** From 0 to 1. */
|
|
240
|
+
value: number;
|
|
241
|
+
/** Default 1, or the declared weight. */
|
|
242
|
+
weight?: number;
|
|
243
|
+
/** Why this value. */
|
|
244
|
+
explanation?: string;
|
|
245
|
+
/** What the check observed, as plain data. */
|
|
246
|
+
evidence?: JsonValue;
|
|
247
|
+
};
|
|
248
|
+
type UnreachedCriterion = {
|
|
249
|
+
name: string;
|
|
250
|
+
reached: false;
|
|
251
|
+
weight?: number;
|
|
252
|
+
explanation?: string;
|
|
253
|
+
};
|
|
254
|
+
/** A criterion as a scorer returns it: its evidence may be any plain value. */
|
|
255
|
+
type CriterionInput = (Omit<ReachedCriterion, 'evidence'> & {
|
|
256
|
+
evidence?: unknown;
|
|
257
|
+
}) | UnreachedCriterion;
|
|
258
|
+
/**
|
|
259
|
+
* The pass mark in words: `only 1`, `≥ 0.5`, or for choices the ones that
|
|
260
|
+
* pass, such as `A or B`.
|
|
261
|
+
*/
|
|
262
|
+
export declare function passMark(passAt: number | undefined, answer?: JudgeAnswer): string;
|
|
263
|
+
//#endregion
|
|
177
264
|
//#region ../core/src/catalog.d.ts
|
|
178
265
|
/**
|
|
179
266
|
* What the dashboard's Library shows about each definition. Only definition
|
|
@@ -184,6 +271,8 @@ export declare function turnResultEvents(result: TurnResult, turn: number, now:
|
|
|
184
271
|
export type CatalogOptions = {
|
|
185
272
|
/** Project root; definition sites are reported relative to it, never absolute. */
|
|
186
273
|
root?: string;
|
|
274
|
+
/** The project's default judge agent (`judge` in evalkit.config.ts). */
|
|
275
|
+
judge?: AutAdapter;
|
|
187
276
|
};
|
|
188
277
|
export type EvalCatalogAgent = {
|
|
189
278
|
name?: string;
|
|
@@ -235,10 +324,20 @@ export type EvalCatalogDataset = {
|
|
|
235
324
|
export type EvalCatalogScorer = {
|
|
236
325
|
name: string;
|
|
237
326
|
kind: ScoringRule['kind'];
|
|
327
|
+
/** What it checks, in the author's words. */
|
|
328
|
+
description?: string;
|
|
238
329
|
passAt?: number;
|
|
239
330
|
supportsPartial?: boolean;
|
|
240
331
|
/** Judges only. */
|
|
241
332
|
rubric?: string;
|
|
333
|
+
/** Judges only: the agent that judges (its own, or the project's default). */
|
|
334
|
+
agent?: EvalCatalogAgent;
|
|
335
|
+
/** Judges only: the names of the inputs it sees. */
|
|
336
|
+
inputs?: string[];
|
|
337
|
+
/** Judges only: how it answers. */
|
|
338
|
+
answer?: JudgeAnswer;
|
|
339
|
+
/** Judges only: the prompt it receives, with `{input}` placeholders. */
|
|
340
|
+
prompt?: string;
|
|
242
341
|
definedAt?: string;
|
|
243
342
|
};
|
|
244
343
|
export type EvalCatalogStep =
|
|
@@ -355,11 +454,21 @@ type EvalkitConfig = {
|
|
|
355
454
|
/** Limits for files adapters `attach()`. */
|
|
356
455
|
attachments?: AttachmentLimits;
|
|
357
456
|
};
|
|
358
|
-
/**
|
|
457
|
+
/**
|
|
458
|
+
* Where each run's real workspace lives. Default: outside the project, in
|
|
459
|
+
* `<tmp>/evalkit/<project>-<hash>`, so agents cannot read the project or
|
|
460
|
+
* other runs by looking around. Inside the project, `run` warns.
|
|
461
|
+
*/
|
|
359
462
|
sandboxDir?: string;
|
|
360
463
|
/** Which run workspaces to keep in `sandboxDir` afterwards. Default `'failed'`: only runs that did not pass. */
|
|
361
464
|
keepSandboxes?: KeepSandboxes;
|
|
362
465
|
share?: ShareConfig;
|
|
466
|
+
/**
|
|
467
|
+
* The agent for every judge that names none: `judge(name, { rubric })`.
|
|
468
|
+
* Made with `defineAgent()`; it gets each run's parameters, so a matrix
|
|
469
|
+
* axis can choose its model.
|
|
470
|
+
*/
|
|
471
|
+
judge?: AutAdapter;
|
|
363
472
|
};
|
|
364
473
|
type KeepSandboxes = 'failed' | 'all' | 'none';
|
|
365
474
|
type AttachmentLimits = {
|
|
@@ -600,15 +709,34 @@ export declare const JudgeRunInfoSchema: Schema.Struct<{
|
|
|
600
709
|
name: Schema.optional<typeof Schema.String>;
|
|
601
710
|
version: Schema.optional<typeof Schema.String>;
|
|
602
711
|
}>>;
|
|
712
|
+
model: Schema.optional<typeof Schema.String>;
|
|
603
713
|
usage: Schema.optional<Schema.Struct<{
|
|
604
714
|
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
605
715
|
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
606
716
|
cachedInputTokens: Schema.optional<typeof Schema.Number>;
|
|
607
717
|
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
608
718
|
}>>;
|
|
719
|
+
prompt: Schema.optional<typeof Schema.String>;
|
|
720
|
+
reply: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
721
|
+
attempts: Schema.optional<typeof Schema.Number>;
|
|
609
722
|
events: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
|
|
610
723
|
}>;
|
|
611
724
|
export declare const ScoreResultSchema: Schema.Struct<{
|
|
725
|
+
passAt: Schema.optional<typeof Schema.Number>;
|
|
726
|
+
choice: Schema.optional<typeof Schema.String>;
|
|
727
|
+
criteria: Schema.optional<Schema.mutable<Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
728
|
+
name: typeof Schema.String;
|
|
729
|
+
value: typeof Schema.Number;
|
|
730
|
+
weight: Schema.optional<typeof Schema.Number>;
|
|
731
|
+
explanation: Schema.optional<typeof Schema.String>;
|
|
732
|
+
evidence: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
733
|
+
}>, Schema.Struct<{
|
|
734
|
+
name: typeof Schema.String;
|
|
735
|
+
reached: Schema.Literal<[false]>;
|
|
736
|
+
weight: Schema.optional<typeof Schema.Number>;
|
|
737
|
+
explanation: Schema.optional<typeof Schema.String>;
|
|
738
|
+
}>]>>>>;
|
|
739
|
+
attachments: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
|
|
612
740
|
name: typeof Schema.String;
|
|
613
741
|
kind: Schema.Literal<["predicate", "judge"]>;
|
|
614
742
|
value: Schema.optional<typeof Schema.Number>;
|
|
@@ -622,12 +750,16 @@ export declare const ScoreResultSchema: Schema.Struct<{
|
|
|
622
750
|
name: Schema.optional<typeof Schema.String>;
|
|
623
751
|
version: Schema.optional<typeof Schema.String>;
|
|
624
752
|
}>>;
|
|
753
|
+
model: Schema.optional<typeof Schema.String>;
|
|
625
754
|
usage: Schema.optional<Schema.Struct<{
|
|
626
755
|
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
627
756
|
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
628
757
|
cachedInputTokens: Schema.optional<typeof Schema.Number>;
|
|
629
758
|
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
630
759
|
}>>;
|
|
760
|
+
prompt: Schema.optional<typeof Schema.String>;
|
|
761
|
+
reply: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
762
|
+
attempts: Schema.optional<typeof Schema.Number>;
|
|
631
763
|
events: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
|
|
632
764
|
}>>;
|
|
633
765
|
durationMs: typeof Schema.Number;
|
|
@@ -639,6 +771,21 @@ export declare const ScoreResultSchema: Schema.Struct<{
|
|
|
639
771
|
skipped: Schema.optional<Schema.Literal<[true]>>;
|
|
640
772
|
}>;
|
|
641
773
|
export declare const CheckpointResultSchema: Schema.Struct<{
|
|
774
|
+
passAt: Schema.optional<typeof Schema.Number>;
|
|
775
|
+
choice: Schema.optional<typeof Schema.String>;
|
|
776
|
+
criteria: Schema.optional<Schema.mutable<Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
777
|
+
name: typeof Schema.String;
|
|
778
|
+
value: typeof Schema.Number;
|
|
779
|
+
weight: Schema.optional<typeof Schema.Number>;
|
|
780
|
+
explanation: Schema.optional<typeof Schema.String>;
|
|
781
|
+
evidence: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
782
|
+
}>, Schema.Struct<{
|
|
783
|
+
name: typeof Schema.String;
|
|
784
|
+
reached: Schema.Literal<[false]>;
|
|
785
|
+
weight: Schema.optional<typeof Schema.Number>;
|
|
786
|
+
explanation: Schema.optional<typeof Schema.String>;
|
|
787
|
+
}>]>>>>;
|
|
788
|
+
attachments: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
|
|
642
789
|
step: typeof Schema.Number;
|
|
643
790
|
kind: Schema.Literal<["predicate", "judge", "expect-tool-call"]>;
|
|
644
791
|
name: typeof Schema.String;
|
|
@@ -654,12 +801,16 @@ export declare const CheckpointResultSchema: Schema.Struct<{
|
|
|
654
801
|
name: Schema.optional<typeof Schema.String>;
|
|
655
802
|
version: Schema.optional<typeof Schema.String>;
|
|
656
803
|
}>>;
|
|
804
|
+
model: Schema.optional<typeof Schema.String>;
|
|
657
805
|
usage: Schema.optional<Schema.Struct<{
|
|
658
806
|
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
659
807
|
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
660
808
|
cachedInputTokens: Schema.optional<typeof Schema.Number>;
|
|
661
809
|
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
662
810
|
}>>;
|
|
811
|
+
prompt: Schema.optional<typeof Schema.String>;
|
|
812
|
+
reply: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
813
|
+
attempts: Schema.optional<typeof Schema.Number>;
|
|
663
814
|
events: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
|
|
664
815
|
}>>;
|
|
665
816
|
durationMs: Schema.optional<typeof Schema.Number>;
|
|
@@ -687,6 +838,21 @@ export declare const MetricResultSchema: Schema.Struct<{
|
|
|
687
838
|
}>;
|
|
688
839
|
export declare const RunScoringSchema: Schema.Struct<{
|
|
689
840
|
results: Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
841
|
+
passAt: Schema.optional<typeof Schema.Number>;
|
|
842
|
+
choice: Schema.optional<typeof Schema.String>;
|
|
843
|
+
criteria: Schema.optional<Schema.mutable<Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
844
|
+
name: typeof Schema.String;
|
|
845
|
+
value: typeof Schema.Number;
|
|
846
|
+
weight: Schema.optional<typeof Schema.Number>;
|
|
847
|
+
explanation: Schema.optional<typeof Schema.String>;
|
|
848
|
+
evidence: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
849
|
+
}>, Schema.Struct<{
|
|
850
|
+
name: typeof Schema.String;
|
|
851
|
+
reached: Schema.Literal<[false]>;
|
|
852
|
+
weight: Schema.optional<typeof Schema.Number>;
|
|
853
|
+
explanation: Schema.optional<typeof Schema.String>;
|
|
854
|
+
}>]>>>>;
|
|
855
|
+
attachments: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
|
|
690
856
|
name: typeof Schema.String;
|
|
691
857
|
kind: Schema.Literal<["predicate", "judge"]>;
|
|
692
858
|
value: Schema.optional<typeof Schema.Number>;
|
|
@@ -700,12 +866,16 @@ export declare const RunScoringSchema: Schema.Struct<{
|
|
|
700
866
|
name: Schema.optional<typeof Schema.String>;
|
|
701
867
|
version: Schema.optional<typeof Schema.String>;
|
|
702
868
|
}>>;
|
|
869
|
+
model: Schema.optional<typeof Schema.String>;
|
|
703
870
|
usage: Schema.optional<Schema.Struct<{
|
|
704
871
|
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
705
872
|
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
706
873
|
cachedInputTokens: Schema.optional<typeof Schema.Number>;
|
|
707
874
|
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
708
875
|
}>>;
|
|
876
|
+
prompt: Schema.optional<typeof Schema.String>;
|
|
877
|
+
reply: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
878
|
+
attempts: Schema.optional<typeof Schema.Number>;
|
|
709
879
|
events: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
|
|
710
880
|
}>>;
|
|
711
881
|
durationMs: typeof Schema.Number;
|
|
@@ -729,6 +899,21 @@ export declare const RunScoringSchema: Schema.Struct<{
|
|
|
729
899
|
}>>;
|
|
730
900
|
}>>>>;
|
|
731
901
|
checkpoints: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
902
|
+
passAt: Schema.optional<typeof Schema.Number>;
|
|
903
|
+
choice: Schema.optional<typeof Schema.String>;
|
|
904
|
+
criteria: Schema.optional<Schema.mutable<Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
905
|
+
name: typeof Schema.String;
|
|
906
|
+
value: typeof Schema.Number;
|
|
907
|
+
weight: Schema.optional<typeof Schema.Number>;
|
|
908
|
+
explanation: Schema.optional<typeof Schema.String>;
|
|
909
|
+
evidence: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
910
|
+
}>, Schema.Struct<{
|
|
911
|
+
name: typeof Schema.String;
|
|
912
|
+
reached: Schema.Literal<[false]>;
|
|
913
|
+
weight: Schema.optional<typeof Schema.Number>;
|
|
914
|
+
explanation: Schema.optional<typeof Schema.String>;
|
|
915
|
+
}>]>>>>;
|
|
916
|
+
attachments: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
|
|
732
917
|
step: typeof Schema.Number;
|
|
733
918
|
kind: Schema.Literal<["predicate", "judge", "expect-tool-call"]>;
|
|
734
919
|
name: typeof Schema.String;
|
|
@@ -744,12 +929,16 @@ export declare const RunScoringSchema: Schema.Struct<{
|
|
|
744
929
|
name: Schema.optional<typeof Schema.String>;
|
|
745
930
|
version: Schema.optional<typeof Schema.String>;
|
|
746
931
|
}>>;
|
|
932
|
+
model: Schema.optional<typeof Schema.String>;
|
|
747
933
|
usage: Schema.optional<Schema.Struct<{
|
|
748
934
|
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
749
935
|
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
750
936
|
cachedInputTokens: Schema.optional<typeof Schema.Number>;
|
|
751
937
|
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
752
938
|
}>>;
|
|
939
|
+
prompt: Schema.optional<typeof Schema.String>;
|
|
940
|
+
reply: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
941
|
+
attempts: Schema.optional<typeof Schema.Number>;
|
|
753
942
|
events: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
|
|
754
943
|
}>>;
|
|
755
944
|
durationMs: Schema.optional<typeof Schema.Number>;
|
|
@@ -783,6 +972,21 @@ export declare const RunSummarySchema: Schema.Struct<{
|
|
|
783
972
|
durationMs: Schema.optional<typeof Schema.Number>;
|
|
784
973
|
scoring: Schema.optional<Schema.Struct<{
|
|
785
974
|
results: Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
975
|
+
passAt: Schema.optional<typeof Schema.Number>;
|
|
976
|
+
choice: Schema.optional<typeof Schema.String>;
|
|
977
|
+
criteria: Schema.optional<Schema.mutable<Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
978
|
+
name: typeof Schema.String;
|
|
979
|
+
value: typeof Schema.Number;
|
|
980
|
+
weight: Schema.optional<typeof Schema.Number>;
|
|
981
|
+
explanation: Schema.optional<typeof Schema.String>;
|
|
982
|
+
evidence: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
983
|
+
}>, Schema.Struct<{
|
|
984
|
+
name: typeof Schema.String;
|
|
985
|
+
reached: Schema.Literal<[false]>;
|
|
986
|
+
weight: Schema.optional<typeof Schema.Number>;
|
|
987
|
+
explanation: Schema.optional<typeof Schema.String>;
|
|
988
|
+
}>]>>>>;
|
|
989
|
+
attachments: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
|
|
786
990
|
name: typeof Schema.String;
|
|
787
991
|
kind: Schema.Literal<["predicate", "judge"]>;
|
|
788
992
|
value: Schema.optional<typeof Schema.Number>;
|
|
@@ -796,12 +1000,16 @@ export declare const RunSummarySchema: Schema.Struct<{
|
|
|
796
1000
|
name: Schema.optional<typeof Schema.String>;
|
|
797
1001
|
version: Schema.optional<typeof Schema.String>;
|
|
798
1002
|
}>>;
|
|
1003
|
+
model: Schema.optional<typeof Schema.String>;
|
|
799
1004
|
usage: Schema.optional<Schema.Struct<{
|
|
800
1005
|
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
801
1006
|
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
802
1007
|
cachedInputTokens: Schema.optional<typeof Schema.Number>;
|
|
803
1008
|
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
804
1009
|
}>>;
|
|
1010
|
+
prompt: Schema.optional<typeof Schema.String>;
|
|
1011
|
+
reply: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
1012
|
+
attempts: Schema.optional<typeof Schema.Number>;
|
|
805
1013
|
events: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
|
|
806
1014
|
}>>;
|
|
807
1015
|
durationMs: typeof Schema.Number;
|
|
@@ -825,6 +1033,21 @@ export declare const RunSummarySchema: Schema.Struct<{
|
|
|
825
1033
|
}>>;
|
|
826
1034
|
}>>>>;
|
|
827
1035
|
checkpoints: Schema.optional<Schema.mutable<Schema.Array$<Schema.Struct<{
|
|
1036
|
+
passAt: Schema.optional<typeof Schema.Number>;
|
|
1037
|
+
choice: Schema.optional<typeof Schema.String>;
|
|
1038
|
+
criteria: Schema.optional<Schema.mutable<Schema.Array$<Schema.Union<[Schema.Struct<{
|
|
1039
|
+
name: typeof Schema.String;
|
|
1040
|
+
value: typeof Schema.Number;
|
|
1041
|
+
weight: Schema.optional<typeof Schema.Number>;
|
|
1042
|
+
explanation: Schema.optional<typeof Schema.String>;
|
|
1043
|
+
evidence: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
1044
|
+
}>, Schema.Struct<{
|
|
1045
|
+
name: typeof Schema.String;
|
|
1046
|
+
reached: Schema.Literal<[false]>;
|
|
1047
|
+
weight: Schema.optional<typeof Schema.Number>;
|
|
1048
|
+
explanation: Schema.optional<typeof Schema.String>;
|
|
1049
|
+
}>]>>>>;
|
|
1050
|
+
attachments: Schema.optional<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
|
|
828
1051
|
step: typeof Schema.Number;
|
|
829
1052
|
kind: Schema.Literal<["predicate", "judge", "expect-tool-call"]>;
|
|
830
1053
|
name: typeof Schema.String;
|
|
@@ -840,12 +1063,16 @@ export declare const RunSummarySchema: Schema.Struct<{
|
|
|
840
1063
|
name: Schema.optional<typeof Schema.String>;
|
|
841
1064
|
version: Schema.optional<typeof Schema.String>;
|
|
842
1065
|
}>>;
|
|
1066
|
+
model: Schema.optional<typeof Schema.String>;
|
|
843
1067
|
usage: Schema.optional<Schema.Struct<{
|
|
844
1068
|
inputTokens: Schema.optional<typeof Schema.Number>;
|
|
845
1069
|
outputTokens: Schema.optional<typeof Schema.Number>;
|
|
846
1070
|
cachedInputTokens: Schema.optional<typeof Schema.Number>;
|
|
847
1071
|
totalTokens: Schema.optional<typeof Schema.Number>;
|
|
848
1072
|
}>>;
|
|
1073
|
+
prompt: Schema.optional<typeof Schema.String>;
|
|
1074
|
+
reply: Schema.optional<Schema.Schema<JsonValue, JsonValue, never>>;
|
|
1075
|
+
attempts: Schema.optional<typeof Schema.Number>;
|
|
849
1076
|
events: Schema.optional<Schema.mutable<Schema.Array$<Schema.Schema<JsonValue, JsonValue, never>>>>;
|
|
850
1077
|
}>>;
|
|
851
1078
|
durationMs: Schema.optional<typeof Schema.Number>;
|
|
@@ -949,6 +1176,8 @@ export type AutEvent = {
|
|
|
949
1176
|
timestamp: string;
|
|
950
1177
|
latencyMs?: number;
|
|
951
1178
|
usage?: Usage;
|
|
1179
|
+
/** The model that answered this turn, when the agent knows it. */
|
|
1180
|
+
model?: string;
|
|
952
1181
|
} | {
|
|
953
1182
|
kind: 'completed';
|
|
954
1183
|
output?: JsonValue;
|
|
@@ -1136,9 +1365,23 @@ export declare function expectToolCall(expected: ExpectToolCallStep['expected'])
|
|
|
1136
1365
|
*/
|
|
1137
1366
|
export declare function user(message: UserStep['message']): UserStep;
|
|
1138
1367
|
export declare function agent(expectation: JsonObject): AgentStep;
|
|
1368
|
+
/**
|
|
1369
|
+
* What a judge saw and said. The built-in `judge()` records all of it; a
|
|
1370
|
+
* predicate that calls a model itself can report `model`, `prompt` and
|
|
1371
|
+
* `reply` so the dashboard shows them the same way.
|
|
1372
|
+
*/
|
|
1139
1373
|
export type JudgeRunInfo = {
|
|
1140
1374
|
agent?: AutIdentity;
|
|
1375
|
+
/** The model the judge reported using (`turn-completed` `model`). */
|
|
1376
|
+
model?: string;
|
|
1377
|
+
/** Tokens the judge used: never counted in the agent's `tokens`. */
|
|
1141
1378
|
usage?: Usage;
|
|
1379
|
+
/** The exact prompt the judge received. */
|
|
1380
|
+
prompt?: string;
|
|
1381
|
+
/** Its reply, as text or JSON. */
|
|
1382
|
+
reply?: JsonValue;
|
|
1383
|
+
/** 2 when its first reply was not in the format asked for and it was asked again. */
|
|
1384
|
+
attempts?: number;
|
|
1142
1385
|
/** Judge-agent observations; never attributed to the AUT trajectory. */
|
|
1143
1386
|
events?: JsonValue[];
|
|
1144
1387
|
};
|
|
@@ -1148,7 +1391,8 @@ export type SkippedScore = {
|
|
|
1148
1391
|
reason: string;
|
|
1149
1392
|
};
|
|
1150
1393
|
export type ScoreValue<Evidence = unknown> = number | SkippedScore | {
|
|
1151
|
-
|
|
1394
|
+
/** From 0 to 1. Without it, the weighted mean of `criteria`. */
|
|
1395
|
+
value?: number;
|
|
1152
1396
|
passed?: boolean;
|
|
1153
1397
|
explanation?: string;
|
|
1154
1398
|
/**
|
|
@@ -1156,7 +1400,12 @@ export type ScoreValue<Evidence = unknown> = number | SkippedScore | {
|
|
|
1156
1400
|
* evidence reaches later scorers through `checkpoint(rule)`.
|
|
1157
1401
|
*/
|
|
1158
1402
|
evidence?: Evidence;
|
|
1159
|
-
/**
|
|
1403
|
+
/**
|
|
1404
|
+
* Per-criterion results, each shown on its own; see `CriterionResult`.
|
|
1405
|
+
* Return `{ name, reached: false }` for a check that never ran.
|
|
1406
|
+
*/
|
|
1407
|
+
criteria?: CriterionInput[];
|
|
1408
|
+
/** What a model-backed scorer saw and said; never counted as AUT usage. */
|
|
1160
1409
|
judge?: JudgeRunInfo;
|
|
1161
1410
|
};
|
|
1162
1411
|
/**
|
|
@@ -1169,8 +1418,15 @@ export type ScoreResult = {
|
|
|
1169
1418
|
kind: 'predicate' | 'judge';
|
|
1170
1419
|
value?: number;
|
|
1171
1420
|
passed?: boolean;
|
|
1421
|
+
/** The pass mark the value was held to (1 unless the rule set `passAt`). */
|
|
1422
|
+
passAt?: number;
|
|
1172
1423
|
explanation?: string;
|
|
1173
1424
|
evidence?: JsonValue;
|
|
1425
|
+
/** A `choices` judge's answer, such as `B`. */
|
|
1426
|
+
choice?: string;
|
|
1427
|
+
criteria?: CriterionResult[];
|
|
1428
|
+
/** Files its scorer saved with `attach()`, by name. */
|
|
1429
|
+
attachments?: string[];
|
|
1174
1430
|
judge?: JudgeRunInfo;
|
|
1175
1431
|
durationMs: number;
|
|
1176
1432
|
error?: RecordedError;
|
|
@@ -1225,21 +1481,60 @@ export type CheckpointOutcome<Evidence> = Omit<CheckpointResult, 'evidence'> & {
|
|
|
1225
1481
|
export type PredicateScorer<Evidence = unknown> = {
|
|
1226
1482
|
kind: 'predicate';
|
|
1227
1483
|
name: string;
|
|
1484
|
+
/** What it checks, in a sentence, shown wherever the scorer is. */
|
|
1485
|
+
description?: string;
|
|
1228
1486
|
supportsPartial?: boolean;
|
|
1229
1487
|
/** A numeric result passes when it is at least this value. Default: only 1 passes. */
|
|
1230
1488
|
passAt?: number;
|
|
1489
|
+
/**
|
|
1490
|
+
* The checks it reports, declared up front so they show before a run.
|
|
1491
|
+
* A declared criterion it leaves out is recorded as not reached; one it
|
|
1492
|
+
* did not declare is an error.
|
|
1493
|
+
*/
|
|
1494
|
+
criteria?: JudgeCriterion[];
|
|
1231
1495
|
run(context: ScoringContext): boolean | ScoreValue<Evidence> | Promise<boolean | ScoreValue<Evidence>>;
|
|
1232
1496
|
};
|
|
1497
|
+
/** What a judge sees: one named input, read from the run. */
|
|
1498
|
+
export type JudgeInput = (scoring: ScoringContext) => JsonValue | undefined | Promise<JsonValue | undefined>;
|
|
1499
|
+
/**
|
|
1500
|
+
* A rubric-graded scorer. EvalKit builds the prompt from the rubric, the
|
|
1501
|
+
* inputs and the answer format, runs the judge agent, checks its answer
|
|
1502
|
+
* (asking once more if it is not in the format asked for), and records
|
|
1503
|
+
* what it saw and said.
|
|
1504
|
+
*/
|
|
1233
1505
|
export type JudgeRule = {
|
|
1234
1506
|
kind: 'judge';
|
|
1235
1507
|
name: string;
|
|
1236
1508
|
rubric: string;
|
|
1509
|
+
/** What it checks, in a sentence, shown wherever the judge is. */
|
|
1510
|
+
description?: string;
|
|
1511
|
+
/**
|
|
1512
|
+
* The agent that judges, made with `defineAgent()`. Default: `judge` in
|
|
1513
|
+
* evalkit.config.ts. It gets the run's parameters, so a matrix axis can
|
|
1514
|
+
* choose its model.
|
|
1515
|
+
*/
|
|
1516
|
+
agent?: AutAdapter;
|
|
1517
|
+
/**
|
|
1518
|
+
* What the judge sees, by name. Default: `conversation` (this turn at a
|
|
1519
|
+
* checkpoint, the whole run in final scoring) and `reply` (the last reply).
|
|
1520
|
+
*/
|
|
1521
|
+
inputs?: Readonly<Record<string, JudgeInput>>;
|
|
1522
|
+
/** How it answers. Default `verdict`: a value from 0 to 1 and a reason. */
|
|
1523
|
+
answer: JudgeAnswer;
|
|
1524
|
+
/** A value passes when it is at least this. Default: only 1 passes. */
|
|
1525
|
+
passAt?: number;
|
|
1237
1526
|
/** Run even when the scenario stopped early or execution failed. */
|
|
1238
1527
|
supportsPartial?: boolean;
|
|
1239
1528
|
};
|
|
1240
1529
|
export type ScoringRule = PredicateScorer | JudgeRule;
|
|
1241
1530
|
/** A scorer in code. Its `evidence` type carries through to `checkpoint(rule)`. */
|
|
1242
|
-
export declare function predicate<Evidence = unknown>(name: string, run: PredicateScorer<Evidence>['run'], options?: Pick<PredicateScorer, 'supportsPartial' | 'passAt'>
|
|
1531
|
+
export declare function predicate<Evidence = unknown>(name: string, run: PredicateScorer<Evidence>['run'], options?: Pick<PredicateScorer, 'supportsPartial' | 'passAt' | 'description'> & {
|
|
1532
|
+
/** The checks it reports by name: `{ 'cannot push': 'the share token gets 403' }` or `{ name: { weight, description } }`. */
|
|
1533
|
+
criteria?: Record<string, string | number | {
|
|
1534
|
+
weight?: number;
|
|
1535
|
+
description?: string;
|
|
1536
|
+
}>;
|
|
1537
|
+
}): PredicateScorer<Evidence>;
|
|
1243
1538
|
/**
|
|
1244
1539
|
* A number measured for every run, such as tokens, retries or web searches.
|
|
1245
1540
|
* Metrics never decide pass or fail; they are averaged per run and shown on
|
|
@@ -1267,7 +1562,9 @@ export type MetricResult = {
|
|
|
1267
1562
|
builtIn?: true;
|
|
1268
1563
|
error?: RecordedError;
|
|
1269
1564
|
};
|
|
1270
|
-
export declare function judge(name: string, options:
|
|
1565
|
+
export declare function judge(name: string, options: Omit<JudgeRule, 'kind' | 'name' | 'answer'> & {
|
|
1566
|
+
answer?: JudgeAnswer;
|
|
1567
|
+
}): JudgeRule;
|
|
1271
1568
|
export type EvalPolicy = {
|
|
1272
1569
|
timeoutMs?: number;
|
|
1273
1570
|
/** Stop later transcript steps after a failed checkpoint assertion. Default false. */
|
|
@@ -1277,8 +1574,6 @@ export type EvalDefinition<TAgent extends AutAdapter = AutAdapter> = {
|
|
|
1277
1574
|
id: string;
|
|
1278
1575
|
name?: string;
|
|
1279
1576
|
agent: TAgent;
|
|
1280
|
-
/** Separate judge agent; its model and tools are never inherited from the AUT. */
|
|
1281
|
-
judge?: AutAdapter;
|
|
1282
1577
|
/** Data and files the scenario uses; each run gets its own copy. */
|
|
1283
1578
|
datasets?: readonly Dataset[];
|
|
1284
1579
|
transcript: TranscriptStep[];
|
|
@@ -1308,6 +1603,10 @@ export type EvalWorkspace = {
|
|
|
1308
1603
|
ignore?: readonly string[];
|
|
1309
1604
|
};
|
|
1310
1605
|
export declare function defineEval<const T extends EvalDefinition>(definition: T): T;
|
|
1606
|
+
/** A judge never grades with the agent it is judging. */
|
|
1607
|
+
export declare function assertJudgesIndependent(definition: Pick<EvalDefinition, 'agent' | 'transcript' | 'scoring'> & {
|
|
1608
|
+
id: string;
|
|
1609
|
+
}, defaultJudge?: AutAdapter): void;
|
|
1311
1610
|
export type EvalSuite<TEvals extends readonly EvalDefinition[] = readonly EvalDefinition[]> = {
|
|
1312
1611
|
id: string;
|
|
1313
1612
|
name?: string;
|
|
@@ -1427,8 +1726,13 @@ export type CheckpointResult = {
|
|
|
1427
1726
|
status: 'passed' | 'failed' | 'error' | 'skipped';
|
|
1428
1727
|
value?: number;
|
|
1429
1728
|
passed?: boolean;
|
|
1729
|
+
passAt?: number;
|
|
1430
1730
|
explanation?: string;
|
|
1431
1731
|
evidence?: JsonValue;
|
|
1732
|
+
choice?: string;
|
|
1733
|
+
criteria?: CriterionResult[];
|
|
1734
|
+
/** Files its scorer saved with `attach()`, by name. */
|
|
1735
|
+
attachments?: string[];
|
|
1432
1736
|
judge?: JudgeRunInfo;
|
|
1433
1737
|
durationMs?: number;
|
|
1434
1738
|
error?: RecordedError;
|
|
@@ -1447,7 +1751,7 @@ export type CheckpointResult = {
|
|
|
1447
1751
|
* usage, cached input included. Absent when no turn reported any.
|
|
1448
1752
|
* - `tool calls`: the agent's `tool-call` events.
|
|
1449
1753
|
*/
|
|
1450
|
-
export declare const BUILT_IN_METRICS: readonly ['agent time', 'tokens', 'tool calls'];
|
|
1754
|
+
export declare const BUILT_IN_METRICS: readonly ['agent time', 'tokens', 'tool calls', 'judge tokens'];
|
|
1451
1755
|
export type BuiltInMetricName = (typeof BUILT_IN_METRICS)[number];
|
|
1452
1756
|
/** A built-in metric's name (suggested by editors), or a scenario's own. */
|
|
1453
1757
|
export type MetricName = BuiltInMetricName | (string & {});
|
|
@@ -1518,5 +1822,5 @@ type PiAutOptions = {
|
|
|
1518
1822
|
/** A local, one-prompt-per-turn AUT backed by Pi's non-interactive print mode. */
|
|
1519
1823
|
export declare function piAgent(options?: PiAutOptions): AutAdapter;
|
|
1520
1824
|
//#endregion
|
|
1521
|
-
export type { AttachmentLimits, DefinitionSite, EvalMatrix, EvalMatrixCell, EvalkitConfig, KeepSandboxes, MatrixSelection, ShareConfig, ShareHeaders, Usage };
|
|
1825
|
+
export type { AttachmentLimits, CriteriaOptions, CriterionInput, CriterionResult, DefinitionSite, EvalMatrix, EvalMatrixCell, EvalkitConfig, JudgeAnswer, JudgeChoice, JudgeCriterion, KeepSandboxes, MatrixSelection, ReachedCriterion, ShareConfig, ShareHeaders, UnreachedCriterion, Usage };
|
|
1522
1826
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../core/src/identity.ts","../../core/src/dataset.ts","../../core/src/aut-events.ts","../../core/src/catalog.ts","../../core/src/canonical-json.ts","../../core/src/matrix.ts","../../core/src/config.ts","../../core/src/usage.ts","../../core/src/json.ts","../../core/src/definition-site.ts","../../core/src/schema.ts","../../core/src/trajectory.ts","../../core/src/index.ts","../../agents/src/index.ts"],"mappings":";;qBAEa,oBAAkB,OAAA;YACnB,sBAAsB,mBAAmB;;wBAGrC,SAAS;;qBAOZ,YAAU,OAAA,cAAA,OAAA;YAKX,cAAc,WAAW;YAEzB,YAAY,cAAc,eAAe,2BACxC;qBAEA,mBAAiB,OAAA,cAAA,OAAA;wBAMd,kBAAkB,cAAc,cAAc,MAAM,QAAK,OAAA,cAAA,OAAA;wBAWzD,YAAY,cAAc,cACxC,MAAM,OACN,MAAM,OACL,YAAY;wBAIC,iBAAiB,cAAc,cAC7C,eACA,eAAe;EACZ,MAAM;EAAO,MAAM;EAAM,KAAK,YAAY;;wBAY/B,aAAa,eAAe,eAAe,eAAe;;;;YCvD9D;;YAGA,6BAA6B;EAAe;;;;;;YAM5C,wBAAwB,SAAS,eAAe;;YAGhD;EACV,QAAQ;;EAER;;YAGU;;EAEV;EACA,QAAQ;;YAGE;EACV;EACA;;EAEA,QAAQ;;EAER;;EAEA,YAAY;EACZ,QAAQ;;KAGL;EACH;EACA;;EAEA,aAAa;;EAEb;;YAGU,0BAA0B;EACpC,QAAQ;;EAER;;EAEA;EACA;EACA;;YAGU,0BAA0B,gBAAgB,kBACpD;;EAEE,SAAS,MAAM,uBAAuB,UAAU,QAAQ;;EAExD,SACE,QAAQ,SACR,KAAK,sBACF,iBAAiB,QAAQ;EAC9B;EACA;EACA;;YAGQ;EAEN;EACA,QAAQ;EACR;EACA;;EAGA;EACA,SACE,MAAM,uBACH,iBAAiB,QAAQ;EAC9B,SACE,QAAQ,gBACR,KAAK,sBACF,iBAAiB,QAAQ;;;YAIxB;WACD;WACA;WACA;WACA,YAAY;;WAEZ;WACA,QAAQ;;;wBAIH,oBAAoB,eAAe;;;;;;;wBAuBnC,cAAc,gBAAgB,gBAC5C,YAAY,0BAA0B,0BAA0B,WAC/D;wBAmFa,UAAU,iBAAiB,SAAS;;;;;;;YC/MxC;EACN;EAAiB;;EAEjB;EACA;EACA;EACA;;EAGA;EACA;EACA;EACA;EACA;;EAGA;EACA;EACA;EACA;EACA;;EAEA;EAAsB;EAAc;;EAEpC;EACA;EACA;EACA;EACA,QAAQ;;EAER;EAAmB;EAAkB;;EACrC;EAAe,OAAO;EAAe;;YAE/B;EACV;EACA;;EAEA;EACA;;;YAIU;EAGN;EACA,qBAAqB;EACrB,QAAQ;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../core/src/identity.ts","../../core/src/dataset.ts","../../core/src/aut-events.ts","../../core/src/judge.ts","../../core/src/catalog.ts","../../core/src/canonical-json.ts","../../core/src/matrix.ts","../../core/src/config.ts","../../core/src/usage.ts","../../core/src/json.ts","../../core/src/definition-site.ts","../../core/src/schema.ts","../../core/src/trajectory.ts","../../core/src/index.ts","../../agents/src/index.ts"],"mappings":";;qBAEa,oBAAkB,OAAA;YACnB,sBAAsB,mBAAmB;;wBAGrC,SAAS;;qBAOZ,YAAU,OAAA,cAAA,OAAA;YAKX,cAAc,WAAW;YAEzB,YAAY,cAAc,eAAe,2BACxC;qBAEA,mBAAiB,OAAA,cAAA,OAAA;wBAMd,kBAAkB,cAAc,cAAc,MAAM,QAAK,OAAA,cAAA,OAAA;wBAWzD,YAAY,cAAc,cACxC,MAAM,OACN,MAAM,OACL,YAAY;wBAIC,iBAAiB,cAAc,cAC7C,eACA,eAAe;EACZ,MAAM;EAAO,MAAM;EAAM,KAAK,YAAY;;wBAY/B,aAAa,eAAe,eAAe,eAAe;;;;YCvD9D;;YAGA,6BAA6B;EAAe;;;;;;YAM5C,wBA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;EACV,SACE,UAAU,aACV;IAAY,UAAU;MACrB,QAAQ;;;YAID;EACV;EACA,QAAQ;EACR;EACA,QAAQ;EACR,QAAQ;EACR;EACA;EACA,UAAU;EACV,QAAQ;;wBAYM,YAAY,iBAAiB;;;KC1/BjC;EACV;;EAEA;;;wBAIc,QAAQ,UAAS,eAAoB"}
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { A as RunDatasetSchema, B as normalizeAutEvent, C as BatchSchema, D as MetricResultSchema, E as JudgeRunInfoSchema, F as RunStatusSchema, G as DEFAULT_ARTIFACT_EXCLUDE, H as defineEvalMatrix, I as RunSummarySchema, J as catalogEntry, K as DEFAULT_ATTACHMENT_LIMITS, L as ScoreResultSchema, M as RunMetadataSchema, N as RunScoringSchema, O as REPORT_SCHEMA_VERSION, P as RunSourceSchema, Q as criteria, R as TrajectoryEventSchema, S as AutIdentitySchema, T as JsonValueSchema, U as canonicalParameters, V as turnResultEvents, W as turnTokens, Z as choices, _ as user, _t as resourceUriSchema, a as assertJudgesIndependent, at as toJson, b as ArtifactEntrySchema, c as defineEval, ct as isDataset, d as judge, dt as ResourceKindSchema, f as metric, ft as ResourceUriSchema, g as skip, gt as resourceUri, h as registerEvals, ht as parseResourceUri, i as agentRuntimes, it as NotJsonError, j as RunManifestSchema, k as RecordedErrorSchema, l as defineSuite, lt as relativeDatasetPath, m as recordError, mt as authorId, n as DEFAULT_AGENT_RUNTIMES, o as authoringId, ot as toJsonObject, p as predicate, pt as UuidSchema, q as defineConfig, r as agent, s as defineAgent, st as defineDataset, t as BUILT_IN_METRICS, tt as passMark, u as expectToolCall, ut as definitionSite, v as parseTrajectoryJsonl, vt as resourceUuid, w as CheckpointResultSchema, x as AttachmentEntrySchema, y as ApiErrorSchema, z as UsageSchema } from "./src-B14fXAGp.mjs";
|
|
2
2
|
//#region ../agents/src/index.ts
|
|
3
3
|
/** A local, one-prompt-per-turn AUT backed by Pi's non-interactive print mode. */
|
|
4
4
|
function piAgent(options = {}) {
|
|
@@ -68,4 +68,4 @@ function piAgent(options = {}) {
|
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
70
|
//#endregion
|
|
71
|
-
export { ApiErrorSchema, ArtifactEntrySchema, AttachmentEntrySchema, AutIdentitySchema, BUILT_IN_METRICS, BatchSchema, CheckpointResultSchema, DEFAULT_AGENT_RUNTIMES, DEFAULT_ARTIFACT_EXCLUDE, DEFAULT_ATTACHMENT_LIMITS, JsonValueSchema, JudgeRunInfoSchema, MetricResultSchema, NotJsonError, REPORT_SCHEMA_VERSION, RecordedErrorSchema, ResourceKindSchema, ResourceUriSchema, RunDatasetSchema, RunManifestSchema, RunMetadataSchema, RunScoringSchema, RunSourceSchema, RunStatusSchema, RunSummarySchema, ScoreResultSchema, TrajectoryEventSchema, UsageSchema, UuidSchema, agent, agentRuntimes, authorId, authoringId, canonicalParameters, catalogEntry, defineAgent, defineConfig, defineDataset, defineEval, defineEvalMatrix, defineSuite, definitionSite, expectToolCall, isDataset, judge, metric, normalizeAutEvent, parseResourceUri, parseTrajectoryJsonl, piAgent, predicate, recordError, registerEvals, relativeDatasetPath, resourceUri, resourceUriSchema, resourceUuid, skip, toJson, toJsonObject, turnResultEvents, turnTokens, user };
|
|
71
|
+
export { ApiErrorSchema, ArtifactEntrySchema, AttachmentEntrySchema, AutIdentitySchema, BUILT_IN_METRICS, BatchSchema, CheckpointResultSchema, DEFAULT_AGENT_RUNTIMES, DEFAULT_ARTIFACT_EXCLUDE, DEFAULT_ATTACHMENT_LIMITS, JsonValueSchema, JudgeRunInfoSchema, MetricResultSchema, NotJsonError, REPORT_SCHEMA_VERSION, RecordedErrorSchema, ResourceKindSchema, ResourceUriSchema, RunDatasetSchema, RunManifestSchema, RunMetadataSchema, RunScoringSchema, RunSourceSchema, RunStatusSchema, RunSummarySchema, ScoreResultSchema, TrajectoryEventSchema, UsageSchema, UuidSchema, agent, agentRuntimes, assertJudgesIndependent, authorId, authoringId, canonicalParameters, catalogEntry, choices, criteria, defineAgent, defineConfig, defineDataset, defineEval, defineEvalMatrix, defineSuite, definitionSite, expectToolCall, isDataset, judge, metric, normalizeAutEvent, parseResourceUri, parseTrajectoryJsonl, passMark, piAgent, predicate, recordError, registerEvals, relativeDatasetPath, resourceUri, resourceUriSchema, resourceUuid, skip, toJson, toJsonObject, turnResultEvents, turnTokens, user };
|