@root-signals/scorable-cli 0.1.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/README.md +206 -0
- package/dist/auth.d.ts +7 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +103 -0
- package/dist/auth.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +16 -0
- package/dist/client.d.ts +7 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +52 -0
- package/dist/client.js.map +1 -0
- package/dist/commands/judge/create.d.ts +3 -0
- package/dist/commands/judge/create.d.ts.map +1 -0
- package/dist/commands/judge/create.js +40 -0
- package/dist/commands/judge/create.js.map +1 -0
- package/dist/commands/judge/delete.d.ts +3 -0
- package/dist/commands/judge/delete.d.ts.map +1 -0
- package/dist/commands/judge/delete.js +33 -0
- package/dist/commands/judge/delete.js.map +1 -0
- package/dist/commands/judge/duplicate.d.ts +3 -0
- package/dist/commands/judge/duplicate.d.ts.map +1 -0
- package/dist/commands/judge/duplicate.js +23 -0
- package/dist/commands/judge/duplicate.js.map +1 -0
- package/dist/commands/judge/exec-openai-generic.d.ts +3 -0
- package/dist/commands/judge/exec-openai-generic.d.ts.map +1 -0
- package/dist/commands/judge/exec-openai-generic.js +50 -0
- package/dist/commands/judge/exec-openai-generic.js.map +1 -0
- package/dist/commands/judge/exec-openai.d.ts +3 -0
- package/dist/commands/judge/exec-openai.d.ts.map +1 -0
- package/dist/commands/judge/exec-openai.js +50 -0
- package/dist/commands/judge/exec-openai.js.map +1 -0
- package/dist/commands/judge/execute-by-name.d.ts +15 -0
- package/dist/commands/judge/execute-by-name.d.ts.map +1 -0
- package/dist/commands/judge/execute-by-name.js +73 -0
- package/dist/commands/judge/execute-by-name.js.map +1 -0
- package/dist/commands/judge/execute.d.ts +15 -0
- package/dist/commands/judge/execute.d.ts.map +1 -0
- package/dist/commands/judge/execute.js +73 -0
- package/dist/commands/judge/execute.js.map +1 -0
- package/dist/commands/judge/get.d.ts +3 -0
- package/dist/commands/judge/get.d.ts.map +1 -0
- package/dist/commands/judge/get.js +23 -0
- package/dist/commands/judge/get.js.map +1 -0
- package/dist/commands/judge/index.d.ts +3 -0
- package/dist/commands/judge/index.d.ts.map +1 -0
- package/dist/commands/judge/index.js +25 -0
- package/dist/commands/judge/index.js.map +1 -0
- package/dist/commands/judge/list.d.ts +3 -0
- package/dist/commands/judge/list.d.ts.map +1 -0
- package/dist/commands/judge/list.js +58 -0
- package/dist/commands/judge/list.js.map +1 -0
- package/dist/commands/judge/update.d.ts +3 -0
- package/dist/commands/judge/update.d.ts.map +1 -0
- package/dist/commands/judge/update.js +45 -0
- package/dist/commands/judge/update.js.map +1 -0
- package/dist/commands/prompt-test/index.d.ts +3 -0
- package/dist/commands/prompt-test/index.d.ts.map +1 -0
- package/dist/commands/prompt-test/index.js +13 -0
- package/dist/commands/prompt-test/index.js.map +1 -0
- package/dist/commands/prompt-test/init.d.ts +3 -0
- package/dist/commands/prompt-test/init.d.ts.map +1 -0
- package/dist/commands/prompt-test/init.js +77 -0
- package/dist/commands/prompt-test/init.js.map +1 -0
- package/dist/commands/prompt-test/run.d.ts +4 -0
- package/dist/commands/prompt-test/run.d.ts.map +1 -0
- package/dist/commands/prompt-test/run.js +194 -0
- package/dist/commands/prompt-test/run.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -0
- package/dist/output.d.ts +9 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +40 -0
- package/dist/output.js.map +1 -0
- package/dist/types.d.ts +62 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +8 -0
- package/dist/types.js.map +1 -0
- package/package.json +53 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { requireApiKey } from "../../auth.js";
|
|
2
|
+
import { printInfo, printSuccess, printError, printWarning, printJson } from "../../output.js";
|
|
3
|
+
import { CliError } from "../../types.js";
|
|
4
|
+
import { apiRequest } from "../../client.js";
|
|
5
|
+
export function registerExecOpenaiCommand(judge) {
|
|
6
|
+
judge
|
|
7
|
+
.command("exec-openai <judgeIdInPath>")
|
|
8
|
+
.description("Execute a specific judge via the OpenAI compatible API")
|
|
9
|
+
.requiredOption("--model <model>", "LLM model for judge execution (e.g., gpt-4o)")
|
|
10
|
+
.requiredOption("--messages <json>", "JSON string of the messages payload")
|
|
11
|
+
.option("--extra-body <json>", "Optional JSON string for extra_body parameters")
|
|
12
|
+
.action(async (judgeIdInPath, opts) => {
|
|
13
|
+
const apiKey = await requireApiKey();
|
|
14
|
+
let messages;
|
|
15
|
+
try {
|
|
16
|
+
messages = JSON.parse(opts.messages);
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
printError("Invalid JSON for --messages. Aborting.");
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
const payload = { model: opts.model, messages };
|
|
23
|
+
if (opts.extraBody) {
|
|
24
|
+
try {
|
|
25
|
+
payload["extra_body"] = JSON.parse(opts.extraBody);
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
printWarning("Invalid JSON for --extra-body. Skipping.");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
printInfo(`Executing Judge ID (via path): ${judgeIdInPath} using OpenAI chat completions format.`);
|
|
32
|
+
printInfo("Attempting to execute with OpenAI compatible payload:");
|
|
33
|
+
printJson(payload);
|
|
34
|
+
try {
|
|
35
|
+
const result = await apiRequest("POST", `judges/${judgeIdInPath}/openai/chat/completions`, {
|
|
36
|
+
payload,
|
|
37
|
+
apiKey,
|
|
38
|
+
});
|
|
39
|
+
if (result) {
|
|
40
|
+
printSuccess("OpenAI compatible execution successful!");
|
|
41
|
+
printJson(result);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
if (e instanceof CliError)
|
|
46
|
+
throw e;
|
|
47
|
+
printError(e instanceof Error ? e.message : String(e));
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exec-openai.js","sourceRoot":"","sources":["../../../src/commands/judge/exec-openai.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,UAAU,yBAAyB,CAAC,KAAc;IACtD,KAAK;SACF,OAAO,CAAC,6BAA6B,CAAC;SACtC,WAAW,CAAC,wDAAwD,CAAC;SACrE,cAAc,CAAC,iBAAiB,EAAE,8CAA8C,CAAC;SACjF,cAAc,CAAC,mBAAmB,EAAE,qCAAqC,CAAC;SAC1E,MAAM,CAAC,qBAAqB,EAAE,gDAAgD,CAAC;SAC/E,MAAM,CAAC,KAAK,EAAE,aAAqB,EAAE,IAA6D,EAAE,EAAE;QACrG,MAAM,MAAM,GAAG,MAAM,aAAa,EAAE,CAAC;QAErC,IAAI,QAAiB,CAAC;QACtB,IAAI,CAAC;YACH,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC;QAAC,MAAM,CAAC;YACP,UAAU,CAAC,wCAAwC,CAAC,CAAC;YACrD,OAAO;QACT,CAAC;QAED,MAAM,OAAO,GAA4B,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,CAAC;QAEzE,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YACnB,IAAI,CAAC;gBACH,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACrD,CAAC;YAAC,MAAM,CAAC;gBACP,YAAY,CAAC,0CAA0C,CAAC,CAAC;YAC3D,CAAC;QACH,CAAC;QAED,SAAS,CAAC,kCAAkC,aAAa,wCAAwC,CAAC,CAAC;QACnG,SAAS,CAAC,uDAAuD,CAAC,CAAC;QACnE,SAAS,CAAC,OAAO,CAAC,CAAC;QAEnB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,MAAM,EAAE,UAAU,aAAa,0BAA0B,EAAE;gBACzF,OAAO;gBACP,MAAM;aACP,CAAC,CAAC;YACH,IAAI,MAAM,EAAE,CAAC;gBACX,YAAY,CAAC,yCAAyC,CAAC,CAAC;gBACxD,SAAS,CAAC,MAAM,CAAC,CAAC;YACpB,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,YAAY,QAAQ;gBAAE,MAAM,CAAC,CAAC;YACnC,UAAU,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
declare function readStdinDefault(): Promise<string>;
|
|
3
|
+
export declare function executeJudgeByName(judgeName: string, opts: {
|
|
4
|
+
request?: string;
|
|
5
|
+
response?: string;
|
|
6
|
+
contexts?: string;
|
|
7
|
+
expectedOutput?: string;
|
|
8
|
+
tag?: string[];
|
|
9
|
+
userId?: string;
|
|
10
|
+
sessionId?: string;
|
|
11
|
+
systemPrompt?: string;
|
|
12
|
+
}, readStdin?: typeof readStdinDefault): Promise<void>;
|
|
13
|
+
export declare function registerExecuteByNameCommand(judge: Command): void;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=execute-by-name.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-by-name.d.ts","sourceRoot":"","sources":["../../../src/commands/judge/execute-by-name.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,iBAAe,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAIjD;AAED,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE;IACJ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,EACD,SAAS,0BAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAyCf;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAyBjE"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { requireApiKey, getSdkClient } from "../../auth.js";
|
|
2
|
+
import { printInfo, printSuccess, printError, printJson } from "../../output.js";
|
|
3
|
+
import { CliError } from "../../types.js";
|
|
4
|
+
async function readStdinDefault() {
|
|
5
|
+
const chunks = [];
|
|
6
|
+
for await (const chunk of process.stdin)
|
|
7
|
+
chunks.push(chunk);
|
|
8
|
+
return Buffer.concat(chunks).toString().trim();
|
|
9
|
+
}
|
|
10
|
+
export async function executeJudgeByName(judgeName, opts, readStdin = readStdinDefault) {
|
|
11
|
+
const apiKey = await requireApiKey();
|
|
12
|
+
let response = opts.response;
|
|
13
|
+
if (!opts.request && !response && !process.stdin.isTTY) {
|
|
14
|
+
response = await readStdin();
|
|
15
|
+
}
|
|
16
|
+
if (!opts.request && !response) {
|
|
17
|
+
printError("Either --request or --response must be provided.");
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const payload = {};
|
|
21
|
+
if (opts.request)
|
|
22
|
+
payload["request"] = opts.request;
|
|
23
|
+
if (response)
|
|
24
|
+
payload["response"] = response;
|
|
25
|
+
if (opts.expectedOutput)
|
|
26
|
+
payload["expected_output"] = opts.expectedOutput;
|
|
27
|
+
if (opts.tag?.length)
|
|
28
|
+
payload["tags"] = opts.tag;
|
|
29
|
+
if (opts.userId)
|
|
30
|
+
payload["user_id"] = opts.userId;
|
|
31
|
+
if (opts.sessionId)
|
|
32
|
+
payload["session_id"] = opts.sessionId;
|
|
33
|
+
if (opts.systemPrompt)
|
|
34
|
+
payload["system_prompt"] = opts.systemPrompt;
|
|
35
|
+
if (opts.contexts) {
|
|
36
|
+
try {
|
|
37
|
+
payload["contexts"] = JSON.parse(opts.contexts);
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
printError("Invalid JSON for --contexts. Skipping.");
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
printInfo(`Attempting to execute judge '${judgeName}' with payload:`);
|
|
45
|
+
printJson(payload);
|
|
46
|
+
const client = getSdkClient(apiKey);
|
|
47
|
+
const result = await client.judges.executeByName(judgeName, payload);
|
|
48
|
+
printSuccess("Judge execution by name successful!");
|
|
49
|
+
printJson(result);
|
|
50
|
+
}
|
|
51
|
+
export function registerExecuteByNameCommand(judge) {
|
|
52
|
+
judge
|
|
53
|
+
.command("execute-by-name <judgeName>")
|
|
54
|
+
.description("Execute a judge by name with interaction details")
|
|
55
|
+
.option("--request <text>", "Request text")
|
|
56
|
+
.option("--response <text>", "Response text to evaluate")
|
|
57
|
+
.option("--contexts <json>", "JSON list of context strings. E.g., '[\"ctx1\"]'")
|
|
58
|
+
.option("--expected-output <text>", "Expected output text")
|
|
59
|
+
.option("--tag <tag>", "Add one or more tags", (v, a) => [...a, v], [])
|
|
60
|
+
.option("--user-id <id>", "User identifier for tracking purposes")
|
|
61
|
+
.option("--session-id <id>", "Session identifier for tracking purposes")
|
|
62
|
+
.option("--system-prompt <text>", "System prompt that was used for the LLM call")
|
|
63
|
+
.action(async (judgeName, opts) => {
|
|
64
|
+
try {
|
|
65
|
+
await executeJudgeByName(judgeName, opts);
|
|
66
|
+
}
|
|
67
|
+
catch (e) {
|
|
68
|
+
if (e instanceof CliError)
|
|
69
|
+
throw e;
|
|
70
|
+
printError(e instanceof Error ? e.message : String(e));
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute-by-name.js","sourceRoot":"","sources":["../../../src/commands/judge/execute-by-name.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,KAAK,UAAU,gBAAgB;IAC7B,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,OAAO,CAAC,KAAK;QAAE,MAAM,CAAC,IAAI,CAAC,KAAe,CAAC,CAAC;IACtE,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;AACjD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,SAAiB,EACjB,IASC,EACD,SAAS,GAAG,gBAAgB;IAE5B,MAAM,MAAM,GAAG,MAAM,aAAa,EAAE,CAAC;IAErC,IAAI,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC7B,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;Q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
import { Command } from "commander";
|
|
2
|
+
declare function readStdinDefault(): Promise<string>;
|
|
3
|
+
export declare function executeJudge(judgeId: string, opts: {
|
|
4
|
+
request?: string;
|
|
5
|
+
response?: string;
|
|
6
|
+
contexts?: string;
|
|
7
|
+
expectedOutput?: string;
|
|
8
|
+
tag?: string[];
|
|
9
|
+
userId?: string;
|
|
10
|
+
sessionId?: string;
|
|
11
|
+
systemPrompt?: string;
|
|
12
|
+
}, readStdin?: typeof readStdinDefault): Promise<void>;
|
|
13
|
+
export declare function registerExecuteCommand(judge: Command): void;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=execute.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../../src/commands/judge/execute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,iBAAe,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAIjD;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,EACf,IAAI,EAAE;IACJ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,EACD,SAAS,0BAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAsCf;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAyB3D"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { requireApiKey, getSdkClient } from "../../auth.js";
|
|
2
|
+
import { printInfo, printSuccess, printError, printJson } from "../../output.js";
|
|
3
|
+
import { CliError } from "../../types.js";
|
|
4
|
+
async function readStdinDefault() {
|
|
5
|
+
const chunks = [];
|
|
6
|
+
for await (const chunk of process.stdin)
|
|
7
|
+
chunks.push(chunk);
|
|
8
|
+
return Buffer.concat(chunks).toString().trim();
|
|
9
|
+
}
|
|
10
|
+
export async function executeJudge(judgeId, opts, readStdin = readStdinDefault) {
|
|
11
|
+
const apiKey = await requireApiKey();
|
|
12
|
+
let response = opts.response;
|
|
13
|
+
if (!opts.request && !response && !process.stdin.isTTY) {
|
|
14
|
+
response = await readStdin();
|
|
15
|
+
}
|
|
16
|
+
if (!opts.request && !response) {
|
|
17
|
+
printError("Either --request or --response must be provided.");
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const payload = {};
|
|
21
|
+
if (opts.request)
|
|
22
|
+
payload["request"] = opts.request;
|
|
23
|
+
if (response)
|
|
24
|
+
payload["response"] = response;
|
|
25
|
+
if (opts.expectedOutput)
|
|
26
|
+
payload["expected_output"] = opts.expectedOutput;
|
|
27
|
+
if (opts.tag?.length)
|
|
28
|
+
payload["tags"] = opts.tag;
|
|
29
|
+
if (opts.userId)
|
|
30
|
+
payload["user_id"] = opts.userId;
|
|
31
|
+
if (opts.sessionId)
|
|
32
|
+
payload["session_id"] = opts.sessionId;
|
|
33
|
+
if (opts.systemPrompt)
|
|
34
|
+
payload["system_prompt"] = opts.systemPrompt;
|
|
35
|
+
if (opts.contexts) {
|
|
36
|
+
try {
|
|
37
|
+
payload["contexts"] = JSON.parse(opts.contexts);
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
printError("Invalid JSON for --contexts. Skipping.");
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
printInfo(`Attempting to execute judge ${judgeId} with payload:`);
|
|
45
|
+
printJson(payload);
|
|
46
|
+
const client = getSdkClient(apiKey);
|
|
47
|
+
const result = await client.judges.execute(judgeId, payload);
|
|
48
|
+
printSuccess("Judge execution successful!");
|
|
49
|
+
printJson(result);
|
|
50
|
+
}
|
|
51
|
+
export function registerExecuteCommand(judge) {
|
|
52
|
+
judge
|
|
53
|
+
.command("execute <judgeId>")
|
|
54
|
+
.description("Execute a judge with interaction details")
|
|
55
|
+
.option("--request <text>", "Request text")
|
|
56
|
+
.option("--response <text>", "Response text to evaluate")
|
|
57
|
+
.option("--contexts <json>", "JSON list of context strings. E.g., '[\"ctx1\"]'")
|
|
58
|
+
.option("--expected-output <text>", "Expected output text")
|
|
59
|
+
.option("--tag <tag>", "Add one or more tags", (v, a) => [...a, v], [])
|
|
60
|
+
.option("--user-id <id>", "User identifier for tracking purposes")
|
|
61
|
+
.option("--session-id <id>", "Session identifier for tracking purposes")
|
|
62
|
+
.option("--system-prompt <text>", "System prompt that was used for the LLM call")
|
|
63
|
+
.action(async (judgeId, opts) => {
|
|
64
|
+
try {
|
|
65
|
+
await executeJudge(judgeId, opts);
|
|
66
|
+
}
|
|
67
|
+
catch (e) {
|
|
68
|
+
if (e instanceof CliError)
|
|
69
|
+
throw e;
|
|
70
|
+
printError(e instanceof Error ? e.message : String(e));
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execute.js","sourceRoot":"","sources":["../../../src/commands/judge/execute.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,KAAK,UAAU,gBAAgB;IAC7B,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,KAAK,EAAE,MAAM,KAAK,IAAI,OAAO,CAAC,KAAK;QAAE,MAAM,CAAC,IAAI,CAAC,KAAe,CAAC,CAAC;IACtE,OAAO,MAAM,CAAC,MAAM,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C;YACH,MAAM,YAAY,CAAC,OAAO,EAAE,IAA0C,CAAC,CAAC;QAC1E,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,YAAY,QAAQ;gBAAE,MAAM,CAAC,CAAC;YACnC,UAAU,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../src/commands/judge/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAkBvD"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { requireApiKey, getSdkClient } from "../../auth.js";
|
|
2
|
+
import { printInfo, printSuccess, printError, printJson } from "../../output.js";
|
|
3
|
+
import { CliError } from "../../types.js";
|
|
4
|
+
export function registerGetCommand(judge) {
|
|
5
|
+
judge
|
|
6
|
+
.command("get <judgeId>")
|
|
7
|
+
.description("Get a specific judge by its ID")
|
|
8
|
+
.action(async (judgeId) => {
|
|
9
|
+
const apiKey = await requireApiKey();
|
|
10
|
+
printInfo(`Fetching judge with ID: ${judgeId}...`);
|
|
11
|
+
try {
|
|
12
|
+
const client = getSdkClient(apiKey);
|
|
13
|
+
const result = await client.judges.get(judgeId);
|
|
14
|
+
printSuccess(`Judge '${result.name}' details:`);
|
|
15
|
+
printJson(result);
|
|
16
|
+
}
|
|
17
|
+
catch (e) {
|
|
18
|
+
if (e instanceof CliError)
|
|
19
|
+
throw e;
|
|
20
|
+
printError(e instanceof Error ? e.message : String(e));
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/commands/judge/get.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC/C,KAAK;SACF,OAAO,CAAC,eAAe,CAAC;SACxB,WAAW,CAAC,gCAAgC,CAAC;SAC7C,MAAM,CAAC,KAAK,EAAE,OAAe,EAAE,EAAE;QAChC,MAAM,MAAM,GAAG,MAAM,aAAa,EAAE,CAAC;QACrC,SAAS,CAAC,2BAA2B,OAAO,KAAK,CAAC,CAAC;QAEnD,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;YACpC,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAChD,YAAY,CAAC,UAAU,MAAM,CAAC,IAAI,YAAY,CAAC,CAAC;YAChD,SAAS,CAAC,MAAM,CAAC,CAAC;QACpB,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,CAAC,YAAY,QAAQ;gBAAE,MAAM,CAAC,CAAC;YACnC,UAAU,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/judge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAe5D"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { registerListCommand } from "./list.js";
|
|
3
|
+
import { registerGetCommand } from "./get.js";
|
|
4
|
+
import { registerCreateCommand } from "./create.js";
|
|
5
|
+
import { registerUpdateCommand } from "./update.js";
|
|
6
|
+
import { registerDeleteCommand } from "./delete.js";
|
|
7
|
+
import { registerExecuteCommand } from "./execute.js";
|
|
8
|
+
import { registerExecuteByNameCommand } from "./execute-by-name.js";
|
|
9
|
+
import { registerDuplicateCommand } from "./duplicate.js";
|
|
10
|
+
import { registerExecOpenaiCommand } from "./exec-openai.js";
|
|
11
|
+
import { registerExecOpenaiGenericCommand } from "./exec-openai-generic.js";
|
|
12
|
+
export function registerJudgeCommands(program) {
|
|
13
|
+
const judge = new Command("judge").description("Judge management commands");
|
|
14
|
+
registerListCommand(judge);
|
|
15
|
+
registerGetCommand(judge);
|
|
16
|
+
registerCreateCommand(judge);
|
|
17
|
+
registerUpdateCommand(judge);
|
|
18
|
+
registerDeleteCommand(judge);
|
|
19
|
+
registerExecuteCommand(judge);
|
|
20
|
+
registerExecuteByNameCommand(judge);
|
|
21
|
+
registerDuplicateCommand(judge);
|
|
22
|
+
registerExecOpenaiCommand(judge);
|
|
23
|
+
registerExecOpenaiGenericCommand(judge);
|
|
24
|
+
program.addCommand(judge);
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/judge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,gCAAgC,EAAE,MAAM,0BAA0B,CAAC;AAE5E,MAAM,UAAU,qBAAqB,CAAC,OAAgB;IACpD,MAAM,KAAK,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,2BAA2B,CAAC,CAAC;IAE5E,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAC3B,kBAAkB,CAAC,KAAK,CAAC,CAAC;IAC1B,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAC7B,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAC7B,qBAAqB,CAAC,KAAK,CAAC,CAAC;IAC7B,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAC9B,4BAA4B,CAAC,KAAK,CAAC,CAAC;IACpC,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAChC,yBAAyB,CAAC,KAAK,CAAC,CAAC;IACjC,gCAAgC,CAAC,KAAK,CAAC,CAAC;IAExC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../../src/commands/judge/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAuDxD"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { requireApiKey, getSdkClient } from "../../auth.js";
|
|
2
|
+
import { printInfo, printMessage, printError, printJudgeTable } from "../../output.js";
|
|
3
|
+
import { CliError } from "../../types.js";
|
|
4
|
+
export function registerListCommand(judge) {
|
|
5
|
+
judge
|
|
6
|
+
.command("list")
|
|
7
|
+
.description("List judges with optional filters")
|
|
8
|
+
.option("--page-size <number>", "Number of results to return per page", parseInt)
|
|
9
|
+
.option("--cursor <cursor>", "The pagination cursor value")
|
|
10
|
+
.option("--search <term>", "A search term to filter by")
|
|
11
|
+
.option("--name <name>", "Filter by exact judge name")
|
|
12
|
+
.option("--ordering <field>", "Which field to use for ordering the results")
|
|
13
|
+
.option("--is-preset", "Filter preset judges (true)")
|
|
14
|
+
.option("--not-is-preset", "Exclude preset judges (false)")
|
|
15
|
+
.option("--is-public", "Filter public judges (true)")
|
|
16
|
+
.option("--not-is-public", "Exclude public judges (false)")
|
|
17
|
+
.option("--show-global", "Include global judges (true)")
|
|
18
|
+
.option("--not-show-global", "Exclude global judges (false)")
|
|
19
|
+
.action(async (opts) => {
|
|
20
|
+
const apiKey = await requireApiKey();
|
|
21
|
+
const params = {};
|
|
22
|
+
if (opts["pageSize"] !== undefined)
|
|
23
|
+
params["page_size"] = opts["pageSize"];
|
|
24
|
+
if (opts["cursor"] !== undefined)
|
|
25
|
+
params["cursor"] = opts["cursor"];
|
|
26
|
+
if (opts["search"] !== undefined)
|
|
27
|
+
params["search"] = opts["search"];
|
|
28
|
+
if (opts["name"] !== undefined)
|
|
29
|
+
params["name"] = opts["name"];
|
|
30
|
+
if (opts["ordering"] !== undefined)
|
|
31
|
+
params["ordering"] = opts["ordering"];
|
|
32
|
+
const isPreset = opts["isPreset"] ? true : opts["notIsPreset"] ? false : undefined;
|
|
33
|
+
if (isPreset !== undefined)
|
|
34
|
+
params["is_preset"] = isPreset;
|
|
35
|
+
const isPublic = opts["isPublic"] ? true : opts["notIsPublic"] ? false : undefined;
|
|
36
|
+
if (isPublic !== undefined)
|
|
37
|
+
params["is_public"] = isPublic;
|
|
38
|
+
const showGlobal = opts["showGlobal"] ? true : opts["notShowGlobal"] ? false : undefined;
|
|
39
|
+
if (showGlobal !== undefined)
|
|
40
|
+
params["show_global"] = showGlobal;
|
|
41
|
+
const actual = Object.fromEntries(Object.entries(params).filter(([, v]) => v !== undefined));
|
|
42
|
+
printInfo(`Fetching judges with params: ${JSON.stringify(actual)}...`);
|
|
43
|
+
try {
|
|
44
|
+
const client = getSdkClient(apiKey);
|
|
45
|
+
const response = await client.judges.list(actual);
|
|
46
|
+
if (!response.results.length) {
|
|
47
|
+
printMessage("No judges found.");
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
printJudgeTable(response.results, response.next);
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
if (e instanceof CliError)
|
|
54
|
+
throw e;
|
|
55
|
+
printError(e instanceof Error ? e.message : String(e));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/judge/list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAChD,KAAK;SACF,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,mCAAmC,CAAC;SAChD,MAAM,CAAC,sBAAsB,EAAE,sCAAsC,EAAE,QAAQ,CAAC;SAChF,MAAM,CAAC,mBAAmB,EAAE,6BAA6B,CAAC;SAC1D,MAAM,CAAC,iBAAiB,EAAE,4BAA4B,CAAC;SACvD,MAAM,CAAC,eAAe,EAAE,4BAA4B,CAAC;SACrD,MAAM,CAAC,oBAAoB,EAAE,6CAA6C,CAAC;SAC3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CAAC;YACnC,UAAU,CAAC,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;QACzD,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../src/commands/judge/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAmD1D"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { requireApiKey, getSdkClient } from "../../auth.js";
|
|
2
|
+
import { printInfo, printSuccess, printError, printJson } from "../../output.js";
|
|
3
|
+
import { CliError } from "../../types.js";
|
|
4
|
+
export function registerUpdateCommand(judge) {
|
|
5
|
+
judge
|
|
6
|
+
.command("update <judgeId>")
|
|
7
|
+
.description("Update an existing judge (PATCH)")
|
|
8
|
+
.option("--name <name>", "The new name for the judge")
|
|
9
|
+
.option("--stage <stage>", "The new stage for the judge")
|
|
10
|
+
.option("--evaluator-references <json>", 'JSON string to update evaluator references. Use "[]" to clear.')
|
|
11
|
+
.action(async (judgeId, opts) => {
|
|
12
|
+
const apiKey = await requireApiKey();
|
|
13
|
+
const payload = {};
|
|
14
|
+
if (opts.name !== undefined)
|
|
15
|
+
payload.name = opts.name;
|
|
16
|
+
if (opts.stage !== undefined)
|
|
17
|
+
payload.stage = opts.stage;
|
|
18
|
+
if (opts.evaluatorReferences !== undefined) {
|
|
19
|
+
try {
|
|
20
|
+
payload.evaluator_references = JSON.parse(opts.evaluatorReferences);
|
|
21
|
+
}
|
|
22
|
+
catch {
|
|
23
|
+
printError("Invalid JSON format for --evaluator-references.");
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
if (Object.keys(payload).length === 0) {
|
|
28
|
+
printInfo("No update parameters provided. Aborting.");
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
printInfo(`Attempting to update judge ${judgeId} with PATCH payload:`);
|
|
32
|
+
printJson(payload);
|
|
33
|
+
try {
|
|
34
|
+
const client = getSdkClient(apiKey);
|
|
35
|
+
const result = await client.judges.update(judgeId, payload);
|
|
36
|
+
printSuccess(`Judge ${judgeId} updated successfully!`);
|
|
37
|
+
printJson(result);
|
|
38
|
+
}
|
|
39
|
+
catch (e) {
|
|
40
|
+
if (e instanceof CliError)
|
|
41
|
+
throw e;
|
|
42
|
+
printError(e instanceof Error ? e.message : String(e));
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update.js","sourceRoot":"","sources":["../../../src/commands/judge/update.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,MAAM,UAAU,qBAAqB,CAAC,KAAc;IAClD,KAAK;SACF,OAAO,CAAC,kBAAkB,CAAC;SAC3B,WAAW,CAAC,kCAAkC,CAAC;SAC/C,MAAM,CAAC,eAAe,EAAE,4BAA4B,CAAC;SACrD,MAAM,CAAC,iBAAiB,EAAE,6BAA6B,CAAC;SACxD,MAAM,CAAC,+BAA+B,EAAE,gEAAgE,CAAC;SACzG,MAAM,CAAC,KAAK,EAAE,OAAe,EAAE,IAAqE,EAAE,EAAE;QACvG,MAAM,MAAM,GAAG,MAAM,aAAa,EAAE,CAAC;QAErC,MAAM,OAAO,GAAoB,EAAE,CAAC;QACpC,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS;YAAE,OAAO,CAAC,IAAI,GAAG,IAAI,CA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test/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAGjE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import { registerInitCommand } from "./init.js";
|
|
3
|
+
import { registerRunCommand } from "./run.js";
|
|
4
|
+
function buildPtGroup(name) {
|
|
5
|
+
const pt = new Command(name).description("Prompt testing management commands");
|
|
6
|
+
registerInitCommand(pt);
|
|
7
|
+
registerRunCommand(pt);
|
|
8
|
+
return pt;
|
|
9
|
+
}
|
|
10
|
+
export function registerPromptTestCommands(program) {
|
|
11
|
+
program.addCommand(buildPtGroup("pt"));
|
|
12
|
+
program.addCommand(buildPtGroup("prompt-test"));
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/prompt-test/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE9C,SAAS,YAAY,CAAC,IAAY;IAChC,MAAM,EAAE,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,oCAAoC,CAAC,CAAC;IAC/E,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACxB,kBAAkB,CAAC,EAAE,CAAC,CAAC;IACvB,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,0BAA0B,CAAC,OAAgB;IACzD,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC;IACvC,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/commands/prompt-test/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqDpC,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,CA6BrD"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { writeFileSync, existsSync } from "node:fs";
|
|
2
|
+
import { printWarning, printSuccess, printInfo, printError } from "../../output.js";
|
|
3
|
+
const TEMPLATE = `# Prompt Testing Configuration
|
|
4
|
+
# This file defines a test suite of prompt and model combinations, with optional evaluators.
|
|
5
|
+
|
|
6
|
+
# List of prompt templates to test (use {{variable}} for input substitution)
|
|
7
|
+
prompts:
|
|
8
|
+
- "Extract user information from the following text: {{text}}"
|
|
9
|
+
- "Identify and extract the name, username, and email from: {{text}}"
|
|
10
|
+
|
|
11
|
+
# Input data for the prompt tests (each input will be tested with each prompt and model)
|
|
12
|
+
inputs:
|
|
13
|
+
- vars:
|
|
14
|
+
text: "John Doe, @johndoe, john@example.com"
|
|
15
|
+
- vars:
|
|
16
|
+
text: "Contact: Jane Smith (email: jane.smith@company.org, handle: @janesmith)"
|
|
17
|
+
|
|
18
|
+
# Alternative to inputs: Use a dataset by ID
|
|
19
|
+
# Uncomment the line below and comment out the inputs section to use a dataset instead
|
|
20
|
+
# dataset_id: "<uuid>"
|
|
21
|
+
|
|
22
|
+
# Models to test (each will be run with all prompt/input combinations)
|
|
23
|
+
models:
|
|
24
|
+
- "gemini-3-flash"
|
|
25
|
+
- "gpt-5-mini"
|
|
26
|
+
|
|
27
|
+
# Evaluators to assess the quality of responses
|
|
28
|
+
evaluators:
|
|
29
|
+
- name: "Precision"
|
|
30
|
+
- name: "Confidentiality"
|
|
31
|
+
|
|
32
|
+
# Optional: Response schema for structured output (JSON Schema format)
|
|
33
|
+
# Uncomment and modify the section below to enforce structured responses from the LLM
|
|
34
|
+
# response_schema:
|
|
35
|
+
# type: "object"
|
|
36
|
+
# required: ["name", "username", "email"]
|
|
37
|
+
# properties:
|
|
38
|
+
# name:
|
|
39
|
+
# type: "string"
|
|
40
|
+
# description: "The name of the user"
|
|
41
|
+
# email:
|
|
42
|
+
# type: "string"
|
|
43
|
+
# format: "email"
|
|
44
|
+
# description: "The email of the user"
|
|
45
|
+
# username:
|
|
46
|
+
# type: "string"
|
|
47
|
+
# pattern: "^@[a-zA-Z0-9_]+$"
|
|
48
|
+
# description: "The username of the user. Must start with @"
|
|
49
|
+
# additionalProperties: false
|
|
50
|
+
`;
|
|
51
|
+
export function registerInitCommand(pt) {
|
|
52
|
+
pt.command("init")
|
|
53
|
+
.description("Initializes a new prompt-tests.yaml file in the current directory")
|
|
54
|
+
.action(async () => {
|
|
55
|
+
const configPath = "prompt-tests.yaml";
|
|
56
|
+
if (existsSync(configPath)) {
|
|
57
|
+
printWarning(`'${configPath}' already exists in the current directory.`);
|
|
58
|
+
const { confirm } = await import("@inquirer/prompts");
|
|
59
|
+
const ok = await confirm({
|
|
60
|
+
message: "Do you want to overwrite it?",
|
|
61
|
+
default: false,
|
|
62
|
+
});
|
|
63
|
+
if (!ok) {
|
|
64
|
+
printInfo("Aborted.");
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
writeFileSync(configPath, TEMPLATE);
|
|
70
|
+
printSuccess(`'${configPath}' created successfully.`);
|
|
71
|
+
printInfo("Update the file with your prompt test details and run `pt run`.");
|
|
72
|
+
}
|
|
73
|
+
catch (e) {
|
|
74
|
+
printError(`Failed to write to '${configPath}': ${e instanceof Error ? e.message : String(e)}`);
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/commands/prompt-test/init.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,S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+
export declare function runPromptTests(outputFile: string | undefined, configPath: string, sleep?: (ms: number) => Promise<void>): Promise<void>;
|
|
3
|
+
export declare function registerRunCommand(pt: Command): void;
|
|
4
|
+
//# sourceMappingURL=run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/commands/prompt-test/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA0FpC,wBAAsB,cAAc,CAClC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,UAAU,EAAE,MAAM,EAClB,KAAK,GAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAiD,GACnF,OAAO,CAAC,IAAI,CAAC,CAmHf;AAED,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,OAAO,GAAG,IAAI,CAapD"}
|