@testchimp/cli 0.1.1 → 0.1.2

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.
@@ -95,6 +95,22 @@ export function buildCliProgram() {
95
95
  const out = await runTool("get-execution-history", merged, { postMcp });
96
96
  console.log(out);
97
97
  });
98
+ program
99
+ .command("fetch-execution-report")
100
+ .description(TOOL_DEFINITIONS.find((t) => t.kebab === "fetch-execution-report").description)
101
+ .addOption(jsonInputOption())
102
+ .option("--batch-invocation-id <id>")
103
+ .option("--job-id <id>")
104
+ .action(async (opts) => {
105
+ const body = {};
106
+ if (opts.batchInvocationId)
107
+ body.batchInvocationId = String(opts.batchInvocationId);
108
+ if (opts.jobId)
109
+ body.jobId = String(opts.jobId);
110
+ const merged = mergeBodies(body, opts.jsonInput);
111
+ const out = await runTool("fetch-execution-report", merged, { postMcp });
112
+ console.log(out);
113
+ });
98
114
  program
99
115
  .command("create-user-story")
100
116
  .description(TOOL_DEFINITIONS.find((t) => t.kebab === "create-user-story").description)
@@ -23,6 +23,10 @@ export declare const listExecutionInput: z.ZodObject<{
23
23
  }, z.core.$strip>>;
24
24
  branchName: z.ZodOptional<z.ZodString>;
25
25
  }, z.core.$strip>;
26
+ export declare const fetchExecutionReportInput: z.ZodObject<{
27
+ batchInvocationId: z.ZodOptional<z.ZodString>;
28
+ jobId: z.ZodOptional<z.ZodString>;
29
+ }, z.core.$strip>;
26
30
  export declare const createUserStoryInput: z.ZodObject<{
27
31
  platformFilePath: z.ZodString;
28
32
  title: z.ZodString;
@@ -19,6 +19,21 @@ export const listExecutionInput = z.object({
19
19
  scope: scopeSchema,
20
20
  branchName: z.string().optional(),
21
21
  });
22
+ export const fetchExecutionReportInput = z
23
+ .object({
24
+ batchInvocationId: z.string().optional(),
25
+ jobId: z.string().optional(),
26
+ })
27
+ .superRefine((v, ctx) => {
28
+ const batch = (v.batchInvocationId ?? "").trim();
29
+ const job = (v.jobId ?? "").trim();
30
+ if ((batch === "" && job === "") || (batch !== "" && job !== "")) {
31
+ ctx.addIssue({
32
+ code: z.ZodIssueCode.custom,
33
+ message: "Provide exactly one of batchInvocationId or jobId",
34
+ });
35
+ }
36
+ });
22
37
  export const createUserStoryInput = z.object({
23
38
  platformFilePath: z.string().min(1),
24
39
  title: z.string().min(1),
@@ -51,6 +51,21 @@ export const TOOL_DEFINITIONS = [
51
51
  return json;
52
52
  },
53
53
  },
54
+ {
55
+ kebab: "fetch-execution-report",
56
+ description: "Fetch a detailed execution report for failing SmartTests, given a batchInvocationId (batch run) or jobId (single run). " +
57
+ "Returns only failing tests and includes error details and a trace viewer URL when available.",
58
+ inputSchema: S.fetchExecutionReportInput,
59
+ execute: async (args, { postMcp }) => {
60
+ const a = args;
61
+ const body = {};
62
+ if (a.batchInvocationId != null && a.batchInvocationId.trim() !== "")
63
+ body.batchInvocationId = a.batchInvocationId.trim();
64
+ if (a.jobId != null && a.jobId.trim() !== "")
65
+ body.jobId = a.jobId.trim();
66
+ return postMcp("/api/mcp/fetch_execution_report", body);
67
+ },
68
+ },
54
69
  {
55
70
  kebab: "create-user-story",
56
71
  description: "Create a user story on the TestChimp project and its plan file stub. " +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testchimp/cli",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "TestChimp CLI and MCP server — coverage, plans, EaaS, TrueCoverage (calls /api/mcp/*)",
5
5
  "type": "module",
6
6
  "main": "dist/bin/testchimp.js",