@browserstack/mcp-server 1.2.8 → 1.2.9-beta.1

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 (38) hide show
  1. package/README.md +0 -10
  2. package/dist/lib/utils.d.ts +38 -16
  3. package/dist/tools/accessibility.js +2 -3
  4. package/dist/tools/appautomate-utils/appium-sdk/constants.d.ts +13 -23
  5. package/dist/tools/appautomate-utils/appium-sdk/formatter.js +0 -1
  6. package/dist/tools/appautomate-utils/appium-sdk/handler.js +0 -1
  7. package/dist/tools/appautomate-utils/native-execution/constants.d.ts +11 -21
  8. package/dist/tools/appautomate.js +0 -2
  9. package/dist/tools/applive.js +0 -1
  10. package/dist/tools/automate.js +1 -2
  11. package/dist/tools/get-failure-logs.js +1 -3
  12. package/dist/tools/live.js +0 -1
  13. package/dist/tools/observability.js +0 -1
  14. package/dist/tools/rca-agent-utils/constants.d.ts +2 -2
  15. package/dist/tools/sdk-utils/common/schema.d.ts +40 -90
  16. package/dist/tools/sdk-utils/handler.js +1 -1
  17. package/dist/tools/testmanagement-utils/TCG-utils/types.d.ts +1 -9
  18. package/dist/tools/testmanagement-utils/add-test-result.d.ts +2 -24
  19. package/dist/tools/testmanagement-utils/create-lca-steps.d.ts +4 -72
  20. package/dist/tools/testmanagement-utils/create-lca-steps.js +0 -1
  21. package/dist/tools/testmanagement-utils/create-project-folder.d.ts +1 -15
  22. package/dist/tools/testmanagement-utils/create-testcase.d.ts +5 -55
  23. package/dist/tools/testmanagement-utils/create-testcase.js +0 -1
  24. package/dist/tools/testmanagement-utils/create-testrun.d.ts +14 -63
  25. package/dist/tools/testmanagement-utils/list-testcases.d.ts +1 -13
  26. package/dist/tools/testmanagement-utils/list-testcases.js +0 -1
  27. package/dist/tools/testmanagement-utils/list-testruns.d.ts +1 -7
  28. package/dist/tools/testmanagement-utils/list-testruns.js +0 -1
  29. package/dist/tools/testmanagement-utils/testcase-from-file.js +0 -1
  30. package/dist/tools/testmanagement-utils/update-testcase.d.ts +29 -0
  31. package/dist/tools/testmanagement-utils/update-testcase.js +138 -0
  32. package/dist/tools/testmanagement-utils/update-testrun.d.ts +10 -23
  33. package/dist/tools/testmanagement-utils/update-testrun.js +0 -1
  34. package/dist/tools/testmanagement-utils/upload-file.d.ts +1 -7
  35. package/dist/tools/testmanagement-utils/upload-file.js +0 -2
  36. package/dist/tools/testmanagement.d.ts +5 -0
  37. package/dist/tools/testmanagement.js +24 -10
  38. package/package.json +24 -24
package/README.md CHANGED
@@ -288,20 +288,10 @@ Select the “Installed” tab. Click the “Configure MCP Servers” button at
288
288
  }
