@testchimp/cli 0.1.4 → 0.1.5
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 +24 -0
- package/dist/core/schemas.d.ts +4 -0
- package/dist/core/schemas.js +4 -0
- package/dist/core/tools.js +22 -3
- package/package.json +1 -1
package/dist/cli/program.js
CHANGED
|
@@ -157,6 +157,30 @@ export function buildCliProgram() {
|
|
|
157
157
|
const out = await runTool("update-user-story", merged, { postMcp });
|
|
158
158
|
console.log(out);
|
|
159
159
|
});
|
|
160
|
+
program
|
|
161
|
+
.command("mark-plan-items-implementation-done")
|
|
162
|
+
.description(TOOL_DEFINITIONS.find((t) => t.kebab === "mark-plan-items-implementation-done").description)
|
|
163
|
+
.addOption(jsonInputOption())
|
|
164
|
+
.option("--scenario-ordinal-ids <csv>", "comma-separated TS-<n> numeric ids")
|
|
165
|
+
.option("--user-story-ordinal-ids <csv>", "comma-separated US-<n> numeric ids")
|
|
166
|
+
.action(async (opts) => {
|
|
167
|
+
const body = {};
|
|
168
|
+
if (opts.scenarioOrdinalIds) {
|
|
169
|
+
body.scenarioOrdinalIds = String(opts.scenarioOrdinalIds)
|
|
170
|
+
.split(",")
|
|
171
|
+
.map((s) => Number(s.trim()))
|
|
172
|
+
.filter((n) => Number.isFinite(n) && n > 0);
|
|
173
|
+
}
|
|
174
|
+
if (opts.userStoryOrdinalIds) {
|
|
175
|
+
body.userStoryOrdinalIds = String(opts.userStoryOrdinalIds)
|
|
176
|
+
.split(",")
|
|
177
|
+
.map((s) => Number(s.trim()))
|
|
178
|
+
.filter((n) => Number.isFinite(n) && n > 0);
|
|
179
|
+
}
|
|
180
|
+
const merged = mergeBodies(body, opts.jsonInput);
|
|
181
|
+
const out = await runTool("mark-plan-items-implementation-done", merged, { postMcp });
|
|
182
|
+
console.log(out);
|
|
183
|
+
});
|
|
160
184
|
program
|
|
161
185
|
.command("update-test-scenario")
|
|
162
186
|
.description(TOOL_DEFINITIONS.find((t) => t.kebab === "update-test-scenario").description)
|
package/dist/core/schemas.d.ts
CHANGED
|
@@ -39,6 +39,10 @@ export declare const createTestScenarioInput: z.ZodObject<{
|
|
|
39
39
|
export declare const updatePlanMarkdownInput: z.ZodObject<{
|
|
40
40
|
content: z.ZodString;
|
|
41
41
|
}, z.core.$strip>;
|
|
42
|
+
export declare const markPlanItemsImplementationDoneInput: z.ZodObject<{
|
|
43
|
+
scenarioOrdinalIds: z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>;
|
|
44
|
+
userStoryOrdinalIds: z.ZodOptional<z.ZodArray<z.ZodCoercedNumber<unknown>>>;
|
|
45
|
+
}, z.core.$strip>;
|
|
42
46
|
export declare const emptyInput: z.ZodObject<{}, z.core.$strip>;
|
|
43
47
|
export declare const getBranchSpecificEndpointConfigInput: z.ZodObject<{
|
|
44
48
|
branchName: z.ZodOptional<z.ZodString>;
|
package/dist/core/schemas.js
CHANGED
|
@@ -46,6 +46,10 @@ export const createTestScenarioInput = z.object({
|
|
|
46
46
|
export const updatePlanMarkdownInput = z.object({
|
|
47
47
|
content: z.string().min(1),
|
|
48
48
|
});
|
|
49
|
+
export const markPlanItemsImplementationDoneInput = z.object({
|
|
50
|
+
scenarioOrdinalIds: z.array(z.coerce.number().int().positive()).optional(),
|
|
51
|
+
userStoryOrdinalIds: z.array(z.coerce.number().int().positive()).optional(),
|
|
52
|
+
});
|
|
49
53
|
export const emptyInput = z.object({});
|
|
50
54
|
export const getBranchSpecificEndpointConfigInput = z.object({
|
|
51
55
|
branchName: z.string().optional(),
|
package/dist/core/tools.js
CHANGED
|
@@ -34,7 +34,9 @@ export const TOOL_DEFINITIONS = [
|
|
|
34
34
|
{
|
|
35
35
|
kebab: "get-requirement-coverage",
|
|
36
36
|
description: "Fetch requirement (scenario) coverage under an optional platform-rooted folder scope (tests/... or plans/...). " +
|
|
37
|
-
"Use
|
|
37
|
+
"Use scope.filePaths or scope.folderPath (platform tests/plans roots). Omit branchName for cross-branch coverage " +
|
|
38
|
+
"(aggregates branch copies; execution jobs deduped by stable hash of tests-root-relative path + test name). " +
|
|
39
|
+
"Pass branchName only when results must be limited to one Git branch.",
|
|
38
40
|
inputSchema: S.listCoverageInput,
|
|
39
41
|
execute: async (args, { postMcp }) => {
|
|
40
42
|
const json = await postMcp("/api/mcp/list_requirement_coverage", listCoverageBody(args));
|
|
@@ -97,7 +99,8 @@ export const TOOL_DEFINITIONS = [
|
|
|
97
99
|
{
|
|
98
100
|
kebab: "update-user-story",
|
|
99
101
|
description: "Sync a user story markdown file to the platform after local edits. " +
|
|
100
|
-
"Parses frontmatter (id: US-..., title, priority
|
|
102
|
+
"Parses frontmatter (id: US-..., title, priority) and updates the linked support file and entity. " +
|
|
103
|
+
"Implementation status is not stored in markdown; use mark-plan-items-implementation-done.",
|
|
101
104
|
inputSchema: S.updatePlanMarkdownInput,
|
|
102
105
|
execute: async (args, { postMcp }) => {
|
|
103
106
|
const a = args;
|
|
@@ -107,13 +110,29 @@ export const TOOL_DEFINITIONS = [
|
|
|
107
110
|
{
|
|
108
111
|
kebab: "update-test-scenario",
|
|
109
112
|
description: "Sync a test scenario markdown file to the platform after local edits. " +
|
|
110
|
-
"Parses frontmatter (id: TS-..., story: US-..., title, priority
|
|
113
|
+
"Parses frontmatter (id: TS-..., story: US-..., title, priority) and updates linking if story changes. " +
|
|
114
|
+
"Implementation status is not stored in markdown; use mark-plan-items-implementation-done.",
|
|
111
115
|
inputSchema: S.updatePlanMarkdownInput,
|
|
112
116
|
execute: async (args, { postMcp }) => {
|
|
113
117
|
const a = args;
|
|
114
118
|
return postMcp("/api/mcp/update_test_scenario", { content: a.content });
|
|
115
119
|
},
|
|
116
120
|
},
|
|
121
|
+
{
|
|
122
|
+
kebab: "mark-plan-items-implementation-done",
|
|
123
|
+
description: "Mark user stories and/or test scenarios implementation-complete in platform lifecycle (DB only; does not rewrite plan markdown). " +
|
|
124
|
+
"Use scenarioOrdinalIds / userStoryOrdinalIds (numeric parts of TS-<n> / US-<n>).",
|
|
125
|
+
inputSchema: S.markPlanItemsImplementationDoneInput,
|
|
126
|
+
execute: async (args, { postMcp }) => {
|
|
127
|
+
const a = args;
|
|
128
|
+
const body = {};
|
|
129
|
+
if (a.scenarioOrdinalIds?.length)
|
|
130
|
+
body.scenarioOrdinalIds = a.scenarioOrdinalIds;
|
|
131
|
+
if (a.userStoryOrdinalIds?.length)
|
|
132
|
+
body.userStoryOrdinalIds = a.userStoryOrdinalIds;
|
|
133
|
+
return postMcp("/api/mcp/mark_plan_items_implementation_done", body);
|
|
134
|
+
},
|
|
135
|
+
},
|
|
117
136
|
{
|
|
118
137
|
kebab: "get-eaas-config",
|
|
119
138
|
description: "Return the project's BunnyShell (Environment-as-a-Service) settings. Secrets are never returned.",
|