@browserstack/mcp-server 1.4.0-beta.3 → 1.5.0-beta.2

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 (46) hide show
  1. package/capability/loadtesting.capability-index.json +1764 -0
  2. package/capability/tm.capability-index.json +19793 -0
  3. package/dist/config.d.ts +1 -4
  4. package/dist/config.js +2 -23
  5. package/dist/index.js +2 -5
  6. package/dist/server-factory.js +5 -5
  7. package/dist/tools/accessibility.js +2 -5
  8. package/dist/tools/capability-registry/bind.d.ts +29 -0
  9. package/dist/tools/capability-registry/bind.js +134 -0
  10. package/dist/tools/capability-registry/config.d.ts +62 -0
  11. package/dist/tools/capability-registry/config.js +218 -0
  12. package/dist/tools/capability-registry/discovery.d.ts +44 -0
  13. package/dist/tools/capability-registry/discovery.js +99 -0
  14. package/dist/tools/capability-registry/egress.d.ts +44 -0
  15. package/dist/tools/capability-registry/egress.js +128 -0
  16. package/dist/tools/capability-registry/index-loader.d.ts +119 -0
  17. package/dist/tools/capability-registry/index-loader.js +314 -0
  18. package/dist/tools/capability-registry/register.d.ts +34 -0
  19. package/dist/tools/capability-registry/register.js +354 -0
  20. package/dist/tools/capability-registry/resolve.d.ts +38 -0
  21. package/dist/tools/capability-registry/resolve.js +45 -0
  22. package/dist/tools/capability-registry/search.d.ts +65 -0
  23. package/dist/tools/capability-registry/search.js +342 -0
  24. package/dist/tools/capability-registry/types.d.ts +208 -0
  25. package/dist/tools/capability-registry/types.js +33 -0
  26. package/dist/tools/get-failure-logs.js +1 -3
  27. package/dist/tools/rca-agent.js +2 -5
  28. package/dist/tools/selfheal.js +2 -5
  29. package/dist/tools/testmanagement.js +15 -37
  30. package/package.json +3 -2
  31. package/dist/tools/ask-browserstack/central-oauth.d.ts +0 -120
  32. package/dist/tools/ask-browserstack/central-oauth.js +0 -277
  33. package/dist/tools/ask-browserstack/config.d.ts +0 -102
  34. package/dist/tools/ask-browserstack/config.js +0 -140
  35. package/dist/tools/ask-browserstack/egress.d.ts +0 -34
  36. package/dist/tools/ask-browserstack/egress.js +0 -31
  37. package/dist/tools/ask-browserstack/register.d.ts +0 -61
  38. package/dist/tools/ask-browserstack/register.js +0 -416
  39. package/dist/tools/ask-browserstack/relay.d.ts +0 -201
  40. package/dist/tools/ask-browserstack/relay.js +0 -577
  41. package/dist/tools/ask-browserstack/stream.d.ts +0 -116
  42. package/dist/tools/ask-browserstack/stream.js +0 -236
  43. package/dist/tools/ask-browserstack/types.d.ts +0 -196
  44. package/dist/tools/ask-browserstack/types.js +0 -14
  45. package/dist/tools/tool-handoff.d.ts +0 -62
  46. package/dist/tools/tool-handoff.js +0 -75
