anpord 0.1.19 → 0.1.21

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 (57) hide show
  1. package/dist/api-context.cjs +1 -1
  2. package/dist/api-context.d.cts +1 -1
  3. package/dist/api-context.d.mts +1 -1
  4. package/dist/api-context.mjs +1 -1
  5. package/dist/{api-mocks-C3SsliJZ.mjs → api-mocks-BYWvJp9v.mjs} +3 -3
  6. package/dist/{api-mocks-CAQFqUgY.d.cts → api-mocks-BenVx0e8.d.cts} +11 -11
  7. package/dist/{api-mocks-CAQFqUgY.d.mts → api-mocks-BenVx0e8.d.mts} +11 -11
  8. package/dist/{api-mocks-BjnewAya.cjs → api-mocks-CgiC7T9U.cjs} +8 -2
  9. package/dist/api-runtime.cjs +1 -1
  10. package/dist/api-runtime.d.cts +1 -1
  11. package/dist/api-runtime.d.mts +1 -1
  12. package/dist/api-runtime.mjs +1 -1
  13. package/dist/api.cjs +1 -1
  14. package/dist/api.d.cts +1 -1
  15. package/dist/api.d.mts +1 -1
  16. package/dist/api.mjs +1 -1
  17. package/dist/bin.cjs +4301 -228
  18. package/dist/bin.mjs +4305 -232
  19. package/dist/{client-COfGoWvI.cjs → client-BZDftC1x.cjs} +24 -2
  20. package/dist/{client-BucAp4c0.d.mts → client-C7iEhiDm.d.mts} +5882 -2454
  21. package/dist/{client-OTrC6QXZ.d.cts → client-CsGxLUZq.d.cts} +5882 -2454
  22. package/dist/{client-sWrfA0jZ.mjs → client-D0l3kwWV.mjs} +24 -2
  23. package/dist/{compiler-CPpRRAdH.cjs → compiler-Cy85vNbp.cjs} +2 -2
  24. package/dist/{compiler-q6rnLW2F.mjs → compiler-DSQRHvXS.mjs} +2 -2
  25. package/dist/config.cjs +1 -1
  26. package/dist/config.d.cts +1 -1
  27. package/dist/config.d.mts +1 -1
  28. package/dist/config.mjs +1 -1
  29. package/dist/{eval-turns-hf6tbL-E.mjs → eval-turns-BC-GMHD-.mjs} +3 -2
  30. package/dist/{eval-turns-Bv8wRQ-b.cjs → eval-turns-DcJ8_1qr.cjs} +8 -1
  31. package/dist/{eval-validations-D0Cz6xSg.cjs → eval-validations-CZm7vVtQ.cjs} +12 -0
  32. package/dist/{eval-validations-CUG2PvR_.mjs → eval-validations-DNO-qwkU.mjs} +1 -1
  33. package/dist/eval.cjs +1 -1
  34. package/dist/eval.d.cts +1 -1
  35. package/dist/eval.d.mts +1 -1
  36. package/dist/eval.mjs +1 -1
  37. package/dist/{evals-CSipRo7i.d.cts → evals-Dw2Ek-mx.d.cts} +131 -128
  38. package/dist/{evals-CSipRo7i.d.mts → evals-Dw2Ek-mx.d.mts} +131 -128
  39. package/dist/{evals-api-u98TxdqN.mjs → evals-api-CK3F1KoI.mjs} +164 -65
  40. package/dist/{evals-api-DZSr9rtP.cjs → evals-api-CNoLlXL5.cjs} +199 -64
  41. package/dist/index.cjs +2 -2
  42. package/dist/index.d.cts +3 -3
  43. package/dist/index.d.mts +3 -3
  44. package/dist/index.mjs +2 -2
  45. package/dist/{runtime-B5it0Siy.cjs → runtime-Bfs2j0jW.cjs} +2 -2
  46. package/dist/{runtime-ChWJywJY.mjs → runtime-CYr8RbsW.mjs} +2 -2
  47. package/dist/source.d.cts +1 -1
  48. package/dist/source.d.mts +1 -1
  49. package/dist/{types-LW0tX4MF.d.mts → types-D-h67MVJ.d.mts} +14 -13
  50. package/dist/{types-DCUo5on_.d.cts → types-Dvd_z5ge.d.cts} +14 -13
  51. package/dist/validator-runtime.cjs +2 -2
  52. package/dist/validator-runtime.d.cts +1 -1
  53. package/dist/validator-runtime.d.mts +1 -1
  54. package/dist/validator-runtime.mjs +2 -2
  55. package/dist/validators.cjs +1 -1
  56. package/dist/validators.mjs +1 -1
  57. package/package.json +3 -1
@@ -1,41 +1,8 @@
1
1
  const require_eval_judges = require("./eval-judges-1zF4PVqV.cjs");
2
- const require_eval_validations = require("./eval-validations-D0Cz6xSg.cjs");
3
- const require_eval_turns = require("./eval-turns-Bv8wRQ-b.cjs");
2
+ const require_eval_validations = require("./eval-validations-CZm7vVtQ.cjs");
3
+ const require_eval_turns = require("./eval-turns-DcJ8_1qr.cjs");
4
4
  let effect = require("effect");
5
5
  let _effect_platform = require("@effect/platform");
