@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.
- package/README.md +2 -2
- package/bin/mcp-server.js +697 -317
- package/bin/mcp-server.js.map +42 -32
- package/esm/funcs/evalResultsV2EvalResultsList.d.ts +1 -1
- package/esm/funcs/evalResultsV2EvalResultsList.js +1 -1
- package/esm/funcs/evalsAnalysis.d.ts +16 -0
- package/esm/funcs/evalsAnalysis.d.ts.map +1 -0
- package/esm/funcs/evalsAnalysis.js +88 -0
- package/esm/funcs/evalsAnalysis.js.map +1 -0
- package/esm/funcs/evalsRun.d.ts +3 -3
- package/esm/funcs/evalsRun.js +3 -3
- package/esm/funcs/evalsTrace.d.ts +16 -0
- package/esm/funcs/evalsTrace.d.ts.map +1 -0
- package/esm/funcs/{evalsMonitor.js → evalsTrace.js} +19 -20
- package/esm/funcs/evalsTrace.js.map +1 -0
- package/esm/funcs/evalsV2EvalsCreate.d.ts +1 -1
- package/esm/funcs/evalsV2EvalsCreate.js +1 -1
- package/esm/funcs/evalsV2EvalsList.d.ts +1 -1
- package/esm/funcs/evalsV2EvalsList.js +1 -1
- package/esm/funcs/evalsV2EvalsRetrieve.d.ts +1 -1
- package/esm/funcs/evalsV2EvalsRetrieve.js +1 -1
- package/esm/funcs/evalsV2EvalsUpdate.d.ts +1 -1
- package/esm/funcs/evalsV2EvalsUpdate.js +1 -1
- package/esm/landing-page.js +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.d.ts.map +1 -1
- package/esm/mcp-server/server.js +5 -3
- package/esm/mcp-server/server.js.map +1 -1
- package/esm/mcp-server/tools/evalResultsV2EvalResultsList.js +1 -1
- package/esm/mcp-server/tools/evalResultsV2EvalResultsList.js.map +1 -1
- package/esm/mcp-server/tools/evalsAnalysis.d.ts +7 -0
- package/esm/mcp-server/tools/evalsAnalysis.d.ts.map +1 -0
- package/esm/mcp-server/tools/evalsAnalysis.js +35 -0
- package/esm/mcp-server/tools/evalsAnalysis.js.map +1 -0
- package/esm/mcp-server/tools/evalsRun.js +3 -3
- package/esm/mcp-server/tools/evalsRun.js.map +1 -1
- package/esm/mcp-server/tools/evalsTrace.d.ts +7 -0
- package/esm/mcp-server/tools/evalsTrace.d.ts.map +1 -0
- package/esm/mcp-server/tools/evalsTrace.js +35 -0
- package/esm/mcp-server/tools/evalsTrace.js.map +1 -0
- package/esm/mcp-server/tools/evalsV2EvalsCreate.js +1 -1
- package/esm/mcp-server/tools/evalsV2EvalsCreate.js.map +1 -1
- package/esm/mcp-server/tools/evalsV2EvalsList.js +1 -1
- package/esm/mcp-server/tools/evalsV2EvalsList.js.map +1 -1
- package/esm/mcp-server/tools/evalsV2EvalsRetrieve.js +1 -1
- package/esm/mcp-server/tools/evalsV2EvalsRetrieve.js.map +1 -1
- package/esm/mcp-server/tools/evalsV2EvalsUpdate.js +1 -1
- package/esm/mcp-server/tools/evalsV2EvalsUpdate.js.map +1 -1
- package/esm/models/createv2evalrequest.d.ts +16 -21
- package/esm/models/createv2evalrequest.d.ts.map +1 -1
- package/esm/models/createv2evalrequest.js +25 -18
- package/esm/models/createv2evalrequest.js.map +1 -1
- package/esm/models/createv2evalrunrequest.d.ts +19 -4
- package/esm/models/createv2evalrunrequest.d.ts.map +1 -1
- package/esm/models/createv2evalrunrequest.js +31 -6
- package/esm/models/createv2evalrunrequest.js.map +1 -1
- package/esm/models/updatev2evalrequest.d.ts +16 -21
- package/esm/models/updatev2evalrequest.d.ts.map +1 -1
- package/esm/models/updatev2evalrequest.js +25 -18
- package/esm/models/updatev2evalrequest.js.map +1 -1
- package/esm/models/v2eval.d.ts +16 -21
- package/esm/models/v2eval.d.ts.map +1 -1
- package/esm/models/v2eval.js +25 -18
- package/esm/models/v2eval.js.map +1 -1
- package/esm/models/v2evalresult.d.ts +4 -2
- package/esm/models/v2evalresult.d.ts.map +1 -1
- package/esm/models/v2evalresult.js +3 -1
- package/esm/models/v2evalresult.js.map +1 -1
- package/esm/models/v2evalresultsummary.d.ts +4 -1
- package/esm/models/v2evalresultsummary.d.ts.map +1 -1
- package/esm/models/v2evalresultsummary.js +4 -1
- package/esm/models/v2evalresultsummary.js.map +1 -1
- package/esm/models/v2evalrun.d.ts +5 -2
- package/esm/models/v2evalrun.d.ts.map +1 -1
- package/esm/models/v2evalrun.js +5 -2
- package/esm/models/v2evalrun.js.map +1 -1
- package/esm/models/v2evalrunanalysis.d.ts +20 -0
- package/esm/models/v2evalrunanalysis.d.ts.map +1 -0
- package/esm/models/v2evalrunanalysis.js +22 -0
- package/esm/models/v2evalrunanalysis.js.map +1 -0
- package/esm/models/v2evalrunanalysisresponse.d.ts +12 -0
- package/esm/models/v2evalrunanalysisresponse.d.ts.map +1 -0
- package/esm/models/v2evalrunanalysisresponse.js +15 -0
- package/esm/models/v2evalrunanalysisresponse.js.map +1 -0
- package/esm/models/v2evalrunsanalysisop.d.ts +17 -0
- package/esm/models/v2evalrunsanalysisop.d.ts.map +1 -0
- package/esm/models/v2evalrunsanalysisop.js +19 -0
- package/esm/models/v2evalrunsanalysisop.js.map +1 -0
- package/esm/models/v2evalrunstraceop.d.ts +19 -0
- package/esm/models/v2evalrunstraceop.d.ts.map +1 -0
- package/esm/models/v2evalrunstraceop.js +21 -0
- package/esm/models/v2evalrunstraceop.js.map +1 -0
- package/esm/models/v2evalruntraceevent.d.ts +21 -0
- package/esm/models/v2evalruntraceevent.d.ts.map +1 -0
- package/esm/models/v2evalruntraceevent.js +23 -0
- package/esm/models/v2evalruntraceevent.js.map +1 -0
- package/esm/models/v2evalruntraceresponse.d.ts +14 -0
- package/esm/models/v2evalruntraceresponse.d.ts.map +1 -0
- package/esm/models/v2evalruntraceresponse.js +17 -0
- package/esm/models/v2evalruntraceresponse.js.map +1 -0
- package/esm/models/v2inlineclireference.d.ts +6 -0
- package/esm/models/v2inlineclireference.d.ts.map +1 -0
- package/esm/models/v2inlineclireference.js +10 -0
- package/esm/models/v2inlineclireference.js.map +1 -0
- package/esm/models/v2inlinemcpdefinition.d.ts +28 -0
- package/esm/models/v2inlinemcpdefinition.d.ts.map +1 -0
- package/esm/models/v2inlinemcpdefinition.js +25 -0
- package/esm/models/v2inlinemcpdefinition.js.map +1 -0
- package/esm/models/v2savedclireference.d.ts +6 -0
- package/esm/models/v2savedclireference.d.ts.map +1 -0
- package/esm/models/v2savedclireference.js +10 -0
- package/esm/models/v2savedclireference.js.map +1 -0
- package/esm/models/v2savedmcpreference.d.ts +6 -0
- package/esm/models/v2savedmcpreference.d.ts.map +1 -0
- package/esm/models/v2savedmcpreference.js +10 -0
- package/esm/models/v2savedmcpreference.js.map +1 -0
- package/esm/tool-names.d.ts.map +1 -1
- package/esm/tool-names.js +12 -8
- package/esm/tool-names.js.map +1 -1
- package/package.json +1 -1
- package/src/funcs/evalResultsV2EvalResultsList.ts +1 -1
- package/src/funcs/evalsAnalysis.ts +153 -0
- package/src/funcs/evalsRun.ts +3 -3
- package/src/funcs/{evalsMonitor.ts → evalsTrace.ts} +26 -24
- package/src/funcs/evalsV2EvalsCreate.ts +1 -1
- package/src/funcs/evalsV2EvalsList.ts +1 -1
- package/src/funcs/evalsV2EvalsRetrieve.ts +1 -1
- package/src/funcs/evalsV2EvalsUpdate.ts +1 -1
- package/src/landing-page.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -3
- package/src/mcp-server/tools/evalResultsV2EvalResultsList.ts +1 -1
- package/src/mcp-server/tools/evalsAnalysis.ts +43 -0
- package/src/mcp-server/tools/evalsRun.ts +3 -3
- package/src/mcp-server/tools/{evalsMonitor.ts → evalsTrace.ts} +9 -9
- package/src/mcp-server/tools/evalsV2EvalsCreate.ts +1 -1
- package/src/mcp-server/tools/evalsV2EvalsList.ts +1 -1
- package/src/mcp-server/tools/evalsV2EvalsRetrieve.ts +1 -1
- package/src/mcp-server/tools/evalsV2EvalsUpdate.ts +1 -1
- package/src/models/createv2evalrequest.ts +71 -28
- package/src/models/createv2evalrunrequest.ts +85 -13
- package/src/models/updatev2evalrequest.ts +61 -28
- package/src/models/v2eval.ts +49 -26
- package/src/models/v2evalresult.ts +8 -4
- package/src/models/v2evalresultsummary.ts +9 -3
- package/src/models/v2evalrun.ts +18 -6
- package/src/models/v2evalrunanalysis.ts +59 -0
- package/src/models/v2evalrunanalysisresponse.ts +32 -0
- package/src/models/v2evalrunsanalysisop.ts +48 -0
- package/src/models/v2evalrunstraceop.ts +58 -0
- package/src/models/v2evalruntraceevent.ts +45 -0
- package/src/models/v2evalruntraceresponse.ts +38 -0
- package/src/models/v2inlineclireference.ts +15 -0
- package/src/models/v2inlinemcpdefinition.ts +51 -0
- package/src/models/v2savedclireference.ts +13 -0
- package/src/models/v2savedmcpreference.ts +13 -0
- package/src/tool-names.ts +12 -8
- package/test/simulations.test.js +162 -0
- package/esm/funcs/evalsMonitor.d.ts +0 -20
- package/esm/funcs/evalsMonitor.d.ts.map +0 -1
- package/esm/funcs/evalsMonitor.js.map +0 -1
- package/esm/mcp-server/tools/evalsMonitor.d.ts +0 -7
- package/esm/mcp-server/tools/evalsMonitor.d.ts.map +0 -1
- package/esm/mcp-server/tools/evalsMonitor.js +0 -35
- package/esm/mcp-server/tools/evalsMonitor.js.map +0 -1
- package/esm/models/v2evaljudge.d.ts +0 -6
- package/esm/models/v2evaljudge.d.ts.map +0 -1
- package/esm/models/v2evaljudge.js +0 -9
- package/esm/models/v2evaljudge.js.map +0 -1
- package/esm/models/v2evalrunsmonitorop.d.ts +0 -27
- package/esm/models/v2evalrunsmonitorop.d.ts.map +0 -1
- package/esm/models/v2evalrunsmonitorop.js +0 -27
- package/esm/models/v2evalrunsmonitorop.js.map +0 -1
- package/src/models/v2evaljudge.ts +0 -12
- package/src/models/v2evalrunsmonitorop.ts +0 -59
|
@@ -4,43 +4,86 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import * as z from "zod";
|
|
7
|
-
import {
|
|
8
|
-
|
|
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
|
|
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
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
|
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
|
-
|
|
15
|
-
|
|
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
|
-
|
|
26
|
-
"
|
|
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.
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
|
|
41
|
-
"Direct create-and-run form only.
|
|
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
|
|
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 {
|
|
8
|
-
|
|
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
|
|
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
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
});
|
package/src/models/v2eval.ts
CHANGED
|
@@ -4,46 +4,69 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import * as z from "zod";
|
|
7
|
-
import {
|
|
8
|
-
|
|
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
|
|
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
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
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
|
-
|
|
43
|
-
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
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
|
-
|
|
27
|
-
"Runnable agent
|
|
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
|
-
|
|
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
|
-
|
|
22
|
-
"Runnable agent
|
|
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
|
});
|
package/src/models/v2evalrun.ts
CHANGED
|
@@ -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
|
-
|
|
19
|
-
|
|
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
|
-
|
|
33
|
-
"Runnable
|
|
35
|
+
agent: z.array(z.string()).optional().describe(
|
|
36
|
+
"Runnable agents selected for this simulation.",
|
|
34
37
|
),
|
|
35
|
-
|
|
36
|
-
"
|
|
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
|
+
});
|