@mgcrea/mcp-ios-simulator 0.3.1 → 0.4.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/dist/index.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { McpServer } from "@modelcontextprotocol/server";
2
2
  import { CommandError, CommandTimeoutError, DisplayInfo, ExecImpl, IosError, IosError as IosError$1, Logger, ScreenHost, ToolchainError, WdaClient, WdaError, WdaUnavailableError } from "@mgcrea/mcp-ios-core";
3
3
  import { z } from "zod";
4
- //#region src/client/logs.d.ts
5
4
  /**
6
5
  * The log captures this server has started, newest per simulator and app.
7
6
  *
@@ -49,8 +48,6 @@ declare class LaunchCaptures {
49
48
  */
50
49
  running(capture: Capture): boolean;
51
50
  }
52
- //#endregion
53
- //#region src/client/simctl.d.ts
54
51
  /**
55
52
  * `xcrun simctl` — Apple's own simulator tool, and the half of this server that
56
53
  * needs nothing installed and nothing signed.
@@ -122,7 +119,7 @@ type RawSimApp = {
122
119
  * Without this the message a caller sees is the first line, which names a
123
120
  * numeric code and says nothing about what to do.
124
121
  */
125
- declare const parseSimctlError: (stderr: string) => {
122
+ export declare const parseSimctlError: (stderr: string) => {
126
123
  domain?: string;
127
124
  code?: number;
128
125
  message: string;
@@ -136,12 +133,18 @@ declare const parseSimctlError: (stderr: string) => {
136
133
  * forward, so it is refused here as well as in the resolver — the resolver is
137
134
  * where it should be caught, and this is where it cannot be missed.
138
135
  */
139
- declare const assertNotBulkTarget: (udid: string) => void;
140
- declare class Simctl {
136
+ export declare const assertNotBulkTarget: (udid: string) => void;
137
+ export declare class Simctl {
141
138
  private readonly opts;
142
139
  private readonly exec;
143
140
  /** Device types change only when Xcode is updated; re-reading is pure cost. */
144
141
  private deviceTypes;
142
+ /**
143
+ * Read once, like device types: both change only when Xcode or a runtime is
144
+ * installed, and every tool call resolves a simulator. The cost is that a
145
+ * runtime added or deleted while this server runs is seen after a restart.
146
+ */
147
+ private runtimes;
145
148
  constructor(opts: SimctlOptions);
146
149
  /** Raw stdout, for the subcommands that answer in prose. */
147
150
  private run;
@@ -165,6 +168,13 @@ declare class Simctl {
165
168
  listRuntimes(): Promise<RawRuntime[]>;
166
169
  listDeviceTypes(): Promise<RawDeviceType[]>;
167
170
  boot(udid: string): Promise<void>;
171
+ /**
172
+ * Wait until a booting simulator has finished, or `timeoutMs` passes (a
173
+ * `CommandTimeoutError`). Not the state in `list`: measured on an iOS 27.0
174
+ * runtime, that reads "Booted" 0.4s after `boot` returns, while this returns
175
+ * 17s later, once the system is up.
176
+ */
177
+ bootstatus(udid: string, timeoutMs: number): Promise<void>;
168
178
  shutdown(udid: string): Promise<void>;
169
179
  erase(udid: string): Promise<void>;
170
180
  /**
@@ -237,6 +247,17 @@ declare class Simctl {
237
247
  *
238
248
  * A successful capture also writes a `Note: No display specified…` line to
239
249
  * stderr, so non-empty stderr is not a failure here.
250
+ *
251
+ * A device with two displays — the iPhone Duo, iOS 27.1 runtime — makes the
252
+ * bare call fail outright: exit 22, "Cannot choose between 2 displays.
253
+ * Specify one with --display". Only then is it retried on `--display=primary`,
254
+ * so a single-display simulator and Xcode 26 never see the flag. Primary
255
+ * rather than whichever is lit, because it is the display WebDriverAgent
256
+ * addresses when no `currentDisplayId` is set: a capture of the other one
257
+ * would put every tap read off it in the wrong coordinate space. On an open
258
+ * Duo that display is black (appium/appium-xcuitest-driver#3012); driving
259
+ * the inner one means selecting it in WDA too, which nothing here does yet.
260
+ * The `internal` alias the help text offers fails on the Duo with exit 22.
240
261
  */
241
262
  screenshotPng(udid: string): Promise<string>;
242
263
  /**
@@ -261,8 +282,6 @@ declare class Simctl {
261
282
  */
262
283
  push(udid: string, bundleId: string, payload: unknown): Promise<void>;
263
284
  }
264
- //#endregion
265
- //#region src/client/shape.d.ts
266
285
  type SimulatorSummary = {
267
286
  /**
268
287
  * The UDID. Called `id` because that is the name the shared `ScreenHost`
@@ -301,7 +320,7 @@ type SimulatorSummary = {
301
320
  * primary key: it is joined against `list runtimes` for a display name, 0..n
302
321
  * matches tolerated, and carried through verbatim besides.
303
322
  */
304
- declare const summarizeDevices: (devices: Record<string, RawSim[]>, runtimes: RawRuntime[], deviceTypes: RawDeviceType[]) => SimulatorSummary[];
323
+ export declare const summarizeDevices: (devices: Record<string, RawSim[]>, runtimes: RawRuntime[], deviceTypes: RawDeviceType[]) => SimulatorSummary[];
305
324
  type SimAppSummary = {
306
325
  bundleId: string;
307
326
  name: string | undefined;
@@ -316,13 +335,11 @@ type SimAppSummary = {
316
335
  bundlePath: string | undefined;
317
336
  dataContainer: string | undefined;
318
337
  };
319
- declare const summarizeApps: (apps: Record<string, RawSimApp>, opts?: {
338
+ export declare const summarizeApps: (apps: Record<string, RawSimApp>, opts?: {
320
339
  includeAll?: boolean;
321
340
  }) => SimAppSummary[];
322
341
  /** The public shape of one row of `ios_simulator_list`. */
323
- declare const toListRow: (sim: SimulatorSummary) => Record<string, unknown>;
324
- //#endregion
325
- //#region src/client/simulator.d.ts
342
+ export declare const toListRow: (sim: SimulatorSummary) => Record<string, unknown>;
326
343
  type SimulatorClientOptions = {
327
344
  xcrunPath: string;
328
345
  sipsPath: string;
@@ -343,7 +360,7 @@ type SimulatorClientOptions = {
343
360
  processAlive?: ProcessAlive | undefined;
344
361
  logger?: Logger | undefined;
345
362
  };
346
- declare class SimulatorClient implements ScreenHost<SimulatorSummary> {
363
+ export declare class SimulatorClient implements ScreenHost<SimulatorSummary> {
347
364
  readonly simctl: Simctl;
348
365
  readonly exec: ExecImpl;
349
366
  readonly sipsPath: string;
@@ -360,6 +377,11 @@ declare class SimulatorClient implements ScreenHost<SimulatorSummary> {
360
377
  listSimulators(opts?: {
361
378
  fresh?: boolean;
362
379
  }): Promise<SimulatorSummary[]>;
380
+ /**
381
+ * Drop the cached list. Called after a tool changes a simulator's state, so
382
+ * the next call within the cache window does not act on the state before it.
383
+ */
384
+ forgetSimulators(): void;
363
385
  /**
364
386
  * Resolve a hint to exactly one simulator, or refuse.
365
387
  *
@@ -429,11 +451,11 @@ declare class SimulatorClient implements ScreenHost<SimulatorSummary> {
429
451
  * reports which simulator actually owns the port.
430
452
  */
431
453
  wdaUrl(): string;
454
+ /** The simulator `resolveTarget` falls back to when no hint is given. */
455
+ get defaultSimulatorId(): string | undefined;
432
456
  get wdaPort(): number;
433
457
  wda(_target: SimulatorSummary): WdaClient;
434
458
  }
435
- //#endregion
436
- //#region src/config.d.ts
437
459
  /**
438
460
  * There are no credentials here, and unlike the device server there is barely
439
461
  * any setup either. Two lanes reach a simulator and both are local:
@@ -462,25 +484,21 @@ declare const ConfigSchema: z.ZodObject<{
462
484
  openPath: z.ZodDefault<z.ZodString>;
463
485
  }, z.core.$strict>;
464
486
  type Config = z.infer<typeof ConfigSchema>;
465
- declare const defaultConfigPath: (env?: NodeJS.ProcessEnv) => string;
487
+ export declare const defaultConfigPath: (env?: NodeJS.ProcessEnv) => string;
466
488
  /**
467
489
  * Environment first, config file second, **per field** — not whole-source.
468
490
  * A one-off `IOS_SIMULATOR_ALLOW_WRITES=0` has to beat a file that says `true`,
469
491
  * while a file that sets `simulatorId` keeps working when the environment says
470
492
  * nothing about it. Merging field by field is the only rule that gives both.
471
493
  */
472
- declare const loadConfig: (env?: NodeJS.ProcessEnv, configPath?: string) => Config;
473
- //#endregion
474
- //#region src/tools/runner.d.ts
494
+ export declare const loadConfig: (env?: NodeJS.ProcessEnv, configPath?: string) => Config;
475
495
  /** Injected in tests so no xcodebuild is ever started by the suite. */
476
496
  type SpawnRunner = (command: string, args: string[], opts: {
477
497
  env: Record<string, string>;
478
498
  logPath: string;
479
499
  }) => Promise<number | undefined>;
480
- //#endregion
481
- //#region src/server.d.ts
482
- declare const SERVER_NAME: string;
483
- declare const SERVER_VERSION: string;
500
+ export declare const SERVER_NAME: string;
501
+ export declare const SERVER_VERSION: string;
484
502
  type CreateServerOptions = {
485
503
  config: Config;
486
504
  /** Override the process boundary (tests): `xcrun`, `plutil` and `sips` never run. */
@@ -504,9 +522,7 @@ type CreatedServer = {
504
522
  * no Xcode, no WebDriverAgent and no process left running.
505
523
  * Nothing below `config.ts` reads `process.env`.
506
524
  */
507
- declare const createServer: (opts: CreateServerOptions) => CreatedServer;
508
- //#endregion
509
- //#region src/client/display.d.ts
525
+ export declare const createServer: (opts: CreateServerOptions) => CreatedServer;
510
526
  type ScreenProfile = {
511
527
  mainScreenWidth?: number;
512
528
  mainScreenHeight?: number;
@@ -517,7 +533,7 @@ type PlistOpts = {
517
533
  exec: ExecImpl;
518
534
  timeoutMs: number;
519
535
  };
520
- declare const readScreenProfile: (deviceType: RawDeviceType, opts: PlistOpts) => Promise<ScreenProfile>;
536
+ export declare const readScreenProfile: (deviceType: RawDeviceType, opts: PlistOpts) => Promise<ScreenProfile>;
521
537
  /**
522
538
  * Width and height straight out of a PNG's IHDR.
523
539
  *
@@ -525,7 +541,7 @@ declare const readScreenProfile: (deviceType: RawDeviceType, opts: PlistOpts) =>
525
541
  * and the bytes are already in hand: the signature is fixed, `IHDR` is always
526
542
  * the first chunk, and the two dimensions are big-endian at offsets 16 and 20.
527
543
  */
528
- declare const pngDimensions: (png: Buffer) => {
544
+ export declare const pngDimensions: (png: Buffer) => {
529
545
  width: number;
530
546
  height: number;
531
547
  } | undefined;
@@ -541,15 +557,13 @@ declare const pngDimensions: (png: Buffer) => {
541
557
  * `io enumerate`'s `Power state` is about the framebuffer port rather than the
542
558
  * screen, so mapping it would be a lie.
543
559
  */
544
- declare const toDisplayInfo: (profile: ScreenProfile, capture?: {
560
+ export declare const toDisplayInfo: (profile: ScreenProfile, capture?: {
545
561
  width: number;
546
562
  height: number;
547
563
  }) => DisplayInfo;
548
- //#endregion
549
- //#region src/client/errors.d.ts
550
564
  /** Raising the budget, or noticing the simulator died mid-call. */
551
- declare const TIMEOUT_REMEDY: string;
552
- declare const TOOLCHAIN_REMEDY: string;
565
+ export declare const TIMEOUT_REMEDY: string;
566
+ export declare const TOOLCHAIN_REMEDY: string;
553
567
  /**
554
568
  * How to get the runner up, from a shell.
555
569
  *
@@ -562,9 +576,9 @@ declare const TOOLCHAIN_REMEDY: string;
562
576
  * needs — but a remedy that sends a caller holding ios_simulator_restart_wda out
563
577
  * to a terminal is a remedy that wastes the tool it already has.
564
578
  */
565
- declare const START_RUNNER_SCRIPT_REMEDY: string;
579
+ export declare const START_RUNNER_SCRIPT_REMEDY: string;
566
580
  /** The same thing, done with this server's own tool. */
567
- declare const START_RUNNER_TOOL_REMEDY: string;
581
+ export declare const START_RUNNER_TOOL_REMEDY: string;
568
582
  /**
569
583
  * How to get the runner up, in whichever way the caller can actually reach.
570
584
  *
@@ -572,11 +586,11 @@ declare const START_RUNNER_TOOL_REMEDY: string;
572
586
  * it unconditionally would be the same mistake this fixes, pointed the other
573
587
  * way: a remedy naming a tool that is not in the list.
574
588
  */
575
- declare const startRunnerRemedy: (allowWrites: boolean) => string;
589
+ export declare const startRunnerRemedy: (allowWrites: boolean) => string;
576
590
  /** What to do when WebDriverAgent does not answer at all. */
577
- declare const wdaUnavailableRemedy: (allowWrites: boolean) => string;
591
+ export declare const wdaUnavailableRemedy: (allowWrites: boolean) => string;
578
592
  /** No simulator matched, or several did and none was named. */
579
- declare class SimulatorNotFoundError extends IosError$1 {
593
+ export declare class SimulatorNotFoundError extends IosError$1 {
580
594
  readonly name = "SimulatorNotFoundError";
581
595
  constructor(message: string, remedy: string);
582
596
  }
@@ -588,7 +602,7 @@ declare class SimulatorNotFoundError extends IosError$1 {
588
602
  * "it is shut down" would otherwise be buried in a CoreSimulator envelope that
589
603
  * reads like a lookup bug.
590
604
  */
591
- declare class SimulatorNotBootedError extends IosError$1 {
605
+ export declare class SimulatorNotBootedError extends IosError$1 {
592
606
  readonly name = "SimulatorNotBootedError";
593
607
  constructor(name: string, udid: string);
594
608
  }
@@ -599,26 +613,23 @@ declare class SimulatorNotBootedError extends IosError$1 {
599
613
  * at all: `simctl io` against one of these aborts with an uncaught
600
614
  * NSInternalInconsistencyException and a thirty-line stack trace.
601
615
  */
602
- declare class RuntimeUnavailableError extends IosError$1 {
616
+ export declare class RuntimeUnavailableError extends IosError$1 {
603
617
  readonly name = "RuntimeUnavailableError";
604
618
  constructor(name: string, reason: string | undefined);
605
619
  }
606
620
  /** Thrown when a write path is reached while IOS_SIMULATOR_ALLOW_WRITES is off. */
607
- declare class WritesDisabledError extends IosError$1 {
621
+ export declare class WritesDisabledError extends IosError$1 {
608
622
  readonly name = "WritesDisabledError";
609
623
  constructor(what: string);
610
624
  }
611
625
  /** A shut-down simulator captures nothing, and that is the usual cause here. */
612
- declare const EMPTY_SCREENSHOT_REMEDY: string;
613
- //#endregion
614
- //#region src/build-info.d.ts
626
+ export declare const EMPTY_SCREENSHOT_REMEDY: string;
615
627
  type BuildInfo = {
616
628
  name: string;
617
629
  version: string;
618
630
  gitCommit: string;
619
631
  gitCommitDate: string;
620
632
  };
621
- declare const BUILD_INFO: BuildInfo;
622
- //#endregion
623
- export { BUILD_INFO, CommandError, CommandTimeoutError, type Config, type CreateServerOptions, type CreatedServer, EMPTY_SCREENSHOT_REMEDY, IosError, type RawDeviceType, type RawRuntime, type RawSim, type RawSimApp, RuntimeUnavailableError, SERVER_NAME, SERVER_VERSION, START_RUNNER_SCRIPT_REMEDY, START_RUNNER_TOOL_REMEDY, type SimAppSummary, Simctl, SimulatorClient, SimulatorNotBootedError, SimulatorNotFoundError, type SimulatorSummary, TIMEOUT_REMEDY, TOOLCHAIN_REMEDY, ToolchainError, WdaError, WdaUnavailableError, WritesDisabledError, assertNotBulkTarget, createServer, defaultConfigPath, loadConfig, parseSimctlError, pngDimensions, readScreenProfile, startRunnerRemedy, summarizeApps, summarizeDevices, toDisplayInfo, toListRow, wdaUnavailableRemedy };
633
+ export declare const BUILD_INFO: BuildInfo;
634
+ export { CommandError, CommandTimeoutError, type Config, type CreateServerOptions, type CreatedServer, IosError, type RawDeviceType, type RawRuntime, type RawSim, type RawSimApp, type SimAppSummary, type SimulatorSummary, ToolchainError, WdaError, WdaUnavailableError };
624
635
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/client/logs.ts","../src/client/simctl.ts","../src/client/shape.ts","../src/client/simulator.ts","../src/config.ts","../src/tools/runner.ts","../src/server.ts","../src/client/display.ts","../src/client/errors.ts","../src/build-info.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;KAkBY;EACV;EACA;EACA;;EAEA;EACA;EACA;;;KAIU,gBAAgB;cAcf;mBAIkB;mBAHZ;UACT;EAER,YAA6B,QAAO;UAE5B;;;;;;EASR,OAAO,SAAS;EAKhB,KAAK,0BAA0B,+BAA+B;;;;;;EAgB9D,QAAQ,SAAS;;;;;;;;;;;;;;;;;;;;;;KChDP;EACV;EACA;;EAEA;EACA;EACA,OAAO;EACP,SAAS;;KAGC;EACV;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA;;KAGU;EACV;EACA;EACA;EACA;;KAGU;EACV;EACA;EACA;EACA;;;KAIU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;;;;;;;;;cAqBW,mBAAgB;EAExB;EAAiB;EAAe;;;;;;;;;;;cA4DxB,sBAAmB;cAUnB;mBACM;mBACA;;UAET;EAER,YAAY,MAAM;;UAOJ;;;;;UAcA;;;;;;;;;;;UAqBA;EAwBR,eAAe,QAAQ,eAAe;EAKtC,gBAAgB,QAAQ;EAIxB,mBAAmB,QAAQ;EAS3B,KAAK,eAAe;EAKpB,SAAS,eAAe;EAKxB,MAAM,eAAe;;;;;;;;;;;;;;;;EAoBrB,QAAQ,mBAAmB;EAY3B,SAAS,eAAe,QAAQ,eAAe;EAK/C,QAAQ,cAAc,kBAAkB;;;;;;;;;EAcxC,SAAS,cAAc,kBAAkB;;;;;;;;;;;;;;;;;;;EAwBzC,OACJ,cACA,kBACA;IACE;IACA;IACA;IACA;IACA,MAAM;MAEP;;;;;EAuCG,UAAU,cAAc,mBAAmB;EAK3C,UAAU,cAAc,mBAAmB;EAK3C,QAAQ,cAAc,cA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A;KAEQ,SAAS,EAAE,aAAa;cA0BvB,oBAAiB,MAAS,OAAO;;;;;;;cA0BjC,aAAU,MAChB,OAAO,YAAU,wBAErB;;;;KCvHS,eACV,iBACA,gBACA;EAAQ,KAAK;EAAwB;MAClC;;;cCPQ;cACA;KAED;EACV,QAAQ;;EAER,OAAO;;EAEP,eAAe;;EAEf,cAAc;;EAEd,eAAe;EACf,SAAS;;KAGC;EACV,QAAQ;EACR,QAAQ;;;;;;;;;cAUG,eAAY,MAAU,wBAAsB;;;KCT7C;EACV;EACA;EACA;;KAqBG;EAAc;EAAoB,MAAM;EAAU;;cAe1C,oBAAiB,YAChB,eAAa,MACnB,cACL,QAAQ;;;;;;;;cAwBE,gBAAa,KAAS;EAAW;EAAe;;;;;;;;;;;;;;cAmBhD,gBAAa,SACf,eAAa;EACV;EAAe;MAC1B;;;;cCzGU;cAIA;;;;;;;;;;;;;cAgBA;;cAOA;;;;;;;;cAYA,oBAAiB;;cAIjB,uBAAoB;;cAMpB,+BAA+B;WACxB;EAElB,YAAY,iBAAiB;;;;;;;;;;cAalB,gCAAgC;WACzB;EAElB,YAAY,cAAc;;;;;;;;;cAiBf,gCAAgC;WACzB;EAElB,YAAY,cAAc;;;cAUf,4BAA4B;WACrB;EAElB,YAAY;;;cASD;;;KClGD;EACV;EACA;EACA;EACA;;cAGW,YAAY"}
1
+ {"version":3,"file":"index.d.ts","names":["IosError"],"sources":["../src/client/logs.ts","../src/client/simctl.ts","../src/client/shape.ts","../src/client/simulator.ts","../src/config.ts","../src/tools/runner.ts","../src/server.ts","../src/client/display.ts","../src/client/errors.ts","../src/build-info.ts"],"mappings":";;;;;;;;;;;;;;;;;;;KAkBY;EACV;EACA;EACA;;EAEA;EACA;EACA;;;KAIU,gBAAgB;cAcf;mBAIkB;mBAHZ;UACT;EAER,YAA6B,QAAO;UAE5B;;;;;;EASR,OAAO,SAAS;EAKhB,KAAK,0BAA0B,+BAA+B;;;;;;EAgB9D,QAAQ,SAAS;;;;;;;;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ACA;;KAqBG;EAAc;EAAoB,MAAM;EAAU;;qBAe1C,oBAAiB,YAChB,eAAa,MACnB,cACL,QAAQ;;;;;;;;qBAwBE,gBAAa,KAAS;EAAW;EAAe;;;;;;;;;;;;;;qBAmBhD,gBAAa,SACf,eAAa;EACV;EAAe;MAC1B;;qBCzGU;qBAIA;;;;;;;;;;;;;qBAgBA;;qBAOA;;;;;;;;qBAYA,oBAAiB;;qBAIjB,uBAAoB;;qBAMpB,+BAA+BA;WACxB;EAElB,YAAY,iBAAiB;;;;;;;;;;qBAalB,gCAAgCA;WACzB;EAElB,YAAY,cAAc;;;;;;;;;qBAiBf,gCAAgCA;WACzB;EAElB,YAAY,cAAc;;;qBAUf,4BAA4BA;WACrB;EAElB,YAAY;;;qBASD;KClGD;EACV;EACA;EACA;EACA;;qBAGW,YAAY"}
package/dist/index.js CHANGED
@@ -1,2 +1 @@
1
- import { A as WritesDisabledError, C as SimulatorNotBootedError, D as ToolchainError, E as TOOLCHAIN_REMEDY, M as wdaUnavailableRemedy, N as BUILD_INFO, O as WdaError, S as START_RUNNER_TOOL_REMEDY, T as TIMEOUT_REMEDY, _ as CommandTimeoutError, a as createServer, b as RuntimeUnavailableError, c as assertNotBulkTarget, d as summarizeDevices, f as toListRow, g as CommandError, h as toDisplayInfo, i as SERVER_VERSION, j as startRunnerRemedy, k as WdaUnavailableError, l as parseSimctlError, m as readScreenProfile, n as loadConfig, o as SimulatorClient, p as pngDimensions, r as SERVER_NAME, s as Simctl, t as defaultConfigPath, u as summarizeApps, v as EMPTY_SCREENSHOT_REMEDY, w as SimulatorNotFoundError, x as START_RUNNER_SCRIPT_REMEDY, y as IosError } from "./config-D0JgmT_U.js";
2
- export { BUILD_INFO, CommandError, CommandTimeoutError, EMPTY_SCREENSHOT_REMEDY, IosError, RuntimeUnavailableError, SERVER_NAME, SERVER_VERSION, START_RUNNER_SCRIPT_REMEDY, START_RUNNER_TOOL_REMEDY, Simctl, SimulatorClient, SimulatorNotBootedError, SimulatorNotFoundError, TIMEOUT_REMEDY, TOOLCHAIN_REMEDY, ToolchainError, WdaError, WdaUnavailableError, WritesDisabledError, assertNotBulkTarget, createServer, defaultConfigPath, loadConfig, parseSimctlError, pngDimensions, readScreenProfile, startRunnerRemedy, summarizeApps, summarizeDevices, toDisplayInfo, toListRow, wdaUnavailableRemedy };
1
+ export { N as BUILD_INFO, g as CommandError, _ as CommandTimeoutError, v as EMPTY_SCREENSHOT_REMEDY, y as IosError, b as RuntimeUnavailableError, r as SERVER_NAME, i as SERVER_VERSION, x as START_RUNNER_SCRIPT_REMEDY, S as START_RUNNER_TOOL_REMEDY, s as Simctl, o as SimulatorClient, C as SimulatorNotBootedError, w as SimulatorNotFoundError, T as TIMEOUT_REMEDY, E as TOOLCHAIN_REMEDY, D as ToolchainError, O as WdaError, k as WdaUnavailableError, A as WritesDisabledError, c as assertNotBulkTarget, a as createServer, t as defaultConfigPath, n as loadConfig, l as parseSimctlError, p as pngDimensions, m as readScreenProfile, j as startRunnerRemedy, u as summarizeApps, d as summarizeDevices, h as toDisplayInfo, f as toListRow, M as wdaUnavailableRemedy } from "./config-SdCcoXC3.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mgcrea/mcp-ios-simulator",
3
- "version": "0.3.1",
3
+ "version": "0.4.1",
4
4
  "description": "Model Context Protocol server for driving iOS Simulators: screenshots, UI tree, taps, app lifecycle and device staging",
5
5
  "keywords": [
6
6
  "ios",
@@ -60,23 +60,23 @@
60
60
  "prepublishOnly": "pnpm build"
61
61
  },
62
62
  "dependencies": {
63
- "@mgcrea/mcp-ios-core": "^0.3.0",
64
- "@modelcontextprotocol/server": "^2.0.0",
65
- "zod": "^4.4.3"
63
+ "@mgcrea/mcp-ios-core": "^0.4.0",
64
+ "@modelcontextprotocol/server": "^2.4.0",
65
+ "zod": "^4.6.7"
66
66
  },
67
67
  "devDependencies": {
68
- "@modelcontextprotocol/client": "^2.0.0",
69
- "@types/node": "^26.2.0",
70
- "oxfmt": "^0.62.0",
71
- "oxlint": "^1.77.0",
72
- "tsdown": "^0.22.14",
73
- "tsx": "^4.23.11",
68
+ "@modelcontextprotocol/client": "^2.4.0",
69
+ "@types/node": "^26.6.6",
70
+ "oxfmt": "^0.75.0",
71
+ "oxlint": "^1.90.0",
72
+ "tsdown": "^0.23.4",
73
+ "tsx": "^4.23.15",
74
74
  "typescript": "^7.0.2",
75
- "vite": "^8.2.1",
76
- "vitest": "^4.1.10"
75
+ "vite": "^8.3.5",
76
+ "vitest": "^5.0.5"
77
77
  },
78
78
  "engines": {
79
79
  "node": ">=22"
80
80
  },
81
- "packageManager": "pnpm@11.13.1"
81
+ "packageManager": "pnpm@12.16.1"
82
82
  }
package/scripts/wda.sh CHANGED
@@ -20,11 +20,11 @@
20
20
  # USE_PORT same thing, for people driving xcodebuild by hand
21
21
  # NODE node binary (default: node off PATH)
22
22
  # WDA_DIR checkout location (default: ~/.cache/mcp-ios-simulator/WebDriverAgent)
23
- # WDA_REF git tag to pin (default: v16.12.3)
23
+ # WDA_REF git tag to pin (default: v16.15.3)
24
24
  set -euo pipefail
25
25
 
26
26
  WDA_DIR="${WDA_DIR:-$HOME/.cache/mcp-ios-simulator/WebDriverAgent}"
27
- WDA_REF="${WDA_REF:-v16.12.3}"
27
+ WDA_REF="${WDA_REF:-v16.15.3}"
28
28
  DERIVED="${WDA_DIR}/.build"
29
29
  PORT="${USE_PORT:-${IOS_SIMULATOR_WDA_PORT:-8100}}"
30
30
  # Not always on PATH: a host that embeds its own runtime leaves nothing called