6
- //#region ../schema/src/domain/errors.ts
7
- var NotFound = class extends effect.Schema.TaggedError()("NotFound", { message: effect.Schema.String }, _effect_platform.HttpApiSchema.annotations({ status: 404 })) {};
8
- var Conflict = class extends effect.Schema.TaggedError()("Conflict", { message: effect.Schema.String }, _effect_platform.HttpApiSchema.annotations({ status: 409 })) {};
9
- var BadRequest = class extends effect.Schema.TaggedError()("BadRequest", { message: effect.Schema.String }, _effect_platform.HttpApiSchema.annotations({ status: 400 })) {};
10
- var Unauthorized = class extends effect.Schema.TaggedError()("Unauthorized", { message: effect.Schema.String }, _effect_platform.HttpApiSchema.annotations({ status: 401 })) {};
11
- var Forbidden = class extends effect.Schema.TaggedError()("Forbidden", { message: effect.Schema.String }, _effect_platform.HttpApiSchema.annotations({ status: 403 })) {};
12
- effect.Schema.TaggedError()("InternalError", { message: effect.Schema.String }, _effect_platform.HttpApiSchema.annotations({ status: 500 }));
13
- //#endregion
14
- //#region ../schema/src/domain/eval-limits.ts
15
- const PROMPT_LIMIT = 16384;
16
- const VERIFY_LIMIT = 8192;
17
- const NAME_LIMIT = 200;
18
- const VARIABLE_VALUE_LIMIT = 2048;
19
- const EvalPrompt = effect.Schema.String.pipe(effect.Schema.maxLength(PROMPT_LIMIT), effect.Schema.annotations({
20
- description: "What the agent is asked to do.",
21
- identifier: "EvalPrompt",
22
- message: () => `A prompt must be at most ${PROMPT_LIMIT} characters, because it is quoted into one sandbox command line.`
23
- }));
24
- const EvalVerify = effect.Schema.String.pipe(effect.Schema.maxLength(VERIFY_LIMIT), effect.Schema.annotations({
25
- description: "The shell command that decides whether a trial passed.",
26
- identifier: "EvalVerify",
27
- message: () => `A verifier must be at most ${VERIFY_LIMIT} characters, because it is quoted into one sandbox command line.`
28
- }));
29
- const EvalCaseName = effect.Schema.String.pipe(effect.Schema.maxLength(NAME_LIMIT), effect.Schema.annotations({
30
- description: "What a case is called.",
31
- identifier: "EvalCaseName",
32
- message: () => `A case name must be at most ${NAME_LIMIT} characters.`
33
- }));
34
- const EvalVariableValue = effect.Schema.String.pipe(effect.Schema.maxLength(VARIABLE_VALUE_LIMIT), effect.Schema.annotations({
35
- identifier: "EvalVariableValue",
36
- message: () => `A variable value must be at most ${VARIABLE_VALUE_LIMIT} characters, because it is substituted into the prompt before it is quoted.`
37
- }));
38
- //#endregion
39
6
  //#region ../schema/src/domain/credentials.ts
40
7
  const CredentialScope = effect.Schema.Literal("organization", "personal");
41
8
  const CredentialStatus = effect.Schema.Literal("active", "invalid");
@@ -52,9 +19,9 @@ const CredentialAuthMethod = effect.Schema.Struct({
52
19
  kind: effect.Schema.Literal("secret", "device", "env"),
53
20
  label: effect.Schema.String
54
21
  });
