@lightsage/mcp 0.2.2 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (179) hide show
  1. package/README.md +2 -2
  2. package/bin/mcp-server.js +697 -317
  3. package/bin/mcp-server.js.map +42 -32
  4. package/esm/funcs/evalResultsV2EvalResultsList.d.ts +1 -1
  5. package/esm/funcs/evalResultsV2EvalResultsList.js +1 -1
  6. package/esm/funcs/evalsAnalysis.d.ts +16 -0
  7. package/esm/funcs/evalsAnalysis.d.ts.map +1 -0
  8. package/esm/funcs/evalsAnalysis.js +88 -0
  9. package/esm/funcs/evalsAnalysis.js.map +1 -0
  10. package/esm/funcs/evalsRun.d.ts +3 -3
  11. package/esm/funcs/evalsRun.js +3 -3
  12. package/esm/funcs/evalsTrace.d.ts +16 -0
  13. package/esm/funcs/evalsTrace.d.ts.map +1 -0
  14. package/esm/funcs/{evalsMonitor.js → evalsTrace.js} +19 -20
  15. package/esm/funcs/evalsTrace.js.map +1 -0
  16. package/esm/funcs/evalsV2EvalsCreate.d.ts +1 -1
  17. package/esm/funcs/evalsV2EvalsCreate.js +1 -1
  18. package/esm/funcs/evalsV2EvalsList.d.ts +1 -1
  19. package/esm/funcs/evalsV2EvalsList.js +1 -1
  20. package/esm/funcs/evalsV2EvalsRetrieve.d.ts +1 -1
  21. package/esm/funcs/evalsV2EvalsRetrieve.js +1 -1
  22. package/esm/funcs/evalsV2EvalsUpdate.d.ts +1 -1
  23. package/esm/funcs/evalsV2EvalsUpdate.js +1 -1
  24. package/esm/landing-page.js +1 -1
  25. package/esm/lib/config.d.ts +3 -3
  26. package/esm/lib/config.js +3 -3
  27. package/esm/lib/config.js.map +1 -1
  28. package/esm/mcp-server/mcp-server.js +1 -1
  29. package/esm/mcp-server/server.d.ts.map +1 -1
  30. package/esm/mcp-server/server.js +5 -3
  31. package/esm/mcp-server/server.js.map +1 -1
  32. package/esm/mcp-server/tools/evalResultsV2EvalResultsList.js +1 -1
  33. package/esm/mcp-server/tools/evalResultsV2EvalResultsList.js.map +1 -1
  34. package/esm/mcp-server/tools/evalsAnalysis.d.ts +7 -0
  35. package/esm/mcp-server/tools/evalsAnalysis.d.ts.map +1 -0
  36. package/esm/mcp-server/tools/evalsAnalysis.js +35 -0
  37. package/esm/mcp-server/tools/evalsAnalysis.js.map +1 -0
  38. package/esm/mcp-server/tools/evalsRun.js +3 -3
  39. package/esm/mcp-server/tools/evalsRun.js.map +1 -1
  40. package/esm/mcp-server/tools/evalsTrace.d.ts +7 -0
  41. package/esm/mcp-server/tools/evalsTrace.d.ts.map +1 -0
  42. package/esm/mcp-server/tools/evalsTrace.js +35 -0
  43. package/esm/mcp-server/tools/evalsTrace.js.map +1 -0
  44. package/esm/mcp-server/tools/evalsV2EvalsCreate.js +1 -1
  45. package/esm/mcp-server/tools/evalsV2EvalsCreate.js.map +1 -1
  46. package/esm/mcp-server/tools/evalsV2EvalsList.js +1 -1
  47. package/esm/mcp-server/tools/evalsV2EvalsList.js.map +1 -1
  48. package/esm/mcp-server/tools/evalsV2EvalsRetrieve.js +1 -1
  49. package/esm/mcp-server/tools/evalsV2EvalsRetrieve.js.map +1 -1
  50. package/esm/mcp-server/tools/evalsV2EvalsUpdate.js +1 -1
  51. package/esm/mcp-server/tools/evalsV2EvalsUpdate.js.map +1 -1
  52. package/esm/models/createv2evalrequest.d.ts +16 -21
  53. package/esm/models/createv2evalrequest.d.ts.map +1 -1
  54. package/esm/models/createv2evalrequest.js +25 -18
  55. package/esm/models/createv2evalrequest.js.map +1 -1
  56. package/esm/models/createv2evalrunrequest.d.ts +19 -4
  57. package/esm/models/createv2evalrunrequest.d.ts.map +1 -1
  58. package/esm/models/createv2evalrunrequest.js +31 -6
  59. package/esm/models/createv2evalrunrequest.js.map +1 -1
  60. package/esm/models/updatev2evalrequest.d.ts +16 -21
  61. package/esm/models/updatev2evalrequest.d.ts.map +1 -1
  62. package/esm/models/updatev2evalrequest.js +25 -18
  63. package/esm/models/updatev2evalrequest.js.map +1 -1
  64. package/esm/models/v2eval.d.ts +16 -21
  65. package/esm/models/v2eval.d.ts.map +1 -1
  66. package/esm/models/v2eval.js +25 -18
  67. package/esm/models/v2eval.js.map +1 -1
  68. package/esm/models/v2evalresult.d.ts +4 -2
  69. package/esm/models/v2evalresult.d.ts.map +1 -1
  70. package/esm/models/v2evalresult.js +3 -1
  71. package/esm/models/v2evalresult.js.map +1 -1
  72. package/esm/models/v2evalresultsummary.d.ts +4 -1
  73. package/esm/models/v2evalresultsummary.d.ts.map +1 -1
  74. package/esm/models/v2evalresultsummary.js +4 -1
  75. package/esm/models/v2evalresultsummary.js.map +1 -1
  76. package/esm/models/v2evalrun.d.ts +5 -2
  77. package/esm/models/v2evalrun.d.ts.map +1 -1
  78. package/esm/models/v2evalrun.js +5 -2
  79. package/esm/models/v2evalrun.js.map +1 -1
  80. package/esm/models/v2evalrunanalysis.d.ts +20 -0
  81. package/esm/models/v2evalrunanalysis.d.ts.map +1 -0
  82. package/esm/models/v2evalrunanalysis.js +22 -0
  83. package/esm/models/v2evalrunanalysis.js.map +1 -0
  84. package/esm/models/v2evalrunanalysisresponse.d.ts +12 -0
  85. package/esm/models/v2evalrunanalysisresponse.d.ts.map +1 -0
  86. package/esm/models/v2evalrunanalysisresponse.js +15 -0
  87. package/esm/models/v2evalrunanalysisresponse.js.map +1 -0
  88. package/esm/models/v2evalrunsanalysisop.d.ts +17 -0
  89. package/esm/models/v2evalrunsanalysisop.d.ts.map +1 -0
  90. package/esm/models/v2evalrunsanalysisop.js +19 -0
  91. package/esm/models/v2evalrunsanalysisop.js.map +1 -0
  92. package/esm/models/v2evalrunstraceop.d.ts +19 -0
  93. package/esm/models/v2evalrunstraceop.d.ts.map +1 -0
  94. package/esm/models/v2evalrunstraceop.js +21 -0
  95. package/esm/models/v2evalrunstraceop.js.map +1 -0
  96. package/esm/models/v2evalruntraceevent.d.ts +21 -0
  97. package/esm/models/v2evalruntraceevent.d.ts.map +1 -0
  98. package/esm/models/v2evalruntraceevent.js +23 -0
  99. package/esm/models/v2evalruntraceevent.js.map +1 -0
  100. package/esm/models/v2evalruntraceresponse.d.ts +14 -0
  101. package/esm/models/v2evalruntraceresponse.d.ts.map +1 -0
  102. package/esm/models/v2evalruntraceresponse.js +17 -0
  103. package/esm/models/v2evalruntraceresponse.js.map +1 -0
  104. package/esm/models/v2inlineclireference.d.ts +6 -0
  105. package/esm/models/v2inlineclireference.d.ts.map +1 -0
  106. package/esm/models/v2inlineclireference.js +10 -0
  107. package/esm/models/v2inlineclireference.js.map +1 -0
  108. package/esm/models/v2inlinemcpdefinition.d.ts +28 -0
  109. package/esm/models/v2inlinemcpdefinition.d.ts.map +1 -0
  110. package/esm/models/v2inlinemcpdefinition.js +25 -0
  111. package/esm/models/v2inlinemcpdefinition.js.map +1 -0
  112. package/esm/models/v2savedclireference.d.ts +6 -0
  113. package/esm/models/v2savedclireference.d.ts.map +1 -0
  114. package/esm/models/v2savedclireference.js +10 -0
  115. package/esm/models/v2savedclireference.js.map +1 -0
  116. package/esm/models/v2savedmcpreference.d.ts +6 -0
  117. package/esm/models/v2savedmcpreference.d.ts.map +1 -0
  118. package/esm/models/v2savedmcpreference.js +10 -0
  119. package/esm/models/v2savedmcpreference.js.map +1 -0
  120. package/esm/tool-names.d.ts.map +1 -1
  121. package/esm/tool-names.js +12 -8
  122. package/esm/tool-names.js.map +1 -1
  123. package/package.json +1 -1
  124. package/src/funcs/evalResultsV2EvalResultsList.ts +1 -1
  125. package/src/funcs/evalsAnalysis.ts +153 -0
  126. package/src/funcs/evalsRun.ts +3 -3
  127. package/src/funcs/{evalsMonitor.ts → evalsTrace.ts} +26 -24
  128. package/src/funcs/evalsV2EvalsCreate.ts +1 -1
  129. package/src/funcs/evalsV2EvalsList.ts +1 -1
  130. package/src/funcs/evalsV2EvalsRetrieve.ts +1 -1
  131. package/src/funcs/evalsV2EvalsUpdate.ts +1 -1
  132. package/src/landing-page.ts +1 -1
  133. package/src/lib/config.ts +3 -3
  134. package/src/mcp-server/mcp-server.ts +1 -1
  135. package/src/mcp-server/server.ts +5 -3
  136. package/src/mcp-server/tools/evalResultsV2EvalResultsList.ts +1 -1
  137. package/src/mcp-server/tools/evalsAnalysis.ts +43 -0
  138. package/src/mcp-server/tools/evalsRun.ts +3 -3
  139. package/src/mcp-server/tools/{evalsMonitor.ts → evalsTrace.ts} +9 -9
  140. package/src/mcp-server/tools/evalsV2EvalsCreate.ts +1 -1
  141. package/src/mcp-server/tools/evalsV2EvalsList.ts +1 -1
  142. package/src/mcp-server/tools/evalsV2EvalsRetrieve.ts +1 -1
  143. package/src/mcp-server/tools/evalsV2EvalsUpdate.ts +1 -1
  144. package/src/models/createv2evalrequest.ts +71 -28
  145. package/src/models/createv2evalrunrequest.ts +85 -13
  146. package/src/models/updatev2evalrequest.ts +61 -28
  147. package/src/models/v2eval.ts +49 -26
  148. package/src/models/v2evalresult.ts +8 -4
  149. package/src/models/v2evalresultsummary.ts +9 -3
  150. package/src/models/v2evalrun.ts +18 -6
  151. package/src/models/v2evalrunanalysis.ts +59 -0
  152. package/src/models/v2evalrunanalysisresponse.ts +32 -0
  153. package/src/models/v2evalrunsanalysisop.ts +48 -0
  154. package/src/models/v2evalrunstraceop.ts +58 -0
  155. package/src/models/v2evalruntraceevent.ts +45 -0
  156. package/src/models/v2evalruntraceresponse.ts +38 -0
  157. package/src/models/v2inlineclireference.ts +15 -0
  158. package/src/models/v2inlinemcpdefinition.ts +51 -0
  159. package/src/models/v2savedclireference.ts +13 -0
  160. package/src/models/v2savedmcpreference.ts +13 -0
  161. package/src/tool-names.ts +12 -8
  162. package/test/simulations.test.js +162 -0
  163. package/esm/funcs/evalsMonitor.d.ts +0 -20
  164. package/esm/funcs/evalsMonitor.d.ts.map +0 -1
  165. package/esm/funcs/evalsMonitor.js.map +0 -1
  166. package/esm/mcp-server/tools/evalsMonitor.d.ts +0 -7
  167. package/esm/mcp-server/tools/evalsMonitor.d.ts.map +0 -1
  168. package/esm/mcp-server/tools/evalsMonitor.js +0 -35
  169. package/esm/mcp-server/tools/evalsMonitor.js.map +0 -1
  170. package/esm/models/v2evaljudge.d.ts +0 -6
  171. package/esm/models/v2evaljudge.d.ts.map +0 -1
  172. package/esm/models/v2evaljudge.js +0 -9
  173. package/esm/models/v2evaljudge.js.map +0 -1
  174. package/esm/models/v2evalrunsmonitorop.d.ts +0 -27
  175. package/esm/models/v2evalrunsmonitorop.d.ts.map +0 -1
  176. package/esm/models/v2evalrunsmonitorop.js +0 -27
  177. package/esm/models/v2evalrunsmonitorop.js.map +0 -1
  178. package/src/models/v2evaljudge.ts +0 -12
  179. package/src/models/v2evalrunsmonitorop.ts +0 -59