289
289
  ```
290
290
 
291
- ### Installing via Smithery
292
-
293
- To install BrowserStack Test Platform Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@browserstack/mcp-server):
294
-
295
- ```bash
296
- npx -y @smithery/cli install @browserstack/mcp-server --client claude
297
- ```
298
-
299
-
300
291
  ### 💡 List of BrowserStack MCP Tools
301
292
 
302
293
  As of now we support 20 tools.
303
294
 
304
-
305
295
  ---
306
296
 
307
297
  ## 🧾 Test Management
@@ -8,71 +8,93 @@ export declare function fetchFromBrowserStackAPI(url: string, config: BrowserSta
8
8
  export declare function handleMCPError(toolName: string, server: McpServer, config: BrowserStackConfig, error: unknown): {
9
9
  [x: string]: unknown;
10
10
  content: ({
11
- [x: string]: unknown;
12
11
  type: "text";
13
12
  text: string;
13
+ annotations?: {
14
+ audience?: ("user" | "assistant")[] | undefined;
15
+ priority?: number | undefined;
16
+ lastModified?: string | undefined;
17
+ } | undefined;
14
18
  _meta?: {
15
19
  [x: string]: unknown;
16
20
  } | undefined;
17
21
  } | {
18
- [x: string]: unknown;
19
22
  type: "image";
20
23
  data: string;
21
24
  mimeType: string;
25
+ annotations?: {
26
+ audience?: ("user" | "assistant")[] | undefined;
27
+ priority?: number | undefined;
28
+ lastModified?: string | undefined;
29
+ } | undefined;
22
30
  _meta?: {
23
31
  [x: string]: unknown;
24
32
  } | undefined;
25
33
  } | {
26
- [x: string]: unknown;
27
34
  type: "audio";
28
35
  data: string;
29
36
  mimeType: string;
37
+ annotations?: {
38
+ audience?: ("user" | "assistant")[] | undefined;
39
+ priority?: number | undefined;
40
+ lastModified?: string | undefined;
41
+ } | undefined;
30
42
  _meta?: {
31
43
  [x: string]: unknown;
32
44
  } | undefined;
33
45
  } | {
34
- [x: string]: unknown;
35
- type: "resource_link";
36
- name: string;
37
46
  uri: string;
47
+ name: string;
48
+ type: "resource_link";
49
+ description?: string | undefined;
50
+ mimeType?: string | undefined;
51
+ annotations?: {
52
+ audience?: ("user" | "assistant")[] | undefined;
53
+ priority?: number | undefined;
54
+ lastModified?: string | undefined;
55
+ } | undefined;
38
56
  _meta?: {
39
57
  [x: string]: unknown;
40
58
  } | undefined;
41
- mimeType?: string | undefined;
42
- title?: string | undefined;
43
- description?: string | undefined;
44
59
  icons?: {
45
- [x: string]: unknown;
46
60
  src: string;
47
61
  mimeType?: string | undefined;
48
62
  sizes?: string[] | undefined;
63
+ theme?: "light" | "dark" | undefined;
49
64
  }[] | undefined;
65
+ title?: string | undefined;
50
66
  } | {
51
- [x: string]: unknown;
52
67
  type: "resource";
53
68
  resource: {
54
- [x: string]: unknown;
55
- text: string;
56
69
  uri: string;
70
+ text: string;
71
+ mimeType?: string | undefined;
57
72
  _meta?: {
58
73
  [x: string]: unknown;
59
74
  } | undefined;
60
- mimeType?: string | undefined;
61
75
  } | {
62
- [x: string]: unknown;
63
76
  uri: string;
64
77
  blob: string;
78
+ mimeType?: string | undefined;
65
79
  _meta?: {
66
80
  [x: string]: unknown;
67
81
  } | undefined;
68
- mimeType?: string | undefined;
69
82
  };
83
+ annotations?: {
84
+ audience?: ("user" | "assistant")[] | undefined;
85
+ priority?: number | undefined;
86
+ lastModified?: string | undefined;
87
+ } | undefined;
70
88
  _meta?: {
71
89
  [x: string]: unknown;
72
90
  } | undefined;
73
91
  })[];
74
92
  _meta?: {
75
93
  [x: string]: unknown;
94
+ progressToken?: string | number | undefined;
95
+ "io.modelcontextprotocol/related-task"?: {
96
+ taskId: string;
97
+ } | undefined;
76
98
  } | undefined;
77
99
  structuredContent?: {
78
100
  [x: string]: unknown;
@@ -12,16 +12,15 @@ function setupAuth(config) {
12
12
  const [username, password] = authString.split(":");
13
13
  return { username, password };
14
14
  }
15
- function createErrorResponse(message, isError = true) {
15
+ function createErrorResponse(message) {
16
16
  return {
17
17
  content: [
18
18
  {
19
19
  type: "text",
20
20
  text: message,
21
- isError,
22
21
  },
23
22
  ],
24
- isError,
23
+ isError: true,
25
24
  };
26
25
  }
27
26
  function createSuccessResponse(messages) {
@@ -13,36 +13,26 @@ export declare const APP_DEVICE_CONFIGS: {
13
13
  export declare const STEP_DELIMITER = "---STEP---";
14
14
  export declare const DEFAULT_APP_PATH = "bs://sample.app";
15
15
  export declare const MobileDeviceSchema: z.ZodObject<{
16
- platform: z.ZodEnum<["android", "ios"]>;
16
+ platform: z.ZodEnum<{
17
+ android: "android";
18
+ ios: "ios";
19
+ }>;
17
20
  deviceName: z.ZodString;
18
21
  osVersion: z.ZodString;
19
- }, "strip", z.ZodTypeAny, {
20
- platform: "android" | "ios";
21
- deviceName: string;
22
- osVersion: string;
23
- }, {
24
- platform: "android" | "ios";
25
- deviceName: string;
26
- osVersion: string;
27
- }>;
22
+ }, z.core.$strip>;
28
23
  export declare const SETUP_APP_AUTOMATE_DESCRIPTION = "Set up BrowserStack App Automate SDK integration for Appium-based mobile app testing. ONLY for Appium based framework . This tool configures SDK for various languages with appium. For pre-built Espresso or XCUITest test suites, use 'runAppTestsOnBrowserStack' instead.";
29
24
  export declare const SETUP_APP_AUTOMATE_SCHEMA: {
30
- detectedFramework: z.ZodNativeEnum<typeof AppSDKSupportedFrameworkEnum>;
31
- detectedTestingFramework: z.ZodNativeEnum<typeof AppSDKSupportedTestingFrameworkEnum>;
32
- detectedLanguage: z.ZodNativeEnum<typeof AppSDKSupportedLanguageEnum>;
25
+ detectedFramework: z.ZodEnum<typeof AppSDKSupportedFrameworkEnum>;
26
+ detectedTestingFramework: z.ZodEnum<typeof AppSDKSupportedTestingFrameworkEnum>;
27
+ detectedLanguage: z.ZodEnum<typeof AppSDKSupportedLanguageEnum>;
33
28
  devices: z.ZodDefault<z.ZodArray<z.ZodObject<{
34
- platform: z.ZodEnum<["android", "ios"]>;
29
+ platform: z.ZodEnum<{
30
+ android: "android";
31
+ ios: "ios";
32
+ }>;
35
33
  deviceName: z.ZodString;
36
34
  osVersion: z.ZodString;
37
- }, "strip", z.ZodTypeAny, {
38
- platform: "android" | "ios";
39
- deviceName: string;
40
- osVersion: string;
41
- }, {
42
- platform: "android" | "ios";
43
- deviceName: string;
44
- osVersion: string;
45
- }>, "many">>;
35
+ }, z.core.$strip>>>;
46
36
  appPath: z.ZodString;
47
37
  project: z.ZodDefault<z.ZodOptional<z.ZodString>>;
48
38
  };
@@ -12,7 +12,6 @@ ${formattedInstructions}`;
12
12
  {
13
13
  type: "text",
14
14
  text: fullInstructions,
15
- isError: false,
16
15
  },
