Skip to content
Open

Beta #14

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b589b4e
Refactoring SDK Tool
tech-sushant Jul 22, 2025
7f0bd97
add projectName parameter to BrowserStack YML instructions
tech-sushant Jul 23, 2025
d2f7a6d
Percy changes
tech-sushant Jul 28, 2025
395153c
Add framework compatibility checks for Percy integration types
tech-sushant Jul 28, 2025
ccf16a9
Refactor Percy handler functions to remove unsupported configuration …
tech-sushant Jul 28, 2025
c2e6d82
Update tool descriptions and registration names for BrowserStack and …
tech-sushant Jul 28, 2025
6bc96cd
Update Percy integration type and adjust related documentation for Au…
tech-sushant Jul 30, 2025
c67e857
Refactor BrowserStack and Percy integration tools for improved setup …
tech-sushant Jul 30, 2025
0d5b48b
Merge branch 'main' into bstack-sdk
tech-sushant Jul 30, 2025
38fd222
Update command for running Percy Automate with BrowserStack and Pytest
tech-sushant Jul 30, 2025
0c84983
Merge branch 'bstack-sdk' of https://github.com/tech-sushant/mcp-serv…
tech-sushant Jul 30, 2025
7132f0a
Add Percy tools integration and support checks for BrowserStack
tech-sushant Jul 30, 2025
f1456b8
Enhance BrowserStack SDK integration
tech-sushant Jul 30, 2025
c7c5c56
Refactor Percy token handling
tech-sushant Jul 30, 2025
ef7a337
linting
tech-sushant Jul 30, 2025
c5b07c5
Remove config logging from bootstrap failure message and delete unuse…
tech-sushant Jul 31, 2025
970d3ec
Remove integrationType from SetUpPercyParamsShape and update support …
tech-sushant Jul 31, 2025
8e29b42
Update SETUP_PERCY_DESCRIPTION for clarity on tool usage and integration
tech-sushant Jul 31, 2025
6185e9e
Refactor BrowserStack and Percy integration descriptions for clarity …
tech-sushant Aug 1, 2025
c80f25c
Percy changes
tech-sushant Aug 1, 2025
5483db3
Refactor Percy and BrowserStack integration
tech-sushant Aug 1, 2025
da46709
Enhance Percy integration documentation and support for additional fr…
tech-sushant Aug 3, 2025
99080dc
Refactor Percy Automate configuration to support multiple drivers and…
tech-sushant Aug 4, 2025
be274b1
Update screenshot method in tests and enhance
tech-sushant Aug 4, 2025
164e993
Add instructions for iterative Percy integration in test files
tech-sushant Aug 4, 2025
5cb17b5
refactoring
tech-sushant Aug 7, 2025
4267079
refine ++
tech-sushant Aug 7, 2025
596c18f
refactoring ++
tech-sushant Aug 7, 2025
a69309c
Refactor fetchPercyToken function to implement token retrieval logic …
tech-sushant Aug 8, 2025
85b74cc
Error handling
tech-sushant Aug 8, 2025
a01a9bd
Linting ++
tech-sushant Aug 11, 2025
d485f39
Improvements ++
tech-sushant Aug 12, 2025
76f8fe9
Modularity ++
tech-sushant Aug 12, 2025
f00a5b7
Merge branch 'main' into bstack-sdk
tech-sushant Aug 12, 2025
9a67c26
Merge branch 'main' into bstack-sdk
tech-sushant Aug 12, 2025
0a6481c
Add snapshot instructions to configuration mappings for various langu…
tech-sushant Aug 12, 2025
c6fdc33
Additional step for percy snapshot commands
tech-sushant Aug 12, 2025
e0fcc1f
Update ++
tech-sushant Aug 13, 2025
bebfd39
Merge branch 'main' of https://github.com/tech-sushant/mcp-server int…
tech-sushant Aug 13, 2025
a09fb0e
Update src/tools/sdk-utils/percy-automate/constants.ts
tech-sushant Aug 13, 2025
3de9e49
Merge branch 'main' of https://github.com/tech-sushant/mcp-server int…
tech-sushant Aug 19, 2025
a2ed32e
Merge branch 'bstack-sdk' of https://github.com/tech-sushant/mcp-serv…
tech-sushant Aug 19, 2025
0c2a338
enhance Percy integration support
tech-sushant Aug 19, 2025
53a4a1c
Update src/tools/sdk-utils/percy-automate/constants.ts
tech-sushant Aug 19, 2025
2b6b325
Update src/tools/sdk-utils/common/constants.ts
tech-sushant Aug 19, 2025
b013147
Combining all percy tools
tech-sushant Aug 19, 2025
e04745a
linting ++
tech-sushant Aug 19, 2025
fb89c4d
Merge pull request #126 from browserstack/main
ruturaj-browserstack Aug 20, 2025
5de7f59
Merge pull request #101 from tech-sushant/bstack-sdk
tech-sushant Aug 20, 2025
44b585b
Merge pull request #122 from ruturaj-browserstack/accessibility-auth-…
ruturaj-browserstack Aug 20, 2025
4c29b1c
Beta improvements for percy setup agents
tech-sushant Sep 1, 2025
c7c7675
fix: update prerequisites and instructions for Percy snapshots integr…
tech-sushant Sep 1, 2025
d3b762f
add Percy verification regex and improve error handling
tech-sushant Sep 1, 2025
d85ad6d
fix: update Percy build instructions for accuracy and reliability
tech-sushant Sep 1, 2025
3acae1a
fix: update Percy token instructions for clarity and completeness
tech-sushant Sep 1, 2025
45a6cbd
Merge pull request #131 from tech-sushant/beta
tech-sushant Sep 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/beta-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: "Beta Release"

