@browserstack/mcp-server 2.0.0 → 2.2.0-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.
- package/capability/loadtesting.capability-index.json +2978 -0
- package/capability/tm.capability-index.json +2 -1
- package/capability/tra.capability-index.json +52074 -0
- package/dist/lib/central-oauth.d.ts +133 -0
- package/dist/lib/central-oauth.js +246 -0
- package/dist/tools/ask-browserstack/central-oauth.d.ts +25 -46
- package/dist/tools/ask-browserstack/central-oauth.js +55 -177
- package/dist/tools/capability-registry/bind.js +43 -7
- package/dist/tools/capability-registry/discovery.js +3 -1
- package/dist/tools/capability-registry/egress.d.ts +12 -5
- package/dist/tools/capability-registry/egress.js +24 -1
- package/dist/tools/capability-registry/oauth.d.ts +63 -0
- package/dist/tools/capability-registry/oauth.js +176 -0
- package/dist/tools/capability-registry/register.js +289 -41
- package/dist/tools/capability-registry/resolve.d.ts +1 -1
- package/dist/tools/capability-registry/resolve.js +24 -3
- package/dist/tools/capability-registry/routing-token.d.ts +25 -0
- package/dist/tools/capability-registry/routing-token.js +87 -0
- package/dist/tools/capability-registry/search.d.ts +28 -1
- package/dist/tools/capability-registry/search.js +202 -4
- package/dist/tools/capability-registry/types.d.ts +42 -3
- package/dist/tools/testmanagement.js +5 -5
- package/dist/tools/tool-handoff.d.ts +15 -12
- package/dist/tools/tool-handoff.js +21 -18
- package/package.json +2 -1
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
* where the missing identifier comes from.
|
|
9
9
|
*
|
|
10
10
|
* Point at a sibling tool whenever one can produce the id — it is faster and more
|
|
11
|
-
* predictable than
|
|
11
|
+
* predictable than anything that has to reason its way there. When no tool here can, point
|
|
12
|
+
* at the CAPABILITY FUNCTIONS: they reach the product's own API surface, so they answer the
|
|
13
|
+
* id question directly. Name them as a group, never individually — which function to call
|
|
14
|
+
* is their own business, and a name written here goes stale the moment one is renamed.
|
|
12
15
|
*
|
|
13
16
|
* The one that matters most: 15 of the 17 Test Management tools require a project
|
|
14
17
|
* identifier and NONE of them accepts its absence, yet no tool in this server lists
|
|
@@ -21,8 +24,8 @@
|
|
|
21
24
|
*/
|
|
22
25
|
/** No tool lists projects, so this genuinely has to go to the agent. */
|
|
23
26
|
export const NEEDS_PROJECT_ID = " Requires a project identifier (PR-*). No tool here lists projects, so if you do not " +
|
|
24
|
-
|
|
25
|
-
"retry this tool with the identifier
|
|
27
|
+
"have one, use the capability functions to list the Test Management projects, then " +
|
|
28
|
+
"retry this tool with the identifier they return.";
|
|
26
29
|
/** A sibling tool can produce the id — prefer it over the agent. */
|
|
27
30
|
export function needsIdFrom(idLabel, sourceTool) {
|
|
28
31
|
return ` Requires ${idLabel}. Call ${sourceTool} first if you do not have it.`;
|
|
@@ -34,30 +37,30 @@ export function needsIdFrom(idLabel, sourceTool) {
|
|
|
34
37
|
* "create me a project" through the agent before letting the tool run.
|
|
35
38
|
*/
|
|
36
39
|
export const PROJECT_ID_ONLY_FOR_FOLDER = " Creating a project needs no identifier. Creating a folder inside an EXISTING project " +
|
|
37
|
-
"needs that project's identifier (PR-*); no tool here lists projects, so
|
|
38
|
-
|
|
40
|
+
"needs that project's identifier (PR-*); no tool here lists projects, so use the " +
|
|
41
|
+
"capability functions to look it up.";
|
|
39
42
|
/** A test plan id (TP-*) comes from listTestPlans. */
|
|
40
43
|
export const NEEDS_TEST_PLAN_ID = needsIdFrom("a test plan identifier (TP-*)", "listTestPlans");
|
|
41
44
|
/**
|
|
42
45
|
* The ONLY capability handoff here: every other constant points at a tool that produces a
|
|
43
46
|
* missing *id*, but plan WRITES have no tool at all — the surface is `listTestPlans`,
|
|
44
|
-
* `getTestPlan`, `listSubTestPlans`, `getSubTestPlan` and nothing else.
|
|
45
|
-
* (
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
47
|
+
* `getTestPlan`, `listSubTestPlans`, `getSubTestPlan` and nothing else. The capability functions can do them
|
|
48
|
+
* (Test Management's own API covers creating, updating, cloning and deleting a plan, and
|
|
49
|
+
* linking or unlinking its runs), so without this line the model reads the four read tools,
|
|
50
|
+
* finds no create, and reports the capability as absent — which is exactly what a QA eval
|
|
51
|
+
* concluded.
|
|
49
52
|
*
|
|
50
53
|
* Deliberately narrow: it names the specific operations that are missing rather than
|
|
51
|
-
* inviting the model to route plan work
|
|
52
|
-
*
|
|
54
|
+
* inviting the model to route plan work elsewhere generally, because the tool descriptions
|
|
55
|
+
* otherwise say to prefer a specific tool whenever one fits.
|
|
53
56
|
*
|
|
54
|
-
* Caveat worth knowing:
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
+
* Caveat worth knowing: a capability write is pinned to human approval, so this path only
|
|
58
|
+
* completes on a client that can show a prompt. On one that cannot, the intended write is
|
|
59
|
+
* refused rather than performed.
|
|
57
60
|
*/
|
|
58
|
-
export const
|
|
59
|
-
|
|
60
|
-
"
|
|
61
|
+
export const PLAN_WRITES_VIA_CAPABILITIES = " Creating a test plan or sub-plan, and linking or unlinking test runs on one, are not " +
|
|
62
|
+
"available as tools here: use the capability functions, which reach Test Management's " +
|
|
63
|
+
"own API for these operations. They ask you to confirm before changing anything.";
|
|
61
64
|
/** A build id comes from either build-lookup tool. */
|
|
62
65
|
export const NEEDS_BUILD_ID = needsIdFrom("a BrowserStack build id", "getBuildId or listBuildId");
|
|
63
66
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@browserstack/mcp-server",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.2.0-beta.1",
|
|
4
4
|
"description": "BrowserStack's Official MCP Server",
|
|
5
5
|
"mcpName": "io.github.browserstack/mcp-server",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"check:contract": "python3 scripts/check-contract.py capability/tm.capability-index.json --baseline scripts/contract-baseline/tm.json --quiet",
|
|
20
20
|
"eval:index": "tsx scripts/eval-index.mts",
|
|
21
21
|
"seed:live": "tsx scripts/seed-live.mts",
|
|
22
|
+
"seed:live:tra": "tsx scripts/seed-live-tra.mts",
|
|
22
23
|
"plan:tests": "tsx scripts/plan-capability-tests.mts",
|
|
23
24
|
"replay:live": "tsx scripts/replay-live.mts"
|
|
24
25
|
},
|