17
16
  ],
18
17
  };
@@ -62,7 +62,6 @@ export async function setupAppAutomateHandler(rawInput, config) {
62
62
  {
63
63
  type: "text",
64
64
  text: formatAppInstructionsWithNumbers(combinedInstructions),
65
- isError: false,
66
65
  },
67
66
  ],
68
67
  isError: false,
@@ -2,34 +2,24 @@ import { z } from "zod";
2
2
  import { AppTestPlatform } from "./types.js";
3
3
  export declare const RUN_APP_AUTOMATE_DESCRIPTION = "Execute pre-built native mobile test suites (Espresso for Android, XCUITest for iOS) by direct upload to BrowserStack. ONLY for compiled .apk/.ipa test files. This is NOT for SDK integration or Appium tests. For Appium-based testing with SDK setup, use 'setupBrowserStackAppAutomateTests' instead.";
4
4
  export declare const MobileDeviceSchema: z.ZodObject<{
5
- platform: z.ZodEnum<["android", "ios"]>;
5
+ platform: z.ZodEnum<{
6
+ android: "android";
7
+ ios: "ios";
8
+ }>;
6
9
  deviceName: z.ZodString;
7
10
  osVersion: z.ZodString;
8
- }, "strip", z.ZodTypeAny, {
9
- platform: "android" | "ios";
10
- deviceName: string;
11
- osVersion: string;
12
- }, {
13
- platform: "android" | "ios";
14
- deviceName: string;
15
- osVersion: string;
16
- }>;
11
+ }, z.core.$strip>;
17
12
  export declare const RUN_APP_AUTOMATE_SCHEMA: {
18
13
  appPath: z.ZodString;
19
14
  testSuitePath: z.ZodString;
20
15
  devices: z.ZodDefault<z.ZodArray<z.ZodObject<{
21
- platform: z.ZodEnum<["android", "ios"]>;
16
+ platform: z.ZodEnum<{
17
+ android: "android";
18
+ ios: "ios";
19
+ }>;
22
20
  deviceName: z.ZodString;
23
21
  osVersion: z.ZodString;
24
- }, "strip", z.ZodTypeAny, {
25
- platform: "android" | "ios";
26
- deviceName: string;
27
- osVersion: string;
28
- }, {
29
- platform: "android" | "ios";
30
- deviceName: string;
31
- osVersion: string;
32
- }>, "many">>;
22
+ }, z.core.$strip>>>;
33
23
  project: z.ZodDefault<z.ZodOptional<z.ZodString>>;
