qatools-cli 1.2.33 → 1.2.34
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/package.json +1 -1
- package/qatools.js +36 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qatools-cli",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.34",
|
|
4
4
|
"description": "CLI for QA Tools — requirements, epics, sprints, sessions, App Context sync, project agenda. The companion to qa-tools.com.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"release": "npm version patch --no-git-tag-version && npm publish",
|
package/qatools.js
CHANGED
|
@@ -1872,6 +1872,33 @@ program
|
|
|
1872
1872
|
process.exit(0);
|
|
1873
1873
|
});
|
|
1874
1874
|
|
|
1875
|
+
program
|
|
1876
|
+
.command("context-propose")
|
|
1877
|
+
.description("Propose the App Context from a JSON file (e.g. read from an existing repo). It counts only when a member approves it in the web app: Requirements → App Context")
|
|
1878
|
+
.requiredOption("-f, --file <path>", "JSON with App Context fields (shape: qatools context-template)")
|
|
1879
|
+
.option("--summary <text>", "What the proposal is based on")
|
|
1880
|
+
.option("--project <id>", "Target project ID (overrides default)")
|
|
1881
|
+
.option("-e, --email <email>", "Login email")
|
|
1882
|
+
.option("-p, --password <password>", "Login password")
|
|
1883
|
+
.action(async (options) => {
|
|
1884
|
+
await authenticate(options);
|
|
1885
|
+
const projectId = options.project || getCredentials()?.projectId;
|
|
1886
|
+
if (!projectId) { console.error("No project configured. Run: qatools setup, or pass --project <id>"); process.exit(1); }
|
|
1887
|
+
let context;
|
|
1888
|
+
try { context = JSON.parse(fs.readFileSync(options.file, "utf8")); }
|
|
1889
|
+
catch (e) { console.error(`Could not read ${options.file}: ${e.message}`); process.exit(1); }
|
|
1890
|
+
for (const k of ["id", "projectId", "name", "aiRules", "sections", "skills", "createdAt", "updatedAt"]) delete context[k];
|
|
1891
|
+
try {
|
|
1892
|
+
const { data } = await httpsCallable(functions, "proposeAppContext")({ projectId, context, summary: options.summary || "" });
|
|
1893
|
+
console.log(`Proposed App Context (${data.fields.join(", ")})${data.superseded ? ` — replaces ${data.superseded} earlier pending proposal(s)` : ""}.`);
|
|
1894
|
+
console.log("A project member approves or rejects it in qa-tools: Requirements → App Context.");
|
|
1895
|
+
} catch (e) {
|
|
1896
|
+
console.error("Failed:", e.message);
|
|
1897
|
+
process.exit(1);
|
|
1898
|
+
}
|
|
1899
|
+
process.exit(0);
|
|
1900
|
+
});
|
|
1901
|
+
|
|
1875
1902
|
program
|
|
1876
1903
|
.command("plan-reject")
|
|
1877
1904
|
.description("Reject (withdraw) a pending sprint-plan proposal — nothing gets planned. Approving is done in the web app only.")
|
|
@@ -4478,6 +4505,15 @@ const mcpTools = [
|
|
|
4478
4505
|
}, ["subject", "message"]),
|
|
4479
4506
|
run: async (a) => mcpCall("notifyUser", { projectId: a.projectId, to: "owner", subject: a.subject, message: a.message }),
|
|
4480
4507
|
},
|
|
4508
|
+
{
|
|
4509
|
+
name: "propose_app_context",
|
|
4510
|
+
description: "Propose the project's App Context (purpose, domainObjects, actors, stack, architecture, security, constraints, conventions, environments, integrations), e.g. read from an existing repo. Only what the code shows. It counts only when a member approves it in the web app; a newer proposal replaces a pending older one.",
|
|
4511
|
+
inputSchema: mcpSchema({
|
|
4512
|
+
context: { type: "object", description: "App Context fields, shape as qatools context-template (stack: [{layer, technology, version, notes}], conventions: [{area, rule}], environments: [{name, url, notes}], integrations: [{name, purpose}], domainObjects/actors/constraints: string arrays)" },
|
|
4513
|
+
summary: mcpStr("What the proposal is based on (files read)"),
|
|
4514
|
+
}, ["context"]),
|
|
4515
|
+
run: async (a) => mcpCall("proposeAppContext", { projectId: a.projectId, context: a.context, summary: a.summary || "" }),
|
|
4516
|
+
},
|
|
4481
4517
|
{
|
|
4482
4518
|
name: "reject_plan_proposal",
|
|
4483
4519
|
description: "Reject (withdraw) a pending sprint-plan proposal, e.g. one you created that is superseded. Nothing gets planned. There is no approve tool: approval is a human decision in the qa-tools web app.",
|