simtap 0.6.2 → 0.6.3

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.
@@ -44,14 +44,24 @@ export async function listDevices(fresh = false) {
44
44
  if (!fresh && cached && Date.now() - cached.at < CACHE_MS)
45
45
  return cached.devices;
46
46
  try {
47
- const { stdout } = await run("xcrun", ["simctl", "list", "devices", "--json"], { timeoutMs: 20_000 });
47
+ const { stdout } = await run("xcrun", ["simctl", "list", "devices", "--json"], { timeoutMs: 30_000 });
48
48
  cached = { at: Date.now(), devices: parseDevices(stdout) };
49
49
  return cached.devices;
50
50
  }
51
51
  catch (error) {
52
- throw new ToolError(`${NO_SIMULATOR} (${error.message})`, withCloudHint("Install Xcode from the App Store, open it once, then add an iOS Simulator runtime in Settings > Components."));
52
+ throw listError(error);
53
53
  }
54
54
  }
55
+ /**
56
+ * Why simctl gave no device list. A timeout means the Simulator service is still starting (it can take a minute
57
+ * the first time after a reboot or an Xcode update), not that this computer can't run it.
58
+ */
59
+ export function listError(error) {
60
+ if (/timed out after/.test(error.message)) {
61
+ return new ToolError("The Simulator service did not answer within 30 s: it can take a minute to start the first time after a reboot or an Xcode update.", "Call again in 30 s.");
62
+ }
63
+ return new ToolError(`${NO_SIMULATOR} (${error.message})`, withCloudHint("Install Xcode from the App Store, open it once, then add an iOS Simulator runtime in Settings > Components."));
64
+ }
55
65
  export async function xcodeVersion() {
56
66
  try {
57
67
  const { stdout } = await run("xcodebuild", ["-version"], { timeoutMs: 15_000 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simtap",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "description": "Give your agent a phone: read and drive the iOS Simulator from any MCP client or the command line.",
5
5
  "license": "MIT",
6
6
  "repository": {