34
- detectedAutomationFramework: z.ZodNativeEnum<typeof AppTestPlatform>;
24
+ detectedAutomationFramework: z.ZodEnum<typeof AppTestPlatform>;
35
25
  };
@@ -81,7 +81,6 @@ async function takeAppScreenshot(args) {
81
81
  type: "image",
82
82
  data: compressed,
83
83
  mimeType: "image/png",
84
- name: `screenshot-${selectedDevice.device}-${Date.now()}`,
85
84
  },
86
85
  ],
87
86
  };
@@ -257,7 +256,6 @@ export default function addAppAutomationTools(server, config) {
257
256
  {
258
257
  type: "text",
259
258
  text: `Failed to bootstrap project with BrowserStack App Automate SDK. Error: ${error_message}. Please open an issue on GitHub if the problem persists`,
260
- isError: true,
261
259
  },
262
260
  ],
263
261
  isError: true,
@@ -80,7 +80,6 @@ export default function addAppLiveTools(server, config) {
80
80
  {
81
81
  type: "text",
82
82
  text: `Failed to start app live session: ${error instanceof Error ? error.message : String(error)}`,
83
- isError: true,
84
83
  },
85
84
  ],
86
85
  isError: true,
@@ -20,10 +20,9 @@ export async function fetchAutomationScreenshotsTool(args, config) {
20
20
  }
21
21
  const results = screenshots.map((screenshot, index) => ({
22
22
  type: "image",
23
- text: `Screenshot ${index + 1}`,
24
23
  data: screenshot.base64,
25
24
  mimeType: "image/png",
26
- metadata: { url: screenshot.url },
25
+ _meta: { url: screenshot.url, index: index + 1 },
27
26
  }));
28
27
  return {
29
28
  content: [
@@ -41,9 +41,9 @@ export async function getFailureLogs(args, config) {
41
41
  {
42
42
  type: "text",
43
43
  text: `No valid log types found for ${args.sessionType} session.\nErrors encountered:\n${errors.join("\n")}`,
44
- isError: true,
45
44
  },
46
45
  ],
46
+ isError: true,
47
47
  };
48
48
  }
49
49
  let response;
@@ -91,7 +91,6 @@ export async function getFailureLogs(args, config) {
91
91
  results.push({
92
92
  type: "text",
93
93
  text: `Errors encountered:\n${errors.join("\n")}`,
94
- isError: true,
95
94
  });
96
95
  }
97
96
  return { content: results };
@@ -132,7 +131,6 @@ export default function registerGetFailureLogs(server, config) {
132
131
  {
133
132
  type: "text",
134
133
  text: `Failed to fetch failure logs: ${error instanceof Error ? error.message : "Unknown error"}`,
135
- isError: true,
136
134
  },
137
135
  ],
138
136
  isError: true,
@@ -101,7 +101,6 @@ export default function addBrowserLiveTools(server, config) {
101
101
  {
102
102
  type: "text",
103
103
  text: `Failed to start a browser live session. Error: ${error}`,
104
- isError: true,
105
104
  },
106
105
  ],
107
106
  isError: true,
@@ -52,7 +52,6 @@ export default function addObservabilityTools(server, config) {
52
52
  {
53
53
  type: "text",
54
54
  text: `Failed to get failures in the last run. Error: ${error}. Please open an issue on GitHub if this is an issue with BrowserStack`,
55
- isError: true,
56
55
  },
57
56
  ],
