@browserstack/mcp-server 2.2.2 → 2.3.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.
@@ -116,6 +116,23 @@ export interface Capability {
116
116
  name?: string;
117
117
  method: string;
118
118
  path: string;
119
+ /**
120
+ * Which of the product's named `hosts` serves this one capability, when it is not the
121
+ * product's own `base_url`.
122
+ *
123
+ * A product is normally one host. App Automate is not: the account-level API (devices,
124
+ * app builds, plan, session records) answers on one origin and the Appium hub that
125
+ * drives the device answers on another, and neither serves the other's paths. Splitting
126
+ * them into two products would split one entity too — the session a hub capability
127
+ * creates is the session the account-level API reports on — and a caller holding the id
128
+ * would have to know it had changed products to use it.
129
+ *
130
+ * Unset means the product's own host, so every existing index is unaffected. A name that
131
+ * `hosts` does not define is refused by name at invocation rather than quietly falling
132
+ * back, because the fallback would send the call to a host that cannot serve the path and
133
+ * return a 404 that reads like the caller's mistake.
134
+ */
135
+ host?: string;
119
136
  mode: Mode;
120
137
  entity: string;
121
138
  path_params?: WireParam[];
@@ -155,6 +172,63 @@ export interface Capability {
155
172
  * suppression must not be ignored for arriving in an unexpected shape.
156
173
  */
157
174
  disabled?: boolean;
175
+ /**
176
+ * Withheld when the server is not running on the caller's own machine.
177
+ *
178
+ * Some capabilities only mean anything when the person and the process share a computer:
179
+ * one that reads a file the caller names is the clear case. On a remote server that path
180
+ * resolves against the OPERATOR's disk, so honouring it would read one user's files on
181
+ * another's behalf — the capability does not become unreliable there, it becomes wrong.
182
+ *
183
+ * Distinct from `disabled`, which withholds a capability everywhere. This one is a claim
184
+ * about where it can run, so the same artifact serves both deployments: a local server
185
+ * publishes it and a remote one does not.
186
+ *
187
+ * FAILS CLOSED in the same way, and takes the same `capability_disabled` path at
188
+ * invocation, so a caller holding the handle is told the absence is deliberate rather
189
+ * than hunting for a synonym.
190
+ */
191
+ local_only?: boolean;
192
+ /**
193
+ * What to do instead, on a surface where this capability cannot run.
194
+ *
195
+ * A `local_only` capability is NOT hidden on a remote server: the query that should find
196
+ * it still finds it, because an agent asked to upload a file from the user's machine
197
+ * needs to learn that the route exists and what replaces it here. What it loses is the
198
+ * means to call it — the parameters and response shapes are stripped at load, and
199
+ * invocation is refused — so the note is the whole of what remains.
200
+ *
201
+ * Write it as the instruction the caller should follow, not as an apology.
202
+ */
203
+ unavailable_note?: string;
204
+ /**
205
+ * FALSE when this build publishes the capability for reference but will not call it.
206
+ *
207
+ * Set by the loader, never authored: it is the surface's answer, not the artifact's.
208
+ */
209
+ invocable?: boolean;
210
+ /**
211
+ * How the request body is encoded. Absent means JSON, which is every capability today.
212
+ *
213
+ * `multipart` exists for endpoints that take the bytes of a file rather than a reference
214
+ * to one. A capability declaring it must also declare a `file` parameter, and should be
215
+ * `local_only`: the path names the caller's own machine.
216
+ */
217
+ encoding?: "multipart";
218
+ /**
219
+ * Send `{}` rather than no body at all, for an endpoint that takes no parameters.
220
+ *
221
+ * Normally a capability with nothing to send sends nothing, which is right for a REST API
222
+ * and wrong for W3C WebDriver: Chrome answers 400 "invalid argument" to a parameterless
223
+ * POST with the body omitted and 200 to the same call carrying `{}`. Appium tolerates the
224
+ * omission, which is why the identical capability needs this on Automate and not on App
225
+ * Automate.
226
+ *
227
+ * Opt-in per capability rather than a rule for every bodyless POST, because 27 of those
228
+ * exist across the shipped indexes and changing what reaches their products is not
229
+ * something this can verify.
230
+ */
231
+ send_empty_body?: boolean;
158
232
  paginated?: boolean;
159
233
  /** The largest page the operation declares. */
160
234
  max_page_size?: number;
@@ -313,6 +387,18 @@ export interface ProductIndex {
313
387
  * (see `discovery.probePath`); declare it when the derived choice would be wrong.
314
388
  */
315
389
  probe_path?: string;
390
+ /**
391
+ * Additional hosts this product is served from, by name, for capabilities that declare
392
+ * `host`.
393
+ *
394
+ * DISTINCT FROM `base_urls`, which is a list of CANDIDATES for one host — probed in turn
395
+ * so a region-sharded product lands on the account's own region. These are several hosts
396
+ * that all serve the product at once, each addressing a different part of it, and the
397
+ * capability says which it needs rather than the server discovering it.
398
+ *
399
+ * `base_url` remains the default for every capability that names no host.
400
+ */
401
+ hosts?: Record<string, string>;
316
402
  capabilities: Capability[];
317
403
  entities: Record<string, EntityDoc>;
318
404
  paging?: Record<string, PagingRule>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@browserstack/mcp-server",
3
- "version": "2.2.2",
3
+ "version": "2.3.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",