@@ -4,43 +4,86 @@
4
4
  */
5
5
 
6
6
  import * as z from "zod";
7
- import { ClosedEnum } from "../types/enums.js";
8
- import { V2EvalJudge, V2EvalJudge$zodSchema } from "./v2evaljudge.js";
7
+ import {
8
+ V2InlineCliReference,
9
+ V2InlineCliReference$zodSchema,
10
+ } from "./v2inlineclireference.js";
11
+ import {
12
+ V2InlineMcpDefinition,
13
+ V2InlineMcpDefinition$zodSchema,
14
+ } from "./v2inlinemcpdefinition.js";
15
+ import {
16
+ V2SavedCliReference,
17
+ V2SavedCliReference$zodSchema,
18
+ } from "./v2savedclireference.js";
19
+ import {
20
+ V2SavedMcpReference,
21
+ V2SavedMcpReference$zodSchema,
22
+ } from "./v2savedmcpreference.js";
9
23
 
10
- export const CreateV2EvalRequestType = {
11
- Workflow: "workflow",
12
- Mcp: "mcp",
13
- Cli: "cli",
14
- Skill: "skill",
15
- } as const;
16
- export type CreateV2EvalRequestType = ClosedEnum<
17
- typeof CreateV2EvalRequestType
18
- >;
24
+ export type CreateV2EvalRequestCli = V2SavedCliReference | V2InlineCliReference;
19
25
 