58
57
  isError: true,
@@ -1,7 +1,7 @@
1
1
  import { z } from "zod";
2
2
  import { TestStatus } from "./types.js";
3
3
  export declare const FETCH_RCA_PARAMS: {
4
- testId: z.ZodArray<z.ZodNumber, "many">;
4
+ testId: z.ZodArray<z.ZodNumber>;
5
5
  };
6
6
  export declare const GET_BUILD_ID_PARAMS: {
7
7
  browserStackProjectName: z.ZodString;
@@ -9,5 +9,5 @@ export declare const GET_BUILD_ID_PARAMS: {
9
9
  };
10
10
  export declare const LIST_TEST_IDS_PARAMS: {
11
11
  buildId: z.ZodString;
12
- status: z.ZodNativeEnum<typeof TestStatus>;
12
+ status: z.ZodEnum<typeof TestStatus>;
13
13
  };
@@ -15,123 +15,73 @@ export declare const MacOSPlatformEnum: {
15
15
  };
16
16
  export declare const SetUpPercyParamsShape: {
17
17
  projectName: z.ZodString;
18
- detectedLanguage: z.ZodNativeEnum<typeof SDKSupportedLanguageEnum>;
19
- detectedBrowserAutomationFramework: z.ZodNativeEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
20
- detectedTestingFramework: z.ZodNativeEnum<typeof SDKSupportedTestingFrameworkEnum>;
21
- integrationType: z.ZodNativeEnum<typeof PercyIntegrationTypeEnum>;
22
- folderPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
23
- filePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
18
+ detectedLanguage: z.ZodEnum<typeof SDKSupportedLanguageEnum>;
19
+ detectedBrowserAutomationFramework: z.ZodEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
20
+ detectedTestingFramework: z.ZodEnum<typeof SDKSupportedTestingFrameworkEnum>;
21
+ integrationType: z.ZodEnum<typeof PercyIntegrationTypeEnum>;
22
+ folderPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
23
+ filePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
24
24
  };
25
25
  export declare const RunTestsOnBrowserStackParamsShape: {
26
26
  projectName: z.ZodString;
27
- detectedLanguage: z.ZodNativeEnum<typeof SDKSupportedLanguageEnum>;
28
- detectedBrowserAutomationFramework: z.ZodNativeEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
29
- detectedTestingFramework: z.ZodNativeEnum<typeof SDKSupportedTestingFrameworkEnum>;
27
+ detectedLanguage: z.ZodEnum<typeof SDKSupportedLanguageEnum>;
28
+ detectedBrowserAutomationFramework: z.ZodEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
29
+ detectedTestingFramework: z.ZodEnum<typeof SDKSupportedTestingFrameworkEnum>;
30
30
  devices: z.ZodDefault<z.ZodArray<z.ZodObject<{
31
- platform: z.ZodEnum<["windows", "macos", "android", "ios"]>;
31
+ platform: z.ZodEnum<{
32
+ android: "android";
33
+ windows: "windows";
34
+ macos: "macos";
35
+ ios: "ios";
36
+ }>;
32
37
  deviceName: z.ZodOptional<z.ZodString>;
33
38
  osVersion: z.ZodString;
34
39
  browser: z.ZodOptional<z.ZodString>;
35
40
  browserVersion: z.ZodOptional<z.ZodString>;
36
- }, "strip", z.ZodTypeAny, {
37
- platform: "android" | "windows" | "macos" | "ios";
38
- osVersion: string;
39
- deviceName?: string | undefined;
40
- browser?: string | undefined;
41
- browserVersion?: string | undefined;
42
- }, {
43
- platform: "android" | "windows" | "macos" | "ios";
44
- osVersion: string;
45
- deviceName?: string | undefined;
46
- browser?: string | undefined;
47
- browserVersion?: string | undefined;
48
- }>, "many">>;
41
+ }, z.core.$strip>>>;
49
42
  };
