@nbakka/mcp-appium 2.0.94 → 2.0.96

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/lib/server.js +14 -13
  2. package/package.json +1 -1
package/lib/server.js CHANGED
@@ -801,7 +801,9 @@ tool(
801
801
  "review_testcases",
802
802
  "Open test cases in browser for manual approval.",
803
803
  {
804
- testCases: z.string().array().array().describe("test cases array generated by tool generate_testcases_from_ticket_data")
804
+ testCases: zod_1.z
805
+ .array(zod_1.z.array(zod_1.z.string()))
806
+ .describe("test cases array generated by tool generate_testcases_from_ticket_data")
805
807
  },
806
808
  async ({ testCases }) => {
807
809
  try {
@@ -870,7 +872,6 @@ tool(
870
872
  app.post(`/approve/${sessionId}`, (req, res) => {
871
873
  const session = approvalSessions.get(sessionId);
872
874
  if (session) {
873
- // overwrite authoritative copy with the submitted version
874
875
  session.testCases = req.body;
875
876
  session.finalTestCases = req.body;
876
877
  session.status = 'approved';
@@ -909,16 +910,17 @@ tool(
909
910
  }
910
911
  }, 300000);
911
912
 
912
- return {
913
- status: "review_started",
914
- sessionId,
915
- message: "Test case review interface opened.",
916
- testCasesCount: testCases.length,
917
- browserUrl: `http://localhost:${port}`,
918
- instructions: "Use check_approval_status tool to poll."
919
- };
913
+ // Return a simple string instead of an object
914
+ return `✅ Test case review interface opened successfully!
915
+ Session ID: ${sessionId}
916
+ Test Cases Count: ${testCases.length}
917
+ Browser URL: http://localhost:${port}
918
+ Status: review_started
919
+
920
+ Instructions: Use check_approval_status tool with session ID "${sessionId}" to poll for approval status.`;
921
+
920
922
  } catch (err) {
921
- return { status: "error", message: `Error setting up review interface: ${err.message}` };
923
+ return `❌ Error setting up review interface: ${err.message}`;
922
924
  }
923
925
  }
924
926
  );
@@ -927,7 +929,7 @@ tool(
927
929
  tool(
928
930
  "check_approval_status",
929
931
  "Check the approval status of test cases review session (short-circuits if already approved)",
930
- { sessionId: z.string().describe("Session ID from review_testcases") },
932
+ { sessionId: zod_1.z.string().describe("Session ID from review_testcases") },
931
933
  async ({ sessionId }) => {
932
934
  const session = approvalSessions.get(sessionId);
933
935
  if (!session) return `❌ Session not found. Invalid session ID: ${sessionId}`;
@@ -942,7 +944,6 @@ tool(
942
944
  return `✅ Test cases approved. Elapsed: ${elapsed}s\n${JSON.stringify(approvedTestCases, null, 2)}`;
943
945
  }
944
946
 
945
- // only wait if still pending
946
947
  await new Promise(r => setTimeout(r, 5000));
947
948
 
948
949
  const refreshed = approvalSessions.get(sessionId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nbakka/mcp-appium",
3
- "version": "2.0.94",
3
+ "version": "2.0.96",
4
4
  "description": "Appium MCP",
5
5
  "engines": {
6
6
  "node": ">=18"