@leostera/evalkit 0.0.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-BwNYw4-_.d.mts","names":[],"sources":["../../core/src/identity.ts","../../core/src/matrix.ts","../../core/src/config.ts","../../core/src/schema.ts","../../core/src/trajectory.ts","../../core/src/index.ts"],"mappings":";;cAEa,oBAAkB,OAAA;KACnB,sBAAsB,mBAAmB;;iBAGrC,SAAS;;cAOZ,YAAU,OAAA,cAAA,OAAA;KAKX,cAAc,WAAW;KAEzB,YAAY,cAAc,eAAe,2BACxC;cAEA,mBAAiB,OAAA,cAAA,OAAA;iBAMd,kBAAkB,cAAc,cAAc,MAAM,QAAK,OAAA,cAAA,OAAA;iBAWzD,YAAY,cAAc,cACxC,MAAM,OACN,MAAM,OACL,YAAY;iBAIC,iBAAiB,cAAc,cAC7C,eACA,eAAe;EACZ,MAAM;EAAO,MAAM;EAAM,KAAK,YAAY;;iBAY/B,aAAa,eAAe,eAAe,eAAe;;;;iBCtD1D,oBAAoB,OAAO;KAqB/B;;EAEV;;EAEA,aAAa,SAAS,wBAAwB;;EAE9C,YAAY;;KAEF;EACV;;EAEA;EACA,MAAM;EACN,YAAY;;KAEF;EACV;EACA;EACA,gBAAgB;EAChB,YAAY,SAAS,wBAAwB;EAC7C,WAAW;;EAEX,iBAAiB;;EAEjB,mBAAmB;;KAET,aAAa;EACvB;EACA,MAAM,YAAY;EAClB,MAAM,YAAY,kBAAkB,iBAAiB;;iBAWvC,uBAAuB,UAAU,sBAC/C,YAAY,IACX,aAAa;;;KCpEJ;;EAEV;EACA;EACA;;EAEA,iBAAiB;EACjB,WAAW;;EAEX,SAAS,KAAK;IAA0C;;EACxD;IAAc;IAAsB;IAAiB;;EACrD;EACA;;;iBAIc,mBAAmB,UAAU,eAC3C,eAAe,IACd;;;;cChBU,iBAAe,OAAA;cAOf,qBAAmB,OAAA;;;;;cAMnB,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tB;KAEA;EACV;EACA;EACA,QAAQ;EACR;EACA;EACA,aAAa;EACb;IAAW;IAAY;;EACvB,MAAM;EACN;;KAGU;EACV;EACA;EACA,QAAQ;EACR;EACA,UAAU;EACV;EACA;EACA,aAAa;EACb;IAAW;IAAY;;EACvB,MAAM;EACN;;KAGU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX,QAAQ;EACR;EACA,QAAQ;EACR;IAAoB;IAAoB;;;KAG9B;EACV,SAAS;EACT,cAAc;EACd;EACA;EACA;;KAGU;;EAEV;EACA;EACA;;KAGU;EACV,QAAQ;EACR;EACA;EACA,UAAU;EACV,YAAY;EACZ,QAAQ;;KAGE;EACV,QAAQ;EACR;EACA;EACA;EACA;EACA;EACA,QAAQ;;KAGE;EACV,YAAY,OAAO,kBAAkB;EACrC,YAAY,SAAS,eAAe;;EAEpC,cAAc,cAAc,MAAM,aAAa;EAC/C,SAAS,SAAS,eAAe;;KAGvB;WACD;EACT,WAAW,UAAU,gBAAgB,QAAQ;EAC7C,SAAS,SAAS,aAAa;;KAGrB;EACV,SAAS,UAAU,cAAc,QAAQ;;KAG/B;EACV;EACA,QAAQ;EACR;EACA,UAAU;EACV;EACA;EACA,QAAQ;EACR;EACA;EACA,UAAU;EACV,QAAQ;;KAGE;EACV;EACA;EACA;EACA;;KAGU,YAAY;EACtB;EACA;EACA;EACA;EACA,mBAAmB;;EAEnB,SAAS;;iBAOK,YAAY,iBAAiB"}
@@ -0,0 +1,12 @@
1
+ import { $ as TrialMetadata, $t as Uuid, A as FixtureContext, At as RecordedErrorSchema, B as ReportStore, Bt as TrialSummarySchema, C as EvalRegistryMetadata, Ct as parseTrajectoryJsonl, D as ExpectToolCallStep, Dt as CheckpointResultSchema, E as EvaluatorWorkspace, Et as AutIdentitySchema, F as JsonValue, Ft as ScoreResultSchema, G as RunWriter, Gt as EvalMatrixCell, H as RunResult, Ht as EvalkitConfig, I as JudgeRule, It as TrajectoryEventSchema, J as ScoreValue, Jt as defineEvalMatrix, K as RunnerEvent, Kt as MatrixSelection, L as JudgeRunInfo, Lt as TrialManifestSchema, M as InlineFixture, Mt as RunMetadataSchema, N as JsonObject, Nt as RunStatusSchema, O as FileFixture, Ot as JsonValueSchema, P as JsonPrimitive, Pt as RunSummarySchema, Q as TranscriptStep, Qt as ResourceUriSchema, R as PredicateScorer, Rt as TrialMetadataSchema, S as EvalRegistry, St as user, T as EvalSuiteMetadata, Tt as ArtifactEntrySchema, U as RunStatus, Ut as defineConfig, V as RunMetadata, Vt as UsageSchema, W as RunSummary, Wt as EvalMatrix, X as ScoringRule, Xt as ResourceKindSchema, Y as ScoringContext, Yt as ResourceKind, Z as TrajectoryEvent, Zt as ResourceUri, _ as EvalCatalogEntry, _t as inlineFile, a as AggregateScoring, an as resourceUuid, at as Usage, b as EvalPolicy, bt as recordError, c as AutAdapter, ct as agent, d as AutIdentity, dt as defineEval, en as UuidSchema, et as TrialResult, f as AutSession, ft as defineSuite, g as DynamicFixture, gt as file, h as DirectoryFixture, ht as expectToolCall, i as AgentStep, in as resourceUriSchema, it as TurnView, j as FixtureVisibility, jt as RunManifestSchema, k as Fixture, kt as JudgeRunInfoSchema, l as AutContext, lt as authoringId, m as CheckpointResult, mt as dynamic, n as AgentRuntimeName, nn as parseResourceUri, nt as TrialSummary, o as ArtifactEntry, ot as UserStep, p as CandidateWorkspace, pt as directory, q as ScoreResult, qt as canonicalParameters, r as AgentRuntimes, rn as resourceUri, rt as TrialWriter, s as ArtifactView, st as WorkspaceView, t as AgentRuntime, tn as authorId, tt as TrialScoring, u as AutEvent, ut as defineAgent, v as EvalCatalogFixture, vt as judge, w as EvalSuite, wt as ApiErrorSchema, x as EvalRegistration, xt as registerEvals, y as EvalDefinition, yt as predicate, z as RecordedError, zt as TrialScoringSchema } from "./index-BwNYw4-_.mjs";
2
+ //#region ../agents/src/index.d.ts
3
+ type PiAutOptions = {
4
+ command?: string;
5
+ /** Additional non-secret Pi arguments, such as an explicit model selection. */
6
+ args?: string[];
7
+ };
8
+ /** A local, one-prompt-per-turn AUT backed by Pi's non-interactive print mode. */
9
+ export declare function piAgent(options?: PiAutOptions): AutAdapter;
10
+ //#endregion
11
+ export { AgentRuntime, AgentRuntimeName, AgentRuntimes, AgentStep, AggregateScoring, ApiErrorSchema, ArtifactEntry, ArtifactEntrySchema, ArtifactView, AutAdapter, AutContext, AutEvent, AutIdentity, AutIdentitySchema, AutSession, CandidateWorkspace, CheckpointResult, CheckpointResultSchema, DirectoryFixture, DynamicFixture, EvalCatalogEntry, EvalCatalogFixture, EvalDefinition, type EvalMatrix, type EvalMatrixCell, EvalPolicy, EvalRegistration, EvalRegistry, EvalRegistryMetadata, EvalSuite, EvalSuiteMetadata, type EvalkitConfig, EvaluatorWorkspace, ExpectToolCallStep, FileFixture, Fixture, FixtureContext, FixtureVisibility, InlineFixture, JsonObject, JsonPrimitive, JsonValue, JsonValueSchema, JudgeRule, JudgeRunInfo, JudgeRunInfoSchema, type MatrixSelection, PredicateScorer, RecordedError, RecordedErrorSchema, ReportStore, ResourceKind, ResourceKindSchema, ResourceUri, ResourceUriSchema, RunManifestSchema, RunMetadata, RunMetadataSchema, RunResult, RunStatus, RunStatusSchema, RunSummary, RunSummarySchema, RunWriter, RunnerEvent, ScoreResult, ScoreResultSchema, ScoreValue, ScoringContext, ScoringRule, TrajectoryEvent, TrajectoryEventSchema, TranscriptStep, TrialManifestSchema, TrialMetadata, TrialMetadataSchema, TrialResult, TrialScoring, TrialScoringSchema, TrialSummary, TrialSummarySchema, TrialWriter, TurnView, Usage, UsageSchema, UserStep, Uuid, UuidSchema, WorkspaceView, agent, authorId, authoringId, canonicalParameters, defineAgent, defineConfig, defineEval, defineEvalMatrix, defineSuite, directory, dynamic, expectToolCall, file, inlineFile, judge, parseResourceUri, parseTrajectoryJsonl, predicate, recordError, registerEvals, resourceUri, resourceUriSchema, resourceUuid, user };
12
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../../agents/src/index.ts"],"mappings":";;KAcY;EACV;;EAEA;;;wBAIc,QAAQ,UAAS,eAAoB"}
package/dist/index.mjs ADDED
@@ -0,0 +1,79 @@
1
+ import { A as TrialManifestSchema, B as authorId, C as RecordedErrorSchema, D as RunSummarySchema, E as RunStatusSchema, F as canonicalParameters, H as resourceUri, I as defineEvalMatrix, L as ResourceKindSchema, M as TrialScoringSchema, N as TrialSummarySchema, O as ScoreResultSchema, P as UsageSchema, R as ResourceUriSchema, S as JudgeRunInfoSchema, T as RunMetadataSchema, U as resourceUriSchema, V as parseResourceUri, W as resourceUuid, _ as ApiErrorSchema, a as defineSuite, b as CheckpointResultSchema, c as expectToolCall, d as judge, f as predicate, g as parseTrajectoryJsonl, h as user, i as defineEval, j as TrialMetadataSchema, k as TrajectoryEventSchema, l as file, m as registerEvals, n as authoringId, o as directory, p as recordError, r as defineAgent, s as dynamic, t as agent, u as inlineFile, v as ArtifactEntrySchema, w as RunManifestSchema, x as JsonValueSchema, y as AutIdentitySchema, z as UuidSchema } from "./src-CopGdrwX.mjs";
2
+ //#region ../core/src/config.ts
3
+ /** Pure, typed project configuration. Loading/discovery belongs to the CLI. */
4
+ function defineConfig(configuration) {
5
+ return configuration;
6
+ }
7
+ //#endregion
8
+ //#region ../agents/src/index.ts
9
+ /** A local, one-prompt-per-turn AUT backed by Pi's non-interactive print mode. */
10
+ function piAgent(options = {}) {
11
+ const command = options.command ?? "pi";
12
+ return defineAgent({
13
+ identity: {
14
+ name: "Pi Agent",
15
+ kind: "process",
16
+ id: "pi-agent"
17
+ },
18
+ runtimes: { local: {
19
+ kind: "process",
20
+ configuration: { command }
21
+ } },
22
+ async start({ context, onEvent }) {
23
+ await onEvent({
24
+ kind: "started",
25
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
26
+ });
27
+ let turn = 0;
28
+ return {
29
+ async send(message) {
30
+ turn += 1;
31
+ await onEvent({
32
+ kind: "turn-started",
33
+ turn,
34
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
35
+ });
36
+ const process = Bun.spawn([
37
+ command,
38
+ "--print",
39
+ "--no-session",
40
+ "--no-tools",
41
+ ...options.args ?? [],
42
+ message
43
+ ], {
44
+ cwd: context.workspace.root,
45
+ stdout: "pipe",
46
+ stderr: "pipe"
47
+ });
48
+ const [stdout, stderr, exitCode] = await Promise.all([
49
+ new Response(process.stdout).text(),
50
+ new Response(process.stderr).text(),
51
+ process.exited
52
+ ]);
53
+ if (exitCode !== 0) throw new Error(`Pi exited with ${exitCode}: ${stderr.trim()}`);
54
+ await onEvent({
55
+ kind: "message",
56
+ role: "assistant",
57
+ content: stdout.trim(),
58
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
59
+ });
60
+ await onEvent({
61
+ kind: "turn-completed",
62
+ turn,
63
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
64
+ });
65
+ },
66
+ async close() {
67
+ await onEvent({
68
+ kind: "completed",
69
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
70
+ });
71
+ }
72
+ };
73
+ }
74
+ });
75
+ }
76
+ //#endregion
77
+ export { ApiErrorSchema, ArtifactEntrySchema, AutIdentitySchema, CheckpointResultSchema, JsonValueSchema, JudgeRunInfoSchema, RecordedErrorSchema, ResourceKindSchema, ResourceUriSchema, RunManifestSchema, RunMetadataSchema, RunStatusSchema, RunSummarySchema, ScoreResultSchema, TrajectoryEventSchema, TrialManifestSchema, TrialMetadataSchema, TrialScoringSchema, TrialSummarySchema, UsageSchema, UuidSchema, agent, authorId, authoringId, canonicalParameters, defineAgent, defineConfig, defineEval, defineEvalMatrix, defineSuite, directory, dynamic, expectToolCall, file, inlineFile, judge, parseResourceUri, parseTrajectoryJsonl, piAgent, predicate, recordError, registerEvals, resourceUri, resourceUriSchema, resourceUuid, user };
78
+
79
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../core/src/config.ts","../../agents/src/index.ts"],"sourcesContent":["import type { EvalDefinition, EvalRegistry } from './index.js';\nimport type { EvalMatrixDefinition } from './matrix.js';\n\nexport type EvalkitConfig = {\n /** Paths are relative to evalkit.config.js/ts, not the invoking shell directory. */\n testDir?: string;\n include?: readonly string[];\n exclude?: readonly string[];\n /** Explicit definitions are an alternative to discovery (e.g. hosted registries). */\n evals?: readonly EvalDefinition[];\n registry?: EvalRegistry;\n /** Applied to every discovered eval. Values are forwarded, never provider-interpreted. */\n matrix?: Omit<EvalMatrixDefinition, 'evals' | 'id'> & { id?: string };\n execution?: { concurrency?: number; trials?: number; maxCells?: number };\n reportDir?: string;\n sandboxDir?: string;\n};\n\n/** Pure, typed project configuration. Loading/discovery belongs to the CLI. */\nexport function defineConfig<const T extends EvalkitConfig>(\n configuration: T,\n): T {\n return configuration;\n}\n","import { defineAgent, type AutAdapter } from '@evalkit/core';\n\nexport type AgentsSdkAutOptions = {\n endpoint: string;\n agent: string;\n getToken?: () => Promise<string | undefined> | string | undefined;\n instanceName?: (context: { runId: string; trialId: string }) => string;\n};\n\n/** Deferred remote Agents SDK transport. */\nexport function agentsSdk(_options: AgentsSdkAutOptions): AutAdapter {\n throw new Error('Agents SDK transport is not implemented yet');\n}\n\nexport type PiAutOptions = {\n command?: string;\n /** Additional non-secret Pi arguments, such as an explicit model selection. */\n args?: string[];\n};\n\n/** A local, one-prompt-per-turn AUT backed by Pi's non-interactive print mode. */\nexport function piAgent(options: PiAutOptions = {}): AutAdapter {\n const command = options.command ?? 'pi';\n return defineAgent({\n identity: {\n name: 'Pi Agent',\n kind: 'process',\n id: 'pi-agent',\n },\n runtimes: { local: { kind: 'process', configuration: { command } } },\n async start({ context, onEvent }) {\n await onEvent({ kind: 'started', timestamp: new Date().toISOString() });\n let turn = 0;\n return {\n async send(message: string) {\n turn += 1;\n await onEvent({\n kind: 'turn-started',\n turn,\n timestamp: new Date().toISOString(),\n });\n const process = Bun.spawn(\n [\n command,\n '--print',\n '--no-session',\n '--no-tools',\n ...(options.args ?? []),\n message,\n ],\n { cwd: context.workspace.root, stdout: 'pipe', stderr: 'pipe' },\n );\n const [stdout, stderr, exitCode] = await Promise.all([\n new Response(process.stdout).text(),\n new Response(process.stderr).text(),\n process.exited,\n ]);\n if (exitCode !== 0)\n throw new Error(`Pi exited with ${exitCode}: ${stderr.trim()}`);\n await onEvent({\n kind: 'message',\n role: 'assistant',\n content: stdout.trim(),\n timestamp: new Date().toISOString(),\n });\n await onEvent({\n kind: 'turn-completed',\n turn,\n timestamp: new Date().toISOString(),\n });\n },\n async close() {\n await onEvent({\n kind: 'completed',\n timestamp: new Date().toISOString(),\n });\n },\n };\n },\n });\n}\n"],"mappings":";;;AAmBA,SAAgB,aACd,eACG;CACH,OAAO;AACT;;;;ACFA,SAAgB,QAAQ,UAAwB,CAAC,GAAe;CAC9D,MAAM,UAAU,QAAQ,WAAW;CACnC,OAAO,YAAY;EACjB,UAAU;GACR,MAAM;GACN,MAAM;GACN,IAAI;EACN;EACA,UAAU,EAAE,OAAO;GAAE,MAAM;GAAW,eAAe,EAAE,QAAQ;EAAE,EAAE;EACnE,MAAM,MAAM,EAAE,SAAS,WAAW;GAChC,MAAM,QAAQ;IAAE,MAAM;IAAW,4BAAW,IAAI,KAAK,EAAA,CAAE,YAAY;GAAE,CAAC;GACtE,IAAI,OAAO;GACX,OAAO;IACL,MAAM,KAAK,SAAiB;KAC1B,QAAQ;KACR,MAAM,QAAQ;MACZ,MAAM;MACN;MACA,4BAAW,IAAI,KAAK,EAAA,CAAE,YAAY;KACpC,CAAC;KACD,MAAM,UAAU,IAAI,MAClB;MACE;MACA;MACA;MACA;MACA,GAAI,QAAQ,QAAQ,CAAC;MACrB;KACF,GACA;MAAE,KAAK,QAAQ,UAAU;MAAM,QAAQ;MAAQ,QAAQ;KAAO,CAChE;KACA,MAAM,CAAC,QAAQ,QAAQ,YAAY,MAAM,QAAQ,IAAI;MACnD,IAAI,SAAS,QAAQ,MAAM,CAAC,CAAC,KAAK;MAClC,IAAI,SAAS,QAAQ,MAAM,CAAC,CAAC,KAAK;MAClC,QAAQ;KACV,CAAC;KACD,IAAI,aAAa,GACf,MAAM,IAAI,MAAM,kBAAkB,SAAS,IAAI,OAAO,KAAK,GAAG;KAChE,MAAM,QAAQ;MACZ,MAAM;MACN,MAAM;MACN,SAAS,OAAO,KAAK;MACrB,4BAAW,IAAI,KAAK,EAAA,CAAE,YAAY;KACpC,CAAC;KACD,MAAM,QAAQ;MACZ,MAAM;MACN;MACA,4BAAW,IAAI,KAAK,EAAA,CAAE,YAAY;KACpC,CAAC;IACH;IACA,MAAM,QAAQ;KACZ,MAAM,QAAQ;MACZ,MAAM;MACN,4BAAW,IAAI,KAAK,EAAA,CAAE,YAAY;KACpC,CAAC;IACH;GACF;EACF;CACF,CAAC;AACH"}
@@ -0,0 +1,290 @@
1
+ import { B as ReportStore, F as JsonValue, Gt as EvalMatrixCell, H as RunResult, Kt as MatrixSelection, N as JsonObject, V as RunMetadata, Wt as EvalMatrix, Z as TrajectoryEvent, n as AgentRuntimeName, y as EvalDefinition } from "./index-BwNYw4-_.mjs";
2
+ import { Effect } from "effect";
3
+ //#region ../runner/src/errors.d.ts
4
+ declare const AutExecutionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
5
+ readonly _tag: "AutExecutionError";
6
+ } & Readonly<A>;
7
+ export declare class AutExecutionError extends AutExecutionError_base<{
8
+ cause: unknown;
9
+ message?: string;
10
+ }> {}
11
+ declare const FixtureError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
12
+ readonly _tag: "FixtureError";
13
+ } & Readonly<A>;
14
+ export declare class FixtureError extends FixtureError_base<{
15
+ cause: unknown;
16
+ message?: string;
17
+ }> {}
18
+ declare const ReportError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
19
+ readonly _tag: "ReportError";
20
+ } & Readonly<A>;
21
+ export declare class ReportError extends ReportError_base<{
22
+ cause: unknown;
23
+ message?: string;
24
+ }> {}
25
+ declare const ScoringError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
26
+ readonly _tag: "ScoringError";
27
+ } & Readonly<A>;
28
+ export declare class ScoringError extends ScoringError_base<{
29
+ cause: unknown;
30
+ message?: string;
31
+ }> {}
32
+ declare const CheckpointExecutionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
33
+ readonly _tag: "CheckpointExecutionError";
34
+ } & Readonly<A>;
35
+ export declare class CheckpointExecutionError extends CheckpointExecutionError_base<{
36
+ step: number;
37
+ name: string;
38
+ message: string;
39
+ cause: unknown;
40
+ }> {}
41
+ //#endregion
42
+ //#region ../runner/src/local-report-store.d.ts
43
+ /** Persists each run as a local tree rooted below `rootDirectory`. */
44
+ export declare function localReportStore(rootDirectory: string): ReportStore;
45
+ //#endregion
46
+ //#region ../runner/src/local-report-reader.d.ts
47
+ export declare const readRunManifest: (root: string, runId: string) => Promise<{
48
+ readonly schemaVersion: 2 | 3;
49
+ readonly runUri: string;
50
+ readonly evalId: string;
51
+ readonly suiteId?: string | undefined;
52
+ readonly parameters?: {
53
+ readonly [x: string]: JsonValue;
54
+ } | undefined;
55
+ readonly matrix?: {
56
+ readonly id: string;
57
+ readonly cellKey: string;
58
+ } | undefined;
59
+ readonly aut?: {
60
+ readonly name?: string | undefined;
61
+ readonly kind: string;
62
+ readonly id: string;
63
+ readonly version?: string | undefined;
64
+ } | undefined;
65
+ readonly startedAt: string;
66
+ readonly status?: "cancelled" | "completed" | "failed" | "running" | undefined;
67
+ }>;
68
+ export declare const readRunSummary: (root: string, runId: string) => Promise<{
69
+ readonly status: "cancelled" | "completed" | "failed" | "running";
70
+ readonly endedAt: string;
71
+ readonly durationMs?: number | undefined;
72
+ readonly trialCount: number;
73
+ readonly passed: number;
74
+ readonly failed: number;
75
+ readonly error?: {
76
+ readonly name: string;
77
+ readonly message: string;
78
+ readonly stack?: string | undefined;
79
+ } | undefined;
80
+ }>;
81
+ export declare const readTrialManifest: (root: string, runId: string, trialId: string) => Promise<{
82
+ readonly schemaVersion: 2 | 3;
83
+ readonly runUri: string;
84
+ readonly trialUri: string;
85
+ readonly trialIndex: number;
86
+ readonly evalId: string;
87
+ readonly parameters?: {
88
+ readonly [x: string]: JsonValue;
89
+ } | undefined;
90
+ readonly matrix?: {
91
+ readonly id: string;
92
+ readonly cellKey: string;
93
+ } | undefined;
94
+ readonly aut?: {
95
+ readonly name?: string | undefined;
96
+ readonly kind: string;
97
+ readonly id: string;
98
+ readonly version?: string | undefined;
99
+ } | undefined;
100
+ readonly startedAt: string;
101
+ readonly status?: "cancelled" | "completed" | "failed" | "running" | undefined;
102
+ }>;
103
+ export declare const readTrialSummary: (root: string, runId: string, trialId: string) => Promise<{
104
+ readonly status: "cancelled" | "completed" | "failed" | "running";
105
+ readonly endedAt: string;
106
+ readonly durationMs?: number | undefined;
107
+ readonly scoring?: {
108
+ readonly results: {
109
+ readonly name: string;
110
+ readonly kind: "judge" | "predicate";
111
+ readonly value?: number | undefined;
112
+ readonly passed?: boolean | undefined;
113
+ readonly explanation?: string | undefined;
114
+ readonly evidence?: JsonValue | undefined;
115
+ readonly judge?: {
116
+ readonly agent?: {
117
+ readonly id: string;
118
+ readonly kind: string;
119
+ readonly name?: string | undefined;
120
+ readonly version?: string | undefined;
121
+ } | undefined;
122
+ readonly usage?: {
123
+ readonly inputTokens?: number | undefined;
124
+ readonly outputTokens?: number | undefined;
125
+ readonly totalTokens?: number | undefined;
126
+ } | undefined;
127
+ readonly events?: JsonValue[] | undefined;
128
+ } | undefined;
129
+ readonly durationMs: number;
130
+ readonly error?: {
131
+ readonly name: string;
132
+ readonly message: string;
133
+ readonly stack?: string | undefined;
134
+ } | undefined;
135
+ }[];
136
+ readonly checkpoints?: {
137
+ readonly step: number;
138
+ readonly kind: "expect-tool-call" | "judge" | "predicate";
139
+ readonly name: string;
140
+ readonly status: "error" | "failed" | "passed" | "skipped";
141
+ readonly value?: number | undefined;
142
+ readonly passed?: boolean | undefined;
143
+ readonly explanation?: string | undefined;
144
+ readonly evidence?: JsonValue | undefined;
145
+ readonly judge?: {
146
+ readonly agent?: {
147
+ readonly id: string;
148
+ readonly kind: string;
149
+ readonly name?: string | undefined;
150
+ readonly version?: string | undefined;
151
+ } | undefined;
152
+ readonly usage?: {
153
+ readonly inputTokens?: number | undefined;
154
+ readonly outputTokens?: number | undefined;
155
+ readonly totalTokens?: number | undefined;
156
+ } | undefined;
157
+ readonly events?: JsonValue[] | undefined;
158
+ } | undefined;
159
+ readonly durationMs?: number | undefined;
160
+ readonly error?: {
161
+ readonly name: string;
162
+ readonly message: string;
163
+ readonly stack?: string | undefined;
164
+ } | undefined;
165
+ readonly matchedToolCall?: {
166
+ readonly eventIndex: number;
167
+ readonly id: string;
168
+ } | undefined;
169
+ }[] | undefined;
170
+ readonly skippedScorers?: string[] | undefined;
171
+ readonly overall?: number | undefined;
172
+ readonly passed: boolean;
173
+ } | undefined;
174
+ readonly artifacts?: {
175
+ readonly path: string;
176
+ readonly kind: "directory" | "file";
177
+ readonly size?: number | undefined;
178
+ }[] | undefined;
179
+ readonly error?: {
180
+ readonly name: string;
181
+ readonly message: string;
182
+ readonly stack?: string | undefined;
183
+ } | undefined;
184
+ }>;
185
+ export declare const readTrialScoring: (root: string, runId: string, trialId: string) => Promise<{
186
+ readonly results: {
187
+ readonly name: string;
188
+ readonly kind: "judge" | "predicate";
189
+ readonly value?: number | undefined;
190
+ readonly passed?: boolean | undefined;
191
+ readonly explanation?: string | undefined;
192
+ readonly evidence?: JsonValue | undefined;
193
+ readonly judge?: {
194
+ readonly agent?: {
195
+ readonly id: string;
196
+ readonly kind: string;
197
+ readonly name?: string | undefined;
198
+ readonly version?: string | undefined;
199
+ } | undefined;
200
+ readonly usage?: {
201
+ readonly inputTokens?: number | undefined;
202
+ readonly outputTokens?: number | undefined;
203
+ readonly totalTokens?: number | undefined;
204
+ } | undefined;
205
+ readonly events?: JsonValue[] | undefined;
206
+ } | undefined;
207
+ readonly durationMs: number;
208
+ readonly error?: {
209
+ readonly name: string;
210
+ readonly message: string;
211
+ readonly stack?: string | undefined;
212
+ } | undefined;
213
+ }[];
214
+ readonly checkpoints?: {
215
+ readonly step: number;
216
+ readonly kind: "expect-tool-call" | "judge" | "predicate";
217
+ readonly name: string;
218
+ readonly status: "error" | "failed" | "passed" | "skipped";
219
+ readonly value?: number | undefined;
220
+ readonly passed?: boolean | undefined;
221
+ readonly explanation?: string | undefined;
222
+ readonly evidence?: JsonValue | undefined;
223
+ readonly judge?: {
224
+ readonly agent?: {
225
+ readonly id: string;
226
+ readonly kind: string;
227
+ readonly name?: string | undefined;
228
+ readonly version?: string | undefined;
229
+ } | undefined;
230
+ readonly usage?: {
231
+ readonly inputTokens?: number | undefined;
232
+ readonly outputTokens?: number | undefined;
233
+ readonly totalTokens?: number | undefined;
234
+ } | undefined;
235
+ readonly events?: JsonValue[] | undefined;
236
+ } | undefined;
237
+ readonly durationMs?: number | undefined;
238
+ readonly error?: {
239
+ readonly name: string;
240
+ readonly message: string;
241
+ readonly stack?: string | undefined;
242
+ } | undefined;
243
+ readonly matchedToolCall?: {
244
+ readonly eventIndex: number;
245
+ readonly id: string;
246
+ } | undefined;
247
+ }[] | undefined;
248
+ readonly skippedScorers?: string[] | undefined;
249
+ readonly overall?: number | undefined;
250
+ readonly passed: boolean;
251
+ }>;
252
+ export declare function readTrialEvents(root: string, runId: string, trialId: string): Promise<TrajectoryEvent[]>;
253
+ //#endregion
254
+ //#region ../runner/src/matrix.d.ts
255
+ /** Bounded workers pull cells from the iterator; no Cartesian job array is allocated. */
256
+ export declare function runMatrix(matrix: EvalMatrix, options: Omit<RunEvalOptions, 'runId' | 'trialId' | 'parameters' | 'matrix'> & {
257
+ selection?: MatrixSelection;
258
+ onResult?: (cell: EvalMatrixCell, result: RunResult) => void | Promise<void>;
259
+ }): Effect.Effect<{
260
+ cells: number;
261
+ passed: number;
262
+ failed: number;
263
+ }, unknown>;
264
+ //#endregion
265
+ //#region ../runner/src/index.d.ts
266
+ export type RunEvalOptions = {
267
+ report: ReportStore;
268
+ runId?: string;
269
+ trialId?: string;
270
+ suiteId?: string;
271
+ /** Overrides the eval policy's requested number of independent trials. */
272
+ trials?: number;
273
+ /** Parameters made available to the AUT for this invocation. */
274
+ parameters?: JsonObject;
275
+ /** Matrix provenance retained with every aggregate and trial manifest. */
276
+ matrix?: RunMetadata['matrix'];
277
+ /** Selects a declared AUT runtime such as local, sandbox, or remote. */
278
+ runtime?: AgentRuntimeName;
279
+ /** Maximum number of trials from this aggregate run executing concurrently. */
280
+ concurrency?: number;
281
+ /** Optional shared limiter for coordinating trials across aggregate runs. */
282
+ semaphore?: Effect.Semaphore;
283
+ /** Base directory for persistent local trial workspaces. Omit for an ephemeral OS temp workspace. */
284
+ workspaceRoot?: string;
285
+ now?: () => Date;
286
+ };
287
+ /** Effect-native aggregate eval execution entry point. */
288
+ export declare function runEval(definition: EvalDefinition, options: RunEvalOptions): Effect.Effect<RunResult, unknown>;
289
+ //#endregion
290
+ //# sourceMappingURL=runner.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runner.d.mts","names":["_$_evalkit_core0.JsonValue","_$_evalkit_core0.TrajectoryEvent"],"sources":["../../runner/src/errors.ts","../../runner/src/local-report-store.ts","../../runner/src/local-report-reader.ts","../../runner/src/matrix.ts","../../runner/src/index.ts"],"mappings":";;;;;;qBAEa,0BAA0B;EACrC;EACA;;;;;qBAGW,qBAAqB;EAChC;EACA;;;;;qBAGW,oBAAoB;EAC/B;EACA;;;;;qBAGW,qBAAqB;EAChC;EACA;;;;;qBASW,iCAAiC;EAG5C;EACA;EACA;EACA;;;;;wBCmGc,iBAAiB,wBAAwB;;;qBC/G5C,kBAAe,cAAgB,kBAAe;;;;;;0BAA9CA;;;;;;;;;;;;;;;qBAEA,iBAAc,cAAgB,kBAAe;;;;;;;;;;;;;qBAE7C,oBAAiB,cAChB,eACC,oBACE;;;;;;;0BAHJA;;;;;;;;;;;;;;;qBASA,mBAAgB,cACf,eACC,oBACE;;;;;;;;;;;0BAHJA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBASA,mBAAgB,cACf,eACC,oBACE;;;;;;;wBAHJA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBASS,gBACpB,cACA,eACA,kBAAe,QAHKC;;;;wBC3CN,UACd,QAAQ,YACR,SAAS,KACP;EAGA,YAAY;EACZ,YACE,MAAM,gBACN,QAAQ,qBACE;IAEb,OAAO;EAAS;EAAe;EAAgB;;;;YCoBtC;EACV,QAAQ;EACR;EACA;EACA;;EAEA;;EAEA,aAAa;;EAEb,SAAS;;EAET,UAAU;;EAEV;;EAEA,YAAY,OAAO;;EAEnB;EACA,YAAY;;;wBASE,QACd,YAAY,gBACZ,SAAS,iBACR,OAAO,OAAO"}
@@ -0,0 +1,2 @@
1
+ import { a as readTrialEvents, c as readTrialSummary, d as CheckpointExecutionError, f as FixtureError, i as readRunSummary, l as localReportStore, m as ScoringError, n as runMatrix, o as readTrialManifest, p as ReportError, r as readRunManifest, s as readTrialScoring, t as runEval, u as AutExecutionError } from "./src-DJDem6nZ.mjs";
2
+ export { AutExecutionError, CheckpointExecutionError, FixtureError, ReportError, ScoringError, localReportStore, readRunManifest, readRunSummary, readTrialEvents, readTrialManifest, readTrialScoring, readTrialSummary, runEval, runMatrix };