@testchimp/cli 0.1.15 → 0.1.16

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.
@@ -269,6 +269,53 @@ export function buildCliProgram() {
269
269
  const out = await runTool("get-manual-session-details", merged, { postMcp });
270
270
  console.log(out);
271
271
  });
272
+ program
273
+ .command("get-issue-details")
274
+ .description(TOOL_DEFINITIONS.find((t) => t.kebab === "get-issue-details").description)
275
+ .addOption(jsonInputOption())
276
+ .option("--issue-id <id>", "Issue ordinal id (#B-123, B-123, B123, or 123)")
277
+ .action(async (opts) => {
278
+ const body = {};
279
+ if (opts.issueId)
280
+ body.issueId = String(opts.issueId).trim();
281
+ const merged = mergeBodies(body, opts.jsonInput);
282
+ if (!merged.issueId || String(merged.issueId).trim() === "") {
283
+ throw new Error("issueId is required (--issue-id)");
284
+ }
285
+ const out = await runTool("get-issue-details", { issueId: String(merged.issueId).trim() }, { postMcp });
286
+ console.log(out);
287
+ });
288
+ program
289
+ .command("update-issue-status")
290
+ .description(TOOL_DEFINITIONS.find((t) => t.kebab === "update-issue-status").description)
291
+ .addOption(jsonInputOption())
292
+ .option("--issue-id <id>", "Issue ordinal id (#B-123, B-123, B123, or 123)")
293
+ .option("--status <status>", "ACTIVE | IGNORED | FIXED | DUPLICATE | IN_PROGRESS_BUG | ARCHIVED_BUG | BLOCKED")
294
+ .option("--ignore-reason <reason>", "When status=IGNORED: INTENDED_BEHAVIOUR | INACCURATE_ASSESSMENT | NOT_IMPORTANT")
295
+ .action(async (opts) => {
296
+ const body = {};
297
+ if (opts.issueId)
298
+ body.issueId = String(opts.issueId).trim();
299
+ if (opts.status)
300
+ body.status = String(opts.status).trim();
301
+ if (opts.ignoreReason)
302
+ body.ignoreReason = String(opts.ignoreReason).trim();
303
+ const merged = mergeBodies(body, opts.jsonInput);
304
+ if (!merged.issueId || String(merged.issueId).trim() === "") {
305
+ throw new Error("issueId is required (--issue-id)");
306
+ }
307
+ if (!merged.status || String(merged.status).trim() === "") {
308
+ throw new Error("status is required (ACTIVE | IGNORED | FIXED | DUPLICATE | IN_PROGRESS_BUG | ARCHIVED_BUG | BLOCKED)");
309
+ }
310
+ const out = await runTool("update-issue-status", {
311
+ issueId: String(merged.issueId).trim(),
312
+ status: String(merged.status).trim(),
313
+ ...(merged.ignoreReason
314
+ ? { ignoreReason: String(merged.ignoreReason).trim() }
315
+ : {}),
316
+ }, { postMcp });
317
+ console.log(out);
318
+ });
272
319
  program
273
320
  .command("mark-plan-items-implementation-done")
274
321
  .description(TOOL_DEFINITIONS.find((t) => t.kebab === "mark-plan-items-implementation-done").description)
