@qcentriq/mcp 0.4.5 → 0.4.6

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/dist/index.js +8 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1062,7 +1062,7 @@ function registerLocalRunTool(server, client, passingRuns) {
1062
1062
  server.registerTool(
1063
1063
  "qcentriq_run_local_test",
1064
1064
  {
1065
- description: "Execute a downloaded Playwright/pytest test script locally in the developer's environment. Runs pytest as a local subprocess (in qcentriq_tests/ it first refreshes the conftest.py QCentriq cloud runs use) and returns stdout, stderr, exit code, and test diagnostics without using QCentriq cloud runners. A script must pass here, as a whole file (no test_name or other test filters), before qcentriq_save_group_script will upload it.",
1065
+ description: "Execute a downloaded Playwright/pytest test script locally in the developer's environment. Runs pytest as a local subprocess (in qcentriq_tests/ or any folder below it, it first refreshes the conftest.py QCentriq cloud runs use) and returns stdout, stderr, exit code, and test diagnostics without using QCentriq cloud runners. A script must pass here, as a whole file (no test_name or other test filters), before qcentriq_save_group_script will upload it.",
1066
1066
  inputSchema: z13.object({
1067
1067
  file_path: z13.string().describe("Path to the local test file to run (e.g. 'tests/test_login.py')."),
1068
1068
  test_name: z13.string().optional().describe("Optional specific test function name or expression to run (passed to pytest -k)."),
@@ -1079,7 +1079,7 @@ function registerLocalRunTool(server, client, passingRuns) {
1079
1079
  async (args) => {
1080
1080
  try {
1081
1081
  const scriptPath = path5.resolve(args.working_dir ?? process.cwd(), args.file_path.split("::")[0]);
1082
- const ownDir = path5.basename(path5.dirname(scriptPath)) === path5.basename(DEFAULT_SCRIPT_DIR) ? path5.dirname(scriptPath) : null;
1082
+ const ownDir = qcentriqDirAbove(path5.dirname(scriptPath));
1083
1083
  if (ownDir) await refreshConftest(client, ownDir);
1084
1084
  const content = await fs4.readFile(scriptPath, "utf-8").catch(() => null);
1085
1085
  const startedAt = Date.now();
@@ -1120,6 +1120,12 @@ function registerLocalRunTool(server, client, passingRuns) {
1120
1120
  }
1121
1121
  );
1122
1122
  }
1123
+ function qcentriqDirAbove(dir) {
1124
+ for (let d = dir; ; d = path5.dirname(d)) {
1125
+ if (path5.basename(d) === path5.basename(DEFAULT_SCRIPT_DIR)) return d;
1126
+ if (path5.dirname(d) === d) return null;
1127
+ }
1128
+ }
1123
1129
  async function refreshConftest(client, dir) {
1124
1130
  try {
1125
1131
  const { content } = await client.request("/conftest");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qcentriq/mcp",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "Official Model Context Protocol (MCP) server for QCentriq automated test discovery, diagnostics, and execution.",
5
5
  "type": "module",
6
6
  "bin": {