Skip to content

Commit 5977b3a

Browse files
Merge pull request #210 from manoj-k04/PMAA-20-Update-MCP-SDK
Chore : update dependencies and improve error handling
2 parents 70bc953 + f8318f3 commit 5977b3a

24 files changed

+870
-1257
lines changed

package-lock.json

Lines changed: 777 additions & 1153 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -35,31 +35,31 @@
3535
"author": "",
3636
"license": "ISC",
3737
"dependencies": {
38-
"@modelcontextprotocol/sdk": "^1.18.1",
38+
"@modelcontextprotocol/sdk": "^1.25.1",
3939
"@types/form-data": "^2.5.2",
40-
"axios": "^1.8.4",
41-
"browserstack-local": "^1.5.6",
42-
"csv-parse": "^5.6.0",
43-
"dotenv": "^16.5.0",
44-
"form-data": "^4.0.2",
45-
"pino": "^9.6.0",
46-
"pino-pretty": "^13.0.0",
47-
"sharp": "^0.34.1",
48-
"uuid": "^11.1.0",
49-
"webdriverio": "^9.13.0",
50-
"zod": "^3.24.3"
40+
"axios": "^1.13.2",
41+
"browserstack-local": "^1.5.8",
42+
"csv-parse": "^6.1.0",
43+
"dotenv": "^17.2.3",
44+
"form-data": "^4.0.5",
45+
"pino": "^10.1.0",
46+
"pino-pretty": "^13.1.3",
47+
"sharp": "^0.34.5",
48+
"uuid": "^13.0.0",
49+
"webdriverio": "^9.21.0",
50+
"zod": "^4.2.1"
5151
},
5252
"devDependencies": {
53-
"@eslint/js": "^9.25.0",
54-
"@types/csv-parse": "^1.1.12",
55-
"@types/node": "^22.14.1",
56-
"@types/uuid": "^10.0.0",
57-
"eslint": "^9.25.0",
58-
"prettier": "^3.5.3",
59-
"tsx": "^4.19.3",
60-
"typescript": "^5.8.3",
61-
"typescript-eslint": "^8.30.1",
62-
"vite": "^6.3.5",
63-
"vitest": "^3.1.3"
53+
"@eslint/js": "^9.39.2",
54+
"@types/csv-parse": "^1.2.5",
55+
"@types/node": "^25.0.3",
56+
"@types/uuid": "^11.0.0",
57+
"eslint": "^9.39.2",
58+
"prettier": "^3.7.4",
59+
"tsx": "^4.21.0",
60+
"typescript": "^5.9.3",
61+
"typescript-eslint": "^8.50.0",
62+
"vite": "^7.3.0",
63+
"vitest": "^4.0.16"
6464
}
6565
}

src/tools/accessibility.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,15 @@ function setupAuth(config: BrowserStackConfig): AuthCredentials {
5050
return { username, password };
5151
}
5252

53-
function createErrorResponse(message: string, isError = true): CallToolResult {
53+
function createErrorResponse(message: string): CallToolResult {
5454
return {
5555
content: [
5656
{
5757
type: "text",
5858
text: message,
59-
isError,
6059
},
6160
],
62-
isError,
61+
isError: true,
6362
};
6463
}
6564

src/tools/appautomate-utils/appium-sdk/formatter.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ ${formattedInstructions}`;
1717
{
1818
type: "text",
1919
text: fullInstructions,
20-
isError: false,
2120
},
2221
],
2322
};

src/tools/appautomate-utils/appium-sdk/handler.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ export async function setupAppAutomateHandler(
124124
{
125125
type: "text",
126126
text: formatAppInstructionsWithNumbers(combinedInstructions),
127-
isError: false,
128127
},
129128
],
130129
isError: false,

src/tools/appautomate.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ async function takeAppScreenshot(args: {
154154
type: "image",
155155
data: compressed,
156156
mimeType: "image/png",
157-
name: `screenshot-${selectedDevice.device}-${Date.now()}`,
158157
},
159158
],
160159
};
@@ -422,7 +421,6 @@ export default function addAppAutomationTools(
422421
{
423422
type: "text",
424423
text: `Failed to bootstrap project with BrowserStack App Automate SDK. Error: ${error_message}. Please open an issue on GitHub if the problem persists`,
425-
isError: true,
426424
},
427425
],
428426
isError: true,

src/tools/applive.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ export default function addAppLiveTools(
128128
{
129129
type: "text",
130130
text: `Failed to start app live session: ${error instanceof Error ? error.message : String(error)}`,
131-
isError: true,
132131
},
133132
],
134133
isError: true,

src/tools/automate.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@ export async function fetchAutomationScreenshotsTool(
3636

3737
const results = screenshots.map((screenshot, index) => ({
3838
type: "image" as const,
39-
text: `Screenshot ${index + 1}`,
4039
data: screenshot.base64,
4140
mimeType: "image/png",
42-
metadata: { url: screenshot.url },
41+
_meta: { url: screenshot.url, index: index + 1 },
4342
}));
4443

4544
return {

src/tools/get-failure-logs.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ export async function getFailureLogs(
8989
{
9090
type: "text",
9191
text: `No valid log types found for ${args.sessionType} session.\nErrors encountered:\n${errors.join("\n")}`,
92-
isError: true,
9392
},
9493
],
94+
isError: true,
9595
};
9696
}
9797
let response;
@@ -156,7 +156,6 @@ export async function getFailureLogs(
156156
results.push({
157157
type: "text",
158158
text: `Errors encountered:\n${errors.join("\n")}`,
159-
isError: true,
160159
});
161160
}
162161

@@ -226,7 +225,6 @@ export default function registerGetFailureLogs(
226225
text: `Failed to fetch failure logs: ${
227226
error instanceof Error ? error.message : "Unknown error"
228227
}`,
229-
isError: true,
230228
},
231229
],
232230
isError: true,

src/tools/live.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ export default function addBrowserLiveTools(
150150
{
151151
type: "text" as const,
152152
text: `Failed to start a browser live session. Error: ${error}`,
153-
isError: true,
154153
},
155154
],
156155
isError: true,

0 commit comments

Comments
 (0)