50
43
  export declare const SetUpPercySchema: z.ZodObject<{
51
44
  projectName: z.ZodString;
52
- detectedLanguage: z.ZodNativeEnum<typeof SDKSupportedLanguageEnum>;
53
- detectedBrowserAutomationFramework: z.ZodNativeEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
54
- detectedTestingFramework: z.ZodNativeEnum<typeof SDKSupportedTestingFrameworkEnum>;
55
- integrationType: z.ZodNativeEnum<typeof PercyIntegrationTypeEnum>;
56
- folderPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
57
- filePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
58
- }, "strip", z.ZodTypeAny, {
59
- projectName: string;
60
- detectedLanguage: SDKSupportedLanguageEnum;
61
- detectedBrowserAutomationFramework: SDKSupportedBrowserAutomationFrameworkEnum;
62
- detectedTestingFramework: SDKSupportedTestingFrameworkEnum;
63
- integrationType: PercyIntegrationTypeEnum;
64
- folderPaths?: string[] | undefined;
65
- filePaths?: string[] | undefined;
66
- }, {
67
- projectName: string;
68
- detectedLanguage: SDKSupportedLanguageEnum;
69
- detectedBrowserAutomationFramework: SDKSupportedBrowserAutomationFrameworkEnum;
70
- detectedTestingFramework: SDKSupportedTestingFrameworkEnum;
71
- integrationType: PercyIntegrationTypeEnum;
72
- folderPaths?: string[] | undefined;
73
- filePaths?: string[] | undefined;
74
- }>;
45
+ detectedLanguage: z.ZodEnum<typeof SDKSupportedLanguageEnum>;
46
+ detectedBrowserAutomationFramework: z.ZodEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
47
+ detectedTestingFramework: z.ZodEnum<typeof SDKSupportedTestingFrameworkEnum>;
48
+ integrationType: z.ZodEnum<typeof PercyIntegrationTypeEnum>;
49
+ folderPaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
50
+ filePaths: z.ZodOptional<z.ZodArray<z.ZodString>>;
51
+ }, z.core.$strip>;
75
52
  export declare const RunTestsOnBrowserStackSchema: z.ZodObject<{
76
53
  projectName: z.ZodString;
77
- detectedLanguage: z.ZodNativeEnum<typeof SDKSupportedLanguageEnum>;
78
- detectedBrowserAutomationFramework: z.ZodNativeEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
79
- detectedTestingFramework: z.ZodNativeEnum<typeof SDKSupportedTestingFrameworkEnum>;
54
+ detectedLanguage: z.ZodEnum<typeof SDKSupportedLanguageEnum>;
55
+ detectedBrowserAutomationFramework: z.ZodEnum<typeof SDKSupportedBrowserAutomationFrameworkEnum>;
56
+ detectedTestingFramework: z.ZodEnum<typeof SDKSupportedTestingFrameworkEnum>;
80
57
  devices: z.ZodDefault<z.ZodArray<z.ZodObject<{
81
- platform: z.ZodEnum<["windows", "macos", "android", "ios"]>;
58
+ platform: z.ZodEnum<{
59
+ android: "android";
60
+ windows: "windows";
61
+ macos: "macos";
62
+ ios: "ios";
63
+ }>;
82
64
  deviceName: z.ZodOptional<z.ZodString>;
83
65
  osVersion: z.ZodString;
84
66
  browser: z.ZodOptional<z.ZodString>;
85
67
  browserVersion: z.ZodOptional<z.ZodString>;
86
- }, "strip", z.ZodTypeAny, {
87
- platform: "android" | "windows" | "macos" | "ios";
88
- osVersion: string;
89
- deviceName?: string | undefined;
90
- browser?: string | undefined;
91
- browserVersion?: string | undefined;
92
- }, {
93
- platform: "android" | "windows" | "macos" | "ios";
94
- osVersion: string;
95
- deviceName?: string | undefined;
96
- browser?: string | undefined;
97
- browserVersion?: string | undefined;
98
- }>, "many">>;
99
- }, "strip", z.ZodTypeAny, {
100
- projectName: string;
101
- detectedLanguage: SDKSupportedLanguageEnum;
102
- detectedBrowserAutomationFramework: SDKSupportedBrowserAutomationFrameworkEnum;
103
- detectedTestingFramework: SDKSupportedTestingFrameworkEnum;
104
- devices: {
105
- platform: "android" | "windows" | "macos" | "ios";
106
- osVersion: string;
107
- deviceName?: string | undefined;
108
- browser?: string | undefined;
109
- browserVersion?: string | undefined;
110
- }[];
111
- }, {
112
- projectName: string;
113
- detectedLanguage: SDKSupportedLanguageEnum;
114
- detectedBrowserAutomationFramework: SDKSupportedBrowserAutomationFrameworkEnum;
115
- detectedTestingFramework: SDKSupportedTestingFrameworkEnum;
116
- devices?: {
117
- platform: "android" | "windows" | "macos" | "ios";
118
- osVersion: string;
119
- deviceName?: string | undefined;
120
- browser?: string | undefined;
121
- browserVersion?: string | undefined;
122
- }[] | undefined;
123
- }>;
68
+ }, z.core.$strip>>>;
69
+ }, z.core.$strip>;
124
70
  export type SetUpPercyInput = z.infer<typeof SetUpPercySchema>;