on:
workflow_dispatch:

permissions:
contents: read

jobs:
publish-beta:
runs-on: ubuntu-latest
steps:
- name: "Checkout source code"
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "Set up Node.js"
uses: actions/setup-node@v4
with:
node-version: 22.x
registry-url: "https://registry.npmjs.org/"

- name: "Install dependencies"
run: npm ci

- name: "Create build"
run: npm run build

- name: "Get version and package name from package.json and create beta version"
id: get_version
run: |
PACKAGE_NAME=$(node -p 'require("./package.json").name')
BASE_VERSION=$(node -p 'require("./package.json").version')

# Fetch all published versions for this package
ALL_VERSIONS=$(npm view $PACKAGE_NAME versions --json 2>/dev/null || echo "[]")

# Get latest beta for this base version
LATEST_BETA=$(echo $ALL_VERSIONS | jq -r '.[] | select(startswith("'"$BASE_VERSION"'-beta."))' | sort -V | tail -n 1)

if [ -z "$LATEST_BETA" ]; then
COUNTER=1
else
COUNTER=$(echo $LATEST_BETA | sed -E 's/.*-beta\.([0-9]+)$/\1/')
COUNTER=$((COUNTER + 1))
fi

BETA_VERSION="$BASE_VERSION-beta.$COUNTER"

echo "package=$PACKAGE_NAME" >> $GITHUB_OUTPUT
echo "version=$BETA_VERSION" >> $GITHUB_OUTPUT
echo "Beta version: $BETA_VERSION for package: $PACKAGE_NAME"

- name: "Check if beta version already exists on NPM"
run: |
PACKAGE_NAME=${{ steps.get_version.outputs.package }}
BETA_VERSION=${{ steps.get_version.outputs.version }}
if npm view $PACKAGE_NAME@$BETA_VERSION version 2>/dev/null; then
echo "Error: Beta version $BETA_VERSION already exists on NPM!"
exit 1
fi
echo "Beta version $BETA_VERSION is available for release"

- name: "Update package.json with beta version"
run: |
npm version ${{ steps.get_version.outputs.version }} --no-git-tag-version

- name: "Publish beta to NPM"
run: npm publish --tag beta --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

1 change: 1 addition & 0 deletions src/lib/inmemory-store.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export const signedUrlMap = new Map<string, object>();
export const testFilePathsMap = new Map<string, string[]>();
3 changes: 3 additions & 0 deletions src/lib/instrumentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { createRequire } from "module";
const require = createRequire(import.meta.url);
const packageJson = require("../../package.json");
import axios from "axios";
import globalConfig from "../config.js";

interface MCPEventPayload {
event_type: string;
Expand All @@ -14,6 +15,7 @@ interface MCPEventPayload {
success?: boolean;
error_message?: string;
error_type?: string;
is_remote?: boolean;
};
}

Expand Down Expand Up @@ -43,6 +45,7 @@ export function trackMCP(
tool_name: toolName,
mcp_client: mcpClient,
success: isSuccess,
is_remote: globalConfig.REMOTE_MCP,
},
};

Expand Down
4 changes: 3 additions & 1 deletion src/server-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ const require = createRequire(import.meta.url);
const packageJson = require("../package.json");
import logger from "./logger.js";
import addSDKTools from "./tools/bstack-sdk.js";
import addPercyTools from "./tools/percy-sdk.js";
import addBrowserLiveTools from "./tools/live.js";
import addAccessibilityTools from "./tools/accessibility.js";
import addTestManagementTools from "./tools/testmanagement.js";
import addAppAutomationTools from "./tools/appautomate.js";
import addFailureLogsTools from "./tools/getFailureLogs.js";
import addFailureLogsTools from "./tools/get-failure-logs.js";
import addAutomateTools from "./tools/automate.js";
import addSelfHealTools from "./tools/selfheal.js";
import addAppLiveTools from "./tools/applive.js";
Expand Down Expand Up @@ -48,6 +49,7 @@ export class BrowserStackMcpServer {
const toolAdders = [
addAccessibilityTools,
addSDKTools,
addPercyTools,
addAppLiveTools,
addBrowserLiveTools,
addTestManagementTools,
Expand Down
32 changes: 32 additions & 0 deletions src/tools/add-percy-snapshots.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { testFilePathsMap } from "../lib/inmemory-store.js";
import { updateFileAndStep } from "./percy-snapshot-utils/utils.js";
import { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
import { percyWebSetupInstructions } from "../tools/sdk-utils/percy-web/handler.js";

export async function updateTestsWithPercyCommands(args: {
uuid: string;
index: number;
}): Promise<CallToolResult> {
const { uuid, index } = args;
const filePaths = testFilePathsMap.get(uuid);

if (!filePaths) {
throw new Error(`No test files found in memory for UUID: ${uuid}`);
}

if (index < 0 || index >= filePaths.length) {
throw new Error(
`Invalid index: ${index}. There are ${filePaths.length} files for UUID: ${uuid}`,
);
}
const result = await updateFileAndStep(
filePaths[index],
index,
filePaths.length,
percyWebSetupInstructions,
);

return {
content: result,
};
}
Loading