anpord 0.1.17 → 0.1.18

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.
Files changed (52) hide show
  1. package/README.md +2 -2
  2. package/dist/api-context.d.cts +1 -1
  3. package/dist/api-context.d.mts +1 -1
  4. package/dist/{api-mocks-BXZmPUwV.d.cts → api-mocks-CAQFqUgY.d.cts} +11 -11
  5. package/dist/{api-mocks-BXZmPUwV.d.mts → api-mocks-CAQFqUgY.d.mts} +11 -11
  6. package/dist/api-runtime.d.cts +1 -1
  7. package/dist/api-runtime.d.mts +1 -1
  8. package/dist/api.d.cts +1 -1
  9. package/dist/api.d.mts +1 -1
  10. package/dist/bin.cjs +6 -6
  11. package/dist/bin.mjs +6 -6
  12. package/dist/{calls-Drj_dZpu.d.cts → calls-6Z1EoEa-.d.cts} +1 -1
  13. package/dist/{calls-Drj_dZpu.d.mts → calls-6Z1EoEa-.d.mts} +1 -1
  14. package/dist/{calls-DYqBi5FA.d.cts → calls-DJGZJPrF.d.cts} +1 -1
  15. package/dist/{calls-DYqBi5FA.d.mts → calls-DJGZJPrF.d.mts} +1 -1
  16. package/dist/cli.d.cts +1 -1
  17. package/dist/cli.d.mts +1 -1
  18. package/dist/{client-_OgJhHpJ.d.mts → client-DDYWBAma.d.mts} +1022 -1022
  19. package/dist/{client-BVoIRPot.d.cts → client-dRUs93gl.d.cts} +1022 -1022
  20. package/dist/{compiler-C62ss3a4.mjs → compiler-WpuZwsp9.mjs} +29 -53
  21. package/dist/{compiler-CYwJNlT4.cjs → compiler-XtLHSR2J.cjs} +31 -67
  22. package/dist/config.d.cts +1 -1
  23. package/dist/config.d.mts +1 -1
  24. package/dist/{eval-judges-0FkhUOIB.d.cts → eval-judges--be3T7fJ.d.cts} +1 -1
  25. package/dist/{eval-judges-0FkhUOIB.d.mts → eval-judges--be3T7fJ.d.mts} +1 -1
  26. package/dist/eval.cjs +1 -4
  27. package/dist/eval.d.cts +2 -420
  28. package/dist/eval.d.mts +2 -420
  29. package/dist/eval.mjs +2 -2
  30. package/dist/{evals-CFxc4IrF.d.cts → evals-B2UuSop0.d.cts} +116 -116
  31. package/dist/{evals-CFxc4IrF.d.mts → evals-B2UuSop0.d.mts} +116 -116
  32. package/dist/index.cjs +45 -4
  33. package/dist/index.d.cts +7 -8
  34. package/dist/index.d.mts +7 -8
  35. package/dist/index.mjs +44 -5
  36. package/dist/mcp.d.cts +1 -1
  37. package/dist/mcp.d.mts +1 -1
  38. package/dist/{source-Fg1h2VNn.mjs → source-BP11pzVV.mjs} +1 -1
  39. package/dist/{source-DvlGawEw.cjs → source-aW5nSo2h.cjs} +0 -12
  40. package/dist/source.cjs +1 -1
  41. package/dist/source.d.cts +1 -1
  42. package/dist/source.d.mts +1 -1
  43. package/dist/source.mjs +1 -1
  44. package/dist/{types-C2nRDJ95.d.cts → types-2vK8mBga.d.cts} +15 -15
  45. package/dist/{types-BjQf9IIi.d.mts → types-C6yDL7ZQ.d.mts} +15 -15
  46. package/dist/validator-runtime.cjs +60 -34
  47. package/dist/validator-runtime.d.cts +1 -1
  48. package/dist/validator-runtime.d.mts +1 -1
  49. package/dist/validator-runtime.mjs +60 -34
  50. package/dist/validators.d.cts +1 -1
  51. package/dist/validators.d.mts +1 -1
  52. 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 { defineEval, empty } from "anpord";
14
+ import { suite, empty } from "anpord";
15
15
 