@@ -79,6 +79,26 @@ export declare const getTestScenariosInput: z.ZodObject<{
79
79
  export declare const getManualSessionDetailsInput: z.ZodObject<{
80
80
  manualSessionId: z.ZodString;
81
81
  }, z.core.$strip>;
82
+ export declare const getIssueDetailsInput: z.ZodObject<{
83
+ issueId: z.ZodString;
84
+ }, z.core.$strip>;
85
+ export declare const updateIssueStatusInput: z.ZodObject<{
86
+ issueId: z.ZodString;
87
+ status: z.ZodEnum<{
88
+ ACTIVE: "ACTIVE";
89
+ IGNORED: "IGNORED";
90
+ FIXED: "FIXED";
91
+ DUPLICATE: "DUPLICATE";
92
+ IN_PROGRESS_BUG: "IN_PROGRESS_BUG";
93
+ ARCHIVED_BUG: "ARCHIVED_BUG";
94
+ BLOCKED: "BLOCKED";
95
+ }>;
96
+ ignoreReason: z.ZodOptional<z.ZodEnum<{
97
+ INTENDED_BEHAVIOUR: "INTENDED_BEHAVIOUR";
98
+ INACCURATE_ASSESSMENT: "INACCURATE_ASSESSMENT";
99
+ NOT_IMPORTANT: "NOT_IMPORTANT";
100
+ }>>;
101
+ }, z.core.$strip>;
82
102
  export declare const emptyInput: z.ZodObject<{}, z.core.$strip>;
83
103
  export declare const getBranchSpecificEndpointConfigInput: z.ZodObject<{
84
104
  branchName: z.ZodOptional<z.ZodString>;
@@ -80,6 +80,25 @@ export const getTestScenariosInput = z
80
80
  export const getManualSessionDetailsInput = z.object({
81
81
  manualSessionId: z.string().min(1),
82
82
  });
83
+ export const getIssueDetailsInput = z.object({
84
+ /** Accepts #B-123, B-123, #B123, B123, or plain 123 */
85
+ issueId: z.string().min(1),
86
+ });
87
+ export const updateIssueStatusInput = z.object({
88
+ issueId: z.string().min(1),
89
+ status: z.enum([
90
+ "ACTIVE",
91
+ "IGNORED",
92
+ "FIXED",
93
+ "DUPLICATE",
94
+ "IN_PROGRESS_BUG",
95
+ "ARCHIVED_BUG",
96
+ "BLOCKED",
97
+ ]),
98
+ ignoreReason: z
99
+ .enum(["INTENDED_BEHAVIOUR", "INACCURATE_ASSESSMENT", "NOT_IMPORTANT"])
100
+ .optional(),
101
+ });
83
102
  export const emptyInput = z.object({});
84
103
  export const getBranchSpecificEndpointConfigInput = z.object({
85
104
  branchName: z.string().optional(),
@@ -219,6 +219,37 @@ export const TOOL_DEFINITIONS = [
219
219
  });
220
220
  },
221
221
  },
222
+ {
223
+ kebab: "get-issue-details",
224
+ description: "Fetch a TestChimp issue (bug) by ordinal id. Accepts flexible issueId formats: " +
225
+ "#B-123, B-123, #B123, B123, or plain 123. Returns title, description, status, linked entities, " +
226
+ "artifact references, and short-lived signed URLs for GCS attachments/screenshots.",
227
+ inputSchema: S.getIssueDetailsInput,
228
+ execute: async (args, { postMcp }) => {
229
+ const a = args;
230
+ return postMcp("/api/mcp/get_issue_details", {
231
+ issueId: a.issueId.trim(),
232
+ });
233
+ },
234
+ },
235
+ {
236
+ kebab: "update-issue-status",
237
+ description: "Update a TestChimp issue status by ordinal id (same flexible issueId formats as get-issue-details). " +
238
+ "status must be one of: ACTIVE, IGNORED, FIXED, DUPLICATE, IN_PROGRESS_BUG, ARCHIVED_BUG, BLOCKED. " +
239
+ "For /testchimp fix issue: set IN_PROGRESS_BUG after applying a code fix; set FIXED only after user confirmation / commits pushed. " +
240
+ "Optional ignoreReason when status is IGNORED: INTENDED_BEHAVIOUR | INACCURATE_ASSESSMENT | NOT_IMPORTANT.",
241
+ inputSchema: S.updateIssueStatusInput,
242
+ execute: async (args, { postMcp }) => {
243
+ const a = args;
244
+ const body = {
245
+ issueId: a.issueId.trim(),
246
+ status: a.status,
247
+ };
248
+ if (a.ignoreReason)
249
+ body.ignoreReason = a.ignoreReason;
250
+ return postMcp("/api/mcp/update_issue_status", body);
251
+ },
252
+ },
222
253
  {
223
254
  kebab: "mark-plan-items-implementation-done",
224
255
  description: "Mark user stories and/or test scenarios implementation-complete in platform lifecycle (DB only; does not rewrite plan markdown). " +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testchimp/cli",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
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",