@cogitator-ai/evals 0.13.2 → 0.14.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/README.md +94 -14
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/plugin-evals/execute.d.ts +45 -0
- package/dist/plugin-evals/execute.d.ts.map +1 -0
- package/dist/plugin-evals/execute.js +508 -0
- package/dist/plugin-evals/execute.js.map +1 -0
- package/dist/plugin-evals/files.d.ts +17 -0
- package/dist/plugin-evals/files.d.ts.map +1 -0
- package/dist/plugin-evals/files.js +46 -0
- package/dist/plugin-evals/files.js.map +1 -0
- package/dist/plugin-evals/glob.d.ts +8 -0
- package/dist/plugin-evals/glob.d.ts.map +1 -0
- package/dist/plugin-evals/glob.js +63 -0
- package/dist/plugin-evals/glob.js.map +1 -0
- package/dist/plugin-evals/graders.d.ts +21 -0
- package/dist/plugin-evals/graders.d.ts.map +1 -0
- package/dist/plugin-evals/graders.js +198 -0
- package/dist/plugin-evals/graders.js.map +1 -0
- package/dist/plugin-evals/index.d.ts +4 -0
- package/dist/plugin-evals/index.d.ts.map +1 -0
- package/dist/plugin-evals/index.js +3 -0
- package/dist/plugin-evals/index.js.map +1 -0
- package/dist/plugin-evals/judge.d.ts +33 -0
- package/dist/plugin-evals/judge.d.ts.map +1 -0
- package/dist/plugin-evals/judge.js +73 -0
- package/dist/plugin-evals/judge.js.map +1 -0
- package/dist/plugin-evals/mocks.d.ts +34 -0
- package/dist/plugin-evals/mocks.d.ts.map +1 -0
- package/dist/plugin-evals/mocks.js +373 -0
- package/dist/plugin-evals/mocks.js.map +1 -0
- package/dist/plugin-evals/report.d.ts +4 -0
- package/dist/plugin-evals/report.d.ts.map +1 -0
- package/dist/plugin-evals/report.js +177 -0
- package/dist/plugin-evals/report.js.map +1 -0
- package/dist/plugin-evals/runner.d.ts +23 -0
- package/dist/plugin-evals/runner.d.ts.map +1 -0
- package/dist/plugin-evals/runner.js +582 -0
- package/dist/plugin-evals/runner.js.map +1 -0
- package/dist/plugin-evals/schema.d.ts +179 -0
- package/dist/plugin-evals/schema.d.ts.map +1 -0
- package/dist/plugin-evals/schema.js +194 -0
- package/dist/plugin-evals/schema.js.map +1 -0
- package/dist/plugin-evals/suite.d.ts +40 -0
- package/dist/plugin-evals/suite.d.ts.map +1 -0
- package/dist/plugin-evals/suite.js +476 -0
- package/dist/plugin-evals/suite.js.map +1 -0
- package/dist/plugin-evals/tools.d.ts +42 -0
- package/dist/plugin-evals/tools.d.ts.map +1 -0
- package/dist/plugin-evals/tools.js +136 -0
- package/dist/plugin-evals/tools.js.map +1 -0
- package/dist/plugin-evals/transcript.d.ts +35 -0
- package/dist/plugin-evals/transcript.d.ts.map +1 -0
- package/dist/plugin-evals/transcript.js +149 -0
- package/dist/plugin-evals/transcript.js.map +1 -0
- package/dist/plugin-evals/types.d.ts +378 -0
- package/dist/plugin-evals/types.d.ts.map +1 -0
- package/dist/plugin-evals/types.js +2 -0
- package/dist/plugin-evals/types.js.map +1 -0
- package/dist/reporters/html-format.d.ts +5 -2
- package/dist/reporters/html-format.d.ts.map +1 -1
- package/dist/reporters/html-format.js +6 -3
- package/dist/reporters/html-format.js.map +1 -1
- package/package.json +5 -3
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import type { CogitatorConfig, LocalWorkspaceExecConfig } from '@cogitator-ai/core';
|
|
2
|
+
/**
|
|
3
|
+
* Whether each case also runs without the plugin: `none` runs the with-arm only, `with-without`
|
|
4
|
+
* adds the no-plugin baseline to every case. Unset, it is decided per case
|
|
5
|
+
*/
|
|
6
|
+
export type PluginEvalAblation = 'none' | 'with-without';
|
|
7
|
+
/** The runs of a case with the plugin loaded (`with`) or with no plugin (`without`) */
|
|
8
|
+
export type PluginEvalArm = 'with' | 'without';
|
|
9
|
+
/**
|
|
10
|
+
* What a `regex` grader matches or an `llm` grader judges: the final reply, the session as JSON
|
|
11
|
+
* lines, the paths created during the run, the contents of one workspace file, or the calls made
|
|
12
|
+
* to mocked MCP tools
|
|
13
|
+
*/
|
|
14
|
+
export type PluginEvalTarget = 'last_message' | 'trace' | 'files' | 'mock_calls' | {
|
|
15
|
+
source: 'file';
|
|
16
|
+
path: string;
|
|
17
|
+
};
|
|
18
|
+
/** A tool call a `tool_order` grader looks for: a tool name, or a name with an input regex */
|
|
19
|
+
export interface PluginEvalToolMatcher {
|
|
20
|
+
tool: string;
|
|
21
|
+
inputMatch?: string;
|
|
22
|
+
}
|
|
23
|
+
interface PluginEvalGraderBase {
|
|
24
|
+
/** The file name without `.md`, or the `name` of a `case.yaml` entry */
|
|
25
|
+
name: string;
|
|
26
|
+
/** Relative weight in the run's score, any positive number */
|
|
27
|
+
weight: number;
|
|
28
|
+
/**
|
|
29
|
+
* `with-only` keeps the grader out of the score of a two-arm run, `both` scores it in both arms
|
|
30
|
+
* even when it would be excluded
|
|
31
|
+
*/
|
|
32
|
+
arm?: 'with-only' | 'both';
|
|
33
|
+
}
|
|
34
|
+
export interface PluginEvalRegexGrader extends PluginEvalGraderBase {
|
|
35
|
+
type: 'regex';
|
|
36
|
+
pattern: string;
|
|
37
|
+
flags: string;
|
|
38
|
+
/** `contains`, `not_contains` or `count:N` for exactly N matches */
|
|
39
|
+
match: string;
|
|
40
|
+
target: PluginEvalTarget;
|
|
41
|
+
}
|
|
42
|
+
export interface PluginEvalToolUsedGrader extends PluginEvalGraderBase {
|
|
43
|
+
type: 'tool_used';
|
|
44
|
+
/** Claude Code's name of the tool (`Read`, `Skill`, `mcp__plugin_p_s__t`) or Cogitator's own */
|
|
45
|
+
tool: string;
|
|
46
|
+
inputMatch?: string;
|
|
47
|
+
min: number;
|
|
48
|
+
max?: number;
|
|
49
|
+
}
|
|
50
|
+
export interface PluginEvalToolOrderGrader extends PluginEvalGraderBase {
|
|
51
|
+
type: 'tool_order';
|
|
52
|
+
before: PluginEvalToolMatcher;
|
|
53
|
+
after: PluginEvalToolMatcher;
|
|
54
|
+
}
|
|
55
|
+
export interface PluginEvalFileExistsGrader extends PluginEvalGraderBase {
|
|
56
|
+
type: 'file_exists';
|
|
57
|
+
/** A glob over the paths created during the run, relative to the workspace */
|
|
58
|
+
path: string;
|
|
59
|
+
exists: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface PluginEvalLlmGrader extends PluginEvalGraderBase {
|
|
62
|
+
type: 'llm';
|
|
63
|
+
criteria: string;
|
|
64
|
+
focus: PluginEvalTarget;
|
|
65
|
+
}
|
|
66
|
+
export interface PluginEvalBaselineGrader extends PluginEvalGraderBase {
|
|
67
|
+
type: 'baseline';
|
|
68
|
+
/** The reference transcript, a `.jsonl` file of the case directory */
|
|
69
|
+
baselineFile: string;
|
|
70
|
+
criteria: string;
|
|
71
|
+
}
|
|
72
|
+
/** One check applied after a run, in the format of Claude Code's plugin eval graders */
|
|
73
|
+
export type PluginEvalGrader = PluginEvalRegexGrader | PluginEvalToolUsedGrader | PluginEvalToolOrderGrader | PluginEvalFileExistsGrader | PluginEvalLlmGrader | PluginEvalBaselineGrader;
|
|
74
|
+
/** The type of an `expect:` check of a mocked tool's input */
|
|
75
|
+
export type PluginEvalExpectType = 'string' | 'number' | 'boolean' | 'array' | 'object' | 'null';
|
|
76
|
+
/** How one input field of a mocked tool call is checked */
|
|
77
|
+
export type PluginEvalExpectation = {
|
|
78
|
+
kind: 'type';
|
|
79
|
+
type: PluginEvalExpectType;
|
|
80
|
+
} | {
|
|
81
|
+
kind: 'pattern';
|
|
82
|
+
source: string;
|
|
83
|
+
flags: string;
|
|
84
|
+
} | {
|
|
85
|
+
kind: 'literal';
|
|
86
|
+
value: string | number | boolean | null;
|
|
87
|
+
} | {
|
|
88
|
+
kind: 'oneOf';
|
|
89
|
+
values: readonly (string | number | boolean | null)[];
|
|
90
|
+
};
|
|
91
|
+
/** A mocked MCP tool: `mocks/<server>/<tool>.md` */
|
|
92
|
+
export interface PluginEvalMockTool {
|
|
93
|
+
server: string;
|
|
94
|
+
tool: string;
|
|
95
|
+
/** The tool result, with `{{input.<field>}}` and `{{file:fixtures/...}}` substitutions */
|
|
96
|
+
body: string;
|
|
97
|
+
/** Return the body as a tool error */
|
|
98
|
+
error: boolean;
|
|
99
|
+
/** Checks of the call's input by dotted path, a violation aborts the run */
|
|
100
|
+
expect: Readonly<Record<string, PluginEvalExpectation>>;
|
|
101
|
+
/** The server's mock directory, where `fixtures/` lives */
|
|
102
|
+
dir: string;
|
|
103
|
+
description?: string;
|
|
104
|
+
/** The input JSON Schema from the server's `_tools.json` */
|
|
105
|
+
inputSchema?: Readonly<Record<string, unknown>>;
|
|
106
|
+
}
|
|
107
|
+
/** A case as it was loaded: its prompt, its run settings and its graders */
|
|
108
|
+
export interface PluginEvalCase {
|
|
109
|
+
name: string;
|
|
110
|
+
/** The case directory */
|
|
111
|
+
dir: string;
|
|
112
|
+
/** The case directory relative to the eval directory */
|
|
113
|
+
path: string;
|
|
114
|
+
description?: string;
|
|
115
|
+
expectedOutcome?: string;
|
|
116
|
+
tags: string[];
|
|
117
|
+
/** Plugin directories under test, absolute */
|
|
118
|
+
plugins: string[];
|
|
119
|
+
runs: number;
|
|
120
|
+
model?: string;
|
|
121
|
+
maxTurns: number;
|
|
122
|
+
timeoutSeconds: number;
|
|
123
|
+
allowedTools: string[];
|
|
124
|
+
appendSystemPrompt?: string;
|
|
125
|
+
env: Record<string, string>;
|
|
126
|
+
prompt: string;
|
|
127
|
+
context: {
|
|
128
|
+
/** The scaffold script, absolute */
|
|
129
|
+
scaffoldScript?: string;
|
|
130
|
+
/** The transcript to resume, absolute */
|
|
131
|
+
historyFile?: string;
|
|
132
|
+
/** Read-only fixture directories, relative to the case directory */
|
|
133
|
+
addDirs: string[];
|
|
134
|
+
};
|
|
135
|
+
graders: PluginEvalGrader[];
|
|
136
|
+
/** Mocked tools by server, the case's own over the suite's */
|
|
137
|
+
mocks: Record<string, PluginEvalMockTool[]>;
|
|
138
|
+
/**
|
|
139
|
+
* Why a suite mock server cannot be used, by server: it fails the case only when the case uses
|
|
140
|
+
* the server, that is when one of its plugins declares it
|
|
141
|
+
*/
|
|
142
|
+
mockProblems: Record<string, string>;
|
|
143
|
+
}
|
|
144
|
+
/** A judge's vote on an `llm` or `baseline` grader */
|
|
145
|
+
export interface PluginEvalVote {
|
|
146
|
+
verdict: 'PASS' | 'FAIL' | 'ERROR';
|
|
147
|
+
reasoning?: string;
|
|
148
|
+
}
|
|
149
|
+
export interface PluginEvalGraderResult {
|
|
150
|
+
name: string;
|
|
151
|
+
type: PluginEvalGrader['type'];
|
|
152
|
+
passed: boolean;
|
|
153
|
+
/** Whether the grader counts toward the run's score: false for plugin-fired indicators */
|
|
154
|
+
scored: boolean;
|
|
155
|
+
weight: number;
|
|
156
|
+
explanation: string;
|
|
157
|
+
/** The judge's votes, for `llm` and `baseline` graders */
|
|
158
|
+
votes?: PluginEvalVote[];
|
|
159
|
+
/** What the judge was shown */
|
|
160
|
+
evidence?: string;
|
|
161
|
+
/** The cost ceiling skipped this judge grader */
|
|
162
|
+
skipped?: boolean;
|
|
163
|
+
costUsd?: number;
|
|
164
|
+
}
|
|
165
|
+
/** A tool call of a run, under Claude Code's name and input shape */
|
|
166
|
+
export interface PluginEvalToolCall {
|
|
167
|
+
id: string;
|
|
168
|
+
/** Claude Code's name, such as `Read`, `Skill` or `mcp__plugin_p_s__t` */
|
|
169
|
+
name: string;
|
|
170
|
+
/** The Cogitator tool that ran */
|
|
171
|
+
tool: string;
|
|
172
|
+
input: Record<string, unknown>;
|
|
173
|
+
/** The delegated agent that made the call, unset for a call of the agent under test */
|
|
174
|
+
agent?: string;
|
|
175
|
+
}
|
|
176
|
+
/** A call to a mocked MCP tool */
|
|
177
|
+
export interface PluginEvalMockCall {
|
|
178
|
+
server: string;
|
|
179
|
+
tool: string;
|
|
180
|
+
input: Record<string, unknown>;
|
|
181
|
+
output: string;
|
|
182
|
+
error: boolean;
|
|
183
|
+
}
|
|
184
|
+
/** Why a mock stopped a run */
|
|
185
|
+
export interface PluginEvalAbort {
|
|
186
|
+
server: string;
|
|
187
|
+
tool: string;
|
|
188
|
+
reason: string;
|
|
189
|
+
}
|
|
190
|
+
export interface PluginEvalRunResult {
|
|
191
|
+
arm: PluginEvalArm;
|
|
192
|
+
/** The run's number within its arm, from 1 */
|
|
193
|
+
index: number;
|
|
194
|
+
/** Weighted fraction of the scored graders that passed */
|
|
195
|
+
score: number;
|
|
196
|
+
/** `null`, or why the run ended abnormally */
|
|
197
|
+
error: string | null;
|
|
198
|
+
/** The run ended on a model provider error and scored 0 without grading */
|
|
199
|
+
apiError?: boolean;
|
|
200
|
+
/** A mock stopped the run: it scores 0 and `error` stays `null` */
|
|
201
|
+
aborted?: PluginEvalAbort;
|
|
202
|
+
/** The cost ceiling skipped this run's judge graders, so its score is not comparable */
|
|
203
|
+
skippedPaidGraders?: boolean;
|
|
204
|
+
graders: PluginEvalGraderResult[];
|
|
205
|
+
lastMessage: string;
|
|
206
|
+
toolCalls: PluginEvalToolCall[];
|
|
207
|
+
mockCalls: PluginEvalMockCall[];
|
|
208
|
+
/** Paths created during the run, relative to the workspace */
|
|
209
|
+
filesCreated: string[];
|
|
210
|
+
/** List-price estimate of the run's model calls and its judge calls */
|
|
211
|
+
costUsd: number;
|
|
212
|
+
durationSeconds: number;
|
|
213
|
+
/** The run's temporary directory, kept with `keepTemp` */
|
|
214
|
+
tempDir?: string;
|
|
215
|
+
}
|
|
216
|
+
export interface PluginEvalCaseAggregates {
|
|
217
|
+
/** Mean with-arm run score, `null` when no with-arm run happened */
|
|
218
|
+
score: number | null;
|
|
219
|
+
/** Mean without-arm run score, absent for a single-arm case */
|
|
220
|
+
withoutScore?: number | null;
|
|
221
|
+
/** With-arm score minus without-arm score, absent when the arms are not comparable */
|
|
222
|
+
delta?: number;
|
|
223
|
+
passed: boolean;
|
|
224
|
+
runs: number;
|
|
225
|
+
costUsd: number;
|
|
226
|
+
}
|
|
227
|
+
export interface PluginEvalCaseResult {
|
|
228
|
+
name: string;
|
|
229
|
+
/** The case directory relative to the eval directory */
|
|
230
|
+
path: string;
|
|
231
|
+
tags: string[];
|
|
232
|
+
/** Why the case did not load: it scores 0 and does not run */
|
|
233
|
+
error?: string;
|
|
234
|
+
/** The case ran its with-arm only */
|
|
235
|
+
singleArm: boolean;
|
|
236
|
+
notices: string[];
|
|
237
|
+
prompt: string;
|
|
238
|
+
graders: PluginEvalGrader[];
|
|
239
|
+
arms: {
|
|
240
|
+
with: PluginEvalRunResult[];
|
|
241
|
+
without: PluginEvalRunResult[];
|
|
242
|
+
};
|
|
243
|
+
aggregates: PluginEvalCaseAggregates;
|
|
244
|
+
}
|
|
245
|
+
/** Why a run did not finish every case */
|
|
246
|
+
export type PluginEvalPartialReason = 'cost_ceiling' | 'interrupted' | 'auth_failed';
|
|
247
|
+
/** How the run ended, which the CLI turns into its exit code */
|
|
248
|
+
export type PluginEvalOutcome = 'passed' | 'failed' | 'partial' | 'interrupted';
|
|
249
|
+
/**
|
|
250
|
+
* The result document of a plugin eval run, `aggregate-result.json`: versioned, camelCase, new
|
|
251
|
+
* fields added without renaming the ones there
|
|
252
|
+
*/
|
|
253
|
+
export interface PluginEvalResult {
|
|
254
|
+
schemaVersion: 1;
|
|
255
|
+
/** The version of `@cogitator-ai/core` that ran the suite */
|
|
256
|
+
cogitatorVersion: string;
|
|
257
|
+
plugin: {
|
|
258
|
+
name: string;
|
|
259
|
+
root: string;
|
|
260
|
+
version?: string;
|
|
261
|
+
};
|
|
262
|
+
evalDir: string;
|
|
263
|
+
startedAt: string;
|
|
264
|
+
outcome: PluginEvalOutcome;
|
|
265
|
+
partial: boolean;
|
|
266
|
+
partialReason: PluginEvalPartialReason | null;
|
|
267
|
+
config: {
|
|
268
|
+
runs?: number;
|
|
269
|
+
concurrency: number;
|
|
270
|
+
model?: string;
|
|
271
|
+
judgeModel?: string;
|
|
272
|
+
ablation?: PluginEvalAblation;
|
|
273
|
+
threshold: number;
|
|
274
|
+
maxCostUsd?: number;
|
|
275
|
+
allowTools: string[];
|
|
276
|
+
scaffold: boolean;
|
|
277
|
+
caseFilter?: string;
|
|
278
|
+
tagFilter: string[];
|
|
279
|
+
};
|
|
280
|
+
aggregates: {
|
|
281
|
+
/** Mean case score across the suite */
|
|
282
|
+
overallScore: number;
|
|
283
|
+
casesPassed: number;
|
|
284
|
+
casesTotal: number;
|
|
285
|
+
/** Mean delta across the cases that have one */
|
|
286
|
+
meanDelta?: number;
|
|
287
|
+
/** Mean without-arm score across the cases that have one */
|
|
288
|
+
baselineScore?: number;
|
|
289
|
+
/** Share of with-arm runs where every grader passed */
|
|
290
|
+
perfectRuns: number;
|
|
291
|
+
};
|
|
292
|
+
/** Runs that ended on a model provider error, which fail the command whatever the scores */
|
|
293
|
+
apiErrors: number;
|
|
294
|
+
/** Cases that failed to load */
|
|
295
|
+
loadErrors: number;
|
|
296
|
+
warnings: string[];
|
|
297
|
+
cases: PluginEvalCaseResult[];
|
|
298
|
+
costUsd: number;
|
|
299
|
+
durationSeconds: number;
|
|
300
|
+
}
|
|
301
|
+
/** What a plugin eval run reports while it works */
|
|
302
|
+
export type PluginEvalProgressEvent = {
|
|
303
|
+
type: 'warning';
|
|
304
|
+
message: string;
|
|
305
|
+
} | {
|
|
306
|
+
type: 'case';
|
|
307
|
+
case: string;
|
|
308
|
+
notices: readonly string[];
|
|
309
|
+
arms: readonly PluginEvalArm[];
|
|
310
|
+
} | {
|
|
311
|
+
type: 'run';
|
|
312
|
+
case: string;
|
|
313
|
+
run: PluginEvalRunResult;
|
|
314
|
+
of: number;
|
|
315
|
+
} | {
|
|
316
|
+
type: 'skipped';
|
|
317
|
+
case: string;
|
|
318
|
+
reason: PluginEvalPartialReason;
|
|
319
|
+
};
|
|
320
|
+
export interface PluginEvalOptions {
|
|
321
|
+
/**
|
|
322
|
+
* A plugin directory, a `prompt.md` or `case.yaml` file, or an installed plugin as `name` or
|
|
323
|
+
* `name@marketplace` (default: the working directory)
|
|
324
|
+
*/
|
|
325
|
+
target?: string;
|
|
326
|
+
/** The directory a relative target and a named plugin's results start from (default `process.cwd()`) */
|
|
327
|
+
cwd?: string;
|
|
328
|
+
/** The LLM configuration of the runs and the judge: providers, keys, backends, default model */
|
|
329
|
+
llm: CogitatorConfig['llm'];
|
|
330
|
+
/** Model of the agent under test, over each case's `model` and `llm.defaultModel` */
|
|
331
|
+
model?: string;
|
|
332
|
+
/** Model of `llm` and `baseline` graders (default: each case's agent model) */
|
|
333
|
+
judgeModel?: string;
|
|
334
|
+
/** Runs per case per arm, 1 to 50, over each case's `runs` */
|
|
335
|
+
runs?: number;
|
|
336
|
+
/** Agent runs at once, 1 to 8 (default 1) */
|
|
337
|
+
concurrency?: number;
|
|
338
|
+
ablation?: PluginEvalAblation;
|
|
339
|
+
/** A case passes when its with-arm score is at least this, 0 to 1 (default 1) */
|
|
340
|
+
threshold?: number;
|
|
341
|
+
/** Ceiling on the list-price cost estimate: once spent, no further run starts */
|
|
342
|
+
maxCostUsd?: number;
|
|
343
|
+
/** Tools granted beyond the read-only set, as permission rules: `Write`, `Bash(npm test *)` */
|
|
344
|
+
allowTools?: readonly string[];
|
|
345
|
+
/** Run each case's `context.scaffold_script` */
|
|
346
|
+
scaffold?: boolean;
|
|
347
|
+
/** A glob the case names must match */
|
|
348
|
+
caseGlob?: string;
|
|
349
|
+
/** Keep the cases with any of these tags */
|
|
350
|
+
tags?: readonly string[];
|
|
351
|
+
/** The eval directory below the plugin, relative and of plain directory names */
|
|
352
|
+
evalDir?: string;
|
|
353
|
+
/** Where `aggregate-result.json` and `report.html` go (default `<evalDir>/results/<timestamp>/`) */
|
|
354
|
+
outputDir?: string;
|
|
355
|
+
/** Keep every run's temporary directory */
|
|
356
|
+
keepTemp?: boolean;
|
|
357
|
+
/**
|
|
358
|
+
* How granted `Bash` commands are spawned in a run's workspace, such as a `launch` that wraps
|
|
359
|
+
* them in an OS sandbox. Commands otherwise run as this process, confined to the workspace
|
|
360
|
+
* directory only
|
|
361
|
+
*/
|
|
362
|
+
exec?: Omit<LocalWorkspaceExecConfig, 'env'>;
|
|
363
|
+
/** Where installed plugins are kept, for a named target (default `defaultPluginsRoot()`) */
|
|
364
|
+
pluginsRoot?: string;
|
|
365
|
+
/** Stops starting runs and aborts the running ones: the result is partial, `interrupted` */
|
|
366
|
+
signal?: AbortSignal;
|
|
367
|
+
onProgress?: (event: PluginEvalProgressEvent) => void;
|
|
368
|
+
}
|
|
369
|
+
/** What `experimental_runPluginEvals` returns: the result document and where it was written */
|
|
370
|
+
export interface PluginEvalReport {
|
|
371
|
+
result: PluginEvalResult;
|
|
372
|
+
/** The directory of `aggregate-result.json` and `report.html` */
|
|
373
|
+
outputDir: string;
|
|
374
|
+
resultFile: string;
|
|
375
|
+
reportFile: string;
|
|
376
|
+
}
|
|
377
|
+
export {};
|
|
378
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/plugin-evals/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEpF;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,cAAc,CAAC;AAEzD,uFAAuF;AACvF,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,SAAS,CAAC;AAE/C;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAC1B,cAAc,GAAG,OAAO,GAAG,OAAO,GAAG,YAAY,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvF,8FAA8F;AAC9F,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,oBAAoB;IAC5B,wEAAwE;IACxE,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,MAAM,EAAE,MAAM,CAAC;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EAAE,OAAO,CAAC;IACnB,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oGAAoG;IACpG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;IAC7C,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4FAA4F;IAC5F,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAC;CACvD;AAED,+FAA+F;AAC/F,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,gBAAgB,CAAC;IACzB,iEAAiE;IACjE,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/plugin-evals/types.ts"],"names":[],"mappings":""}
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
export declare function escapeHtml(value: string): string;
|
|
3
3
|
/** Text that may be long or span lines: as it is when short, folded in `<details>` otherwise */
|
|
4
4
|
export declare function foldable(value: string, max?: number): string;
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* A self-contained HTML page: inline CSS, no scripts and no external assets. `style` adds rules
|
|
7
|
+
* of the page's own after the shared ones
|
|
8
|
+
*/
|
|
9
|
+
export declare function htmlDocument(title: string, body: string, style?: string): string;
|
|
7
10
|
/** A table, its cells already HTML; `numeric` marks the columns aligned right */
|
|
8
11
|
export declare function htmlTable(headers: readonly string[], rows: readonly (readonly string[])[], numeric?: ReadonlySet<number>): string;
|
|
9
12
|
/** A row of figures, each value already HTML */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-format.d.ts","sourceRoot":"","sources":["../../src/reporters/html-format.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOhD;AAED,gGAAgG;AAChG,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,GAAE,MAAY,GAAG,MAAM,CAQjE;AAyDD
|
|
1
|
+
{"version":3,"file":"html-format.d.ts","sourceRoot":"","sources":["../../src/reporters/html-format.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOhD;AAED,gGAAgG;AAChG,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,GAAE,MAAY,GAAG,MAAM,CAQjE;AAyDD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,MAAW,GAAG,MAAM,CAkBpF;AAED,iFAAiF;AACjF,wBAAgB,SAAS,CACvB,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,IAAI,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EACpC,OAAO,GAAE,WAAW,CAAC,MAAM,CAAa,GACvC,MAAM,CAWR;AAED,gDAAgD;AAChD,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC,GAAG,MAAM,CAM/F"}
|
|
@@ -72,8 +72,11 @@ pre { white-space: pre-wrap; word-break: break-word; margin: 6px 0 0; font: 12px
|
|
|
72
72
|
details summary { cursor: pointer; }
|
|
73
73
|
ul { padding-left: 20px; }
|
|
74
74
|
`;
|
|
75
|
-
/**
|
|
76
|
-
|
|
75
|
+
/**
|
|
76
|
+
* A self-contained HTML page: inline CSS, no scripts and no external assets. `style` adds rules
|
|
77
|
+
* of the page's own after the shared ones
|
|
78
|
+
*/
|
|
79
|
+
export function htmlDocument(title, body, style = '') {
|
|
77
80
|
return [
|
|
78
81
|
'<!doctype html>',
|
|
79
82
|
'<html lang="en">',
|
|
@@ -81,7 +84,7 @@ export function htmlDocument(title, body) {
|
|
|
81
84
|
'<meta charset="utf-8">',
|
|
82
85
|
'<meta name="viewport" content="width=device-width, initial-scale=1">',
|
|
83
86
|
`<title>${escapeHtml(title)}</title>`,
|
|
84
|
-
`<style>${STYLE}</style>`,
|
|
87
|
+
`<style>${STYLE}${style}</style>`,
|
|
85
88
|
'</head>',
|
|
86
89
|
'<body>',
|
|
87
90
|
'<main>',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-format.js","sourceRoot":"","sources":["../../src/reporters/html-format.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,MAAM,UAAU,UAAU,CAAC,KAAa;IACtC,OAAO,KAAK;SACT,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;SACvB,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC5B,CAAC;AAED,gGAAgG;AAChG,MAAM,UAAU,QAAQ,CAAC,KAAa,EAAE,MAAc,GAAG;IACvD,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/C,IAAI,IAAI,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,UAAU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ACjG;SACA,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,OAAO,yCAAyC,IAAI,yBAAyB,IAAI,0BAA0B,CAAC;AAC9G,CAAC;AAED,gDAAgD;AAChD,MAAM,UAAU,SAAS,CAAC,KAA6D;IACrF,OAAO,sBAAsB,KAAK;SAC/B,GAAG,CACF,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,wBAAwB,KAAK,aAAa,UAAU,CAAC,KAAK,CAAC,eAAe,CAC/F;SACA,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC;AACtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cogitator-ai/evals",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"description": "Evaluation framework for Cogitator AI agents",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cogitator",
|
|
@@ -41,10 +41,11 @@
|
|
|
41
41
|
"node": ">=22.12.0"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
+
"yaml": "^2.9.1",
|
|
44
45
|
"zod": "^4.6.5"
|
|
45
46
|
},
|
|
46
47
|
"peerDependencies": {
|
|
47
|
-
"@cogitator-ai/core": ">=0.
|
|
48
|
+
"@cogitator-ai/core": ">=0.72.0",
|
|
48
49
|
"vitest": ">=3.0.0"
|
|
49
50
|
},
|
|
50
51
|
"peerDependenciesMeta": {
|
|
@@ -59,7 +60,8 @@
|
|
|
59
60
|
"papaparse": "^5.7.0"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
|
-
"@cogitator-ai/core": "0.
|
|
63
|
+
"@cogitator-ai/core": "0.72.0",
|
|
64
|
+
"@cogitator-ai/test-utils": "0.14.1",
|
|
63
65
|
"@types/papaparse": "^5.3.15",
|
|
64
66
|
"typescript": "^6.0.3",
|
|
65
67
|
"vitest": "^5.0.3"
|