20
- export const CreateV2EvalRequestType$zodSchema = z.enum([
21
- "workflow",
22
- "mcp",
23
- "cli",
24
- "skill",
26
+ export const CreateV2EvalRequestCli$zodSchema: z.ZodType<
27
+ CreateV2EvalRequestCli
28
+ > = z.union([
29
+ V2SavedCliReference$zodSchema,
30
+ V2InlineCliReference$zodSchema,
31
+ ]);
32
+
33
+ export type CreateV2EvalRequestMcp =
34
+ | V2InlineMcpDefinition
35
+ | V2SavedMcpReference;
36
+
37
+ export const CreateV2EvalRequestMcp$zodSchema: z.ZodType<
38
+ CreateV2EvalRequestMcp
39
+ > = z.union([
40
+ V2InlineMcpDefinition$zodSchema,
41
+ V2SavedMcpReference$zodSchema,
25
42
  ]);
26
43
 
27
44
  export type CreateV2EvalRequest = {
28
45
  name: string;
29
- type: CreateV2EvalRequestType;
30
- prompt: string;
31
- judge: V2EvalJudge;
32
- mcp_server_id?: string | undefined;
33
- cli_id?: string | undefined;
34
- skill_id?: string | undefined;
46
+ prompts: Array<string>;
47
+ judges: Array<string>;
48
+ agent?: Array<string> | undefined;
49
+ persona?: string | undefined;
50
+ clis?: Array<V2SavedCliReference | V2InlineCliReference> | undefined;
51
+ mcps?: Array<V2InlineMcpDefinition | V2SavedMcpReference> | undefined;
52
+ runs?: number | undefined;
53
+ tags?: Array<string> | undefined;
35
54
  };
36
55
 
37
56
  export const CreateV2EvalRequest$zodSchema: z.ZodType<CreateV2EvalRequest> = z
38
57
  .object({
39
- cli_id: z.string().optional(),
40
- judge: V2EvalJudge$zodSchema,
41
- mcp_server_id: z.string().optional(),
58
+ agent: z.array(z.string()).optional().describe(
59
+ "Runnable agents from `GET /v2/agents`. An empty array saves the eval without default agents. CLI clients expose repeatable `--agent`.",
60
+ ),
61
+ clis: z.array(z.union([
62
+ V2SavedCliReference$zodSchema,
63
+ V2InlineCliReference$zodSchema,
64
+ ])).optional().describe(
65
+ "Saved CLI references or inline installation commands.",
66
+ ),
67
+ judges: z.array(z.string()).describe(
68
+ "Plain-text success criteria. CLI clients expose this as repeatable `--judge`.",
69
+ ),
70
+ mcps: z.array(z.union([
71
+ V2InlineMcpDefinition$zodSchema,
72
+ V2SavedMcpReference$zodSchema,
73
+ ])).optional().describe(
74
+ "Saved MCP references or inline portable MCP definitions.",
75
+ ),
42
76
  name: z.string(),
43
- prompt: z.string(),
44
- skill_id: z.string().optional(),
45
- type: CreateV2EvalRequestType$zodSchema,
77
+ persona: z.string().optional().describe(
78
+ "Optional perspective applied to the whole eval. It is stored as metadata and does not change prompts or multiply attempts.",
79
+ ),
80
+ prompts: z.array(z.string()).describe(
81
+ "Task prompts. CLI clients expose this as repeatable `--prompt`.",
82
+ ),
83
+ runs: z.int().default(1).describe(
84
+ "Independent attempts for every prompt-agent pair.",
85
+ ),
86
+ tags: z.array(z.string()).optional().describe(
87
+ "Optional labels for organizing the eval. CLI clients may expose this string array as a repeatable `--tag` flag.",
88
+ ),
46
89
  });
@@ -4,48 +4,120 @@
4
4
  */
5
5
 
6
6
  import * as z from "zod";
7
+ import {
8
+ V2InlineCliReference,
9
+ V2InlineCliReference$zodSchema,
10
+ } from "./v2inlineclireference.js";
11
+ import {
12
+ V2InlineMcpDefinition,
13
+ V2InlineMcpDefinition$zodSchema,
14
+ } from "./v2inlinemcpdefinition.js";
15
+ import {
16
+ V2SavedCliReference,
17
+ V2SavedCliReference$zodSchema,
18
+ } from "./v2savedclireference.js";
19
+ import {
20
+ V2SavedMcpReference,
21
+ V2SavedMcpReference$zodSchema,
22
+ } from "./v2savedmcpreference.js";
23
+
24
+ export type CreateV2EvalRunRequestCli =
25
+ | V2SavedCliReference
26
+ | V2InlineCliReference;
27
+
28
+ export const CreateV2EvalRunRequestCli$zodSchema: z.ZodType<
29
+ CreateV2EvalRunRequestCli
30
+ > = z.union([
31
+ V2SavedCliReference$zodSchema,
32
+ V2InlineCliReference$zodSchema,
33
+ ]);
34
+
35
+ export type CreateV2EvalRunRequestMcp =
36
+ | V2InlineMcpDefinition
37
+ | V2SavedMcpReference;
38
+
39
+ export const CreateV2EvalRunRequestMcp$zodSchema: z.ZodType<
40
+ CreateV2EvalRunRequestMcp
41
+ > = z.union([
42
+ V2InlineMcpDefinition$zodSchema,
43
+ V2SavedMcpReference$zodSchema,
44
+ ]);
7
45
 
8
46
  /**
9
- * Start an eval run using one of two flat request forms. Saved runs require `eval_id`, `configuration_id`, and `agent_id`. Direct create-and-run requests require `prompt`, at least one item in `judges`, and `agent_id`. Do not combine saved-run and direct-run fields; no separate mode field is required.
47
+ * Start an eval run using one of two flat request forms. Saved runs require `eval_id` and use saved simulation defaults unless the request replaces them. Direct create-and-run requests require `prompts`, `judges`, and `agent`. No separate mode field is required.
10
48
  */
11
49
  export type CreateV2EvalRunRequest = {
12
50
  eval_id?: string | undefined;
13
51
  configuration_id?: string | undefined;
14
- agent_id: string;
15
- prompt?: string | undefined;
16
- judges?: Array<string> | undefined;
52
+ name?: string | undefined;
53
+ prompts?: Array<string> | null | undefined;
54
+ judges?: Array<string> | null | undefined;
55
+ agent?: Array<string> | null | undefined;
56
+ persona?: string | undefined;
57
+ clis?: Array<V2SavedCliReference | V2InlineCliReference> | null | undefined;
58
+ mcps?: Array<V2InlineMcpDefinition | V2SavedMcpReference> | null | undefined;
59
+ runs?: number | undefined;
60
+ tags?: Array<string> | undefined;
17
61
  repository?: string | undefined;
18
62
  env?: { [k: string]: string } | undefined;
19
63
  skills?: Array<string> | undefined;
64
+ skill_ids?: Array<string> | undefined;
20
65
  };
21
66
 
22
67
  export const CreateV2EvalRunRequest$zodSchema: z.ZodType<
23
68
  CreateV2EvalRunRequest
24
69
  > = z.object({
25
- agent_id: z.string().describe(
26
- "Required in both request forms. Runnable agent ID from `GET /v2/agents`.",
70
+ agent: z.array(z.string()).nullable().optional().describe(
71
+ "Runnable agents from `GET /v2/agents`. Required unless the saved eval already has agents. CLI clients expose repeatable `--agent`.",
72
+ ),
73
+ clis: z.array(z.union([
74
+ V2SavedCliReference$zodSchema,
75
+ V2InlineCliReference$zodSchema,
76
+ ])).nullable().optional().describe(
77
+ "Saved CLI references or inline installation commands. In saved mode, an explicit empty array disables saved CLIs for this launch.",
27
78
  ),
28
79
  configuration_id: z.string().optional().describe(
29
- "Saved-run form only. Saved runtime configuration; required when `eval_id` is provided.",
80
+ "Saved-run form only. Optional saved repository, environment, skills, and legacy tool configuration.",
30
81
  ),
31
82
  env: z.record(z.string(), z.string()).optional().describe(
32
- "Direct create-and-run form only. Write-only environment variables; values are stored only in the queued job's private configuration.",
83
+ "Write-only environment variables for this launch. Values are stored only in the queued job's private configuration.",
33
84
  ),
34
85
  eval_id: z.string().optional().describe(
35
86
  "Saved-run form only. Existing eval definition to run. Omit this field to use the direct create-and-run form.",
36
87
  ),
37
- judges: z.array(z.string()).optional().describe(
38
- "Direct create-and-run form only. Provide at least one success criterion. CLI clients may expose this string array as a repeatable `--judge` flag.",
88
+ judges: z.array(z.string()).nullable().optional().describe(
89
+ "Success criteria. Required in direct mode; in saved mode, replaces saved judges for this launch. CLI clients expose repeatable `--judge`.",
90
+ ),
91
+ mcps: z.array(z.union([
92
+ V2InlineMcpDefinition$zodSchema,
93
+ V2SavedMcpReference$zodSchema,
94
+ ])).nullable().optional().describe(
95
+ "Saved MCP references or inline portable definitions. In saved mode, an explicit empty array disables saved MCPs for this launch.",
39
96
  ),
40
- prompt: z.string().optional().describe(
41
- "Direct create-and-run form only. Task prompt; required when `eval_id` is omitted.",
97
+ name: z.string().optional().describe(
98
+ "Direct create-and-run form only. Display name for the durable eval. Defaults to the first prompt.",
99
+ ),
100
+ persona: z.string().optional().describe(
101
+ "Optional perspective for every attempt in this launch. It does not modify prompts or add a fan-out dimension.",
102
+ ),
103
+ prompts: z.array(z.string()).nullable().optional().describe(
104
+ "Task prompts. Required in direct mode; in saved mode, replaces saved prompts for this launch. CLI clients expose repeatable `--prompt`.",
42
105
  ),
43
106
  repository: z.string().optional().describe(
44
107
  "Direct create-and-run form only. A saved repository ID, built-in alias such as `nextjs-starter`, or a public GitHub HTTPS URL.",
45
108
  ),
109
+ runs: z.int().optional().describe(
110
+ "Independent attempts for every prompt-agent pair. Defaults to the saved eval value or 1 for a direct run.",
111
+ ),
112
+ skill_ids: z.array(z.string()).optional().describe(
113
+ "Direct create-and-run form only. Reusable skill IDs from `GET /v2/skills` to install before the agent starts.",
114
+ ),
46
115
  skills: z.array(z.string()).optional().describe(
47
116
  "Additional public skill packages to install before the agent starts in either request form, using GitHub `owner/repository` references such as `resend/resend-skills`. CLI clients may expose this string array as a repeatable `--skill` flag.",
48
117
  ),
118
+ tags: z.array(z.string()).optional().describe(
119
+ "Direct create-and-run form only. Optional labels saved on the created eval. CLI clients may expose this string array as a repeatable `--tag` flag.",
120
+ ),
49
121
  }).describe(
50
- "Start an eval run using one of two flat request forms. Saved runs require `eval_id`, `configuration_id`, and `agent_id`. Direct create-and-run requests require `prompt`, at least one item in `judges`, and `agent_id`. Do not combine saved-run and direct-run fields; no separate mode field is required.",
122
+ "Start an eval run using one of two flat request forms. Saved runs require `eval_id` and use saved simulation defaults unless the request replaces them. Direct create-and-run requests require `prompts`, `judges`, and `agent`. No separate mode field is required.",
51
123
  );
@@ -4,43 +4,76 @@
4
4
  */
5
5
 
6
6
  import * as z from "zod";
7
- import { ClosedEnum } from "../types/enums.js";
8
- import { V2EvalJudge, V2EvalJudge$zodSchema } from "./v2evaljudge.js";
7
+ import {
8
+ V2InlineCliReference,
9
+ V2InlineCliReference$zodSchema,
10
+ } from "./v2inlineclireference.js";
11
+ import {
12
+ V2InlineMcpDefinition,
13
+ V2InlineMcpDefinition$zodSchema,
14
+ } from "./v2inlinemcpdefinition.js";
15
+ import {
16
+ V2SavedCliReference,
17
+ V2SavedCliReference$zodSchema,
18
+ } from "./v2savedclireference.js";
19
+ import {
20
+ V2SavedMcpReference,
21
+ V2SavedMcpReference$zodSchema,
22
+ } from "./v2savedmcpreference.js";
9
23
 
10
- export const UpdateV2EvalRequestType = {
11
- Workflow: "workflow",
12
- Mcp: "mcp",
13
- Cli: "cli",
14
- Skill: "skill",
15
- } as const;
16
- export type UpdateV2EvalRequestType = ClosedEnum<
17
- typeof UpdateV2EvalRequestType
18
- >;
24
+ export type UpdateV2EvalRequestCli = V2SavedCliReference | V2InlineCliReference;
19
25
 
20
- export const UpdateV2EvalRequestType$zodSchema = z.enum([
21
- "workflow",
22
- "mcp",
23
- "cli",
24
- "skill",
26
+ export const UpdateV2EvalRequestCli$zodSchema: z.ZodType<
27
+ UpdateV2EvalRequestCli
28
+ > = z.union([
29
+ V2SavedCliReference$zodSchema,
30
+ V2InlineCliReference$zodSchema,
31
+ ]);
32
+
33
+ export type UpdateV2EvalRequestMcp =
34
+ | V2InlineMcpDefinition
35
+ | V2SavedMcpReference;
36
+
37
+ export const UpdateV2EvalRequestMcp$zodSchema: z.ZodType<
38
+ UpdateV2EvalRequestMcp
39
+ > = z.union([
40
+ V2InlineMcpDefinition$zodSchema,
41
+ V2SavedMcpReference$zodSchema,
25
42
  ]);
26
43
 
27
44
  export type UpdateV2EvalRequest = {
28
45
  name?: string | undefined;
29
- type?: UpdateV2EvalRequestType | undefined;
30
- prompt?: string | undefined;
31
- judge?: V2EvalJudge | null | undefined;
32
- mcp_server_id?: string | undefined;
33
- cli_id?: string | undefined;
34
- skill_id?: string | undefined;
46
+ prompts?: Array<string> | null | undefined;
47
+ judges?: Array<string> | null | undefined;
48
+ agent?: Array<string> | null | undefined;
49
+ persona?: string | undefined;
50
+ clis?: Array<V2SavedCliReference | V2InlineCliReference> | null | undefined;
51
+ mcps?: Array<V2InlineMcpDefinition | V2SavedMcpReference> | null | undefined;
52
+ runs?: number | undefined;
53
+ tags?: Array<string> | null | undefined;
35
54
  };
36
55
 
37
56
  export const UpdateV2EvalRequest$zodSchema: z.ZodType<UpdateV2EvalRequest> = z
38
57
  .object({
39
- cli_id: z.string().optional(),
40
- judge: V2EvalJudge$zodSchema.nullable().optional(),
41
- mcp_server_id: z.string().optional(),
58
+ agent: z.array(z.string()).nullable().optional(),
59
+ clis: z.array(z.union([
60
+ V2SavedCliReference$zodSchema,
61
+ V2InlineCliReference$zodSchema,
62
+ ])).nullable().optional(),
63
+ judges: z.array(z.string()).nullable().optional().describe(
64
+ "Replacement success criteria for the eval.",
65
+ ),
66
+ mcps: z.array(z.union([
67
+ V2InlineMcpDefinition$zodSchema,
68
+ V2SavedMcpReference$zodSchema,
69
+ ])).nullable().optional(),
42
70
  name: z.string().optional(),
43
- prompt: z.string().optional(),
44
- skill_id: z.string().optional(),
45
- type: UpdateV2EvalRequestType$zodSchema.optional(),
71
+ persona: z.string().optional().describe(
72
+ "Replacement eval persona. Pass null to clear it; omit it to leave the saved value unchanged.",
73
+ ),
74
+ prompts: z.array(z.string()).nullable().optional(),
75
+ runs: z.int().optional(),
76
+ tags: z.array(z.string()).nullable().optional().describe(
77
+ "Replacement labels for the eval. Pass an empty array to clear all tags.",
78
+ ),
46
79
  });
@@ -4,46 +4,69 @@
4
4
  */
5
5
 
6
6
  import * as z from "zod";
7
- import { ClosedEnum } from "../types/enums.js";
8
- import { V2EvalJudge, V2EvalJudge$zodSchema } from "./v2evaljudge.js";
7
+ import {
8
+ V2InlineCliReference,
9
+ V2InlineCliReference$zodSchema,
10
+ } from "./v2inlineclireference.js";
11
+ import {
12
+ V2InlineMcpDefinition,
13
+ V2InlineMcpDefinition$zodSchema,
14
+ } from "./v2inlinemcpdefinition.js";
15
+ import {
16
+ V2SavedCliReference,
17
+ V2SavedCliReference$zodSchema,
18
+ } from "./v2savedclireference.js";
19
+ import {
20
+ V2SavedMcpReference,
21
+ V2SavedMcpReference$zodSchema,
22
+ } from "./v2savedmcpreference.js";
9
23
 
10
- export const V2EvalType = {
11
- Workflow: "workflow",
12
- Mcp: "mcp",
13
- Cli: "cli",
14
- Skill: "skill",
15
- } as const;
16
- export type V2EvalType = ClosedEnum<typeof V2EvalType>;
24
+ export type V2EvalCli = V2SavedCliReference | V2InlineCliReference;
17
25
 
18
- export const V2EvalType$zodSchema = z.enum([
19
- "workflow",
20
- "mcp",
21
- "cli",
22
- "skill",
26
+ export const V2EvalCli$zodSchema: z.ZodType<V2EvalCli> = z.union([
27
+ V2SavedCliReference$zodSchema,
28
+ V2InlineCliReference$zodSchema,
29
+ ]);
30
+
31
+ export type V2EvalMcp = V2InlineMcpDefinition | V2SavedMcpReference;
32
+
33
+ export const V2EvalMcp$zodSchema: z.ZodType<V2EvalMcp> = z.union([
34
+ V2InlineMcpDefinition$zodSchema,
35
+ V2SavedMcpReference$zodSchema,
23
36
  ]);
24
37
 
25
38
  export type V2Eval = {
26
39
  id: string;
27
40
  name: string;
28
- type: V2EvalType;
29
- prompt: string;
30
- judge: V2EvalJudge;
31
- mcp_server_id?: string | null | undefined;
32
- cli_id?: string | null | undefined;
33
- skill_id?: string | null | undefined;
41
+ prompts?: Array<string> | undefined;
42
+ judges?: Array<string> | undefined;
43
+ agent?: Array<string> | undefined;
44
+ persona?: string | null | undefined;
45
+ clis?: Array<V2SavedCliReference | V2InlineCliReference> | undefined;
46
+ mcps?: Array<V2InlineMcpDefinition | V2SavedMcpReference> | undefined;
47
+ runs?: number | undefined;
48
+ tags?: Array<string> | undefined;
34
49
  created_at?: string | null | undefined;
35
50
  updated_at?: string | null | undefined;
36
51
  };
37
52
 
38
53
  export const V2Eval$zodSchema: z.ZodType<V2Eval> = z.object({
39
- cli_id: z.string().nullable().optional(),
54
+ agent: z.array(z.string()).optional(),
55
+ clis: z.array(z.union([
56
+ V2SavedCliReference$zodSchema,
57
+ V2InlineCliReference$zodSchema,
58
+ ])).optional(),
40
59
  created_at: z.string().nullable().optional(),
41
60
  id: z.string(),
42
- judge: V2EvalJudge$zodSchema,
43
- mcp_server_id: z.string().nullable().optional(),
61
+ judges: z.array(z.string()).optional(),
62
+ mcps: z.array(z.union([
63
+ V2InlineMcpDefinition$zodSchema,
64
+ V2SavedMcpReference$zodSchema,
65
+ ])).optional(),
44
66
  name: z.string(),
45
- prompt: z.string(),
46
- skill_id: z.string().nullable().optional(),
47
- type: V2EvalType$zodSchema,
67
+ persona: z.string().nullable().optional(),
68
+ prompts: z.array(z.string()).optional(),
69
+ runs: z.int().default(1),
70
+ tags: z.array(z.string()).optional(),
48
71
  updated_at: z.string().nullable().optional(),
49
72
  });
@@ -8,13 +8,15 @@ import * as z from "zod";
8
8
  export type V2EvalResult = {
9
9
  id: string;
10
10
  eval_id?: string | null | undefined;
11
- agent_id?: string | null | undefined;
11
+ agent?: string | null | undefined;
12
+ prompt?: string | null | undefined;
13
+ prompt_index?: number | undefined;
14
+ repeat_index?: number | undefined;
12
15
  passed?: boolean | null | undefined;
13
16
  score?: number | null | undefined;
14
17
  failure_reasons?: Array<string> | null | undefined;
15
18
  latency_ms?: number | null | undefined;
16
19
  created_at?: string | null | undefined;
17
- prompt?: string | null | undefined;
18
20
  output?: string | null | undefined;
19
21
  execution_stdout?: string | null | undefined;
20
22
  execution_stderr?: string | null | undefined;
@@ -23,8 +25,8 @@ export type V2EvalResult = {
23
25
  };
24
26
 
25
27
  export const V2EvalResult$zodSchema: z.ZodType<V2EvalResult> = z.object({
26
- agent_id: z.string().nullable().optional().describe(
27
- "Runnable agent ID combining the harness and model.",
28
+ agent: z.string().nullable().optional().describe(
29
+ "Runnable agent combining the harness and model.",
28
30
  ),
29
31
  created_at: z.string().nullable().optional(),
30
32
  eval_id: z.string().nullable().optional(),
@@ -37,6 +39,8 @@ export const V2EvalResult$zodSchema: z.ZodType<V2EvalResult> = z.object({
37
39
  output: z.string().nullable().optional(),
38
40
  passed: z.boolean().nullable().optional(),
39
41
  prompt: z.string().nullable().optional(),
42
+ prompt_index: z.int().default(0),
43
+ repeat_index: z.int().default(0),
40
44
  score: z.number().nullable().optional().describe("Score from 0 to 1."),
41
45
  tool_calls: z.array(z.record(z.string(), z.any())).nullable().optional(),
42
46
  });
@@ -8,7 +8,10 @@ import * as z from "zod";
8
8
  export type V2EvalResultSummary = {
9
9
  id: string;
10
10
  eval_id?: string | null | undefined;
11
- agent_id?: string | null | undefined;
11
+ agent?: string | null | undefined;
12
+ prompt?: string | null | undefined;
13
+ prompt_index?: number | undefined;
14
+ repeat_index?: number | undefined;
12
15
  passed?: boolean | null | undefined;
13
16
  score?: number | null | undefined;
14
17
  failure_reasons?: Array<string> | null | undefined;
@@ -18,8 +21,8 @@ export type V2EvalResultSummary = {
18
21
 
19
22
  export const V2EvalResultSummary$zodSchema: z.ZodType<V2EvalResultSummary> = z
20
23
  .object({
21
- agent_id: z.string().nullable().optional().describe(
22
- "Runnable agent ID combining the harness and model.",
24
+ agent: z.string().nullable().optional().describe(
25
+ "Runnable agent combining the harness and model.",
23
26
  ),
24
27
  created_at: z.string().nullable().optional(),
25
28
  eval_id: z.string().nullable().optional(),
@@ -27,5 +30,8 @@ export const V2EvalResultSummary$zodSchema: z.ZodType<V2EvalResultSummary> = z
27
30
  id: z.string().describe("Result ID, not an eval job ID."),
28
31
  latency_ms: z.int().nullable().optional(),
29
32
  passed: z.boolean().nullable().optional(),
33
+ prompt: z.string().nullable().optional(),
34
+ prompt_index: z.int().default(0),
35
+ repeat_index: z.int().default(0),
30
36
  score: z.number().nullable().optional().describe("Score from 0 to 1."),
31
37
  });
@@ -15,8 +15,11 @@ export type V2EvalRun = {
15
15
  eval_id?: string | null | undefined;
16
16
  eval_name?: string | null | undefined;
17
17
  configuration_id?: string | null | undefined;
18
- agent_id?: string | null | undefined;
19
- agent_name?: string | null | undefined;
18
+ persona?: string | null | undefined;
19
+ agent?: Array<string> | undefined;
20
+ prompt_count?: number | undefined;
21
+ runs?: number | undefined;
22
+ attempt_count?: number | undefined;
20
23
  status: string;
21
24
  stage?: string | null | undefined;
22
25
  dispatch_id?: string | null | undefined;
@@ -29,11 +32,11 @@ export type V2EvalRun = {
29
32
  };
30
33
 
31
34
  export const V2EvalRun$zodSchema: z.ZodType<V2EvalRun> = z.object({
32
- agent_id: z.string().nullable().optional().describe(
33
- "Runnable agent ID selected for this run.",
35
+ agent: z.array(z.string()).optional().describe(
36
+ "Runnable agents selected for this simulation.",
34
37
  ),
35
- agent_name: z.string().nullable().optional().describe(
36
- "Display name captured for the selected agent.",
38
+ attempt_count: z.int().default(1).describe(
39
+ "Total concrete attempts after all fan-out dimensions.",
37
40
  ),
38
41
  completed_at: z.string().nullable().optional(),
39
42
  configuration_id: z.string().nullable().optional(),
@@ -49,7 +52,16 @@ export const V2EvalRun$zodSchema: z.ZodType<V2EvalRun> = z.object({
49
52
  ),
50
53
  id: z.string().describe("Run ID to use when polling eval-run status."),
51
54
  job_id: z.string().describe("Alias of `id` for the durable parent job."),
55
+ persona: z.string().nullable().optional().describe(
56
+ "Perspective applied to every attempt in this simulation.",
57
+ ),
52
58
  progress: PublicEvalRunProgress$zodSchema.optional(),
59
+ prompt_count: z.int().default(1).describe(
60
+ "Number of prompts included in the simulation.",
61
+ ),
62
+ runs: z.int().default(1).describe(
63
+ "Independent attempts requested for every prompt-agent pair.",
64
+ ),
53
65
  stage: z.string().nullable().optional(),
54
66
  started_at: z.string().nullable().optional(),
55
67
  status: z.string(),
@@ -0,0 +1,59 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: ce9f97cba8e0
4
+ */
5
+
6
+ import * as z from "zod";
7
+
8
+ export type V2EvalRunAnalysis = {
9
+ id: string;
10
+ result_id: string;
11
+ attempt_id: string;
12
+ eval_id?: string | null | undefined;
13
+ agent?: string | null | undefined;
14
+ prompt?: string | null | undefined;
15
+ prompt_index?: number | undefined;
16
+ variant_key?: string | undefined;
17
+ repeat_index?: number | undefined;
18
+ analysis_version?: string | null | undefined;
19
+ analysis?: { [k: string]: any } | undefined;
20
+ created_at?: string | null | undefined;
21
+ updated_at?: string | null | undefined;
22
+ };
23
+
24
+ export const V2EvalRunAnalysis$zodSchema: z.ZodType<V2EvalRunAnalysis> = z
25
+ .object({
26
+ agent: z.string().nullable().optional().describe(
27
+ "Runnable agent used for this concrete attempt.",
28
+ ),
29
+ analysis: z.record(z.string(), z.any()).optional().describe(
30
+ "Persisted eval_run_analysis payload, including verdict, outcome, findings, bottleneck, and analysis sections.",
31
+ ),
32
+ analysis_version: z.string().nullable().optional().describe(
33
+ "Version of the analysis pipeline that produced this payload.",
34
+ ),
35
+ attempt_id: z.string().describe(
36
+ "Child eval-attempt ID used to correlate the analysis with trace events.",
37
+ ),
38
+ created_at: z.string().nullable().optional(),
39
+ eval_id: z.string().nullable().optional().describe(
40
+ "Public eval definition ID, not the backing executable eval ID.",
41
+ ),
42
+ id: z.string().describe("Persisted eval analysis ID."),
43
+ prompt: z.string().nullable().optional().describe(
44
+ "Exact task prompt used for this concrete attempt.",
45
+ ),
46
+ prompt_index: z.int().default(0).describe(
47
+ "Zero-based prompt index within the submitted simulation.",
48
+ ),
49
+ repeat_index: z.int().default(0).describe(
50
+ "Zero-based repeat index within the submitted run.",
51
+ ),
52
+ result_id: z.string().describe(
53
+ "Concrete eval result ID analyzed for this attempt.",
54
+ ),
55
+ updated_at: z.string().nullable().optional(),
56
+ variant_key: z.string().default("default").describe(
57
+ "Runtime variant that produced this result.",
58
+ ),
59
+ });
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 16648f81799b
4
+ */
5
+
6
+ import * as z from "zod";
7
+ import {
8
+ PublicEvalRunProgress,
9
+ PublicEvalRunProgress$zodSchema,
10
+ } from "./publicevalrunprogress.js";
11
+ import {
12
+ V2EvalRunAnalysis,
13
+ V2EvalRunAnalysis$zodSchema,
14
+ } from "./v2evalrunanalysis.js";
15
+
16
+ export type V2EvalRunAnalysisResponse = {
17
+ run_id: string;
18
+ status: string;
19
+ progress?: PublicEvalRunProgress | undefined;
20
+ error?: string | null | undefined;
21
+ data?: Array<V2EvalRunAnalysis> | undefined;
22
+ };
23
+
24
+ export const V2EvalRunAnalysisResponse$zodSchema: z.ZodType<
25
+ V2EvalRunAnalysisResponse
26
+ > = z.object({
27
+ data: z.array(V2EvalRunAnalysis$zodSchema).optional(),
28
+ error: z.string().nullable().optional(),
29
+ progress: PublicEvalRunProgress$zodSchema.optional(),
30
+ run_id: z.string(),
31
+ status: z.string(),
32
+ });