anpord 0.1.4 → 0.1.6
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/dist/cli.cjs +3 -3
- package/dist/cli.mjs +3 -3
- package/dist/{client-BCZEcfVE.cjs → client-BdGNFO_D.cjs} +18 -3
- package/dist/{client-BfhmGRQl.mjs → client-POb2FNW1.mjs} +18 -3
- package/dist/{compiler-CZoX4jkx.cjs → compiler-7cyJPuPr.cjs} +55 -5
- package/dist/{compiler-CKiewwUc.mjs → compiler-Dk5l0aof.mjs} +55 -5
- package/dist/config.cjs +1 -1
- package/dist/config.mjs +1 -1
- package/dist/eval.cjs +1 -1
- package/dist/eval.d.cts +5 -2
- package/dist/eval.d.mts +5 -2
- package/dist/eval.mjs +1 -1
- package/dist/{evals-api-sqVNeWet.d.cts → evals-api-BW7WsvHI.d.cts} +8 -2
- package/dist/{evals-api-DUNVUGUy.d.mts → evals-api-D-86RBA4.d.mts} +8 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +90 -16
- package/dist/index.d.mts +90 -16
- package/dist/index.mjs +1 -1
- package/dist/{source-DQ8HChlm.d.cts → source-Bq8YhKOG.d.cts} +6 -2
- package/dist/{source-DQ8HChlm.d.mts → source-Bq8YhKOG.d.mts} +6 -2
- package/dist/source.d.cts +1 -1
- package/dist/source.d.mts +1 -1
- package/package.json +2 -2
package/dist/cli.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const require_client = require("./client-
|
|
2
|
+
const require_client = require("./client-BdGNFO_D.cjs");
|
|
3
3
|
const require_config = require("./config.cjs");
|
|
4
4
|
const require_errors = require("./errors-Boum34f5.cjs");
|
|
5
|
-
const require_compiler = require("./compiler-
|
|
5
|
+
const require_compiler = require("./compiler-7cyJPuPr.cjs");
|
|
6
6
|
let _effect_platform = require("@effect/platform");
|
|
7
7
|
let effect = require("effect");
|
|
8
8
|
let _effect_cli = require("@effect/cli");
|
|
9
9
|
let _effect_platform_node = require("@effect/platform-node");
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version$1 = "0.1.
|
|
11
|
+
var version$1 = "0.1.6";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region ../template/src/extract.ts
|
|
14
14
|
/**
|
package/dist/cli.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as ChannelName, o as PromptId, r as layer, s as VersionNumber, t as AnpordApi } from "./client-
|
|
2
|
+
import { a as ChannelName, o as PromptId, r as layer, s as VersionNumber, t as AnpordApi } from "./client-POb2FNW1.mjs";
|
|
3
3
|
import { clientOptionsConfig } from "./config.mjs";
|
|
4
4
|
import { i as tokenMatcher, r as asAnpordError } from "./errors-C9bQUcA3.mjs";
|
|
5
|
-
import { n as compileEvalEffect } from "./compiler-
|
|
5
|
+
import { n as compileEvalEffect } from "./compiler-Dk5l0aof.mjs";
|
|
6
6
|
import { FileSystem } from "@effect/platform";
|
|
7
7
|
import { Cause, Clock, Console, Data, Duration, Effect, Layer, Option, Ref } from "effect";
|
|
8
8
|
import { Args, Command, Options } from "@effect/cli";
|
|
9
9
|
import { NodeContext, NodeRuntime } from "@effect/platform-node";
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version$1 = "0.1.
|
|
11
|
+
var version$1 = "0.1.6";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region ../template/src/extract.ts
|
|
14
14
|
/**
|
|
@@ -133,6 +133,20 @@ const EvalValidator = effect.Schema.Struct({
|
|
|
133
133
|
description: "A bundled TypeScript validator and its exported function name.",
|
|
134
134
|
identifier: "EvalValidator"
|
|
135
135
|
});
|
|
136
|
+
const EvalWorkspaceSetup = effect.Schema.Struct({
|
|
137
|
+
name: effect.Schema.String.pipe(effect.Schema.minLength(1), effect.Schema.maxLength(100)),
|
|
138
|
+
source: effect.Schema.String.pipe(effect.Schema.minLength(1), effect.Schema.maxLength(1e6))
|
|
139
|
+
}).annotations({
|
|
140
|
+
description: "A bundled TypeScript workspace setup and its exported function name.",
|
|
141
|
+
identifier: "EvalWorkspaceSetup"
|
|
142
|
+
});
|
|
143
|
+
const EvalSetupValue = effect.Schema.Record({
|
|
144
|
+
key: effect.Schema.String,
|
|
145
|
+
value: effect.Schema.Unknown
|
|
146
|
+
}).annotations({
|
|
147
|
+
description: "What a workspace setup returned, handed to the validator.",
|
|
148
|
+
identifier: "EvalSetupValue"
|
|
149
|
+
});
|
|
136
150
|
const EvalVariables = effect.Schema.Record({
|
|
137
151
|
key: effect.Schema.String,
|
|
138
152
|
value: effect.Schema.String
|
|
@@ -142,7 +156,7 @@ const EvalVariables = effect.Schema.Record({
|
|
|
142
156
|
});
|
|
143
157
|
const EvalCase = effect.Schema.Struct({
|
|
144
158
|
name: effect.Schema.String,
|
|
145
|
-
setup: effect.Schema.NullOr(
|
|
159
|
+
setup: effect.Schema.NullOr(EvalWorkspaceSetup),
|
|
146
160
|
source: EvalSource,
|
|
147
161
|
variables: effect.Schema.optionalWith(EvalVariables, { default: () => ({}) }),
|
|
148
162
|
validator: effect.Schema.optionalWith(effect.Schema.NullOr(EvalValidator), { default: () => null }),
|
|
@@ -216,6 +230,7 @@ const EvalVerifyStep = effect.Schema.Struct({
|
|
|
216
230
|
});
|
|
217
231
|
const EvalTrial = effect.Schema.Struct({
|
|
218
232
|
commands: effect.Schema.Int,
|
|
233
|
+
setupValue: effect.Schema.NullOr(EvalSetupValue),
|
|
219
234
|
exitCode: effect.Schema.Int,
|
|
220
235
|
failedCommands: effect.Schema.Int,
|
|
221
236
|
filesChanged: effect.Schema.Array(effect.Schema.String),
|
|
@@ -265,7 +280,7 @@ const EvalSetup = effect.Schema.Struct({
|
|
|
265
280
|
prompt: effect.Schema.String,
|
|
266
281
|
repoRef: effect.Schema.NullOr(effect.Schema.String),
|
|
267
282
|
repoUrl: effect.Schema.NullOr(effect.Schema.String),
|
|
268
|
-
|
|
283
|
+
setupName: effect.Schema.NullOr(effect.Schema.String),
|
|
269
284
|
validatorName: effect.Schema.NullOr(effect.Schema.String),
|
|
270
285
|
verifyCommand: effect.Schema.NullOr(effect.Schema.String),
|
|
271
286
|
workspace: effect.Schema.String
|
|
@@ -472,7 +487,7 @@ const ListEvalsRequest = effect.Schema.Struct({
|
|
|
472
487
|
});
|
|
473
488
|
const PublicEvalCase = effect.Schema.Struct({
|
|
474
489
|
name: effect.Schema.String,
|
|
475
|
-
setup: effect.Schema.optional(effect.Schema.NullOr(
|
|
490
|
+
setup: effect.Schema.optional(effect.Schema.NullOr(EvalWorkspaceSetup)),
|
|
476
491
|
source: effect.Schema.optional(EvalSource),
|
|
477
492
|
validator: effect.Schema.optional(effect.Schema.NullOr(EvalValidator)),
|
|
478
493
|
variables: effect.Schema.optional(EvalVariables),
|
|
@@ -133,6 +133,20 @@ const EvalValidator = Schema.Struct({
|
|
|
133
133
|
description: "A bundled TypeScript validator and its exported function name.",
|
|
134
134
|
identifier: "EvalValidator"
|
|
135
135
|
});
|
|
136
|
+
const EvalWorkspaceSetup = Schema.Struct({
|
|
137
|
+
name: Schema.String.pipe(Schema.minLength(1), Schema.maxLength(100)),
|
|
138
|
+
source: Schema.String.pipe(Schema.minLength(1), Schema.maxLength(1e6))
|
|
139
|
+
}).annotations({
|
|
140
|
+
description: "A bundled TypeScript workspace setup and its exported function name.",
|
|
141
|
+
identifier: "EvalWorkspaceSetup"
|
|
142
|
+
});
|
|
143
|
+
const EvalSetupValue = Schema.Record({
|
|
144
|
+
key: Schema.String,
|
|
145
|
+
value: Schema.Unknown
|
|
146
|
+
}).annotations({
|
|
147
|
+
description: "What a workspace setup returned, handed to the validator.",
|
|
148
|
+
identifier: "EvalSetupValue"
|
|
149
|
+
});
|
|
136
150
|
const EvalVariables = Schema.Record({
|
|
137
151
|
key: Schema.String,
|
|
138
152
|
value: Schema.String
|
|
@@ -142,7 +156,7 @@ const EvalVariables = Schema.Record({
|
|
|
142
156
|
});
|
|
143
157
|
const EvalCase = Schema.Struct({
|
|
144
158
|
name: Schema.String,
|
|
145
|
-
setup: Schema.NullOr(
|
|
159
|
+
setup: Schema.NullOr(EvalWorkspaceSetup),
|
|
146
160
|
source: EvalSource,
|
|
147
161
|
variables: Schema.optionalWith(EvalVariables, { default: () => ({}) }),
|
|
148
162
|
validator: Schema.optionalWith(Schema.NullOr(EvalValidator), { default: () => null }),
|
|
@@ -216,6 +230,7 @@ const EvalVerifyStep = Schema.Struct({
|
|
|
216
230
|
});
|
|
217
231
|
const EvalTrial = Schema.Struct({
|
|
218
232
|
commands: Schema.Int,
|
|
233
|
+
setupValue: Schema.NullOr(EvalSetupValue),
|
|
219
234
|
exitCode: Schema.Int,
|
|
220
235
|
failedCommands: Schema.Int,
|
|
221
236
|
filesChanged: Schema.Array(Schema.String),
|
|
@@ -265,7 +280,7 @@ const EvalSetup = Schema.Struct({
|
|
|
265
280
|
prompt: Schema.String,
|
|
266
281
|
repoRef: Schema.NullOr(Schema.String),
|
|
267
282
|
repoUrl: Schema.NullOr(Schema.String),
|
|
268
|
-
|
|
283
|
+
setupName: Schema.NullOr(Schema.String),
|
|
269
284
|
validatorName: Schema.NullOr(Schema.String),
|
|
270
285
|
verifyCommand: Schema.NullOr(Schema.String),
|
|
271
286
|
workspace: Schema.String
|
|
@@ -472,7 +487,7 @@ const ListEvalsRequest = Schema.Struct({
|
|
|
472
487
|
});
|
|
473
488
|
const PublicEvalCase = Schema.Struct({
|
|
474
489
|
name: Schema.String,
|
|
475
|
-
setup: Schema.optional(Schema.NullOr(
|
|
490
|
+
setup: Schema.optional(Schema.NullOr(EvalWorkspaceSetup)),
|
|
476
491
|
source: Schema.optional(EvalSource),
|
|
477
492
|
validator: Schema.optional(Schema.NullOr(EvalValidator)),
|
|
478
493
|
variables: Schema.optional(EvalVariables),
|
|
@@ -59,6 +59,7 @@ const context = {
|
|
|
59
59
|
exec,
|
|
60
60
|
exists: path => access(path).then(() => true, () => false),
|
|
61
61
|
readText: path => readFile(path, "utf8"),
|
|
62
|
+
setup: JSON.parse(process.env.ANPORD_SETUP_VALUE ?? "{}"),
|
|
62
63
|
};
|
|
63
64
|
|
|
64
65
|
try {
|
|
@@ -72,6 +73,49 @@ try {
|
|
|
72
73
|
}
|
|
73
74
|
`;
|
|
74
75
|
const validatorEntry = (module, name) => `import { ${name} as validate } from ${JSON.stringify(module)};\n${runtime}`;
|
|
76
|
+
const setupRuntime = `
|
|
77
|
+
import { access, readFile } from "node:fs/promises";
|
|
78
|
+
import { spawn } from "node:child_process";
|
|
79
|
+
|
|
80
|
+
const exec = (file, args = [], options = {}) => new Promise((resolve, reject) => {
|
|
81
|
+
const child = spawn(file, args, {
|
|
82
|
+
cwd: options.cwd ?? process.cwd(),
|
|
83
|
+
env: { ...process.env, ...options.env },
|
|
84
|
+
});
|
|
85
|
+
let stderr = "";
|
|
86
|
+
let stdout = "";
|
|
87
|
+
let timer;
|
|
88
|
+
if (options.timeoutMs) {
|
|
89
|
+
timer = setTimeout(() => {
|
|
90
|
+
child.kill("SIGKILL");
|
|
91
|
+
reject(new Error(\`\${file} did not finish within \${options.timeoutMs}ms\`));
|
|
92
|
+
}, options.timeoutMs);
|
|
93
|
+
}
|
|
94
|
+
child.stderr.on("data", chunk => { stderr += chunk; });
|
|
95
|
+
child.stdout.on("data", chunk => { stdout += chunk; });
|
|
96
|
+
child.on("error", error => { clearTimeout(timer); reject(error); });
|
|
97
|
+
child.on("close", code => {
|
|
98
|
+
clearTimeout(timer);
|
|
99
|
+
resolve({ exitCode: code ?? 1, stderr, stdout });
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
const context = {
|
|
104
|
+
exec,
|
|
105
|
+
exists: path => access(path).then(() => true, () => false),
|
|
106
|
+
readText: path => readFile(path, "utf8"),
|
|
107
|
+
workspace: process.cwd(),
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
try {
|
|
111
|
+
const value = await setup(context) ?? {};
|
|
112
|
+
console.log("ANPORD_SETUP_RESULT=" + JSON.stringify(value));
|
|
113
|
+
} catch (error) {
|
|
114
|
+
console.error(error instanceof Error ? error.stack : String(error));
|
|
115
|
+
process.exitCode = 1;
|
|
116
|
+
}
|
|
117
|
+
`;
|
|
118
|
+
const setupEntry = (module, name) => `import { ${name} as setup } from ${JSON.stringify(module)};\n${setupRuntime}`;
|
|
75
119
|
const definitionEntry = (entry) => `import definition from ${JSON.stringify(entry)}; export default definition;`;
|
|
76
120
|
//#endregion
|
|
77
121
|
//#region src/evals/compiler.ts
|
|
@@ -154,6 +198,14 @@ const sourceFor = (definition, subject, fallback) => {
|
|
|
154
198
|
onSome: (source) => ({ source })
|
|
155
199
|
});
|
|
156
200
|
};
|
|
201
|
+
const bundled = (entry, inputs, name, wrap) => effect.Effect.gen(function* () {
|
|
202
|
+
const module = yield* validatorModule(entry, inputs, name);
|
|
203
|
+
const { source } = yield* bundle(wrap(module, name), entry);
|
|
204
|
+
return {
|
|
205
|
+
name,
|
|
206
|
+
source
|
|
207
|
+
};
|
|
208
|
+
});
|
|
157
209
|
const compileEvalEffect = (path) => effect.Effect.gen(function* () {
|
|
158
210
|
const entry = (0, node_path.resolve)(path);
|
|
159
211
|
const loaded = yield* loadDefinition(entry);
|
|
@@ -164,13 +216,11 @@ const compileEvalEffect = (path) => effect.Effect.gen(function* () {
|
|
|
164
216
|
cases: yield* effect.Effect.forEach(definition.cases, (subject) => effect.Effect.gen(function* () {
|
|
165
217
|
const hasValidator = typeof subject.validate === "function";
|
|
166
218
|
if (hasValidator === (typeof subject.verify === "string")) return yield* effect.Effect.fail(/* @__PURE__ */ new Error(`${subject.name} must have exactly one of validate or verify`));
|
|
167
|
-
const validator = hasValidator ?
|
|
168
|
-
|
|
169
|
-
source: (yield* bundle(validatorEntry(yield* validatorModule(entry, loaded.inputs, subject.validate?.name || subject.name), subject.validate?.name || subject.name), entry)).source
|
|
170
|
-
} : null;
|
|
219
|
+
const validator = hasValidator ? yield* bundled(entry, loaded.inputs, subject.validate?.name || subject.name, validatorEntry) : null;
|
|
220
|
+
const setup = typeof subject.setup === "function" ? yield* bundled(entry, loaded.inputs, subject.setup.name || `${subject.name}-setup`, setupEntry) : null;
|
|
171
221
|
return {
|
|
172
222
|
name: subject.name,
|
|
173
|
-
setup
|
|
223
|
+
setup,
|
|
174
224
|
...sourceFor(definition, subject, fallback),
|
|
175
225
|
validator,
|
|
176
226
|
variables: subject.variables ?? {},
|
|
@@ -60,6 +60,7 @@ const context = {
|
|
|
60
60
|
exec,
|
|
61
61
|
exists: path => access(path).then(() => true, () => false),
|
|
62
62
|
readText: path => readFile(path, "utf8"),
|
|
63
|
+
setup: JSON.parse(process.env.ANPORD_SETUP_VALUE ?? "{}"),
|
|
63
64
|
};
|
|
64
65
|
|
|
65
66
|
try {
|
|
@@ -73,6 +74,49 @@ try {
|
|
|
73
74
|
}
|
|
74
75
|
`;
|
|
75
76
|
const validatorEntry = (module, name) => `import { ${name} as validate } from ${JSON.stringify(module)};\n${runtime}`;
|
|
77
|
+
const setupRuntime = `
|
|
78
|
+
import { access, readFile } from "node:fs/promises";
|
|
79
|
+
import { spawn } from "node:child_process";
|
|
80
|
+
|
|
81
|
+
const exec = (file, args = [], options = {}) => new Promise((resolve, reject) => {
|
|
82
|
+
const child = spawn(file, args, {
|
|
83
|
+
cwd: options.cwd ?? process.cwd(),
|
|
84
|
+
env: { ...process.env, ...options.env },
|
|
85
|
+
});
|
|
86
|
+
let stderr = "";
|
|
87
|
+
let stdout = "";
|
|
88
|
+
let timer;
|
|
89
|
+
if (options.timeoutMs) {
|
|
90
|
+
timer = setTimeout(() => {
|
|
91
|
+
child.kill("SIGKILL");
|
|
92
|
+
reject(new Error(\`\${file} did not finish within \${options.timeoutMs}ms\`));
|
|
93
|
+
}, options.timeoutMs);
|
|
94
|
+
}
|
|
95
|
+
child.stderr.on("data", chunk => { stderr += chunk; });
|
|
96
|
+
child.stdout.on("data", chunk => { stdout += chunk; });
|
|
97
|
+
child.on("error", error => { clearTimeout(timer); reject(error); });
|
|
98
|
+
child.on("close", code => {
|
|
99
|
+
clearTimeout(timer);
|
|
100
|
+
resolve({ exitCode: code ?? 1, stderr, stdout });
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
const context = {
|
|
105
|
+
exec,
|
|
106
|
+
exists: path => access(path).then(() => true, () => false),
|
|
107
|
+
readText: path => readFile(path, "utf8"),
|
|
108
|
+
workspace: process.cwd(),
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
try {
|
|
112
|
+
const value = await setup(context) ?? {};
|
|
113
|
+
console.log("ANPORD_SETUP_RESULT=" + JSON.stringify(value));
|
|
114
|
+
} catch (error) {
|
|
115
|
+
console.error(error instanceof Error ? error.stack : String(error));
|
|
116
|
+
process.exitCode = 1;
|
|
117
|
+
}
|
|
118
|
+
`;
|
|
119
|
+
const setupEntry = (module, name) => `import { ${name} as setup } from ${JSON.stringify(module)};\n${setupRuntime}`;
|
|
76
120
|
const definitionEntry = (entry) => `import definition from ${JSON.stringify(entry)}; export default definition;`;
|
|
77
121
|
//#endregion
|
|
78
122
|
//#region src/evals/compiler.ts
|
|
@@ -155,6 +199,14 @@ const sourceFor = (definition, subject, fallback) => {
|
|
|
155
199
|
onSome: (source) => ({ source })
|
|
156
200
|
});
|
|
157
201
|
};
|
|
202
|
+
const bundled = (entry, inputs, name, wrap) => Effect.gen(function* () {
|
|
203
|
+
const module = yield* validatorModule(entry, inputs, name);
|
|
204
|
+
const { source } = yield* bundle(wrap(module, name), entry);
|
|
205
|
+
return {
|
|
206
|
+
name,
|
|
207
|
+
source
|
|
208
|
+
};
|
|
209
|
+
});
|
|
158
210
|
const compileEvalEffect = (path) => Effect.gen(function* () {
|
|
159
211
|
const entry = resolve(path);
|
|
160
212
|
const loaded = yield* loadDefinition(entry);
|
|
@@ -165,13 +217,11 @@ const compileEvalEffect = (path) => Effect.gen(function* () {
|
|
|
165
217
|
cases: yield* Effect.forEach(definition.cases, (subject) => Effect.gen(function* () {
|
|
166
218
|
const hasValidator = typeof subject.validate === "function";
|
|
167
219
|
if (hasValidator === (typeof subject.verify === "string")) return yield* Effect.fail(/* @__PURE__ */ new Error(`${subject.name} must have exactly one of validate or verify`));
|
|
168
|
-
const validator = hasValidator ?
|
|
169
|
-
|
|
170
|
-
source: (yield* bundle(validatorEntry(yield* validatorModule(entry, loaded.inputs, subject.validate?.name || subject.name), subject.validate?.name || subject.name), entry)).source
|
|
171
|
-
} : null;
|
|
220
|
+
const validator = hasValidator ? yield* bundled(entry, loaded.inputs, subject.validate?.name || subject.name, validatorEntry) : null;
|
|
221
|
+
const setup = typeof subject.setup === "function" ? yield* bundled(entry, loaded.inputs, subject.setup.name || `${subject.name}-setup`, setupEntry) : null;
|
|
172
222
|
return {
|
|
173
223
|
name: subject.name,
|
|
174
|
-
setup
|
|
224
|
+
setup,
|
|
175
225
|
...sourceFor(definition, subject, fallback),
|
|
176
226
|
validator,
|
|
177
227
|
variables: subject.variables ?? {},
|
package/dist/config.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_client = require("./client-
|
|
2
|
+
const require_client = require("./client-BdGNFO_D.cjs");
|
|
3
3
|
let effect = require("effect");
|
|
4
4
|
//#region src/client/config.ts
|
|
5
5
|
const apiKeyConfig = effect.Config.redacted("ANPORD_API_KEY");
|
package/dist/config.mjs
CHANGED
package/dist/eval.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_compiler = require("./compiler-
|
|
2
|
+
const require_compiler = require("./compiler-7cyJPuPr.cjs");
|
|
3
3
|
exports.compileEval = require_compiler.compileEval;
|
|
4
4
|
exports.compileEvalEffect = require_compiler.compileEvalEffect;
|
package/dist/eval.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PublicStartEvalRequest } from "./evals-api-
|
|
1
|
+
import { t as PublicStartEvalRequest } from "./evals-api-BW7WsvHI.cjs";
|
|
2
2
|
import { Effect } from "effect";
|
|
3
3
|
//#region src/evals/compiler.d.ts
|
|
4
4
|
declare const compileEvalEffect: (path: string) => Effect.Effect<{
|
|
@@ -10,7 +10,10 @@ declare const compileEvalEffect: (path: string) => Effect.Effect<{
|
|
|
10
10
|
variables: Readonly<Record<string, string>>;
|
|
11
11
|
verify: string | null;
|
|
12
12
|
name: string;
|
|
13
|
-
setup:
|
|
13
|
+
setup: {
|
|
14
|
+
name: string;
|
|
15
|
+
source: string;
|
|
16
|
+
} | null;
|
|
14
17
|
}[];
|
|
15
18
|
prompt: string;
|
|
16
19
|
tasks: {
|
package/dist/eval.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PublicStartEvalRequest } from "./evals-api-
|
|
1
|
+
import { t as PublicStartEvalRequest } from "./evals-api-D-86RBA4.mjs";
|
|
2
2
|
import { Effect } from "effect";
|
|
3
3
|
//#region src/evals/compiler.d.ts
|
|
4
4
|
declare const compileEvalEffect: (path: string) => Effect.Effect<{
|
|
@@ -10,7 +10,10 @@ declare const compileEvalEffect: (path: string) => Effect.Effect<{
|
|
|
10
10
|
variables: Readonly<Record<string, string>>;
|
|
11
11
|
verify: string | null;
|
|
12
12
|
name: string;
|
|
13
|
-
setup:
|
|
13
|
+
setup: {
|
|
14
|
+
name: string;
|
|
15
|
+
source: string;
|
|
16
|
+
} | null;
|
|
14
17
|
}[];
|
|
15
18
|
prompt: string;
|
|
16
19
|
tasks: {
|
package/dist/eval.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as compileEvalEffect, t as compileEval } from "./compiler-
|
|
1
|
+
import { n as compileEvalEffect, t as compileEval } from "./compiler-Dk5l0aof.mjs";
|
|
2
2
|
export { compileEval, compileEvalEffect };
|
|
@@ -39,7 +39,10 @@ declare class Forbidden extends Forbidden_base {}
|
|
|
39
39
|
declare const PublicStartEvalRequest: Schema.Struct<{
|
|
40
40
|
cases: Schema.filter<Schema.Array$<Schema.refine<{
|
|
41
41
|
readonly name: string;
|
|
42
|
-
readonly setup?:
|
|
42
|
+
readonly setup?: {
|
|
43
|
+
readonly name: string;
|
|
44
|
+
readonly source: string;
|
|
45
|
+
} | null | undefined;
|
|
43
46
|
readonly source?: {
|
|
44
47
|
readonly kind: "empty";
|
|
45
48
|
} | {
|
|
@@ -62,7 +65,10 @@ declare const PublicStartEvalRequest: Schema.Struct<{
|
|
|
62
65
|
readonly verify: string | null;
|
|
63
66
|
}, Schema.Struct<{
|
|
64
67
|
name: typeof Schema.String;
|
|
65
|
-
setup: Schema.optional<Schema.NullOr<
|
|
68
|
+
setup: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
69
|
+
name: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
70
|
+
source: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
71
|
+
}>>>;
|
|
66
72
|
source: Schema.optional<Schema.Union<[Schema.Struct<{
|
|
67
73
|
kind: Schema.Literal<["empty"]>;
|
|
68
74
|
}>, Schema.Struct<{
|
|
@@ -39,7 +39,10 @@ declare class Forbidden extends Forbidden_base {}
|
|
|
39
39
|
declare const PublicStartEvalRequest: Schema.Struct<{
|
|
40
40
|
cases: Schema.filter<Schema.Array$<Schema.refine<{
|
|
41
41
|
readonly name: string;
|
|
42
|
-
readonly setup?:
|
|
42
|
+
readonly setup?: {
|
|
43
|
+
readonly name: string;
|
|
44
|
+
readonly source: string;
|
|
45
|
+
} | null | undefined;
|
|
43
46
|
readonly source?: {
|
|
44
47
|
readonly kind: "empty";
|
|
45
48
|
} | {
|
|
@@ -62,7 +65,10 @@ declare const PublicStartEvalRequest: Schema.Struct<{
|
|
|
62
65
|
readonly verify: string | null;
|
|
63
66
|
}, Schema.Struct<{
|
|
64
67
|
name: typeof Schema.String;
|
|
65
|
-
setup: Schema.optional<Schema.NullOr<
|
|
68
|
+
setup: Schema.optional<Schema.NullOr<Schema.Struct<{
|
|
69
|
+
name: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
70
|
+
source: Schema.filter<Schema.filter<typeof Schema.String>>;
|
|
71
|
+
}>>>;
|
|
66
72
|
source: Schema.optional<Schema.Union<[Schema.Struct<{
|
|
67
73
|
kind: Schema.Literal<["empty"]>;
|
|
68
74
|
}>, Schema.Struct<{
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_client = require("./client-
|
|
2
|
+
const require_client = require("./client-BdGNFO_D.cjs");
|
|
3
3
|
const require_errors = require("./errors-Boum34f5.cjs");
|
|
4
4
|
const require_source = require("./source-DvlGawEw.cjs");
|
|
5
5
|
let _effect_platform = require("@effect/platform");
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as NotFound, i as Forbidden, n as BadRequest, o as Unauthorized, r as Conflict, t as PublicStartEvalRequest } from "./evals-api-
|
|
2
|
-
import { C as StartedEval, S as RerunCellRequest, _ as EvalTrial, a as EvalCell, b as EvalVerdict, c as EvalDistribution, d as EvalProvider, f as EvalRun, g as EvalTask, h as EvalSource, i as CatalogueModel, l as EvalHarness, m as EvalRunSummary, n as files, o as EvalCellHistoryEntry, p as EvalRunStatus, r as repo, s as EvalComparison, t as empty, u as EvalJournalEntry, v as EvalTrialStatus, x as ModelCatalogue, y as EvalUsage } from "./source-
|
|
1
|
+
import { a as NotFound, i as Forbidden, n as BadRequest, o as Unauthorized, r as Conflict, t as PublicStartEvalRequest } from "./evals-api-BW7WsvHI.cjs";
|
|
2
|
+
import { C as StartedEval, S as RerunCellRequest, _ as EvalTrial, a as EvalCell, b as EvalVerdict, c as EvalDistribution, d as EvalProvider, f as EvalRun, g as EvalTask, h as EvalSource, i as CatalogueModel, l as EvalHarness, m as EvalRunSummary, n as files, o as EvalCellHistoryEntry, p as EvalRunStatus, r as repo, s as EvalComparison, t as empty, u as EvalJournalEntry, v as EvalTrialStatus, x as ModelCatalogue, y as EvalUsage } from "./source-Bq8YhKOG.cjs";
|
|
3
3
|
import { Brand, Effect, Layer, Redacted, Schema } from "effect";
|
|
4
4
|
import { HttpClient, HttpClientResponse } from "@effect/platform";
|
|
5
5
|
//#region ../schema/src/public/client.d.ts
|
|
@@ -78,7 +78,10 @@ declare const make: ({ apiKey, baseUrl }: ClientOptions) => Effect.Effect<{
|
|
|
78
78
|
readonly payload: {
|
|
79
79
|
readonly cases: readonly {
|
|
80
80
|
readonly name: string;
|
|
81
|
-
readonly setup?:
|
|
81
|
+
readonly setup?: {
|
|
82
|
+
readonly name: string;
|
|
83
|
+
readonly source: string;
|
|
84
|
+
} | null | undefined;
|
|
82
85
|
readonly source?: {
|
|
83
86
|
readonly kind: "empty";
|
|
84
87
|
} | {
|
|
@@ -138,7 +141,7 @@ declare const make: ({ apiKey, baseUrl }: ClientOptions) => Effect.Effect<{
|
|
|
138
141
|
readonly prompt: string;
|
|
139
142
|
readonly repoRef: string | null;
|
|
140
143
|
readonly repoUrl: string | null;
|
|
141
|
-
readonly
|
|
144
|
+
readonly setupName: string | null;
|
|
142
145
|
readonly validatorName: string | null;
|
|
143
146
|
readonly verifyCommand: string | null;
|
|
144
147
|
readonly workspace: string;
|
|
@@ -147,6 +150,9 @@ declare const make: ({ apiKey, baseUrl }: ClientOptions) => Effect.Effect<{
|
|
|
147
150
|
readonly passed: boolean;
|
|
148
151
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
149
152
|
readonly commands: number;
|
|
153
|
+
readonly setupValue: {
|
|
154
|
+
readonly [x: string]: unknown;
|
|
155
|
+
} | null;
|
|
150
156
|
readonly exitCode: number;
|
|
151
157
|
readonly failedCommands: number;
|
|
152
158
|
readonly filesChanged: readonly string[];
|
|
@@ -243,7 +249,7 @@ declare const make: ({ apiKey, baseUrl }: ClientOptions) => Effect.Effect<{
|
|
|
243
249
|
readonly prompt: string;
|
|
244
250
|
readonly repoRef: string | null;
|
|
245
251
|
readonly repoUrl: string | null;
|
|
246
|
-
readonly
|
|
252
|
+
readonly setupName: string | null;
|
|
247
253
|
readonly validatorName: string | null;
|
|
248
254
|
readonly verifyCommand: string | null;
|
|
249
255
|
readonly workspace: string;
|
|
@@ -252,6 +258,9 @@ declare const make: ({ apiKey, baseUrl }: ClientOptions) => Effect.Effect<{
|
|
|
252
258
|
readonly passed: boolean;
|
|
253
259
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
254
260
|
readonly commands: number;
|
|
261
|
+
readonly setupValue: {
|
|
262
|
+
readonly [x: string]: unknown;
|
|
263
|
+
} | null;
|
|
255
264
|
readonly exitCode: number;
|
|
256
265
|
readonly failedCommands: number;
|
|
257
266
|
readonly filesChanged: readonly string[];
|
|
@@ -341,6 +350,9 @@ declare const make: ({ apiKey, baseUrl }: ClientOptions) => Effect.Effect<{
|
|
|
341
350
|
readonly passed: boolean;
|
|
342
351
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
343
352
|
readonly commands: number;
|
|
353
|
+
readonly setupValue: {
|
|
354
|
+
readonly [x: string]: unknown;
|
|
355
|
+
} | null;
|
|
344
356
|
readonly exitCode: number;
|
|
345
357
|
readonly failedCommands: number;
|
|
346
358
|
readonly filesChanged: readonly string[];
|
|
@@ -413,6 +425,9 @@ declare const make: ({ apiKey, baseUrl }: ClientOptions) => Effect.Effect<{
|
|
|
413
425
|
readonly passed: boolean;
|
|
414
426
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
415
427
|
readonly commands: number;
|
|
428
|
+
readonly setupValue: {
|
|
429
|
+
readonly [x: string]: unknown;
|
|
430
|
+
} | null;
|
|
416
431
|
readonly exitCode: number;
|
|
417
432
|
readonly failedCommands: number;
|
|
418
433
|
readonly filesChanged: readonly string[];
|
|
@@ -763,7 +778,10 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
763
778
|
readonly payload: {
|
|
764
779
|
readonly cases: readonly {
|
|
765
780
|
readonly name: string;
|
|
766
|
-
readonly setup?:
|
|
781
|
+
readonly setup?: {
|
|
782
|
+
readonly name: string;
|
|
783
|
+
readonly source: string;
|
|
784
|
+
} | null | undefined;
|
|
767
785
|
readonly source?: {
|
|
768
786
|
readonly kind: "empty";
|
|
769
787
|
} | {
|
|
@@ -823,7 +841,7 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
823
841
|
readonly prompt: string;
|
|
824
842
|
readonly repoRef: string | null;
|
|
825
843
|
readonly repoUrl: string | null;
|
|
826
|
-
readonly
|
|
844
|
+
readonly setupName: string | null;
|
|
827
845
|
readonly validatorName: string | null;
|
|
828
846
|
readonly verifyCommand: string | null;
|
|
829
847
|
readonly workspace: string;
|
|
@@ -832,6 +850,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
832
850
|
readonly passed: boolean;
|
|
833
851
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
834
852
|
readonly commands: number;
|
|
853
|
+
readonly setupValue: {
|
|
854
|
+
readonly [x: string]: unknown;
|
|
855
|
+
} | null;
|
|
835
856
|
readonly exitCode: number;
|
|
836
857
|
readonly failedCommands: number;
|
|
837
858
|
readonly filesChanged: readonly string[];
|
|
@@ -928,7 +949,7 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
928
949
|
readonly prompt: string;
|
|
929
950
|
readonly repoRef: string | null;
|
|
930
951
|
readonly repoUrl: string | null;
|
|
931
|
-
readonly
|
|
952
|
+
readonly setupName: string | null;
|
|
932
953
|
readonly validatorName: string | null;
|
|
933
954
|
readonly verifyCommand: string | null;
|
|
934
955
|
readonly workspace: string;
|
|
@@ -937,6 +958,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
937
958
|
readonly passed: boolean;
|
|
938
959
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
939
960
|
readonly commands: number;
|
|
961
|
+
readonly setupValue: {
|
|
962
|
+
readonly [x: string]: unknown;
|
|
963
|
+
} | null;
|
|
940
964
|
readonly exitCode: number;
|
|
941
965
|
readonly failedCommands: number;
|
|
942
966
|
readonly filesChanged: readonly string[];
|
|
@@ -1026,6 +1050,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1026
1050
|
readonly passed: boolean;
|
|
1027
1051
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
1028
1052
|
readonly commands: number;
|
|
1053
|
+
readonly setupValue: {
|
|
1054
|
+
readonly [x: string]: unknown;
|
|
1055
|
+
} | null;
|
|
1029
1056
|
readonly exitCode: number;
|
|
1030
1057
|
readonly failedCommands: number;
|
|
1031
1058
|
readonly filesChanged: readonly string[];
|
|
@@ -1098,6 +1125,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1098
1125
|
readonly passed: boolean;
|
|
1099
1126
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
1100
1127
|
readonly commands: number;
|
|
1128
|
+
readonly setupValue: {
|
|
1129
|
+
readonly [x: string]: unknown;
|
|
1130
|
+
} | null;
|
|
1101
1131
|
readonly exitCode: number;
|
|
1102
1132
|
readonly failedCommands: number;
|
|
1103
1133
|
readonly filesChanged: readonly string[];
|
|
@@ -1446,7 +1476,10 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1446
1476
|
readonly payload: {
|
|
1447
1477
|
readonly cases: readonly {
|
|
1448
1478
|
readonly name: string;
|
|
1449
|
-
readonly setup?:
|
|
1479
|
+
readonly setup?: {
|
|
1480
|
+
readonly name: string;
|
|
1481
|
+
readonly source: string;
|
|
1482
|
+
} | null | undefined;
|
|
1450
1483
|
readonly source?: {
|
|
1451
1484
|
readonly kind: "empty";
|
|
1452
1485
|
} | {
|
|
@@ -1506,7 +1539,7 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1506
1539
|
readonly prompt: string;
|
|
1507
1540
|
readonly repoRef: string | null;
|
|
1508
1541
|
readonly repoUrl: string | null;
|
|
1509
|
-
readonly
|
|
1542
|
+
readonly setupName: string | null;
|
|
1510
1543
|
readonly validatorName: string | null;
|
|
1511
1544
|
readonly verifyCommand: string | null;
|
|
1512
1545
|
readonly workspace: string;
|
|
@@ -1515,6 +1548,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1515
1548
|
readonly passed: boolean;
|
|
1516
1549
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
1517
1550
|
readonly commands: number;
|
|
1551
|
+
readonly setupValue: {
|
|
1552
|
+
readonly [x: string]: unknown;
|
|
1553
|
+
} | null;
|
|
1518
1554
|
readonly exitCode: number;
|
|
1519
1555
|
readonly failedCommands: number;
|
|
1520
1556
|
readonly filesChanged: readonly string[];
|
|
@@ -1611,7 +1647,7 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1611
1647
|
readonly prompt: string;
|
|
1612
1648
|
readonly repoRef: string | null;
|
|
1613
1649
|
readonly repoUrl: string | null;
|
|
1614
|
-
readonly
|
|
1650
|
+
readonly setupName: string | null;
|
|
1615
1651
|
readonly validatorName: string | null;
|
|
1616
1652
|
readonly verifyCommand: string | null;
|
|
1617
1653
|
readonly workspace: string;
|
|
@@ -1620,6 +1656,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1620
1656
|
readonly passed: boolean;
|
|
1621
1657
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
1622
1658
|
readonly commands: number;
|
|
1659
|
+
readonly setupValue: {
|
|
1660
|
+
readonly [x: string]: unknown;
|
|
1661
|
+
} | null;
|
|
1623
1662
|
readonly exitCode: number;
|
|
1624
1663
|
readonly failedCommands: number;
|
|
1625
1664
|
readonly filesChanged: readonly string[];
|
|
@@ -1709,6 +1748,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1709
1748
|
readonly passed: boolean;
|
|
1710
1749
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
1711
1750
|
readonly commands: number;
|
|
1751
|
+
readonly setupValue: {
|
|
1752
|
+
readonly [x: string]: unknown;
|
|
1753
|
+
} | null;
|
|
1712
1754
|
readonly exitCode: number;
|
|
1713
1755
|
readonly failedCommands: number;
|
|
1714
1756
|
readonly filesChanged: readonly string[];
|
|
@@ -1781,6 +1823,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1781
1823
|
readonly passed: boolean;
|
|
1782
1824
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
1783
1825
|
readonly commands: number;
|
|
1826
|
+
readonly setupValue: {
|
|
1827
|
+
readonly [x: string]: unknown;
|
|
1828
|
+
} | null;
|
|
1784
1829
|
readonly exitCode: number;
|
|
1785
1830
|
readonly failedCommands: number;
|
|
1786
1831
|
readonly filesChanged: readonly string[];
|
|
@@ -2130,7 +2175,10 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
2130
2175
|
readonly payload: {
|
|
2131
2176
|
readonly cases: readonly {
|
|
2132
2177
|
readonly name: string;
|
|
2133
|
-
readonly setup?:
|
|
2178
|
+
readonly setup?: {
|
|
2179
|
+
readonly name: string;
|
|
2180
|
+
readonly source: string;
|
|
2181
|
+
} | null | undefined;
|
|
2134
2182
|
readonly source?: {
|
|
2135
2183
|
readonly kind: "empty";
|
|
2136
2184
|
} | {
|
|
@@ -2190,7 +2238,7 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
2190
2238
|
readonly prompt: string;
|
|
2191
2239
|
readonly repoRef: string | null;
|
|
2192
2240
|
readonly repoUrl: string | null;
|
|
2193
|
-
readonly
|
|
2241
|
+
readonly setupName: string | null;
|
|
2194
2242
|
readonly validatorName: string | null;
|
|
2195
2243
|
readonly verifyCommand: string | null;
|
|
2196
2244
|
readonly workspace: string;
|
|
@@ -2199,6 +2247,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
2199
2247
|
readonly passed: boolean;
|
|
2200
2248
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
2201
2249
|
readonly commands: number;
|
|
2250
|
+
readonly setupValue: {
|
|
2251
|
+
readonly [x: string]: unknown;
|
|
2252
|
+
} | null;
|
|
2202
2253
|
readonly exitCode: number;
|
|
2203
2254
|
readonly failedCommands: number;
|
|
2204
2255
|
readonly filesChanged: readonly string[];
|
|
@@ -2295,7 +2346,7 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
2295
2346
|
readonly prompt: string;
|
|
2296
2347
|
readonly repoRef: string | null;
|
|
2297
2348
|
readonly repoUrl: string | null;
|
|
2298
|
-
readonly
|
|
2349
|
+
readonly setupName: string | null;
|
|
2299
2350
|
readonly validatorName: string | null;
|
|
2300
2351
|
readonly verifyCommand: string | null;
|
|
2301
2352
|
readonly workspace: string;
|
|
@@ -2304,6 +2355,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
2304
2355
|
readonly passed: boolean;
|
|
2305
2356
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
2306
2357
|
readonly commands: number;
|
|
2358
|
+
readonly setupValue: {
|
|
2359
|
+
readonly [x: string]: unknown;
|
|
2360
|
+
} | null;
|
|
2307
2361
|
readonly exitCode: number;
|
|
2308
2362
|
readonly failedCommands: number;
|
|
2309
2363
|
readonly filesChanged: readonly string[];
|
|
@@ -2393,6 +2447,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
2393
2447
|
readonly passed: boolean;
|
|
2394
2448
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
2395
2449
|
readonly commands: number;
|
|
2450
|
+
readonly setupValue: {
|
|
2451
|
+
readonly [x: string]: unknown;
|
|
2452
|
+
} | null;
|
|
2396
2453
|
readonly exitCode: number;
|
|
2397
2454
|
readonly failedCommands: number;
|
|
2398
2455
|
readonly filesChanged: readonly string[];
|
|
@@ -2465,6 +2522,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
2465
2522
|
readonly passed: boolean;
|
|
2466
2523
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
2467
2524
|
readonly commands: number;
|
|
2525
|
+
readonly setupValue: {
|
|
2526
|
+
readonly [x: string]: unknown;
|
|
2527
|
+
} | null;
|
|
2468
2528
|
readonly exitCode: number;
|
|
2469
2529
|
readonly failedCommands: number;
|
|
2470
2530
|
readonly filesChanged: readonly string[];
|
|
@@ -2956,10 +3016,24 @@ interface ValidatorCommandResult {
|
|
|
2956
3016
|
readonly stderr: string;
|
|
2957
3017
|
readonly stdout: string;
|
|
2958
3018
|
}
|
|
3019
|
+
interface ExecOptions {
|
|
3020
|
+
readonly cwd?: string;
|
|
3021
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
3022
|
+
readonly timeoutMs?: number;
|
|
3023
|
+
}
|
|
3024
|
+
interface SetupContext {
|
|
3025
|
+
readonly exec: (file: string, args?: readonly string[], options?: ExecOptions) => Promise<ValidatorCommandResult>;
|
|
3026
|
+
readonly exists: (path: string) => Promise<boolean>;
|
|
3027
|
+
readonly readText: (path: string) => Promise<string>;
|
|
3028
|
+
readonly workspace: string;
|
|
3029
|
+
}
|
|
3030
|
+
type SetupValue = Readonly<Record<string, unknown>>;
|
|
3031
|
+
type WorkspaceSetup = (context: SetupContext) => Promise<SetupValue | undefined> | SetupValue | undefined;
|
|
2959
3032
|
interface ValidatorContext {
|
|
2960
3033
|
readonly exec: (command: string) => Promise<ValidatorCommandResult>;
|
|
2961
3034
|
readonly exists: (path: string) => Promise<boolean>;
|
|
2962
3035
|
readonly readText: (path: string) => Promise<string>;
|
|
3036
|
+
readonly setup: Readonly<Record<string, unknown>>;
|
|
2963
3037
|
}
|
|
2964
3038
|
interface ValidatorResult {
|
|
2965
3039
|
readonly message?: string;
|
|
@@ -2969,7 +3043,7 @@ type Validator = (context: ValidatorContext) => boolean | ValidatorResult | Prom
|
|
|
2969
3043
|
type DeclaredSource = EvalSource | string;
|
|
2970
3044
|
interface EvalCaseBase {
|
|
2971
3045
|
readonly name: string;
|
|
2972
|
-
readonly setup?:
|
|
3046
|
+
readonly setup?: WorkspaceSetup | null;
|
|
2973
3047
|
readonly source?: DeclaredSource;
|
|
2974
3048
|
readonly variables?: Readonly<Record<string, string>>;
|
|
2975
3049
|
}
|
|
@@ -2997,4 +3071,4 @@ type StartEvalRequest = Parameters<EvalsSurface["start"]>[0];
|
|
|
2997
3071
|
type EvalCase = StartEvalRequest["cases"][number];
|
|
2998
3072
|
type EvalTaskRequest = StartEvalRequest["tasks"][number];
|
|
2999
3073
|
//#endregion
|
|
3000
|
-
export { Anpord, AnpordApi, type AnpordClient, AnpordError, type AnpordOptions, type AnpordPromptVariables, type CacheOptions, type CatalogueModel, type ClientOptions, DEFAULT_BASE_URL, EvalAborted, EvalCase, type EvalCaseDefinition, type EvalCell, type EvalCellHistoryEntry, type EvalComparison, type EvalDefinition, type EvalDistribution, type EvalHarness, type EvalJournalEntry, type EvalProvider, type EvalRun, type EvalRunStatus, type EvalRunSummary, type EvalSource, type EvalTask, EvalTaskRequest, EvalTimeout, type EvalTrial, type EvalTrialStatus, type EvalUsage, type EvalVerdict, type EvalsSurface, type GetPromptOptions, MissingApiKey, type ModelCatalogue, type PromptFallback, type PromptMetadata, type PromptResult, type PromptsSurface, type PublicPrompt, type PublicPromptSummary, type PublicPromptWithVersions, type PublicVersion, type RerunCellRequest, StartEvalRequest, type StartedEval, type Validator, type ValidatorCommandResult, type ValidatorContext, type ValidatorResult, type WaitOptions, defineEval, empty, files, layer, make, repo };
|
|
3074
|
+
export { Anpord, AnpordApi, type AnpordClient, AnpordError, type AnpordOptions, type AnpordPromptVariables, type CacheOptions, type CatalogueModel, type ClientOptions, DEFAULT_BASE_URL, EvalAborted, EvalCase, type EvalCaseDefinition, type EvalCell, type EvalCellHistoryEntry, type EvalComparison, type EvalDefinition, type EvalDistribution, type EvalHarness, type EvalJournalEntry, type EvalProvider, type EvalRun, type EvalRunStatus, type EvalRunSummary, type EvalSource, type EvalTask, EvalTaskRequest, EvalTimeout, type EvalTrial, type EvalTrialStatus, type EvalUsage, type EvalVerdict, type EvalsSurface, type ExecOptions, type GetPromptOptions, MissingApiKey, type ModelCatalogue, type PromptFallback, type PromptMetadata, type PromptResult, type PromptsSurface, type PublicPrompt, type PublicPromptSummary, type PublicPromptWithVersions, type PublicVersion, type RerunCellRequest, type SetupContext, type SetupValue, StartEvalRequest, type StartedEval, type Validator, type ValidatorCommandResult, type ValidatorContext, type ValidatorResult, type WaitOptions, type WorkspaceSetup, defineEval, empty, files, layer, make, repo };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as NotFound, i as Forbidden, n as BadRequest, o as Unauthorized, r as Conflict, t as PublicStartEvalRequest } from "./evals-api-
|
|
2
|
-
import { C as StartedEval, S as RerunCellRequest, _ as EvalTrial, a as EvalCell, b as EvalVerdict, c as EvalDistribution, d as EvalProvider, f as EvalRun, g as EvalTask, h as EvalSource, i as CatalogueModel, l as EvalHarness, m as EvalRunSummary, n as files, o as EvalCellHistoryEntry, p as EvalRunStatus, r as repo, s as EvalComparison, t as empty, u as EvalJournalEntry, v as EvalTrialStatus, x as ModelCatalogue, y as EvalUsage } from "./source-
|
|
1
|
+
import { a as NotFound, i as Forbidden, n as BadRequest, o as Unauthorized, r as Conflict, t as PublicStartEvalRequest } from "./evals-api-D-86RBA4.mjs";
|
|
2
|
+
import { C as StartedEval, S as RerunCellRequest, _ as EvalTrial, a as EvalCell, b as EvalVerdict, c as EvalDistribution, d as EvalProvider, f as EvalRun, g as EvalTask, h as EvalSource, i as CatalogueModel, l as EvalHarness, m as EvalRunSummary, n as files, o as EvalCellHistoryEntry, p as EvalRunStatus, r as repo, s as EvalComparison, t as empty, u as EvalJournalEntry, v as EvalTrialStatus, x as ModelCatalogue, y as EvalUsage } from "./source-Bq8YhKOG.mjs";
|
|
3
3
|
import { HttpClient, HttpClientResponse } from "@effect/platform";
|
|
4
4
|
import { Brand, Effect, Layer, Redacted, Schema } from "effect";
|
|
5
5
|
//#region ../schema/src/public/client.d.ts
|
|
@@ -78,7 +78,10 @@ declare const make: ({ apiKey, baseUrl }: ClientOptions) => Effect.Effect<{
|
|
|
78
78
|
readonly payload: {
|
|
79
79
|
readonly cases: readonly {
|
|
80
80
|
readonly name: string;
|
|
81
|
-
readonly setup?:
|
|
81
|
+
readonly setup?: {
|
|
82
|
+
readonly name: string;
|
|
83
|
+
readonly source: string;
|
|
84
|
+
} | null | undefined;
|
|
82
85
|
readonly source?: {
|
|
83
86
|
readonly kind: "empty";
|
|
84
87
|
} | {
|
|
@@ -138,7 +141,7 @@ declare const make: ({ apiKey, baseUrl }: ClientOptions) => Effect.Effect<{
|
|
|
138
141
|
readonly prompt: string;
|
|
139
142
|
readonly repoRef: string | null;
|
|
140
143
|
readonly repoUrl: string | null;
|
|
141
|
-
readonly
|
|
144
|
+
readonly setupName: string | null;
|
|
142
145
|
readonly validatorName: string | null;
|
|
143
146
|
readonly verifyCommand: string | null;
|
|
144
147
|
readonly workspace: string;
|
|
@@ -147,6 +150,9 @@ declare const make: ({ apiKey, baseUrl }: ClientOptions) => Effect.Effect<{
|
|
|
147
150
|
readonly passed: boolean;
|
|
148
151
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
149
152
|
readonly commands: number;
|
|
153
|
+
readonly setupValue: {
|
|
154
|
+
readonly [x: string]: unknown;
|
|
155
|
+
} | null;
|
|
150
156
|
readonly exitCode: number;
|
|
151
157
|
readonly failedCommands: number;
|
|
152
158
|
readonly filesChanged: readonly string[];
|
|
@@ -243,7 +249,7 @@ declare const make: ({ apiKey, baseUrl }: ClientOptions) => Effect.Effect<{
|
|
|
243
249
|
readonly prompt: string;
|
|
244
250
|
readonly repoRef: string | null;
|
|
245
251
|
readonly repoUrl: string | null;
|
|
246
|
-
readonly
|
|
252
|
+
readonly setupName: string | null;
|
|
247
253
|
readonly validatorName: string | null;
|
|
248
254
|
readonly verifyCommand: string | null;
|
|
249
255
|
readonly workspace: string;
|
|
@@ -252,6 +258,9 @@ declare const make: ({ apiKey, baseUrl }: ClientOptions) => Effect.Effect<{
|
|
|
252
258
|
readonly passed: boolean;
|
|
253
259
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
254
260
|
readonly commands: number;
|
|
261
|
+
readonly setupValue: {
|
|
262
|
+
readonly [x: string]: unknown;
|
|
263
|
+
} | null;
|
|
255
264
|
readonly exitCode: number;
|
|
256
265
|
readonly failedCommands: number;
|
|
257
266
|
readonly filesChanged: readonly string[];
|
|
@@ -341,6 +350,9 @@ declare const make: ({ apiKey, baseUrl }: ClientOptions) => Effect.Effect<{
|
|
|
341
350
|
readonly passed: boolean;
|
|
342
351
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
343
352
|
readonly commands: number;
|
|
353
|
+
readonly setupValue: {
|
|
354
|
+
readonly [x: string]: unknown;
|
|
355
|
+
} | null;
|
|
344
356
|
readonly exitCode: number;
|
|
345
357
|
readonly failedCommands: number;
|
|
346
358
|
readonly filesChanged: readonly string[];
|
|
@@ -413,6 +425,9 @@ declare const make: ({ apiKey, baseUrl }: ClientOptions) => Effect.Effect<{
|
|
|
413
425
|
readonly passed: boolean;
|
|
414
426
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
415
427
|
readonly commands: number;
|
|
428
|
+
readonly setupValue: {
|
|
429
|
+
readonly [x: string]: unknown;
|
|
430
|
+
} | null;
|
|
416
431
|
readonly exitCode: number;
|
|
417
432
|
readonly failedCommands: number;
|
|
418
433
|
readonly filesChanged: readonly string[];
|
|
@@ -763,7 +778,10 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
763
778
|
readonly payload: {
|
|
764
779
|
readonly cases: readonly {
|
|
765
780
|
readonly name: string;
|
|
766
|
-
readonly setup?:
|
|
781
|
+
readonly setup?: {
|
|
782
|
+
readonly name: string;
|
|
783
|
+
readonly source: string;
|
|
784
|
+
} | null | undefined;
|
|
767
785
|
readonly source?: {
|
|
768
786
|
readonly kind: "empty";
|
|
769
787
|
} | {
|
|
@@ -823,7 +841,7 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
823
841
|
readonly prompt: string;
|
|
824
842
|
readonly repoRef: string | null;
|
|
825
843
|
readonly repoUrl: string | null;
|
|
826
|
-
readonly
|
|
844
|
+
readonly setupName: string | null;
|
|
827
845
|
readonly validatorName: string | null;
|
|
828
846
|
readonly verifyCommand: string | null;
|
|
829
847
|
readonly workspace: string;
|
|
@@ -832,6 +850,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
832
850
|
readonly passed: boolean;
|
|
833
851
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
834
852
|
readonly commands: number;
|
|
853
|
+
readonly setupValue: {
|
|
854
|
+
readonly [x: string]: unknown;
|
|
855
|
+
} | null;
|
|
835
856
|
readonly exitCode: number;
|
|
836
857
|
readonly failedCommands: number;
|
|
837
858
|
readonly filesChanged: readonly string[];
|
|
@@ -928,7 +949,7 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
928
949
|
readonly prompt: string;
|
|
929
950
|
readonly repoRef: string | null;
|
|
930
951
|
readonly repoUrl: string | null;
|
|
931
|
-
readonly
|
|
952
|
+
readonly setupName: string | null;
|
|
932
953
|
readonly validatorName: string | null;
|
|
933
954
|
readonly verifyCommand: string | null;
|
|
934
955
|
readonly workspace: string;
|
|
@@ -937,6 +958,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
937
958
|
readonly passed: boolean;
|
|
938
959
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
939
960
|
readonly commands: number;
|
|
961
|
+
readonly setupValue: {
|
|
962
|
+
readonly [x: string]: unknown;
|
|
963
|
+
} | null;
|
|
940
964
|
readonly exitCode: number;
|
|
941
965
|
readonly failedCommands: number;
|
|
942
966
|
readonly filesChanged: readonly string[];
|
|
@@ -1026,6 +1050,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1026
1050
|
readonly passed: boolean;
|
|
1027
1051
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
1028
1052
|
readonly commands: number;
|
|
1053
|
+
readonly setupValue: {
|
|
1054
|
+
readonly [x: string]: unknown;
|
|
1055
|
+
} | null;
|
|
1029
1056
|
readonly exitCode: number;
|
|
1030
1057
|
readonly failedCommands: number;
|
|
1031
1058
|
readonly filesChanged: readonly string[];
|
|
@@ -1098,6 +1125,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1098
1125
|
readonly passed: boolean;
|
|
1099
1126
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
1100
1127
|
readonly commands: number;
|
|
1128
|
+
readonly setupValue: {
|
|
1129
|
+
readonly [x: string]: unknown;
|
|
1130
|
+
} | null;
|
|
1101
1131
|
readonly exitCode: number;
|
|
1102
1132
|
readonly failedCommands: number;
|
|
1103
1133
|
readonly filesChanged: readonly string[];
|
|
@@ -1446,7 +1476,10 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1446
1476
|
readonly payload: {
|
|
1447
1477
|
readonly cases: readonly {
|
|
1448
1478
|
readonly name: string;
|
|
1449
|
-
readonly setup?:
|
|
1479
|
+
readonly setup?: {
|
|
1480
|
+
readonly name: string;
|
|
1481
|
+
readonly source: string;
|
|
1482
|
+
} | null | undefined;
|
|
1450
1483
|
readonly source?: {
|
|
1451
1484
|
readonly kind: "empty";
|
|
1452
1485
|
} | {
|
|
@@ -1506,7 +1539,7 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1506
1539
|
readonly prompt: string;
|
|
1507
1540
|
readonly repoRef: string | null;
|
|
1508
1541
|
readonly repoUrl: string | null;
|
|
1509
|
-
readonly
|
|
1542
|
+
readonly setupName: string | null;
|
|
1510
1543
|
readonly validatorName: string | null;
|
|
1511
1544
|
readonly verifyCommand: string | null;
|
|
1512
1545
|
readonly workspace: string;
|
|
@@ -1515,6 +1548,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1515
1548
|
readonly passed: boolean;
|
|
1516
1549
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
1517
1550
|
readonly commands: number;
|
|
1551
|
+
readonly setupValue: {
|
|
1552
|
+
readonly [x: string]: unknown;
|
|
1553
|
+
} | null;
|
|
1518
1554
|
readonly exitCode: number;
|
|
1519
1555
|
readonly failedCommands: number;
|
|
1520
1556
|
readonly filesChanged: readonly string[];
|
|
@@ -1611,7 +1647,7 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1611
1647
|
readonly prompt: string;
|
|
1612
1648
|
readonly repoRef: string | null;
|
|
1613
1649
|
readonly repoUrl: string | null;
|
|
1614
|
-
readonly
|
|
1650
|
+
readonly setupName: string | null;
|
|
1615
1651
|
readonly validatorName: string | null;
|
|
1616
1652
|
readonly verifyCommand: string | null;
|
|
1617
1653
|
readonly workspace: string;
|
|
@@ -1620,6 +1656,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1620
1656
|
readonly passed: boolean;
|
|
1621
1657
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
1622
1658
|
readonly commands: number;
|
|
1659
|
+
readonly setupValue: {
|
|
1660
|
+
readonly [x: string]: unknown;
|
|
1661
|
+
} | null;
|
|
1623
1662
|
readonly exitCode: number;
|
|
1624
1663
|
readonly failedCommands: number;
|
|
1625
1664
|
readonly filesChanged: readonly string[];
|
|
@@ -1709,6 +1748,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1709
1748
|
readonly passed: boolean;
|
|
1710
1749
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
1711
1750
|
readonly commands: number;
|
|
1751
|
+
readonly setupValue: {
|
|
1752
|
+
readonly [x: string]: unknown;
|
|
1753
|
+
} | null;
|
|
1712
1754
|
readonly exitCode: number;
|
|
1713
1755
|
readonly failedCommands: number;
|
|
1714
1756
|
readonly filesChanged: readonly string[];
|
|
@@ -1781,6 +1823,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
1781
1823
|
readonly passed: boolean;
|
|
1782
1824
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
1783
1825
|
readonly commands: number;
|
|
1826
|
+
readonly setupValue: {
|
|
1827
|
+
readonly [x: string]: unknown;
|
|
1828
|
+
} | null;
|
|
1784
1829
|
readonly exitCode: number;
|
|
1785
1830
|
readonly failedCommands: number;
|
|
1786
1831
|
readonly filesChanged: readonly string[];
|
|
@@ -2130,7 +2175,10 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
2130
2175
|
readonly payload: {
|
|
2131
2176
|
readonly cases: readonly {
|
|
2132
2177
|
readonly name: string;
|
|
2133
|
-
readonly setup?:
|
|
2178
|
+
readonly setup?: {
|
|
2179
|
+
readonly name: string;
|
|
2180
|
+
readonly source: string;
|
|
2181
|
+
} | null | undefined;
|
|
2134
2182
|
readonly source?: {
|
|
2135
2183
|
readonly kind: "empty";
|
|
2136
2184
|
} | {
|
|
@@ -2190,7 +2238,7 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
2190
2238
|
readonly prompt: string;
|
|
2191
2239
|
readonly repoRef: string | null;
|
|
2192
2240
|
readonly repoUrl: string | null;
|
|
2193
|
-
readonly
|
|
2241
|
+
readonly setupName: string | null;
|
|
2194
2242
|
readonly validatorName: string | null;
|
|
2195
2243
|
readonly verifyCommand: string | null;
|
|
2196
2244
|
readonly workspace: string;
|
|
@@ -2199,6 +2247,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
2199
2247
|
readonly passed: boolean;
|
|
2200
2248
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
2201
2249
|
readonly commands: number;
|
|
2250
|
+
readonly setupValue: {
|
|
2251
|
+
readonly [x: string]: unknown;
|
|
2252
|
+
} | null;
|
|
2202
2253
|
readonly exitCode: number;
|
|
2203
2254
|
readonly failedCommands: number;
|
|
2204
2255
|
readonly filesChanged: readonly string[];
|
|
@@ -2295,7 +2346,7 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
2295
2346
|
readonly prompt: string;
|
|
2296
2347
|
readonly repoRef: string | null;
|
|
2297
2348
|
readonly repoUrl: string | null;
|
|
2298
|
-
readonly
|
|
2349
|
+
readonly setupName: string | null;
|
|
2299
2350
|
readonly validatorName: string | null;
|
|
2300
2351
|
readonly verifyCommand: string | null;
|
|
2301
2352
|
readonly workspace: string;
|
|
@@ -2304,6 +2355,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
2304
2355
|
readonly passed: boolean;
|
|
2305
2356
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
2306
2357
|
readonly commands: number;
|
|
2358
|
+
readonly setupValue: {
|
|
2359
|
+
readonly [x: string]: unknown;
|
|
2360
|
+
} | null;
|
|
2307
2361
|
readonly exitCode: number;
|
|
2308
2362
|
readonly failedCommands: number;
|
|
2309
2363
|
readonly filesChanged: readonly string[];
|
|
@@ -2393,6 +2447,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
2393
2447
|
readonly passed: boolean;
|
|
2394
2448
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
2395
2449
|
readonly commands: number;
|
|
2450
|
+
readonly setupValue: {
|
|
2451
|
+
readonly [x: string]: unknown;
|
|
2452
|
+
} | null;
|
|
2396
2453
|
readonly exitCode: number;
|
|
2397
2454
|
readonly failedCommands: number;
|
|
2398
2455
|
readonly filesChanged: readonly string[];
|
|
@@ -2465,6 +2522,9 @@ declare const AnpordApi_base: import("effect/Context").TagClass<AnpordApi, "@anp
|
|
|
2465
2522
|
readonly passed: boolean;
|
|
2466
2523
|
readonly status: "passed" | "running" | "failed" | "queued" | "void" | "exceeded";
|
|
2467
2524
|
readonly commands: number;
|
|
2525
|
+
readonly setupValue: {
|
|
2526
|
+
readonly [x: string]: unknown;
|
|
2527
|
+
} | null;
|
|
2468
2528
|
readonly exitCode: number;
|
|
2469
2529
|
readonly failedCommands: number;
|
|
2470
2530
|
readonly filesChanged: readonly string[];
|
|
@@ -2956,10 +3016,24 @@ interface ValidatorCommandResult {
|
|
|
2956
3016
|
readonly stderr: string;
|
|
2957
3017
|
readonly stdout: string;
|
|
2958
3018
|
}
|
|
3019
|
+
interface ExecOptions {
|
|
3020
|
+
readonly cwd?: string;
|
|
3021
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
3022
|
+
readonly timeoutMs?: number;
|
|
3023
|
+
}
|
|
3024
|
+
interface SetupContext {
|
|
3025
|
+
readonly exec: (file: string, args?: readonly string[], options?: ExecOptions) => Promise<ValidatorCommandResult>;
|
|
3026
|
+
readonly exists: (path: string) => Promise<boolean>;
|
|
3027
|
+
readonly readText: (path: string) => Promise<string>;
|
|
3028
|
+
readonly workspace: string;
|
|
3029
|
+
}
|
|
3030
|
+
type SetupValue = Readonly<Record<string, unknown>>;
|
|
3031
|
+
type WorkspaceSetup = (context: SetupContext) => Promise<SetupValue | undefined> | SetupValue | undefined;
|
|
2959
3032
|
interface ValidatorContext {
|
|
2960
3033
|
readonly exec: (command: string) => Promise<ValidatorCommandResult>;
|
|
2961
3034
|
readonly exists: (path: string) => Promise<boolean>;
|
|
2962
3035
|
readonly readText: (path: string) => Promise<string>;
|
|
3036
|
+
readonly setup: Readonly<Record<string, unknown>>;
|
|
2963
3037
|
}
|
|
2964
3038
|
interface ValidatorResult {
|
|
2965
3039
|
readonly message?: string;
|
|
@@ -2969,7 +3043,7 @@ type Validator = (context: ValidatorContext) => boolean | ValidatorResult | Prom
|
|
|
2969
3043
|
type DeclaredSource = EvalSource | string;
|
|
2970
3044
|
interface EvalCaseBase {
|
|
2971
3045
|
readonly name: string;
|
|
2972
|
-
readonly setup?:
|
|
3046
|
+
readonly setup?: WorkspaceSetup | null;
|
|
2973
3047
|
readonly source?: DeclaredSource;
|
|
2974
3048
|
readonly variables?: Readonly<Record<string, string>>;
|
|
2975
3049
|
}
|
|
@@ -2997,4 +3071,4 @@ type StartEvalRequest = Parameters<EvalsSurface["start"]>[0];
|
|
|
2997
3071
|
type EvalCase = StartEvalRequest["cases"][number];
|
|
2998
3072
|
type EvalTaskRequest = StartEvalRequest["tasks"][number];
|
|
2999
3073
|
//#endregion
|
|
3000
|
-
export { Anpord, AnpordApi, type AnpordClient, AnpordError, type AnpordOptions, type AnpordPromptVariables, type CacheOptions, type CatalogueModel, type ClientOptions, DEFAULT_BASE_URL, EvalAborted, EvalCase, type EvalCaseDefinition, type EvalCell, type EvalCellHistoryEntry, type EvalComparison, type EvalDefinition, type EvalDistribution, type EvalHarness, type EvalJournalEntry, type EvalProvider, type EvalRun, type EvalRunStatus, type EvalRunSummary, type EvalSource, type EvalTask, EvalTaskRequest, EvalTimeout, type EvalTrial, type EvalTrialStatus, type EvalUsage, type EvalVerdict, type EvalsSurface, type GetPromptOptions, MissingApiKey, type ModelCatalogue, type PromptFallback, type PromptMetadata, type PromptResult, type PromptsSurface, type PublicPrompt, type PublicPromptSummary, type PublicPromptWithVersions, type PublicVersion, type RerunCellRequest, StartEvalRequest, type StartedEval, type Validator, type ValidatorCommandResult, type ValidatorContext, type ValidatorResult, type WaitOptions, defineEval, empty, files, layer, make, repo };
|
|
3074
|
+
export { Anpord, AnpordApi, type AnpordClient, AnpordError, type AnpordOptions, type AnpordPromptVariables, type CacheOptions, type CatalogueModel, type ClientOptions, DEFAULT_BASE_URL, EvalAborted, EvalCase, type EvalCaseDefinition, type EvalCell, type EvalCellHistoryEntry, type EvalComparison, type EvalDefinition, type EvalDistribution, type EvalHarness, type EvalJournalEntry, type EvalProvider, type EvalRun, type EvalRunStatus, type EvalRunSummary, type EvalSource, type EvalTask, EvalTaskRequest, EvalTimeout, type EvalTrial, type EvalTrialStatus, type EvalUsage, type EvalVerdict, type EvalsSurface, type ExecOptions, type GetPromptOptions, MissingApiKey, type ModelCatalogue, type PromptFallback, type PromptMetadata, type PromptResult, type PromptsSurface, type PublicPrompt, type PublicPromptSummary, type PublicPromptWithVersions, type PublicVersion, type RerunCellRequest, type SetupContext, type SetupValue, StartEvalRequest, type StartedEval, type Validator, type ValidatorCommandResult, type ValidatorContext, type ValidatorResult, type WaitOptions, type WorkspaceSetup, defineEval, empty, files, layer, make, repo };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as make, n as DEFAULT_BASE_URL, r as layer, t as AnpordApi } from "./client-
|
|
1
|
+
import { i as make, n as DEFAULT_BASE_URL, r as layer, t as AnpordApi } from "./client-POb2FNW1.mjs";
|
|
2
2
|
import { i as tokenMatcher, n as MissingApiKey, r as asAnpordError, t as AnpordError } from "./errors-C9bQUcA3.mjs";
|
|
3
3
|
import { n as files, r as repo, t as empty } from "./source-Fg1h2VNn.mjs";
|
|
4
4
|
import { FetchHttpClient } from "@effect/platform";
|
|
@@ -68,6 +68,7 @@ declare const EvalJournalEntry: Schema.Union<[Schema.Struct<{
|
|
|
68
68
|
type EvalJournalEntry = typeof EvalJournalEntry.Type;
|
|
69
69
|
declare const EvalTrial: Schema.Struct<{
|
|
70
70
|
commands: typeof Schema.Int;
|
|
71
|
+
setupValue: Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
71
72
|
exitCode: typeof Schema.Int;
|
|
72
73
|
failedCommands: typeof Schema.Int;
|
|
73
74
|
filesChanged: Schema.Array$<typeof Schema.String>;
|
|
@@ -175,7 +176,7 @@ declare const EvalCell: Schema.Struct<{
|
|
|
175
176
|
prompt: typeof Schema.String;
|
|
176
177
|
repoRef: Schema.NullOr<typeof Schema.String>;
|
|
177
178
|
repoUrl: Schema.NullOr<typeof Schema.String>;
|
|
178
|
-
|
|
179
|
+
setupName: Schema.NullOr<typeof Schema.String>;
|
|
179
180
|
validatorName: Schema.NullOr<typeof Schema.String>;
|
|
180
181
|
verifyCommand: Schema.NullOr<typeof Schema.String>;
|
|
181
182
|
workspace: typeof Schema.String;
|
|
@@ -184,6 +185,7 @@ declare const EvalCell: Schema.Struct<{
|
|
|
184
185
|
taskIndex: typeof Schema.Int;
|
|
185
186
|
trials: Schema.Array$<Schema.Struct<{
|
|
186
187
|
commands: typeof Schema.Int;
|
|
188
|
+
setupValue: Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
187
189
|
exitCode: typeof Schema.Int;
|
|
188
190
|
failedCommands: typeof Schema.Int;
|
|
189
191
|
filesChanged: Schema.Array$<typeof Schema.String>;
|
|
@@ -270,7 +272,7 @@ declare const EvalRun: Schema.Struct<{
|
|
|
270
272
|
prompt: typeof Schema.String;
|
|
271
273
|
repoRef: Schema.NullOr<typeof Schema.String>;
|
|
272
274
|
repoUrl: Schema.NullOr<typeof Schema.String>;
|
|
273
|
-
|
|
275
|
+
setupName: Schema.NullOr<typeof Schema.String>;
|
|
274
276
|
validatorName: Schema.NullOr<typeof Schema.String>;
|
|
275
277
|
verifyCommand: Schema.NullOr<typeof Schema.String>;
|
|
276
278
|
workspace: typeof Schema.String;
|
|
@@ -279,6 +281,7 @@ declare const EvalRun: Schema.Struct<{
|
|
|
279
281
|
taskIndex: typeof Schema.Int;
|
|
280
282
|
trials: Schema.Array$<Schema.Struct<{
|
|
281
283
|
commands: typeof Schema.Int;
|
|
284
|
+
setupValue: Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
282
285
|
exitCode: typeof Schema.Int;
|
|
283
286
|
failedCommands: typeof Schema.Int;
|
|
284
287
|
filesChanged: Schema.Array$<typeof Schema.String>;
|
|
@@ -387,6 +390,7 @@ declare const EvalCellHistoryEntry: Schema.Struct<{
|
|
|
387
390
|
runId: typeof Schema.String;
|
|
388
391
|
trials: Schema.Array$<Schema.Struct<{
|
|
389
392
|
commands: typeof Schema.Int;
|
|
393
|
+
setupValue: Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
390
394
|
exitCode: typeof Schema.Int;
|
|
391
395
|
failedCommands: typeof Schema.Int;
|
|
392
396
|
filesChanged: Schema.Array$<typeof Schema.String>;
|
|
@@ -68,6 +68,7 @@ declare const EvalJournalEntry: Schema.Union<[Schema.Struct<{
|
|
|
68
68
|
type EvalJournalEntry = typeof EvalJournalEntry.Type;
|
|
69
69
|
declare const EvalTrial: Schema.Struct<{
|
|
70
70
|
commands: typeof Schema.Int;
|
|
71
|
+
setupValue: Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
71
72
|
exitCode: typeof Schema.Int;
|
|
72
73
|
failedCommands: typeof Schema.Int;
|
|
73
74
|
filesChanged: Schema.Array$<typeof Schema.String>;
|
|
@@ -175,7 +176,7 @@ declare const EvalCell: Schema.Struct<{
|
|
|
175
176
|
prompt: typeof Schema.String;
|
|
176
177
|
repoRef: Schema.NullOr<typeof Schema.String>;
|
|
177
178
|
repoUrl: Schema.NullOr<typeof Schema.String>;
|
|
178
|
-
|
|
179
|
+
setupName: Schema.NullOr<typeof Schema.String>;
|
|
179
180
|
validatorName: Schema.NullOr<typeof Schema.String>;
|
|
180
181
|
verifyCommand: Schema.NullOr<typeof Schema.String>;
|
|
181
182
|
workspace: typeof Schema.String;
|
|
@@ -184,6 +185,7 @@ declare const EvalCell: Schema.Struct<{
|
|
|
184
185
|
taskIndex: typeof Schema.Int;
|
|
185
186
|
trials: Schema.Array$<Schema.Struct<{
|
|
186
187
|
commands: typeof Schema.Int;
|
|
188
|
+
setupValue: Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
187
189
|
exitCode: typeof Schema.Int;
|
|
188
190
|
failedCommands: typeof Schema.Int;
|
|
189
191
|
filesChanged: Schema.Array$<typeof Schema.String>;
|
|
@@ -270,7 +272,7 @@ declare const EvalRun: Schema.Struct<{
|
|
|
270
272
|
prompt: typeof Schema.String;
|
|
271
273
|
repoRef: Schema.NullOr<typeof Schema.String>;
|
|
272
274
|
repoUrl: Schema.NullOr<typeof Schema.String>;
|
|
273
|
-
|
|
275
|
+
setupName: Schema.NullOr<typeof Schema.String>;
|
|
274
276
|
validatorName: Schema.NullOr<typeof Schema.String>;
|
|
275
277
|
verifyCommand: Schema.NullOr<typeof Schema.String>;
|
|
276
278
|
workspace: typeof Schema.String;
|
|
@@ -279,6 +281,7 @@ declare const EvalRun: Schema.Struct<{
|
|
|
279
281
|
taskIndex: typeof Schema.Int;
|
|
280
282
|
trials: Schema.Array$<Schema.Struct<{
|
|
281
283
|
commands: typeof Schema.Int;
|
|
284
|
+
setupValue: Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
282
285
|
exitCode: typeof Schema.Int;
|
|
283
286
|
failedCommands: typeof Schema.Int;
|
|
284
287
|
filesChanged: Schema.Array$<typeof Schema.String>;
|
|
@@ -387,6 +390,7 @@ declare const EvalCellHistoryEntry: Schema.Struct<{
|
|
|
387
390
|
runId: typeof Schema.String;
|
|
388
391
|
trials: Schema.Array$<Schema.Struct<{
|
|
389
392
|
commands: typeof Schema.Int;
|
|
393
|
+
setupValue: Schema.NullOr<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
390
394
|
exitCode: typeof Schema.Int;
|
|
391
395
|
failedCommands: typeof Schema.Int;
|
|
392
396
|
filesChanged: Schema.Array$<typeof Schema.String>;
|
package/dist/source.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as files, r as repo, t as empty } from "./source-
|
|
1
|
+
import { n as files, r as repo, t as empty } from "./source-Bq8YhKOG.cjs";
|
|
2
2
|
export { empty, files, repo };
|
package/dist/source.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as files, r as repo, t as empty } from "./source-
|
|
1
|
+
import { n as files, r as repo, t as empty } from "./source-Bq8YhKOG.mjs";
|
|
2
2
|
export { empty, files, repo };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anpord",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "TypeScript SDK and CLI for coding agent evals and prompt management.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -71,12 +71,12 @@
|
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@anpord/schema": "workspace:*",
|
|
74
|
+
"@anpord/template": "workspace:*",
|
|
74
75
|
"publint": "catalog:",
|
|
75
76
|
"tsdown": "catalog:",
|
|
76
77
|
"typescript": "catalog:"
|
|
77
78
|
},
|
|
78
79
|
"dependencies": {
|
|
79
|
-
"@anpord/template": "workspace:*",
|
|
80
80
|
"@effect/cli": "^0.75.2",
|
|
81
81
|
"@effect/platform": "^0.96.1",
|
|
82
82
|
"@effect/platform-node": "^0.107.0",
|