@testchimp/cli 0.1.12 → 0.1.13
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/cli/program.js +16 -0
- package/dist/core/schemas.d.ts +3 -0
- package/dist/core/schemas.js +4 -0
- package/dist/core/tools.js +13 -0
- package/package.json +1 -1
package/dist/cli/program.js
CHANGED
|
@@ -557,6 +557,22 @@ export function buildCliProgram() {
|
|
|
557
557
|
const out = await runTool("list-screen-states", merged, { postMcp });
|
|
558
558
|
console.log(out);
|
|
559
559
|
});
|
|
560
|
+
program
|
|
561
|
+
.command("get-release")
|
|
562
|
+
.description(TOOL_DEFINITIONS.find((t) => t.kebab === "get-release").description)
|
|
563
|
+
.addOption(jsonInputOption())
|
|
564
|
+
.option("--version <version>", "Release version / label (McpGetReleaseRequest.version)")
|
|
565
|
+
.action(async (opts) => {
|
|
566
|
+
const body = {};
|
|
567
|
+
if (opts.version)
|
|
568
|
+
body.version = String(opts.version);
|
|
569
|
+
const merged = mergeBodies(body, opts.jsonInput);
|
|
570
|
+
if (!merged.version || String(merged.version).trim() === "") {
|
|
571
|
+
throw new Error("version is required (--version or --json-input {\"version\":\"...\"})");
|
|
572
|
+
}
|
|
573
|
+
const out = await runTool("get-release", { version: String(merged.version).trim() }, { postMcp });
|
|
574
|
+
console.log(out);
|
|
575
|
+
});
|
|
560
576
|
program
|
|
561
577
|
.command("upsert-screen-states")
|
|
562
578
|
.description(TOOL_DEFINITIONS.find((t) => t.kebab === "upsert-screen-states").description)
|
package/dist/core/schemas.d.ts
CHANGED
|
@@ -558,6 +558,9 @@ export declare const getBunnyshellWorkflowJobLogsInput: z.ZodObject<{
|
|
|
558
558
|
export declare const listScreenStatesInput: z.ZodObject<{
|
|
559
559
|
environment: z.ZodOptional<z.ZodString>;
|
|
560
560
|
}, z.core.$strip>;
|
|
561
|
+
export declare const getReleaseInput: z.ZodObject<{
|
|
562
|
+
version: z.ZodString;
|
|
563
|
+
}, z.core.$strip>;
|
|
561
564
|
/** UpsertScreenStatesRequest JSON (proto camelCase). */
|
|
562
565
|
export declare const upsertScreenStatesInput: z.ZodObject<{
|
|
563
566
|
screenStates: z.ZodArray<z.ZodObject<{
|
package/dist/core/schemas.js
CHANGED
|
@@ -235,6 +235,10 @@ export const getBunnyshellWorkflowJobLogsInput = z.object({
|
|
|
235
235
|
export const listScreenStatesInput = z.object({
|
|
236
236
|
environment: z.string().optional(),
|
|
237
237
|
});
|
|
238
|
+
export const getReleaseInput = z.object({
|
|
239
|
+
/** Release catalog version / label — maps to McpGetReleaseRequest.version */
|
|
240
|
+
version: z.string().min(1),
|
|
241
|
+
});
|
|
238
242
|
const screenStatesEntrySchema = z.object({
|
|
239
243
|
screen: z.string().optional(),
|
|
240
244
|
states: z.array(z.string()),
|
package/dist/core/tools.js
CHANGED
|
@@ -466,6 +466,19 @@ export const TOOL_DEFINITIONS = [
|
|
|
466
466
|
return postMcp("/api/mcp/list_screen_states", body);
|
|
467
467
|
},
|
|
468
468
|
},
|
|
469
|
+
{
|
|
470
|
+
kebab: "get-release",
|
|
471
|
+
description: "Fetch release catalog details for a version/label in the current project " +
|
|
472
|
+
"(McpGetReleaseRequest/Response: cut git SHA, prior release + SHA, focus areas, payload). " +
|
|
473
|
+
"Pass version (CLI: --version). Authenticated via project API key.",
|
|
474
|
+
inputSchema: S.getReleaseInput,
|
|
475
|
+
execute: async (args, { postMcp }) => {
|
|
476
|
+
const a = args;
|
|
477
|
+
// McpGetReleaseRequest — camelCase JSON field names per JsonFormat
|
|
478
|
+
const body = { version: a.version.trim() };
|
|
479
|
+
return postMcp("/api/mcp/get_release", body);
|
|
480
|
+
},
|
|
481
|
+
},
|
|
469
482
|
{
|
|
470
483
|
kebab: "upsert-screen-states",
|
|
471
484
|
description: "Merge screen names and state strings into the project's relational atlas (idempotent upsert). " +
|