anpord 0.1.17 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/api-context.cjs +1 -1
- package/dist/api-context.d.cts +1 -1
- package/dist/api-context.d.mts +1 -1
- package/dist/api-context.mjs +1 -1
- package/dist/{api-mocks-CuVw86Qw.cjs → api-mocks-BjnewAya.cjs} +1 -1
- package/dist/{api-mocks-wNUnpzJf.mjs → api-mocks-C3SsliJZ.mjs} +1 -1
- package/dist/{api-mocks-BXZmPUwV.d.cts → api-mocks-CAQFqUgY.d.cts} +11 -11
- package/dist/{api-mocks-BXZmPUwV.d.mts → api-mocks-CAQFqUgY.d.mts} +11 -11
- package/dist/api-runtime.cjs +1 -1
- package/dist/api-runtime.d.cts +1 -1
- package/dist/api-runtime.d.mts +1 -1
- package/dist/api-runtime.mjs +1 -1
- package/dist/api.cjs +1 -1
- package/dist/api.d.cts +1 -1
- package/dist/api.d.mts +1 -1
- package/dist/api.mjs +1 -1
- package/dist/bin.cjs +8 -8
- package/dist/bin.mjs +8 -8
- package/dist/{calls-Drj_dZpu.d.cts → calls-6Z1EoEa-.d.cts} +1 -1
- package/dist/{calls-Drj_dZpu.d.mts → calls-6Z1EoEa-.d.mts} +1 -1
- package/dist/{calls-DYqBi5FA.d.cts → calls-DJGZJPrF.d.cts} +1 -1
- package/dist/{calls-DYqBi5FA.d.mts → calls-DJGZJPrF.d.mts} +1 -1
- package/dist/cli.d.cts +1 -1
- package/dist/cli.d.mts +1 -1
- package/dist/{client-_OgJhHpJ.d.mts → client-BucAp4c0.d.mts} +1264 -1072
- package/dist/{client-DziJjMFh.cjs → client-COfGoWvI.cjs} +1 -1
- package/dist/{client-BVoIRPot.d.cts → client-OTrC6QXZ.d.cts} +1264 -1072
- package/dist/{client-DE3YNtWc.mjs → client-sWrfA0jZ.mjs} +1 -1
- package/dist/{compiler-CYwJNlT4.cjs → compiler-CPpRRAdH.cjs} +34 -69
- package/dist/{compiler-C62ss3a4.mjs → compiler-q6rnLW2F.mjs} +32 -55
- package/dist/config.cjs +1 -1
- package/dist/config.d.cts +1 -1
- package/dist/config.d.mts +1 -1
- package/dist/config.mjs +1 -1
- package/dist/eval-turns-Bv8wRQ-b.cjs +39 -0
- package/dist/{eval-judges-0FkhUOIB.d.mts → eval-turns-CTCoSuB6.d.cts} +31 -2
- package/dist/{eval-judges-0FkhUOIB.d.cts → eval-turns-CTCoSuB6.d.mts} +31 -2
- package/dist/eval-turns-hf6tbL-E.mjs +22 -0
- package/dist/{eval-validations-BvX9dkYh.mjs → eval-validations-CUG2PvR_.mjs} +1 -1
- package/dist/{eval-validations-BdlPhudg.cjs → eval-validations-D0Cz6xSg.cjs} +1 -1
- package/dist/eval.cjs +1 -4
- package/dist/eval.d.cts +2 -420
- package/dist/eval.d.mts +2 -420
- package/dist/eval.mjs +2 -2
- package/dist/{evals-CFxc4IrF.d.cts → evals-CSipRo7i.d.cts} +152 -155
- package/dist/{evals-CFxc4IrF.d.mts → evals-CSipRo7i.d.mts} +152 -155
- package/dist/{evals-api-CqhPZCr5.cjs → evals-api-DZSr9rtP.cjs} +36 -16
- package/dist/{evals-api-CsdU741J.mjs → evals-api-u98TxdqN.mjs} +36 -16
- package/dist/index.cjs +46 -5
- package/dist/index.d.cts +41 -10
- package/dist/index.d.mts +41 -10
- package/dist/index.mjs +45 -6
- package/dist/mcp.d.cts +1 -1
- package/dist/mcp.d.mts +1 -1
- package/dist/{runtime-CXcsGvwP.cjs → runtime-B5it0Siy.cjs} +2 -2
- package/dist/{runtime-DDUrsAI-.mjs → runtime-ChWJywJY.mjs} +2 -2
- package/dist/{source-Fg1h2VNn.mjs → source-BP11pzVV.mjs} +1 -1
- package/dist/{source-DvlGawEw.cjs → source-aW5nSo2h.cjs} +0 -12
- package/dist/source.cjs +1 -1
- package/dist/source.d.cts +1 -1
- package/dist/source.d.mts +1 -1
- package/dist/source.mjs +1 -1
- package/dist/{types-C2nRDJ95.d.cts → types-DCUo5on_.d.cts} +35 -17
- package/dist/{types-BjQf9IIi.d.mts → types-LW0tX4MF.d.mts} +35 -17
- package/dist/validator-runtime.cjs +69 -35
- package/dist/validator-runtime.d.cts +1 -1
- package/dist/validator-runtime.d.mts +1 -1
- package/dist/validator-runtime.mjs +69 -35
- package/dist/validators.cjs +50 -0
- package/dist/validators.d.cts +41 -2
- package/dist/validators.d.mts +41 -2
- package/dist/validators.mjs +48 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,9 +11,9 @@ npm install anpord
|
|
|
11
11
|
## Define an eval
|
|
12
12
|
|
|
13
13
|
```ts
|
|
14
|
-
import {
|
|
14
|
+
import { suite, empty } from "anpord";
|
|
15
15
|
|
|
16
|
-
export default
|
|
16
|
+
export default suite({
|
|
17
17
|
name: "greeting",
|
|
18
18
|
source: empty,
|
|
19
19
|
prompt: "{{task}}",
|
package/dist/api-context.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_api_mocks = require("./api-mocks-
|
|
2
|
+
const require_api_mocks = require("./api-mocks-BjnewAya.cjs");
|
|
3
3
|
let effect = require("effect");
|
|
4
4
|
let node_fs_promises = require("node:fs/promises");
|
|
5
5
|
//#region src/mock-api/context.ts
|
package/dist/api-context.d.cts
CHANGED
package/dist/api-context.d.mts
CHANGED
package/dist/api-context.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ApiCall, n as API_MANIFEST, o as ApiManifest, t as API_JOURNAL } from "./api-mocks-
|
|
1
|
+
import { a as ApiCall, n as API_MANIFEST, o as ApiManifest, t as API_JOURNAL } from "./api-mocks-C3SsliJZ.mjs";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { readFile } from "node:fs/promises";
|
|
4
4
|
//#region src/mock-api/context.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_eval_validations = require("./eval-validations-
|
|
1
|
+
const require_eval_validations = require("./eval-validations-D0Cz6xSg.cjs");
|
|
2
2
|
let effect = require("effect");
|
|
3
3
|
//#region ../schema/src/domain/api-mocks.ts
|
|
4
4
|
const API_PROGRAM = "workspace/.anpord/api/program.json";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as ValidationValue } from "./eval-validations-
|
|
1
|
+
import { r as ValidationValue } from "./eval-validations-CUG2PvR_.mjs";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
//#region ../schema/src/domain/api-mocks.ts
|
|
4
4
|
const API_PROGRAM = "workspace/.anpord/api/program.json";
|
|
@@ -58,6 +58,10 @@ declare const ApiCall_base: Schema.Class<ApiCall, {
|
|
|
58
58
|
}>>>;
|
|
59
59
|
}>, never, {
|
|
60
60
|
readonly api: string;
|
|
61
|
+
} & {
|
|
62
|
+
readonly startedAt: number;
|
|
63
|
+
} & {
|
|
64
|
+
readonly status: number;
|
|
61
65
|
} & {
|
|
62
66
|
readonly path: string;
|
|
63
67
|
} & {
|
|
@@ -65,32 +69,28 @@ declare const ApiCall_base: Schema.Class<ApiCall, {
|
|
|
65
69
|
} & {
|
|
66
70
|
readonly error: string | null;
|
|
67
71
|
} & {
|
|
68
|
-
readonly
|
|
69
|
-
|
|
72
|
+
readonly durationMs: number;
|
|
73
|
+
} & {
|
|
74
|
+
readonly input: {
|
|
70
75
|
readonly truncated: boolean;
|
|
71
76
|
readonly text: string;
|
|
77
|
+
readonly format: "text" | "json";
|
|
72
78
|
readonly state: "captured" | "disabled" | "unavailable";
|
|
73
79
|
};
|
|
74
80
|
} & {
|
|
75
|
-
readonly
|
|
76
|
-
readonly format: "text" | "json";
|
|
81
|
+
readonly output: {
|
|
77
82
|
readonly truncated: boolean;
|
|
78
83
|
readonly text: string;
|
|
84
|
+
readonly format: "text" | "json";
|
|
79
85
|
readonly state: "captured" | "disabled" | "unavailable";
|
|
80
86
|
};
|
|
81
|
-
} & {
|
|
82
|
-
readonly startedAt: number;
|
|
83
|
-
} & {
|
|
84
|
-
readonly status: number;
|
|
85
|
-
} & {
|
|
86
|
-
readonly durationMs: number;
|
|
87
87
|
} & {
|
|
88
88
|
readonly method: string;
|
|
89
89
|
} & {
|
|
90
90
|
readonly logs: readonly {
|
|
91
|
-
readonly format: "text" | "json";
|
|
92
91
|
readonly truncated: boolean;
|
|
93
92
|
readonly text: string;
|
|
93
|
+
readonly format: "text" | "json";
|
|
94
94
|
readonly state: "captured" | "disabled" | "unavailable";
|
|
95
95
|
}[];
|
|
96
96
|
} & {
|
|
@@ -58,6 +58,10 @@ declare const ApiCall_base: Schema.Class<ApiCall, {
|
|
|
58
58
|
}>>>;
|
|
59
59
|
}>, never, {
|
|
60
60
|
readonly api: string;
|
|
61
|
+
} & {
|
|
62
|
+
readonly startedAt: number;
|
|
63
|
+
} & {
|
|
64
|
+
readonly status: number;
|
|
61
65
|
} & {
|
|
62
66
|
readonly path: string;
|
|
63
67
|
} & {
|
|
@@ -65,32 +69,28 @@ declare const ApiCall_base: Schema.Class<ApiCall, {
|
|
|
65
69
|
} & {
|
|
66
70
|
readonly error: string | null;
|
|
67
71
|
} & {
|
|
68
|
-
readonly
|
|
69
|
-
|
|
72
|
+
readonly durationMs: number;
|
|
73
|
+
} & {
|
|
74
|
+
readonly input: {
|
|
70
75
|
readonly truncated: boolean;
|
|
71
76
|
readonly text: string;
|
|
77
|
+
readonly format: "text" | "json";
|
|
72
78
|
readonly state: "captured" | "disabled" | "unavailable";
|
|
73
79
|
};
|
|
74
80
|
} & {
|
|
75
|
-
readonly
|
|
76
|
-
readonly format: "text" | "json";
|
|
81
|
+
readonly output: {
|
|
77
82
|
readonly truncated: boolean;
|
|
78
83
|
readonly text: string;
|
|
84
|
+
readonly format: "text" | "json";
|
|
79
85
|
readonly state: "captured" | "disabled" | "unavailable";
|
|
80
86
|
};
|
|
81
|
-
} & {
|
|
82
|
-
readonly startedAt: number;
|
|
83
|
-
} & {
|
|
84
|
-
readonly status: number;
|
|
85
|
-
} & {
|
|
86
|
-
readonly durationMs: number;
|
|
87
87
|
} & {
|
|
88
88
|
readonly method: string;
|
|
89
89
|
} & {
|
|
90
90
|
readonly logs: readonly {
|
|
91
|
-
readonly format: "text" | "json";
|
|
92
91
|
readonly truncated: boolean;
|
|
93
92
|
readonly text: string;
|
|
93
|
+
readonly format: "text" | "json";
|
|
94
94
|
readonly state: "captured" | "disabled" | "unavailable";
|
|
95
95
|
}[];
|
|
96
96
|
} & {
|
package/dist/api-runtime.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_runtime = require("./runtime-
|
|
2
|
+
const require_runtime = require("./runtime-B5it0Siy.cjs");
|
|
3
3
|
exports.runApiServers = require_runtime.runApiServers;
|
|
4
4
|
exports.withApi = require_runtime.withApi;
|
package/dist/api-runtime.d.cts
CHANGED
package/dist/api-runtime.d.mts
CHANGED
package/dist/api-runtime.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as withApi, t as runApiServers } from "./runtime-
|
|
1
|
+
import { n as withApi, t as runApiServers } from "./runtime-ChWJywJY.mjs";
|
|
2
2
|
export { runApiServers, withApi };
|
package/dist/api.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_runtime = require("./runtime-
|
|
2
|
+
const require_runtime = require("./runtime-B5it0Siy.cjs");
|
|
3
3
|
exports.api = require_runtime.api;
|
|
4
4
|
exports.endpoint = require_runtime.endpoint;
|
|
5
5
|
exports.withApi = require_runtime.withApi;
|
package/dist/api.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ApiCall } from "./api-mocks-
|
|
1
|
+
import { t as ApiCall } from "./api-mocks-CAQFqUgY.cjs";
|
|
2
2
|
import { a as endpoint, i as api, n as ApiHandlerContext, r as EndpointDefinition, t as ApiDefinition } from "./define-NZvmQuIv.cjs";
|
|
3
3
|
import { withApi } from "./api-runtime.cjs";
|
|
4
4
|
export { type ApiCall, type ApiDefinition, type ApiHandlerContext, type EndpointDefinition, api, endpoint, withApi };
|
package/dist/api.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ApiCall } from "./api-mocks-
|
|
1
|
+
import { t as ApiCall } from "./api-mocks-CAQFqUgY.mjs";
|
|
2
2
|
import { a as endpoint, i as api, n as ApiHandlerContext, r as EndpointDefinition, t as ApiDefinition } from "./define-NZvmQuIv.mjs";
|
|
3
3
|
import { withApi } from "./api-runtime.mjs";
|
|
4
4
|
export { type ApiCall, type ApiDefinition, type ApiHandlerContext, type EndpointDefinition, api, endpoint, withApi };
|
package/dist/api.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as endpoint, n as withApi, r as api } from "./runtime-
|
|
1
|
+
import { i as endpoint, n as withApi, r as api } from "./runtime-ChWJywJY.mjs";
|
|
2
2
|
export { api, endpoint, withApi };
|
package/dist/bin.cjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const require_client = require("./client-
|
|
3
|
-
const require_evals_api = require("./evals-api-
|
|
2
|
+
const require_client = require("./client-COfGoWvI.cjs");
|
|
3
|
+
const require_evals_api = require("./evals-api-DZSr9rtP.cjs");
|
|
4
4
|
const require_errors = require("./errors-BX1wry8K.cjs");
|
|
5
5
|
const require_config = require("./config.cjs");
|
|
6
|
-
const require_compiler = require("./compiler-
|
|
6
|
+
const require_compiler = require("./compiler-CPpRRAdH.cjs");
|
|
7
7
|
let effect = require("effect");
|
|
8
8
|
let _effect_platform = require("@effect/platform");
|
|
9
9
|
let _effect_cli = require("@effect/cli");
|
|
10
10
|
let _effect_platform_node = require("@effect/platform-node");
|
|
11
11
|
let yaml = require("yaml");
|
|
12
12
|
//#region package.json
|
|
13
|
-
var version$1 = "0.1.
|
|
13
|
+
var version$1 = "0.1.19";
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region ../template/src/extract.ts
|
|
16
16
|
/** Reads escapes too, so text the renderer leaves literal is never reported as
|
|
@@ -262,7 +262,7 @@ const caseBlock$1 = (subject) => [
|
|
|
262
262
|
" },",
|
|
263
263
|
" },"
|
|
264
264
|
].join("\n");
|
|
265
|
-
const IMPORTS = "import {
|
|
265
|
+
const IMPORTS = "import { suite, files } from \"anpord\";";
|
|
266
266
|
const helpersBlock = [
|
|
267
267
|
"const has = (answer: string, needle: string) =>",
|
|
268
268
|
" answer.toLowerCase().includes(needle.toLowerCase());",
|
|
@@ -285,7 +285,7 @@ const renderEvalSuite = (file) => {
|
|
|
285
285
|
"",
|
|
286
286
|
...structured ? [helpersBlock, ""] : [],
|
|
287
287
|
...prose ? [placeholderBlock, ""] : [],
|
|
288
|
-
"export default
|
|
288
|
+
"export default suite({",
|
|
289
289
|
` name: ${quoted(slug$1(file.skill_name, "imported-suite"))},`,
|
|
290
290
|
" prompt: \"{{task}}\",",
|
|
291
291
|
" trials: 3,",
|
|
@@ -414,11 +414,11 @@ const caseBlock = (file) => [
|
|
|
414
414
|
].join("\n");
|
|
415
415
|
const suiteName = (files) => files.length === 1 ? slug(files[0]?.subject.name ?? "", "imported-suite") : "imported-suite";
|
|
416
416
|
const renderYamlSuite = (files) => `${[
|
|
417
|
-
"import {
|
|
417
|
+
"import { suite, files } from \"anpord\";",
|
|
418
418
|
"",
|
|
419
419
|
placeholderBlock,
|
|
420
420
|
"",
|
|
421
|
-
"export default
|
|
421
|
+
"export default suite({",
|
|
422
422
|
` name: ${quoted(suiteName(files))},`,
|
|
423
423
|
" prompt: \"{{task}}\",",
|
|
424
424
|
" trials: 3,",
|
package/dist/bin.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { a as ChannelName, o as PromptId, s as VersionNumber, t as AnpordApi } from "./client-
|
|
3
|
-
import { f as EvalTrigger, i as EvalRun } from "./evals-api-
|
|
2
|
+
import { a as ChannelName, o as PromptId, s as VersionNumber, t as AnpordApi } from "./client-sWrfA0jZ.mjs";
|
|
3
|
+
import { f as EvalTrigger, i as EvalRun } from "./evals-api-u98TxdqN.mjs";
|
|
4
4
|
import { i as tokenMatcher, r as asAnpordError } from "./errors-B0YknR5V.mjs";
|
|
5
5
|
import { ClientLayer, webUrlConfig } from "./config.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { r as compileEvalEffect } from "./compiler-q6rnLW2F.mjs";
|
|
7
7
|
import { Cause, Clock, Config, Console, Data, Duration, Effect, Layer, Option, ParseResult, Redacted, Ref, Schema } from "effect";
|
|
8
8
|
import { FetchHttpClient, FileSystem, HttpClient, HttpClientError, HttpClientRequest } from "@effect/platform";
|
|
9
9
|
import { Args, Command, Options } from "@effect/cli";
|
|
10
10
|
import { NodeContext, NodeRuntime } from "@effect/platform-node";
|
|
11
11
|
import { parseDocument } from "yaml";
|
|
12
12
|
//#region package.json
|
|
13
|
-
var version$1 = "0.1.
|
|
13
|
+
var version$1 = "0.1.19";
|
|
14
14
|
//#endregion
|
|
15
15
|
//#region ../template/src/extract.ts
|
|
16
16
|
/** Reads escapes too, so text the renderer leaves literal is never reported as
|
|
@@ -262,7 +262,7 @@ const caseBlock$1 = (subject) => [
|
|
|
262
262
|
" },",
|
|
263
263
|
" },"
|
|
264
264
|
].join("\n");
|
|
265
|
-
const IMPORTS = "import {
|
|
265
|
+
const IMPORTS = "import { suite, files } from \"anpord\";";
|
|
266
266
|
const helpersBlock = [
|
|
267
267
|
"const has = (answer: string, needle: string) =>",
|
|
268
268
|
" answer.toLowerCase().includes(needle.toLowerCase());",
|
|
@@ -285,7 +285,7 @@ const renderEvalSuite = (file) => {
|
|
|
285
285
|
"",
|
|
286
286
|
...structured ? [helpersBlock, ""] : [],
|
|
287
287
|
...prose ? [placeholderBlock, ""] : [],
|
|
288
|
-
"export default
|
|
288
|
+
"export default suite({",
|
|
289
289
|
` name: ${quoted(slug$1(file.skill_name, "imported-suite"))},`,
|
|
290
290
|
" prompt: \"{{task}}\",",
|
|
291
291
|
" trials: 3,",
|
|
@@ -414,11 +414,11 @@ const caseBlock = (file) => [
|
|
|
414
414
|
].join("\n");
|
|
415
415
|
const suiteName = (files) => files.length === 1 ? slug(files[0]?.subject.name ?? "", "imported-suite") : "imported-suite";
|
|
416
416
|
const renderYamlSuite = (files) => `${[
|
|
417
|
-
"import {
|
|
417
|
+
"import { suite, files } from \"anpord\";",
|
|
418
418
|
"",
|
|
419
419
|
placeholderBlock,
|
|
420
420
|
"",
|
|
421
|
-
"export default
|
|
421
|
+
"export default suite({",
|
|
422
422
|
` name: ${quoted(suiteName(files))},`,
|
|
423
423
|
" prompt: \"{{task}}\",",
|
|
424
424
|
" trials: 3,",
|
package/dist/cli.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as CliCall } from "./calls-
|
|
1
|
+
import { t as CliCall } from "./calls-6Z1EoEa-.cjs";
|
|
2
2
|
import { a as cli, i as CliOption, n as CliDefinition, o as command, r as CliHandlerContext, t as CliCommandDefinition } from "./define-BEiYXrC5.cjs";
|
|
3
3
|
export { type CliCall, type CliCommandDefinition, type CliDefinition, type CliHandlerContext, type CliOption, cli, command };
|
package/dist/cli.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as CliCall } from "./calls-
|
|
1
|
+
import { t as CliCall } from "./calls-6Z1EoEa-.mjs";
|
|
2
2
|
import { a as cli, i as CliOption, n as CliDefinition, o as command, r as CliHandlerContext, t as CliCommandDefinition } from "./define-BEiYXrC5.mjs";
|
|
3
3
|
export { type CliCall, type CliCommandDefinition, type CliDefinition, type CliHandlerContext, type CliOption, cli, command };
|