125
71
  export type RunTestsOnBrowserStackInput = z.infer<typeof RunTestsOnBrowserStackSchema>;
126
72
  export declare const RunPercyScanParamsShape: {
127
73
  projectName: z.ZodString;
128
74
  percyRunCommand: z.ZodOptional<z.ZodString>;
129
- integrationType: z.ZodNativeEnum<typeof PercyIntegrationTypeEnum>;
75
+ integrationType: z.ZodEnum<typeof PercyIntegrationTypeEnum>;
130
76
  };
131
77
  export declare const FetchPercyChangesParamsShape: {
132
78
  project_name: z.ZodString;
133
79
  };
134
80
  export declare const ManagePercyBuildApprovalParamsShape: {
135
81
  buildId: z.ZodString;
136
- action: z.ZodEnum<["approve", "unapprove", "reject"]>;
82
+ action: z.ZodEnum<{
83
+ approve: "approve";
84
+ unapprove: "unapprove";
85
+ reject: "reject";
86
+ }>;
137
87
  };
@@ -143,7 +143,7 @@ export async function simulatePercyChangeHandler(rawInput, config) {
143
143
  }
144
144
  if (Array.isArray(percyInstruction.content)) {
145
145
  percyInstruction.content = percyInstruction.content.map((item) => {
146
- if (typeof item.text === "string") {
146
+ if (item.type === "text" && typeof item.text === "string") {
147
147
  const updatedText = item.text
148
148
  .replace(PERCY_REPLACE_REGEX, PERCY_SIMULATE_INSTRUCTION)
149
149
  .replace(PERCY_VERIFICATION_REGEX, "");
@@ -3,15 +3,7 @@ export declare const CreateTestCasesFromFileSchema: z.ZodObject<{
3
3
  documentId: z.ZodString;
4
4
  folderId: z.ZodString;
5
5
  projectReferenceId: z.ZodString;
6
- }, "strip", z.ZodTypeAny, {
7
- documentId: string;
8
- folderId: string;
9
- projectReferenceId: string;
10
- }, {
11
- documentId: string;
12
- folderId: string;
13
- projectReferenceId: string;
14
- }>;
6
+ }, z.core.$strip>;
15
7
  export type CreateTestCasesFromFileArgs = z.infer<typeof CreateTestCasesFromFileSchema>;
16
8
  export interface DefaultFieldMaps {
17
9
  priority: Record<string, number>;
@@ -10,31 +10,9 @@ export declare const AddTestResultSchema: z.ZodObject<{
10
10
  test_result: z.ZodObject<{
11
11
  status: z.ZodString;
12
12
  description: z.ZodOptional<z.ZodString>;
13
- }, "strip", z.ZodTypeAny, {
14
- status: string;
15
- description?: string | undefined;
16
- }, {
17
- status: string;
18
- description?: string | undefined;
19
- }>;
13
+ }, z.core.$strip>;
20
14
  test_case_id: z.ZodString;
21
- }, "strip", z.ZodTypeAny, {
22
- project_identifier: string;
23
- test_run_id: string;
24
- test_result: {
25
- status: string;
26
- description?: string | undefined;
27
- };
28
- test_case_id: string;
29
- }, {
30
- project_identifier: string;
31
- test_run_id: string;
32
- test_result: {
33
- status: string;
34
- description?: string | undefined;
35
- };
36
- test_case_id: string;
37
- }>;
15
+ }, z.core.$strip>;
38
16
  export type AddTestResultArgs = z.infer<typeof AddTestResultSchema>;
39
17
  /**
40
18
  * Adds a test result to a specific test run via BrowserStack Test Management API.