55
- effect.Schema.Struct({
22
+ const CredentialIntegration = effect.Schema.Struct({
56
23
  authMethods: effect.Schema.Array(CredentialAuthMethod),
57
- category: effect.Schema.Literal("harness", "judge", "sandbox"),
24
+ category: effect.Schema.Literal("harness", "model", "sandbox"),
58
25
  id: effect.Schema.String,
59
26
  label: effect.Schema.String
60
27
  });
@@ -65,7 +32,7 @@ effect.Schema.Struct({
65
32
  description: "Who else in the organization has an integration connected.",
66
33
  identifier: "IntegrationAwareness"
67
34
  });
68
- effect.Schema.Struct({
35
+ const CredentialConnection = effect.Schema.Struct({
69
36
  authMethodId: effect.Schema.String,
70
37
  createdAt: effect.Schema.DateTimeUtc,
71
38
  id: effect.Schema.String,
@@ -120,6 +87,57 @@ effect.Schema.Struct({
120
87
  status: effect.Schema.Literal("pending", "complete", "failed", "expired")
121
88
  });
122
89
  //#endregion
90
+ //#region ../schema/src/domain/errors.ts
91
+ var NotFound = class extends effect.Schema.TaggedError()("NotFound", { message: effect.Schema.String }, _effect_platform.HttpApiSchema.annotations({ status: 404 })) {};
92
+ var Conflict = class extends effect.Schema.TaggedError()("Conflict", { message: effect.Schema.String }, _effect_platform.HttpApiSchema.annotations({ status: 409 })) {};
93
+ var BadRequest = class extends effect.Schema.TaggedError()("BadRequest", { message: effect.Schema.String }, _effect_platform.HttpApiSchema.annotations({ status: 400 })) {};
94
+ var Unauthorized = class extends effect.Schema.TaggedError()("Unauthorized", { message: effect.Schema.String }, _effect_platform.HttpApiSchema.annotations({ status: 401 })) {};
95
+ var Forbidden = class extends effect.Schema.TaggedError()("Forbidden", { message: effect.Schema.String }, _effect_platform.HttpApiSchema.annotations({ status: 403 })) {};
96
+ effect.Schema.TaggedError()("InternalError", { message: effect.Schema.String }, _effect_platform.HttpApiSchema.annotations({ status: 500 }));
97
+ //#endregion
98
+ //#region ../schema/src/internal/authentication.ts
99
+ var CurrentActor = class extends effect.Context.Tag("@anpord/schema/CurrentActor")() {};
100
+ _effect_platform.HttpApiMiddleware.Tag()("@anpord/schema/Authentication", {
101
+ failure: Unauthorized,
102
+ provides: CurrentActor,
103
+ security: { session: _effect_platform.HttpApiSecurity.apiKey({
104
+ in: "cookie",
105
+ key: "anpord.session_token"
106
+ }) }
107
+ });
108
+ //#endregion
109
+ //#region ../schema/src/public/authentication.ts
110
+ var ApiKeyAuthentication = class extends _effect_platform.HttpApiMiddleware.Tag()("@anpord/schema/ApiKeyAuthentication", {
111
+ failure: Unauthorized,
112
+ provides: CurrentActor,
113
+ security: { bearer: _effect_platform.HttpApiSecurity.bearer }
114
+ }) {};
115
+ //#endregion
116
+ //#region ../schema/src/domain/eval-limits.ts
117
+ const PROMPT_LIMIT = 16384;
118
+ const VERIFY_LIMIT = 8192;
119
+ const NAME_LIMIT = 200;
120
+ const VARIABLE_VALUE_LIMIT = 2048;
121
+ const EvalPrompt = effect.Schema.String.pipe(effect.Schema.maxLength(PROMPT_LIMIT), effect.Schema.annotations({
122
+ description: "What the agent is asked to do.",
123
+ identifier: "EvalPrompt",
124
+ message: () => `A prompt must be at most ${PROMPT_LIMIT} characters, because it is quoted into one sandbox command line.`
125
+ }));
126
+ const EvalVerify = effect.Schema.String.pipe(effect.Schema.maxLength(VERIFY_LIMIT), effect.Schema.annotations({
127
+ description: "The shell command that decides whether a trial passed.",
128
+ identifier: "EvalVerify",
129
+ message: () => `A verifier must be at most ${VERIFY_LIMIT} characters, because it is quoted into one sandbox command line.`
130
+ }));
131
+ const EvalCaseName = effect.Schema.String.pipe(effect.Schema.maxLength(NAME_LIMIT), effect.Schema.annotations({
132
+ description: "What a case is called.",
133
+ identifier: "EvalCaseName",
134
+ message: () => `A case name must be at most ${NAME_LIMIT} characters.`
135
+ }));
136
+ const EvalVariableValue = effect.Schema.String.pipe(effect.Schema.maxLength(VARIABLE_VALUE_LIMIT), effect.Schema.annotations({
137
+ identifier: "EvalVariableValue",
138
+ message: () => `A variable value must be at most ${VARIABLE_VALUE_LIMIT} characters, because it is substituted into the prompt before it is quoted.`
139
+ }));
140
+ //#endregion
123
141
  //#region ../schema/src/domain/eval-trigger.ts
124
142
  const EvalTrigger = effect.Schema.Struct({
125
143
  source: effect.Schema.Literal("dashboard", "api", "cli", "ci", "mcp"),
@@ -181,10 +199,11 @@ const PROFILE_HARNESS_RULE = "The command harness needs a profile with a run com
181
199
  //#endregion
182
200
  //#region ../schema/src/domain/evals.ts
183
201
  const EvalHarness = require_eval_judges.EvalHarness;
184
- const EvalSandbox = effect.Schema.Literal("daytona", "e2b", "upstash", "modal", "cloudflare", "vercel");
185
- EvalSandbox.literals;
202
+ const EvalSandbox = effect.Schema.Literal("daytona", "e2b", "upstash", "modal", "cloudflare", "vercel", "local");
203
+ const HOSTED_SANDBOXES = EvalSandbox.literals.filter((sandbox) => sandbox !== "local");
186
204
  const EvalTrialStatus = effect.Schema.Literal("queued", "running", "passed", "failed", "void");
187
205
  const EvalRunStatus = effect.Schema.Literal("running", "finished", "failed");
206
+ const EvalExecutor = effect.Schema.Literal("client");
188
207
  const EvalSource = effect.Schema.Union(effect.Schema.Struct({ kind: effect.Schema.Literal("empty") }), effect.Schema.Struct({
189
208
  kind: effect.Schema.Literal("repo"),
190
209
  ref: effect.Schema.NullOr(effect.Schema.String),
@@ -289,7 +308,7 @@ effect.Schema.Struct({
289
308
  tasks: effect.Schema.Array(EvalTaskRequest).pipe(effect.Schema.minItems(1), effect.Schema.maxItems(20)),
290
309
  trials: effect.Schema.Int.pipe(effect.Schema.between(1, 10))
291
310
  });
292
- const OccurredAtMillis = effect.Schema.NullOr(effect.Schema.Number);
311
+ const OccurredAtMillis$1 = effect.Schema.NullOr(effect.Schema.Number);
293
312
  const EvalUsage = effect.Schema.Struct({
294
313
  cacheReadTokens: effect.Schema.Int,
295
314
  cacheWriteTokens: effect.Schema.Int,
@@ -305,18 +324,18 @@ const EvalJournalEntry = effect.Schema.Union(effect.Schema.Struct({
305
324
  _tag: effect.Schema.Literal("command"),
306
325
  command: effect.Schema.String,
307
326
  exitCode: effect.Schema.NullOr(effect.Schema.Int),
308
- finishedAtMillis: OccurredAtMillis,
327
+ finishedAtMillis: OccurredAtMillis$1,
309
328
  output: effect.Schema.String,
310
329
  outputTruncated: effect.Schema.optional(effect.Schema.Boolean),
311
- startedAtMillis: OccurredAtMillis
330
+ startedAtMillis: OccurredAtMillis$1
312
331
  }), effect.Schema.Struct({
313
332
  _tag: effect.Schema.Literal("message"),
314
- finishedAtMillis: OccurredAtMillis,
333
+ finishedAtMillis: OccurredAtMillis$1,
315
334
  text: effect.Schema.String,
316
335
  usage: effect.Schema.optional(effect.Schema.NullOr(EvalUsage))
317
336
  }), effect.Schema.Struct({
318
337
  _tag: effect.Schema.Literal("toolCall"),
319
- finishedAtMillis: OccurredAtMillis,
338
+ finishedAtMillis: OccurredAtMillis$1,
320
339
  input: effect.Schema.optional(effect.Schema.String),
321
340
  name: effect.Schema.String,
322
341
  output: effect.Schema.optional(effect.Schema.String),
@@ -324,11 +343,11 @@ const EvalJournalEntry = effect.Schema.Union(effect.Schema.Struct({
324
343
  outputTruncated: effect.Schema.optional(effect.Schema.Boolean),
325
344
  inputTruncated: effect.Schema.optional(effect.Schema.Boolean),
326
345
  errorTruncated: effect.Schema.optional(effect.Schema.Boolean),
327
- startedAtMillis: effect.Schema.optional(OccurredAtMillis),
346
+ startedAtMillis: effect.Schema.optional(OccurredAtMillis$1),
328
347
  status: effect.Schema.NullOr(effect.Schema.String)
329
348
  }), effect.Schema.Struct({
330
349
  _tag: effect.Schema.Literal("fileChange"),
331
- finishedAtMillis: OccurredAtMillis,
350
+ finishedAtMillis: OccurredAtMillis$1,
332
351
  paths: effect.Schema.Array(effect.Schema.String)
333
352
  })).annotations({
334
353
  description: "A normalized event recorded from the harness trajectory.",
@@ -475,6 +494,7 @@ const EvalRun = effect.Schema.Struct({
475
494
  cases: effect.Schema.Array(effect.Schema.String),
476
495
  cells: effect.Schema.Array(EvalCell),
477
496
  costs: effect.Schema.NullOr(EvalCosts),
497
+ executedBy: effect.Schema.optionalWith(effect.Schema.NullOr(EvalExecutor), { default: () => null }),
478
498
  failure: effect.Schema.NullOr(effect.Schema.String),
479
499
  finishedAt: effect.Schema.NullOr(EvalTimestamp),
480
500
  id: effect.Schema.String,
@@ -529,6 +549,14 @@ const EvalCellHistoryEntry = effect.Schema.Struct({
529
549
  description: "A previous scored result for the same cell identity.",
530
550
  identifier: "EvalCellHistoryEntry"
531
551
  });
552
+ const RunSubscription = effect.Schema.Struct({
553
+ expiresAtMillis: effect.Schema.Number,
554
+ tag: effect.Schema.String,
555
+ token: effect.Schema.String
556
+ }).annotations({
557
+ description: "A scoped, read-only token for watching one run in real time.",
558
+ identifier: "RunSubscription"
559
+ });
532
560
  //#endregion
533
561
  //#region ../schema/src/domain/eval-playground.ts
534
562
  const PlaygroundCaseView = effect.Schema.Struct({
@@ -610,23 +638,74 @@ const ModelCatalogue = effect.Schema.Struct({
610
638
  identifier: "ModelCatalogue"
611
639
  });
612
640
  //#endregion
613
- //#region ../schema/src/internal/authentication.ts
614
- var CurrentActor = class extends effect.Context.Tag("@anpord/schema/CurrentActor")() {};
615
- _effect_platform.HttpApiMiddleware.Tag()("@anpord/schema/Authentication", {
616
- failure: Unauthorized,
617
- provides: CurrentActor,
618
- security: { session: _effect_platform.HttpApiSecurity.apiKey({
619
- in: "cookie",
620
- key: "anpord.session_token"
621
- }) }
641
+ //#region ../schema/src/domain/harness-event.ts
642
+ const OccurredAtMillis = effect.Schema.optional(effect.Schema.Number);
643
+ const HarnessUsage = effect.Schema.Struct({
644
+ cacheReadTokens: effect.Schema.Int,
645
+ cacheWriteTokens: effect.Schema.Int,
646
+ costUsd: effect.Schema.optional(effect.Schema.Number),
647
+ inputTokens: effect.Schema.Int,
648
+ outputTokens: effect.Schema.Int,
649
+ totalTokens: effect.Schema.Int
622
650
  });
651
+ const HarnessEvent = effect.Schema.Union(effect.Schema.Struct({
652
+ _tag: effect.Schema.Literal("Started"),
653
+ at: OccurredAtMillis,
654
+ model: effect.Schema.String,
655
+ sessionId: effect.Schema.String
656
+ }), effect.Schema.Struct({
657
+ _tag: effect.Schema.Literal("Message"),
658
+ at: OccurredAtMillis,
659
+ role: effect.Schema.Literal("assistant", "user"),
660
+ text: effect.Schema.String,
661
+ usage: effect.Schema.optional(HarnessUsage)
662
+ }), effect.Schema.Struct({
663
+ _tag: effect.Schema.Literal("Command"),
664
+ at: OccurredAtMillis,
665
+ command: effect.Schema.String,
666
+ exitCode: effect.Schema.NullOr(effect.Schema.Int),
667
+ output: effect.Schema.String,
668
+ startedAt: effect.Schema.optional(effect.Schema.Number)
669
+ }), effect.Schema.Struct({
670
+ _tag: effect.Schema.Literal("FileChange"),
671
+ at: OccurredAtMillis,
672
+ paths: effect.Schema.Array(effect.Schema.String)
673
+ }), effect.Schema.Struct({
674
+ _tag: effect.Schema.Literal("ToolCall"),
675
+ at: OccurredAtMillis,
676
+ callId: effect.Schema.NullOr(effect.Schema.String),
677
+ input: effect.Schema.String,
678
+ name: effect.Schema.String,
679
+ output: effect.Schema.optional(effect.Schema.String),
680
+ error: effect.Schema.optional(effect.Schema.String),
681
+ startedAt: effect.Schema.optional(effect.Schema.Number),
682
+ status: effect.Schema.NullOr(effect.Schema.String)
683
+ }), effect.Schema.Struct({
684
+ _tag: effect.Schema.Literal("Finished"),
685
+ at: OccurredAtMillis,
686
+ reason: effect.Schema.String
687
+ }));
623
688
  //#endregion
624
- //#region ../schema/src/public/authentication.ts
625
- var ApiKeyAuthentication = class extends _effect_platform.HttpApiMiddleware.Tag()("@anpord/schema/ApiKeyAuthentication", {
626
- failure: Unauthorized,
627
- provides: CurrentActor,
628
- security: { bearer: _effect_platform.HttpApiSecurity.bearer }
629
- }) {};
689
+ //#region ../schema/src/domain/trial.ts
690
+ const TrialStatus = effect.Schema.Literal("queued", "running", "passed", "failed", "void");
691
+ effect.Schema.decodeUnknownOption(TrialStatus);
692
+ const VerifyStepResult = effect.Schema.Struct({
693
+ command: effect.Schema.String,
694
+ exitCode: effect.Schema.Int
695
+ });
696
+ const TrialOutcome = effect.Schema.Struct({
697
+ artifacts: effect.Schema.optional(effect.Schema.Array(EvalArtifactMetadata)),
698
+ validations: effect.Schema.optional(require_eval_validations.EvalValidations),
699
+ judgments: effect.Schema.optional(effect.Schema.Array(require_eval_judges.EvalJudgment)),
700
+ commandCount: effect.Schema.Int,
701
+ exitCode: effect.Schema.Int,
702
+ modelMs: effect.Schema.Int,
703
+ passed: effect.Schema.Boolean,
704
+ sandboxMs: effect.Schema.Int,
705
+ status: TrialStatus,
706
+ verifySteps: effect.Schema.Array(VerifyStepResult),
707
+ voidFields: effect.Schema.Array(effect.Schema.String)
708
+ });
630
709
  //#endregion
631
710
  //#region ../schema/src/public/evals-api.ts
632
711
  const EvalRunRequest = effect.Schema.Struct({ id: effect.Schema.String }).annotations({
@@ -644,7 +723,7 @@ const EvalModelsRequest = effect.Schema.Struct({
644
723
  description: "Select a harness whose available models should be listed.",
645
724
  identifier: "EvalModelsRequest"
646
725
  });
647
- const PublicEvalSandbox = EvalSandbox.annotations({
726
+ const PublicEvalSandbox = effect.Schema.Literal(...HOSTED_SANDBOXES).annotations({
648
727
  description: "The hosted sandbox a task runs in.",
649
728
  identifier: "PublicEvalSandbox"
650
729
  });
@@ -680,6 +759,7 @@ const PublicEvalTask = effect.Schema.Struct({
680
759
  const PublicStartEvalRequest = effect.Schema.Struct({
681
760
  trigger: effect.Schema.optional(EvalTrigger),
682
761
  cases: effect.Schema.Array(PublicEvalCase).pipe(effect.Schema.minItems(1), effect.Schema.maxItems(100)),
762
+ executeLocally: effect.Schema.optional(effect.Schema.Boolean),
683
763
  name: effect.Schema.optional(EvalName),
684
764
  prompt: EvalPrompt,
685
765
  tasks: effect.Schema.Array(PublicEvalTask).pipe(effect.Schema.minItems(1), effect.Schema.maxItems(20)),
@@ -688,7 +768,26 @@ const PublicStartEvalRequest = effect.Schema.Struct({
688
768
  description: `Start a grid with at most 100 total case, task, and trial combinations.`,
689
769
  identifier: "StartEvalRequest"
690
770
  });
691
- var PublicEvalsGroup = class extends _effect_platform.HttpApiGroup.make("evals").add(_effect_platform.HttpApiEndpoint.post("list", "/evals.list").setPayload(ListEvalsRequest).addSuccess(EvalRunPage).annotate(_effect_platform.OpenApi.Summary, "List eval runs").annotate(_effect_platform.OpenApi.Description, "Newest first. Pass the `next` cursor from a response to read the page after it; a null `next` means there are no more.")).add(_effect_platform.HttpApiEndpoint.post("start", "/evals.start").setPayload(PublicStartEvalRequest).addSuccess(StartedEval).annotate(_effect_platform.OpenApi.Summary, "Start an eval run").annotate(_effect_platform.OpenApi.Description, `Starts the grid and returns its id while trials continue in the background. ${PROFILE_HARNESS_RULE}`)).add(_effect_platform.HttpApiEndpoint.post("artifact", "/evals.artifact").setPayload(EvalArtifactRequest).addSuccess(EvalArtifact)).add(_effect_platform.HttpApiEndpoint.post("get", "/evals.get").setPayload(EvalRunRequest).addSuccess(EvalRun).annotate(_effect_platform.OpenApi.Summary, "Get an eval run")).add(_effect_platform.HttpApiEndpoint.post("cellHistory", "/evals.cellHistory").setPayload(EvalCellRequest).addSuccess(effect.Schema.Array(EvalCellHistoryEntry)).annotate(_effect_platform.OpenApi.Summary, "List a cell's history").annotate(_effect_platform.OpenApi.Description, "Returns the 20 most recent results.")).add(_effect_platform.HttpApiEndpoint.post("rerunCell", "/evals.rerunCell").setPayload(effect.Schema.extend(EvalRunRequest, effect.Schema.extend(EvalCellRequest, RerunCellRequest))).addSuccess(StartedEval).annotate(_effect_platform.OpenApi.Summary, "Rerun one cell")).add(_effect_platform.HttpApiEndpoint.post("models", "/evals.models").setPayload(EvalModelsRequest).addSuccess(ModelCatalogue).annotate(_effect_platform.OpenApi.Summary, "List models available to the harness").annotate(_effect_platform.OpenApi.Description, "The command harness has no catalogue of its own, so its list is empty: the model is whatever the profile's run command reads from ANPORD_MODEL.")).addError(BadRequest).addError(Conflict).addError(Forbidden).addError(NotFound).middleware(ApiKeyAuthentication).annotate(_effect_platform.OpenApi.Title, "Evals").annotate(_effect_platform.OpenApi.Description, "Run cases across harness, model, and sandbox combinations and compare the results with their baselines.") {};
771
+ const ReportedTrial = effect.Schema.Struct({
772
+ caseName: EvalCaseName,
773
+ events: effect.Schema.Array(HarnessEvent),
774
+ ordinal: effect.Schema.Int.pipe(effect.Schema.nonNegative()),
775
+ outcome: TrialOutcome,
776
+ sandboxId: effect.Schema.optional(effect.Schema.NullOr(effect.Schema.String)),
777
+ taskIndex: effect.Schema.Int.pipe(effect.Schema.nonNegative()),
778
+ usage: effect.Schema.optional(effect.Schema.NullOr(HarnessUsage))
779
+ }).annotations({
780
+ description: "One trial a client ran and is reporting the result of.",
781
+ identifier: "ReportedTrial"
782
+ });
783
+ const ReportTrialRequest = effect.Schema.Struct({
784
+ id: effect.Schema.String,
785
+ trial: ReportedTrial
786
+ }).annotations({
787
+ description: "A trial the caller ran, named by the run it belongs to.",
788
+ identifier: "ReportTrialRequest"
789
+ });
790
+ var PublicEvalsGroup = class extends _effect_platform.HttpApiGroup.make("evals").add(_effect_platform.HttpApiEndpoint.post("list", "/evals.list").setPayload(ListEvalsRequest).addSuccess(EvalRunPage).annotate(_effect_platform.OpenApi.Summary, "List eval runs").annotate(_effect_platform.OpenApi.Description, "Newest first. Pass the `next` cursor from a response to read the page after it; a null `next` means there are no more.")).add(_effect_platform.HttpApiEndpoint.post("start", "/evals.start").setPayload(PublicStartEvalRequest).addSuccess(StartedEval).annotate(_effect_platform.OpenApi.Summary, "Start an eval run").annotate(_effect_platform.OpenApi.Description, `Starts the grid and returns its id while trials continue in the background. ${PROFILE_HARNESS_RULE}`)).add(_effect_platform.HttpApiEndpoint.post("reportTrial", "/evals.reportTrial").setPayload(ReportTrialRequest).addSuccess(effect.Schema.Void).annotate(_effect_platform.OpenApi.Summary, "Report a trial run outside the platform").annotate(_effect_platform.OpenApi.Description, "For a run started with executeLocally. The result is recorded as reported: it was produced somewhere the platform cannot inspect, so it is marked and kept out of baselines.")).add(_effect_platform.HttpApiEndpoint.post("finishRun", "/evals.finishRun").setPayload(EvalRunRequest).addSuccess(EvalRun).annotate(_effect_platform.OpenApi.Summary, "Settle a run whose trials the caller ran").annotate(_effect_platform.OpenApi.Description, "Settles the run from the trials reported so far. A run left unsettled is swept like any other abandoned work.")).add(_effect_platform.HttpApiEndpoint.post("artifact", "/evals.artifact").setPayload(EvalArtifactRequest).addSuccess(EvalArtifact)).add(_effect_platform.HttpApiEndpoint.post("get", "/evals.get").setPayload(EvalRunRequest).addSuccess(EvalRun).annotate(_effect_platform.OpenApi.Summary, "Get an eval run")).add(_effect_platform.HttpApiEndpoint.post("subscription", "/evals.subscription").setPayload(EvalRunRequest).addSuccess(RunSubscription).annotate(_effect_platform.OpenApi.Summary, "Watch an eval run as it moves").annotate(_effect_platform.OpenApi.Description, "Returns a read-only token scoped to this run, for following it in real time. Short-lived: request another when it expires.")).add(_effect_platform.HttpApiEndpoint.post("cellHistory", "/evals.cellHistory").setPayload(EvalCellRequest).addSuccess(effect.Schema.Array(EvalCellHistoryEntry)).annotate(_effect_platform.OpenApi.Summary, "List a cell's history").annotate(_effect_platform.OpenApi.Description, "Returns the 20 most recent results.")).add(_effect_platform.HttpApiEndpoint.post("rerunCell", "/evals.rerunCell").setPayload(effect.Schema.extend(EvalRunRequest, effect.Schema.extend(EvalCellRequest, RerunCellRequest))).addSuccess(StartedEval).annotate(_effect_platform.OpenApi.Summary, "Rerun one cell")).add(_effect_platform.HttpApiEndpoint.post("models", "/evals.models").setPayload(EvalModelsRequest).addSuccess(ModelCatalogue).annotate(_effect_platform.OpenApi.Summary, "List models available to the harness").annotate(_effect_platform.OpenApi.Description, "The command harness has no catalogue of its own, so its list is empty: the model is whatever the profile's run command reads from ANPORD_MODEL.")).addError(BadRequest).addError(Conflict).addError(Forbidden).addError(NotFound).middleware(ApiKeyAuthentication).annotate(_effect_platform.OpenApi.Title, "Evals").annotate(_effect_platform.OpenApi.Description, "Run cases across harness, model, and sandbox combinations and compare the results with their baselines.") {};
692
791
  //#endregion
693
792
  Object.defineProperty(exports, "ApiKeyAuthentication", {
694
793
  enumerable: true,
@@ -708,6 +807,30 @@ Object.defineProperty(exports, "Conflict", {
708
807
  return Conflict;
709
808
  }
710
809
  });
810
+ Object.defineProperty(exports, "CredentialConnection", {
811
+ enumerable: true,
812
+ get: function() {
813
+ return CredentialConnection;
814
+ }
815
+ });
816
+ Object.defineProperty(exports, "CredentialIntegration", {
817
+ enumerable: true,
818
+ get: function() {
819
+ return CredentialIntegration;
820
+ }
821
+ });
822
+ Object.defineProperty(exports, "CredentialScope", {
823
+ enumerable: true,
824
+ get: function() {
825
+ return CredentialScope;
826
+ }
827
+ });
828
+ Object.defineProperty(exports, "CredentialValues", {
829
+ enumerable: true,
830
+ get: function() {
831
+ return CredentialValues;
832
+ }
833
+ });
711
834
  Object.defineProperty(exports, "EnvName", {
712
835
  enumerable: true,
713
836
  get: function() {
@@ -720,6 +843,12 @@ Object.defineProperty(exports, "EvalRun", {
720
843
  return EvalRun;
721
844
  }
722
845
  });
846
+ Object.defineProperty(exports, "EvalSandbox", {
847
+ enumerable: true,
848
+ get: function() {
849
+ return EvalSandbox;
850
+ }
851
+ });
723
852
  Object.defineProperty(exports, "EvalSourceFiles", {
724
853
  enumerable: true,
725
854
  get: function() {
@@ -744,6 +873,12 @@ Object.defineProperty(exports, "Forbidden", {
744
873
  return Forbidden;
745
874
  }
746
875
  });
876
+ Object.defineProperty(exports, "HarnessEvent", {
877
+ enumerable: true,
878
+ get: function() {
879
+ return HarnessEvent;
880
+ }
881
+ });
747
882
  Object.defineProperty(exports, "HarnessProfile", {
748
883
  enumerable: true,
749
884
  get: function() {
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_client = require("./client-COfGoWvI.cjs");
2
+ const require_client = require("./client-BZDftC1x.cjs");
3
3
  const require_errors = require("./errors-BX1wry8K.cjs");
4
- const require_compiler = require("./compiler-CPpRRAdH.cjs");
4
+ const require_compiler = require("./compiler-Cy85vNbp.cjs");
5
5
  const require_source = require("./source-aW5nSo2h.cjs");
6
6
  let effect = require("effect");
7
7
  let _effect_platform = require("@effect/platform");
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import { a as layer, i as DEFAULT_BASE_URL, n as AnpordClient, o as make, r as ClientOptions, t as AnpordApi } from "./client-OTrC6QXZ.cjs";
2
- import { a as EvalTaskDefinition, c as Prepare, d as ProfileRef, f as Validator, i as EvalDefinition, l as PrepareContext, m as ValidatorResult, n as CommandResult, o as ExecOptions, p as ValidatorContext, r as EvalCaseDefinition, s as HarnessRef, t as CaseCache, u as PrepareValue } from "./types-DCUo5on_.cjs";
3
- import { _ as EvalVerdict, a as EvalDistribution, c as EvalRun, d as EvalSandbox, f as EvalSource, g as EvalUsage, h as EvalTrialStatus, i as EvalComparison, l as EvalRunStatus, m as EvalTrial, n as EvalCell, o as EvalHarness, p as EvalTask, r as EvalCellHistoryEntry, s as EvalJournalEntry, t as EvalArtifact, u as EvalRunSummary } from "./evals-CSipRo7i.cjs";
1
+ import { a as layer, i as DEFAULT_BASE_URL, n as AnpordClient, o as make, r as ClientOptions, t as AnpordApi } from "./client-CsGxLUZq.cjs";
2
+ import { a as EvalTaskDefinition, c as Prepare, d as ProfileRef, f as Validator, i as EvalDefinition, l as PrepareContext, m as ValidatorResult, n as CommandResult, o as ExecOptions, p as ValidatorContext, r as EvalCaseDefinition, s as HarnessRef, t as CaseCache, u as PrepareValue } from "./types-Dvd_z5ge.cjs";
3
+ import { _ as EvalVerdict, a as EvalDistribution, c as EvalRun, d as EvalSandbox, f as EvalSource, g as EvalUsage, h as EvalTrialStatus, i as EvalComparison, l as EvalRunStatus, m as EvalTrial, n as EvalCell, o as EvalHarness, p as EvalTask, r as EvalCellHistoryEntry, s as EvalJournalEntry, t as EvalArtifact, u as EvalRunSummary } from "./evals-Dw2Ek-mx.cjs";
4
4
  import { n as McpCallSchema, t as McpCall } from "./calls-DJGZJPrF.cjs";
5
5
  import { n as CliCallSchema, t as CliCall } from "./calls-6Z1EoEa-.cjs";
6
6
  import { empty, files, repo } from "./source.cjs";
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { a as layer, i as DEFAULT_BASE_URL, n as AnpordClient, o as make, r as ClientOptions, t as AnpordApi } from "./client-BucAp4c0.mjs";
2
- import { a as EvalTaskDefinition, c as Prepare, d as ProfileRef, f as Validator, i as EvalDefinition, l as PrepareContext, m as ValidatorResult, n as CommandResult, o as ExecOptions, p as ValidatorContext, r as EvalCaseDefinition, s as HarnessRef, t as CaseCache, u as PrepareValue } from "./types-LW0tX4MF.mjs";
3
- import { _ as EvalVerdict, a as EvalDistribution, c as EvalRun, d as EvalSandbox, f as EvalSource, g as EvalUsage, h as EvalTrialStatus, i as EvalComparison, l as EvalRunStatus, m as EvalTrial, n as EvalCell, o as EvalHarness, p as EvalTask, r as EvalCellHistoryEntry, s as EvalJournalEntry, t as EvalArtifact, u as EvalRunSummary } from "./evals-CSipRo7i.mjs";
1
+ import { a as layer, i as DEFAULT_BASE_URL, n as AnpordClient, o as make, r as ClientOptions, t as AnpordApi } from "./client-C7iEhiDm.mjs";
2
+ import { a as EvalTaskDefinition, c as Prepare, d as ProfileRef, f as Validator, i as EvalDefinition, l as PrepareContext, m as ValidatorResult, n as CommandResult, o as ExecOptions, p as ValidatorContext, r as EvalCaseDefinition, s as HarnessRef, t as CaseCache, u as PrepareValue } from "./types-D-h67MVJ.mjs";
3
+ import { _ as EvalVerdict, a as EvalDistribution, c as EvalRun, d as EvalSandbox, f as EvalSource, g as EvalUsage, h as EvalTrialStatus, i as EvalComparison, l as EvalRunStatus, m as EvalTrial, n as EvalCell, o as EvalHarness, p as EvalTask, r as EvalCellHistoryEntry, s as EvalJournalEntry, t as EvalArtifact, u as EvalRunSummary } from "./evals-Dw2Ek-mx.mjs";
4
4
  import { n as McpCallSchema, t as McpCall } from "./calls-DJGZJPrF.mjs";
5
5
  import { n as CliCallSchema, t as CliCall } from "./calls-6Z1EoEa-.mjs";
6
6
  import { empty, files, repo } from "./source.mjs";
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { i as make, n as DEFAULT_BASE_URL, r as layer, t as AnpordApi } from "./client-sWrfA0jZ.mjs";
1
+ import { i as make, n as DEFAULT_BASE_URL, r as layer, t as AnpordApi } from "./client-D0l3kwWV.mjs";
2
2
  import { i as tokenMatcher, n as MissingApiKey, r as asAnpordError, t as AnpordError } from "./errors-B0YknR5V.mjs";
3
- import { a as suite, i as sourceUrlOf, t as compileDefinition } from "./compiler-q6rnLW2F.mjs";
3
+ import { a as suite, i as sourceUrlOf, t as compileDefinition } from "./compiler-DSQRHvXS.mjs";
4
4
  import { n as files, r as repo, t as empty } from "./source-BP11pzVV.mjs";
5
5
  import { Cache, Cause, Clock, Context, Data, DateTime, Duration, Effect, Exit, Layer, ManagedRuntime, Option, Redacted, Schema } from "effect";
6
6
  import { FetchHttpClient } from "@effect/platform";
@@ -1,5 +1,5 @@
1
- const require_eval_validations = require("./eval-validations-D0Cz6xSg.cjs");
2
- const require_api_mocks = require("./api-mocks-BjnewAya.cjs");
1
+ const require_eval_validations = require("./eval-validations-CZm7vVtQ.cjs");
2
+ const require_api_mocks = require("./api-mocks-CgiC7T9U.cjs");
3
3
  let effect = require("effect");
4
4
  let _effect_platform = require("@effect/platform");
5
5
  let _effect_platform_node_NodeFileSystem = require("@effect/platform-node/NodeFileSystem");
@@ -1,5 +1,5 @@
1
- import { a as validationCapture, i as unavailableValue } from "./eval-validations-CUG2PvR_.mjs";
2
- import { i as API_READY, n as API_MANIFEST, t as API_JOURNAL } from "./api-mocks-C3SsliJZ.mjs";
1
+ import { o as unavailableValue, s as validationCapture } from "./eval-validations-DNO-qwkU.mjs";
2
+ import { i as API_READY, n as API_MANIFEST, t as API_JOURNAL } from "./api-mocks-BYWvJp9v.mjs";
3
3
  import { Clock, Data, Deferred, Effect, Option, Ref, Schema } from "effect";
4
4
  import { FileSystem, HttpRouter, HttpServerRequest, HttpServerResponse } from "@effect/platform";
5
5
  import { layer } from "@effect/platform-node/NodeFileSystem";
package/dist/source.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { f as EvalSource } from "./evals-CSipRo7i.cjs";
1
+ import { f as EvalSource } from "./evals-Dw2Ek-mx.cjs";
2
2
  //#region src/evals/source.d.ts
3
3
  declare const repo: (spec: string) => EvalSource;
4
4
  declare const files: (contents: Readonly<Record<string, string>>) => EvalSource;
package/dist/source.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { f as EvalSource } from "./evals-CSipRo7i.mjs";
1
+ import { f as EvalSource } from "./evals-Dw2Ek-mx.mjs";
2
2
  //#region src/evals/source.d.ts
3
3
  declare const repo: (spec: string) => EvalSource;
4
4
  declare const files: (contents: Readonly<Record<string, string>>) => EvalSource;
@@ -1,7 +1,7 @@
1
1
  import "./errors-aGrd21jy.mjs";
2
- import { t as ApiCall } from "./api-mocks-CAQFqUgY.mjs";
2
+ import { t as ApiCall } from "./api-mocks-BenVx0e8.mjs";
3
3
  import { a as EvalJudge, i as EvalUser, r as EvalTurn } from "./eval-turns-CTCoSuB6.mjs";
4
- import { f as EvalSource, o as EvalHarness } from "./evals-CSipRo7i.mjs";
4
+ import { f as EvalSource, o as EvalHarness } from "./evals-Dw2Ek-mx.mjs";
5
5
  import { t as McpCall } from "./calls-DJGZJPrF.mjs";
6
6
  import { n as McpServerDefinition } from "./define-HK0eeSNn.mjs";
7
7
  import { t as ApiDefinition } from "./define-NZvmQuIv.mjs";
@@ -20,8 +20,8 @@ declare const PublicStartEvalRequest: Schema.Struct<{
20
20
  readonly source?: {
21
21
  readonly kind: "empty";
22
22
  } | {
23
- readonly url: string;
24
23
  readonly kind: "repo";
24
+ readonly url: string;
25
25
  readonly ref: string | null;
26
26
  } | {
27
27
  readonly kind: "files";
@@ -76,10 +76,10 @@ declare const PublicStartEvalRequest: Schema.Struct<{
76
76
  }[] | undefined;
77
77
  }[];
78
78
  readonly judges: readonly ({
79
- readonly harness?: undefined;
80
- readonly model: string;
81
79
  readonly name: string;
82
80
  readonly kind: "judge";
81
+ readonly harness?: undefined;
82
+ readonly model: string;
83
83
  readonly prompt: string;
84
84
  readonly provider: "openai";
85
85
  readonly expected?: string | undefined;
@@ -89,10 +89,10 @@ declare const PublicStartEvalRequest: Schema.Struct<{
89
89
  readonly threshold: number;
90
90
  readonly timeoutMs: number;
91
91
  } | {
92
- readonly harness: "cursor" | "codex" | "opencode" | "pi" | "fx" | "claude" | "gemini" | "qwen";
93
- readonly model: string;
94
92
  readonly name: string;
95
93
  readonly kind: "judge";
94
+ readonly harness: "cursor" | "codex" | "opencode" | "pi" | "fx" | "claude" | "gemini" | "qwen";
95
+ readonly model: string;
96
96
  readonly prompt: string;
97
97
  readonly provider?: undefined;
98
98
  readonly expected?: string | undefined;
@@ -200,24 +200,25 @@ declare const PublicStartEvalRequest: Schema.Struct<{
200
200
  variables: Schema.optional<Schema.Record$<typeof Schema.String, Schema.refine<string, typeof Schema.String>>>;
201
201
  verify: Schema.NullOr<Schema.refine<string, typeof Schema.String>>;
202
202
  }>>>>>;
203
+ executeLocally: Schema.optional<typeof Schema.Boolean>;
203
204
  name: Schema.optional<Schema.filter<Schema.filter<typeof Schema.String>>>;
204
205
  prompt: Schema.refine<string, typeof Schema.String>;
205
206
  tasks: Schema.filter<Schema.filter<Schema.Array$<Schema.refine<{
206
207
  readonly harness: "cursor" | "codex" | "opencode" | "pi" | "fx" | "claude" | "gemini" | "qwen" | "command";
207
208
  readonly model: string;
209
+ readonly sandbox?: "daytona" | "e2b" | "upstash" | "modal" | "cloudflare" | "vercel" | undefined;
208
210
  readonly profile?: {
209
- readonly run?: string | undefined;
210
211
  readonly name: string;
211
- readonly files: {
212
- readonly [x: string]: string;
213
- };
214
212
  readonly env?: {
215
213
  readonly [x: string]: string;
216
214
  } | undefined;
215
+ readonly files: {
216
+ readonly [x: string]: string;
217
+ };
217
218
  readonly install?: string | undefined;
219
+ readonly run?: string | undefined;
218
220
  readonly systemPrompt?: string | undefined;
219
221
  } | undefined;
220
- readonly sandbox?: "daytona" | "e2b" | "upstash" | "modal" | "cloudflare" | "vercel" | undefined;
221
222
  }, Schema.Struct<{
222
223
  harness: Schema.Literal<["codex", "opencode", "pi", "fx", "claude", "gemini", "qwen", "cursor", "command"]>;
223
224
  model: Schema.filter<typeof Schema.String>;
@@ -229,7 +230,7 @@ declare const PublicStartEvalRequest: Schema.Struct<{
229
230
  run: Schema.optional<typeof Schema.String>;
230
231
  systemPrompt: Schema.optional<typeof Schema.String>;
231
232
  }>>;
232
- sandbox: Schema.optional<Schema.Literal<["daytona", "e2b", "upstash", "modal", "cloudflare", "vercel"]>>;
233
+ sandbox: Schema.optional<Schema.SchemaClass<"daytona" | "e2b" | "upstash" | "modal" | "cloudflare" | "vercel", "daytona" | "e2b" | "upstash" | "modal" | "cloudflare" | "vercel", never>>;
233
234
  }>>>>>;
234
235
  trials: Schema.filter<typeof Schema.Int>;
235
236
  }>;