@root-signals/scorable-cli 0.5.0 → 0.6.0
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/dist/commands/evaluator/create.d.ts.map +1 -1
- package/dist/commands/evaluator/create.js +0 -3
- package/dist/commands/evaluator/update.d.ts.map +1 -1
- package/dist/commands/evaluator/update.js +0 -3
- package/dist/commands/judge/generate.d.ts.map +1 -1
- package/dist/commands/judge/generate.js +3 -4
- package/dist/commands/judge/list.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/commands/evaluator/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/commands/evaluator/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CA+E9D"}
|
|
@@ -9,7 +9,6 @@ export function registerCreateCommand(evaluator) {
|
|
|
9
9
|
.requiredOption("--scoring-criteria <text>", "The scoring criteria prompt. Must contain {{ request }} and/or {{ response }} as placeholders.")
|
|
10
10
|
.option("--intent <intent>", "The intent for the evaluator (mutually exclusive with --objective-id)")
|
|
11
11
|
.option("--objective-id <id>", "Objective ID (mutually exclusive with --intent)")
|
|
12
|
-
.option("--system-message <text>", "System message for the evaluator")
|
|
13
12
|
.option("--models <json>", "JSON array of model names, in priority order. E.g., '[\"gpt-5-mini\"]'")
|
|
14
13
|
.option("--overwrite", "Overwrite if evaluator with same name exists")
|
|
15
14
|
.option("--objective-version-id <id>", "Objective version ID")
|
|
@@ -32,8 +31,6 @@ export function registerCreateCommand(evaluator) {
|
|
|
32
31
|
payload.intent = opts.intent;
|
|
33
32
|
if (opts.objectiveId)
|
|
34
33
|
payload.objective_id = opts.objectiveId;
|
|
35
|
-
if (opts.systemMessage)
|
|
36
|
-
payload.system_message = opts.systemMessage;
|
|
37
34
|
if (opts.overwrite !== undefined)
|
|
38
35
|
payload.overwrite = opts.overwrite;
|
|
39
36
|
if (opts.objectiveVersionId)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/commands/evaluator/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/commands/evaluator/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAwD9D"}
|
|
@@ -7,7 +7,6 @@ export function registerUpdateCommand(evaluator) {
|
|
|
7
7
|
.description("Update an existing evaluator (PATCH)")
|
|
8
8
|
.option("--name <name>", "The new name for the evaluator")
|
|
9
9
|
.option("--scoring-criteria <text>", "The new scoring criteria (prompt text)")
|
|
10
|
-
.option("--system-message <text>", "The new system message")
|
|
11
10
|
.option("--models <json>", "JSON array of model names. E.g., '[\"gpt-4\"]'")
|
|
12
11
|
.option("--objective-id <id>", "The new objective ID")
|
|
13
12
|
.option("--objective-version-id <id>", "The new objective version ID")
|
|
@@ -18,8 +17,6 @@ export function registerUpdateCommand(evaluator) {
|
|
|
18
17
|
payload.name = opts.name;
|
|
19
18
|
if (opts.scoringCriteria !== undefined)
|
|
20
19
|
payload.prompt = opts.scoringCriteria;
|
|
21
|
-
if (opts.systemMessage !== undefined)
|
|
22
|
-
payload.system_message = opts.systemMessage;
|
|
23
20
|
if (opts.objectiveId !== undefined)
|
|
24
21
|
payload.objective_id = opts.objectiveId;
|
|
25
22
|
if (opts.objectiveVersionId !== undefined)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/commands/judge/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/commands/judge/generate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CA2H5D"}
|
|
@@ -30,7 +30,6 @@ offer to connect the guest with a human agent when uncertain."`)
|
|
|
30
30
|
printError(`Invalid --visibility value: "${visibility}". Accepted values: private, public.`);
|
|
31
31
|
throw new CliError(1, "invalid_visibility");
|
|
32
32
|
}
|
|
33
|
-
const apiVisibility = visibility === "private" ? "unlisted" : "public";
|
|
34
33
|
const apiKey = await requireApiKey();
|
|
35
34
|
let extra_contexts;
|
|
36
35
|
if (opts.extraContexts) {
|
|
@@ -45,9 +44,9 @@ offer to connect the guest with a human agent when uncertain."`)
|
|
|
45
44
|
const spinner = ora("Generating judge (this may take a moment)...").start();
|
|
46
45
|
try {
|
|
47
46
|
const client = getSdkClient(apiKey);
|
|
48
|
-
const result = await client.judges.generate({
|
|
47
|
+
const result = (await client.judges.generate({
|
|
49
48
|
intent: opts.intent,
|
|
50
|
-
visibility:
|
|
49
|
+
visibility: visibility,
|
|
51
50
|
overwrite: opts.overwrite,
|
|
52
51
|
name: opts.name,
|
|
53
52
|
stage: opts.stage,
|
|
@@ -59,7 +58,7 @@ offer to connect the guest with a human agent when uncertain."`)
|
|
|
59
58
|
reasoning_effort: opts.reasoningEffort,
|
|
60
59
|
},
|
|
61
60
|
}),
|
|
62
|
-
});
|
|
61
|
+
}));
|
|
63
62
|
spinner.stop();
|
|
64
63
|
if (result.error_code === "multiple_stages") {
|
|
65
64
|
printWarning("Multiple evaluation stages detected. Each judge covers one stage.");
|
|
@@ -12,7 +12,7 @@ export function registerListCommand(judge) {
|
|
|
12
12
|
.option("--ordering <field>", "Which field to use for ordering the results")
|
|
13
13
|
.action(async (opts) => {
|
|
14
14
|
const apiKey = await requireApiKey();
|
|
15
|
-
const params = {
|
|
15
|
+
const params = {};
|
|
16
16
|
if (opts.pageSize !== undefined)
|
|
17
17
|
params.page_size = opts.pageSize;
|
|
18
18
|
if (opts.cursor !== undefined)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@root-signals/scorable-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "CLI for Scorable",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Scorable",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@inquirer/prompts": "^8.3.2",
|
|
34
|
-
"@root-signals/scorable": "^0.
|
|
34
|
+
"@root-signals/scorable": "^0.5.0",
|
|
35
35
|
"chalk": "^5.6.2",
|
|
36
36
|
"cli-table3": "^0.6.5",
|
|
37
37
|
"commander": "^14.0.3",
|