@testchimp/cli 0.1.11 → 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.
@@ -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)
@@ -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<{
@@ -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()),
@@ -125,9 +125,11 @@ export const TOOL_DEFINITIONS = [
125
125
  },
126
126
  {
127
127
  kebab: "create-user-story",
128
- description: "Create a user story on the TestChimp project and its plan file stub. " +
129
- "Always call this before writing a new story markdown file; use the returned ordinalId as US-<ordinalId> in frontmatter. " +
130
- "platformFilePath must be under plans/stories/ and end with .md.",
128
+ description: "Create a user story on the TestChimp project and allocate a real US-<ordinalId>. " +
129
+ "Response includes content: canonical stub markdown already containing id: US-<ordinalId>. " +
130
+ "BLOCKING workflow: call this FIRST → Write the returned content to the repo plans/stories path " +
131
+ "(edit body as needed but keep id:) → call update-user-story with the full markdown. " +
132
+ "Never write story markdown that omits id. platformFilePath must be under plans/stories/ and end with .md.",
131
133
  inputSchema: S.createUserStoryInput,
132
134
  execute: async (args, { postMcp }) => {
133
135
  const a = args;
@@ -139,7 +141,12 @@ export const TOOL_DEFINITIONS = [
139
141
  },
140
142
  {
141
143
  kebab: "create-test-scenario",
142
- description: "Create a test scenario linked to a user story. platformFilePath must be under plans/scenarios/ and end with .md. " +
144
+ description: "Create a test scenario linked to a user story and allocate a real TS-<ordinalId>. " +
145
+ "Response includes content: canonical stub markdown already containing id: TS-<ordinalId> and story: US-<n>. " +
146
+ "BLOCKING workflow: call this FIRST → Write the returned content to the repo plans/scenarios path " +
147
+ "(edit body as needed but keep id: and story:) → call update-test-scenario with the full markdown. " +
148
+ "Never write scenario markdown that omits id. update-test-scenario rejects missing id/story with a clear error. " +
149
+ "platformFilePath must be under plans/scenarios/ and end with .md. " +
143
150
  "userStoryOrdinalId is the numeric part of the parent US-<n> id.",
144
151
  inputSchema: S.createTestScenarioInput,
145
152
  execute: async (args, { postMcp }) => {
@@ -154,8 +161,8 @@ export const TOOL_DEFINITIONS = [
154
161
  {
155
162
  kebab: "update-user-story",
156
163
  description: "Sync a user story markdown file to the platform after local edits. " +
157
- "Parses frontmatter (id: US-..., title, priority) and updates the linked support file and entity. " +
158
- "Implementation status is not stored in markdown; use mark-plan-items-implementation-done.",
164
+ "Requires frontmatter id: US-<n> (platform-issued). Missing id returns an error telling you to call create-user-story first. " +
165
+ "Parses frontmatter (id, title, priority) and updates the linked support file and entity.",
159
166
  inputSchema: S.updatePlanMarkdownInput,
160
167
  execute: async (args, { postMcp }) => {
161
168
  const a = args;
@@ -165,8 +172,8 @@ export const TOOL_DEFINITIONS = [
165
172
  {
166
173
  kebab: "update-test-scenario",
167
174
  description: "Sync a test scenario markdown file to the platform after local edits. " +
168
- "Parses frontmatter (id: TS-..., story: US-..., title, priority) and updates linking if story changes. " +
169
- "Implementation status is not stored in markdown; use mark-plan-items-implementation-done.",
175
+ "Requires frontmatter id: TS-<n> and story: US-<n>. Missing either returns an error telling you to call create-test-scenario first. " +
176
+ "Parses frontmatter and updates linking if story changes.",
170
177
  inputSchema: S.updatePlanMarkdownInput,
171
178
  execute: async (args, { postMcp }) => {
172
179
  const a = args;
@@ -459,6 +466,19 @@ export const TOOL_DEFINITIONS = [
459
466
  return postMcp("/api/mcp/list_screen_states", body);
460
467
  },
461
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
+ },
462
482
  {
463
483
  kebab: "upsert-screen-states",
464
484
  description: "Merge screen names and state strings into the project's relational atlas (idempotent upsert). " +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testchimp/cli",
3
- "version": "0.1.11",
3
+ "version": "0.1.13",
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",