qatools-cli 1.2.32 → 1.2.33

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/qatools.js +135 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qatools-cli",
3
- "version": "1.2.32",
3
+ "version": "1.2.33",
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
@@ -4657,6 +4657,141 @@ const mcpTools = [
4657
4657
  inputSchema: mcpSchema({ platform: mcpStr("azure, gcp, aws or firebase (default: from the App Context)", { enum: ["azure", "gcp", "aws", "firebase"] }) }),
4658
4658
  run: async (a) => (await mcpCall("getInfraPrompt", { projectId: a.projectId, platform: a.platform || "" })).prompt,
4659
4659
  },
4660
+ // ---- cli.mcp-parity: the CLI's project-data commands, through the same backend functions ----
4661
+ {
4662
+ name: "update_project",
4663
+ description: "Change the project's name or description (owner).",
4664
+ inputSchema: mcpSchema({ name: mcpStr("New name"), description: mcpStr("New description") }),
4665
+ run: async (a) => {
4666
+ const updates = mcpPick(a, ["name", "description"]);
4667
+ if (!Object.keys(updates).length) throw new McpToolError("Give name and/or description.");
4668
+ return mcpCall("updateProjectFields", { projectId: a.projectId, updates });
4669
+ },
4670
+ },
4671
+ {
4672
+ name: "add_member",
4673
+ description: "Add a member to the project by email; they get an invitation email. Owner only.",
4674
+ inputSchema: mcpSchema({ email: mcpStr("The member's email") }, ["email"]),
4675
+ run: async (a) => mcpCall("addProjectMember", { projectId: a.projectId, email: a.email }),
4676
+ },
4677
+ {
4678
+ name: "remove_member",
4679
+ description: "Remove a member from the project (the owner cannot be removed). Destructive: confirm with the user in this conversation before calling.",
4680
+ inputSchema: mcpSchema({ email: mcpStr("The member's email") }, ["email"]),
4681
+ run: async (a) => mcpCall("removeProjectMember", { projectId: a.projectId, email: a.email }),
4682
+ },
4683
+ {
4684
+ name: "delete_requirement",
4685
+ description: "Delete a requirement — only for junk (duplicate, created by mistake, wrong project). A requirement that was considered and turned out wrong is set to rejected or superseded with update_requirement instead. Refused while backlog items or tests reference its key unless force. Destructive: confirm with the user first.",
4686
+ inputSchema: mcpSchema({ requirementId: mcpStr("Requirement document id"), force: mcpBool("Delete even though items or tests reference it — re-point them first") }, ["requirementId"]),
4687
+ run: async (a) => mcpCall("deleteRequirement", { projectId: a.projectId, requirementId: a.requirementId, force: !!a.force }),
4688
+ },
4689
+ {
4690
+ name: "delete_epic",
4691
+ description: "Delete an epic by key. Refused while requirements belong to it. Destructive: confirm with the user first.",
4692
+ inputSchema: mcpSchema({ epicKey: mcpStr("Epic key") }, ["epicKey"]),
4693
+ run: async (a) => {
4694
+ const epic = ((await mcpCall("listEpics", { projectId: a.projectId })).epics || []).find(e => e.key === a.epicKey);
4695
+ if (!epic) throw new McpToolError(`Epic '${a.epicKey}' not found.`);
4696
+ return mcpCall("deleteEpic", { projectId: a.projectId, epicId: epic.id });
4697
+ },
4698
+ },
4699
+ {
4700
+ name: "requirement_coverage",
4701
+ description: "Per requirement: its manual test cases and automated test runs, and which ones verify it.",
4702
+ inputSchema: mcpSchema(),
4703
+ run: async (a) => mcpCall("requirementCoverage", { projectId: a.projectId }),
4704
+ },
4705
+ {
4706
+ name: "list_requirement_keys",
4707
+ description: "Every requirement key in use in the project's test protocols and backlog, with where it is used.",
4708
+ inputSchema: mcpSchema(),
4709
+ run: async (a) => mcpCall("listRequirementKeys", { projectId: a.projectId }),
4710
+ },
4711
+ {
4712
+ name: "reject_template",
4713
+ description: "Reject a test protocol (version) with a reason; it can no longer be started as a session.",
4714
+ inputSchema: mcpSchema({ templateId: mcpStr("Test protocol id"), reason: mcpStr("Why — at least a few words") }, ["templateId", "reason"]),
4715
+ run: async (a) => mcpCall("rejectTemplate", { projectId: a.projectId, templateId: a.templateId, reason: a.reason }),
4716
+ },
4717
+ {
4718
+ name: "upload_test_report",
4719
+ description: "Upload test results from a JUnit XML or JSON file on this computer as evidence on requirements (tests tagged with a requirementKey or [req:<key>]). Commit and branch come from git or CI.",
4720
+ inputSchema: mcpSchema({ file: mcpStr("Path to the results file"), format: mcpStr("junit or json (default: from the file extension)", { enum: ["junit", "json"] }) }, ["file"]),
4721
+ run: async (a) => {
4722
+ const filePath = path.resolve(a.file);
4723
+ if (!fs.existsSync(filePath)) throw new McpToolError(`File not found: ${filePath}`);
4724
+ const text = fs.readFileSync(filePath, "utf-8");
4725
+ const format = a.format || (/\.json$/i.test(filePath) ? "json" : "junit");
4726
+ const results = format === "json" ? parseTestJson(JSON.parse(text)) : parseJUnit(text);
4727
+ if (!results.length) throw new McpToolError("No test results found in the file.");
4728
+ return mcpCall("uploadTestRun", { projectId: a.projectId, run: ciRunMeta({}), results });
4729
+ },
4730
+ },
4731
+ {
4732
+ name: "find_duplicates",
4733
+ description: "Find backlog items that look like duplicates of each other (uses the project's Anthropic key on the server).",
4734
+ inputSchema: mcpSchema(),
4735
+ run: async (a) => mcpCall("findDuplicates", { projectId: a.projectId }),
4736
+ },
4737
+ {
4738
+ name: "import_security_scan",
4739
+ description: "Import a SARIF file from a security scanner on this computer; each finding becomes a technical defect (DEF) linked to the project, duplicates skipped.",
4740
+ inputSchema: mcpSchema({ file: mcpStr("Path to the SARIF file"), source: mcpStr("Scanner name, e.g. codeql") }, ["file"]),
4741
+ run: async (a) => {
4742
+ const filePath = path.resolve(a.file);
4743
+ if (!fs.existsSync(filePath)) throw new McpToolError(`File not found: ${filePath}`);
4744
+ return mcpCall("importSecurityScan", { projectId: a.projectId, sarif: JSON.parse(fs.readFileSync(filePath, "utf-8")), source: a.source || "" });
4745
+ },
4746
+ },
4747
+ {
4748
+ name: "set_app_context",
4749
+ description: "Replace the project's App Context. Read it with get_app_context first, change what the user asked for, and send the whole object back — fields left out are lost. Show the change to the user before saving.",
4750
+ inputSchema: mcpSchema({ context: { type: "object", description: "The whole App Context", additionalProperties: true } }, ["context"]),
4751
+ run: async (a) => mcpCall("saveAppContext", { projectId: a.projectId, context: a.context }),
4752
+ },
4753
+ {
4754
+ name: "get_access_model",
4755
+ description: "The project's access model: roles and what each may do.",
4756
+ inputSchema: mcpSchema(),
4757
+ run: async (a) => mcpCall("getAccessModel", { projectId: a.projectId }),
4758
+ },
4759
+ {
4760
+ name: "set_access_model",
4761
+ description: "Replace the project's access model (roles and permissions). Read it with get_access_model first and show the change to the user before saving.",
4762
+ inputSchema: mcpSchema({ model: { type: "object", description: "The whole access model", additionalProperties: true } }, ["model"]),
4763
+ run: async (a) => mcpCall("saveAccessModel", { projectId: a.projectId, model: a.model }),
4764
+ },
4765
+ {
4766
+ name: "decline_feature_request",
4767
+ description: "Decline a request from the app's users with a reason the app shows them. A member's decision: refused for Claude's API key — use the member's own login, or ask the user to decline it.",
4768
+ inputSchema: mcpSchema({ id: mcpStr("The request's id in the app (externalId)"), reason: mcpStr("Why — shown to the app's users") }, ["id", "reason"]),
4769
+ run: async (a) => mcpCall("decideFeatureRequest", { projectId: a.projectId, externalId: a.id, action: "decline", reason: a.reason }),
4770
+ },
4771
+ {
4772
+ name: "list_skill_library",
4773
+ description: "The shared skill library: skills that can be added to a project's App Context.",
4774
+ inputSchema: mcpSchema(),
4775
+ run: async () => mcpCall("listSkillLibrary", {}),
4776
+ },
4777
+ {
4778
+ name: "get_library_skill",
4779
+ description: "Read one skill from the shared skill library.",
4780
+ inputSchema: mcpSchema({ name: mcpStr("Skill name") }, ["name"]),
4781
+ run: async (a) => mcpCall("getLibrarySkill", { name: a.name }),
4782
+ },
4783
+ {
4784
+ name: "save_library_skill",
4785
+ description: "Add or update a skill in the shared skill library (superadmin).",
4786
+ inputSchema: mcpSchema({ name: mcpStr("Skill name (file name without .md)"), title: mcpStr("Title"), description: mcpStr("One line about it"), content: mcpStr("The skill's markdown") }, ["name", "title", "content"]),
4787
+ run: async (a) => mcpCall("saveLibrarySkill", { name: a.name, title: a.title, description: a.description || "", content: a.content }),
4788
+ },
4789
+ {
4790
+ name: "delete_library_skill",
4791
+ description: "Remove a skill from the shared skill library (superadmin). Destructive: confirm with the user first.",
4792
+ inputSchema: mcpSchema({ name: mcpStr("Skill name") }, ["name"]),
4793
+ run: async (a) => mcpCall("deleteLibrarySkill", { name: a.name }),
4794
+ },
4660
4795
  {
4661
4796
  name: "baseline_prompt",
4662
4797
  description: "Procedure for reconstructing requirements for what is already built (requirements.baseline-from-code), with the project's language, its epics and all existing requirements. Use when code exists that qa-tools has no requirements for.",