@@ -1,75 +0,0 @@
1
- /**
2
- * Precondition sentences appended to a tool's description.
3
- *
4
- * WHY THESE EXIST. Nothing routes an MCP call: the client's model picks a tool from the
5
- * descriptions alone. A tool that needs an identifier the caller does not have is a dead
6
- * end — the model either asks the user for something they also do not know, or gives up.
7
- * These sentences turn that dead end into a HANDOFF by naming, in the description itself,
8
- * where the missing identifier comes from.
9
- *
10
- * Point at a sibling tool whenever one can produce the id — it is faster and more
11
- * predictable than an agent. Point at `askBrowserStackAI` only when NO tool here can.
12
- *
13
- * The one that matters most: 15 of the 17 Test Management tools require a project
14
- * identifier and NONE of them accepts its absence, yet no tool in this server lists
15
- * projects. "List my projects" is the first step of nearly every Test Management journey
16
- * and it was unserved, which is exactly why that request did not reach any tool unless a
17
- * user named one explicitly.
18
- *
19
- * Keep these as shared constants, not per-tool prose: the wording is a routing signal, and
20
- * twenty hand-written variants drift into twenty different signals.
21
- */
22
- /** No tool lists projects, so this genuinely has to go to the agent. */
23
- export const NEEDS_PROJECT_ID = " Requires a project identifier (PR-*). No tool here lists projects, so if you do not " +
24
- 'have one, call askBrowserStackAI with product "tm" and ask which projects exist, then ' +
25
- "retry this tool with the identifier it returns.";
26
- /** A sibling tool can produce the id — prefer it over the agent. */
27
- export function needsIdFrom(idLabel, sourceTool) {
28
- return ` Requires ${idLabel}. Call ${sourceTool} first if you do not have it.`;
29
- }
30
- /**
31
- * createProjectOrFolder must NOT carry NEEDS_PROJECT_ID: `project_identifier` is optional
32
- * there, and the create-a-PROJECT half needs no id at all. With the generic constant the
33
- * tool read "Requires a project identifier ... call askBrowserStackAI", which routed
34
- * "create me a project" through the agent before letting the tool run.
35
- */
36
- 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 ask " +
38
- 'askBrowserStackAI with product "tm" for it.';
39
- /** A test plan id (TP-*) comes from listTestPlans. */
40
- export const NEEDS_TEST_PLAN_ID = needsIdFrom("a test plan identifier (TP-*)", "listTestPlans");
41
- /**
42
- * The ONLY capability handoff here: every other constant points at a tool that produces a
43
- * missing *id*, but plan WRITES have no tool at all — the surface is `listTestPlans`,
44
- * `getTestPlan`, `listSubTestPlans`, `getSubTestPlan` and nothing else. Atlas can do them
45
- * (the tm harness allows POST /api/v1/projects/{id}/test-plans plus /update, /delete,
46
- * /clone, /test-runs and /test-runs/unlink), so without this line the model reads the four
47
- * read tools, finds no create, and reports the capability as absent — which is exactly what
48
- * a QA eval concluded.
49
- *
50
- * Deliberately narrow: it names the specific operations that are missing rather than
51
- * inviting the model to route plan work to the agent generally, because the tool
52
- * descriptions otherwise say to prefer a specific tool whenever one fits.
53
- *
54
- * Caveat worth knowing: askBrowserStackAI pins every write to human approval, so this path
55
- * only completes on a client that can show a prompt. On one that cannot, the intended write
56
- * comes back in `needs_approval` instead of happening.
57
- */
58
- export const PLAN_WRITES_VIA_AGENT = " Creating a test plan or sub-plan, and linking or unlinking test runs on one, are not " +
59
- 'available as tools here: call askBrowserStackAI with product "tm" and describe what you ' +
60
- "want. It asks you to confirm before changing anything.";
61
- /** A build id comes from either build-lookup tool. */
62
- export const NEEDS_BUILD_ID = needsIdFrom("a BrowserStack build id", "getBuildId or listBuildId");
63
- /** Session ids are not listable by any tool here. */
64
- export const NEEDS_SESSION_ID = " Requires a session id, which no tool here lists. If you only know the build, call " +
65
- "getBuildId or listBuildId; if you have neither, call askBrowserStackAI with product " +
66
- '"tra" and describe the run you mean.';
67
- /** A completed scan's ids come from startAccessibilityScan, or from the agent. */
68
- export const NEEDS_A11Y_SCAN_ID = " Requires the ids of a completed scan, which are returned by startAccessibilityScan. " +
69
- "No tool here lists past scans, so if you do not have the ids, start a new scan rather " +
70
- "than guessing.";
71
- /** Auth-config ids are not listable by any tool here. */
72
- export const NEEDS_A11Y_CONFIG_ID = " Requires the numeric id returned by createAccessibilityAuthConfig. No tool here lists " +
73
- "existing configurations, so if you do not have the id, create one rather than guessing.";
74
- /** Test ids come from listTestIds, which itself needs a build id. */
75
- export const NEEDS_TEST_IDS = needsIdFrom("test ids", "listTestIds");