16
- export default defineEval({
16
+ export default suite({
17
17
  name: "greeting",
18
18
  source: empty,
19
19
  prompt: "{{task}}",
@@ -1,4 +1,4 @@
1
- import { t as ApiCall } from "./api-mocks-BXZmPUwV.cjs";
1
+ import { t as ApiCall } from "./api-mocks-CAQFqUgY.cjs";
2
2
  //#region src/mock-api/context.d.ts
3
3
  declare const apiContext: {
4
4
  url: (name: string) => Promise<string>;
@@ -1,4 +1,4 @@
1
- import { t as ApiCall } from "./api-mocks-BXZmPUwV.mjs";
1
+ import { t as ApiCall } from "./api-mocks-CAQFqUgY.mjs";
2
2
  //#region src/mock-api/context.d.ts
3
3
  declare const apiContext: {
4
4
  url: (name: string) => Promise<string>;
@@ -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 output: {
69
- readonly format: "text" | "json";
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 input: {
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 output: {
69
- readonly format: "text" | "json";
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 input: {
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
  } & {
@@ -1,4 +1,4 @@
1
- import { t as ApiCall } from "./api-mocks-BXZmPUwV.cjs";
1
+ import { t as ApiCall } from "./api-mocks-CAQFqUgY.cjs";
2
2
  import { t as ApiDefinition } from "./define-NZvmQuIv.cjs";
3
3
  //#region src/mock-api/runtime.d.ts
4
4
  declare const withApi: <A>({ api, run }: {
@@ -1,4 +1,4 @@
1
- import { t as ApiCall } from "./api-mocks-BXZmPUwV.mjs";
1
+ import { t as ApiCall } from "./api-mocks-CAQFqUgY.mjs";
2
2
  import { t as ApiDefinition } from "./define-NZvmQuIv.mjs";
3
3
  //#region src/mock-api/runtime.d.ts
4
4
  declare const withApi: <A>({ api, run }: {
package/dist/api.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as ApiCall } from "./api-mocks-BXZmPUwV.cjs";
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-BXZmPUwV.mjs";
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/bin.cjs CHANGED
@@ -3,14 +3,14 @@ const require_client = require("./client-DziJjMFh.cjs");
3
3
  const require_evals_api = require("./evals-api-CqhPZCr5.cjs");
4
4
  const require_errors = require("./errors-BX1wry8K.cjs");
5
5
  const require_config = require("./config.cjs");
6
- const require_compiler = require("./compiler-CYwJNlT4.cjs");
6
+ const require_compiler = require("./compiler-XtLHSR2J.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.17";
13
+ var version$1 = "0.1.18";
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 { defineEval, files } from \"anpord\";";
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 defineEval({",
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 { defineEval, files } from \"anpord\";",
417
+ "import { suite, files } from \"anpord\";",
418
418
  "",
419
419
  placeholderBlock,
420
420
  "",
421
- "export default defineEval({",
421
+ "export default suite({",
422
422
  ` name: ${quoted(suiteName(files))},`,
423
423
  " prompt: \"{{task}}\",",
424
424
  " trials: 3,",
package/dist/bin.mjs CHANGED
@@ -3,14 +3,14 @@ import { a as ChannelName, o as PromptId, s as VersionNumber, t as AnpordApi } f
3
3
  import { f as EvalTrigger, i as EvalRun } from "./evals-api-CsdU741J.mjs";
4
4
  import { i as tokenMatcher, r as asAnpordError } from "./errors-B0YknR5V.mjs";
5
5
  import { ClientLayer, webUrlConfig } from "./config.mjs";
6
- import { i as compileEvalEffect } from "./compiler-C62ss3a4.mjs";
6
+ import { r as compileEvalEffect } from "./compiler-WpuZwsp9.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.17";
13
+ var version$1 = "0.1.18";
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 { defineEval, files } from \"anpord\";";
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 defineEval({",
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 { defineEval, files } from \"anpord\";",
417
+ "import { suite, files } from \"anpord\";",
418
418
  "",
419
419
  placeholderBlock,
420
420
  "",
421
- "export default defineEval({",
421
+ "export default suite({",
422
422
  ` name: ${quoted(suiteName(files))},`,
423
423
  " prompt: \"{{task}}\",",
424
424
  " trials: 3,",
@@ -9,4 +9,4 @@ declare const CliCallSchema: Schema.Struct<{
9
9
  }>;
10
10
  type CliCall = typeof CliCallSchema.Type;
11
11
  //#endregion
12
- export { CliCall as t };
12
+ export { CliCallSchema as n, CliCall as t };
@@ -9,4 +9,4 @@ declare const CliCallSchema: Schema.Struct<{
9
9
  }>;
10
10
  type CliCall = typeof CliCallSchema.Type;
11
11
  //#endregion
12
- export { CliCall as t };
12
+ export { CliCallSchema as n, CliCall as t };
@@ -10,4 +10,4 @@ declare const McpCallSchema: Schema.Struct<{
10
10
  }>;
11
11
  type McpCall = typeof McpCallSchema.Type;
12
12
  //#endregion
13
- export { McpCall as t };
13
+ export { McpCallSchema as n, McpCall as t };
@@ -10,4 +10,4 @@ declare const McpCallSchema: Schema.Struct<{
10
10
  }>;
11
11
  type McpCall = typeof McpCallSchema.Type;
12
12
  //#endregion
13
- export { McpCall as t };
13
+ export { McpCallSchema as n, McpCall as t };
package/dist/cli.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { t as CliCall } from "./calls-Drj_dZpu.cjs";
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-Drj_dZpu.mjs";
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 };